Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User wysspeter's Avatar
    Join Date
    Aug 2005
    Posts
    13
    I programmed a simple sound player, but when I call Play() in my MapcInitComplete function, the callback MapcPlayComplete returns a -18 KErrNotReady error.

    Why does this happen?

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,671
    have you opened the file succesfully before calling play ?

    yucca

  3. #3
    Regular Contributor raffaelbechara's Avatar
    Join Date
    May 2008
    Posts
    149
    Quote Originally Posted by symbianyucca View Post
    have you opened the file succesfully before calling play ?

    yucca
    I have this same problem.

    Here is the code:

    CMdaAudioPlayerUtility*
    iPlayer = CMdaAudioPlayerUtility::NewL(this);

    iPlayer->OpenFileL(aFileFullPath);
    iPlayer->Play();
    I tested it on the emulator, but it doesn't work.

    Can you help me?

  4. #4
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,671
    you need to wait untill the file is opened succesfully before you can call play. So check the callback interface functions, and do call the play in the one that tells you when the file has been opened.

  5. #5
    Regular Contributor raffaelbechara's Avatar
    Join Date
    May 2008
    Posts
    149
    thank you very much..

    i think this solves the problem..


  6. #6
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    If you want to play the sound immediately when it becomes available, invoke Play in MapcInitComplete (at least if aError==KErrNone...).

  7. #7
    Regular Contributor raffaelbechara's Avatar
    Join Date
    May 2008
    Posts
    149
    thank you, i'll do that

  8. #8
    Registered User yogpan's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043
    Hi,
    Check this basic example of how to play the audio files
    http://wiki.forum.nokia.com/index.ph...ng_audio_files
    Maximus
    S60 Developer
    Impossible is nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved