I've been playing around with the AudioQueue stuff for a few days and it's all working fine.
I was trying to build a low-latency playback system by making the streaming buffers the same size as the audio file and pre-loading the buffers (which works fine) but I've hit a snag.
I've been trying to get the streaming to work at different sample rates so that I can play back the same sample at different pitches. I managed to do it by modifying the sample rate in the AudioStreamBasicDescription structure but in order to actually make the stream playback at the new rate it seems you have to create a new output, reload the audio file into the buffers and re-enqueue the output queue before starting playback again, otherwise the sample rate change has no effect.
There is a method to set queue properties; AudoQueueSetProperty() but unfortunately the sample rate Property (kAudioQueueDeviceProperty_SampleRate) is read-only
Can anyone suggest a way to achieve this with AudioQueue or do I need to move over to OpenAL?
Thanks,
Neil
I was trying to build a low-latency playback system by making the streaming buffers the same size as the audio file and pre-loading the buffers (which works fine) but I've hit a snag.
I've been trying to get the streaming to work at different sample rates so that I can play back the same sample at different pitches. I managed to do it by modifying the sample rate in the AudioStreamBasicDescription structure but in order to actually make the stream playback at the new rate it seems you have to create a new output, reload the audio file into the buffers and re-enqueue the output queue before starting playback again, otherwise the sample rate change has no effect.
There is a method to set queue properties; AudoQueueSetProperty() but unfortunately the sample rate Property (kAudioQueueDeviceProperty_SampleRate) is read-only
Can anyone suggest a way to achieve this with AudioQueue or do I need to move over to OpenAL?
Thanks,
Neil