This is a problem I had ages ago, and switched to another sound plugin to get around it. After IanM said he wasn't aware of any sound bugs I thought I would go back and try native DBPro commands again. I am still getting this problem:
load sound "c:\windows\media\tada.wav",1
wait 1000 `Comment out this line and volume is not set
set sound volume 1,80
play sound 1
wait key
I have tried on 3 different machines, 2 with SB Audigy sound cards, one with built in Realtek audio. All on XP Pro SP3.
Also, it seems if the volume is set immediately after loading then any subsequent volume commands trying to set the same volume will not work. Setting a new volume value does work.
load sound "c:\windows\media\tada.wav",1
print "Playing volume 80"
set sound volume 1,80
play sound 1
wait 3000
print "Setting volume 80 again"
set sound volume 1,80
play sound 1
wait 3000
print "Setting volume 79"
set sound volume 1,79
play sound 1
wait key
Hopefully someone can confirm it.
Edit: Just to clarify: Bug only seems to affect Windows XP. Vista & Win7 appear ok.