12#ifndef TT_INCLUDE__AUDIOCALLBACKLISTCLASS_H
13#define TT_INCLUDE__AUDIOCALLBACKLISTCLASS_H
17#include "engine_vector.h"
21template<
typename Callback>
22struct AUDIO_CALLBACK_STRUCT
30template<
typename Callback>
31class AudioCallbackListClass :
32 public SimpleDynVecClass<AUDIO_CALLBACK_STRUCT<Callback>>
37 Callback Get_Callback(
int index, uint32* userData)
40 *userData = (*this)[index].userData;
41 return (*
this)[index].callback;
46 void Add_Callback(Callback callback, uint32 userData)
48 AUDIO_CALLBACK_STRUCT<Callback> callbackStruct = {callback, userData};
54 void Remove_Callback(Callback callback)
56 for (
int index = 0; index < Count(); ++index)
58 if ((*
this)[index].callback == callback)