Hi Alberto or anyone on the list,
Can you help me with understanding the RIFF chunk of a wav file?
If I want to capture sound as 24 bit data do I specify wBitsPerSample
as 24?
Or do I set the wBitsPerSample = 32 and the wValidBitsPerSample = 24?
The example code I find on internet searches seems very old. I can't
figure out how to create a valid 96K 24 bit wav file.
(I am writing code in Visual Basic 6)
'Set The WAV wformat
wformat.wFormatTag = WAVE_FORMAT_EXTENSIBLE '-2
wformat.nChannels = 6 '6
wformat.nSamplesPerSec = 44100 '22050 ''16000 '8000 '44100
wformat.wBitsPerSample = ContainerBits ' 20 '8 '16 CONTAINER
wformat.nBlockAlign = wformat.nChannels *
wformat.wBitsPerSample / 8
wformat.nAvgBytesPerSec = wformat.nSamplesPerSec *
wformat.nBlockAlign
wformat.cbsize = 22
wformat.wValidBitsPerSample = ValidBits '20 '32 '8 '16
wformat.dwChannelMask = 63 'KSAUDIO_SPEAKER_DIRECTOUT
I don't fully understand how to used all of this sample code.
If you can provide any assistance it would be much appreciated.
Thanks,
Dave
AD5JO
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/soft_radio/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/