×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Nokia Developer Expert
    Join Date
    Dec 2006
    Location
    Mountain View, CA
    Posts
    197

    Audio Proxy Server 2.3 available

    Download link:
    http://www.forum.nokia.com/info/sw.n...d_FP1.zip.html

    ------------------------------------
    Release notes for the APS 2.3:

    APS release 2.3

    - Support for S60 3rd Edition and S60 3rd Edition FP1 devices.

    1. The Server now reports completion of each stream initialization via
    new callbacks:
    TAPSRequest::EAPSPlayerInitComplete
    and
    TAPSRequest::EAPSRecorderInitComplete
    These callbacks must be caught and processed by CQueueHandler::RunL on
    the client side. The client should now create and initialize the
    recorder AFTER receiving TAPSRequest::EAPSPlayerInitComplete. Also, the
    APS server is ready for streaming only AFTER both callbacks are received
    by the client.

    Client applications must utilize this new initialization procedure
    as their pre APS 2.3 compatible implementations will not work
    with APS 2.3 without these changes.

    Developers should refer to QueueHandler.cpp file of the bundled example
    application and make sure their client's implementation is similar to that in
    CQueueHandler::RunL as well as CStreamerEngine::InputStreamInitialized and
    CStreamerEngine::OutputStreamInitialized in StreamerEngine.cpp.

    This change was necessary as the initialization of the sound device and codecs
    was not done properly on earlier APS releases, making the initialization and
    configuration process prone to failures and resulting in potentially unstable
    device.

    2. Corrected ITC between the player and the recorder threads.
    3. Corrected microphone gain settings and returning MaxGain of the device.
    4. Handled underflow condition during stream playback to protect decoders
    from terminating the streaming session when receiving an empty buffer.
    5. APS errors propagated to the client.
    6. APS 2.3 can now be installed over an existing APS without "update error".
    7. Updated streamer app
    - creating player and recorder in sequenced fashion by utilizing
    new callbacks from the APS (TAPSRequest::EAPSPlayerInitComplete
    and TAPSRequest::EAPSRecorderInitComplete)
    - added Audio Settings mainly for gain and volume settings testing
    - added more comments to help client app developers
    - better error and invalid selections handling

    - Known issues:
    Previous APS 2.x installations must be uninstalled prior to installing APS 2.3.
    An 'Update error' -note may otherwise be shown on the screen and the installation
    will terminate.


    APS release 2.2
    - AMR codec support added. Note: The AMR configuration cannot be changed
    due to lack of API support.
    - PCM codec support removed from the menus. PCM hasn't been working with
    APS 2.x releases due to 164-byte buffer limitation.
    - Removed 2-3 sec delay between the audio recorded and played back.
    - Fixed stream start failing when requested first time.
    - Improved Test application funcionality.
    - Fixed server crash on application exit without initializing.
    - Fixed server crash on application exit after initializing but never
    starting streaming.
    - Improved documentation.

    APS release 2.1 (First release from S60 R&D)
    - Improved documentation (e.g. sequence diagrams included)
    - Solves memory leak problems identified in APS 2.0

    APS release 2.0 (Forum Nokia)
    - Added support of G711, G29 and iLBC codecs
    - Solves the delay (from 300ms to 30ms)

    APS release 1.1 ("VID hack")
    - Supports only S60 3.0 devices.
    - Solves audio mixing problem with CS call
    - Solves audio routing problem for VoIP, but does not solve the 300ms delay
    caused by 4KB buffer in the adaptation layer.

    - Support for S60 3rd Edition and S60 3rd Edition FP1 devices.
    - AMR codec support added. Note: The AMR configuration cannot be changed
    due to lack of API support.
    - PCM codec support removed from the menus. PCM hasn't been working with
    APS 2.x releases due to 164-byte buffer limitation.
    - Removed 2-3 sec delay between the audio recorded and played back.
    - Fixed stream start failing when requested first time.
    - Improved Test application funcionality.
    - Fixed server crash on application exit without initializing.
    - Fixed server crash on application exit after initializing but never
    starting streaming.
    - Improved documentation.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    India
    Posts
    18

    Re: Audio Proxy Server 2.3 available

    Hi nly,
    I was trying to read AMR file and send it in write q, but I am recieving KErrUnderFlow, what could be the reason, here is my code, I am using APS 2.3 on N71
    void CQueueHandler::PlayAMR()
    {
    iLog.Write(_L("PlayAMR"));
    _LIT(Kpath,"c:\\Rang.amr");
    TInt iLoadedBuff = 6;
    TInt iFramesize = 14;
    TInt iFsize;
    RFs iFs;
    RFile iFile;
    iFs.Connect();
    iFile.Open(iFs,Kpath,EFileRead||EFileStream);
    iFile.Size(iFsize);

    TAPSCommBuffer buf2;
    iFile.Read(buf2.iBuffer,6);
    buf2.iBuffer.Zero();
    TBool First = ETrue;

    TAPSCommBuffer amr1stBuf;
    TAPSCommBuffer amrBuf;

    while( iLoadedBuff < (iFsize - 6))
    {

    iFile.Read(buf2.iBuffer,iFramesize);
    TUint len = buf2.iBuffer.Length();


    if(First)
    {
    amrBuf.iBuffer.Copy(buf2.iBuffer.RightTPtr(len-1));
    amrBuf.iBuffer.Append(buf2.iBuffer[0]);
    amr1stBuf.iBuffer.Append(buf2.iBuffer[0]);
    iQ1->Send(amr1stBuf);
    iQ1->Send(amrBuf);
    iAppEngine->StartWrite();

    First=EFalse;
    iLoadedBuff = iLoadedBuff + iFramesize;
    continue;
    }


    //Rotate 1 byte left

    amrBuf.iBuffer.Copy(buf2.iBuffer.RightTPtr(len-1));
    amrBuf.iBuffer.Append(buf2.iBuffer[0]);

    //buf2.iCommand = EAPSRecordData;
    //iLog.Write(_L("Send"));
    iQ1->Send(amrBuf);
    //iLog.Write(_L("Sent"));

    //iAppEngine->StartOutputStream();

    iLoadedBuff = iLoadedBuff + iFramesize;
    buf2.iBuffer.Zero();
    amrBuf.iBuffer.Zero();

    }

    iFile.Close();
    iFs.Close();
    }

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Posts
    115

    Re: Audio Proxy Server 2.3 available

    You seem to be copying the first 6 bytes of the AMR file to server also. I suppose that is the file header, and I have been told that you can skip it (not sending it to the server). Also your framesize is 14, is that the correct frameszie for the enconding of the .amr file?

  4. #4
    Registered User
    Join Date
    Mar 2003
    Location
    India
    Posts
    18

    Re: Audio Proxy Server 2.3 available

    hi
    i m simply reading first 6 bytes of header and ignoring it, not sending it to server. also 14 byte frame size is what is specified in the APS documentation.

    regards,

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Posts
    115

    Re: Audio Proxy Server 2.3 available

    When player initialization, what is the stat code at the call back? I have one case where the initialization fails, but the developer thinks receiving EAPSPlayerInitComplete is good enough. In fact, that is not good enough, the status at the call back is failing. When proceed to send data to the write queue, he also gets KErrUnderFlow. Later when he has corrected the initialization, the play queue then runs fine.

  6. #6
    Regular Contributor
    Join Date
    Jun 2007
    Location
    INDIA
    Posts
    73

    Re: Audio Proxy Server 2.3 available

    Hi,

    Does APS should be Initialized in the main thread of any applicaiton (GUI ).
    I have multiple threads. I'm trying to open in another thread, but I'm not getting the callback 'InputStreamInitialized'.

    Do I need to set my thread priority to very high ?????

    please give me some pointers

    thnx
    -bytes



    Quote Originally Posted by wmseto View Post
    When player initialization, what is the stat code at the call back? I have one case where the initialization fails, but the developer thinks receiving EAPSPlayerInitComplete is good enough. In fact, that is not good enough, the status at the call back is failing. When proceed to send data to the write queue, he also gets KErrUnderFlow. Later when he has corrected the initialization, the play queue then runs fine.

  7. #7
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Posts
    115

    Re: Audio Proxy Server 2.3 available

    Thread should not matter.

    Please check out the section about initialization in the APS wiki page. May be you have missed some steps. If the example code works, try to follow its flow.

    TAPSRequest::EAPSPlayerInitComplete and TAPSRequest::EAPSRecorderInitComplete

    These callbacks must be caught and processed by CQueueHandler::RunL on the client side. The client should now create and initialize the recorder AFTER receiving TAPSRequest::EAPSPlayerInitComplete. Also, the APS server is ready for streaming only AFTER both callbacks are received by the client.
    Hope this helps

  8. #8
    Regular Contributor
    Join Date
    Jun 2007
    Location
    INDIA
    Posts
    73

    Re: Audio Proxy Server 2.3 available

    Thanks wmseto,

    Yes, thread and priority doesn't matter.

    I am getting both the callbacks even if I started in different thread.

    Thanks once again.

    -bytes




    Quote Originally Posted by wmseto View Post
    Thread should not matter.

    Please check out the section about initialization in the APS wiki page. May be you have missed some steps. If the example code works, try to follow its flow.



    Hope this helps

  9. #9
    Registered User
    Join Date
    Jul 2005
    Posts
    10

    Re: Audio Proxy Server 2.3 available

    Quote Originally Posted by nemamk View Post
    Hi nly,
    I was trying to read AMR file and send it in write q, but I am recieving KErrUnderFlow, what could be the reason, here is my code, I am using APS 2.3 on N71
    void CQueueHandler::PlayAMR()
    {
    iLog.Write(_L("PlayAMR"));
    _LIT(Kpath,"c:\\Rang.amr");
    TInt iLoadedBuff = 6;
    TInt iFramesize = 14;
    TInt iFsize;
    RFs iFs;
    RFile iFile;
    iFs.Connect();
    iFile.Open(iFs,Kpath,EFileRead||EFileStream);
    iFile.Size(iFsize);

    TAPSCommBuffer buf2;
    iFile.Read(buf2.iBuffer,6);
    buf2.iBuffer.Zero();
    TBool First = ETrue;

    TAPSCommBuffer amr1stBuf;
    TAPSCommBuffer amrBuf;

    while( iLoadedBuff < (iFsize - 6))
    {

    iFile.Read(buf2.iBuffer,iFramesize);
    TUint len = buf2.iBuffer.Length();


    if(First)
    {
    amrBuf.iBuffer.Copy(buf2.iBuffer.RightTPtr(len-1));
    amrBuf.iBuffer.Append(buf2.iBuffer[0]);
    amr1stBuf.iBuffer.Append(buf2.iBuffer[0]);
    iQ1->Send(amr1stBuf);
    iQ1->Send(amrBuf);
    iAppEngine->StartWrite();

    First=EFalse;
    iLoadedBuff = iLoadedBuff + iFramesize;
    continue;
    }


    //Rotate 1 byte left

    amrBuf.iBuffer.Copy(buf2.iBuffer.RightTPtr(len-1));
    amrBuf.iBuffer.Append(buf2.iBuffer[0]);

    //buf2.iCommand = EAPSRecordData;
    //iLog.Write(_L("Send"));
    iQ1->Send(amrBuf);
    //iLog.Write(_L("Sent"));

    //iAppEngine->StartOutputStream();

    iLoadedBuff = iLoadedBuff + iFramesize;
    buf2.iBuffer.Zero();
    amrBuf.iBuffer.Zero();

    }

    iFile.Close();
    iFs.Close();
    }
    I think your problem is you are putting your data in the queue but you are not waiting any time. For example, try to put a User::After(2500) after your iQ1->Send calls. But it would be better to do it with a timer.

    I found other problem with this.. I got problems in N95 however it worked for me in 6120. I have no idea what it could be the problem. The sound comes in the uplink, but it is not understandable, only noise, not sure why.

Similar Threads

  1. Proxy server adress and port number
    By S.S.Sudhakar in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2007-11-13, 14:26
  2. Audio Capture and Streaming to a Server
    By pmcerlean in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2007-07-09, 15:02
  3. Replies: 0
    Last Post: 2007-03-14, 13:52
  4. Replies: 1
    Last Post: 2007-01-15, 20:13
  5. Replies: 0
    Last Post: 2006-02-18, 18:42

Posting Permissions

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