×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    13

    Audio Play() returns KErrNotReady

    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 Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    have you opened the file succesfully before calling play ?

    yucca

  3. #3
    Regular Contributor
    Join Date
    May 2008
    Posts
    149

    Re: Audio Play() returns KErrNotReady

    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 Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Audio Play() returns KErrNotReady

    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
    Join Date
    May 2008
    Posts
    149

    Re: Audio Play() returns KErrNotReady

    thank you very much..

    i think this solves the problem..


  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Audio Play() returns KErrNotReady

    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
    Join Date
    May 2008
    Posts
    149

    Re: Audio Play() returns KErrNotReady

    thank you, i'll do that

  8. #8
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Audio Play() returns KErrNotReady

    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
  •  
×