File tree 1 file changed +5
-9
lines changed
symphonia-format-riff/src/wave
1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,11 @@ impl WaveFormatChunk {
78
78
// Select the appropriate codec using bits per sample. Samples are always interleaved and
79
79
// little-endian encoded for the PCM format.
80
80
let codec = match bits_per_sample {
81
- 8 => CODEC_TYPE_PCM_U8 ,
82
- 16 => CODEC_TYPE_PCM_S16LE ,
83
- 24 => CODEC_TYPE_PCM_S24LE ,
84
- 32 => CODEC_TYPE_PCM_S32LE ,
85
- _ => {
86
- return decode_error (
87
- "wav: bits per sample for fmt_pcm must be 8, 16, 24 or 32 bits" ,
88
- )
89
- }
81
+ 1 ..=8 => CODEC_TYPE_PCM_U8 ,
82
+ 9 ..=16 => CODEC_TYPE_PCM_S16LE ,
83
+ 17 ..=24 => CODEC_TYPE_PCM_S24LE ,
84
+ 25 ..=32 => CODEC_TYPE_PCM_S32LE ,
85
+ _ => return decode_error ( "wav: bits per sample unsupported for pcm" ) ,
90
86
} ;
91
87
92
88
let channels = try_channel_count_to_mask ( n_channels) ?;
You can’t perform that action at this time.
0 commit comments