src/mess/machine/isa_gus.c
| r14407 | r14408 | |
| 267 | 267 | } |
| 268 | 268 | if(m_voice[x].voice_ctrl & 0x20) |
| 269 | 269 | { // 16-bit PCM (needs some work) |
| 270 | | m_voice[x].sample = (m_wave_ram[(current & 0xffffe)+1] & 0x7f); |
| 271 | | //m_voice[x].sample |= (m_wave_ram[current & 0xffffe]) >> 6; |
| 272 | | if(m_wave_ram[(current & 0xffffe)+1] & 0x80) |
| 273 | | m_voice[x].sample = -m_voice[x].sample; |
| 270 | m_voice[x].sample = (INT16)((m_wave_ram[(current & 0xffffe)+1]) | ((m_wave_ram[current & 0xffffe])<<8)>>8); |
| 274 | 271 | } |
| 275 | 272 | else |
| 276 | 273 | { // 8-bit PCM |
| 277 | | m_voice[x].sample = (m_wave_ram[current & 0xfffff] & 0x7f); |
| 278 | | if(m_wave_ram[current & 0xfffff] & 0x80) |
| 279 | | m_voice[x].sample = -m_voice[x].sample; |
| 274 | m_voice[x].sample = (INT8)m_wave_ram[current & 0xfffff]; |
| 280 | 275 | } |
| 281 | 276 | // TODO: implement proper panning |
| 282 | 277 | (*left) += ((m_voice[x].sample) * (vol/256)); |
| r14407 | r14408 | |
| 288 | 283 | else |
| 289 | 284 | m_voice[x].current_addr += (m_voice[x].freq_ctrl >> 1); |
| 290 | 285 | #ifdef LOG_SOUND |
| 291 | | INT32 smp = (m_voice[x].sample) * (vol / 32); |
| 286 | INT32 smp = (m_voice[x].sample) * (vol / 256); |
| 292 | 287 | fwrite(&smp,4,1,f); |
| 293 | 288 | #endif |
| 294 | 289 | } |