Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "quakedef.h"
+#include "snd_main.h"
#include <SDL.h>
/*
// Init the SDL Audio subsystem
if( SDL_InitSubSystem( SDL_INIT_AUDIO ) ) {
- Con_SafePrint( "Initializing the SDL Audio subsystem failed!\n" );
+ Con_Print( "Initializing the SDL Audio subsystem failed!\n" );
return false;
}
shm->format.channels = 2; //stereo
shm->format.width = 2;
-// COMMANDLINEOPTION: -sndspeed <hz> chooses 44100 hz, 22100 hz, or 11025 hz sound output rate
+// COMMANDLINEOPTION: SDL Sound: -sndspeed <hz> chooses 44100 hz, 22100 hz, or 11025 hz sound output rate
i = COM_CheckParm( "-sndspeed" );
if( i && i != ( com_argc - 1 ) )
shm->format.speed = atoi( com_argv[ i+1 ] );
// Init the SDL Audio subsystem
spec.callback = Buffer_Callback;
spec.channels = shm->format.channels;
- spec.format = AUDIO_S16LSB;
+ spec.format = AUDIO_S16SYS;
spec.freq = shm->format.speed;
spec.userdata = NULL;
spec.samples = AUDIO_SDL_SAMPLES;
if( SDL_OpenAudio( &spec, NULL ) ) {
- Con_SafePrint( "Failed to open the audio device!\n" );
+ Con_Print( "Failed to open the audio device!\n" );
Con_DPrintf(
"Audio Specification:\n"
"\tChannels : %i\n"