Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Do the sound loads wav files with headers?

Author
Message
dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 18th Apr 2011 22:06
I would like to know if the sound command load wav files with headers, so I can peek the headers using the memblock.

I got the idea from the demo samples in the darksource, the draw sound data from file demo.
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Apr 2011 23:26
A little peek at the help file reveals all...


The specified values must be integer values and the source resource must exist or the command will fail. The format for creating and gathering information on a sound is obtained in the following format. The offsets are specified in Bytes. Refer to the standard Windows SDK documentation on the WAVEFORMATEX data structure for the meanings of each field:

OFFSET 0 - wFormatTag
OFFSET 4 - nChannels
OFFSET 8 - nSamplesPerSec
OFFSET 12 - nAvgBytesPerSec
OFFSET 16 - nBlockAlign
OFFSET 20 - wBitsPerSample
OFFSET 24 - cbSize

Login to post a reply

Server time is: 2026-07-18 06:41:30
Your offset time is: 2026-07-18 06:41:30