PauseChannel and StopChannel do not work :c

Blitz3D Forums/Blitz3D Beginners Area/PauseChannel and StopChannel do not work :c

Kippykip(Posted 2013) [#1]
I must be doing something wrong, but when I want a certain song to stop (so both songs don't overlap) the game just crashes so i've always used freesound but now I just need it to stop so I can play it later without reloading it

"Memory access violation"

help please :)


Kippykip(Posted 2013) [#2]
Here is the image


I'm using the 'Mr stickman doesn't like spam" file because I haven't made the game version yet


Kippykip(Posted 2013) [#3]
Nevermind...
found out your meant to assign it like this
professorChannel=PlaySound(professor)
stopChannel(professorChannel)

Why would they do that :c


Kryzon(Posted 2013) [#4]
'Professor' is a handle to the sound data in memory.
You can't "stop" sound data. You can PlaySound it, or FreeSound it.

When you PlaySound sound data you get the handle of the channel responsible for it that you can use with StopChannel, PauseChannel, ChannelPitch\Pan\Volume and ChannelPlaying.

If you want a global change to sound settings, use the SoundVolume\Pan\Pitch functions.