Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PSoundChannelDirectSound::PlaySound ( const PSound sound,
BOOL  wait 
) [virtual]

Play a sound to the open device. If the wait# parameter is TRUE then the function does not return until the file has been played. If FALSE then the sound play is begun asynchronously and the function returns immediately.

Note if the driver is closed of the object destroyed then the sound play is aborted.

Also note that not all possible sounds and sound files are playable by this library. No format conversions between sound object and driver are performed.

TRUE if the sound is playing or has played.

Reimplemented from PSoundChannel.

Definition at line 867 of file sound_directsound.cxx.

References WaitForPlayCompletion(), and Write().

  mStreaming = false;
  if (!Write((const void *)sound, sound.GetSize()))
    return FALSE;

  if (wait)
    return WaitForPlayCompletion();
  return TRUE;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index