×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    24

    audio player problem..

    hello everyone,
    i am having this problem ..
    i have a object

    CMdaAudioPlayerUtility* iAmrPlayer;
    void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
    void MapcPlayComplete(TInt aError);

    properly implemented.
    .

    i have a message observer application and whenever a message comes in i play certain audio file[amr file].

    but sometimes for one message file is played for two times..
    .

    whether i m getting two notifications of one message or its the problem of
    audio player..
    . please help

    manish

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: audio player problem..

    how do you monitor these messages ?

    maybe you are playing it for two separate events (message created, changed etc.)

    yucca

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    24

    Re: audio player problem..

    thanx for ur reply..
    .. here is my code for HandleSessionEventL() function


    void CMsgObserverAppUi::HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)
    {
    switch (aEvent)
    {
    case EMsvServerReady:
    // Initialise iMsvEntry
    if (!iMsvEntry)
    {
    iMsvEntry = CMsvEntry::NewL(*iMsvSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
    }
    break;

    case EMsvEntriesCreated:
    // Only look for changes in the Inbox
    if (*(static_cast<TMsvId*>(aArg2)) == KObservedFolderId)
    {
    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    iNewMessageId = entries->At(0);
    }
    break;

    case EMsvEntriesChanged:
    // Only look for changes in the Inbox
    if (*(static_cast<TMsvId*>(aArg2)) == KObservedFolderId)
    {
    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    if (iNewMessageId == entries->At(0))
    {
    // It's the same message we received the EMsvEntriesCreated event for

    // Set entry context to the new message
    iMsvEntry->SetEntryL(iNewMessageId);

    // Open the store, read-only
    CMsvStore* store = iMsvEntry->ReadStoreL();
    CleanupStack::PushL(store);

    // Get body text and send it to the container
    if (store->HasBodyTextL())
    {
    CRichText* richText = CRichText::NewL(
    iEikonEnv->SystemParaFormatLayerL(),
    iEikonEnv->SystemCharFormatLayerL());
    CleanupStack::PushL(richText);
    store->RestoreBodyTextL(*richText);
    const TInt length = richText->DocumentLength();



    sleep(5);


    #ifdef __WINS__
    iPlayer->PlayFileL(_L("c:\\system\\Apps\\amr\\OutPut.amr"));
    //iPlayer->PlayFileL(_L("c:\\system\\Apps\\amr\\common\\adress.mov"));
    #else
    iPlayer->PlayFileL(_L("e:\\system\\Apps\\amr\\OutPut.amr"));
    //iPlayer->PlayFileL(_L("e:\\system\\Apps\\amr\\common\\adress.mov"));
    #endif


    //BringToForeground();
    //////////////////////////////////////////////////////////////////

    iAppContainer->SetTextL(richText->Read(0, length));

    CleanupStack::PopAndDestroy(richText);
    }
    else
    {
    iAppContainer->SetTextL(KNoBodyText);
    }
    CleanupStack::PopAndDestroy(store);
    }
    }
    break;

    default:
    break;
    }
    }



    manish..

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: audio player problem..

    maybe you should change the playing into the place where you get informed of the message creation, now it is in a place where you get informed of the message changes (i.e EMsvEntriesChanged), so there is real possibility to get multiple events.

    yucca

  5. #5
    Registered User
    Join Date
    Feb 2006
    Posts
    24

    Re: audio player problem..

    thanks..
    . should i put play code
    in
    1. EMsvEntriesCreated
    2. EMsvStoreCreated

    .. iam confused
    i tried my code with EMsvEntriesCreated but its not working...
    ..
    help me

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: audio player problem..

    hmmm, maybe they make the entry in other place and then move it there, so you wont get entries created event. Anyway, you could just make a log file showing all events generated, and then figure it out with the information gathered.

    yucca

Similar Threads

  1. nokia 6630 stop api problem
    By skumar_rao in forum Mobile Java General
    Replies: 1
    Last Post: 2007-11-26, 12:37
  2. Creating a Streaming Player that support New Audio Codec
    By seechuny in forum Streaming and Video
    Replies: 0
    Last Post: 2005-07-25, 04:13
  3. nokia 6630 audio problem
    By skumar_rao in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2005-07-01, 06:25
  4. Please help : problem installing Nokia Audio Suite 1.0.1
    By marexb in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2003-12-25, 14:32
  5. Nokia Communicator, with its C++ Audio player for Symbian OS
    By mkavianpour in forum Mobile Java General
    Replies: 0
    Last Post: 2002-07-19, 14:59

Posting Permissions

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