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 / Sound frustration

Author
Message
ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 30th Mar 2003 10:49
When it plays sounds it just stops playing them after a while.
Then sometimes it does this:

BERZERKER caused an invalid page fault in
module DBPROSOUNDDEBUG.DLL at 0167:025d275d.
Registers:
EAX=00000000 CS=0167 EIP=025d275d EFLGS=00010246
EBX=00000000 SS=016f ESP=0064f710 EBP=00400000
ECX=e6cf72e0 DS=016f ESI=02710ea0 FS=2bd7
EDX=bffc9490 ES=016f EDI=02710e80 GS=0000
Bytes at CS:EIP:
88 58 09 38 5e 0a 74 22 8b 0e 53 e8 a3 f1 ff ff
Stack dump:
00000000 0064f794 10001940 00000000 00000000 00000065 00000000 100010f6 1000190d 00000000 006aaddb 0064f794 00000000 00400000 0064f75c 00770e01
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 30th Mar 2003 20:08
Are you running the latest sound drivers for your system?

ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 30th Mar 2003 20:55
Gosh I don't know. The sound drivers work fine for DB v1.

But I found a work-around:

if sound playing(a) = 0 then stop sound a
play sound a


Adding the first line seems to reset the sound so no more sound not playing when it should. As for the crash, it seems to only occur when you say:

if sound exist({sound that doesn't exist}) then ...

..which I avoided altogether.

Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 30th Mar 2003 22:08
When playing a non-looping sound, you may need to add a zero on the end of Play Sound to force it to play correctly.

Play Sound <sound number>, 0

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 30th Mar 2003 22:10
When playing a non-looping sound, you may need to add a zero on the end of Play Sound to force it to play correctly.

Play Sound <sound number>, 0

Eliminating the need for:
if sound playing(a) = 0 then stop sound a

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 30th Mar 2003 22:11 Edited at: 30th Mar 2003 22:18
Whoops! Double posted by accident

Hang on! We've done this before havn't we?
http://www.darkbasicpro.com/apollo/view.php?t=3015&b=1

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 30th Mar 2003 22:31
Hey sound's good I'll try it.

ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 30th Mar 2003 22:32
Hey sounds good I'll try it.

ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 30th Mar 2003 22:34
Oh holy crap I completely forgot about that! Too bad you can't pick the brain cells you kill. lol!

ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 30th Mar 2003 22:40
ps. That's actually a really cool feature of DB pro. You can play a sound starting with whatever byte position you want --which could make for some neet effects.

Like lets say you have a bullet ricochet sound you can say

play sound a,rnd(range)

that way each time there's a ricochet the sound can be a little shorter or longer.

Between that and set sound speed you have a lot of creative flexibiliy in DB pro.

See there are reasons to stick around through all the real bugs.

Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 30th Mar 2003 22:42 Edited at: 30th Mar 2003 22:44
Oh dear, oh dear, How easily they forget what I teach them

hmmm, interesting trick.

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 31st Mar 2003 06:51
Good tips... I've been playing around with the "set sound speed", but I had thought about the "playing the sound for a random ranges of positions" thing.

Thanks!

Login to post a reply

Server time is: 2026-07-21 20:34:12
Your offset time is: 2026-07-21 20:34:12