Author Topic: Global volume command  (Read 6413 times)

Offline FutureCow

  • HelpEditor
  • Prof. Inline
  • ******
  • Posts: 680
    • View Profile
Global volume command
« on: 2008-Dec-16 »
Sorry if this exists and I have missed it, but I'd like to have a global volume sound that adjusts the volume of all loaded sounds automatically.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10859
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Global volume command
« Reply #1 on: 2008-Dec-16 »
Code: (glbasic) [Select]

GLOBAL gVol = 1.0


...
SoundVolume = 0.7
PLAYSOUND(mysound, pan, gVol * SoundVolume);

...
I do it this way.