Thread View: alt.lang.basic
4 messages
4 total messages
Started by Thunder
Sun, 07 Sep 1997 00:00
How is a .WAV header ?
Author: Thunder
Date: Sun, 07 Sep 1997 00:00
Date: Sun, 07 Sep 1997 00:00
22 lines
1269 bytes
1269 bytes
I want to know where (in bytes) are located the file information &
specifications ...
I'd like to be able to read:
- The number of sampling bits (8 bits or 16 bits ? )
- The channels (stereo or mono)
- The sample rate
- The total length of the samples
- And all that would be available in the WAVE header
Thanks for ur help.
Bye!
Thunder
--
��`�.��.���`�.��.���`�.��.���`�.��.��`
Thunder (Bruno)
e-mail: BrunoM@mail.dotcom.fr
��`�.��.���`�.��.���`�.��.���`�.��.��`
Re: How is a .WAV header ?
Author: Qurt
Date: Tue, 09 Sep 1997 00:00
Date: Tue, 09 Sep 1997 00:00
146 lines
10661 bytes
10661 bytes
This is a multi-part message in MIME format.
--------------D44A3BD2B097C4063E388D35
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Here's a text file explaining the WAV format... this is an except from
the PCGPE
(PC game programmer's encyclopedia), which is available for download off
the web.
Hope it help...
-Qurt
Thunder wrote:
> I want to know where (in bytes) are located the file information &
> specifications ...
> I'd like to be able to read:
> - The number of sampling bits (8 bits or 16 bits ? )
> - The channels (stereo or mono)
> - The sample rate
> - The total length of the samples
> - And all that would be available in the WAVE header
--------------D44A3BD2B097C4063E388D35
Content-Type: text/plain; charset=iso-8859-1; name="Wav.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="Wav.txt"
������������������������������������������������Ŀ
� The Microsoft Multimedia WAV Sound File Format �
��������������������������������������������������
Written for the PC-GPE by Mark Feldman
e-mail address : u914097@student.canberra.edu.au
myndale@cairo.anu.edu.au
�������������������������������������������Ŀ
� THIS FILE MAY NOT BE DISTRIBUTED �
� SEPARATE TO THE ENTIRE PC-GPE COLLECTION. �
���������������������������������������������
�����������������������������������������������������������������������������
� Disclaimer �
��������������
I assume no responsibility whatsoever for any effect that this file, the
information contained therein or the use thereof has on you, your sanity,
computer, spouse, children, pets or anything else related to you or your
existance. No warranty is provided nor implied with this information.
�����������������������������������������������������������������������������
� The RIFF File Format �
������������������������
WAV files use the RIFF file structure. The RIFF format was designed
for multi-media purposes. A RIFF files consists of a number of "chunks":
������������������������������������������������������������������������Ŀ
� Byte Length �
� Offset Name (in bytes) Description �
������������������������������������������������������������������������Ĵ
� 00h rID 4h Contains the characters "RIFF" �
� 04h rLen 4h The length of the data in the next chunk �
� 08h rData rLen The data chunk �
��������������������������������������������������������������������������
�����������������������������������������������������������������������������
� The WAVE Form Definition �
����������������������������
The rData chunk in a WAV file is split up into several further chunks:
�������������������������������������������������������������������������Ŀ
� rData �
� Byte Length �
� Offset Name (in bytes) Description �
�������������������������������������������������������������������������Ĵ
� 00h wID 4h Contains the characters "WAVE" �
� 04h Format 14h Contains data which specifies the format �
� Chunk of the Data in the Data Chunk �
� 18h WAVE Data ? Contains the WAV audio data �
� Chunk �
���������������������������������������������������������������������������
�����������������������������������������������������������������������������
� The Format Chunk �
��������������������
The Format Chunk is split up into these fields:
�������������������������������������������������������������������������Ŀ
� Format �
� Chunk Length �
� Offset Name (in bytes) Description �
�������������������������������������������������������������������������Ĵ
� 00h fId 4 Contains the characters "fmt" �
� 04h fLen 4 Length of data in the format chunk �
� 08h wFormatTag 2 * �
� 0Ah nChannels 2 Number of channels, 1=mono, 2=stereo �
� 0Ch nSamplesPerSec 2 Playback frequency �
� 0Eh nAvgBytesPerSec 2 ** �
� 10h nBlockAlign 2 *** �
� 12h FormatSpecific 2 Format specific data area �
���������������������������������������������������������������������������
* The wFormatTag specifies the wave format, eg 1 = Pulse Code Modulation
(or in plain english, regular 8 bit sampled uncompressed sound)
** Indicates the average number of bytes a second the data should be
transferred at = nChannels * nSamplesPerSec * (nBitsPerSample / 8)
*** Indicates the block alignment of the data in the data chunk. Software
needs to process a multiplt of nBlockAlign at a time.
nBlockAlign = nChannels * (nBitsPerSample / 8)
�����������������������������������������������������������������������������
� The Data Chunk �
������������������
The Data Chunk is split up into these fields:
�������������������������������������������������������������������������Ŀ
� Data �
� Chunk Length �
� Offset Name (in bytes) Description �
�������������������������������������������������������������������������Ĵ
� 00h dId 4 Contains the characters "data" �
� 02h dLen 4 Length of data in the dData field �
� 00h dData dLen The actual waveform data �
���������������������������������������������������������������������������
In mono 8-bit files each byte represents one sample. In stereo 8-bit files
two bytes are stored for each sample, the first byte is the left channel
value, the next is the right channel value.
--------------D44A3BD2B097C4063E388D35--
Re: How is a .WAV header ?
Author: Alex Warren
Date: Wed, 10 Sep 1997 00:00
Date: Wed, 10 Sep 1997 00:00
47 lines
2064 bytes
2064 bytes
On 8 Sep 1997 18:29:11 GMT, "DELEAU Jean-Marie" <-djm@euronet.be> wrote: > >Va au site suivant : > >http://www.wotsit.demon.co.uk/music.htm >Il y a une description de plusieurs formats de fichier sonore (en autre le >format WAV) > >JM I don't know if the original question was in French or English, therefore I shall *TRY* to provide a translation. ENGLISH: Download the PC Games Programmers Encyclopedia from ftp://x2ftp.oulu.fi/pub/msdos/programming/gpe It has lots of information on the WAV format plus lots more formats such as VOC, etc. Also, you might want to try the Basix Fanzine. Issue 7 contains a very good WAV file player for QuickBasic. Download it from http://www.trenham.demon.co.uk/ and click on Back Issues. (Now for a BAD translation, a bit pointless as the documentation mentioned above is in English! Oh well, never mind...) FRANCAIS: Telechargez le PC-GPE de ftp://x2ftp.oulu.fi/pub/msdos/programming/gpe. (C'est en anglais, alors je ne sais pas porquoi j'ai fait ce traduction!) Aussi, il y a le "Basix Fanzine", qu'on peut telecharger a http://www.trenham.demon.co.uk/ (choissisez "Back Issues"). C'est aussi en anglais... Numero 7 est tres bien, il y a un "WAV-player". (Je ne crois pas que c'est un mot francais, mais...) Un mal traduction, et inutile aussi? Alex Warren email: dewarr@globalnet.co.uk www: http://www.users.globalnet.co.uk/~dewarr/
Re: How is a .WAV header ?
Author: Hugo Jonker
Date: Wed, 10 Sep 1997 00:00
Date: Wed, 10 Sep 1997 00:00
75 lines
3350 bytes
3350 bytes
Alex Warren (dewarr@globalnet.co.uk) thought about: > On 8 Sep 1997 18:29:11 GMT, "DELEAU Jean-Marie" <-djm@euronet.be> > wrote: > >Va au site suivant : > >http://www.wotsit.demon.co.uk/music.htm > >Il y a une description de plusieurs formats de fichier sonore (en autre le > >format WAV) > I don't know if the original question was in French or English, > therefore I shall *TRY* to provide a translation. Okay, do your best. > ENGLISH: Download the PC Games Programmers Encyclopedia from > ftp://x2ftp.oulu.fi/pub/msdos/programming/gpe X-cuse me ????? I do not see the PCGPE mentioned anywhere in the French text. Nor do I see any other internet address then: > >http://www.wotsit.demon.co.uk/music.htm which doesn't even resemble an ftp address.... > It has lots of information on the WAV format plus lots more formats > such as VOC, etc. So you're not translating anything I guess ? I have to agree that PCGPE is quite good... > Also, you might want to try the Basix Fanzine. Issue 7 contains a very > good WAV file player for QuickBasic. Download it from > http://www.trenham.demon.co.uk/ and click on Back Issues. > (Now for a BAD translation, a bit pointless as the documentation > mentioned above is in English! Oh well, never mind...) > FRANCAIS: Telechargez le PC-GPE de > ftp://x2ftp.oulu.fi/pub/msdos/programming/gpe. (C'est en anglais, > alors je ne sais pas porquoi j'ai fait ce traduction!) Je ne sais pas aussi, es tu fou ??? Non, je ne croix pas... > Aussi, il y a le "Basix Fanzine", qu'on peut telecharger a > http://www.trenham.demon.co.uk/ (choissisez "Back Issues"). C'est > aussi en anglais... Numero 7 est tres bien, il y a un "WAV-player". > (Je ne crois pas que c'est un mot francais, mais...) jouer de .WAV-files ??? Il y a du chance que ca est un mot francais... Ma francais est terrible, parce que je ne viennent pas aux lectoires a une annee. Oui, c'est terrible.... je sais... > Un mal traduction, et inutile aussi? Un vrais programmeur des ordinateurs parlez anglais, je croix... And now for a translation of the original french text: > >Va au site suivant : Go swiftly to this site: > >http://www.wotsit.demon.co.uk/music.htm Speaks for itself... > >Il y a une description de plusieurs formats de fichier sonore (en autre le > >format WAV) They have a desciption of multiple sound formats (among which the .WAV format) -- Beldin@stack.nl .oO Those who know cannot explain, those who don't cannot understand Oo.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads