bool Pat_table_set(Pat_table* table, int index, Pattern* pat) { rassert(table != NULL); rassert(index >= 0); rassert(index < table->size); rassert(pat != NULL); return Etable_set(table->pats, index, pat); }
bool DSP_table_set_dsp(DSP_table* table, int index, DSP* dsp) { assert(table != NULL); assert(index >= 0); assert(index < table->size); assert(dsp != NULL); if (!Etable_set(table->dsps, index, dsp)) return false; Device_set_existent((Device*)dsp, Bit_array_get(table->existents, index)); return true; }
static bool Device_thread_state_add_buffer( Device_thread_state* ts, Device_buffer_type buf_type, Device_port_type port_type, int port) { rassert(ts != NULL); rassert(buf_type < DEVICE_BUFFER_TYPES); rassert(port_type < DEVICE_PORT_TYPES); rassert(port >= 0); rassert(port < KQT_DEVICE_PORTS_MAX); if (Etable_get(ts->buffers[buf_type][port_type], port) != NULL) return true; Work_buffer* wb = new_Work_buffer(ts->audio_buffer_size); if ((wb == NULL) || !Etable_set(ts->buffers[buf_type][port_type], port, wb)) { del_Work_buffer(wb); return false; } return true; }