Wednesday, 20 November 2013

How to set the master volume and individual channel volume in corona SDK




This tutorial will help you to change/adjust the volume of the music playing in your corona SDK application.

  • To set the master volume, you can simply call the following line:

  audio.setVolume( 0.5 )

This will setup the master volume to half. The value range from 0.0 (min.) to 1.0 (max.).


  • And, if you need to set the volume of an individual music channel, then you can use the following:
  audio.setVolume( 0.75, { channel=1 } ) 
This will control the volume of channel 1 (here, it will make the channel 1 volume to 3/4th of the default/full volume).

No comments:

Post a Comment