public K007232() { this.name = "007232"; this.sound_num = Mame.SOUND_K007232; for (int i = 0; i < Mame.MAX_K007232; i++) { kpcm[i] = new kdacApcm(); } }
public override int start(Mame.MachineSound msound) { intf = (K007232_interface)msound.sound_interface; /* Set up the chips */ for (int j = 0; j < intf.num_chips; j++) { //char buf[2][40]; string[] name = new string[2]; int[] vol = new int[2]; kpcm[j] = new kdacApcm(); kpcm[j].pcmbuf[0] = Mame.memory_region(intf.bank[j]); kpcm[j].pcmbuf[1] = Mame.memory_region(intf.bank[j]); for (int i = 0; i < KDAC_A_PCM_MAX; i++) { kpcm[j].start[i] = 0; kpcm[j].step[i] = 0; kpcm[j].play[i] = 0; kpcm[j].loop[i] = 0; } kpcm[j].vol[0][0] = 255; /* channel A output to output A */ kpcm[j].vol[0][1] = 0; kpcm[j].vol[1][0] = 0; kpcm[j].vol[1][1] = 255; /* channel B output to output B */ for (int i = 0; i < 0x10; i++) kpcm[j].wreg[i] = 0; for (int i = 0; i < 2; i++) { name[i] = Mame.sprintf("007232 #%d Ch %c", j, 'A' + i); } vol[0] = intf.volume[j] & 0xffff; vol[1] = intf.volume[j] >> 16; pcm_chan[j] = Mame.stream_init_multi(2, name, vol, Mame.Machine.sample_rate, j, KDAC_A_update); } KDAC_A_make_fncode(); return 0; }