Ray Adams Member
Joined: 04 Nov 2004 Posts: 1
|
Posted: 04/11/04 11:36 Post subject: AudioRecorder and MP3. Is it possible? |
|
|
Hi.
At first, thanks for the great audio package! Its very usefull!
And now some questions.
1st.
I try to record directly to MP3 format. I've installed mp3 encoder , and trying to use OnFormat event. Also I found record for MP3 format
| Code: |
mpeglayer3waveformat_tag=packed record
wfx:TWAVEFORMATEX;
wID:word;
fdwFlags:dword;
nBlockSize:word;
nFramesPerBlock:word;
nCodecDelay:word;
end;
|
and here is a code
| Code: |
procedure TMainForm.StockAudioRecorderFormat(Sender: TObject;
out pWaveFormat: PWaveFormatEx; var FreeIt: Boolean);
begin
FreeIt:=false;
pWaveFormat:=@mp3;
mp3.wfx.nChannels:=2;
mp3.wfx.nSamplesPerSec:=44100;
mp3.wfx.nAvgBytesPerSec:=44100;
mp3.wfx.wBitsPerSample:=8;
mp3.wfx.cbSize:=sizeof(mp3.wfx);
mp3.wfx.nBlockAlign:=2;
//#WAVE_FORMAT_MPEGLAYER3 0x0055 /* ISO/MPEG Layer3 Format Tag */
mp3.wfx.wFormatTag:=$55;
mp3.nFramesPerBlock:=8;// ???
mp3.nCodecDelay:=0;// ???
//MPEGLAYER3_FLAG_PADDING_ISO 0x00000000
mp3.fdwFlags:=0;
// MPEGLAYER3_ID_MPEG 1
mp3.wID:=1;
end;
|
I don't know is it a right way to force use MP3 encoder or not. It doesnt work
Any one know how to do it? |
|