JayFoxRox / xqemu-espes

Archive only. Repository moved to JayFoxRox/xqemu
https://github.com/JayFoxRox/xqemu
24 stars 1 forks source link

APU Threads #25

Open JayFoxRox opened 7 years ago

JayFoxRox commented 7 years ago

This uses a pipeline from VP -> MIXBUF -> GP -> Scratch -> EP. It also improves timing of the SE to get closer to the 48000 Hz which are required to stay in sync with the AC97.

The VP -> GP sync is handled by the VP operating on a temporary output mixbuffer. Only once the GP thread is idle, the temporary VP mixbuffer will be moved to the real GP MIXBUF input. The GP is then kicked off after the copy.

Preprocessor var SYNC_GP_EP will indicate wether GP -> EP needs to be synchronized (= will GP have to wait for EP to be idle before starting). Assuming a ringbuffer is used between GP and EP, we don't have to sync here. Consider this change experimental. - More hardware tests are necessary.