Hi there
I have an application that requires me to edit the individual PCM data values in a WAVE file. I have written the following code
wave := tWave.create;
wave.loadFromFile(openDialog.fileName);
wave.BeginRead;
setLength(buffer, 4);
byteTally := wave.stream.read(buffer, 4);
for i := 0 to byteTally-1 do
showMessage(intToStr(buffer[i]));
If I’ve understood correctly, this should output the first four data bytes from the WAVE file. Clearly, I haven’t understood correctly, because the showmessage causes an access violation error. Can you tell me why?
At a more global level, does your package have some way of getting the data values out of the file as integers? Even if I manage to fix the code above, I don’t really want to have to assemble bytes that represent two’s complement numbers into integers.
Thanks
Paul