4

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.

Artjom B.
  • 61,146
  • 24
  • 125
  • 222

2 Answers2

1

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.

akmozo
  • 9,829
  • 3
  • 28
  • 44
  • That seems to be the problem, because i found that if i loop back the microphone, while broadcasting it, and apply soundTransform on the microphone object, again the panning doesnt work. So maybe this is because the microphone is mono? It was a help, but sadly it doesnt solve my problem... – George NeoGeo Jul 24 '15 at 14:45
  • @NeogeoSotis So you don't know if your audio stream is mono or stereo ?! – akmozo Jul 24 '15 at 15:10
  • I've just read that all streams in AC3 are mono, and as i said above, when i record with the mic i have the same problem, because the mic is mono... – George NeoGeo Jul 24 '15 at 15:14
0

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...