trunk/src/emu/sound/t6w28.c
| r18578 | r18579 | |
| 233 | 233 | left -= nextevent; |
| 234 | 234 | } while (left > 0); |
| 235 | 235 | |
| 236 | | out0 = vol[4] * m_volume[4] + vol[5] * m_volume[5] + |
| 237 | | vol[6] * m_volume[6] + vol[3] * m_volume[7]; |
| 236 | if (m_enabled) |
| 237 | { |
| 238 | out0 = vol[4] * m_volume[4] + vol[5] * m_volume[5] + |
| 239 | vol[6] * m_volume[6] + vol[3] * m_volume[7]; |
| 238 | 240 | |
| 239 | | out1 = vol[4] * m_volume[0] + vol[5] * m_volume[1] + |
| 240 | | vol[6] * m_volume[2] + vol[3] * m_volume[3]; |
| 241 | out1 = vol[4] * m_volume[0] + vol[5] * m_volume[1] + |
| 242 | vol[6] * m_volume[2] + vol[3] * m_volume[3]; |
| 243 | } |
| 244 | else |
| 245 | { |
| 246 | out0 = 0; |
| 247 | out1 = 0; |
| 248 | } |
| 241 | 249 | |
| 242 | 250 | if (out0 > MAX_OUTPUT * STEP) out0 = MAX_OUTPUT * STEP; |
| 243 | 251 | if (out1 > MAX_OUTPUT * STEP) out1 = MAX_OUTPUT * STEP; |
| r18578 | r18579 | |
| 328 | 336 | save_item(NAME(m_period)); |
| 329 | 337 | save_item(NAME(m_count)); |
| 330 | 338 | save_item(NAME(m_output)); |
| 339 | save_item(NAME(m_enabled)); |
| 331 | 340 | } |
| 332 | 341 | |
| 342 | |
| 343 | void t6w28_device::set_enable(bool enable) |
| 344 | { |
| 345 | m_enabled = enable; |
| 346 | } |
| 347 | |
| 333 | 348 | const device_type T6W28 = &device_creator<t6w28_device>; |
| 334 | 349 | |
| 335 | 350 | t6w28_device::t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |