示例#1
0
        internal AudioDecoder(AVStream *stream) : base(stream)
        {
            var sampleRate    = codecContext->SampleRate;
            var channelLayout = codecContext->ChannelLayout;
            var sampleFormat  = codecContext->SampleFmt;

            if (channelLayout == 0)
            {
                channelLayout = FF.av_get_default_channel_layout(codecContext->Channels);
            }
            InFormat = new AudioFormat(sampleRate, channelLayout, sampleFormat);
        }