martastain

CasparCG 2.3 16 channels

Dec 11th, 2020
1,132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.52 KB | None | 0 0
  1. diff --git a/src/core/video_format.h b/src/core/video_format.h
  2. index 3c90f85..179c114 100644
  3. --- a/src/core/video_format.h
  4. +++ b/src/core/video_format.h
  5. @@ -84,7 +84,7 @@ struct video_format_desc final
  6.      std::size_t          size; // frame size in bytes
  7.      std::wstring         name; // name of output format
  8.  
  9. -    int              audio_channels = 8;
  10. +    int              audio_channels = 16;
  11.      int              audio_sample_rate;
  12.      std::vector<int> audio_cadence; // rotating optimal number of samples per frame
  13.  
  14. diff --git a/src/modules/ffmpeg/util/av_util.cpp b/src/modules/ffmpeg/util/av_util.cpp
  15. index 96d5354..515fc0f 100644
  16. --- a/src/modules/ffmpeg/util/av_util.cpp
  17. +++ b/src/modules/ffmpeg/util/av_util.cpp
  18. @@ -63,12 +63,12 @@ core::mutable_frame make_frame(void*                    tag,
  19.  
  20.      if (audio) {
  21.          // TODO This is a bit of a hack
  22. -        frame.audio_data() = std::vector<int32_t>(audio->nb_samples * 8, 0);
  23. +        frame.audio_data() = std::vector<int32_t>(audio->nb_samples * 16, 0);
  24.          auto dst           = frame.audio_data().data();
  25.          auto src           = reinterpret_cast<int32_t*>(audio->data[0]);
  26.          tbb::parallel_for(0, audio->nb_samples, [&](int i) {
  27. -            for (auto j = 0; j < std::min(8, audio->channels); ++j) {
  28. -                dst[i * 8 + j] = src[i * audio->channels + j];
  29. +            for (auto j = 0; j < std::min(16, audio->channels); ++j) {
  30. +                dst[i * 16 + j] = src[i * audio->channels + j];
  31.              }
  32.          });
  33.      }
Advertisement
Add Comment
Please, Sign In to add comment