diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-10-27 06:31:04 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-10-27 06:31:04 +0000 |
commit | 8cca9e3e6f591c35d35d132a9d3f93ffc7cdfee8 (patch) | |
tree | 985dac320ed9d8456a682c952c1b0ab0f502859b /Game/Code/Classes/UFiles.pas | |
parent | 64f2c9b369185575d397dccbbcacc7f818874952 (diff) | |
download | usdx-8cca9e3e6f591c35d35d132a9d3f93ffc7cdfee8.tar.gz usdx-8cca9e3e6f591c35d35d132a9d3f93ffc7cdfee8.tar.xz usdx-8cca9e3e6f591c35d35d132a9d3f93ffc7cdfee8.zip |
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
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UFiles.pas | 20 |
1 files changed, 13 insertions, 7 deletions
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); |