Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FiveWin 1.9.2 - January 97 - sndplaysound() plays a wav sound file from resources http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SndPlaySound()         Plays a WAV sound file from resources
--------------------------------------------------------------------------------

   Syntax:              SndPlayRes( <cSndName>, <nMode> )
                                  --> <lSuccess>

   Parameters:

   <cSndName>           Specifies the name of the sound stored at
                        resources to play. It may be a string or a numeric
                        identifier. To include a WAV file into an RC, you
                        must specify a new user defined resource type named
                        "WAVE":

                        MyApp.rc

                        OKSOUND  WAVE  "OkSound.wav"
                        NOSOUND  WAVE  "NoSound.wav"

                        or

                        110  WAVE  "OkSound.wav"
                        120  WAVE  "NoSound.wav"

    <nMode>             Specifies options for playing the sound using one or
                        more of the following flags:

                        SND_SYNC  The sound is played synchronously and the
                                  function does not return until the sound
                                  ends.

                        SND_ASYNC The sound is played asynchronously and the
                                  function returns immediately after beginning
                                  the sound. To terminate an
                                  asynchronously-played sound, call
                                  sndPlaySound with cSndName set to 0.

                        SND_NODEFAULT If the sound can't be found, the
                                  function returns silently without playing
                                  the default sound.

                        SND_MEMORY The parameter specified by cSndName to an
                                  in-memory image of a waveform sound.

                        SND_LOOP  The sound will continue to play repeatedly
                                  until sndPlaySound is called again with the
                                  cSndName parameter set to 0. You must also
                                  specify the SND_ASYNC flag to loop sounds.

                        SND_NOSTOP If a sound is currently playing, the
                                  function will immediately return FALSE
                                  without playing the requested sound.

                        #define SND_SYNC            0
                        #define SND_ASYNC           1
                        #define SND_NODEFAULT       2
                        #define SND_MEMORY          4
                        #define SND_LOOP            8
                        #define SND_NOSTOP         16

   Returns:

   <lSuccess>           A logical value indicating if the operation
                        was performed successfully.

   Sample:              SAMPLES\\Lolo.prg

   Source code:         SOURCE\\WINAPI\\Sound.c

   See also:            SndPlaySound() MsgSound() MsgBeep() MessageBeep()


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson