Results 1 to 11 of 11

Thread: Playing ogg files without QMediaPlayer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Playing ogg files without QMediaPlayer

    Quote Originally Posted by frucot View Post
    Unfortunatly, i don't know how to do this.
    What have you tried so far?
    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.


  2. #2
    Join Date
    Dec 2013
    Posts
    5
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Playing ogg files without QMediaPlayer

    I can decode an ogg file with QAudioDecoder *m_decoder and i get a QAudioBuffer by doing m_decoder->read() in a slot called on signal bufferready.
    But i can't pass this QAudioBuffer to QAudioOuput who need a QIODevice*
    I think i may subclass QIODevice to give QAudioOutput the ability to read this QAudioBuffer. right ?
    At this point, i don't know what to do

    sorry for my poor english

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

    Default Re: Playing ogg files without QMediaPlayer

    Quote Originally Posted by frucot View Post
    I can decode an ogg file with QAudioDecoder *m_decoder and i get a QAudioBuffer by doing m_decoder->read() in a slot called on signal bufferready.
    But i can't pass this QAudioBuffer to QAudioOuput who need a QIODevice*
    I think i may subclass QIODevice to give QAudioOutput the ability to read this QAudioBuffer. right ?
    At this point, i don't know what to do

    sorry for my poor english
    If you call QAudioOutput::start() it will return an QIODevice instance you should write your audio frames to. So whenerver you have data in the buffer, just write it to the device returned by QAudioOutput.
    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.


Similar Threads

  1. Playing MP4 and FLV with QMediaPlayer
    By JasonKretzer in forum Newbie
    Replies: 2
    Last Post: 12th September 2013, 21:58
  2. playing mp3 files via QT
    By kerim in forum Qt Programming
    Replies: 2
    Last Post: 21st April 2011, 13:37
  3. Playing 2 wav files continously
    By HanyM.Magdy in forum Qt Programming
    Replies: 3
    Last Post: 5th October 2010, 16:11
  4. QSound problem playing different wav files
    By couker in forum Qt Programming
    Replies: 6
    Last Post: 16th September 2009, 20:38
  5. Playing Media files in Qt 4
    By sar_van81 in forum Qt Programming
    Replies: 2
    Last Post: 18th December 2007, 05:53

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.