B
blackbook
Unregistered / Unconfirmed
GUEST, unregistred user!
un1说的才是正确的。
如果采用GSM610的格式 那么在 TWaveFormatEx 结构体的后面应当还有一个word的参数。
即就是 un1说的
xBytes;
例子:
type
tWAVEFORMATEX = record
wFormatTag: Word;
{ format type }
nChannels: Word;
{ number of channels (i.e. mono, stereo, etc.) }
nSamplesPerSec: DWORD;
{ sample rate }
nAvgBytesPerSec: DWORD;
{ for buffer estimation }
nBlockAlign: Word;
{ block size of data }
wBitsPerSample: Word;
{ number of bits per sample of mono data }
cbSize: Word;
{ the count in bytes of the size of }
xBytes:Word;
{ 这个我不知道。 }
end;
var
tmpformat: tWAVEFORMATEX;
begin
tmpformat.wFormatTag:=49;
tmpformat.nChannels:=1;
tmpformat.nSamplesPerSec:=8000;
tmpformat.nAvgBytesPerSec:=1625;
tmpformat.nBlockAlign:=65;
tmpformat.wBitsPerSample:=0;
tmpformat.cbSize:=2;
tmpformat.xBytes:=320;
//320=$140
ACMWaveOut.Open(@AudioFormatGSM8K);
ACMWaveIn.Open(@AudioFormatGSM8K);
end;
如果采用GSM610的格式 那么在 TWaveFormatEx 结构体的后面应当还有一个word的参数。
即就是 un1说的
xBytes;
例子:
type
tWAVEFORMATEX = record
wFormatTag: Word;
{ format type }
nChannels: Word;
{ number of channels (i.e. mono, stereo, etc.) }
nSamplesPerSec: DWORD;
{ sample rate }
nAvgBytesPerSec: DWORD;
{ for buffer estimation }
nBlockAlign: Word;
{ block size of data }
wBitsPerSample: Word;
{ number of bits per sample of mono data }
cbSize: Word;
{ the count in bytes of the size of }
xBytes:Word;
{ 这个我不知道。 }
end;
var
tmpformat: tWAVEFORMATEX;
begin
tmpformat.wFormatTag:=49;
tmpformat.nChannels:=1;
tmpformat.nSamplesPerSec:=8000;
tmpformat.nAvgBytesPerSec:=1625;
tmpformat.nBlockAlign:=65;
tmpformat.wBitsPerSample:=0;
tmpformat.cbSize:=2;
tmpformat.xBytes:=320;
//320=$140
ACMWaveOut.Open(@AudioFormatGSM8K);
ACMWaveIn.Open(@AudioFormatGSM8K);
end;