aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UAudio_bass.pas
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-16 11:27:23 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-16 11:27:23 +0000
commit8c923b5b76bb17e00132a0b2b2b96de34265fc63 (patch)
tree160d8b7736fe7c65667334e3cfe508d8e646c7ca /Game/Code/Classes/UAudio_bass.pas
parentd3218aef1528f9233fc8bdd8c3e341ea9d135d9b (diff)
downloadusdx-8c923b5b76bb17e00132a0b2b2b96de34265fc63.tar.gz
usdx-8c923b5b76bb17e00132a0b2b2b96de34265fc63.tar.xz
usdx-8c923b5b76bb17e00132a0b2b2b96de34265fc63.zip
modified ffmpeg usage, to use interface same as bass...
still needs some tidy up, but its working. :) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@515 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UAudio_bass.pas')
-rw-r--r--Game/Code/Classes/UAudio_bass.pas27
1 files changed, 18 insertions, 9 deletions
diff --git a/Game/Code/Classes/UAudio_bass.pas b/Game/Code/Classes/UAudio_bass.pas
index cbeadc47..5aecfc89 100644
--- a/Game/Code/Classes/UAudio_bass.pas
+++ b/Game/Code/Classes/UAudio_bass.pas
@@ -79,7 +79,7 @@ type
procedure Close;
function Finished: boolean;
function Length: real;
- function Position: real;
+ function getPosition: real;
procedure PlayStart;
procedure PlayBack;
procedure PlaySwoosh;
@@ -118,17 +118,22 @@ var
Pet: integer;
S: integer;
begin
- Log.BenchmarkStart(4);
- Log.LogStatus('Initializing Playback Subsystem', 'Music Initialize');
+ writeln( 'TAudio_bass.InitializePlayback' );
+// Log.BenchmarkStart(4);
+// Log.LogStatus('Initializing Playback Subsystem', 'Music Initialize');
Loaded := false;
Loop := false;
+
+ writeln( 'TAudio_bass AllocateHWND' );
{$ifdef win32}
// TODO : JB_Linux ... is this needed ? :)
fHWND := AllocateHWND( nil); // TODO : JB_lazarus - can we do something different here ?? lazarus didnt like this function
{$ENDIF}
+
+ writeln( 'TAudio_bass BASS_Init' );
// TODO : jb_linux replace with something other than bass
if not BASS_Init(1, 44100, 0, fHWND, nil) then
begin
@@ -139,15 +144,16 @@ begin
Exit;
end;
- Log.BenchmarkEnd(4); Log.LogBenchmark('--> Bass Init', 4);
+// Log.BenchmarkEnd(4); Log.LogBenchmark('--> Bass Init', 4);
// config playing buffer
// BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD, 10);
// BASS_SetConfig(BASS_CONFIG_BUFFER, 100);
- Log.LogStatus('Loading Sounds', 'Music Initialize');
+// Log.LogStatus('Loading Sounds', 'Music Initialize');
- Log.BenchmarkStart(4);
+ writeln( 'TAudio_bass LoadSoundFromFile' );
+// Log.BenchmarkStart(4);
LoadSoundFromFile(BassStart, SoundPath + 'Common Start.mp3');
LoadSoundFromFile(BassBack, SoundPath + 'Common Back.mp3');
LoadSoundFromFile(BassSwoosh, SoundPath + 'menu swoosh.mp3');
@@ -161,8 +167,8 @@ begin
// LoadSoundFromFile(BassShuffle, SoundPath + 'Shuffle.mp3');
- Log.BenchmarkEnd(4);
- Log.LogBenchmark('--> Loading Sounds', 4);
+// Log.BenchmarkEnd(4);
+// Log.LogBenchmark('--> Loading Sounds', 4);
end;
procedure TAudio_bass.InitializeRecord;
@@ -347,7 +353,7 @@ begin
Result := BASS_ChannelBytes2Seconds(Bass, bytes);
end;
-function TAudio_bass.Position: real;
+function TAudio_bass.getPosition: real;
var
bytes: integer;
begin
@@ -631,7 +637,10 @@ initialization
AudioManager.add( IAudioInput( singleton_MusicBass ) );
finalization
+ writeln( 'UAudio_Bass - UnRegister Playback' );
AudioManager.Remove( IAudioPlayback( singleton_MusicBass ) );
+
+ writeln( 'UAudio_Bass - UnRegister Input' );
AudioManager.Remove( IAudioInput( singleton_MusicBass ) );
end.