fitzy
6th August 2010, 09:53
Hello,
I have some files written as raw audio data.
The audio data I am trying to read is encoded in 16 bits, has only 1 channel and with rate 22050 Hz.
Pb1: How can I retrieve the amplitude of the wave ?
Here is what I tried to do to solve Pb1 (don't know if it is good) :
QByteArray by = file->read(16);
but I get something like :
"}Â????ÂÂ??? ©²¾É"
I tried to convert that to an integer but it doesn't work (I always get 0, but there are datas in the file, I checked with Audacity):
qDebug() << by.toInt();
--
Pb2: How can I create a RAW audio file if I have the amplitude of the wave ?
Any idea ?
.
I have some files written as raw audio data.
The audio data I am trying to read is encoded in 16 bits, has only 1 channel and with rate 22050 Hz.
Pb1: How can I retrieve the amplitude of the wave ?
Here is what I tried to do to solve Pb1 (don't know if it is good) :
QByteArray by = file->read(16);
but I get something like :
"}Â????ÂÂ??? ©²¾É"
I tried to convert that to an integer but it doesn't work (I always get 0, but there are datas in the file, I checked with Audacity):
qDebug() << by.toInt();
--
Pb2: How can I create a RAW audio file if I have the amplitude of the wave ?
Any idea ?
.