First of all, thanks for the great audio components.
Unfortunately, I have the following problem:
I get audio, video and telemetry data from an old surveillance system. My problem is the audio data.
I always get 700 bytes which I save in an array of bytes. The first 50 bytes are additional information. The audio data is the remaining 650 bytes. The audio data is in GSM 6.10 WAV49 format. I want to play the data with LiveAudioPlayer.
This is my PlayerFormat
- Code: Select all
procedure TForm1.LiveAudioPlayerFormat(Sender: TObject; var pWaveFormat: PWaveFormatEx; var FreeIt: Boolean);
var
GSM610: PGSM610WaveFormat;
begin
GetMem(GSM610, SizeOf(TGSM610WaveFormat));
GSM610^.wfx.wFormatTag := WAVE_FORMAT_GSM610;
GSM610^.wfx.nChannels := 1;
GSM610^.wfx.nSamplesPerSec := 8000;
GSM610^.wfx.nAvgBytesPerSec := 1625; { 8000 / 320 * 65 }
GSM610^.wfx.nBlockAlign := 65;
GSM610^.wfx.wBitsPerSample := 0;
GSM610^.wfx.cbSize := 2;
GSM610^.wSamplesPerBlock := 320;
pWaveFormat := PWaveFormatEx(GSM610);
FreeIt := True;
end;
I use the AudioBuffer from the LiveAudio Receiver example. But I do not understand how I get each 650 bytes in the AudioBuffer and allocate the memory and play them.
Can someone help me with this?
Sorry, usually I program µCs in C and a really newbie in Delphi.
Thanks and best regards
Frank