SoundTransform panning not working on a rtmp stream with ActionScript 3.0

159 Views Asked by At

I'm having a strange problem, I'm using the SoundTransform function to play the sound of an RTMP stream from red5 server only on the left speaker and to lower it's volume with

stream.soundTransform = new SoundTransform (0.5,-1.0); 

on Actionscript 3.0, but it is not working... This is somewhat strange, because for exactly the same code, if instead of the stream I enter an audio flv file or an mp3 file, it works fine, so the SoundTransform class seems to have no effect on streams.

2

There are 2 best solutions below

3
On

Firstly, try to verify, of course, that your audio stream is Stereo, then if you have got a security error ( which I don't think it's the case ), you can add this block to the red5-web.xml file of your live app :

<bean id="rtmpSampleAccess" class="org.red5.server.stream.RtmpSampleAccess"> 
    <!-- enable access to the raw audio -->
    <property name="audioAllowed" value="true"/> 
    <!--  if you need access to the raw video, put it to true -->
    <property name="videoAllowed" value="false"/> 
</bean>

Hope that can help.

0
On

I see that noone has hound an aswer, so i'll post what i learned these days, and seems right...The main problem seems to be that soundtransform can't apply panning on monophonic sources. So as microphone is mono, it cannot apply panning either in microphone object or microphone via stream...In some way you have to convert the mono sound into stereo...