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

bool AUD_SoftwareDevice::resume ( AUD_Handle handle  )  [virtual]

Resumes a paused sound.

Parameters:
handle The handle returned by the play function.
Returns:
  • true if the sound has been resumed.
  • false if the sound isn't paused or the handle is invalid.

Implements AUD_IDevice.

Definition at line 230 of file AUD_SoftwareDevice.cpp.

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

{
      bool result = false;

      lock();

      // only songs that are paused can be resumed
      for(AUD_HandleIterator i = m_pausedSounds->begin();
            i != m_pausedSounds->end(); i++)
      {
            if(*i == handle)
            {
                  m_playingSounds->push_back(*i);
                  m_pausedSounds->erase(i);
                  if(!m_playback)
                        playing(m_playback = true);
                  result = true;
                  break;
            }
      }

      unlock();

      return result;
}


Generated by  Doxygen 1.6.0   Back to index