kAudioFormatFlagIsFloat sample range
kAudioFormatFlagIsFloat sample range
- Subject: kAudioFormatFlagIsFloat sample range
- From: "Stephen F. Booth" <email@hidden>
- Date: Sat, 11 Sep 2010 20:49:56 -0700
Hello all,
If kAudioFormatFlagIsFloat is set as part of an ExtAudioFile's client format, should the returned samples be in the range [-1, 1)? I've always worked under this assumption but I can't find anything explicit in the documentation. I've recently observed samples being returned from AAC files with values >= 1 (and < -1), which is causing clipping on one of my devices. It isn't difficult to perform hard limiting, but this is something I hadn't noticed before.
A representative file looks like:
File data format:
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Client format:
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved
After each call to ExtAudioFileRead I scan for the min/max sample values, and here is an example of what I'm seeing:
Max sample value: 1.011417
Min sample value: -1.063289
Min sample value: -1.003544
Min sample value: -1.058746
Min sample value: -1.077708
Max sample value: 1.046287
Is this to be expected?
Thanks,
Stephen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden