Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Audio and Video
»
BASS not clearing Channel
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Parsing error?
by
jlinux
[
Today
at 02:45:35 am]
Freepascal
by
schuler
[July 14, 2026, 11:56:28 pm]
Isn’t this funny?
by
Joanna
[July 14, 2026, 11:48:50 pm]
Conscious Artificial Inte...
by
schuler
[July 14, 2026, 11:40:27 pm]
Need help with fphttpserv...
by
jamie
[July 14, 2026, 11:38:24 pm]
Lazarus Bugfix Release 4....
by
Martin_fr
[July 14, 2026, 10:55:23 pm]
equivalent to C/C++ "offs...
by
Thaddy
[July 14, 2026, 07:37:23 pm]
Many recent books on Laza...
by
Thaddy
[July 14, 2026, 06:40:46 pm]
LazSWatch - a serial port...
by
CM630
[July 14, 2026, 06:11:52 pm]
MarcoV, please contact. ...
by
jbthiel
[July 14, 2026, 05:35:26 pm]
lazbuild vs IDE: PPU chec...
by
Martin_fr
[July 14, 2026, 05:30:50 pm]
OpenDocument('Filename') ...
by
cdbc
[July 14, 2026, 12:45:35 pm]
TCollection wiki entry
by
Thaddy
[July 14, 2026, 10:56:03 am]
Install new .deb over exi...
by
Thaddy
[July 14, 2026, 07:16:45 am]
I have made some progress...
by
egsuh
[July 14, 2026, 05:36:50 am]
Lazarus Main not building...
by
dbannon
[July 14, 2026, 03:01:32 am]
Lazarus interface to Rexx...
by
mdlueck
[July 13, 2026, 09:52:18 pm]
WASM import error
by
lebao3105
[July 13, 2026, 05:51:47 pm]
Discipline your AI coding...
by
Weiss
[July 13, 2026, 04:37:42 pm]
Hello. I'm new to this co...
by
zeljko
[July 13, 2026, 02:17:38 pm]
weird error message
by
cdbc
[July 13, 2026, 12:23:13 pm]
TTL Record Count, i.e. a ...
by
Zvoni
[July 13, 2026, 09:10:08 am]
Printing on HP Smart Tank
by
Thaddy
[July 13, 2026, 07:10:37 am]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[July 13, 2026, 06:38:27 am]
MVP made easier.
by
cdbc
[July 13, 2026, 06:18:24 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: BASS not clearing Channel (Read 1918 times)
QEnnay
Full Member
Posts: 132
BASS not clearing Channel
«
on:
May 23, 2020, 04:57:44 pm »
Hi, I am getting multiple tracks playing at once. The OnBtnPlayClick and OnBtnStopClick events have this in them in part.
Code: Pascal
[Select]
[+]
[-]
// PLAY
if
(
Channel <>
0
)
then
btnTrackStopClick
(
btnTrackStop
)
;
Channel
:
=
BASS_StreamCreateFile
(
False
,
// memory
PChar
(
strTrack
)
,
// file
0
,
// offset
0
,
// length
0
// flags
)
;
if
(
Channel
=
0
)
then
begin
ShowMessage
(
'Error Loading File'
)
;
end
else
begin
BASS_ChannelPlay
(
Channel
,
False
)
;
Code: Pascal
[Select]
[+]
[-]
// STOP
var
bTemp
:
Boolean
;
begin
Timer1
.
Enabled
:
=
False
;
bTemp
:
=
BASS_ChannelStop
(
Channel
)
;
bTemp
:
=
BASS_StreamFree
(
Channel
)
;
But after that both times the "bTemp" equals "True" and "Channel" is still a very large int-number.
Can I just add "Channel:=0;" at the end or is that tempting memory leaks etc?
Thanks for looking.
Logged
Linux-Mint 22.2 x64 + Cinnamon; i7, 32GB memory
Lazarus 4.4-64bit
QEnnay
Full Member
Posts: 132
Re: BASS not clearing Channel
«
Reply #1 on:
May 23, 2020, 05:40:21 pm »
OK, it seems to be a BASS thing. I loaded the Delphi example "Basstest" and loaded 2 .WAV files into the listbox.
I clicked the first .WAV and Play.
I immediately clicked the second .WAV and Play again.
Voilà, double the fun.
Logged
Linux-Mint 22.2 x64 + Cinnamon; i7, 32GB memory
Lazarus 4.4-64bit
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Audio and Video
»
BASS not clearing Channel
TinyPortal
© 2005-2018