diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-22 21:06:07 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-22 21:06:07 +0000 |
commit | 583d92988f8950ccde44ac26f76f757aa9305f6c (patch) | |
tree | 4d0355c608022a0ac3fe0a4346bf5a3d09b7d9df /Game/Code | |
parent | b8ee392da32bd785bb6adb273bfe27df1c397d51 (diff) | |
download | usdx-583d92988f8950ccde44ac26f76f757aa9305f6c.tar.gz usdx-583d92988f8950ccde44ac26f76f757aa9305f6c.tar.xz usdx-583d92988f8950ccde44ac26f76f757aa9305f6c.zip |
eol-style set and unified, nicer code but no actual change
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1122 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r-- | Game/Code/Classes/UAudioCore_Bass.pas | 138 |
1 files changed, 49 insertions, 89 deletions
diff --git a/Game/Code/Classes/UAudioCore_Bass.pas b/Game/Code/Classes/UAudioCore_Bass.pas index 1d045b88..e20d81c0 100644 --- a/Game/Code/Classes/UAudioCore_Bass.pas +++ b/Game/Code/Classes/UAudioCore_Bass.pas @@ -17,7 +17,7 @@ uses type
TAudioCore_Bass = class
private
- constructor Create(); + constructor Create();
public
class function GetInstance(): TAudioCore_Bass;
function ErrorGetString(): string; overload;
@@ -25,7 +25,6 @@ type function ConvertAudioFormatToBASSFlags(Format: TAudioSampleFormat; out Flags: DWORD): boolean;
end;
-
implementation
uses
@@ -36,16 +35,16 @@ var Instance: TAudioCore_Bass;
constructor TAudioCore_Bass.Create();
-begin - inherited; -end; +begin
+ inherited;
+end;
class function TAudioCore_Bass.GetInstance(): TAudioCore_Bass;
-begin - if not assigned(Instance) then - Instance := TAudioCore_Bass.Create(); - Result := Instance; -end; +begin
+ if not assigned(Instance) then
+ Instance := TAudioCore_Bass.Create();
+ Result := Instance;
+end;
function TAudioCore_Bass.ErrorGetString(): string;
begin
@@ -55,90 +54,51 @@ end; function TAudioCore_Bass.ErrorGetString(errCode: integer): string;
begin
case errCode of
- BASS_OK:
- result := 'No error';
- BASS_ERROR_MEM:
- result := 'Insufficient memory';
- BASS_ERROR_FILEOPEN:
- result := 'File could not be opened';
- BASS_ERROR_DRIVER:
- result := 'Device driver not available';
- BASS_ERROR_BUFLOST:
- result := 'Buffer lost';
- BASS_ERROR_HANDLE:
- result := 'Invalid Handle';
- BASS_ERROR_FORMAT:
- result := 'Sample-Format not supported';
- BASS_ERROR_POSITION:
- result := 'Illegal position';
- BASS_ERROR_INIT:
- result := 'BASS_Init has not been successfully called';
- BASS_ERROR_START:
- result := 'Paused/stopped';
- BASS_ERROR_ALREADY:
- result := 'Already created/used';
- BASS_ERROR_NOCHAN:
- result := 'No free channels';
- BASS_ERROR_ILLTYPE:
- result := 'Type is invalid';
- BASS_ERROR_ILLPARAM:
- result := 'Illegal parameter';
- BASS_ERROR_NO3D:
- result := 'No 3D support';
- BASS_ERROR_NOEAX:
- result := 'No EAX support';
- BASS_ERROR_DEVICE:
- result := 'Invalid device number';
- BASS_ERROR_NOPLAY:
- result := 'Channel not playing';
- BASS_ERROR_FREQ:
- result := 'Freq out of range';
- BASS_ERROR_NOTFILE:
- result := 'Not a file stream';
- BASS_ERROR_NOHW:
- result := 'No hardware support';
- BASS_ERROR_EMPTY:
- result := 'Is empty';
- BASS_ERROR_NONET:
- result := 'Network unavailable';
- BASS_ERROR_CREATE:
- result := 'Creation error';
- BASS_ERROR_NOFX:
- result := 'DX8 effects unavailable';
- BASS_ERROR_NOTAVAIL:
- result := 'Not available';
- BASS_ERROR_DECODE:
- result := 'Is a decoding channel';
- BASS_ERROR_DX:
- result := 'Insufficient version of DirectX';
- BASS_ERROR_TIMEOUT:
- result := 'Timeout';
- BASS_ERROR_FILEFORM:
- result := 'File-Format not recognised/supported';
- BASS_ERROR_SPEAKER:
- result := 'Requested speaker(s) not support';
- BASS_ERROR_VERSION:
- result := 'Version error';
- BASS_ERROR_CODEC:
- result := 'Codec not available/supported';
- BASS_ERROR_ENDED:
- result := 'The channel/file has ended';
- BASS_ERROR_UNKNOWN:
- result := 'Unknown error';
- else
- result := 'Unknown error';
- end;
+ BASS_OK: result := 'No error';
+ BASS_ERROR_MEM: result := 'Insufficient memory';
+ BASS_ERROR_FILEOPEN: result := 'File could not be opened';
+ BASS_ERROR_DRIVER: result := 'Device driver not available';
+ BASS_ERROR_BUFLOST: result := 'Buffer lost';
+ BASS_ERROR_HANDLE: result := 'Invalid Handle';
+ BASS_ERROR_FORMAT: result := 'Sample-Format not supported';
+ BASS_ERROR_POSITION: result := 'Illegal position';
+ BASS_ERROR_INIT: result := 'BASS_Init has not been successfully called';
+ BASS_ERROR_START: result := 'Paused/stopped';
+ BASS_ERROR_ALREADY: result := 'Already created/used';
+ BASS_ERROR_NOCHAN: result := 'No free channels';
+ BASS_ERROR_ILLTYPE: result := 'Type is invalid';
+ BASS_ERROR_ILLPARAM: result := 'Illegal parameter';
+ BASS_ERROR_NO3D: result := 'No 3D support';
+ BASS_ERROR_NOEAX: result := 'No EAX support';
+ BASS_ERROR_DEVICE: result := 'Invalid device number';
+ BASS_ERROR_NOPLAY: result := 'Channel not playing';
+ BASS_ERROR_FREQ: result := 'Freq out of range';
+ BASS_ERROR_NOTFILE: result := 'Not a file stream';
+ BASS_ERROR_NOHW: result := 'No hardware support';
+ BASS_ERROR_EMPTY: result := 'Is empty';
+ BASS_ERROR_NONET: result := 'Network unavailable';
+ BASS_ERROR_CREATE: result := 'Creation error';
+ BASS_ERROR_NOFX: result := 'DX8 effects unavailable';
+ BASS_ERROR_NOTAVAIL: result := 'Not available';
+ BASS_ERROR_DECODE: result := 'Is a decoding channel';
+ BASS_ERROR_DX: result := 'Insufficient version of DirectX';
+ BASS_ERROR_TIMEOUT: result := 'Timeout';
+ BASS_ERROR_FILEFORM: result := 'File-Format not recognised/supported';
+ BASS_ERROR_SPEAKER: result := 'Requested speaker(s) not support';
+ BASS_ERROR_VERSION: result := 'Version error';
+ BASS_ERROR_CODEC: result := 'Codec not available/supported';
+ BASS_ERROR_ENDED: result := 'The channel/file has ended';
+ BASS_ERROR_UNKNOWN: result := 'Unknown error';
+ else result := 'Unknown error';
+ end;
end;
function TAudioCore_Bass.ConvertAudioFormatToBASSFlags(Format: TAudioSampleFormat; out Flags: DWORD): boolean;
begin
case Format of
- asfS16:
- Flags := 0;
- asfFloat:
- Flags := BASS_SAMPLE_FLOAT;
- asfU8:
- Flags := BASS_SAMPLE_8BITS;
+ asfS16: Flags := 0;
+ asfFloat: Flags := BASS_SAMPLE_FLOAT;
+ asfU8: Flags := BASS_SAMPLE_8BITS;
else begin
Result := false;
Exit;
|