Skip to content

Commit

Permalink
Changed all "loop" parameters from Number to int for better compalibi…
Browse files Browse the repository at this point in the history
…lity with the Sound class and int.MAX_VALUE.
  • Loading branch information
Benjamin Bojko committed Jun 14, 2010
1 parent 8c68ebd commit 8ee0734
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions com/bigspaceship/audio/AudioManager.as
Expand Up @@ -160,7 +160,7 @@ package com.bigspaceship.audio{
* @param $restart Boolean to specify if sounds needs to restart if it's already playing.
*
*/
public function playSound($id:String, $loops:Number = 1, $vol:Number = 1, $restart:Boolean = false):void{
public function playSound($id:String, $loops:int = 1, $vol:Number = 1, $restart:Boolean = false):void{
//_startMusic($id);
if(!_mute){
if(_getSoundInstance($id)){
Expand Down Expand Up @@ -191,7 +191,7 @@ package com.bigspaceship.audio{
*
* @return SoundChannel
*/
public function playEffectSound($id:String, $killSameEffectSoundfirst:Boolean = false, $loops:Number = 1, $vol:Number = 1, $panning:Number=0):SoundChannel{
public function playEffectSound($id:String, $killSameEffectSoundfirst:Boolean = false, $loops:int = 1, $vol:Number = 1, $panning:Number=0):SoundChannel{
if(!_mute){
if(_effectsChannels[$id] && $killSameEffectSoundfirst){
SoundChannel(_effectsChannels[$id]).stop();
Expand Down Expand Up @@ -219,7 +219,7 @@ package com.bigspaceship.audio{
*
* @return SoundChannel
*/
public function playRandomEffectSound($set:Array, $nonStandard:int = 2, $vol:Number = 1, $loops:Number = 1):SoundChannel{
public function playRandomEffectSound($set:Array, $nonStandard:int = 2, $vol:Number = 1, $loops:int = 1):SoundChannel{
if(!_mute){
var random:int = int(Math.random()*($set.length-$nonStandard));
var id:String = $set[random];
Expand All @@ -243,7 +243,7 @@ package com.bigspaceship.audio{
* @return SoundChannel
*
*/
public function playSequencedEffectSound($id:String, $range:int, $vol:Number = 1, $loops:Number = 1):SoundChannel{
public function playSequencedEffectSound($id:String, $range:int, $vol:Number = 1, $loops:int = 1):SoundChannel{
if(!_mute){
if(_sequenceDic[$id]!=null){
_sequenceDic[$id] = _sequenceDic[$id] + 1;
Expand Down

0 comments on commit 8ee0734

Please sign in to comment.