On 07/16/2011 02:26 AM, Kevin Fishburne wrote: > 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
Funny how I keep replying to myself. I can only hope someone else reads these and all their questions are answered. After a process similar to beating my head against a brick wall until blood starts seeping from my ears, I found that this code works fine (knock on wood): ' Gambas module file ' Audio module ' General declarations. Public sOcean As Sound = New Sound(GUI.basepath & "/sound/Ocean.wav") Public cOcean As Channel Public sSeawashHeavy As Sound = New Sound(GUI.basepath & "/sound/Seawash, Heavy.wav") Public cSeawashHeavy As Channel Public sLake As Sound = New Sound(GUI.basepath & "/sound/Lake.wav") Public cLake As Channel Public sSeawashMedium As Sound = New Sound(GUI.basepath & "/sound/Seawash, Medium.wav") Public cSeawashMedium As Channel Public sRiver As Sound = New Sound(GUI.basepath & "/sound/River.wav") Public cRiver As Channel Public sSeawashLight As Sound = New Sound(GUI.basepath & "/sound/Seawash, Light.wav") Public cSeawashLight As Channel Public Sub Initialize() ' Start basic environmental sound effects. ' Start water effects. cOcean = sOcean.Play(-1) cOcean.Volume = 0 cSeawashHeavy = sSeawashHeavy.Play(-1) cSeawashHeavy.Volume = 0 cLake = sLake.Play(-1) cLake.Volume = 0 cSeawashMedium = sSeawashMedium.Play(-1) cSeawashMedium.Volume = 0 cRiver = sRiver.Play(-1) cRiver.Volume = 0 cSeawashLight = sSeawashLight.Play(-1) cSeawashLight.Volume = 0 End That was done through sheer trial and error, sadly. +1 for heads on bricks! -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@eightvirtues.com phone: (770) 853-6271 ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user