I’m building an application that, amongst other things, is able to sync it’s audio (tracks) to midi clock. One of the hurdles i’ve encoutered is achieving accurate sync. When I recieve a Midi-start command, the audio has to start playing. Ofcourse this will not happen instantaniously, so my method for coping with this is to cut off a number of samples of the audio track, to create an offset.
In order for me to calculate this offset I need to know when a particular block of audio is going to hit the speakers. I’ve modified the juce corrAudio implementation so that it uses the coreAudio timestamps to calculate this latency. (this was actually pretty easy).
I would like to do the same with ASIO, and it seems capable of it (something with ASIOTime structs). But is seems that Juce’s ASIO implementation is not permitting this. (asioMessagesCallback returns 0 when it’s “asked” “kAsioSupportsTimeInfo?”)
Is there maybe any other way to achieve some sort of asio timestamping or am I just going to have to hack the juce implementation?