When I load file from CD to ram without any thread started, it's fast, as it used to be.
Now when I start a thread (which itself will initialize an ogg player which seems to start another thread), when I load data from CD in the main thread, it's 7 times slower !
here is my test log:
Code: Select all
fs_copy /cd/dreamcast/snd/01.ogg to /ram/01.ogg
Time: 2195ms
fs_copy /cd/dreamcast/snd/02.ogg to /ram/02.ogg
Time: 2957ms
fs_copy /cd/dreamcast/snd/03.ogg to /ram/03.ogg
Time: 522ms
fs_copy /cd/dreamcast/snd/04.ogg to /ram/04.ogg
Time: 2746ms
-> fs_ramdisk_detach 01->04.ogg
-> pthread_create
-> Thread talking: init ogg player
snd_init(): loading 3336 bytes into SPU RAM
sndserver: initializing sndoggvorbis 0.7 [OggVorbis 1.0 based]
sndserver: pid is 5
Creating semaphore with deprecated sem_create(). Please update your code!
snd_stream: alloc'd channels 0/1
oggthread: waiting on semaphore
sndserver: successfully created thread
-> Thread talking: waiting infinite loop
Main thread talking:
fs_copy /cd/dreamcast/snd/01.ogg to /ram/01.ogg
Time: 16543ms
fs_copy /cd/dreamcast/snd/02.ogg to /ram/02.ogg
Time: 22327ms
fs_copy /cd/dreamcast/snd/03.ogg to /ram/03.ogg
Time: 4023ms
fs_copy /cd/dreamcast/snd/04.ogg to /ram/04.ogg
Time: 20837ms
and audio cd player is out of the question because I need precise music synchronization