Created
July 14, 2011 08:44
-
-
Save Matan/1082115 to your computer and use it in GitHub Desktop.
Revisions
-
Matan Uberstein revised this gist
Jul 14, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ package // LL: 1 LR: 1 RR: 1 RL: 1 (Correct) trace("LL: " + transform.leftToLeft + " LR: " + transform.leftToRight + " RR: " + transform.rightToRight + " RL: " + transform.rightToLeft); // Pan halfway to left and retain mono transform.pan = -.5; channel.soundTransform = transform; -
Matan Uberstein created this gist
Jul 14, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ package { import flash.media.SoundTransform; import flash.media.SoundChannel; import flash.net.URLRequest; import flash.media.Sound; import flash.display.Sprite; /** * @author Matan Uberstein */ public class SndTest extends Sprite { public function SndTest() { var snd : Sound = new Sound(new URLRequest("AquoVisit-Chopped.mp3")); var channel : SoundChannel = snd.play(); var transform : SoundTransform = channel.soundTransform; // LL: 1 LR: 0 RR: 1 RL: 0 (Correct) trace("LL: " + transform.leftToLeft + " LR: " + transform.leftToRight + " RR: " + transform.rightToRight + " RL: " + transform.rightToLeft); // This should make the sound mono transform.leftToRight = 1; transform.rightToLeft = 1; channel.soundTransform = transform; // LL: 1 LR: 1 RR: 1 RL: 1 (Correct) trace("LL: " + transform.leftToLeft + " LR: " + transform.leftToRight + " RR: " + transform.rightToRight + " RL: " + transform.rightToLeft); // Half the volume and should retain mono transform.volume = .5; channel.soundTransform = transform; // LL: 1 LR: 1 RR: 1 RL: 1 (Correct) trace("LL: " + transform.leftToLeft + " LR: " + transform.leftToRight + " RR: " + transform.rightToRight + " RL: " + transform.rightToLeft); // Pan to halfway to left and retain mono transform.pan = -.5; channel.soundTransform = transform; // LL: 1.224744871391589 LR: 0 RR: 0.7071067811865476 RL: 0 (Wrong) trace("LL: " + transform.leftToLeft + " LR: " + transform.leftToRight + " RR: " + transform.rightToRight + " RL: " + transform.rightToLeft); } } }