-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
I've accidentally proved (while working on hrydgard/pspautotests#235) that sceAudioOutputBlocking and similar functions enqueue address ranges, rather than reading the actual samples directly and putting the samples on an external queue.
Because if you try to enqueue and overwrite the same range over and over, it'll play with bad artifacts, while if you double or triple buffer, playback is smooth.
This means that with the current implementation, games are already doing double buffering and then we maintain an extra buffer queue on top, instead of just reading from the already enqueued data. I believe that this causes us to delay audio by 1 buffer. In general, these buffers are generally fairly short, but it's still a matter of multiple milliseconds of unnecessary audio latency, so we should fix this.
Also, there's a possibility that this has something to do with audio being broken in #15485 , but really not sure about that.