Author Topic: Volume change for sound  (Read 2706 times)

Offline aonyn

  • Mr. Polyvector
  • ***
  • Posts: 136
    • View Profile
Volume change for sound
« 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
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. -Ephesians 2:8-9

Offline Quentin

  • Prof. Inline
  • *****
  • Posts: 915
    • View Profile
Re: Volume change for sound
« Reply #1 on: 2010-Aug-21 »
not for PLAYSOUND. You can use PLAYMUSIC and MUSICVOLUME instead (see example in the help for MUSICVOLUME)

Offline aonyn

  • Mr. Polyvector
  • ***
  • Posts: 136
    • View Profile
Re: Volume change for sound
« Reply #2 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
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. -Ephesians 2:8-9

Offline aonyn

  • Mr. Polyvector
  • ***
  • Posts: 136
    • View Profile
Re: Volume change for sound
« Reply #3 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
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. -Ephesians 2:8-9

Offline Quentin

  • Prof. Inline
  • *****
  • Posts: 915
    • View Profile
Re: Volume change for sound
« Reply #4 on: 2010-Aug-22 »
too bad, perhaps you can use Schranzors FMOD wrapper

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

or trucidare's GLBMusic

http://www.glbasic.com/forum/index.php?topic=4169.0

Offline aonyn

  • Mr. Polyvector
  • ***
  • Posts: 136
    • View Profile
Re: Volume change for sound
« Reply #5 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
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. -Ephesians 2:8-9