aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-02 14:31:51 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-02 14:31:51 +0000
commitbf62fe40a0986e0791eb462ef5adebf079e744e6 (patch)
treedab2b665a48c97a7781aca058443d9d9e7d1da9a /Game/Code
parent656663336715dfb109f0f10ea8b0957cf92975a0 (diff)
downloadusdx-bf62fe40a0986e0791eb462ef5adebf079e744e6.tar.gz
usdx-bf62fe40a0986e0791eb462ef5adebf079e744e6.tar.xz
usdx-bf62fe40a0986e0791eb462ef5adebf079e744e6.zip
Some Cleanup in URecord
Some Cleanup in UMusic Some Cleanup in ProjectFile Upgrade from Bass 2.1 to Bass 2.3 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@361 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UMusic.pas2
-rw-r--r--Game/Code/Classes/URecord.pas43
-rw-r--r--Game/Code/UltraStar.dpr37
3 files changed, 51 insertions, 31 deletions
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas
index 4e647ed3..979ba4e5 100644
--- a/Game/Code/Classes/UMusic.pas
+++ b/Game/Code/Classes/UMusic.pas
@@ -441,7 +441,7 @@ var
begin
Result := 60;
- bytes := BASS_StreamGetLength(Bass);
+ bytes := BASS_ChannelGetLength(Bass);
Result := BASS_ChannelBytes2Seconds(Bass, bytes);
{ if Assigned(MediaPlayer) then begin
diff --git a/Game/Code/Classes/URecord.pas b/Game/Code/Classes/URecord.pas
index 2ec5439a..6ce83c0a 100644
--- a/Game/Code/Classes/URecord.pas
+++ b/Game/Code/Classes/URecord.pas
@@ -37,7 +37,8 @@ type
// here can be the soundcard information - whole database from which user will select recording source
Description: string;
Input: array of TSoundCardInput;
- InputSeleceted: integer;
+ InputSelected: integer;
+ MicInput: Integer;
// bass record
BassRecordStream: hStream;
@@ -117,7 +118,7 @@ begin
for S := 1 to 1024 do begin // 0.5.2: fix. was from 0 to 1023
// Log.LogDebug('1');
// Log.LogDebug(IntTostr(S));
- V := Abs(BufferArray[S]) / $10000;
+ V := Abs(BufferArray[S]) / $10000;
// Log.LogDebug('2');
// Log.LogDebug(IntTostr(S) + ': ' + FloatToStr(V) + ', MaxV='+floattostr(maxv)+', buf='+inttostr(length(BufferArray)));
if V > MaxV then MaxV := V;
@@ -279,7 +280,7 @@ var
SC: integer; // soundcard
SCI: integer; // soundcard input
Descr: string;
- InputName: string;
+ InputName: PChar;
Flags: integer;
No: integer;
function isDuplicate(Desc: String): Boolean;
@@ -298,7 +299,6 @@ var
end;
end;
-// mic: array[0..15] of integer;
begin
// checks for recording devices and puts them into array;
SetLength(SoundCard, 0);
@@ -320,45 +320,37 @@ begin
end;
SetLength(SoundCard, SC+1);
-// Log.LogError('Device #' + IntToStr(SC+1) + ': ' + Descr);
+
SoundCard[SC].Description := Descr;
- // check for recording inputs
-// mic[device] := -1; // default to no change
+ //Get Recording Inputs
SCI := 0;
BASS_RecordInit(SC);
- Flags := BASS_RecordGetInput(SCI);
+
InputName := BASS_RecordGetInputName(SCI);
-// Log.LogError('Input #' + IntToStr(SCI) + ' (' + IntToStr(Flags) + '): ' + InputName);
SetLength(SoundCard[SC].Input, 1);
SoundCard[SC].Input[SCI].Name := InputName;
// process each input
- while (Flags <> -1) do begin
- if SCI >= 1 then begin
+ while (InputName <> nil) do begin
+ Flags := BASS_RecordGetInput(SCI);
+ if (SCI >= 1) {AND (Flags AND BASS_INPUT_OFF = 0)} then begin
+
SetLength(SoundCard[SC].Input, SCI+1);
- InputName := BASS_RecordGetInputName(SCI);
+
SoundCard[SC].Input[SCI].Name := InputName;
-// Log.LogError('Input #' + IntToStr(SCI) + ' (' + IntToStr(Flags) + '): ' + InputName);
end;
-{ if (flags and BASS_INPUT_TYPE_MASK) = BASS_INPUT_TYPE_MIC then begin
- mic[device] := input; // auto set microphone
- end;}
+ //Set Mic Index
+ if ((Flags and BASS_INPUT_TYPE_MIC) = 1) then
+ SoundCard[SC].MicInput := SCI;
+
Inc(SCI);
- Flags := BASS_RecordGetInput(SCI);
+ InputName := BASS_RecordGetInputName(SCI);
end;
-{ if mic[device] <> -1 then begin
- Log.LogAnalyze('Found the mic at input ' + IntToStr(Mic[device]))
- end else begin
- Log.LogAnalyze('Mic not found');
- mic[device] := 0; // setting to the first one (for kxproject)
- end;
- SoundCard[SC].InputSeleceted := Mic[Device];}
-
BASS_RecordFree;
@@ -369,3 +361,4 @@ end;
end.
+
diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr
index e523e98e..08f41cba 100644
--- a/Game/Code/UltraStar.dpr
+++ b/Game/Code/UltraStar.dpr
@@ -5,6 +5,9 @@ program UltraStar;
{$R 'UltraStar.res' 'UltraStar.rc'}
uses
+ //------------------------------
+ //Includes - Menu System
+ //------------------------------
UDisplay in 'Menu\UDisplay.pas',
UMenu in 'Menu\UMenu.pas',
UMenuStatic in 'Menu\UMenuStatic.pas',
@@ -15,6 +18,10 @@ uses
UMenuSelectSlide in 'Menu\UMenuSelectSlide.pas',
UDrawTexture in 'Menu\UDrawTexture.pas',
UMenuButtonCollection in 'Menu\UMenuButtonCollection.pas',
+
+ //------------------------------
+ //Includes - Classes
+ //------------------------------
UGraphic in 'Classes\UGraphic.pas',
UTexture in 'Classes\UTexture.pas',
UMusic in 'Classes\UMusic.pas',
@@ -26,7 +33,6 @@ uses
TextGL in 'Classes\TextGL.pas',
USongs in 'Classes\USongs.pas',
UIni in 'Classes\UIni.pas',
- USmpeg in 'SMpeg\USmpeg.pas',
ULyrics in 'Classes\ULyrics.pas',
USkins in 'Classes\USkins.pas',
UThemes in 'Classes\UThemes.pas',
@@ -42,7 +48,17 @@ uses
UDLLManager in 'Classes\UDLLManager.pas',
UParty in 'Classes\UParty.pas',
UPlaylist in 'Classes\UPlaylist.pas',
- UCommandLine in 'Classes\UCommandLine.pas',
+ UCommandLine in 'Classes\UCommandLine.pas',
+
+ //------------------------------
+ //Includes - Video Support
+ //------------------------------
+ Uffmpeg in 'SMpeg\Uffmpeg.pas',
+ USmpeg in 'SMpeg\USmpeg.pas',
+
+ //------------------------------
+ //Includes - Screens
+ //------------------------------
UScreenLoading in 'Screens\UScreenLoading.pas',
UScreenWelcome in 'Screens\UScreenWelcome.pas',
UScreenMain in 'Screens\UScreenMain.pas',
@@ -71,20 +87,31 @@ uses
UScreenStatDetail in 'Screens\UScreenStatDetail.pas',
UScreenCredits in 'Screens\UScreenCredits.pas',
UScreenPopup in 'Screens\UScreenPopup.pas',
+
+ //------------------------------
+ //Includes - Screens PartyMode
+ //------------------------------
UScreenSingModi in 'Screens\UScreenSingModi.pas',
UScreenPartyNewRound in 'Screens\UScreenPartyNewRound.pas',
UScreenPartyScore in 'Screens\UScreenPartyScore.pas',
UScreenPartyPlayer in 'Screens\UScreenPartyPlayer.pas',
UScreenPartyOptions in 'Screens\UScreenPartyOptions.pas',
UScreenPartyWin in 'Screens\UScreenPartyWin.pas',
+
+ //------------------------------
+ //Includes - Modi SDK
+ //------------------------------
ModiSDK in '..\..\Modis\SDK\ModiSDK.pas',
+
+ //------------------------------
+ //Includes - Delphi
+ //------------------------------
Windows,
SDL,
- SysUtils,
- Uffmpeg in 'SMpeg\Uffmpeg.pas';
+ SysUtils;
const
- Version = 'UltraStar Deluxe V 1.00 RC1';
+ Version = 'UltraStar Deluxe V 1.10 Alpha Build';
var
WndTitle: string;