Changeset 280 for CoolAudio/Demo
- Timestamp:
- Oct 5, 2011, 12:40:56 PM (13 years ago)
- Location:
- CoolAudio/Demo
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/Demo/Demo.lpi
r279 r280 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count="2 3">40 <Units Count="24"> 41 41 <Unit0> 42 42 <Filename Value="Demo.lpr"/> 43 43 <IsPartOfProject Value="True"/> 44 44 <UnitName Value="Demo"/> 45 <EditorIndex Value=" 8"/>45 <EditorIndex Value="10"/> 46 46 <WindowIndex Value="0"/> 47 47 <TopLine Value="1"/> 48 <CursorPos X="1 " Y="1"/>49 <UsageCount Value="3 3"/>48 <CursorPos X="19" Y="10"/> 49 <UsageCount Value="38"/> 50 50 <Loaded Value="True"/> 51 51 </Unit0> … … 56 56 <ResourceBaseClass Value="Form"/> 57 57 <UnitName Value="UMainForm"/> 58 <IsVisibleTab Value="True"/>59 58 <EditorIndex Value="0"/> 60 59 <WindowIndex Value="0"/> 61 <TopLine Value=" 69"/>62 <CursorPos X=" 39" Y="82"/>63 <UsageCount Value="3 3"/>60 <TopLine Value="84"/> 61 <CursorPos X="1" Y="96"/> 62 <UsageCount Value="38"/> 64 63 <Loaded Value="True"/> 65 64 <LoadedDesigner Value="True"/> … … 68 67 <Filename Value="../UCoolAudio.pas"/> 69 68 <UnitName Value="UCoolAudio"/> 70 <EditorIndex Value=" 3"/>71 <WindowIndex Value="0"/> 72 <TopLine Value="1 6"/>73 <CursorPos X=" 9" Y="7"/>74 <UsageCount Value="1 1"/>69 <EditorIndex Value="5"/> 70 <WindowIndex Value="0"/> 71 <TopLine Value="11"/> 72 <CursorPos X="18" Y="16"/> 73 <UsageCount Value="14"/> 75 74 <Loaded Value="True"/> 76 75 </Unit2> … … 78 77 <Filename Value="../Systems/UAudioSystemFMOD.pas"/> 79 78 <UnitName Value="UAudioSystemFMOD"/> 80 <EditorIndex Value=" 6"/>79 <EditorIndex Value="8"/> 81 80 <WindowIndex Value="0"/> 82 81 <TopLine Value="47"/> 83 82 <CursorPos X="1" Y="61"/> 84 <UsageCount Value="1 6"/>83 <UsageCount Value="19"/> 85 84 <Loaded Value="True"/> 86 85 </Unit3> … … 91 90 <TopLine Value="1"/> 92 91 <CursorPos X="29" Y="8"/> 93 <UsageCount Value="2 1"/>92 <UsageCount Value="20"/> 94 93 </Unit4> 95 94 <Unit5> 96 95 <Filename Value="../fmodintf/fmoddyn.pas"/> 97 96 <UnitName Value="fmoddyn"/> 98 <EditorIndex Value=" 7"/>99 <WindowIndex Value="0"/> 100 <TopLine Value="57 7"/>101 <CursorPos X=" 38" Y="581"/>102 <UsageCount Value="1 1"/>97 <EditorIndex Value="9"/> 98 <WindowIndex Value="0"/> 99 <TopLine Value="579"/> 100 <CursorPos X="19" Y="593"/> 101 <UsageCount Value="14"/> 103 102 <Loaded Value="True"/> 104 103 </Unit5> … … 109 108 <TopLine Value="158"/> 110 109 <CursorPos X="43" Y="178"/> 111 <UsageCount Value="1 1"/>110 <UsageCount Value="10"/> 112 111 </Unit6> 113 112 <Unit7> 114 113 <Filename Value="../Systems/UAudioSystemMPlayer.pas"/> 115 114 <UnitName Value="UAudioSystemMPlayer"/> 116 <EditorIndex Value=" 4"/>117 <WindowIndex Value="0"/> 118 <TopLine Value=" 254"/>119 <CursorPos X=" 1" Y="276"/>120 <UsageCount Value="1 6"/>115 <EditorIndex Value="6"/> 116 <WindowIndex Value="0"/> 117 <TopLine Value="30"/> 118 <CursorPos X="31" Y="36"/> 119 <UsageCount Value="19"/> 121 120 <Loaded Value="True"/> 122 121 </Unit7> … … 127 126 <TopLine Value="1"/> 128 127 <CursorPos X="1" Y="1"/> 129 <UsageCount Value=" 9"/>128 <UsageCount Value="8"/> 130 129 </Unit8> 131 130 <Unit9> 132 131 <Filename Value="../Systems/UAudioSystem.pas"/> 133 132 <UnitName Value="UAudioSystem"/> 134 <EditorIndex Value=" 2"/>135 <WindowIndex Value="0"/> 136 <TopLine Value=" 31"/>137 <CursorPos X="1 5" Y="48"/>138 <UsageCount Value="2 6"/>133 <EditorIndex Value="4"/> 134 <WindowIndex Value="0"/> 135 <TopLine Value="123"/> 136 <CursorPos X="1" Y="137"/> 137 <UsageCount Value="29"/> 139 138 <Loaded Value="True"/> 140 139 </Unit9> … … 145 144 <TopLine Value="418"/> 146 145 <CursorPos X="18" Y="430"/> 147 <UsageCount Value="1 1"/>146 <UsageCount Value="10"/> 148 147 </Unit10> 149 148 <Unit11> … … 153 152 <TopLine Value="2427"/> 154 153 <CursorPos X="24" Y="2429"/> 155 <UsageCount Value="1 3"/>154 <UsageCount Value="12"/> 156 155 </Unit11> 157 156 <Unit12> … … 161 160 <TopLine Value="38"/> 162 161 <CursorPos X="32" Y="50"/> 163 <UsageCount Value=" 9"/>162 <UsageCount Value="8"/> 164 163 </Unit12> 165 164 <Unit13> … … 169 168 <TopLine Value="120"/> 170 169 <CursorPos X="16" Y="131"/> 171 <UsageCount Value=" 9"/>170 <UsageCount Value="8"/> 172 171 </Unit13> 173 172 <Unit14> … … 176 175 <TopLine Value="26"/> 177 176 <CursorPos X="18" Y="28"/> 178 <UsageCount Value=" 9"/>177 <UsageCount Value="8"/> 179 178 </Unit14> 180 179 <Unit15> … … 183 182 <TopLine Value="65"/> 184 183 <CursorPos X="17" Y="67"/> 185 <UsageCount Value=" 9"/>184 <UsageCount Value="8"/> 186 185 </Unit15> 187 186 <Unit16> 188 187 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/lcl/include/control.inc"/> 189 <WindowIndex Value="0"/> 190 <TopLine Value="4280"/> 191 <CursorPos X="19" Y="4283"/> 192 <UsageCount Value="9"/> 188 <EditorIndex Value="1"/> 189 <WindowIndex Value="0"/> 190 <TopLine Value="2275"/> 191 <CursorPos X="1" Y="2287"/> 192 <UsageCount Value="13"/> 193 <Loaded Value="True"/> 193 194 </Unit16> 194 195 <Unit17> … … 197 198 <TopLine Value="6307"/> 198 199 <CursorPos X="17" Y="6320"/> 199 <UsageCount Value=" 9"/>200 <UsageCount Value="8"/> 200 201 </Unit17> 201 202 <Unit18> … … 205 206 <TopLine Value="13"/> 206 207 <CursorPos X="21" Y="26"/> 207 <UsageCount Value="1 3"/>208 <UsageCount Value="12"/> 208 209 </Unit18> 209 210 <Unit19> … … 213 214 <TopLine Value="1"/> 214 215 <CursorPos X="1" Y="1"/> 215 <UsageCount Value="1 3"/>216 <UsageCount Value="12"/> 216 217 </Unit19> 217 218 <Unit20> 218 219 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/packages/winunits-base/src/mmsystem.pp"/> 219 220 <UnitName Value="mmsystem"/> 220 <WindowIndex Value="0"/> 221 <TopLine Value="165"/> 222 <CursorPos X="10" Y="177"/> 223 <UsageCount Value="12"/> 221 <EditorIndex Value="3"/> 222 <WindowIndex Value="0"/> 223 <TopLine Value="882"/> 224 <CursorPos X="5" Y="765"/> 225 <UsageCount Value="15"/> 226 <Loaded Value="True"/> 224 227 </Unit20> 225 228 <Unit21> 226 229 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 227 230 <UnitName Value="UAudioSystemWindows"/> 228 <EditorIndex Value="1"/> 229 <WindowIndex Value="0"/> 230 <TopLine Value="13"/> 231 <CursorPos X="1" Y="46"/> 232 <UsageCount Value="22"/> 231 <IsVisibleTab Value="True"/> 232 <EditorIndex Value="2"/> 233 <WindowIndex Value="0"/> 234 <TopLine Value="117"/> 235 <CursorPos X="26" Y="137"/> 236 <UsageCount Value="25"/> 233 237 <Loaded Value="True"/> 234 238 </Unit21> 235 239 <Unit22> 236 240 <Filename Value="/usr/share/fpcsrc/2.4.2/rtl/objpas/sysutils/sysstrh.inc"/> 237 <EditorIndex Value="5"/>238 241 <WindowIndex Value="0"/> 239 242 <TopLine Value="159"/> 240 243 <CursorPos X="10" Y="176"/> 241 <UsageCount Value="10"/> 242 <Loaded Value="True"/> 244 <UsageCount Value="9"/> 243 245 </Unit22> 246 <Unit23> 247 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/objpas/sysutils/osutilsh.inc"/> 248 <EditorIndex Value="7"/> 249 <WindowIndex Value="0"/> 250 <TopLine Value="23"/> 251 <CursorPos X="10" Y="23"/> 252 <UsageCount Value="13"/> 253 <Loaded Value="True"/> 254 </Unit23> 244 255 </Units> 245 <JumpHistory Count="30" HistoryIndex="2 9">256 <JumpHistory Count="30" HistoryIndex="28"> 246 257 <Position1> 247 <Filename Value="../Systems/UAudioSystem .pas"/>248 <Caret Line=" 91" Column="25" TopLine="89"/>258 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 259 <Caret Line="170" Column="49" TopLine="158"/> 249 260 </Position1> 250 261 <Position2> 251 <Filename Value="../Systems/UAudioSystem .pas"/>252 <Caret Line=" 93" Column="25" TopLine="79"/>262 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 263 <Caret Line="162" Column="1" TopLine="158"/> 253 264 </Position2> 254 265 <Position3> 255 <Filename Value="../Systems/UAudioSystem .pas"/>256 <Caret Line=" 76" Column="1" TopLine="56"/>266 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 267 <Caret Line="85" Column="1" TopLine="73"/> 257 268 </Position3> 258 269 <Position4> 259 <Filename Value=" UMainForm.pas"/>260 <Caret Line=" 53" Column="33" TopLine="41"/>270 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 271 <Caret Line="86" Column="1" TopLine="73"/> 261 272 </Position4> 262 273 <Position5> 263 274 <Filename Value="../Systems/UAudioSystem.pas"/> 264 <Caret Line=" 76" Column="50" TopLine="64"/>275 <Caret Line="135" Column="1" TopLine="123"/> 265 276 </Position5> 266 277 <Position6> 267 <Filename Value=" UMainForm.pas"/>268 <Caret Line=" 55" Column="24" TopLine="42"/>278 <Filename Value="../Systems/UAudioSystem.pas"/> 279 <Caret Line="136" Column="1" TopLine="123"/> 269 280 </Position6> 270 281 <Position7> 271 <Filename Value=" UMainForm.pas"/>272 <Caret Line=" 99" Column="28" TopLine="85"/>282 <Filename Value="../Systems/UAudioSystem.pas"/> 283 <Caret Line="137" Column="1" TopLine="123"/> 273 284 </Position7> 274 285 <Position8> 275 <Filename Value=" UMainForm.pas"/>276 <Caret Line=" 100" Column="10" TopLine="85"/>286 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 287 <Caret Line="87" Column="1" TopLine="73"/> 277 288 </Position8> 278 289 <Position9> 279 <Filename Value=" UMainForm.pas"/>280 <Caret Line=" 97" Column="1" TopLine="86"/>290 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 291 <Caret Line="108" Column="1" TopLine="104"/> 281 292 </Position9> 282 293 <Position10> 283 <Filename Value=" UMainForm.pas"/>284 <Caret Line=" 98" Column="1" TopLine="86"/>294 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 295 <Caret Line="161" Column="1" TopLine="149"/> 285 296 </Position10> 286 297 <Position11> 287 <Filename Value="../Systems/UAudioSystem FMOD.pas"/>288 <Caret Line=" 59" Column="1" TopLine="47"/>298 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 299 <Caret Line="162" Column="1" TopLine="149"/> 289 300 </Position11> 290 301 <Position12> 291 <Filename Value="../Systems/UAudioSystem FMOD.pas"/>292 <Caret Line=" 64" Column="1" TopLine="47"/>302 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 303 <Caret Line="42" Column="56" TopLine="30"/> 293 304 </Position12> 294 305 <Position13> 295 <Filename Value="../Systems/UAudioSystem FMOD.pas"/>296 <Caret Line=" 60" Column="1" TopLine="47"/>306 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 307 <Caret Line="134" Column="29" TopLine="116"/> 297 308 </Position13> 298 309 <Position14> 299 <Filename Value="../Systems/UAudioSystem FMOD.pas"/>300 <Caret Line=" 61" Column="1" TopLine="47"/>310 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 311 <Caret Line="112" Column="76" TopLine="100"/> 301 312 </Position14> 302 313 <Position15> 303 <Filename Value="../Systems/UAudioSystem .pas"/>304 <Caret Line=" 66" Column="5" TopLine="54"/>314 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 315 <Caret Line="113" Column="15" TopLine="101"/> 305 316 </Position15> 306 317 <Position16> 307 <Filename Value="../Systems/UAudioSystem .pas"/>308 <Caret Line=" 1" Column="1" TopLine="1"/>318 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 319 <Caret Line="46" Column="28" TopLine="34"/> 309 320 </Position16> 310 321 <Position17> 311 <Filename Value="../ UCoolAudio.pas"/>312 <Caret Line=" 39" Column="30" TopLine="13"/>322 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 323 <Caret Line="134" Column="47" TopLine="122"/> 313 324 </Position17> 314 325 <Position18> 315 <Filename Value=" UMainForm.pas"/>316 <Caret Line=" 57" Column="85" TopLine="43"/>326 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 327 <Caret Line="43" Column="45" TopLine="30"/> 317 328 </Position18> 318 329 <Position19> 319 <Filename Value="../Systems/UAudioSystem MPlayer.pas"/>320 <Caret Line="1 32" Column="30" TopLine="121"/>330 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 331 <Caret Line="146" Column="3" TopLine="140"/> 321 332 </Position19> 322 333 <Position20> 323 <Filename Value="../Systems/UAudioSystem MPlayer.pas"/>324 <Caret Line=" 42" Column="14" TopLine="25"/>334 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 335 <Caret Line="121" Column="1" TopLine="117"/> 325 336 </Position20> 326 337 <Position21> 327 <Filename Value="../Systems/UAudioSystem MPlayer.pas"/>328 <Caret Line=" 74" Column="17" TopLine="49"/>338 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 339 <Caret Line="122" Column="1" TopLine="117"/> 329 340 </Position21> 330 341 <Position22> 331 <Filename Value=" UMainForm.pas"/>332 <Caret Line=" 31" Column="50" TopLine="1"/>342 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 343 <Caret Line="123" Column="1" TopLine="117"/> 333 344 </Position22> 334 345 <Position23> 335 <Filename Value=" UMainForm.pas"/>336 <Caret Line="1 08" Column="1" TopLine="84"/>346 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 347 <Caret Line="128" Column="1" TopLine="117"/> 337 348 </Position23> 338 349 <Position24> 339 <Filename Value="../Systems/UAudioSystem MPlayer.pas"/>340 <Caret Line=" 271" Column="1" TopLine="254"/>350 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 351 <Caret Line="129" Column="1" TopLine="117"/> 341 352 </Position24> 342 353 <Position25> 343 <Filename Value="../Systems/UAudioSystem MPlayer.pas"/>344 <Caret Line=" 272" Column="1" TopLine="254"/>354 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 355 <Caret Line="134" Column="1" TopLine="117"/> 345 356 </Position25> 346 357 <Position26> 347 <Filename Value="../Systems/UAudioSystem MPlayer.pas"/>348 <Caret Line=" 273" Column="1" TopLine="254"/>358 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 359 <Caret Line="135" Column="1" TopLine="117"/> 349 360 </Position26> 350 361 <Position27> 351 <Filename Value="../Systems/UAudioSystem MPlayer.pas"/>352 <Caret Line=" 276" Column="1" TopLine="254"/>362 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 363 <Caret Line="136" Column="1" TopLine="117"/> 353 364 </Position27> 354 365 <Position28> 355 <Filename Value=" UMainForm.pas"/>356 <Caret Line="1 02" Column="17" TopLine="84"/>366 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 367 <Caret Line="138" Column="1" TopLine="118"/> 357 368 </Position28> 358 369 <Position29> 359 <Filename Value=" UMainForm.pas"/>360 <Caret Line=" 94" Column="52" TopLine="84"/>370 <Filename Value="../Systems/UAudioSystemWindows.pas"/> 371 <Caret Line="134" Column="28" TopLine="117"/> 361 372 </Position29> 362 373 <Position30> 363 <Filename Value=" UMainForm.pas"/>364 <Caret Line="7 4" Column="29" TopLine="68"/>374 <Filename Value="../../../../Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/packages/winunits-base/src/mmsystem.pp"/> 375 <Caret Line="765" Column="5" TopLine="882"/> 365 376 </Position30> 366 377 </JumpHistory> … … 378 389 <Debugging> 379 390 <GenerateDebugInfo Value="True"/> 380 <DebugInfoType Value="dsStabs"/>381 391 </Debugging> 382 392 <Options> -
CoolAudio/Demo/Demo.lpr
r279 r280 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UMainForm , USystem;10 Forms, UMainForm; 11 11 12 12 {$R *.res} -
CoolAudio/Demo/UMainForm.lfm
r279 r280 69 69 object ComboBox1: TComboBox 70 70 Left = 80 71 Height = 2 571 Height = 21 72 72 Top = 46 73 73 Width = 128 74 ItemHeight = 074 ItemHeight = 13 75 75 OnChange = ComboBox1Change 76 76 Style = csDropDownList … … 81 81 Height = 14 82 82 Top = 46 83 Width = 5283 Width = 45 84 84 Caption = 'Backend:' 85 85 ParentColor = False … … 89 89 Height = 14 90 90 Top = 152 91 Width = 4 891 Width = 42 92 92 Caption = 'Position:' 93 93 ParentColor = False -
CoolAudio/Demo/UMainForm.pas
r279 r280 54 54 begin 55 55 AudioSystemManager.FillStringList(ComboBox1.Items); 56 AudioSystem := TAudioSystemMPlayer.Create; 57 TAudioSystemMPlayer(AudioSystem).Path := 'c:\Program Files\SMPlayer\mplayer\mplayer.exe'; 58 TAudioSystemMPlayer(AudioSystem).Path := TAudioSystemMPlayer(AudioSystem).FindPath; 59 Player := TPlayerMPlayer.Create; 60 Player.AudioSystem := AudioSystem; 56 if ComboBox1.Items.Count > 0 then 57 ComboBox1.ItemIndex := 0; 58 ComboBox1Change(Self); 61 59 end; 62 60 63 61 procedure TMainForm.FormDestroy(Sender: TObject); 64 62 begin 65 Player.Free;66 AudioSystem.Free;63 FreeAndNil(Player); 64 FreeAndNil(AudioSystem); 67 65 end; 68 66 69 67 procedure TMainForm.TimerPlaybackTimer(Sender: TObject); 70 68 begin 71 if Player.Playing then begin69 if Assigned(Player) and Player.Playing then begin 72 70 TrackBar1.OnChange := nil; 73 71 TrackBar1.Position := Trunc(Player.Position / Player.Length * TrackBar1.Max); … … 96 94 procedure TMainForm.ComboBox1Change(Sender: TObject); 97 95 begin 98 Player.Free;99 AudioSystem.Free;96 FreeAndNil(Player); 97 FreeAndNil(AudioSystem); 100 98 if ComboBox1.ItemIndex <> - 1 then begin 101 99 with TAudioSystemManagerItem(ComboBox1.Items.Objects[ComboBox1.ItemIndex]) do begin … … 103 101 Player := PlayerClass.Create; 104 102 Player.AudioSystem := AudioSystem; 103 //Player.Active := True; 105 104 end; 106 105 end;
Note:
See TracChangeset
for help on using the changeset viewer.