mirror of
https://github.com/alfg/mp4-rust.git
synced 2024-12-22 12:06:33 +00:00
feat: add Freq7350 to SampleFreqIndex enum (#47)
This commit is contained in:
parent
eedccec776
commit
75599fe561
1 changed files with 3 additions and 0 deletions
|
@ -358,6 +358,7 @@ pub enum SampleFreqIndex {
|
|||
Freq12000 = 0x9,
|
||||
Freq11025 = 0xa,
|
||||
Freq8000 = 0xb,
|
||||
Freq7350 = 0xc,
|
||||
}
|
||||
|
||||
impl TryFrom<u8> for SampleFreqIndex {
|
||||
|
@ -376,6 +377,7 @@ impl TryFrom<u8> for SampleFreqIndex {
|
|||
0x9 => Ok(SampleFreqIndex::Freq12000),
|
||||
0xa => Ok(SampleFreqIndex::Freq11025),
|
||||
0xb => Ok(SampleFreqIndex::Freq8000),
|
||||
0xc => Ok(SampleFreqIndex::Freq7350),
|
||||
_ => Err(Error::InvalidData("invalid sampling frequency index")),
|
||||
}
|
||||
}
|
||||
|
@ -396,6 +398,7 @@ impl SampleFreqIndex {
|
|||
&SampleFreqIndex::Freq12000 => 12000,
|
||||
&SampleFreqIndex::Freq11025 => 11025,
|
||||
&SampleFreqIndex::Freq8000 => 8000,
|
||||
&SampleFreqIndex::Freq7350 => 7350,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue