static int check_all_funcs( int cpu_ref, int cpu_new ) { return check_pixel( cpu_ref, cpu_new ) + check_dct( cpu_ref, cpu_new ) + check_mc( cpu_ref, cpu_new ) + check_intra( cpu_ref, cpu_new ) + check_deblock( cpu_ref, cpu_new ) + check_quant( cpu_ref, cpu_new ) + check_cabac( cpu_ref, cpu_new ); }
int virt_setpatch(struct context_data *ctx, int chn, int ins, int smp, int note, int nna, int dct, int dca) { struct player_data *p = &ctx->p; int voc, vfree; if ((uint32)chn >= p->virt.virt_channels) return -1; if (ins < 0) smp = -1; #ifndef LIBXMP_CORE_DISABLE_IT if (dct) { int i; for (i = 0; i < p->virt.maxvoc; i++) check_dct(ctx, i, chn, ins, smp, note, dct, dca); } #endif voc = p->virt.virt_channel[chn].map; if (voc > FREE) { if (p->virt.voice_array[voc].act) { vfree = alloc_voice(ctx, chn); for (chn = p->virt.num_tracks; p->virt.virt_channel[chn++].map > FREE;) ; p->virt.voice_array[voc].chn = --chn; p->virt.virt_channel[chn].map = voc; voc = vfree; } } else { voc = alloc_voice(ctx, chn); } if (smp < 0) { virt_resetvoice(ctx, voc, 1); return chn; /* was -1 */ } mixer_setpatch(ctx, voc, smp); mixer_setnote(ctx, voc, note); p->virt.voice_array[voc].ins = ins; p->virt.voice_array[voc].act = nna; return chn; }