sevengo8378 / as3wavsound

Automatically exported from code.google.com/p/as3wavsound
Other
0 stars 0 forks source link

No leftPeak or rightPeak info from SoundChannel #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I have a ByteArray of sound data captured from the microphone called 
"soundBytes".
var snd:Sound =  new WavSound(soundBytes);
var mySoundChannel = new SoundChannel();
var mySoundTransform = new SoundTransform;
var playbackTimer:Timer;

private function doPlay():void
{
    mySoundTransform.volume = 1;
    mySoundChannel = snd.play(0,0,mySoundTransform);
    playbackTimer = new Timer(100);
    playbackTimer.addEventListener(TimerEvent.TIMER, playbacklevel);
    playbackTimer.start();
}

private function playbacklevel(event:TimerEvent):void 
{
    myProgressBar.width = (mySoundChannel.leftPeak + mySoundChannel.rightPeak)/2 * 100;
}

One would expect the rightPeak and leftPeak on the SoundChannel object to have 
some value other than zero as long there is sound playing, and it does if I'm 
using the standard Sound object, rather than the WavSound object.

This is not the case here...  the rightPeak and leftPeak values are always zero.

Original issue reported on code.google.com by slowbur...@gmail.com on 18 Aug 2011 at 6:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
SORRY!  Holy dummy move, Batman.  I just realized I didn't have the latest v0.8 
code.

Original comment by slowbur...@gmail.com on 18 Aug 2011 at 7:11

GoogleCodeExporter commented 9 years ago

Original comment by b.bottema on 26 Aug 2011 at 9:10