[Gambas-user] gb3: gb.sdl.sound: How to adjust the volume of a sound being played

Kevin Fishburne kevinfishburne at ...1887...
Sat Jul 16 08:26:49 CEST 2011


I have some code:

' General declarations.
Public Ocean As Sound = New Sound(GUI.basepath & "/sound/Ocean.wav")
Public SeawashHeavy As Sound = New Sound(GUI.basepath & "/sound/Seawash, 
Heavy.wav")
Public Lake As Sound = New Sound(GUI.basepath & "/sound/Lake.wav")
Public SeawashMedium As Sound = New Sound(GUI.basepath & 
"/sound/Seawash, Medium.wav")
Public River As Sound = New Sound(GUI.basepath & "/sound/River.wav")
Public SeawashLight As Sound = New Sound(GUI.basepath & "/sound/Seawash, 
Light.wav")

Public Sub Initialize()

   ' Start basic environmental sound effects.

   ' Start water effects.
   Channels.Count = 32
   Channels.Volume = 0
   Ocean.Play(-1)

End

How do I adjust the volume of any of the sounds? I've read the docs 
which say that Channel is a class but other than that they are as 
spartan as a pine box. I've tried some random combinations and exposing 
the methods, etc., just by typing, but am getting nowhere. Thanks as always.

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271





More information about the User mailing list