user605957
user605957

Reputation: 2489

What do the values in AudioBuffer in the CoreAudio framework represent?

What do the values in the mData member represent? It looks like each value is a 4 byte integer...

I guess my question is, what does each sample supposed to represent and what does the mNumberChannels member represent?

If I had to apply some sort of transform on the sound pattern, can I treat these samples as discrete samples in time? If so, what time period does each 512 samples represent?

Thanks Deshawn

Upvotes: 0

Views: 383

Answers (1)

hotpaw2
hotpaw2

Reputation: 70673

The mData buffer array elements can represent 16-bit signed integers, stereo pairs of 16-bit signed integers, 32-bit 8.24/s7.24 scaled-integer or fixed-point values, or 32-bit floating-point values, etc., depending on the Audio Unit and how it was configured.

The buffer duration will be its length in frames divided by the audio sample rate, for instance 512/44100 is about 11.61 milliSeconds.

Upvotes: 2

Related Questions