ERIS CORE

◆ generateFunctionList()

void AudioDirector::generateFunctionList ( )
protected

get the list of function types in the obj pool

Definition at line 256 of file AudioDirector.cpp.

256  {
257  //init the count and the container
258  category_count=0;
259  for (uint16_t j = 0; j < MAX_AUDIO_FUNCTION_CATEGORIES; j++){
260  functionsList[j] = 0;
261  }
262 
263  for (uint16_t i = 0; i < obj_count; i++){ //for each object
264  bool found;
265  found = false;
266  for (uint16_t j = 0; j < MAX_AUDIO_FUNCTION_CATEGORIES; j++){ //check if cat name is already in the list
267  if (functionsList[j] != 0){ //dont test uninitialized string pointers
268  if (strcmp(*functionsList[j],p_audiostream_obj_pool[i]->category)==0) found = true;
269  }
270  }
271  if (found==false) functionsList[category_count++] = (char**)&p_audiostream_obj_pool[i]->category; //add to the list if not existing
272  if (category_count==MAX_AUDIO_FUNCTION_CATEGORIES) return; //limit the result list to the size of the category buffer
273  }
274 }
AudioStream * p_audiostream_obj_pool[MAX_AUDIO_STREAM_OBJECTS]
Definition: AudioDirector.h:71
char **volatile functionsList[MAX_AUDIO_FUNCTION_CATEGORIES]
Definition: AudioDirector.h:80
uint16_t category_count
Definition: AudioDirector.h:78
uint16_t obj_count
Definition: AudioDirector.h:77

References category_count, functionsList, obj_count, and p_audiostream_obj_pool.

Referenced by AudioDirector(), getFunctionCount(), and getFunctionListItem().

+ Here is the caller graph for this function: