- Timestamp:
- Apr 23, 2012, 1:32:52 PM (13 years ago)
- Location:
- CoolAudio
- Files:
-
- 6 added
- 3 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/CoolAudio.lpk
r349 r352 7 7 <Version Value="11"/> 8 8 <SearchPaths> 9 <OtherUnitFiles Value="fmodintf;Systems;Systems/DSP "/>9 <OtherUnitFiles Value="fmodintf;Systems;Systems/DSP;Systems/FMOD;Systems/MAD;Systems/WinAPI;Systems/mplayer"/> 10 10 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> 11 11 </SearchPaths> … … 22 22 <License Value="GNU/GPL"/> 23 23 <Version Minor="1"/> 24 <Files Count=" 8">24 <Files Count="10"> 25 25 <Item1> 26 26 <Filename Value="UCoolAudio.pas"/> … … 32 32 </Item2> 33 33 <Item3> 34 <Filename Value="Systems/UAudioSystem FMOD.pas"/>35 <UnitName Value="UAudioSystem FMOD"/>34 <Filename Value="Systems/UAudioSystem.pas"/> 35 <UnitName Value="UAudioSystem"/> 36 36 </Item3> 37 37 <Item4> 38 <Filename Value="Systems/ UAudioSystemMPlayer.pas"/>39 <UnitName Value="UAudioSystem MPlayer"/>38 <Filename Value="Systems/DSP/UAudioSystemDSP.pas"/> 39 <UnitName Value="UAudioSystemDSP"/> 40 40 </Item4> 41 41 <Item5> 42 <Filename Value="Systems/ UAudioSystemWindows.pas"/>43 <UnitName Value="UAudioSystem Windows"/>42 <Filename Value="Systems/FMOD/UAudioSystemFMOD.pas"/> 43 <UnitName Value="UAudioSystemFMOD"/> 44 44 </Item5> 45 45 <Item6> 46 <Filename Value="Systems/ UAudioSystem.pas"/>47 <UnitName Value="UAudioSystem "/>46 <Filename Value="Systems/MAD/UAudioSystemMAD.pas"/> 47 <UnitName Value="UAudioSystemMAD"/> 48 48 </Item6> 49 49 <Item7> 50 <Filename Value="Systems/ UAudioSystemMAD.pas"/>51 <UnitName Value="UAudioSystem MAD"/>50 <Filename Value="Systems/WinAPI/UAudioSystemWindows.pas"/> 51 <UnitName Value="UAudioSystemWindows"/> 52 52 </Item7> 53 53 <Item8> 54 <Filename Value="Systems/ DSP/UAudioSystemDSP.pas"/>55 <UnitName Value="UAudioSystem DSP"/>54 <Filename Value="Systems/mplayer/UAudioSystemMPlayer.pas"/> 55 <UnitName Value="UAudioSystemMPlayer"/> 56 56 </Item8> 57 <Item9> 58 <Filename Value="Systems/UWavFile.pas"/> 59 <UnitName Value="UWavFile"/> 60 </Item9> 61 <Item10> 62 <Filename Value="UCoolAudioConfig.inc"/> 63 </Item10> 57 64 </Files> 58 65 <Type Value="RunAndDesignTime"/> -
CoolAudio/CoolAudio.pas
r349 r352 8 8 9 9 uses 10 UCoolAudio, UPlaylist, UAudioSystem FMOD, UAudioSystemMPlayer,11 UAudioSystem Windows, UAudioSystem, UAudioSystemMAD, UAudioSystemDSP,10 UCoolAudio, UPlaylist, UAudioSystem, UAudioSystemDSP, UAudioSystemFMOD, 11 UAudioSystemMAD, UAudioSystemWindows, UAudioSystemMPlayer, UWavFile, 12 12 LazarusPackageIntf; 13 13 -
CoolAudio/Demo/Demo.lpi
r285 r352 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count=" 25">40 <Units Count="31"> 41 41 <Unit0> 42 42 <Filename Value="Demo.lpr"/> 43 43 <IsPartOfProject Value="True"/> 44 44 <UnitName Value="Demo"/> 45 <EditorIndex Value="1 1"/>45 <EditorIndex Value="14"/> 46 46 <WindowIndex Value="0"/> 47 47 <TopLine Value="1"/> 48 <CursorPos X=" 19" Y="10"/>49 <UsageCount Value="8 0"/>48 <CursorPos X="34" Y="10"/> 49 <UsageCount Value="83"/> 50 50 <Loaded Value="True"/> 51 51 </Unit0> 52 52 <Unit1> 53 <Filename Value="U MainForm.pas"/>53 <Filename Value="UFormMain.pas"/> 54 54 <IsPartOfProject Value="True"/> 55 <ComponentName Value="MainForm"/> 55 <ComponentName Value="FormMain"/> 56 <HasResources Value="True"/> 56 57 <ResourceBaseClass Value="Form"/> 57 <UnitName Value="U MainForm"/>58 <UnitName Value="UFormMain"/> 58 59 <EditorIndex Value="0"/> 59 60 <WindowIndex Value="0"/> 60 <TopLine Value=" 97"/>61 <CursorPos X="2 6" Y="95"/>62 <UsageCount Value="8 0"/>61 <TopLine Value="142"/> 62 <CursorPos X="28" Y="150"/> 63 <UsageCount Value="83"/> 63 64 <Loaded Value="True"/> 64 65 <LoadedDesigner Value="True"/> … … 67 68 <Filename Value="../UCoolAudio.pas"/> 68 69 <UnitName Value="UCoolAudio"/> 69 <EditorIndex Value=" 6"/>70 <EditorIndex Value="12"/> 70 71 <WindowIndex Value="0"/> 71 72 <TopLine Value="27"/> 72 73 <CursorPos X="20" Y="19"/> 73 <UsageCount Value="3 4"/>74 <UsageCount Value="35"/> 74 75 <Loaded Value="True"/> 75 76 </Unit2> … … 77 78 <Filename Value="../Systems/UAudioSystemFMOD.pas"/> 78 79 <UnitName Value="UAudioSystemFMOD"/> 79 <EditorIndex Value="9"/>80 80 <WindowIndex Value="0"/> 81 81 <TopLine Value="47"/> 82 82 <CursorPos X="1" Y="61"/> 83 83 <UsageCount Value="39"/> 84 <Loaded Value="True"/>85 84 </Unit3> 86 85 <Unit4> 87 86 <Filename Value="../UPlaylist.pas"/> 88 87 <UnitName Value="UPlaylist"/> 89 <WindowIndex Value="0"/> 90 <TopLine Value="1"/> 91 <CursorPos X="29" Y="8"/> 92 <UsageCount Value="16"/> 88 <EditorIndex Value="2"/> 89 <WindowIndex Value="0"/> 90 <TopLine Value="10"/> 91 <CursorPos X="20" Y="26"/> 92 <UsageCount Value="17"/> 93 <Loaded Value="True"/> 93 94 </Unit4> 94 95 <Unit5> 95 96 <Filename Value="../fmodintf/fmoddyn.pas"/> 96 97 <UnitName Value="fmoddyn"/> 97 <EditorIndex Value="10"/>98 98 <WindowIndex Value="0"/> 99 99 <TopLine Value="579"/> 100 100 <CursorPos X="19" Y="593"/> 101 101 <UsageCount Value="34"/> 102 <Loaded Value="True"/>103 102 </Unit5> 104 103 <Unit6> … … 113 112 <Filename Value="../Systems/UAudioSystemMPlayer.pas"/> 114 113 <UnitName Value="UAudioSystemMPlayer"/> 115 <EditorIndex Value="7"/>116 114 <WindowIndex Value="0"/> 117 115 <TopLine Value="243"/> 118 116 <CursorPos X="114" Y="258"/> 119 117 <UsageCount Value="39"/> 120 <Loaded Value="True"/>121 118 </Unit7> 122 119 <Unit8> … … 131 128 <Filename Value="../Systems/UAudioSystem.pas"/> 132 129 <UnitName Value="UAudioSystem"/> 133 <EditorIndex Value=" 5"/>134 <WindowIndex Value="0"/> 135 <TopLine Value=" 177"/>136 <CursorPos X=" 34" Y="188"/>137 <UsageCount Value=" 49"/>130 <EditorIndex Value="11"/> 131 <WindowIndex Value="0"/> 132 <TopLine Value="217"/> 133 <CursorPos X="1" Y="230"/> 134 <UsageCount Value="50"/> 138 135 <Loaded Value="True"/> 139 136 </Unit9> … … 186 183 <Unit16> 187 184 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/lcl/include/control.inc"/> 188 <EditorIndex Value=" 1"/>185 <EditorIndex Value="8"/> 189 186 <WindowIndex Value="0"/> 190 187 <TopLine Value="2275"/> 191 188 <CursorPos X="1" Y="2287"/> 192 <UsageCount Value="3 3"/>189 <UsageCount Value="34"/> 193 190 <Loaded Value="True"/> 194 191 </Unit16> … … 219 216 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/packages/winunits-base/src/mmsystem.pp"/> 220 217 <UnitName Value="mmsystem"/> 221 <EditorIndex Value=" 3"/>218 <EditorIndex Value="9"/> 222 219 <WindowIndex Value="0"/> 223 220 <TopLine Value="1781"/> 224 221 <CursorPos X="52" Y="1791"/> 225 <UsageCount Value="3 5"/>222 <UsageCount Value="36"/> 226 223 <Loaded Value="True"/> 227 224 </Unit20> … … 229 226 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 230 227 <UnitName Value="UAudioSystemWindows"/> 231 <IsVisibleTab Value="True"/>232 <EditorIndex Value="2"/>233 228 <WindowIndex Value="0"/> 234 229 <TopLine Value="212"/> 235 230 <CursorPos X="50" Y="224"/> 236 231 <UsageCount Value="45"/> 237 <Loaded Value="True"/>238 232 </Unit21> 239 233 <Unit22> … … 246 240 <Unit23> 247 241 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/objpas/sysutils/osutilsh.inc"/> 248 <EditorIndex Value=" 8"/>242 <EditorIndex Value="13"/> 249 243 <WindowIndex Value="0"/> 250 244 <TopLine Value="23"/> 251 245 <CursorPos X="10" Y="23"/> 252 <UsageCount Value="3 3"/>246 <UsageCount Value="34"/> 253 247 <Loaded Value="True"/> 254 248 </Unit23> 255 249 <Unit24> 256 250 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/win/wininc/base.inc"/> 257 <EditorIndex Value=" 4"/>251 <EditorIndex Value="10"/> 258 252 <WindowIndex Value="0"/> 259 253 <TopLine Value="148"/> 260 254 <CursorPos X="6" Y="159"/> 255 <UsageCount Value="11"/> 256 <Loaded Value="True"/> 257 </Unit24> 258 <Unit25> 259 <Filename Value="UFormPlaylist.pas"/> 260 <IsPartOfProject Value="True"/> 261 <ComponentName Value="FormPlaylist"/> 262 <ResourceBaseClass Value="Form"/> 263 <UnitName Value="UFormPlaylist"/> 264 <EditorIndex Value="3"/> 265 <WindowIndex Value="0"/> 266 <TopLine Value="155"/> 267 <CursorPos X="28" Y="168"/> 268 <UsageCount Value="23"/> 269 <Loaded Value="True"/> 270 <LoadedDesigner Value="True"/> 271 </Unit25> 272 <Unit26> 273 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 274 <UnitName Value="UAudioSystemWindows"/> 275 <EditorIndex Value="5"/> 276 <WindowIndex Value="0"/> 277 <TopLine Value="62"/> 278 <CursorPos X="35" Y="75"/> 279 <UsageCount Value="11"/> 280 <Loaded Value="True"/> 281 </Unit26> 282 <Unit27> 283 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/include/customform.inc"/> 284 <EditorIndex Value="1"/> 285 <WindowIndex Value="0"/> 286 <TopLine Value="934"/> 287 <CursorPos X="1" Y="947"/> 288 <UsageCount Value="11"/> 289 <Loaded Value="True"/> 290 </Unit27> 291 <Unit28> 292 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/include/listitem.inc"/> 293 <EditorIndex Value="4"/> 294 <WindowIndex Value="0"/> 295 <TopLine Value="725"/> 296 <CursorPos X="1" Y="738"/> 261 297 <UsageCount Value="10"/> 262 298 <Loaded Value="True"/> 263 </Unit24> 299 </Unit28> 300 <Unit29> 301 <Filename Value="../UCoolAudioConfig.inc"/> 302 <EditorIndex Value="6"/> 303 <WindowIndex Value="0"/> 304 <TopLine Value="1"/> 305 <CursorPos X="1" Y="5"/> 306 <UsageCount Value="10"/> 307 <Loaded Value="True"/> 308 </Unit29> 309 <Unit30> 310 <Filename Value="../Systems/FMOD/fmoddyn.pas"/> 311 <UnitName Value="fmoddyn"/> 312 <IsVisibleTab Value="True"/> 313 <EditorIndex Value="7"/> 314 <WindowIndex Value="0"/> 315 <TopLine Value="588"/> 316 <CursorPos X="5" Y="589"/> 317 <UsageCount Value="10"/> 318 <Loaded Value="True"/> 319 </Unit30> 264 320 </Units> 265 <JumpHistory Count="30" HistoryIndex="2 7">321 <JumpHistory Count="30" HistoryIndex="29"> 266 322 <Position1> 267 <Filename Value="U MainForm.pas"/>268 <Caret Line=" 115" Column="66" TopLine="96"/>323 <Filename Value="UFormPlaylist.pas"/> 324 <Caret Line="97" Column="25" TopLine="90"/> 269 325 </Position1> 270 326 <Position2> 271 <Filename Value="U MainForm.pas"/>272 <Caret Line=" 85" Column="13" TopLine="83"/>327 <Filename Value="UFormPlaylist.pas"/> 328 <Caret Line="96" Column="3" TopLine="94"/> 273 329 </Position2> 274 330 <Position3> 275 <Filename Value=" ../Systems/UAudioSystem.pas"/>276 <Caret Line=" 59" Column="58" TopLine="47"/>331 <Filename Value="UFormPlaylist.pas"/> 332 <Caret Line="161" Column="24" TopLine="142"/> 277 333 </Position3> 278 334 <Position4> 279 <Filename Value=" ../Systems/UAudioSystemWindows.pas"/>280 <Caret Line=" 228" Column="55" TopLine="215"/>335 <Filename Value="UFormPlaylist.pas"/> 336 <Caret Line="146" Column="19" TopLine="144"/> 281 337 </Position4> 282 338 <Position5> 283 <Filename Value=" ../Systems/UAudioSystemMPlayer.pas"/>284 <Caret Line=" 258" Column="114" TopLine="243"/>339 <Filename Value="UFormPlaylist.pas"/> 340 <Caret Line="161" Column="20" TopLine="155"/> 285 341 </Position5> 286 342 <Position6> 287 <Filename Value=" ../Systems/UAudioSystemWindows.pas"/>288 <Caret Line="7 4" Column="6" TopLine="62"/>343 <Filename Value="UFormMain.pas"/> 344 <Caret Line="77" Column="53" TopLine="67"/> 289 345 </Position6> 290 346 <Position7> 291 <Filename Value=" ../Systems/UAudioSystemWindows.pas"/>292 <Caret Line=" 228" Column="1" TopLine="219"/>347 <Filename Value="UFormMain.pas"/> 348 <Caret Line="136" Column="1" TopLine="132"/> 293 349 </Position7> 294 350 <Position8> 295 <Filename Value=" ../Systems/UAudioSystemWindows.pas"/>296 <Caret Line=" 230" Column="1" TopLine="219"/>351 <Filename Value="UFormPlaylist.pas"/> 352 <Caret Line="151" Column="30" TopLine="145"/> 297 353 </Position8> 298 354 <Position9> 299 <Filename Value=" ../Systems/UAudioSystemWindows.pas"/>300 <Caret Line=" 232" Column="1" TopLine="219"/>355 <Filename Value="UFormMain.pas"/> 356 <Caret Line="136" Column="1" TopLine="132"/> 301 357 </Position9> 302 358 <Position10> 303 <Filename Value=" ../Systems/UAudioSystemWindows.pas"/>304 <Caret Line=" 228" Column="1" TopLine="219"/>359 <Filename Value="UFormMain.pas"/> 360 <Caret Line="150" Column="28" TopLine="142"/> 305 361 </Position10> 306 362 <Position11> 307 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>308 <Caret Line=" 230" Column="1" TopLine="219"/>363 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 364 <Caret Line="198" Column="7" TopLine="186"/> 309 365 </Position11> 310 366 <Position12> 311 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>312 <Caret Line=" 228" Column="1" TopLine="219"/>367 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 368 <Caret Line="190" Column="1" TopLine="185"/> 313 369 </Position12> 314 370 <Position13> 315 <Filename Value=" UMainForm.pas"/>316 <Caret Line=" 86" Column="14" TopLine="83"/>371 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 372 <Caret Line="191" Column="1" TopLine="185"/> 317 373 </Position13> 318 374 <Position14> 319 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>320 <Caret Line=" 228" Column="1" TopLine="215"/>375 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 376 <Caret Line="192" Column="1" TopLine="185"/> 321 377 </Position14> 322 378 <Position15> 323 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>324 <Caret Line=" 229" Column="1" TopLine="215"/>379 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 380 <Caret Line="196" Column="1" TopLine="185"/> 325 381 </Position15> 326 382 <Position16> 327 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>328 <Caret Line=" 227" Column="42" TopLine="215"/>383 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 384 <Caret Line="197" Column="1" TopLine="185"/> 329 385 </Position16> 330 386 <Position17> 331 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>332 <Caret Line="2 28" Column="1" TopLine="215"/>387 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 388 <Caret Line="202" Column="1" TopLine="185"/> 333 389 </Position17> 334 390 <Position18> 335 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>336 <Caret Line="2 26" Column="39" TopLine="215"/>391 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 392 <Caret Line="204" Column="19" TopLine="186"/> 337 393 </Position18> 338 394 <Position19> 339 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>340 <Caret Line="7 4" Column="1" TopLine="63"/>395 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 396 <Caret Line="75" Column="1" TopLine="62"/> 341 397 </Position19> 342 398 <Position20> 343 <Filename Value=" ../Systems/UAudioSystemWindows.pas"/>344 <Caret Line=" 228" Column="47" TopLine="217"/>399 <Filename Value="UFormPlaylist.pas"/> 400 <Caret Line="168" Column="59" TopLine="156"/> 345 401 </Position20> 346 402 <Position21> 347 <Filename Value="../ Systems/UAudioSystemWindows.pas"/>348 <Caret Line="7 4" Column="1" TopLine="63"/>403 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/include/listitem.inc"/> 404 <Caret Line="738" Column="1" TopLine="725"/> 349 405 </Position21> 350 406 <Position22> 351 <Filename Value=" ../Systems/UAudioSystemWindows.pas"/>352 <Caret Line=" 255" Column="1" TopLine="217"/>407 <Filename Value="UFormPlaylist.pas"/> 408 <Caret Line="168" Column="28" TopLine="155"/> 353 409 </Position22> 354 410 <Position23> 355 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>356 <Caret Line=" 228" Column="1" TopLine="217"/>411 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 412 <Caret Line="75" Column="1" TopLine="62"/> 357 413 </Position23> 358 414 <Position24> 359 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>360 <Caret Line="2 55" Column="37" TopLine="238"/>415 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 416 <Caret Line="202" Column="1" TopLine="183"/> 361 417 </Position24> 362 418 <Position25> 363 <Filename Value="../Systems/UAudioSystem Windows.pas"/>364 <Caret Line="2 28" Column="1" TopLine="209"/>419 <Filename Value="../Systems/UAudioSystem.pas"/> 420 <Caret Line="231" Column="39" TopLine="217"/> 365 421 </Position25> 366 422 <Position26> 367 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>368 <Caret Line="2 30" Column="1" TopLine="211"/>423 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 424 <Caret Line="216" Column="1" TopLine="203"/> 369 425 </Position26> 370 426 <Position27> 371 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>372 <Caret Line=" 74" Column="1" TopLine="63"/>427 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 428 <Caret Line="202" Column="1" TopLine="189"/> 373 429 </Position27> 374 430 <Position28> 375 431 <Filename Value="../Systems/UAudioSystem.pas"/> 376 <Caret Line=" 182" Column="5" TopLine="177"/>432 <Caret Line="230" Column="1" TopLine="217"/> 377 433 </Position28> 378 434 <Position29> 379 <Filename Value="../Systems/ UAudioSystemWindows.pas"/>380 <Caret Line="2 28" Column="1" TopLine="212"/>435 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 436 <Caret Line="202" Column="1" TopLine="189"/> 381 437 </Position29> 382 438 <Position30> 383 <Filename Value="../ Systems/UAudioSystemWindows.pas"/>384 <Caret Line=" 75" Column="1" TopLine="64"/>439 <Filename Value="../UCoolAudioConfig.inc"/> 440 <Caret Line="5" Column="1" TopLine="1"/> 385 441 </Position30> 386 442 </JumpHistory> 387 443 </ProjectOptions> 388 444 <CompilerOptions> 389 <Version Value="1 0"/>445 <Version Value="11"/> 390 446 <Target> 391 447 <Filename Value="Demo"/> … … 397 453 <Linking> 398 454 <Debugging> 399 < GenerateDebugInfo Value="True"/>455 <DebugInfoType Value="dsStabs"/> 400 456 </Debugging> 401 457 <Options> -
CoolAudio/Demo/Demo.lpr
r280 r352 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, U MainForm;10 Forms, UFormMain, UFormPlaylist; 11 11 12 12 {$R *.res} … … 15 15 RequireDerivedFormResource := True; 16 16 Application.Initialize; 17 Application.CreateForm(TMainForm, MainForm); 17 Application.CreateForm(TFormMain, FormMain); 18 Application.CreateForm(TFormPlaylist, FormPlaylist); 18 19 Application.Run; 19 20 end. -
CoolAudio/Systems/DSP/UAudioSystemDSP.pas
r348 r352 1 1 unit UAudioSystemDSP; 2 2 3 {$I UCoolAudioConfig.inc} 3 4 {$mode delphi}{$H+} 4 5 5 6 interface 6 7 7 //{$IFDEF AudioSystemDSP}8 {$IFDEF AudioSystemDSP} 8 9 uses 9 Classes, SysUtils, UAudioSystem, BaseUnix ;10 Classes, SysUtils, UAudioSystem, BaseUnix, UWavFile, StdCtrls, ExtCtrls; 10 11 11 12 type … … 17 18 FDeviceId: Integer; 18 19 public 20 Channels: Integer; 21 SampleRate: Integer; // Hz 22 BitsPerSample: Integer; 19 23 procedure OpenDevice; 24 procedure CloseDevice; 25 constructor Create(AOwner: TComponent); override; 26 destructor Destroy; override; 20 27 end; 21 28 … … 23 30 24 31 TPlayerDSP = class(TPlayer) 32 private 33 FTimer: TTimer; 34 procedure TimerExecute(Sender: TObject); 25 35 public 36 WavFile: TWAVFile; 26 37 procedure Play; override; 27 38 procedure Pause; override; 28 39 procedure Stop; override; 40 procedure Open; override; 41 procedure Close; override; 42 constructor Create(AOwner: TComponent); override; 43 destructor Destroy; override; 29 44 end; 30 45 31 //{$ENDIF} 46 const 47 BUFFERLEN = 1024; 48 49 const 50 { Values obtained from a C program - These are complex (!) C macros } 51 SNDCTL_DSP_STEREO = -1073459197; 52 SNDCTL_DSP_RESET = 20480; 53 SNDCTL_DSP_SYNC = 20481; 54 SOUND_PCM_WRITE_BITS = -1073459195; 55 SOUND_PCM_WRITE_CHANNELS = -1073459194; 56 SOUND_PCM_WRITE_RATE = -1073459198; 57 58 resourcestring 59 SPlaying = 'Playing : '; 60 SErrChannels = 'Error : Number of channels not supported: '; 61 SErrOpeningDevice = 'Could not open sound device'; 62 SErrSettingStereo = 'Could not set stereo'; 63 SErrResettingDevice = 'Could not reset DSP device'; 64 SErrSetWriteBits = 'Could not set write bits to 16'; 65 SErrSetChannels = 'Could not set channels'; 66 SErrSetSampleRate = 'Could not set sync mode'; 67 SErrSetSyncMode = 'Could not set sync mode'; 68 69 {$ENDIF} 32 70 33 71 implementation 72 73 {$IFDEF AudioSystemDSP} 34 74 35 75 { TAudioSystemDSP } … … 37 77 procedure TAudioSystemDSP.OpenDevice; 38 78 var 39 fd, Stereo, Temp, Error: Longint;79 Stereo, Error: Longint; 40 80 begin 41 fd := fpOpen('/dev/dsp', O_WRONLY, 0); 42 if fd < 0 then 43 PlayError(SErrOpeningDevice); 81 Write('Openning /dev/dsp'); 82 FDeviceId := fpOpen('/dev/dsp', O_WRONLY, 0); 83 if FDeviceId < 0 then 84 raise Exception.Create(SErrOpeningDevice); 44 85 Stereo := 0; 45 if not (FpIOCtl(fd, SNDCTL_DSP_STEREO, @Stereo) <> -1) then 46 PlayError(SErrSettingStereo); 47 if not (FpIOCtl(fd, SNDCTL_DSP_RESET, nil) <> -1) then 48 PlayError(SErrResettingDevice); 49 Temp := 16; 50 if not (FpIOCtl(fd, SOUND_PCM_WRITE_BITS, @Temp) <> -1) then 51 PlayError(SErrSetWriteBits); 52 if not (FpIOCtl(fd, SOUND_PCM_WRITE_CHANNELS, @Channels) <> -1) then 53 PlayError(SErrSetChannels); 54 if not (FpIOCtl(fd, SOUND_PCM_WRITE_RATE, @SampleRate) <> -1) then 55 PlayError(SErrSetSampleRate); 56 if not (FpIOCtl(fd, SNDCTL_DSP_SYNC, nil) <> -1) then 57 PlayError(SErrSetSyncMode); 58 FDeviceId := Fd; 86 if not (FpIOCtl(FDeviceId, SNDCTL_DSP_STEREO, @Stereo) <> -1) then 87 raise Exception.Create(SErrSettingStereo); 88 if not (FpIOCtl(FDeviceId, SNDCTL_DSP_RESET, nil) <> -1) then 89 raise Exception.Create(SErrResettingDevice); 90 if not (FpIOCtl(FDeviceId, SOUND_PCM_WRITE_BITS, @BitsPerSample) <> -1) then 91 raise Exception.Create(SErrSetWriteBits); 92 if not (FpIOCtl(FDeviceId, SOUND_PCM_WRITE_CHANNELS, @Channels) <> -1) then 93 raise Exception.Create(SErrSetChannels); 94 if not (FpIOCtl(FDeviceId, SOUND_PCM_WRITE_RATE, @SampleRate) <> -1) then 95 raise Exception.Create(SErrSetSampleRate); 96 if not (FpIOCtl(FDeviceId, SNDCTL_DSP_SYNC, nil) <> -1) then 97 raise Exception.Create(SErrSetSyncMode); 98 WriteLn(' device: ' + IntToStr(FDeviceId)); 59 99 end; 60 100 61 //{$IFDEF AudioSystemDSP} 101 procedure TAudioSystemDSP.CloseDevice; 102 begin 103 if FDeviceId >= 0 then FpClose(FDeviceId); 104 end; 105 106 constructor TAudioSystemDSP.Create(AOwner: TComponent); 107 begin 108 inherited; 109 BitsPerSample := 16; 110 Channels := 2; 111 SampleRate := 44000; 112 end; 113 114 destructor TAudioSystemDSP.Destroy; 115 begin 116 inherited Destroy; 117 end; 62 118 63 119 { TPlayerMAD } 64 120 121 procedure TPlayerDSP.TimerExecute(Sender: TObject); 122 var 123 Buffer: array of Byte; 124 Size: Integer; 125 begin 126 SetLength(Buffer, 10000); 127 Size := WavFile.SourceFile.Read(PByte(Buffer)^, System.Length(Buffer)); 128 Write('Buf: ' + IntToStr(Size) + ', '); 129 fpWrite(TAudioSystemDSP(AudioSystem).FDeviceId, PByte(Buffer)^, Size); 130 FTimer.Interval := 100; 131 end; 132 65 133 procedure TPlayerDSP.Play; 66 134 begin 67 inherited Play; 68 135 WriteLn('Stop'); 136 Stop; 137 TAudioSystemDSP(AudioSystem).SampleRate := WavFile.SampleRate; 138 TAudioSystemDSP(AudioSystem).Channels := WavFile.ChannelModeID; 139 TAudioSystemDSP(AudioSystem).BitsPerSample := WavFile.BitsPerSample; 140 TAudioSystemDSP(AudioSystem).OpenDevice; 141 WriteLn('seek'); 142 WavFile.SourceFile.Seek(SizeOf(TWAVRecord), soFromBeginning); 143 while WavFile.SourceFile.Position < WavFile.SourceFile.Size do 144 TimerExecute(nil); 145 WriteLn('int'); 146 FTimer.Interval := 10; 147 FTimer.OnTimer := TimerExecute; 148 WriteLn('ena'); 149 //FTimer.Enabled := True; 150 WriteLn('true'); 69 151 end; 70 152 71 153 procedure TPlayerDSP.Pause; 72 154 begin 73 i nherited Pause;155 if FActive then FTimer.Enabled := not FTimer.Enabled; 74 156 end; 75 157 … … 77 159 begin 78 160 inherited Stop; 161 FTimer.Enabled := False; 162 TAudioSystemDSP(AudioSystem).CloseDevice; 79 163 end; 80 164 81 //{$ENDIF} 165 procedure TPlayerDSP.Open; 166 begin 167 inherited; 168 WavFile.OpenFile(FFileName); 169 end; 82 170 171 procedure TPlayerDSP.Close; 172 begin 173 inherited Close; 174 end; 175 176 constructor TPlayerDSP.Create(AOwner: TComponent); 177 begin 178 inherited; 179 WavFile := TWAVFile.Create; 180 FTimer := TTimer.Create(nil); 181 end; 182 183 destructor TPlayerDSP.Destroy; 184 begin 185 FreeAndNil(FTimer); 186 FreeAndNil(WavFile); 187 inherited Destroy; 188 end; 189 190 {$ENDIF} 83 191 84 192 end. 85 -
CoolAudio/Systems/FMOD/UAudioSystemFMOD.pas
r351 r352 1 1 unit UAudioSystemFMOD; 2 2 3 {$mode objfpc}{$H+} 3 {$I UCoolAudioConfig.inc} 4 {$mode delphi}{$H+} 4 5 5 6 interface 6 7 8 {$IFDEF AudioSystemFMOD} 7 9 uses 8 10 Classes, SysUtils, fmoddyn, fmodtypes, UAudioSystem, DateUtils; … … 39 41 end; 40 42 43 {$ENDIF} 44 45 41 46 implementation 47 48 {$IFDEF AudioSystemFMOD} 42 49 43 50 { TAudioSystemFMOD } … … 129 136 end; 130 137 138 {$ENDIF} 139 131 140 end. 132 141 -
CoolAudio/Systems/MAD/UAudioSystemMAD.pas
r351 r352 1 1 unit UAudioSystemMAD; 2 2 3 {$I UCoolAudioConfig.inc} 3 4 {$mode delphi}{$H+} 4 5 -
CoolAudio/Systems/UAudioSystem.pas
r347 r352 86 86 end; 87 87 88 const 89 WavFileExt = '.wav'; 90 Mp3FileExt = '.mp3'; 91 88 92 resourcestring 89 93 SOpenOutputFailed = 'Failed opening audio output'; … … 224 228 destructor TPlayer.Destroy; 225 229 begin 230 Stop; 226 231 Active := False; 227 232 inherited Destroy; -
CoolAudio/Systems/WinAPI/UAudioSystemWindows.pas
r351 r352 1 1 unit UAudioSystemWindows; 2 2 3 {$mode objfpc}{$H+} 3 {$I UCoolAudioConfig.inc} 4 {$mode delphi}{$H+} 4 5 5 6 interface … … 187 188 Parm: TMCI_Generic_Parms; 188 189 begin 189 FFlags := 0; 190 if FUseNotify then 191 begin 192 if FNotify then FFlags := mci_Notify; 193 FUseNotify := False; 194 end else FFlags := mci_Notify; 195 if FUseWait then 196 begin 197 if FWait then FFlags := FFlags or mci_Wait; 198 FUseWait := False; 199 end; 200 CheckError(mciSendCommand(FDeviceID, mci_Stop, FFlags, Longint(@Parm))); 201 FPlaying := False; 190 if FPlaying then begin 191 FFlags := 0; 192 if FUseNotify then 193 begin 194 if FNotify then FFlags := mci_Notify; 195 FUseNotify := False; 196 end else FFlags := mci_Notify; 197 if FUseWait then 198 begin 199 if FWait then FFlags := FFlags or mci_Wait; 200 FUseWait := False; 201 end; 202 CheckError(mciSendCommand(FDeviceID, mci_Stop, FFlags, Longint(@Parm))); 203 FPlaying := False; 204 Position := 0; 205 end; 202 206 end; 203 207 -
CoolAudio/Systems/mplayer/UAudioSystemMPlayer.pas
r351 r352 3 3 unit UAudioSystemMPlayer; 4 4 5 {$I UCoolAudioConfig.inc} 5 6 {$mode Delphi}{$H+} 6 7 -
CoolAudio/UCoolAudio.pas
r348 r352 1 1 unit UCoolAudio; 2 2 3 {$I UCoolAudioConfig.inc} 3 4 {$mode Delphi}{$H+} 4 5 {$IFDEF Windows}6 {$DEFINE AudioSystemWindows}7 {$ENDIF}8 //{$DEFINE AudioSystemMPlayer}9 //{$DEFINE AudioSystemFMOD}10 //{$DEFINE AudioSystemDSP}11 {$IFDEF Linux}12 //{$DEFINE AudioSystemMAD}13 {$ENDIF}14 5 15 6 interface … … 32 23 33 24 AudioSystemManager := TAudioSystemManager.Create(nil); 34 {$IFDEF AudioSystemWindows} 35 AudioSystemManager.Register('Windows', TAudioSystemWindows, TPlayerWindows); 36 {$ENDIF} 37 {$IFDEF AudioSystemMPlayer} 38 AudioSystemManager.Register('MPlayer', TAudioSystemMPlayer, TPlayerMPlayer); 39 {$ENDIF} 40 {$IFDEF AudioSystemFMOD} 41 AudioSystemManager.Register('FMOD', TAudioSystemFMOD, TPlayerFMOD); 42 {$ENDIF} 43 {$IFDEF AudioSystemMAD} 44 AudioSystemManager.Register('MAD', TAudioSystemMAD, TPlayerMAD); 45 {$ENDIF} 46 {$IFDEF AudioSystemDSP} 47 AudioSystemManager.Register('DSP', TAudioSystemDSP, TPlayerDSP); 48 {$ENDIF} 25 {$IFDEF AudioSystemWindows}AudioSystemManager.Register('Windows', TAudioSystemWindows, TPlayerWindows);{$ENDIF} 26 {$IFDEF AudioSystemMPlayer}AudioSystemManager.Register('MPlayer', TAudioSystemMPlayer, TPlayerMPlayer);{$ENDIF} 27 {$IFDEF AudioSystemFMOD}AudioSystemManager.Register('FMOD', TAudioSystemFMOD, TPlayerFMOD);{$ENDIF} 28 {$IFDEF AudioSystemMAD}AudioSystemManager.Register('MAD', TAudioSystemMAD, TPlayerMAD);{$ENDIF} 29 {$IFDEF AudioSystemDSP}AudioSystemManager.Register('DSP', TAudioSystemDSP, TPlayerDSP);{$ENDIF} 49 30 50 31 finalization -
CoolAudio/UPlaylist.pas
r347 r352 6 6 7 7 uses 8 Classes, SysUtils, Contnrs ;8 Classes, SysUtils, Contnrs, UAudioSystem; 9 9 10 10 type 11 11 TPlaylistItem = class 12 12 FileName: string; 13 13 end; 14 14 … … 16 16 17 17 TPlaylist = class(TComponent) 18 public 19 Player: TPlayer; 18 20 Items: TObjectList; // TObjectList<TPlaylistItem> 21 RandomOrder: Boolean; 22 RepeatInfinitely: Boolean; 23 CurrentIndex: Integer; 24 procedure AddFile(FileName: string); 25 procedure Shuffle; 26 procedure Play; 27 procedure PlayNext; 28 procedure PlayPrevious; 19 29 constructor Create(AOwner: TComponent); 20 30 destructor Destroy; override; … … 25 35 26 36 { TPlaylist } 37 38 procedure TPlaylist.AddFile(FileName: string); 39 var 40 NewItem: TPlaylistItem; 41 begin 42 NewItem := TPlaylistItem.Create; 43 NewItem.FileName := FileName; 44 Items.Add(NewItem); 45 end; 46 47 procedure TPlaylist.Shuffle; 48 begin 49 50 end; 51 52 procedure TPlaylist.Play; 53 begin 54 Player.FileName := TPlaylistItem(Items[CurrentIndex]).FileName; 55 Player.Play; 56 end; 57 58 procedure TPlaylist.PlayNext; 59 begin 60 Inc(CurrentIndex); 61 if CurrentIndex >= Items.Count then begin 62 CurrentIndex := 0; 63 if RandomOrder then Shuffle; 64 if not RepeatInfinitely then Player.Stop; 65 end; 66 Play; 67 end; 68 69 procedure TPlaylist.PlayPrevious; 70 begin 71 Dec(CurrentIndex); 72 if CurrentIndex < 0 then begin 73 CurrentIndex := Items.Count - 1; 74 end; 75 Play; 76 end; 27 77 28 78 constructor TPlaylist.Create(AOwner: TComponent);
Note:
See TracChangeset
for help on using the changeset viewer.