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

AUD_Status AUD_SoftwareDevice::getStatus ( AUD_Handle handle  )  [virtual]

Returns the status of a played back sound.

Parameters:
handle The handle returned by the play function.
Returns:
  • AUD_STATUS_INVALID if the sound has stopped or the handle is . invalid
  • AUD_STATUS_PLAYING if the sound is currently played back.
  • AUD_STATUS_PAUSED if the sound is currently paused.
See also:
AUD_Status

Implements AUD_IDevice.

Definition at line 370 of file AUD_SoftwareDevice.cpp.

References lock(), m_pausedSounds, m_playingSounds, and unlock().

{
      AUD_Status status = AUD_STATUS_INVALID;

      lock();

      for(AUD_HandleIterator i = m_playingSounds->begin();
            i != m_playingSounds->end(); i++)
      {
            if(*i == handle)
            {
                  status = AUD_STATUS_PLAYING;
                  break;
            }
      }
      if(status == AUD_STATUS_INVALID)
      {
            for(AUD_HandleIterator i = m_pausedSounds->begin();
                  i != m_pausedSounds->end(); i++)
            {
                  if(*i == handle)
                  {
                        status = AUD_STATUS_PAUSED;
                        break;
                  }
            }
      }

      unlock();

      return status;
}


Generated by  Doxygen 1.6.0   Back to index