Search code examples
actionscript-3audioairadobevolume

Is it possible to monitor or change the system audio volume in Adobe AIR?


I am making a game in AS3 / Adobe AIR that requires the user to react to certain sounds. Is there a way to inform the user up front if the system volume is muted? Moreover, is there a method to change the volume? If not, does an external cross-platform application exist that lets me monitor the volume and that I can call from Adobe AIR?


Solution

  • The only access you may have to sound volum is restricted to the application (Flash player or AIR). You can change it with SoundMixer.soundTransform.volume for the general volume or SoundChannel.soundTransform.volume for a specific sound.

    To summerize, you can't access the OS sound manager's settings or state with Flash. That's why many flash websites start with a message asking the users to switch their speakers on.