diff options
| author | mikey <mikey@cinecert.com> | 2014-04-29 15:31:21 +0000 |
|---|---|---|
| committer | mikey <> | 2014-04-29 15:31:21 +0000 |
| commit | dd03f3ae2c71df2c4eb89804293e621777a050cf (patch) | |
| tree | 1e26fd0dab7c97aa82ce03f284ae449f0bb87b47 /src/AtmosSyncChannel_Mixer.cpp | |
| parent | 5fae5df9b1cf2990b0383e1b633bdab4476a9669 (diff) | |
added a note about AS-02 support.
Diffstat (limited to 'src/AtmosSyncChannel_Mixer.cpp')
| -rw-r--r-- | src/AtmosSyncChannel_Mixer.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/AtmosSyncChannel_Mixer.cpp b/src/AtmosSyncChannel_Mixer.cpp index 70cfbfd..a58b3cd 100644 --- a/src/AtmosSyncChannel_Mixer.cpp +++ b/src/AtmosSyncChannel_Mixer.cpp @@ -254,6 +254,45 @@ ASDCP::AtmosSyncChannelMixer::MixInAtmosSyncChannel() // Result_t +ASDCP::AtmosSyncChannelMixer::AppendSilenceChannels(const ui32_t& channel_count) +{ + if ( m_ADesc.QuantizationBits == 0 ) + { + DefaultLogSink().Error("Mixer object contains no channels, call OpenRead() first.\n"); + return RESULT_PARAM; + } + + Result_t result = RESULT_OK; + PCM::AudioDescriptor tmpDesc; + + if ( channel_count > 0 ) + { + Kumu::mem_ptr<SilenceDataProvider> I = + new SilenceDataProvider(channel_count, + m_ADesc.QuantizationBits, + m_ADesc.AudioSamplingRate.Numerator, + m_ADesc.EditRate); + + result = I->FillAudioDescriptor(tmpDesc); + + if ( ASDCP_SUCCESS(result) ) + { + m_ADesc.BlockAlign += tmpDesc.BlockAlign; + m_ChannelCount += tmpDesc.ChannelCount; + m_ADesc.ChannelCount = m_ChannelCount; + m_ADesc.AvgBps = (ui32_t)(ceil(m_ADesc.AudioSamplingRate.Quotient()) * m_ADesc.BlockAlign); + + m_outputs.push_back(std::make_pair(channel_count, I.get())); + m_inputs.push_back(I); + I.release(); + } + } + + return result; +} + +// +Result_t ASDCP::AtmosSyncChannelMixer::FillAudioDescriptor(PCM::AudioDescriptor& ADesc) const { ADesc = m_ADesc; |
