aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/lib/bass
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/lib/bass')
-rw-r--r--Game/Code/lib/bass/lazarustest.lpi192
-rw-r--r--Game/Code/lib/bass/lazarustest.lpr51
2 files changed, 243 insertions, 0 deletions
diff --git a/Game/Code/lib/bass/lazarustest.lpi b/Game/Code/lib/bass/lazarustest.lpi
new file mode 100644
index 00000000..fd0f1c9c
--- /dev/null
+++ b/Game/Code/lib/bass/lazarustest.lpi
@@ -0,0 +1,192 @@
+<?xml version="1.0"?>
+<CONFIG>
+ <ProjectOptions>
+ <PathDelim Value="\"/>
+ <Version Value="5"/>
+ <General>
+ <MainUnit Value="0"/>
+ <TargetFileExt Value=".exe"/>
+ <ActiveEditorIndexAtStart Value="0"/>
+ </General>
+ <VersionInfo>
+ <ProjectVersion Value=""/>
+ <Language Value=""/>
+ <CharSet Value=""/>
+ </VersionInfo>
+ <PublishOptions>
+ <Version Value="2"/>
+ <IgnoreBinaries Value="False"/>
+ <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+ <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+ </local>
+ </RunParams>
+ <Units Count="2">
+ <Unit0>
+ <Filename Value="lazarustest.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="lazarustest"/>
+ <CursorPos X="38" Y="33"/>
+ <TopLine Value="10"/>
+ <EditorIndex Value="0"/>
+ <UsageCount Value="20"/>
+ <Loaded Value="True"/>
+ </Unit0>
+ <Unit1>
+ <Filename Value="delphi\bass.pas"/>
+ <UnitName Value="Bass"/>
+ <CursorPos X="12" Y="539"/>
+ <TopLine Value="589"/>
+ <EditorIndex Value="1"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit1>
+ </Units>
+ <JumpHistory Count="30" HistoryIndex="29">
+ <Position1>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="778" Column="59" TopLine="758"/>
+ </Position1>
+ <Position2>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="779" Column="84" TopLine="759"/>
+ </Position2>
+ <Position3>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="780" Column="63" TopLine="760"/>
+ </Position3>
+ <Position4>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="781" Column="114" TopLine="761"/>
+ </Position4>
+ <Position5>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="782" Column="72" TopLine="762"/>
+ </Position5>
+ <Position6>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="783" Column="58" TopLine="763"/>
+ </Position6>
+ <Position7>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="784" Column="52" TopLine="764"/>
+ </Position7>
+ <Position8>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="785" Column="78" TopLine="765"/>
+ </Position8>
+ <Position9>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="786" Column="76" TopLine="766"/>
+ </Position9>
+ <Position10>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="787" Column="54" TopLine="767"/>
+ </Position10>
+ <Position11>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="788" Column="55" TopLine="768"/>
+ </Position11>
+ <Position12>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="789" Column="53" TopLine="769"/>
+ </Position12>
+ <Position13>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="790" Column="52" TopLine="770"/>
+ </Position13>
+ <Position14>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="791" Column="53" TopLine="771"/>
+ </Position14>
+ <Position15>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="792" Column="72" TopLine="772"/>
+ </Position15>
+ <Position16>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="793" Column="60" TopLine="773"/>
+ </Position16>
+ <Position17>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="795" Column="92" TopLine="775"/>
+ </Position17>
+ <Position18>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="796" Column="75" TopLine="776"/>
+ </Position18>
+ <Position19>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="11" Column="42" TopLine="1"/>
+ </Position19>
+ <Position20>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="786" Column="42" TopLine="762"/>
+ </Position20>
+ <Position21>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
+ </Position21>
+ <Position22>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="74" Column="73" TopLine="54"/>
+ </Position22>
+ <Position23>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="82" Column="15" TopLine="62"/>
+ </Position23>
+ <Position24>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="43" Column="67" TopLine="6"/>
+ </Position24>
+ <Position25>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="7" Column="9" TopLine="1"/>
+ </Position25>
+ <Position26>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="16" Column="12" TopLine="1"/>
+ </Position26>
+ <Position27>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="7" Column="1" TopLine="1"/>
+ </Position27>
+ <Position28>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="15" Column="9" TopLine="1"/>
+ </Position28>
+ <Position29>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="17" Column="58" TopLine="1"/>
+ </Position29>
+ <Position30>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="22" Column="32" TopLine="2"/>
+ </Position30>
+ </JumpHistory>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="5"/>
+ <PathDelim Value="\"/>
+ <CodeGeneration>
+ <Generate Value="Faster"/>
+ </CodeGeneration>
+ <Other>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="2">
+ <Item1>
+ <Name Value="ECodetoolError"/>
+ </Item1>
+ <Item2>
+ <Name Value="EFOpenError"/>
+ </Item2>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/Game/Code/lib/bass/lazarustest.lpr b/Game/Code/lib/bass/lazarustest.lpr
new file mode 100644
index 00000000..6faee86d
--- /dev/null
+++ b/Game/Code/lib/bass/lazarustest.lpr
@@ -0,0 +1,51 @@
+program lazarustest;
+
+{$mode objfpc}{$H+}
+
+uses
+ sysutils,
+ bass in 'delphi\bass.pas'
+ { add your units here };
+
+var
+ chan : HSTREAM;
+
+begin
+ // check the correct BASS was loaded
+ if (hi(BASS_GetVersion) <> BASSVERSION) then
+ begin
+ writeln('An incorrect version of BASS.DLL was loaded');
+ Halt;
+ end;
+
+ //init BASS
+ if not BASS_Init(0,44100,0,0,nil) then
+ writeln('Can''t initialize device');
+
+ //creating stream
+ if fileexists( 'music.mp3 ') then
+ begin
+ chan := BASS_StreamCreateFile(FALSE,pchar('music.mp3'),0,0,0);
+ if chan = 0 then
+ begin
+ chan := BASS_MusicLoad(False, pchar('music.mp3'), 0, 0, BASS_MUSIC_RAMPS or BASS_MUSIC_POSRESET or BASS_MUSIC_PRESCAN, 0);
+ if (chan = 0) then
+ begin
+ writeln('Can''t play file');
+ Exit;
+ end;
+ end;
+
+ BASS_ChannelPlay(chan,FALSE); // start playing
+ end
+ else
+ begin
+ writeln( 'music.mp3 not found.. could not test mp3 playback');
+ end;
+
+ BASS_Free();
+ writeln( 'Seems BASS is compatible with lazarus :) ');
+
+
+end.
+