PDA

View Full Version : Controling Volume Settings at Run Time


Desmond
10-03-2003, 02:08 PM
<HTML> <HEAD> <TITLE>AutoPlay Media Studio 5.0 Knowledge Base</TITLE> </HEAD> <BODY> <h3>Controlling Volume Settings at Run Time</h3> <b>Document ID: IR10084</b> <hr> The information in this article applies to: <ul> <li>AutoPlay Media Studio 5.0 Standard Edition</li> <li>AutoPlay Media Studio 5.0 Professional Edition</li> </ul> <hr> <h3>SUMMARY</h3> <p>This article describes how to control the volume at runtime.</p> <h3>DISCUSSION</h3> <p> As an example, we will create a project with two buttons: a volume increase button, and a volume decrease button.<br> <br> Insert the following code into the On Click event of the volume increase button:<br> <br> <code>audio_channel = CHANNEL_USER1;<br> Audio.SetVolume(audio_channel, Audio.GetVolume(audio_channel)+20);<br></code> <br> Insert the following code into the On Click event of the volume decrease button:<br> <br> <code>audio_channel = CHANNEL_USER1;<br> Audio.SetVolume(audio_channel, Audio.GetVolume(audio_channel)-20);</code> </p> <h3>MORE INFORMATION</h3> <p>For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:</p> <ul> <li><b>Program Reference | Actions | Audio | Audio.GetVolume</b></li> <li><b>Program Reference | Actions | Audio | Audio.SetVolume</b></li> </ul> <p>KEYWORDS: AutoPlay Media Studio 5.0, Audio, Volume, Runtime, Up, Down </p> <hr> <FONT SIZE=1> Last reviewed: October 3, 2003<br> Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br> </FONT> </BODY> </HTML>