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
TLazSerial : serial port ...
by
CM630
[
Today
at 07:55:15 am]
Recompiled IDE with LCLRe...
by
AlexTP
[
Today
at 05:09:56 am]
Hashing pointers by using...
by
ALLIGATOR
[
Today
at 04:41:23 am]
exception external SIGSEG...
by
billjtx
[
Today
at 01:06:50 am]
Commerce website written ...
by
Joanna
[
Today
at 01:00:28 am]
So many "newbies"
by
Curt Carpenter
[
Today
at 12:40:11 am]
TaurusTLS 1.0.0.25 beta 2...
by
LeP
[December 12, 2025, 09:21:31 pm]
Single / Double / Float s...
by
tetrastes
[December 12, 2025, 09:10:39 pm]
Publish a LAMW app in F-d...
by
spacepascal
[December 12, 2025, 09:00:41 pm]
OS/2 Warp 4 problem with ...
by
PascalDragon
[December 12, 2025, 08:30:23 pm]
Introducing PasBuild 1.0....
by
PascalDragon
[December 12, 2025, 08:20:32 pm]
Convert string with Key-V...
by
Bart
[December 12, 2025, 07:28:04 pm]
The TChromeTabs component...
by
1-berto
[December 12, 2025, 07:02:28 pm]
Military Grade Directives
by
Warfley
[December 12, 2025, 05:44:12 pm]
connecting to mariadb
by
marcov
[December 12, 2025, 04:13:37 pm]
TIBDataSet "Closing"? on ...
by
RedOctober
[December 12, 2025, 03:09:07 pm]
How can I make a safe app...
by
marcov
[December 12, 2025, 02:58:10 pm]
fpsockets error: 10047
by
Warfley
[December 12, 2025, 01:32:51 pm]
FPC 3.2.4-rc1 available
by
marcov
[December 12, 2025, 10:47:38 am]
[SOLVED] Lazreport. Multi...
by
Petrus Vorster
[December 12, 2025, 09:27:32 am]
Has anyone installed TeeB...
by
egsuh
[December 12, 2025, 06:34:29 am]
[SOLVED] Program compiles...
by
Schmitty2005
[December 11, 2025, 07:35:39 pm]
[SOLVED] Need help conver...
by
srvaldez
[December 11, 2025, 01:52:33 pm]
SpkToolbar custom update
by
wp
[December 11, 2025, 01:48:16 pm]
Is FPGUI still active?
by
BSaidus
[December 11, 2025, 01:25:31 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: BASS not clearing Channel (Read 1811 times)
QEnnay
Full Member
Posts: 129
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 20.1 x64 + Cinnamon; Lenovo Flex 5 Ryzen 5 4500, 16GB memory
FPC: 3.2.0-1, Lazarus 2.0.12-0, all 64bit
QEnnay
Full Member
Posts: 129
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 20.1 x64 + Cinnamon; Lenovo Flex 5 Ryzen 5 4500, 16GB memory
FPC: 3.2.0-1, Lazarus 2.0.12-0, all 64bit
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Audio and Video
»
BASS not clearing Channel
TinyPortal
© 2005-2018