From 8cca9e3e6f591c35d35d132a9d3f93ffc7cdfee8 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Sat, 27 Oct 2007 06:31:04 +0000 Subject: made some major progress with ffmpeg audio playback !!! YAY !!! still a little choppy, so I suspect incorrect buffer sizes or something like that. also made some mods to support Unicode song file iteration on windows, this is no worse than what we had before, but is not complete.. oh this code only supports win 2000 and up .. no Win 98... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@533 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UFiles.pas | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'Game/Code/Classes/UFiles.pas') diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index 7e23b42f..717d20e2 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -333,16 +333,22 @@ Result := False; //Open File and set File Pointer to the beginning AssignFile(SongFile, Song.Path + Song.FileName); - Reset(SongFile); +// if assinged( SongFile ) then + begin + try + Reset(SongFile); - //Clear old Song Header - ClearSong(Song); + //Clear old Song Header + ClearSong(Song); - //Read Header - Result := ReadTxTHeader(Song); + //Read Header + Result := ReadTxTHeader(Song); - //And Close File - CloseFile(SongFile); + //And Close File + finally + CloseFile(SongFile); + end; + end; {except CloseFile(SongFile); -- cgit v1.2.3