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

bool AUD_SoftwareDevice::sendMessage ( AUD_Handle handle,
AUD_Message message 
) [virtual]

Sends a message to a sound or all sounds that are currently played or paused.

Parameters:
handle The sound that should receive the message or NULL if all sounds should receive it.
message The message.
Returns:
True if the message has been read by at least one sound.

Implements AUD_IDevice.

Definition at line 314 of file AUD_SoftwareDevice.cpp.

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

{
      lock();

      bool result = false;

      if(handle == 0)
      {
            for(AUD_HandleIterator i = m_playingSounds->begin();
                  i != m_playingSounds->end(); i++)
                  result |= (*i)->reader->notify(message);
            for(AUD_HandleIterator i = m_pausedSounds->begin();
                  i != m_pausedSounds->end(); i++)
                  result |= (*i)->reader->notify(message);
      }
      else if(isValid(handle))
            result = ((AUD_SoftwareHandle*)handle)->reader->notify(message);
      unlock();
      return result;
}


Generated by  Doxygen 1.6.0   Back to index