Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User flairfrog's Avatar
    Join Date
    Nov 2008
    Location
    Beijing China.
    Posts
    28
    When I uesd CMdaAudioPlayerUtility::NewFilePlayerL(*iFileName,*this) to play a song, It's ok,
    when I try to play another, sometimes I will get an error with MMFControllerProxyservere+somenumber ,and AllocLC:+somenumber, I know it means memory leak, but I don't know why.

    Look at my codes when I play next song, it will run these codes.

    if (iPlayerUtility)
    {
    iPlayerUtility->Stop(); //it's ok
    iPlayerUtility->Close();
    //sometime error occurs here, I tried to omit this, and the error
    //come out in other place where i can't find, should be the system function
    iPlayerUtility->OpenFileL(*iFileName);
    }
    else
    {
    iPlayerUtility = CMdaAudioPlayerUtility::NewFilePlayerL(*iFileName,*this);
    }


    I also try another way.Delete the object, renew.There is still error.

    if(iPlayerUtility)
    {
    delete iPlayerUtility; //sometimes error happens here,when I do this frequently
    iPlayerUtility = NULL;
    }
    iPlayerUtility = CMdaAudioPlayerUtility::NewFilePlayerL(*iFileName,*this);


    Tell me how to do this,
    Single, that's all.

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,673
    maybe you could try:
    if (iPlayerUtility)
    {
    iPlayerUtility->Stop(); //it's ok
    iPlayerUtility->Close();
    }
    delete iPlayerUtility;
    iPlayerUtility = NULL;
    iPlayerUtility = CMdaAudioPlayerUtility::NewFilePlayerL(*iFileName,*this);

  3. #3
    Registered User flairfrog's Avatar
    Join Date
    Nov 2008
    Location
    Beijing China.
    Posts
    28
    Quote Originally Posted by symbianyucca View Post
    maybe you could try:
    if (iPlayerUtility)
    {
    iPlayerUtility->Stop(); //it's ok
    iPlayerUtility->Close();
    }
    delete iPlayerUtility;
    iPlayerUtility = NULL;
    iPlayerUtility = CMdaAudioPlayerUtility::NewFilePlayerL(*iFileName,*this);
    like I said iPlayerUtility->Close() may panic,also delete iPlayerUtility may panic
    Single, that's all.

  4. #4
    Nokia Developer Champion qxiaoyuan's Avatar
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346
    the code "iPlayerUtility->Close() or delete iPlayerUtility" not allow called in PlayComplete, you need do it in other event, like timer or user command.
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

Similar Threads

  1. Replies: 1
    Last Post: 2009-01-03, 05:22
  2. CMdaAudioPlayerUtility n CMdaAudioPlayerUtility
    By Shilpa13 in forum Symbian User Interface
    Replies: 5
    Last Post: 2006-11-18, 13:44
  3. Delay when delete CMdaAudioPlayerUtility
    By billchie in forum Audio
    Replies: 2
    Last Post: 2005-12-26, 13:20
  4. sound && CMdaAudioPlayerUtility Help
    By qibinyi in forum Symbian C++
    Replies: 1
    Last Post: 2003-08-07, 03:51
  5. sound && CMdaAudioPlayerUtility Help
    By qibinyi in forum Symbian C++
    Replies: 2
    Last Post: 2003-08-06, 12:55

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