Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Looping Sounds

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
kingkirb Posted - Jun 21 2006 : 3:09:31 PM
Sorry im being a pest with all these topics!
I have started adding some very basic .wav sounds to my game. To do this i am using a module containing

Option Explicit
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Global Const SND_ASYNC = &H1

and then to play the sounds i use the code

rc = sndPlaySound(App.Path & "\Boss Theme.wav", SND_ASYNC)
(boss theme being the name of the sound file)

My problem is that the sound plays fine and i can stop it when i want by playing the victory sound but if the player is still fighting the boss and the sound runs out it stops and i dont know how to loop the sound until the boss dies. Has anyone any ideas???

Thanks J(Kingkirb)
2   L A T E S T    R E P L I E S    (Newest First)
kingkirb Posted - Aug 11 2006 : 09:29:04 AM
thanks that works perfectly. Sorry my reply is so late i have major ISP problems. J kingkirb
PW7962 Posted - Jun 21 2006 : 5:06:20 PM
add this in the declarations:

Public Const SND_LOOP = &H8

Then call sndPlaySound(App.path & "\Boss Theme.wav", SND_ASYNC + SND_LOOP)

I did not test this but I believe that is how you can make it loop.

VBGamer © Go To Top Of Page
This page was generated in 0.08 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.