AW EVENT NOISE

From ActiveWiki
Jump to navigation Jump to search


Minimum requirements
Added in version 4.1
SDKbuild 53


AW_EVENT_NOISE

Description

Play sound.

Notes

The recepient of this event may choose not to play the sound. For browsers it depends on sound effects being enabled. See: Options (menu) => Settings (submenu) => General (tab), "[X] Play sound effects (WAV, MP3, Midi Notes)" (checkbox).

Attributes

AW_SOUND_NAME

Triggered by

Usage

Play tick.mp3 to the current instance.

void handle_noise (void)
{
  printf ("Play sound %s\n", aw_string (AW_SOUND_NAME));
}

int main (int argc, char *argv[])
{
  /* ... */
  
  aw_event_set (AW_EVENT_NOISE, handle_noise);
  
  /* ... */ 
  
  aw_string_set (AW_SOUND_NAME, "tick.mp3");
  aw_noise (aw_session ());
  
  /* ... */
}