void audio_device_register_change_render_3d(struct s_session *sp, int enabled) { if (sp->new_config == NULL) { ac_create(&sp->new_config); } assert(sp->new_config); sp->new_config->render_3d = enabled; }
void audio_device_register_change_device(struct s_session *sp, audio_desc_t new_dev) { if (sp->new_config == NULL) { ac_create(&sp->new_config); } assert(sp->new_config); sp->new_config->device = new_dev; }
void audio_device_register_change_primary(struct s_session *sp, codec_id_t primary) { if (sp->new_config == NULL) { ac_create(&sp->new_config); } assert(sp->new_config); sp->new_config->primary = primary; }
int audio_device_get_safe_config(audio_config **ppac) { if (ac_create(ppac)) { audio_config *pac = *ppac; pac->device = audio_get_null_device(); pac->primary = codec_get_by_name("PCMU-8K-Mono"); pac->render_3d = FALSE; assert(pac->primary); return TRUE; } return FALSE; }
int main(int argc, char *argv[]) { p_node root = node_init(); int i = 0; printf("Please input pattern number:"); int num = 0; scanf("%d",&num); char tmp_str[MAX_SIZE]; printf("Please input patterns:\n"); while(num) { scanf("%s", tmp_str); insert_str(root, tmp_str); num --; } node_get_count(root, &i); node_init_status(root, status, &status_count); ac_create(); printf("base:"); for (i = 0; i < status_count; i++) { printf("%d ", ac_base[i]); } printf("\nnext:"); for (i = 0; i < status_count; i++) { printf("%d ", ac_next[i]); } printf("\ncheck:"); for (i = 0; i < status_count; i++) { printf("%d ", ac_check[i]); } printf("\nPlease input txt:"); scanf("%s", tmp_str); run(tmp_str); return 0; }