ASIO and non-PCM audio data

So I’ve just been handed a job that involves playing and recording non-PCM audio data.

JUCE’s ASIO implemetation is very close to what I need, with one snag - AudioIODeviceCallback presents the audio as floating-point data. I need to see the original fixed-point PCM data - for this project, I need to have bit-for-bit accuracy.

I suppose I could just take the JUCE ASIO implementation and hack it up - this is, after all, a somewhat esoteric case. For most users, floating-point data is probably preferable.

If I could access the ASIOCallbacks structure, I could replace the callbacks with my own and still use the rest of the JUCE implementation as is. It’s declared as static, so I can’t extern it. I could just change that in my local copy, but it’ll break between releases of JUCE.

Anyone got any bright ideas? I’m not asking for a JUCE change - just a reasonably straightforward way of getting to my goal.


that is a pretty obscure one! Yes, I’d say hacking the existing code is the way to do it. Now that I’ve added the AudioIODeviceType class you could implement it as another type of device alongside the current asio driver.