Hello,
I?ve implemented SDL cd-audio support in my game.
It works basicly but everytime I start, the game hangs until the CDROM spins
up and starts playing the track.
Replaying or skipping between the tracks during gameplay freezes the game
for ~ 1 second.
I?ve tried “SDL_CreateThread” but this doesn?t really help.
Is there any solution for that.
Dieter–
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
Hi,
Make sure that SDL_CDStatus() is called only once in your program, and
before
playing any of the tracks. That function seems to read the TOC from
the cd and does slow down the system.
Does the cd your playing start with data track? if so SDL takes a while to
seek to the next audio track, this could be why your game hangs at
startup.
Nehal> ----- Original Message -----
From: mummenschanz@gmx.net (Dieter Mummenschanz)
Subject: [SDL] CD audio with SDL
To: sdl at libsdl.org
Hello,
I?ve implemented SDL cd-audio support in my game.
It works basicly but everytime I start, the game hangs until the CDROM spins
up and starts playing the track.
Replaying or skipping between the tracks during gameplay freezes the game
for ~ 1 second.
I?ve tried “SDL_CreateThread” but this doesn?t really help.
Is there any solution for that.
Dieter
–
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Hi,
Make sure that SDL_CDStatus() is called only once in your program, and
before
playing any of the tracks. That function seems to read the TOC from
the cd and does slow down the system.
SDL_CDStatus() is called more than once before playing music.
Once to see if there is a CD in the drive if there is more than one CDROM is
hosted.
During the game to see if the track has stopped to start playing again.
And before trying to play a track.
Is this the Problem???
But I need to do this checks 8(
Does the cd your playing start with data track? if so SDL takes a while to
seek to the next audio track, this could be why your game hangs at
startup.
I have NO data tracks on the CDs. Only CDaudio.
Btw: Is there a way to control the CDaudio volume with SDL(_mixer)?
Dieter–
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net