The No Audio backend and the OpenAL backend update the samples on a timer. The other backends are updating the samples based on the mixer (which is on a thread).
It has to be based on the globaltimer because samples are played at a known rate on the real hardware.
Having the samples consumed by the mixer would mean that the audio might play faster or slower than the CPU and the rest of the emulation expects i.e. asynchronous audio. This can lead to the game going into an error state.
Let us know the part of the code which makes the samples get consumed quicker/slower than they should. I suspect it is the mixer's watermark code.
It has to be based on the globaltimer because samples are played at a known rate on the real hardware.
Having the samples consumed by the mixer would mean that the audio might play faster or slower than the CPU and the rest of the emulation expects i.e. asynchronous audio. This can lead to the game going into an error state.
Let us know the part of the code which makes the samples get consumed quicker/slower than they should. I suspect it is the mixer's watermark code.
