From 44554c7908f7e2405a249331f00a35703f5939c2 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Thu, 11 Oct 2007 12:02:20 +0000 Subject: Added IAudioPlayback Interface and implementation for BASS. Created "AudioPlayback" Global Singleton, which removed the need for the "Music" Global variable. This was done because global singleton objects are a recognized better "design pattern" achieving the same thing as global variables, but in a nicer way. I will be working to a) separate IAudioPlayback in to separate "Playback" and "Input" Interfaces b) build a FFMpeg class that implements IAudioPlayback git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@504 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenSingModi.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Game/Code/Screens/UScreenSingModi.pas') diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas index d18dd5bc..a05c6d4b 100644 --- a/Game/Code/Screens/UScreenSingModi.pas +++ b/Game/Code/Screens/UScreenSingModi.pas @@ -102,7 +102,7 @@ begin SDLK_BACKSPACE : begin Finish; - Music.PlayBack; + AudioPlayback.PlayBack; FadeTo(@ScreenPartyScore); end; @@ -170,7 +170,7 @@ begin end else //Start Without Song begin - Music.CaptureStart; + AudioPlayback.CaptureStart; end; //Set Playerinfo @@ -531,7 +531,7 @@ end; if ShowFinish then begin if DllMan.Selected.LoadSong then begin - if (not Music.Finished) and ((AktSong.Finish = 0) or (Czas.Teraz*1000 <= AktSong.Finish)) then begin + if (not AudioPlayback.Finished) and ((AktSong.Finish = 0) or (Czas.Teraz*1000 <= AktSong.Finish)) then begin //Pause Mod: if not Paused then Sing(Self); // analyze song @@ -658,12 +658,12 @@ end; function LoadSound (const Name: PChar): Cardinal; stdcall; //Procedure that loads a Custom Sound begin - Result := Music.LoadCustomSound(String(Name)); + Result := AudioPlayback.LoadCustomSound(String(Name)); end; procedure PlaySound (const Index: Cardinal); stdcall; //Plays a Custom Sound begin - Music.PlayCustomSound(Index); + AudioPlayback.PlayCustomSound(Index); end; end. -- cgit v1.2.3