hello,
On laptops, the recorded sound is often too weak.
So when I playback a recorded sound, I want to give the signal some extra gain.
Without knowing too many details about Wave Audio Package (and streams)
(other than that it's great package
I wrote the code below,
which give a read stream error.
Can anyone give me simple solution ?
(it concerns small audio snippets, so they always fit in the array "display_ar")
thanks,
Stef Mientki
Nsamp := WaveStorage_part.Wave.DataSize ; //length in bytes
Nsamp:=Nsamp div 2;
WaveStorage_part.Wave.BeginRead;
WaveStorage_part.WaveStream[0].ReadBuffer( display_ar, 2*Nsamp); // in bytes
WaveStorage_part.Wave.EndRead;
for i:= 0 to NSamp-1 do
display_ar[i] := 10 * display_ar[i] ;
WaveStorage_part.Wave.BeginRewritePCM (WaveStorage_part.Wave.PCMFormat);
WaveStorage_part.WaveStream[0].WriteBuffer( display_ar, 2*Nsamp); // in bytes
WaveStorage_part.Wave.EndReWrite;
WaveStorage_part.Wave.BeginRead;
WaveStorage_part.WaveStream[0].ReadBuffer( display_ar, 2*Nsamp); // in bytes
.... In the above line I get a stream read error
WaveStorage_part.Wave.EndRead;