APS Server Demo with AMR Audio?
Hi, everyone,
I modified the APS Server Demo - streamer with Amr audio to output.
I read a amr file into buffer, remove the first 6 bytes and fill the TAPSCommBuffer with a frame data.
It works fine with the first 1~2 seconds and then becomes noisy.
Can anyone help me?Thank you very much.
1 Attachment(s)
Re: APS Server Demo with AMR Audio?
Hi,
APS (or rather the AMR decoder) cannot handle buffers with partial frames. So, simply reading from a file and filling up TAPSCommBuffers will give you problems, if you don't check for frame boundaries.
See the attached file, it's a modified streamer test app that supports playback from AMR files. It's not perfect, the problem is that APS doesn't send a notification for the client when the play data queue underflows - therefore, it's a bit difficult to know when it's OK to stop the playback. Currently the app doesn't stop the playback automatically. One possible way would be to stop the playback shortly after reading past the end of AMR file.
Hope this helps!
Re: APS Server Demo with AMR Audio?
Thank you for your reply.
I have solved the problem, sorry for reply late.
It is because I use the indata for the active object but not reveive it,and the buffer can store 100 packetage, 100 * 20ms = 2s.
Currently I play amr file for loop.
Re: APS Server Demo with AMR Audio?
hi has anybody tried the modified streamer given, is it playing the AMR file?.I have tried playing the AMR file, it opens the AMR file sucessfully , starts the output streaming but no sound comes out speaker or any other output.
Re: APS Server Demo with AMR Audio?
hi ,
i have tried , it worked fr me on N95 and N78, sound (AMR file )is getting played. However it is not routing on uplink.
Re: APS Server Demo with AMR Audio?
I also modified this program and added in call feature and automated play, but cant get the sound to the uplink, even though I have loudespeaker on.
So how do you route the sound to the uplink?
I see a header mdaaudiosampleeditor.h that talks about uplink, etelqos.h, es_prot.h, cs_subconparams.h, and rconnmon.h, but these dont have much to do with APS?
Has anybody really gotten this to work? I am using E71x/E54.
Re: APS Server Demo with AMR Audio?
[QUOTE=reinio;379003]Hi,
APS (or rather the AMR decoder) cannot handle buffers with partial frames. So, simply reading from a file and filling up TAPSCommBuffers will give you problems, if you don't check for frame boundaries.
See the attached file, it's a modified streamer test app that supports playback from AMR files. It's not perfect, the problem is that APS doesn't send a notification for the client when the play data queue underflows - therefore, it's a bit difficult to know when it's OK to stop the playback. Currently the app doesn't stop the playback automatically. One possible way would be to stop the playback shortly after reading past the end of AMR file.
Hope this helps![/QUOTE]
I used your attached file. I have a -10 underflow error...how to solve this...
i am using S605th edition...
Thanks
Re: APS Server Demo with AMR Audio?
I solved the problem by comment the error notification....
Re: APS Server Demo with AMR Audio?
[QUOTE=santosh_sangewar;606235]hi ,
i have tried , it worked fr me on N95 and N78, sound (AMR file )is getting played. However it is not routing on uplink.[/QUOTE]
use the following player settings
iPSettings.iSettings.iVolume=0;
iPSettings.iPriority=TMdaPriority(100);
iPSettings.iPreference=TMdaPriorityPreference(0x05220001);
iPSettings.iSettings.iChannels= EMMFMono;
iPSettings.iSettings.iSampleRate= EMMFSampleRate8000Hz;
iPSettings.iSettings.iCaps = TMdaAudioDataSettings::ERoutingControl;
iPSettings.iSettings.iFlags = 0;
Re: APS Server Demo with AMR Audio?
[QUOTE=reinio;379003]Hi,
APS (or rather the AMR decoder) cannot handle buffers with partial frames. So, simply reading from a file and filling up TAPSCommBuffers will give you problems, if you don't check for frame boundaries.
See the attached file, it's a modified streamer test app that supports playback from AMR files. It's not perfect, the problem is that APS doesn't send a notification for the client when the play data queue underflows - therefore, it's a bit difficult to know when it's OK to stop the playback. Currently the app doesn't stop the playback automatically. One possible way would be to stop the playback shortly after reading past the end of AMR file.
Hope this helps![/QUOTE]
Thanks reinio ...its really helpful for me to uplink audio by adding two settings only ...
// Player settings
// iPSettings.iSettings.iVolume = 0;
// iPSettings.iPriority = (iFullDuplex)?TMdaPriority(100):TMdaPriority(80);
// iPSettings.iPreference = (iFullDuplex)?TMdaPriorityPreference(0x05220001):TMdaPriorityPreference(0x01420001);
// iPSettings.iSettings.iChannels = EMMFMono;
// iPSettings.iSettings.iSampleRate = EMMFSampleRate8000Hz;
iPSettings.iSettings.iVolume=0;
iPSettings.iPriority=TMdaPriority(100);
iPSettings.iPreference=TMdaPriorityPreference(0x05220001);
iPSettings.iSettings.iChannels= EMMFMono;
iPSettings.iSettings.iSampleRate= EMMFSampleRate8000Hz;
iPSettings.iSettings.iCaps = TMdaAudioDataSettings::ERoutingControl;
iPSettings.iSettings.iFlags = 0;
thanks
Re: APS Server Demo with AMR Audio?
[QUOTE=reinio;379003]Hi,
APS (or rather the AMR decoder) cannot handle buffers with partial frames. So, simply reading from a file and filling up TAPSCommBuffers will give you problems, if you don't check for frame boundaries.
See the attached file, it's a modified streamer test app that supports playback from AMR files. It's not perfect, the problem is that APS doesn't send a notification for the client when the play data queue underflows - therefore, it's a bit difficult to know when it's OK to stop the playback. Currently the app doesn't stop the playback automatically. One possible way would be to stop the playback shortly after reading past the end of AMR file.
Hope this helps![/QUOTE]
Hi reinio,
I compiled and tested this project on N95 8G, following the instruction( 1.Initialize -> Player Only , 2.Player -> Select File, 3.Player->Play ), I can not hear any sound from headphones or loudespeaker, can you give me some suggestions? Thanks in advance.
Re: APS Server Demo with AMR Audio?
[QUOTE=beover1984;801396]I compiled and tested this project on N95 8G, following the instruction( 1.Initialize -> Player Only , 2.Player -> Select File, 3.Player->Play ), I can not hear any sound from headphones or loudespeaker, can you give me some suggestions? Thanks in advance.[/QUOTE]
Hi - which version of APS are you using? What is the exact format of the file you're trying to play? Does the example give any errors? Note that you can create suitable test AMR-NB files with the Voice Recorder application, just change the audio quality settings to the lowest possible ('MMS compatible') and record something. The recorded file should be now visible in the example application, in Select File menu.
Re: APS Server Demo with AMR Audio?
Hi treinio,
Thank you for reply. I just test your method, unfortunately it does not work for me :(
My test phones are Nokia 6120C and N95 8G, both of them have intalled APS_v23_S603rdFP1 plugin, when I run the example, it does not display any error information. Do you still have workable sis file? If possible, please send it to me, thanks again!