Skip to content

Commit

Permalink
fix stereo downmix on 32 bit PCM (#441)
Browse files Browse the repository at this point in the history
Co-authored-by: Brabebhin
  • Loading branch information
brabebhin authored Nov 21, 2024
1 parent e28b39f commit de96b62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/UncompressedAudioSampleProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,12 @@ void UncompressedAudioSampleProvider::SetMediaEncodingProperties(AVSampleFormat

// set encoding properties
encodingProperties.Subtype(outSampleFormat == AV_SAMPLE_FMT_FLT ? MediaEncodingSubtypes::Float() : MediaEncodingSubtypes::Pcm());
encodingProperties.Properties().Insert(MF_MT_AUDIO_CHANNEL_MASK, winrt::box_value(reportedChannelLayout));

encodingProperties.BitsPerSample(bitsPerSample);
encodingProperties.SampleRate(outSampleRate);
encodingProperties.ChannelCount(outChannelLayout.nb_channels);
encodingProperties.Bitrate(bitsPerSample * outSampleRate * outChannelLayout.nb_channels);
encodingProperties.Properties().Insert(MF_MT_AUDIO_CHANNEL_MASK, winrt::box_value(reportedChannelLayout));
}

HRESULT UncompressedAudioSampleProvider::CheckFormatChanged(AVSampleFormat format, const AVChannelLayout& channelLayout, int sampleRate)
Expand Down

0 comments on commit de96b62

Please sign in to comment.