MixSoundFactory

Kind of class:public class
Package:com.bourre.media.sound
Inherits from:SoundFactory
Classpath:com.bourre.media.sound.MixSoundFactory
File last modified:Monday, 24 November 2008, 11:36:46

Summary


Constructor
Instance methods
  • getVolume : Number
    • Get Master Volume ( 0 to 1 ).
  • setVolume (n:Number) : void
    • Set Master Volume ( 0 to 1 ).
  • addSound (id:String) : void
  • addSounds (a:Array) : void
  • getGain (id:String) : Number
    • Get gain : volume for a sound ( 0 to n ).
  • setGain (id:String, n:Number) : void
    • Set gain : volume for a sound ( 0 to n ).
  • setAllGain (n:Number) : void
    • Set the same gain for all sounds ( 0 to n ).
  • getPan (id:String) : Number
    • Get Pan of a sound ( -1 to 1 ).
  • setPan (id:String, n:Number) : void
    • Set Pan of a sound ( -1 to 1 ).
  • setAllPan (n:Number) : void
    • Set the same pan for all sounds ( -1 to 1 ).

Constructor

MixSoundFactory

public function MixSoundFactory (
)

Instance methods

addSound

override public function addSound (
id:String) : void

See also:
  • addSounds
  • com.bourre.media.sound.SoundFactory.addSound()
Throws:
  • com.bourre.error.IllegalArgumentException if sound's class identifier is already use.
    #
  • com.bourre.error.ClassCastException if sound's class not found in specified SoundFactory application domain.
    #

addSounds

override public function addSounds (
a:Array) : void

See also:
  • addSound
  • com.bourre.media.sound.SoundFactory.addSounds()
Throws:
  • com.bourre.error.IllegalArgumentException if sound's class identifier is already use.
    #
  • com.bourre.error.ClassCastException if sound's class not found in specified SoundFactory application domain.
    #

getGain

public function getGain (
id:String) : Number

Get gain : volume for a sound ( 0 to n ). By default all sounds gain is set to 1 ( equals to 100% ).
Parameters:
sound's:
class identifier in the library
See also:

getPan

public function getPan (
id:String) : Number

Get Pan of a sound ( -1 to 1 ). By default all sounds pan is set 0 .
Parameters:
sound's:
class identifier in the library
See also:

getVolume

public function getVolume (
) : Number

Get Master Volume ( 0 to 1 ). By default master volume is set to 1.
See also:

setAllGain

public function setAllGain (
n:Number) : void

Set the same gain for all sounds ( 0 to n ). By default all sounds gain is set to 1 ( equals to 100% ).
Parameters:
a:
number between 0 and n for all sound volume
See also:

setAllPan

public function setAllPan (
n:Number) : void

Set the same pan for all sounds ( -1 to 1 ). By default all sounds pan is 0.
Parameters:
a:
number between -1 and 1 for its volume ( 0 is the center )
See also:

setGain

public function setGain (
id:String, n:Number) : void

Set gain : volume for a sound ( 0 to n ). By default all sounds gain is set to 1( equals to 100% ).
Parameters:
sound's:
class identifier in the library
a :
number between 0 and n for this sound volume
See also:

setPan

public function setPan (
id:String, n:Number) : void

Set Pan of a sound ( -1 to 1 ). By default all sounds pan is set to 0.
Parameters:
sound's:
class identifier in the library
a :
number between -1 and 1 for its volume ( 0 is the center )
See also:

setVolume

public function setVolume (
n:Number) : void

Set Master Volume ( 0 to 1 ). By default master volume is set to 1.
Parameters:
0:
to 1
See also: