Changeset 353 for CoolAudio/Demo
- Timestamp:
- Apr 23, 2012, 2:57:12 PM (13 years ago)
- Location:
- CoolAudio/Demo
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/Demo/Demo.lpi
r352 r353 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count=" 31">40 <Units Count="45"> 41 41 <Unit0> 42 42 <Filename Value="Demo.lpr"/> 43 43 <IsPartOfProject Value="True"/> 44 44 <UnitName Value="Demo"/> 45 <EditorIndex Value="1 4"/>45 <EditorIndex Value="15"/> 46 46 <WindowIndex Value="0"/> 47 47 <TopLine Value="1"/> 48 48 <CursorPos X="34" Y="10"/> 49 <UsageCount Value="8 3"/>49 <UsageCount Value="85"/> 50 50 <Loaded Value="True"/> 51 51 </Unit0> … … 59 59 <EditorIndex Value="0"/> 60 60 <WindowIndex Value="0"/> 61 <TopLine Value="1 42"/>62 <CursorPos X=" 28" Y="150"/>63 <UsageCount Value="8 3"/>61 <TopLine Value="1"/> 62 <CursorPos X="47" Y="9"/> 63 <UsageCount Value="85"/> 64 64 <Loaded Value="True"/> 65 65 <LoadedDesigner Value="True"/> … … 70 70 <EditorIndex Value="12"/> 71 71 <WindowIndex Value="0"/> 72 <TopLine Value="2 7"/>73 <CursorPos X=" 20" Y="19"/>74 <UsageCount Value="3 5"/>72 <TopLine Value="22"/> 73 <CursorPos X="34" Y="37"/> 74 <UsageCount Value="36"/> 75 75 <Loaded Value="True"/> 76 76 </Unit2> … … 86 86 <Filename Value="../UPlaylist.pas"/> 87 87 <UnitName Value="UPlaylist"/> 88 <EditorIndex Value=" 2"/>89 <WindowIndex Value="0"/> 90 <TopLine Value=" 10"/>91 <CursorPos X=" 20" Y="26"/>92 <UsageCount Value="1 7"/>88 <EditorIndex Value="4"/> 89 <WindowIndex Value="0"/> 90 <TopLine Value="23"/> 91 <CursorPos X="31" Y="35"/> 92 <UsageCount Value="18"/> 93 93 <Loaded Value="True"/> 94 94 </Unit4> … … 120 120 <Filename Value="../CoolAudio.pas"/> 121 121 <UnitName Value="CoolAudio"/> 122 <EditorIndex Value="13"/> 122 123 <WindowIndex Value="0"/> 123 124 <TopLine Value="1"/> 124 <CursorPos X="1" Y="1"/> 125 <UsageCount Value="4"/> 125 <CursorPos X="45" Y="19"/> 126 <UsageCount Value="10"/> 127 <Loaded Value="True"/> 126 128 </Unit8> 127 129 <Unit9> 128 130 <Filename Value="../Systems/UAudioSystem.pas"/> 129 131 <UnitName Value="UAudioSystem"/> 130 <EditorIndex Value=" 11"/>131 <WindowIndex Value="0"/> 132 <TopLine Value="2 17"/>133 <CursorPos X="1 " Y="230"/>134 <UsageCount Value="5 0"/>132 <EditorIndex Value="5"/> 133 <WindowIndex Value="0"/> 134 <TopLine Value="27"/> 135 <CursorPos X="15" Y="40"/> 136 <UsageCount Value="51"/> 135 137 <Loaded Value="True"/> 136 138 </Unit9> … … 183 185 <Unit16> 184 186 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/lcl/include/control.inc"/> 185 <EditorIndex Value="8"/>186 187 <WindowIndex Value="0"/> 187 188 <TopLine Value="2275"/> 188 189 <CursorPos X="1" Y="2287"/> 189 190 <UsageCount Value="34"/> 190 <Loaded Value="True"/>191 191 </Unit16> 192 192 <Unit17> … … 216 216 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/packages/winunits-base/src/mmsystem.pp"/> 217 217 <UnitName Value="mmsystem"/> 218 <EditorIndex Value="9"/>219 218 <WindowIndex Value="0"/> 220 219 <TopLine Value="1781"/> 221 220 <CursorPos X="52" Y="1791"/> 222 221 <UsageCount Value="36"/> 223 <Loaded Value="True"/>224 222 </Unit20> 225 223 <Unit21> … … 240 238 <Unit23> 241 239 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/objpas/sysutils/osutilsh.inc"/> 242 <EditorIndex Value="1 3"/>240 <EditorIndex Value="14"/> 243 241 <WindowIndex Value="0"/> 244 242 <TopLine Value="23"/> 245 243 <CursorPos X="10" Y="23"/> 246 <UsageCount Value="3 4"/>244 <UsageCount Value="35"/> 247 245 <Loaded Value="True"/> 248 246 </Unit23> 249 247 <Unit24> 250 248 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/win/wininc/base.inc"/> 251 <EditorIndex Value="10"/>252 249 <WindowIndex Value="0"/> 253 250 <TopLine Value="148"/> 254 251 <CursorPos X="6" Y="159"/> 255 252 <UsageCount Value="11"/> 256 <Loaded Value="True"/>257 253 </Unit24> 258 254 <Unit25> … … 260 256 <IsPartOfProject Value="True"/> 261 257 <ComponentName Value="FormPlaylist"/> 258 <HasResources Value="True"/> 262 259 <ResourceBaseClass Value="Form"/> 263 260 <UnitName Value="UFormPlaylist"/> … … 266 263 <TopLine Value="155"/> 267 264 <CursorPos X="28" Y="168"/> 268 <UsageCount Value="2 3"/>265 <UsageCount Value="25"/> 269 266 <Loaded Value="True"/> 270 267 <LoadedDesigner Value="True"/> … … 273 270 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 274 271 <UnitName Value="UAudioSystemWindows"/> 275 <EditorIndex Value="5"/> 276 <WindowIndex Value="0"/> 277 <TopLine Value="62"/> 278 <CursorPos X="35" Y="75"/> 272 <IsVisibleTab Value="True"/> 273 <EditorIndex Value="6"/> 274 <WindowIndex Value="0"/> 275 <TopLine Value="163"/> 276 <CursorPos X="3" Y="167"/> 279 277 <UsageCount Value="11"/> 280 278 <Loaded Value="True"/> … … 282 280 <Unit27> 283 281 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/include/customform.inc"/> 284 <EditorIndex Value="1"/>285 282 <WindowIndex Value="0"/> 286 283 <TopLine Value="934"/> 287 284 <CursorPos X="1" Y="947"/> 288 <UsageCount Value="11"/> 289 <Loaded Value="True"/> 285 <UsageCount Value="10"/> 290 286 </Unit27> 291 287 <Unit28> 292 288 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/include/listitem.inc"/> 293 <EditorIndex Value="4"/>294 289 <WindowIndex Value="0"/> 295 290 <TopLine Value="725"/> 296 291 <CursorPos X="1" Y="738"/> 297 292 <UsageCount Value="10"/> 298 <Loaded Value="True"/>299 293 </Unit28> 300 294 <Unit29> 301 295 <Filename Value="../UCoolAudioConfig.inc"/> 302 <EditorIndex Value="6"/>303 296 <WindowIndex Value="0"/> 304 297 <TopLine Value="1"/> 305 298 <CursorPos X="1" Y="5"/> 306 299 <UsageCount Value="10"/> 307 <Loaded Value="True"/>308 300 </Unit29> 309 301 <Unit30> 310 302 <Filename Value="../Systems/FMOD/fmoddyn.pas"/> 311 303 <UnitName Value="fmoddyn"/> 312 <IsVisibleTab Value="True"/> 304 <WindowIndex Value="0"/> 305 <TopLine Value="576"/> 306 <CursorPos X="20" Y="594"/> 307 <UsageCount Value="10"/> 308 </Unit30> 309 <Unit31> 310 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/stdctrls.pp"/> 311 <UnitName Value="StdCtrls"/> 312 <WindowIndex Value="0"/> 313 <TopLine Value="1081"/> 314 <CursorPos X="3" Y="1085"/> 315 <UsageCount Value="10"/> 316 </Unit31> 317 <Unit32> 318 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/include/buttons.inc"/> 319 <WindowIndex Value="0"/> 320 <TopLine Value="280"/> 321 <CursorPos X="3" Y="285"/> 322 <UsageCount Value="10"/> 323 </Unit32> 324 <Unit33> 325 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/include/buttoncontrol.inc"/> 326 <WindowIndex Value="0"/> 327 <TopLine Value="59"/> 328 <CursorPos X="3" Y="61"/> 329 <UsageCount Value="10"/> 330 </Unit33> 331 <Unit34> 332 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/widgetset/wsstdctrls.pp"/> 333 <UnitName Value="WSStdCtrls"/> 334 <WindowIndex Value="0"/> 335 <TopLine Value="212"/> 336 <CursorPos X="3" Y="225"/> 337 <UsageCount Value="10"/> 338 </Unit34> 339 <Unit35> 340 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/widgetset/wsfactory.pas"/> 341 <UnitName Value="WSFactory"/> 342 <WindowIndex Value="0"/> 343 <TopLine Value="42"/> 344 <CursorPos X="1" Y="55"/> 345 <UsageCount Value="10"/> 346 </Unit35> 347 <Unit36> 348 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/controls.pp"/> 349 <UnitName Value="Controls"/> 350 <EditorIndex Value="2"/> 351 <WindowIndex Value="0"/> 352 <TopLine Value="1309"/> 353 <CursorPos X="15" Y="1310"/> 354 <UsageCount Value="10"/> 355 <Loaded Value="True"/> 356 </Unit36> 357 <Unit37> 358 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/include/control.inc"/> 359 <EditorIndex Value="1"/> 360 <WindowIndex Value="0"/> 361 <TopLine Value="3633"/> 362 <CursorPos X="47" Y="3641"/> 363 <UsageCount Value="10"/> 364 <Loaded Value="True"/> 365 </Unit37> 366 <Unit38> 367 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/lclclasses.pp"/> 368 <UnitName Value="LCLClasses"/> 369 <WindowIndex Value="0"/> 370 <TopLine Value="37"/> 371 <CursorPos X="13" Y="41"/> 372 <UsageCount Value="10"/> 373 </Unit38> 374 <Unit39> 375 <Filename Value="../../../../Lazarus/1.1_2.6.0/lcl/widgetset/wslclclasses.pp"/> 376 <UnitName Value="WSLCLClasses"/> 377 <WindowIndex Value="0"/> 378 <TopLine Value="61"/> 379 <CursorPos X="3" Y="74"/> 380 <UsageCount Value="10"/> 381 </Unit39> 382 <Unit40> 383 <Filename Value="../Systems/FMOD/UAudioSystemFMOD.pas"/> 384 <UnitName Value="UAudioSystemFMOD"/> 385 <EditorIndex Value="9"/> 386 <WindowIndex Value="0"/> 387 <TopLine Value="66"/> 388 <CursorPos X="25" Y="68"/> 389 <UsageCount Value="10"/> 390 <Loaded Value="True"/> 391 </Unit40> 392 <Unit41> 393 <Filename Value="../Systems/mplayer/UAudioSystemMPlayer.pas"/> 394 <UnitName Value="UAudioSystemMPlayer"/> 313 395 <EditorIndex Value="7"/> 314 396 <WindowIndex Value="0"/> 315 <TopLine Value="588"/> 316 <CursorPos X="5" Y="589"/> 317 <UsageCount Value="10"/> 318 <Loaded Value="True"/> 319 </Unit30> 397 <TopLine Value="130"/> 398 <CursorPos X="1" Y="134"/> 399 <UsageCount Value="10"/> 400 <Loaded Value="True"/> 401 </Unit41> 402 <Unit42> 403 <Filename Value="../../../../Lazarus/1.1_2.6.0/fpc/2.6.0/source/rtl/objpas/classes/classesh.inc"/> 404 <EditorIndex Value="11"/> 405 <WindowIndex Value="0"/> 406 <TopLine Value="1919"/> 407 <CursorPos X="11" Y="1932"/> 408 <UsageCount Value="10"/> 409 <Loaded Value="True"/> 410 </Unit42> 411 <Unit43> 412 <Filename Value="../Systems/DSP/UAudioSystemDSP.pas"/> 413 <UnitName Value="UAudioSystemDSP"/> 414 <EditorIndex Value="8"/> 415 <WindowIndex Value="0"/> 416 <TopLine Value="64"/> 417 <CursorPos X="25" Y="78"/> 418 <UsageCount Value="10"/> 419 <Loaded Value="True"/> 420 </Unit43> 421 <Unit44> 422 <Filename Value="../Systems/MAD/UAudioSystemMAD.pas"/> 423 <UnitName Value="UAudioSystemMAD"/> 424 <EditorIndex Value="10"/> 425 <WindowIndex Value="0"/> 426 <TopLine Value="23"/> 427 <CursorPos X="23" Y="37"/> 428 <UsageCount Value="10"/> 429 <Loaded Value="True"/> 430 </Unit44> 320 431 </Units> 321 432 <JumpHistory Count="30" HistoryIndex="29"> 322 433 <Position1> 323 <Filename Value=" UFormPlaylist.pas"/>324 <Caret Line=" 97" Column="25" TopLine="90"/>434 <Filename Value="../Systems/UAudioSystem.pas"/> 435 <Caret Line="240" Column="1" TopLine="227"/> 325 436 </Position1> 326 437 <Position2> 327 <Filename Value=" UFormPlaylist.pas"/>328 <Caret Line=" 96" Column="3" TopLine="94"/>438 <Filename Value="../Systems/UAudioSystem.pas"/> 439 <Caret Line="241" Column="1" TopLine="227"/> 329 440 </Position2> 330 441 <Position3> 331 <Filename Value=" UFormPlaylist.pas"/>332 <Caret Line=" 161" Column="24" TopLine="142"/>442 <Filename Value="../Systems/UAudioSystem.pas"/> 443 <Caret Line="381" Column="1" TopLine="368"/> 333 444 </Position3> 334 445 <Position4> 335 <Filename Value="UForm Playlist.pas"/>336 <Caret Line="1 46" Column="19" TopLine="144"/>446 <Filename Value="UFormMain.pas"/> 447 <Caret Line="121" Column="10" TopLine="111"/> 337 448 </Position4> 338 449 <Position5> 339 <Filename Value="UForm Playlist.pas"/>340 <Caret Line="1 61" Column="20" TopLine="155"/>450 <Filename Value="UFormMain.pas"/> 451 <Caret Line="125" Column="28" TopLine="112"/> 341 452 </Position5> 342 453 <Position6> 343 454 <Filename Value="UFormMain.pas"/> 344 <Caret Line=" 77" Column="53" TopLine="67"/>455 <Caret Line="122" Column="28" TopLine="112"/> 345 456 </Position6> 346 457 <Position7> 347 458 <Filename Value="UFormMain.pas"/> 348 <Caret Line="1 36" Column="1" TopLine="132"/>459 <Caret Line="164" Column="30" TopLine="159"/> 349 460 </Position7> 350 461 <Position8> 351 <Filename Value="UForm Playlist.pas"/>352 <Caret Line=" 151" Column="30" TopLine="145"/>462 <Filename Value="UFormMain.pas"/> 463 <Caret Line="51" Column="49" TopLine="27"/> 353 464 </Position8> 354 465 <Position9> 355 <Filename Value=" UFormMain.pas"/>356 <Caret Line=" 136" Column="1" TopLine="132"/>466 <Filename Value="../UPlaylist.pas"/> 467 <Caret Line="30" Column="1" TopLine="10"/> 357 468 </Position9> 358 469 <Position10> 359 <Filename Value=" UFormMain.pas"/>360 <Caret Line=" 150" Column="28" TopLine="142"/>470 <Filename Value="../UPlaylist.pas"/> 471 <Caret Line="35" Column="3" TopLine="15"/> 361 472 </Position10> 362 473 <Position11> 363 <Filename Value="../ Systems/WinAPI/UAudioSystemWindows.pas"/>364 <Caret Line="1 98" Column="7" TopLine="186"/>474 <Filename Value="../UPlaylist.pas"/> 475 <Caret Line="18" Column="10" TopLine="7"/> 365 476 </Position11> 366 477 <Position12> 367 <Filename Value="../Systems/ WinAPI/UAudioSystemWindows.pas"/>368 <Caret Line="1 90" Column="1" TopLine="185"/>478 <Filename Value="../Systems/UAudioSystem.pas"/> 479 <Caret Line="120" Column="68" TopLine="104"/> 369 480 </Position12> 370 481 <Position13> 371 <Filename Value="../Systems/ WinAPI/UAudioSystemWindows.pas"/>372 <Caret Line=" 191" Column="1" TopLine="185"/>482 <Filename Value="../Systems/UAudioSystem.pas"/> 483 <Caret Line="318" Column="3" TopLine="313"/> 373 484 </Position13> 374 485 <Position14> 375 <Filename Value="../ Systems/WinAPI/UAudioSystemWindows.pas"/>376 <Caret Line="1 92" Column="1" TopLine="185"/>486 <Filename Value="../UCoolAudio.pas"/> 487 <Caret Line="18" Column="49" TopLine="10"/> 377 488 </Position14> 378 489 <Position15> 379 <Filename Value="../ Systems/WinAPI/UAudioSystemWindows.pas"/>380 <Caret Line=" 196" Column="1" TopLine="185"/>490 <Filename Value="../UCoolAudio.pas"/> 491 <Caret Line="40" Column="1" TopLine="22"/> 381 492 </Position15> 382 493 <Position16> 383 <Filename Value="../Systems/ WinAPI/UAudioSystemWindows.pas"/>384 <Caret Line="1 97" Column="1" TopLine="185"/>494 <Filename Value="../Systems/UAudioSystem.pas"/> 495 <Caret Line="122" Column="39" TopLine="104"/> 385 496 </Position16> 386 497 <Position17> 387 <Filename Value="../ Systems/WinAPI/UAudioSystemWindows.pas"/>388 <Caret Line=" 202" Column="1" TopLine="185"/>498 <Filename Value="../UCoolAudio.pas"/> 499 <Caret Line="40" Column="1" TopLine="22"/> 389 500 </Position17> 390 501 <Position18> 391 <Filename Value=" ../Systems/WinAPI/UAudioSystemWindows.pas"/>392 <Caret Line="2 04" Column="19" TopLine="186"/>502 <Filename Value="UFormMain.pas"/> 503 <Caret Line="29" Column="32" TopLine="18"/> 393 504 </Position18> 394 505 <Position19> 395 <Filename Value=" ../Systems/WinAPI/UAudioSystemWindows.pas"/>396 <Caret Line=" 75" Column="1" TopLine="62"/>506 <Filename Value="UFormMain.pas"/> 507 <Caret Line="27" Column="18" TopLine="18"/> 397 508 </Position19> 398 509 <Position20> 399 510 <Filename Value="UFormPlaylist.pas"/> 400 <Caret Line="168" Column=" 59" TopLine="156"/>511 <Caret Line="168" Column="28" TopLine="155"/> 401 512 </Position20> 402 513 <Position21> 403 <Filename Value="../ ../../../Lazarus/1.1_2.6.0/lcl/include/listitem.inc"/>404 <Caret Line=" 738" Column="1" TopLine="725"/>514 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 515 <Caret Line="86" Column="48" TopLine="73"/> 405 516 </Position21> 406 517 <Position22> 407 <Filename Value=" UFormPlaylist.pas"/>408 <Caret Line=" 168" Column="28" TopLine="155"/>518 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 519 <Caret Line="213" Column="1" TopLine="200"/> 409 520 </Position22> 410 521 <Position23> 411 <Filename Value="../Systems/ WinAPI/UAudioSystemWindows.pas"/>412 <Caret Line=" 75" Column="1" TopLine="62"/>522 <Filename Value="../Systems/UAudioSystem.pas"/> 523 <Caret Line="422" Column="1" TopLine="409"/> 413 524 </Position23> 414 525 <Position24> 415 526 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 416 <Caret Line="2 02" Column="1" TopLine="183"/>527 <Caret Line="213" Column="1" TopLine="200"/> 417 528 </Position24> 418 529 <Position25> 419 <Filename Value="../Systems/ UAudioSystem.pas"/>420 <Caret Line=" 231" Column="39" TopLine="217"/>530 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 531 <Caret Line="86" Column="1" TopLine="73"/> 421 532 </Position25> 422 533 <Position26> 423 534 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 424 <Caret Line="21 6" Column="1" TopLine="203"/>535 <Caret Line="213" Column="1" TopLine="200"/> 425 536 </Position26> 426 537 <Position27> 427 538 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 428 <Caret Line=" 202" Column="1" TopLine="189"/>539 <Caret Line="86" Column="1" TopLine="73"/> 429 540 </Position27> 430 541 <Position28> 431 542 <Filename Value="../Systems/UAudioSystem.pas"/> 432 <Caret Line=" 230" Column="1" TopLine="217"/>543 <Caret Line="422" Column="1" TopLine="409"/> 433 544 </Position28> 434 545 <Position29> 435 546 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 436 <Caret Line="2 02" Column="1" TopLine="189"/>547 <Caret Line="227" Column="1" TopLine="214"/> 437 548 </Position29> 438 549 <Position30> 439 <Filename Value="../ UCoolAudioConfig.inc"/>440 <Caret Line=" 5" Column="1" TopLine="1"/>550 <Filename Value="../Systems/WinAPI/UAudioSystemWindows.pas"/> 551 <Caret Line="102" Column="3" TopLine="98"/> 441 552 </Position30> 442 553 </JumpHistory> -
CoolAudio/Demo/UFormMain.lfm
r352 r353 9 9 OnCreate = FormCreate 10 10 OnDestroy = FormDestroy 11 OnShow = FormShow 11 12 LCLVersion = '1.1' 12 13 object ButtonOpen: TButton … … 42 43 TabOrder = 3 43 44 end 44 object TrackBar 1: TTrackBar45 object TrackBarPosition: TTrackBar 45 46 Left = 0 46 47 Height = 33 … … 48 49 Width = 432 49 50 Max = 100 50 OnChange = TrackBar 1Change51 OnChange = TrackBarPositionChange 51 52 Position = 0 52 53 Anchors = [akTop, akLeft, akRight] … … 103 104 TabOrder = 8 104 105 end 106 object TrackBarVolume: TTrackBar 107 Left = 352 108 Height = 25 109 Top = 80 110 Width = 75 111 Max = 100 112 OnChange = TrackBarVolumeChange 113 Position = 0 114 TabOrder = 9 115 end 116 object Label2: TLabel 117 Left = 312 118 Height = 14 119 Top = 87 120 Width = 39 121 Caption = 'Volume:' 122 ParentColor = False 123 end 105 124 object OpenDialog1: TOpenDialog 106 125 Filter = 'Any file (*.*)|*.*|MP3 (*.mp3)|*.mp3|WAV (*.wav)|*.wav' 107 left = 272 108 top = 96 126 left = 168 109 127 end 110 128 object TimerPlayback: TTimer 111 129 OnTimer = TimerPlaybackTimer 112 left = 328 113 top = 88 130 left = 240 114 131 end 115 132 object ActionList1: TActionList 116 left = 208 117 top = 96 133 left = 104 118 134 object APlayNext: TAction 119 135 Caption = 'Next' … … 145 161 end 146 162 end 163 object MediaPlayer: TMediaPlayer 164 Volume = 0 165 Muted = False 166 Active = True 167 left = 312 168 end 169 object PlayList: TPlayList 170 RandomOrder = False 171 RepeatInfinitely = False 172 left = 375 173 top = 2 174 end 147 175 end -
CoolAudio/Demo/UFormMain.pas
r352 r353 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, ExtCtrls, ActnList, UAudioSystem, UAudioSystemFMOD,10 U AudioSystemMPlayer, UCoolAudio, UPlaylist;9 ComCtrls, ExtCtrls, ActnList, UAudioSystem, 10 UCoolAudio, UPlaylist; 11 11 12 12 type … … 32 32 ComboBoxBackend: TComboBox; 33 33 Label1: TLabel; 34 Label2: TLabel; 34 35 LabelPosition: TLabel; 36 MediaPlayer: TMediaPlayer; 35 37 OpenDialog1: TOpenDialog; 38 PlayList: TPlayList; 36 39 TimerPlayback: TTimer; 37 TrackBar1: TTrackBar; 40 TrackBarPosition: TTrackBar; 41 TrackBarVolume: TTrackBar; 38 42 procedure AOpenExecute(Sender: TObject); 39 43 procedure APauseExecute(Sender: TObject); … … 46 50 procedure FormCreate(Sender: TObject); 47 51 procedure FormDestroy(Sender: TObject); 52 procedure FormShow(Sender: TObject); 48 53 procedure TimerPlaybackTimer(Sender: TObject); 49 procedure TrackBar1Change(Sender: TObject); 54 procedure TrackBarPositionChange(Sender: TObject); 55 procedure TrackBarVolumeChange(Sender: TObject); 50 56 private 51 { private declarations }52 57 public 53 AudioSystem: TAudioSystem;54 Player: TPlayer;55 Playlist: TPlaylist;56 58 procedure UpdateInterface; 57 59 end; … … 74 76 procedure TFormMain.FormCreate(Sender: TObject); 75 77 begin 76 Play list := TPlaylist.Create(nil);78 PlayList := TPlayList.Create(nil); 77 79 AudioSystemManager.FillStringList(ComboBoxBackend.Items); 78 80 if ComboBoxBackend.Items.Count > 0 then … … 83 85 procedure TFormMain.FormDestroy(Sender: TObject); 84 86 begin 85 FreeAndNil(Player); 86 FreeAndNil(AudioSystem); 87 FreeAndNil(Playlist); 87 FreeAndNil(PlayList); 88 end; 89 90 procedure TFormMain.FormShow(Sender: TObject); 91 begin 92 UpdateInterface; 88 93 end; 89 94 90 95 procedure TFormMain.TimerPlaybackTimer(Sender: TObject); 91 96 begin 92 if Assigned(Player) and Player.Playing then begin 93 TrackBar1.OnChange := nil; 94 TrackBar1.Position := Trunc(Player.Position / Player.Length * TrackBar1.Max); 97 if Assigned(MediaPlayer) and MediaPlayer.Playing then begin 98 TrackBarPosition.OnChange := nil; 99 TrackBarPosition.Position := Trunc(MediaPlayer.Position / MediaPlayer.Length * TrackBarPosition.Max); 100 TrackBarVolume.OnChange := nil; 101 TrackBarVolume.Position := Trunc(MediaPlayer.Volume * TrackBarVolume.Max); 95 102 Application.ProcessMessages; 96 TrackBar1.OnChange := TrackBar1Change; 97 LabelPosition.Caption := 'Position: ' + TimeToStr(Player.Position) + ' / ' + TimeToStr(Player.Length); 103 TrackBarPosition.OnChange := TrackBarPositionChange(); 104 TrackBarVolume.OnChange := TrackBarVolumeChange(); 105 LabelPosition.Caption := 'Position: ' + TimeToStr(MediaPlayer.Position) + ' / ' + TimeToStr(MediaPlayer.Length); 98 106 end; 99 107 end; 100 108 101 procedure TFormMain.TrackBar 1Change(Sender: TObject);109 procedure TFormMain.TrackBarPositionChange(Sender: TObject); 102 110 begin 103 Player.Position := TrackBar1.Position / TrackBar1.Max * Player.Length; 111 MediaPlayer.Position := TrackBarPosition.Position / TrackBarPosition.Max * MediaPlayer.Length; 112 end; 113 114 procedure TFormMain.TrackBarVolumeChange(Sender: TObject); 115 begin 116 MediaPlayer.Volume := TrackBarVolume.Position / TrackBarVolume.Max; 104 117 end; 105 118 106 119 procedure TFormMain.UpdateInterface; 107 120 begin 121 APlay.Enabled := not MediaPlayer.Playing; 122 APause.Enabled := MediaPlayer.Playing; 123 AStop.Enabled := MediaPlayer.Playing; 108 124 Caption := ApplicationTitle; 109 if Assigned( Player) then Caption :=Player.FileName + ' - ' + Caption;125 if Assigned(MediaPlayer) then Caption := MediaPlayer.FileName + ' - ' + Caption; 110 126 end; 111 127 112 128 procedure TFormMain.ComboBoxBackendChange(Sender: TObject); 113 129 begin 114 FreeAndNil(Player);115 FreeAndNil(AudioSystem);116 130 if ComboBoxBackend.ItemIndex <> - 1 then begin 117 131 with TAudioSystemManagerItem(ComboBoxBackend.Items.Objects[ComboBoxBackend.ItemIndex]) do begin 118 AudioSystem := SystemClass.Create(nil); 119 Player := PlayerClass.Create(nil); 120 Player.AudioSystem := AudioSystem; 121 Playlist.Player := Player; 122 //Player.Active := True; 132 DefaultAudioSystem := SystemClass.Create(nil); 133 MediaPlayer.AudioSystem := DefaultAudioSystem; 134 PlayList.Player := MediaPlayer; 135 //MediaPlayer.Active := True; 123 136 end; 124 137 end; … … 127 140 procedure TFormMain.APlayExecute(Sender: TObject); 128 141 begin 129 Player.Play; 142 MediaPlayer.Play; 143 UpdateInterface; 130 144 end; 131 145 132 146 procedure TFormMain.APlayNextExecute(Sender: TObject); 133 147 begin 134 Play list.PlayNext;148 PlayList.PlayNext; 135 149 FormPlaylist.ReloadList; 136 150 end; … … 138 152 procedure TFormMain.APlayPreviousExecute(Sender: TObject); 139 153 begin 140 Play list.PlayPrevious;154 PlayList.PlayPrevious; 141 155 end; 142 156 … … 148 162 procedure TFormMain.AStopExecute(Sender: TObject); 149 163 begin 150 Player.Stop; 164 MediaPlayer.Stop; 165 UpdateInterface; 151 166 end; 152 167 153 168 procedure TFormMain.APauseExecute(Sender: TObject); 154 169 begin 155 Player.Pause; 170 MediaPlayer.Pause; 171 UpdateInterface; 156 172 end; 157 173 … … 159 175 begin 160 176 if OpenDialog1.Execute then begin 161 Player.FileName := OpenDialog1.FileName; 162 Playlist.AddFile(OpenDialog1.FileName); 163 Player.Play; 177 MediaPlayer.FileName := OpenDialog1.FileName; 178 PlayList.AddFile(OpenDialog1.FileName); 179 MediaPlayer.Play; 180 UpdateInterface; 164 181 end; 165 182 end; -
CoolAudio/Demo/UFormPlaylist.lfm
r352 r353 1 1 object FormPlaylist: TFormPlaylist 2 Left = 3 103 Height = 3944 Top = 732 Left = 331 3 Height = 400 4 Top = 119 5 5 Width = 516 6 6 Caption = 'Playlist' 7 ClientHeight = 3947 ClientHeight = 400 8 8 ClientWidth = 516 9 9 OnCreate = FormCreate … … 14 14 Left = 160 15 15 Height = 25 16 Top = 36 016 Top = 366 17 17 Width = 49 18 18 Action = AItemDelete … … 23 23 Left = 80 24 24 Height = 25 25 Top = 36 025 Top = 366 26 26 Width = 73 27 27 Action = AAddDirectory … … 32 32 Left = 8 33 33 Height = 25 34 Top = 36 034 Top = 366 35 35 Width = 65 36 36 Action = AAddFile … … 40 40 object ListView1: TListView 41 41 Left = 8 42 Height = 3 4442 Height = 350 43 43 Top = 8 44 44 Width = 505 … … 65 65 Left = 216 66 66 Height = 25 67 Top = 36 067 Top = 366 68 68 Width = 49 69 69 Action = AClearAll … … 74 74 Left = 328 75 75 Height = 17 76 Top = 36 076 Top = 366 77 77 Width = 88 78 78 Anchors = [akLeft, akBottom] … … 83 83 Left = 432 84 84 Height = 17 85 Top = 36 085 Top = 366 86 86 Width = 55 87 Anchors = [akLeft, akBottom] 87 88 Caption = 'Repeat' 88 89 TabOrder = 6 … … 91 92 Left = 272 92 93 Height = 25 93 Top = 36 094 Top = 366 94 95 Width = 51 95 96 Action = AItemPlay 97 Anchors = [akLeft, akBottom] 96 98 TabOrder = 7 97 99 end -
CoolAudio/Demo/UFormPlaylist.pas
r352 r353 76 76 procedure TFormPlaylist.AClearAllExecute(Sender: TObject); 77 77 begin 78 FormMain.Play list.Items.Clear;78 FormMain.PlayList.Items.Clear; 79 79 ReloadList; 80 80 end; … … 84 84 I: Integer; 85 85 begin 86 with FormMain.Play list, Items do begin86 with FormMain.PlayList, Items do begin 87 87 for I := Count - 1 downto 0 do 88 88 if ListView1.Items[I].Selected then Delete(I); … … 94 94 procedure TFormPlaylist.AItemPlayExecute(Sender: TObject); 95 95 begin 96 FormMain.Play list.CurrentIndex := ListView1.Selected.Index;97 FormMain.Play list.Play;96 FormMain.PlayList.CurrentIndex := ListView1.Selected.Index; 97 FormMain.PlayList.Play; 98 98 end; 99 99 … … 112 112 NewItem := TPlaylistItem.Create; 113 113 NewItem.FileName := Dir + DirectorySeparator + sr.Name; 114 FormMain.Play list.Items.Add(NewItem);114 FormMain.PlayList.Items.Add(NewItem); 115 115 end; 116 116 until FindNext(sr) <> 0; … … 124 124 begin 125 125 if OpenDialog1.Execute then begin 126 FormMain.Play list.AddFile(OpenDialog1.FileName);126 FormMain.PlayList.AddFile(OpenDialog1.FileName); 127 127 ReloadList; 128 128 end; … … 145 145 procedure TFormPlaylist.ListView1Data(Sender: TObject; Item: TListItem); 146 146 begin 147 if (Item.Index >= 0) and (Item.Index < FormMain.Play list.Items.Count) then148 with TPlaylistItem(FormMain.Play list.Items[Item.Index]) do begin147 if (Item.Index >= 0) and (Item.Index < FormMain.PlayList.Items.Count) then 148 with TPlaylistItem(FormMain.PlayList.Items[Item.Index]) do begin 149 149 Item.Caption := FileName; 150 Item.Data := FormMain.Play list.Items[Item.Index];150 Item.Data := FormMain.PlayList.Items[Item.Index]; 151 151 end; 152 152 end; … … 164 164 procedure TFormPlaylist.ReloadList; 165 165 begin 166 ListView1.Items.Count := FormMain.Play list.Items.Count;166 ListView1.Items.Count := FormMain.PlayList.Items.Count; 167 167 ListView1.Refresh; 168 168 ListView1.Selected := nil; 169 if (FormMain.Play list.CurrentIndex >= 0) and170 (FormMain.Play list.CurrentIndex < ListView1.Items.Count) then171 ListView1.Items[FormMain.Play list.CurrentIndex].Selected := True;169 if (FormMain.PlayList.CurrentIndex >= 0) and 170 (FormMain.PlayList.CurrentIndex < ListView1.Items.Count) then 171 ListView1.Items[FormMain.PlayList.CurrentIndex].Selected := True; 172 172 UpdateInterface; 173 173 end; … … 178 178 AItemPlay.Enabled := Assigned(ListView1.Selected); 179 179 AClearAll.Enabled := ListView1.Items.Count > 0; 180 CheckBoxRandom.Checked := FormMain.Play list.RandomOrder;181 CheckBoxRepeat.Checked := FormMain.Play list.RepeatInfinitely;180 CheckBoxRandom.Checked := FormMain.PlayList.RandomOrder; 181 CheckBoxRepeat.Checked := FormMain.PlayList.RepeatInfinitely; 182 182 end; 183 183
Note:
See TracChangeset
for help on using the changeset viewer.