GLBasic forum

Main forum => GLBasic - en => Topic started by: aonyn on 2010-Aug-21

Title: Volume change for sound
Post by: aonyn on 2010-Aug-21
Hi all,

Is there a way to change the volume of a sound, while the sound is already playing, or is it only possible to set the volume when the sound is initiated?
If it is possible, it would be very useful in my current project, so any help is very appreciated.

Thanks in advance,
Dave
Title: Re: Volume change for sound
Post by: Quentin on 2010-Aug-21
not for PLAYSOUND. You can use PLAYMUSIC and MUSICVOLUME instead (see example in the help for MUSICVOLUME)
Title: Re: Volume change for sound
Post by: aonyn on 2010-Aug-22
OK, Thanks for the reply Quentin.

I will try that, although I am not hopeful that it will work for me in this instance unfortunately.
Unless I can play multiple musics simulaneously. Keeping fingers crossed as I go back to experimenting  :)

regards,
Dave
Title: Re: Volume change for sound
Post by: aonyn on 2010-Aug-22
OK, I tried, and as I suspected, it only seems to play one sound file at a time.
Thanks for the information anyway, I will find some way to do what I need.

Regards,
Dave
Title: Re: Volume change for sound
Post by: Quentin on 2010-Aug-22
too bad, perhaps you can use Schranzors FMOD wrapper

http://www.glbasic.com/forum/index.php?topic=2248.0 (http://www.glbasic.com/forum/index.php?topic=2248.0)

or trucidare's GLBMusic

http://www.glbasic.com/forum/index.php?topic=4169.0 (http://www.glbasic.com/forum/index.php?topic=4169.0)
Title: Re: Volume change for sound
Post by: aonyn on 2010-Aug-22
Thanks again Quentin for this advice  :),

I will try both of these, and will post back with my results.

regards,
Dave