Playing RAW Data

Álvaro alblurrow at gmail.com
Fri Nov 7 08:55:39 CET 2008


Hi,

I am trying to develop a little application that plays some sounds created
by me. Right now I am creating this sounds and playing them with ESD. It
works but it is not very efficient and I cannot play two sounds at the same
time. So I have decided to move to phonon.

To introduce a little bit what I am doing is generate the sounds inside an
array (shorts array). The data inside this array is the amplitude value of
the wave I want to play. I am using the sample rate of 44K.

But I don't get to play this in phonon. Because as far as I have found on
the documentation I need this information inside a QBuffer (from a
QByteArray). But I have tried to convert my array to a QByteArray, and then
obtain the QBuffer to play but nothings sounds. I can play wav files from a
file, so my sound is working properly.

Does anybody have any hint or idea how can I get it to work? I have been
also digging in some KDE4 apps to see if I find how to do it but without
succces.

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/phonon-backends/attachments/20081107/b36d9ee3/attachment.htm 


More information about the Phonon-backends mailing list