Results 1 to 8 of 8

Thread: Phonon

  1. #1
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Phonon

    Hi

    My Code working without any Error But No sound and speaker is silent!

    Qt Code:
    1. QList<Phonon::AudioOutputDevice> audioOutputDevices =
    2. Phonon::BackendCapabilities::availableAudioOutputDevices();
    3.  
    4. player = new Phonon::MediaObject(this);
    5. player->setCurrentSource(Phonon::MediaSource(AZAN));
    6. audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
    7.  
    8. audioOutput->setOutputDevice(audioOutputDevices[0]);
    9. qDebug()<<audioOutputDevices;
    10.  
    11. Phonon::Path path = Phonon::createPath(player, audioOutput);
    12.  
    13. audioOutput->setVolume(100);
    14. player->play();
    To copy to clipboard, switch view to plain text mode 

    Result of qDebug:

    ("ALSA default output", "OSS default output", "Jack Audio Connection Kit")

    Using Beagleboard and Ubuntu 10.04.1 and Qt 4.6.2

    Tanks
    Last edited by wysota; 6th October 2010 at 10:45.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon

    What is AZAN?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Phonon

    AZAN = File Path such az /home/12.mp3

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon

    Does it really contain /home/12.mp3?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Phonon

    yes, and run app with root permission

  6. #6
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Phonon

    note:
    My Code working goode on X86 pc

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon

    Try moving the file elsewhere and running the application with your regular user.

    By the way, do you have a proper phonon backend installed? Like gstreamer.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Phonon



    Installing libxine1-ffmpeg and problem resolved

    Thanks alot

Similar Threads

  1. Qt4.4.3 Phonon
    By alexcuiCN in forum Qt Programming
    Replies: 0
    Last Post: 18th April 2009, 03:09
  2. Phonon V4L
    By kovariadam in forum Newbie
    Replies: 1
    Last Post: 31st January 2009, 15:35
  3. phonon on QT4.4
    By coolk in forum Installation and Deployment
    Replies: 15
    Last Post: 15th January 2009, 13:38
  4. Phonon
    By QTInfinity in forum Qt Programming
    Replies: 2
    Last Post: 19th November 2008, 14:24
  5. Phonon and Mac
    By SidGBF in forum Qt Programming
    Replies: 5
    Last Post: 8th September 2008, 13:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.