Setting volume to 0 on a certain channel should not stop ever repeating audio being played on that channel
-
When you start playing for example music on a certain channel in an endless loop (by specifying -1 for loops) at say channel 0 and then doing
setvolume(0,0)
waiting a bit and then doingsetvolume(0,1)
it seems the endless looping music has stopped and you have to manually start playing it again with playaudio. I think setting volume to zero (0) should not stop endless playing audio onlystopChannel
should do that. This little bug makes it a bit more difficult to implement music volume controls as you can't just do set volume to 0 (to temporary mute the channel) and then 1 again or so to start hearing the music again without manually restarting the music -
@joyrider3774 does it do the same with set envelope haven't tested that yet myself
-
@waldron doing setenvelope and after a while (when volume has reached 0) calling setvolume(0,1) does not make audio play again so i would guess setenvelope has indeed the same problem. Doing setenvelope(0,10) waiting a bit doing setenvelope(0,0) and then setvolume(0,1) the audio seemed to have stopped as well. But i'm not sure how to use setenvelope. I think you need to call it with (0,0) otherwise anything played on same channel automatically startings going to 0 volume again.but i also tested with just setvolume(0,1) and audio did not play anymore
I tested quickly using this program:
about setvolume, setting it 0.1 and then 1 again does work. So the audio is clearly being stopped when volume becomes 0
-
i did find a workaround ... by calling setvolume(0,0.0001) audio is not audible either (at least on my speakers) but will keep playing and doing setvolume(0,1) makes it audible again.
however this is a bit of a hack as what i did in my program was have volume controls in increments in percenages with increments of 10 so i'd still have to write the workaround when it's at 0% (if condition to setvolume to 0.0001 instead 0 ) but at least that does seem to work as a workaround
-
hmm PlayAudio has the same the problem. If you set volume to 0 in playaudio and then call setvolume(0,1) later its not being played anymore either.
this does not work either
It seems everywhere in fuze a volume of 0 is considered the same as do not play audio (anymore) or stop playing audio. To me this is not the same an audio file can perfectly play / start with a volume of 0 and later the volume can be increased or changed on that channel to make it audible.
The same workaround as before does work here also