Weekly Qbasic and Qb64 Lesson Topics
April 26, 2025, 12:18:21 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

PacMan2f This one moves with arrow keys

Pages: 1 [2] 3 4
  Print  
Author Topic: PacMan2f This one moves with arrow keys  (Read 4363 times)
guest
Guest
« Reply #15 on: March 08, 2011, 01:22:23 am »


    You have to poll for soundplaying.

The _SNDPLAYING function returns whether a sound is being played. Uses a handle from the _SNDOPEN or _SNDCOPY functions.

Syntax:
playing% = _SNDPLAYING (handle&)

Description:
Returns 0 if a sound is not playing or -1 if it is.
If a sound is paused, _SNDPLAYING will return 0.

So if you compose a loop and have a place inside that loop that checks if sound is playing then if the sound stops soundplaying returns a zero so based off that zero you branch to load and play the sound again.

« Last Edit: September 17, 2011, 09:41:22 am by GarrisonRicketson » Report Spam   Logged

Pages: 1 [2] 3 4
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy