void Linear_controls_osc_depth_slide_value(Linear_controls* lc, const Tstamp* length) { rassert(lc != NULL); rassert(length != NULL); LFO_set_depth_slide(&lc->lfo, length); return; }
static int Entry_cmp(const Entry* e1, const Entry* e2) { rassert(e1 != NULL); rassert(e1->input >= 0); rassert(e2 != NULL); rassert(e2->input >= 0); return e1->input - e2->input; }
void Cgiter_clear_returned_status(Cgiter* cgiter) { rassert(cgiter != NULL); rassert(cgiter->row_returned); cgiter->row_returned = false; return; }
void Rangemap_vstate_init(Voice_state* vstate, const Proc_state* proc_state) { rassert(vstate != NULL); rassert(proc_state != NULL); vstate->render_voice = Rangemap_vstate_render_voice; return; }
bool Device_thread_state_is_input_port_connected( const Device_thread_state* ts, int port) { rassert(ts != NULL); rassert(port >= 0); rassert(port < KQT_DEVICE_PORTS_MAX); return Bit_array_get(ts->in_connected, port); }
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); }
void Linear_controls_slide_value_length(Linear_controls* lc, const Tstamp* length) { rassert(lc != NULL); rassert(length != NULL); Slider_set_length(&lc->slider, length); return; }
Connections* new_Connections_from_string( Streader* sr, Connection_level level, Au_table* au_table, Device* master) { rassert(sr != NULL); rassert(au_table != NULL); rassert(master != NULL); if (Streader_is_error_set(sr)) return NULL; Connections* graph = memory_alloc_item(Connections); if (graph == NULL) { Streader_set_memory_error( sr, "Could not allocate memory for connections"); return NULL; } graph->nodes = NULL; graph->nodes = new_AAtree( (int (*)(const void*, const void*))Device_node_cmp, (void (*)(void*))del_Device_node); mem_error_if(graph->nodes == NULL, graph, NULL, sr); Device_node* master_node = NULL; if (level == CONNECTION_LEVEL_AU) { const Device* iface = Audio_unit_get_output_interface((Audio_unit*)master); master_node = new_Device_node("", au_table, iface); } else { master_node = new_Device_node("", au_table, master); } mem_error_if(master_node == NULL, graph, NULL, sr); mem_error_if(!AAtree_ins(graph->nodes, master_node), graph, master_node, sr); if (!Streader_has_data(sr)) return graph; read_conn_data rcdata = { graph, level, au_table, master }; if (!Streader_read_list(sr, read_connection, &rcdata)) { del_Connections(graph); return NULL; } if (Connections_is_cyclic(graph)) { Streader_set_error(sr, "The connection graph contains a cycle"); del_Connections(graph); return NULL; } return graph; }
// Drops a value for the given token. void drop(token_type token) { rassert(token < values_.size()); rassert(!is_free_[token]); values_[token] = T(); free_.push_back(token); #ifndef NDEBUG is_free_[token] = true; #endif }
bool Event_control_env_set_var_name_process( General_state* global_state, Channel* channel, const Value* value) { rassert(global_state != NULL); rassert(channel != NULL); rassert(value != NULL); rassert(value->type == VALUE_TYPE_STRING); return set_active_name(&channel->parent, ACTIVE_CAT_ENV, value); }
void Au_state_set_voice_signal_plan(Au_state* au_state, Voice_signal_plan* plan) { rassert(au_state != NULL); rassert(plan != NULL); del_Voice_signal_plan(au_state->voice_signal_plan); au_state->voice_signal_plan = plan; return; }
void Env_var_set_value(Env_var* var, const Value* value) { rassert(var != NULL); rassert(value != NULL); rassert(var->value.type == value->type); Value_copy(&var->value, value); return; }
static void recover(Streader* sr, int64_t pos) { rassert(sr != NULL); rassert(pos <= sr->pos); Streader_clear_error(sr); sr->pos = pos; return; }
void Linear_controls_set_value(Linear_controls* lc, double value) { rassert(lc != NULL); rassert(isfinite(value)); lc->value = value; Slider_break(&lc->slider); return; }
const Value* Event_cache_get_value(const Event_cache* cache, const char* event_name) { rassert(cache != NULL); rassert(event_name != NULL); Event_state* state = AAtree_get_exact(cache->cache, event_name); rassert(state != NULL); return &state->value; }
void Pat_table_set_existent(Pat_table* table, int index, bool existent) { rassert(table != NULL); rassert(index >= 0); rassert(index < table->size); Bit_array_set(table->existents, index, existent); return; }
void Linear_controls_set_tempo(Linear_controls* lc, double tempo) { rassert(lc != NULL); rassert(tempo > 0); Slider_set_tempo(&lc->slider, tempo); LFO_set_tempo(&lc->lfo, tempo); return; }
const Track_list* Module_get_track_list(const Module* module) { rassert(module != NULL); if (!module->album_is_existent) return NULL; rassert(module->track_list != NULL); return module->track_list; }
static int32_t Module_get_au_index_from_input(const Module* module, int32_t input) { rassert(module != NULL); rassert(input >= 0); if (module->au_map == NULL) return -1; return Input_map_get_device_index(module->au_map, input); }
bool Event_control_resume_process( General_state* global_state, Channel* channel, const Value* value) { rassert(global_state != NULL); rassert(channel != NULL); ignore(value); global_state->pause = false; return true; }
bool Device_thread_state_add_mixed_buffer( Device_thread_state* ts, Device_port_type type, int port) { rassert(ts != NULL); rassert(type < DEVICE_PORT_TYPES); rassert(port >= 0); rassert(port < KQT_DEVICE_PORTS_MAX); return Device_thread_state_add_buffer(ts, DEVICE_BUFFER_MIXED, type, port); }
void Device_thread_state_set_node_state( Device_thread_state* ts, Device_node_state node_state) { rassert(ts != NULL); rassert(node_state < DEVICE_NODE_STATE_COUNT); ts->node_state = node_state; return; }
Work_buffer* Device_thread_state_get_voice_buffer( const Device_thread_state* ts, Device_port_type type, int port) { rassert(ts != NULL); rassert(type < DEVICE_PORT_TYPES); rassert(port >= 0); rassert(port < KQT_DEVICE_PORTS_MAX); return Device_thread_state_get_buffer(ts, DEVICE_BUFFER_VOICE, type, port); }
void Device_thread_state_mark_input_port_connected(Device_thread_state* ts, int port) { rassert(ts != NULL); rassert(port >= 0); rassert(port < KQT_DEVICE_PORTS_MAX); Bit_array_set(ts->in_connected, port, true); return; }
void Module_set_mix_vol(Module* module, double mix_vol) { rassert(module != NULL); rassert(isfinite(mix_vol) || mix_vol == -INFINITY); module->mix_vol_dB = mix_vol; module->mix_vol = exp2(mix_vol / 6); return; }
void Module_set_bind(Module* module, Bind* bind) { rassert(module != NULL); rassert(bind != NULL); del_Bind(module->bind); module->bind = bind; return; }
void Module_set_control(Module* module, int control, bool existent) { rassert(module != NULL); rassert(control >= 0); rassert(control < KQT_CONTROLS_MAX); Bit_array_set(module->au_controls, control, existent); return; }
void Pat_table_remove(Pat_table* table, int index) { rassert(table != NULL); rassert(index >= 0); rassert(index < table->size); Etable_remove(table->pats, index); return; }
bool Event_master_pattern_delay_process( Master_params* master_params, const Value* value) { rassert(master_params != NULL); rassert(value != NULL); rassert(value->type == VALUE_TYPE_TSTAMP); Tstamp_copy(&master_params->delay_left, &value->value.Tstamp_type); return true; }
void Linear_controls_set_audio_rate(Linear_controls* lc, int32_t audio_rate) { rassert(lc != NULL); rassert(audio_rate > 0); Slider_set_audio_rate(&lc->slider, audio_rate); LFO_set_audio_rate(&lc->lfo, audio_rate); return; }