×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    4

    phonon on symbian

    i'm new to QT. i'm tring to develop my first app on my nokia 5800 xm.
    I installed all sdk (Qt SDK 1.1) and tools needed by qt on my windows(xp) desktop.
    Then i built a empty qt mobility project where i added only a button.
    The project (built on windows) runs without errors on my nokia.

    In my project, i want to take an audio stream from microphone device and send
    it to an output audio device.
    I understood that i can use phonon class for my scope.

    I only added on my mainWindow.cpp (at the beginning):
    Code:
    #include <phonon/AudioOutput>
    ..and on the button action i added:

    Code:
     Phonon::AudioOutput* pAudioOutput;
     pAudioOutput = new Phonon::AudioOutput(  Phonon::MusicCategory,  this);
    when i try to build the app i receive the following error:

    warning: Can't find following headers in User or System Include Paths:
    "audiooutput.h"

    but if i go in C:\QtSDK\Symbian\SDKs\Symbian1Qt473\include\phonon i can find the audiooutput.h

    What is wrong in my environment?

    my easy test project can be downloaded from www.tr3ma.com/Dati/test2.zip

  2. #2
    Registered User
    Join Date
    Apr 2011
    Posts
    4

    Re: phonon on symbian

    I solved adding in the .pro file the row:
    Code:
    QT += core gui phonon
    now that it works,
    i added the remaining part of the code in file mainWindow.cpp:

    Code:
    #include <phonon/AudioOutput>
    #include <phonon/MediaObject>
    #include <phonon/MediaSource>
    and in sub on_pushButton_clicked() i added:

    Code:
    Phonon::AudioOutput* pAudioOutput;
    pAudioOutput = new Phonon::AudioOutput(  Phonon::MusicCategory,  this);
    Phonon::MediaObject* pMediaObject ;
    pMediaObject = new Phonon::MediaObject(this);
    Phonon::createPath(pMediaObject, pAudioOutput);
    QString url= QString("e:\\Scream.wav");
    Phonon::MediaSource mediaSource = Phonon::MediaSource(url);
    pMediaObject ->setCurrentSource( mediaSource);
    pMediaObject->play();
    then i copied the file Scream.wav in the external memory (e: )
    I verified that i can listen to this file on the default player of the phone.
    And when i run the code, and press the button, the phone plays the wav.
    Very good.

    Now: How can i change the output device, choosing from available outputs? (for example in case i have 2 bluetooth headphone connected, and i want to stream a file only to one of these headphone).
    I’ll study on this question.

Similar Threads

  1. Phonon fix for Symbian^3, when?
    By grekker in forum [Archived] Nokia Smart Installer for Symbian
    Replies: 1
    Last Post: 2011-01-07, 12:27
  2. Phonon on Simulator
    By lukiluuk in forum Qt
    Replies: 0
    Last Post: 2010-11-26, 16:51
  3. Phonon on Ubuntu
    By borut_dagarin in forum [Archived] Qt SDKs and Tools
    Replies: 0
    Last Post: 2010-01-28, 17:38

Posting Permissions

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