SoundVolume.htm 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>SoundVolume sound_variable,volume#</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. sound_variable = any valid sound variable previously created with the LoadSound command. <br />
  13. volume# = floating point number from 0 (silence) to 1 (full volume)
  14. </td>
  15. </tr>
  16. </table>
  17. <h1>Description</h1>
  18. <table>
  19. <tr>
  20. <td>
  21. Alter the playback volume of your sound effect with this command. This command uses a floating point number from 0 to 1 to control the volume level. <br />
  22. <br />
  23. Please see ChannelVolume for more options!
  24. </td>
  25. </tr>
  26. </table>
  27. <h1><a href=../2d_examples/SoundVolume.bb>Example</a></h1>
  28. <table>
  29. <tr>
  30. <td>
  31. ; Load sound sample <br />
  32. sndDeath=LoadSound("audiodeath.wav") <br />
  33. <br />
  34. ; Change volume level to half <br />
  35. SoundVolume sndDeath,.5 <br />
  36. <br />
  37. ; Play sound <br />
  38. PlaySound sndDeath <br />
  39. </td>
  40. </tr>
  41. </table>
  42. <br>
  43. <a target=_top href=../index.htm>Index</a><br>
  44. <br>
  45. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=SoundVolume&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  46. </html>