DarknessX
11-05-2007, 12:50 AM
Well? Can anyone give me some code examples on knowing when a playing audio file is complete, without OOP or classes? IE, my current setup is...
Procedure PlaySound;
begin
music_file := ' ';
StrPCopy(music_file,musicfile[x]);
//music_file := 'C:\Projects\Task Scheduler\test.wav';
init_stuff;
load_song;
BASS_setvolume(volume[x]);
totallength := round(BASS_ChannelBytes2Seconds(stream,BASS_Stream GetLength(stream)));
Writeln('Playing file ',MUSIC_FILE,'.');
readkey; //Instead of readkey, I want to check if song is finished, and if yes, continue procedure.
stop_song;
done_stuff;
end;
And in case your wondering, the music_file := ' ..' is like that because if the size of the var is too small (empty) the StrPCopy won't work properly...
Procedure PlaySound;
begin
music_file := ' ';
StrPCopy(music_file,musicfile[x]);
//music_file := 'C:\Projects\Task Scheduler\test.wav';
init_stuff;
load_song;
BASS_setvolume(volume[x]);
totallength := round(BASS_ChannelBytes2Seconds(stream,BASS_Stream GetLength(stream)));
Writeln('Playing file ',MUSIC_FILE,'.');
readkey; //Instead of readkey, I want to check if song is finished, and if yes, continue procedure.
stop_song;
done_stuff;
end;
And in case your wondering, the music_file := ' ..' is like that because if the size of the var is too small (empty) the StrPCopy won't work properly...