×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    93

    CAudioOutput how to use earphones?

    Hi,
    I downloaded and installed the Audio routing API, now i need to use it, but i'm not an expert in symbian, I need to change the audio output channel from external speakers to earphones, How can i do that?? I tried in this way:

    MMdaAudioOutputStreamCallback aCallBack;
    CMdaAudioOutputStream* OutputStream = CMdaAudioOutputStream::NewL(aCallBack);

    MAudioOutputObserver aObserver;

    CAudioOutput::TAudioOutputPreference myOutputPref = CAudioOutput::EPrivate;

    CAudioOutput* iAudioOutput = CAudioOutput::NewL(*OutputStream);
    iAudioOutput->RegisterObserverL(aObserver );
    iAudioOutput->SetAudioOutputL(myOutputPref);

    it returns me the errors:

    cannot declare variable 'aCallBack' to be of abstract type 'MMdaAudioOutputStreamCallback'
    cannot declare variable 'aObserver' to be of abstract type 'MAudioOutputObserver'

    How can i fix it?
    Max

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: CAudioOutput how to use earphones?

    M-classes are interfaces in Symbian C++. You have to inherit from them, and implement the methods, they are callbacks. After that the given entity (like the audio stream in this case) will notify you about its state transitions via invoking those methods.

    You can find audio streaming examples: Library above, Code examples, Symbian C++, Multimedia.

Similar Threads

  1. N85 Earphones problem
    By xmrtx in forum General Development Questions
    Replies: 1
    Last Post: 2009-01-30, 09:46
  2. CAudioOutput -> KErrNotFound
    By heuven in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2009-01-15, 11:32
  3. NewL in CAudioOutput
    By bdrubel in forum Symbian
    Replies: 5
    Last Post: 2008-07-08, 18:46
  4. Replies: 1
    Last Post: 2006-03-25, 08:24

Posting Permissions

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