2
votes

I'm developing music player for Symbians and need to play raw audio data (PCM) from phone memory. I tried QAudioOutput, which works fine (through Qbuffer - iherits QIODevice), but it is too much low-level API and therefore not suitable for me. So I found Phonon and QMediaPlayer. I can't get Phonon to work neither on my phone nor on Windows. However, on Windows i can play files but not QBuffers... strange.

However, now I want to use QMediaPlayer but havent found a way to play raw data from memory. There is only QUrl constructor of QMediaContent.

Is there any option how to play on QMediaPlayer from QBuffer, QDataStream, QByteArray... anything from memory?

Any suggestions would be great, thanks :).

1

1 Answers

0
votes

On desktop I'm using plain GStreamer (without phonon layer) to play from memory. Phonon backends doesn't handle well media from memory (QIODevice). From Qt 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).