×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    14

    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.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    132

    Arrow 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!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    14

    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.

  4. #4
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,957

    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.

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    16

    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.

  6. #6
    Registered User
    Join Date
    Apr 2010
    Posts
    3

    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.

  7. #7
    Registered User
    Join Date
    Feb 2010
    Location
    India
    Posts
    281

    Re: APS Server Demo with AMR Audio?

    Quote Originally Posted by reinio View Post
    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!
    I used your attached file. I have a -10 underflow error...how to solve this...
    i am using S605th edition...
    Thanks

  8. #8
    Registered User
    Join Date
    Feb 2010
    Location
    India
    Posts
    281

    Re: APS Server Demo with AMR Audio?

    I solved the problem by comment the error notification....

  9. #9
    Registered User
    Join Date
    Feb 2010
    Location
    India
    Posts
    281

    Re: APS Server Demo with AMR Audio?

    Quote Originally Posted by santosh_sangewar View Post
    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.
    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;

  10. #10
    Registered User
    Join Date
    Feb 2010
    Location
    India
    Posts
    281

    Re: APS Server Demo with AMR Audio?

    Quote Originally Posted by reinio View Post
    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!
    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

  11. #11
    Nokia Developer Champion
    Join Date
    Jun 2005
    Location
    Beijing
    Posts
    5,578

    Re: APS Server Demo with AMR Audio?

    Quote Originally Posted by reinio View Post
    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!
    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.
    Beover1984
    -----------
    Doing what comes naturally

  12. #12
    Regular Contributor
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329

    Re: APS Server Demo with AMR Audio?

    Quote Originally Posted by beover1984 View Post
    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.
    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.

  13. #13
    Nokia Developer Champion
    Join Date
    Jun 2005
    Location
    Beijing
    Posts
    5,578

    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!
    Beover1984
    -----------
    Doing what comes naturally

Similar Threads

  1. Buggy AMR Audio Recording. Please Help!!
    By jhamby in forum Symbian
    Replies: 8
    Last Post: 2009-07-07, 10:34
  2. APS 2.31: Not audio output from player
    By lss0986 in forum VoIP
    Replies: 3
    Last Post: 2008-07-30, 12:02
  3. Using Audio Proxy Server to play only (not play and record)
    By rob_savageminds in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2007-09-04, 12:11
  4. Replies: 0
    Last Post: 2005-04-03, 09:16
  5. pcm to amr audio codec
    By somrup.pal in forum Symbian
    Replies: 1
    Last Post: 2004-03-10, 21:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •