I had played media from file with phonon. But now, i want play media from byte buffer to inc speed of my program. But i can't find any document show about that. Plz show me how i can play media from byte buffer with phonon.
Thanks all your help!
I had played media from file with phonon. But now, i want play media from byte buffer to inc speed of my program. But i can't find any document show about that. Plz show me how i can play media from byte buffer with phonon.
Thanks all your help!
Seems like this would be the basic process:
- Load data into a QByteArray if you don't already have the data in a char buffer.
- Create a QBuffer, which is a QIODevice, from the QByteArray or char buffer
- Create a MediaSource from the QBuffer
Thanks Chirs!
I will try your way!
i had write code as:
Qt Code:
qDebug() << baDuLieu.count(); bufDuLieu.setData(baDuLieu); qDebug() << bufDuLieu.size(); // bufDuLieu.open(QIODevice::ReadOnly); Phonon::MediaSource msDL(&bufDuLieu); _mediaObject = Phonon::createPlayer(Phonon::MusicCategory, msDL);To copy to clipboard, switch view to plain text mode
but my music can't play![]()
It warning:Qt Code:
MediaSource::Stream not yet handledTo copy to clipboard, switch view to plain text mode
plz help !
From the MediaSource::MediaSource() docs:
Warning: On Windows, we only support QIODevices containing the avi, mp3, or mpg formats. Use the constructor that takes a file name to open files (the Qt backend does not use a QFile internally).
I had urlPath is one file .mp3. And I program on Symbian not Windows
Bookmarks