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 / make memblock from sound header info needed. HELP!

Author
Message
AndyUK
23
Years of Service
User Offline
Joined: 2nd Apr 2003
Location: United Kingdom
Posted: 28th Sep 2003 12:52
Hi all, i cant seem to extract the header for a sound memblock.. ive tried various methods, bytes, dwords.. etc. i did manage to get the sample rate but i dont the order in which the info is stored or how many bytes to read from where.

load sound "c:\test.wav",1
make memblock 1,11000
record sound 1,1000
wait 1000
stop recording sound
make memblock from sound 1,1
bits=memblock dword(1,0)
rate=memblock word(1,2)
samples=memblock word(1,4)
print "Bits per sample ",bits
print "Sample rate ",rate
print "samples ",samples
wait key

can somebody please help?? im using dbp. thanx

| AMD Athlon XP 2000+ | 512DDR(400) | GF4MX400 64MB | Win2k Sp4 | Cup of Coffee |

Login to post a reply

Server time is: 2026-07-25 09:59:22
Your offset time is: 2026-07-25 09:59:22