trunk/src/emu/sound/l7a1045_l6028_dsp_a.c
| r245567 | r245568 | |
| 73 | 73 | |
| 74 | 74 | Sample data format TBA |
| 75 | 75 | |
| 76 | TODO: |
| 77 | - Sample format needs to be double checked; |
| 78 | - Octave Control/BPM/Pitch, right now XRally Network BGM wants 66150 Hz which is definitely too fast for Terry Bogard speech; |
| 79 | - Key Off; |
| 80 | - ADSR (registers 2 & 4?); |
| 81 | |
| 76 | 82 | ***************************************************************************/ |
| 77 | 83 | |
| 78 | 84 | #include "emu.h" |
| r245567 | r245568 | |
| 110 | 116 | void l7a1045_sound_device::device_start() |
| 111 | 117 | { |
| 112 | 118 | /* Allocate the stream */ |
| 113 | | m_stream = stream_alloc(0, 2, 44100); //clock() / 384); |
| 119 | m_stream = stream_alloc(0, 2, 66150); //clock() / 384); |
| 114 | 120 | |
| 115 | 121 | m_rom = m_region->base(); |
| 116 | 122 | m_rom_size = m_region->bytes(); |
| r245567 | r245568 | |
| 164 | 170 | |
| 165 | 171 | |
| 166 | 172 | data = m_rom[(start + pos) & (m_rom_size-1)]; |
| 167 | | sample = (INT8)data; |
| 173 | sample = ((INT8)(data & 0xfc)) << (3 - (data & 3)); |
| 168 | 174 | frac += step; |
| 169 | 175 | |
| 170 | | outputs[0][j] += ((sample * vptr->l_volume) >> 8); |
| 171 | | outputs[1][j] += ((sample * vptr->r_volume) >> 8); |
| 176 | outputs[0][j] += ((sample * vptr->l_volume) >> 9); |
| 177 | outputs[1][j] += ((sample * vptr->r_volume) >> 9); |
| 172 | 178 | } |
| 173 | 179 | |
| 174 | 180 | vptr->pos = pos; |
| r245567 | r245568 | |
| 322 | 328 | { |
| 323 | 329 | l7a1045_voice *vptr = &m_voice[m_audiochannel]; |
| 324 | 330 | |
| 325 | | #if 1 |
| 331 | #if 0 |
| 326 | 332 | if(vptr->start != 0) |
| 327 | 333 | { |
| 328 | 334 | printf("%08x START\n",vptr->start); |