That all works, except one thing. It won't load my audio files. I'm using this code:

[pascal]
//{$mode delphi}
Program testsdl;

uses sdl, sdl_mixer, sysutils;

var
audio_rate: integer;
audio_format: Uint16;
audio_channels: integer;
audio_buffers : integer;
loops: integer;
wav : word;
wave : pmix_chunk;
baudioopen : boolean;

begin
loops := 0;
SDL_INIT(SDL_INIT_AUDIO);
if ((SDL_INIT(SDL_INIT_AUDIO) < 0)) then begin
Sdl_Quit;
exit;
end
else
begin
writeln('1');
audio_rate := 22050;
audio_format := wav;
audio_channels := 2;
audio_buffers := 4064;
baudioopen := false;
writeln('2');
wave := mix_loadwav('wakeup.wav');
if wave = nil then exit;
mix_playchannel(0, wave, loops);
while (mix_playing(0) = 0 ) do sdl_delay(100);
writeln('3');
end;
if wave <> nil then begin
writeln('free');
mix_freechunk(wave);
wave := nil;
end;
if ( bAudioOpen ) then // bAudioOpen is just some flag that was used to keep track if the audio device was opened.
begin
Mix_CloseAudio;
writeln('4');
end;
readln;
SDL_Quit;
end.
[/pascal]

If I run it in a command prompt, it shows me up to '2' and then closes... Right where if wave = nil. If I comment that out, it gives me an error- basically, can't play 'nil'.