Open main menu

Bluddy

Joined 24 February 2010
721 bytes added ,  03:12, 24 May 2010
m
Line 39: Line 39:
** No More SDL!
** No More SDL!
*** Improve SDL audio output
*** Improve SDL audio output
**** SDL blocks when outputting audio. This is the thread we do most work in, so don't block. Done.
**** SDL blocks when outputting audio. This is the thread we do most work in, so don't block.  
***** Unfortunately, it wasn't the kind of blocking that the name of the function would imply. It just means that it blocks if we try to play and the audio's already playing. This is still the only way to render sound properly, possibly due to tiny delays when context switching.
***** Our thread is still more efficient than SDL. Also, we can control the priority. We can also make the thread consume and another low priority thread the PCM producer for possibly higher efficiency.
***** Check if the timer (which is under heavy use in CoMI) also causes the clicking issue in that game because of long sound rendering. Maybe we can play with priorities, or maybe we need to put context switches in the timer/music/main code.
**** Also, SDL creates threads that ALL have VFPU bit set. That's not efficient when switching contexts.
**** Also, SDL creates threads that ALL have VFPU bit set. That's not efficient when switching contexts.
**** Additionally, change priority so that MP3/MIDI rendering is in same priority and is fairer while getting called back is higher priority.
**** Additionally, change priority so that MP3/MIDI rendering is in same priority and is fairer while getting called back is higher priority.
36

edits