aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-06 17:06:44 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-06 17:06:44 +0000
commitbca530968b6cfbabca755957f351a29bb42150e4 (patch)
treee3477b84ad3d571b13e2c2a89c2d1dad5c8b6da3 /Game
parent86703a13c79ceabf9d9b98b0cb8fc5115dfba05b (diff)
downloadusdx-bca530968b6cfbabca755957f351a29bb42150e4.tar.gz
usdx-bca530968b6cfbabca755957f351a29bb42150e4.tar.xz
usdx-bca530968b6cfbabca755957f351a29bb42150e4.zip
replaced some "string" parameters with "const string"
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@923 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/UAudioPlayback_Bass.pas36
-rw-r--r--Game/Code/Classes/UIni.pas1
-rw-r--r--Game/Code/Classes/UMedia_dummy.pas4
-rw-r--r--Game/Code/Classes/UMusic.pas2
-rw-r--r--Game/Code/Classes/UVideo.pas4
-rw-r--r--Game/Code/Classes/UVisualizer.pas4
6 files changed, 22 insertions, 29 deletions
diff --git a/Game/Code/Classes/UAudioPlayback_Bass.pas b/Game/Code/Classes/UAudioPlayback_Bass.pas
index 266a5ec3..d47990a8 100644
--- a/Game/Code/Classes/UAudioPlayback_Bass.pas
+++ b/Game/Code/Classes/UAudioPlayback_Bass.pas
@@ -56,7 +56,7 @@ type
private
MusicStream: TBassPlaybackStream;
- function Load(Filename: string): TBassPlaybackStream;
+ function Load(const Filename: string): TBassPlaybackStream;
public
function GetName: String;
@@ -67,7 +67,7 @@ type
procedure SetMusicVolume(Volume: integer);
procedure SetLoop(Enabled: boolean);
- function Open(Filename: string): boolean; // true if succeed
+ function Open(const Filename: string): boolean; // true if succeed
procedure Rewind;
procedure Play;
@@ -241,7 +241,7 @@ begin
result := true;
end;
-function TAudioPlayback_Bass.Load(Filename: string): TBassPlaybackStream;
+function TAudioPlayback_Bass.Load(const Filename: string): TBassPlaybackStream;
var
L: Integer;
stream: HSTREAM;
@@ -282,7 +282,7 @@ begin
MusicStream.Loop := Enabled;
end;
-function TAudioPlayback_Bass.Open(Filename: string): boolean;
+function TAudioPlayback_Bass.Open(const Filename: string): boolean;
var
stream: HSTREAM;
begin
@@ -363,10 +363,10 @@ begin
Result := true;
end;
-//Equalizer
+// Equalizer
procedure TAudioPlayback_Bass.GetFFTData(var data: TFFTData);
begin
- //Get Channel Data Mono and 256 Values
+ // Get Channel Data Mono and 256 Values
BASS_ChannelGetData(MusicStream.Handle, @data, BASS_DATA_FFT512);
end;
@@ -379,23 +379,17 @@ var
info: BASS_CHANNELINFO;
nBytes: DWORD;
begin
- //Get Channel Data Mono and 256 Values
+ Result := 0;
+
+ // Get Channel Data Mono and 256 Values
BASS_ChannelGetInfo(MusicStream.Handle, info);
FillChar(data, sizeof(TPCMData), 0);
-
- if (info.chans = 1) then
- begin
- // mono file -> add stereo channel
- nBytes := 0;//BASS_ChannelGetData(Bass, @data[0], samples*sizeof(Smallint));
- // interleave data
- //CopyMemory(@data[1], @data[0], samples*sizeof(Smallint));
- result := 0;
- end
- else
- begin
- // stereo file
- nBytes := BASS_ChannelGetData(MusicStream.Handle, @data, sizeof(TPCMData));
- end;
+
+ // no support for non-stereo files at the moment
+ if (info.chans <> 2) then
+ Exit;
+
+ nBytes := BASS_ChannelGetData(MusicStream.Handle, @data, sizeof(TPCMData));
if(nBytes <= 0) then
result := 0
else
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index 431ae0be..1bfea7a5 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -454,7 +454,6 @@ begin
// Debug
Debug := GetArrayIndex(IDebug, IniFile.ReadString('Game', 'Debug', IDebug[0]));
- //if Debug = 1 then SongPath := 'E:\UltraStar 03\Songs\';
// Screens
Screens := GetArrayIndex(IScreens, IniFile.ReadString('Graphics', 'Screens', IScreens[0]));
diff --git a/Game/Code/Classes/UMedia_dummy.pas b/Game/Code/Classes/UMedia_dummy.pas
index cd62dc51..f576400d 100644
--- a/Game/Code/Classes/UMedia_dummy.pas
+++ b/Game/Code/Classes/UMedia_dummy.pas
@@ -38,7 +38,7 @@ type
procedure init();
- function Open( aFileName : string): boolean; // true if succeed
+ function Open(const aFileName : string): boolean; // true if succeed
procedure Close;
procedure Play;
@@ -98,7 +98,7 @@ begin
end;
-function Tmedia_dummy.Open( aFileName : string): boolean; // true if succeed
+function Tmedia_dummy.Open(const aFileName : string): boolean; // true if succeed
begin
result := false;
end;
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas
index 2ffe13ce..956e0372 100644
--- a/Game/Code/Classes/UMusic.pas
+++ b/Game/Code/Classes/UMusic.pas
@@ -191,7 +191,7 @@ type
['{63A5EBC3-3F4D-4F23-8DFB-B5165FCE33DD}']
function GetName: String;
- function Open(Filename: string): boolean; // true if succeed
+ function Open(const Filename: string): boolean; // true if succeed
procedure Close;
procedure Play;
diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas
index c7bf9a1a..7f595928 100644
--- a/Game/Code/Classes/UVideo.pas
+++ b/Game/Code/Classes/UVideo.pas
@@ -103,7 +103,7 @@ type
function GetName: String;
procedure init();
- function Open( aFileName : string): boolean; // true if succeed
+ function Open(const aFileName : string): boolean; // true if succeed
procedure Close;
procedure Play;
@@ -433,7 +433,7 @@ begin
end;
-function TVideoPlayback_ffmpeg.Open( aFileName : string): boolean; // true if succeed
+function TVideoPlayback_ffmpeg.Open(const aFileName : string): boolean; // true if succeed
var
errnum, i, x,y: Integer;
lStreamsCount : Integer;
diff --git a/Game/Code/Classes/UVisualizer.pas b/Game/Code/Classes/UVisualizer.pas
index 51ebee31..211f1b01 100644
--- a/Game/Code/Classes/UVisualizer.pas
+++ b/Game/Code/Classes/UVisualizer.pas
@@ -88,7 +88,7 @@ type
procedure Init();
function GetName: String;
- function Open( aFileName : string): boolean; // true if succeed
+ function Open(const aFileName : string): boolean; // true if succeed
procedure Close;
procedure Play;
@@ -137,7 +137,7 @@ begin
end;
-function TVideoPlayback_ProjectM.Open( aFileName : string): boolean; // true if succeed
+function TVideoPlayback_ProjectM.Open(const aFileName : string): boolean; // true if succeed
begin
VisualizerStart();
result := true;