Skip to content

Commit

Permalink
add ambisonic subtypes
Browse files Browse the repository at this point in the history
  • Loading branch information
aentity committed Feb 18, 2024
1 parent 9a962e1 commit 99d3fc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,11 @@ const KSDATAFORMAT_SUBTYPE_PCM: [u8; 16] = [0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
const KSDATAFORMAT_SUBTYPE_IEEE_FLOAT: [u8; 16] = [0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71];

const KSDATAFORMAT_SUBTYPE_AMBISONIC_B_FORMAT_PCM: [u8; 16] = [0x01, 0x00, 0x00, 0x00, 0x21, 0x07, 0xd3, 0x11, 0x86,
0x44, 0xc8, 0xc1, 0xca, 0x00, 0x00, 0x00];

const KSDATAFORMAT_SUBTYPE_AMBISONIC_B_FORMAT_IEE_FLOAT: [u8; 16] = [0x03, 0x00, 0x00, 0x00, 0x21, 0x07, 0xd3, 0x11, 0x86,
0x44, 0xc8, 0xc1, 0xca, 0x00, 0x00, 0x00];

impl WavSpec {
/// Get "stand-alone" wav header representing infinite or unknown size wav file.
Expand Down
2 changes: 2 additions & 0 deletions src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ impl<R: io::Read> ChunksReader<R> {
let sample_format = match subformat {
super::KSDATAFORMAT_SUBTYPE_PCM => SampleFormat::Int,
super::KSDATAFORMAT_SUBTYPE_IEEE_FLOAT => SampleFormat::Float,
super::KSDATAFORMAT_SUBTYPE_AMBISONIC_B_FORMAT_PCM => SampleFormat::Int,
super::KSDATAFORMAT_SUBTYPE_AMBISONIC_B_FORMAT_IEE_FLOAT => SampleFormat::Float,
_ => return Err(Error::Unsupported),
};

Expand Down

0 comments on commit 99d3fc5

Please sign in to comment.