×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    2

    Audio Playback using CMMFMdaAudioPlayerUtility

    Hi all,

    I think I'm missing a fundamental concept here .

    I'm just trying to play a file on my S60 (6620) phone, using FP2.

    1. I don't understand which file I should even be instantiating the CMdaAudioPlayerUtility class in.

    2. The callback class that needs to be used with CMdaAudioPlayerUtility is MMdaAudioPlayerCallback. In the MMdaAudioPlayerCallback.h file the comments are:

    The class is a mixin and is intended to be inherited by the client
    class which is observing the audio playing operation. The functions
    encapsulated by this class are called when specific events occur in
    the process of initialising and playing an audio sample. A reference to
    this object is passed as a parameter when constructing an audio player
    utility object
    .

    I don't understand this, am I supposed to build my own class, and inherit this class as well in order to do this? Going by a .pdf I have it suggests this: CMdaAudioPlayerUtility* iPlayer = CMdaAudioPlayerUtility::NewL(*this);

    But, since I'm not sure about my 1st Question, I have just put this line in my "SecretaryAppui.cpp" file. So of course I can't use *this.

    I'm sure someone is saying already, omg, he's really lost .. any help would be appreciated.. believe it or not, I work in Embedded C currently, but this seems quite difficult to start off..


    Thanks,


    Edward.

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

    Re: Audio Playback using CMMFMdaAudioPlayerUtility

    have a look into sounds example, it shows how to use audio classes pretty well.

    Anyway, M-Classes, if you look into their imnplementation, have only virtual functions defined in them. So when you derive your class from them, you need to implement all of the defined functions in your class.

    yucca

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    2

    Re: Audio Playback using CMMFMdaAudioPlayerUtility

    Ok thanks, I looked at that, and it helps some, however it doesn't use the same classes, which doesn't answer my questions. Even so, i got a little further ahead, this should be an easier question..

    The class I have created starts like this:

    class CSecretaryAudio : public CMdaAudioPlayerUtility, public MMdaAudioPlayerCallback

    And I am implementing all the virtual functions from CMdaAudioPlayerUtility, and the pure virtual functions from MMdaAudioPlayerCallback, either way, I can comment out those two, and I still have this problem...

    I can do this:
    CSecretaryAudio *myAudio = NULL;

    but I can't do this:
    CSecretaryAudio *myAudio = new CSecretaryAudio();

    When I try to do it the last way, it causes a linking error:

    SECRETARYAPPUI.obj : error LNK2001: unresolved external symbol "public: __thiscall CSecretaryAudio::CSecretaryAudio(void)" (??0CSecretaryAudio@@QAE@XZ)

    Any ideas?


    Edward

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

    Re: Audio Playback using CMMFMdaAudioPlayerUtility

    do not derive from CMdaAudioPlayerUtility. just have it as a private variable, then you should most likely get it working pretty easily.

    Then of course derive the CSecretaryAudio from some class that makes it to be C-Class (if nothing else, then derive from CBase directly).

    yucca

Similar Threads

  1. Audio playback over a voice call
    By glecglec in forum Symbian
    Replies: 2
    Last Post: 2009-08-10, 13:00
  2. Replies: 6
    Last Post: 2007-07-11, 08:33
  3. Audio Playback Notification
    By JamesLockett in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-06-29, 07:36
  4. Half Duplex Audio Streaming
    By subhrajyotisaha in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-05-25, 04:39
  5. MMAPI/MIDP2 Audio playback
    By ericjame in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-08-29, 16:40

Posting Permissions

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