Timmon13 / sipdroid

Automatically exported from code.google.com/p/sipdroid
GNU General Public License v3.0
0 stars 0 forks source link

Hi, How to change the voice's rate or tempo or pitch #1169

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I use the soundtouch library to change the voice , but cannot wrok
In the RtpStreamSender.java 435 line
 pos = (ring+delay*frame_rate*frame_size/2)%(frame_size*(frame_rate+1));
             num = record.read(lin,pos,frame_size);
             System.out.println("num :" + num);

             if (num <= 0)
                 continue;

             short[] samples = lin.clone();
                soundTouch.setRate(50);
                soundTouch.putSamples(samples, pos, samples.length);

                short[] samepleBuffer = new short[lin.length];
                int nSample = soundTouch.receiveSamples(samepleBuffer, 0, samples.length);

                System.out.println("samples= " + nSample);
                lin = samepleBuffer.clone();

             if (!p_type.codec.isValid())
                 continue;

             // Call recording: Save the frame to the CallRecorder.
             if (call_recorder != null)

How to change it?

Original issue reported on code.google.com by tqj.zyy@gmail.com on 6 May 2014 at 12:38