File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ use symphonia_common::mpeg::video::{
1616} ;
1717use symphonia_common:: xiph:: audio:: flac:: { MetadataBlockHeader , MetadataBlockType } ;
1818use symphonia_core:: audio:: sample:: SampleFormat ;
19+ use symphonia_core:: audio:: Channels ;
1920use symphonia_core:: codecs:: audio:: well_known:: { CODEC_ID_FLAC , CODEC_ID_VORBIS } ;
2021use symphonia_core:: codecs:: audio:: AudioCodecParameters ;
2122use symphonia_core:: codecs:: audio:: { well_known:: * , AudioCodecId } ;
@@ -66,6 +67,7 @@ fn make_audio_codec_params(
6667 }
6768
6869 codec_params. with_sample_rate ( audio. sampling_frequency . round ( ) as u32 ) ;
70+ codec_params. with_channels ( Channels :: Discrete ( audio. channels . get ( ) as u16 ) ) ;
6971
7072 let format = audio. bit_depth . and_then ( |bits| match bits. get ( ) {
7173 8 => Some ( SampleFormat :: S8 ) ,
You can’t perform that action at this time.
0 commit comments