- // Preload all the wav files into memory
- for (i=0; i<NUM_SOUNDS; i++) {
- wav[i] = Mix_LoadWAV(add_path(wav_file[i]));
- }
+ debug(
+ // What kind of sound did we get? Ah who cares. As long as it can play
+ // some basic bangs and simple music.
+ Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels);
+ printf("Opened audio at %d Hz %d bit %s\n", audio_rate,
+ (audio_format&0xFF),
+ (audio_channels > 1) ? "stereo" : "mono");
+ )
+
+ // Preload all the tunes into memory
+ for (i=0; i<NUM_TUNES; i++) {
+ if (!(music[i] = Mix_LoadMUS(add_path(tune_file[i])))) {
+ printf ("Failed to load %s\n",add_path(tune_file[i]));
+ }
+ }
+
+ // Preload all the wav files into memory
+ for (i=0; i<NUM_SOUNDS; i++) {
+ wav[i] = Mix_LoadWAV(add_path(wav_file[i]));
+ }