indexing description: "[ Base class for effects. Inherit from this class to be able to receive callbacks to modify audio data. Note: This effect may boost your CPU. Do not use effects when having a lot of other things (like drawing). Effects may also be used to get RAW sound data. Just grab the data, but do not modify. ]" date: "$Date$" revision: "$Revision$" deferred class EM_EFFECT inherit MIX_EFFECT_DONE_T_CALLBACK rename on_callback as on_effect_done_internal end MIX_EFFECT_FUNC_T_CALLBACK rename on_callback as on_effect_function_internal end feature -- Internal Callback on_effect_function_internal (a_channel: INTEGER; a_stream: POINTER; a_length: INTEGER; a_userdata: POINTER)is -- This feature is called whenever data is ready to apply the effect on. -- -- Use `a_stream' to modify data of an maximum amount of `a_length' bytes. -- Additional user data is given by `a_userdata' on creation of the effect. do on_effect_function (a_channel + 1, a_stream, a_length, a_userdata) end on_effect_done_internal (a_channel: INTEGER; a_userdata: POINTER) is -- This feature is called when the effect was unregistered from `a_channel'. -- -- Additional user data is given by `a_userdata' on creation of the effect. do on_effect_done (a_channel + 1, a_userdata) end feature -- Callback on_effect_function (a_channel: INTEGER; a_stream: POINTER; a_length: INTEGER; a_userdata: POINTER)is -- This feature is called whenever data is ready to apply the effect on. -- -- Use `a_stream' to modify data of an maximum amount of `a_length' bytes. -- Additional user data is given by `a_userdata' on creation of the effect. deferred end on_effect_done (a_channel: INTEGER; a_userdata: POINTER) is -- This feature is called when the effect was unregistered from `a_channel'. -- -- Additional user data is given by `a_userdata' on creation of the effect. deferred end feature -- Access effect_function: POINTER -- Effect function pointer effect_done: POINTER -- Effect done function pointer feature -- Setters set_effect_function (a_function: like effect_function) is -- Sets the effect function pointer. do effect_function := a_function ensure function_set: effect_function = a_function end set_effect_done (a_function: like effect_done) is -- Sets the effect done function pointer. do effect_done := a_function ensure done_function_set: effect_done = a_function end end