int tia_sh_start(const struct MachineSound *msound) { // int i, res; intf = msound->sound_interface; if (Machine->sample_rate == 0) return 0; sample_pos = 0; channel = mixer_allocate_channel(intf->volume); if ((buffer = malloc(sizeof(INT16) * BUFFER_LEN)) == 0) return 1; memset(buffer,0,sizeof(INT16) * BUFFER_LEN); Tia_sound_init (intf->clock, Machine->sample_rate); return 0; }
void *atari_2600_new(void) { t_atari_2600 *x = (t_atari_2600 *)pd_new(atari_2600_class); x->x15 = 0; x->x16 = 0; x->x17 = 0; x->x18 = 0; x->x19 = 0; x->x1a = 0; floatinlet_new(&x->x_obj, &x->x15); floatinlet_new(&x->x_obj, &x->x17); floatinlet_new(&x->x_obj, &x->x19); floatinlet_new(&x->x_obj, &x->x16); floatinlet_new(&x->x_obj, &x->x18); floatinlet_new(&x->x_obj, &x->x1a); outlet_new(&x->x_obj, &s_signal); Tia_sound_init(x, 32000, 32000); return (x); }