Results 1 to 3 of 3

Thread: How To Use Phonon?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2010
    Posts
    23
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows
    Thanks
    10

    Default How To Use Phonon?

    Hai Guys, im new with Qt
    I had a problem
    I want to make a music player simulator (like piano or drum)
    recently, i'm using QSound, but i have problem because i cant play multiple sound

    I want to try using Phonon. But i found a problem...
    My Code is

    void uxbonang::bon_play(){
    Phonon::MediaObject *music =
    Phonon::CreatePlayer (Phonon::MusicCategory,
    Phonon::MediaSource("C://Qt/Pro/sound.wav"));
    }

    i already included
    phonon/MediaObject
    phonon/MeidaSource

    But i got an error message like this

    "......undefined reference to '_imp__ZN6Phonon11MediaSourceC1ERK7QString'
    ...undefined reference to '_imp__ZN6Phonon12CreatePlayerENS_8CategoryERKNS_1 1MediaSourceE'
    ...undefined reference to '_imp_ZN6Phonon11MediaSourceD1Ev'
    ...undifned reference to '_imp_ZN6Phonon11MediaObjectPlayEv'
    "

    What should i Do?
    thx

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 268 Times in 268 Posts
    Wiki edits
    20

    Default Re: How To Use Phonon?

    Add
    Qt Code:
    1. QT += phonon
    To copy to clipboard, switch view to plain text mode 
    to your .pro file

    Then clean the project and rebuild.

  3. The following user says thank you to tbscope for this useful post:

    ardisaz (28th November 2010)

Similar Threads

  1. Phonon
    By lamp in forum Qt for Embedded and Mobile
    Replies: 7
    Last Post: 6th October 2010, 11:17
  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.