Audio Library

PreviousNext

Events

Overview

There are several events in EiffelMedia Audio Library. There is an event when music finishes playing or when a channel has done playing. But there are also other events, which are more complicated to see. Read on to learn more about them.

Finished events

There are two so called finished-events in this library. One of them fires, when music stops playing and the second one when a channel (a sound file) stops playing.

It's a very easy task to catch such events. Simply add an attribute of type EM_MUSIC_FINISHED and/or EM_CHANNEL_FINISHED. You then need to create this callback receiver and subscribe to the corresponding event. Whenever such an event happens, your passed feature will be called.

Effect events

These events happens only when you're programming an effect. Learn more about effects here. You don't have to subscribe to such an event as this is already done in EM_EFFECT for you. You only need to implement the deferred features and work with the sound data.

Stream events

These events are very similar to the effects events above. You only have to inherit from EM_AUDIO_STREAM and to implement the deferred features and fill in sound data whenever the feature is called. To learn more about streaming, please check this link.