~ubuntu-branches/debian/wheezy/mame/wheezy

« back to all changes in this revision

Viewing changes to src/emu/sound/es5506.c

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Emmanuel Kasper, Félix Arreola Rodríguez, Jordi Mallach
  • Date: 2011-05-11 21:06:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110511210650-jizvh8a6x117y9hr
Tags: 0.142-1
[ Emmanuel Kasper ]
* New upstream release
* Set NOWERROR=1 to allow compiling with gcc-4.6
* Remove fix_powerpc_build.patch, as upstream has taken it in this release
* Add gnome-video-arcade front end as a suggested package

[ Félix Arreola Rodríguez ]
* Add kfreebsd-build.patch to quilt series, to fix build on kfreebsd

[ Jordi Mallach ]
* Remove unneeded and bogus addition of --with-quilt to the dh invocation.
* Add Cesare Falco (long time Ubuntu maintainer) to Uploaders, and wrap
  them into multiple lines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
***********************************************************************************************/
82
82
 
83
83
#include "emu.h"
84
 
#include "streams.h"
85
84
#include "es5506.h"
86
85
 
87
86
 
262
261
        int i;
263
262
 
264
263
        /* allocate ulaw lookup table */
265
 
        chip->ulaw_lookup = auto_alloc_array(chip->device->machine, INT16, 1 << ULAW_MAXBITS);
 
264
        chip->ulaw_lookup = auto_alloc_array(chip->device->machine(), INT16, 1 << ULAW_MAXBITS);
266
265
 
267
266
        /* generate ulaw lookup table */
268
267
        for (i = 0; i < (1 << ULAW_MAXBITS); i++)
281
280
        }
282
281
 
283
282
        /* allocate volume lookup table */
284
 
        chip->volume_lookup = auto_alloc_array(chip->device->machine, UINT16, 4096);
 
283
        chip->volume_lookup = auto_alloc_array(chip->device->machine(), UINT16, 4096);
285
284
 
286
285
        /* generate volume lookup table */
287
286
        for (i = 0; i < 4096; i++)
911
910
                eslog = fopen("es.log", "w");
912
911
 
913
912
        /* create the stream */
914
 
        chip->stream = stream_create(device, 0, 2, device->clock() / (16*32), chip, es5506_update);
 
913
        chip->stream = device->machine().sound().stream_alloc(*device, 0, 2, device->clock() / (16*32), chip, es5506_update);
915
914
 
916
915
        /* initialize the regions */
917
 
        chip->region_base[0] = intf->region0 ? (UINT16 *)device->machine->region(intf->region0)->base() : NULL;
918
 
        chip->region_base[1] = intf->region1 ? (UINT16 *)device->machine->region(intf->region1)->base() : NULL;
919
 
        chip->region_base[2] = intf->region2 ? (UINT16 *)device->machine->region(intf->region2)->base() : NULL;
920
 
        chip->region_base[3] = intf->region3 ? (UINT16 *)device->machine->region(intf->region3)->base() : NULL;
 
916
        chip->region_base[0] = intf->region0 ? (UINT16 *)device->machine().region(intf->region0)->base() : NULL;
 
917
        chip->region_base[1] = intf->region1 ? (UINT16 *)device->machine().region(intf->region1)->base() : NULL;
 
918
        chip->region_base[2] = intf->region2 ? (UINT16 *)device->machine().region(intf->region2)->base() : NULL;
 
919
        chip->region_base[3] = intf->region3 ? (UINT16 *)device->machine().region(intf->region3)->base() : NULL;
921
920
 
922
921
        /* initialize the rest of the structure */
923
922
        chip->device = device;
941
940
        }
942
941
 
943
942
        /* allocate memory */
944
 
        chip->scratch = auto_alloc_array(device->machine, INT32, 2 * MAX_SAMPLE_CHUNK);
 
943
        chip->scratch = auto_alloc_array(device->machine(), INT32, 2 * MAX_SAMPLE_CHUNK);
945
944
 
946
945
        /* register save */
947
 
        state_save_register_device_item(device, 0, chip->sample_rate);
948
 
        state_save_register_device_item(device, 0, chip->write_latch);
949
 
        state_save_register_device_item(device, 0, chip->read_latch);
950
 
 
951
 
        state_save_register_device_item(device, 0, chip->current_page);
952
 
        state_save_register_device_item(device, 0, chip->active_voices);
953
 
        state_save_register_device_item(device, 0, chip->mode);
954
 
        state_save_register_device_item(device, 0, chip->wst);
955
 
        state_save_register_device_item(device, 0, chip->wend);
956
 
        state_save_register_device_item(device, 0, chip->lrend);
957
 
        state_save_register_device_item(device, 0, chip->irqv);
958
 
 
959
 
        state_save_register_device_item_pointer(device, 0, chip->scratch, 2 * MAX_SAMPLE_CHUNK);
 
946
        device->save_item(NAME(chip->sample_rate));
 
947
        device->save_item(NAME(chip->write_latch));
 
948
        device->save_item(NAME(chip->read_latch));
 
949
 
 
950
        device->save_item(NAME(chip->current_page));
 
951
        device->save_item(NAME(chip->active_voices));
 
952
        device->save_item(NAME(chip->mode));
 
953
        device->save_item(NAME(chip->wst));
 
954
        device->save_item(NAME(chip->wend));
 
955
        device->save_item(NAME(chip->lrend));
 
956
        device->save_item(NAME(chip->irqv));
 
957
 
 
958
        device->save_pointer(NAME(chip->scratch), 2 * MAX_SAMPLE_CHUNK);
960
959
 
961
960
        for (j = 0; j < 32; j++)
962
961
        {
963
 
                state_save_register_device_item(device, j, chip->voice[j].control);
964
 
                state_save_register_device_item(device, j, chip->voice[j].freqcount);
965
 
                state_save_register_device_item(device, j, chip->voice[j].start);
966
 
                state_save_register_device_item(device, j, chip->voice[j].lvol);
967
 
                state_save_register_device_item(device, j, chip->voice[j].end);
968
 
                state_save_register_device_item(device, j, chip->voice[j].lvramp);
969
 
                state_save_register_device_item(device, j, chip->voice[j].accum);
970
 
                state_save_register_device_item(device, j, chip->voice[j].rvol);
971
 
                state_save_register_device_item(device, j, chip->voice[j].rvramp);
972
 
                state_save_register_device_item(device, j, chip->voice[j].ecount);
973
 
                state_save_register_device_item(device, j, chip->voice[j].k2);
974
 
                state_save_register_device_item(device, j, chip->voice[j].k2ramp);
975
 
                state_save_register_device_item(device, j, chip->voice[j].k1);
976
 
                state_save_register_device_item(device, j, chip->voice[j].k1ramp);
977
 
                state_save_register_device_item(device, j, chip->voice[j].o4n1);
978
 
                state_save_register_device_item(device, j, chip->voice[j].o3n1);
979
 
                state_save_register_device_item(device, j, chip->voice[j].o3n2);
980
 
                state_save_register_device_item(device, j, chip->voice[j].o2n1);
981
 
                state_save_register_device_item(device, j, chip->voice[j].o2n2);
982
 
                state_save_register_device_item(device, j, chip->voice[j].o1n1);
983
 
                state_save_register_device_item(device, j, chip->voice[j].exbank);
984
 
                state_save_register_device_item(device, j, chip->voice[j].filtcount);
 
962
                device->save_item(NAME(chip->voice[j].control), j);
 
963
                device->save_item(NAME(chip->voice[j].freqcount), j);
 
964
                device->save_item(NAME(chip->voice[j].start), j);
 
965
                device->save_item(NAME(chip->voice[j].lvol), j);
 
966
                device->save_item(NAME(chip->voice[j].end), j);
 
967
                device->save_item(NAME(chip->voice[j].lvramp), j);
 
968
                device->save_item(NAME(chip->voice[j].accum), j);
 
969
                device->save_item(NAME(chip->voice[j].rvol), j);
 
970
                device->save_item(NAME(chip->voice[j].rvramp), j);
 
971
                device->save_item(NAME(chip->voice[j].ecount), j);
 
972
                device->save_item(NAME(chip->voice[j].k2), j);
 
973
                device->save_item(NAME(chip->voice[j].k2ramp), j);
 
974
                device->save_item(NAME(chip->voice[j].k1), j);
 
975
                device->save_item(NAME(chip->voice[j].k1ramp), j);
 
976
                device->save_item(NAME(chip->voice[j].o4n1), j);
 
977
                device->save_item(NAME(chip->voice[j].o3n1), j);
 
978
                device->save_item(NAME(chip->voice[j].o3n2), j);
 
979
                device->save_item(NAME(chip->voice[j].o2n1), j);
 
980
                device->save_item(NAME(chip->voice[j].o2n2), j);
 
981
                device->save_item(NAME(chip->voice[j].o1n1), j);
 
982
                device->save_item(NAME(chip->voice[j].exbank), j);
 
983
                device->save_item(NAME(chip->voice[j].filtcount), j);
985
984
        }
986
985
 
987
986
        /* success */
1111
1110
                {
1112
1111
                        chip->active_voices = data & 0x1f;
1113
1112
                        chip->sample_rate = chip->master_clock / (16 * (chip->active_voices + 1));
1114
 
                        stream_set_sample_rate(chip->stream, chip->sample_rate);
 
1113
                        chip->stream->set_sample_rate(chip->sample_rate);
1115
1114
 
1116
1115
                        if (LOG_COMMANDS && eslog)
1117
1116
                                fprintf(eslog, "active voices=%d, sample_rate=%d\n", chip->active_voices, chip->sample_rate);
1312
1311
                return;
1313
1312
 
1314
1313
        /* force an update */
1315
 
        stream_update(chip->stream);
 
1314
        chip->stream->update();
1316
1315
 
1317
1316
        /* switch off the page and register */
1318
1317
        if (chip->current_page < 0x20)
1521
1520
                fprintf(eslog, "read from %02x/%02x -> ", chip->current_page, offset / 4 * 8);
1522
1521
 
1523
1522
        /* force an update */
1524
 
        stream_update(chip->stream);
 
1523
        chip->stream->update();
1525
1524
 
1526
1525
        /* switch off the page and register */
1527
1526
        if (chip->current_page < 0x20)
1597
1596
 
1598
1597
INLINE void es5505_reg_write_low(es5506_state *chip, es5506_voice *voice, offs_t offset, UINT16 data, UINT16 mem_mask)
1599
1598
{
1600
 
        running_machine *machine = chip->device->machine;
 
1599
        running_machine &machine = chip->device->machine();
1601
1600
 
1602
1601
        switch (offset)
1603
1602
        {
1620
1619
                        }
1621
1620
 
1622
1621
                        if (LOG_COMMANDS && eslog)
1623
 
                                fprintf(eslog, "%s:voice %d, control=%04x (raw=%04x & %04x)\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->control, data, mem_mask ^ 0xffff);
 
1622
                                fprintf(eslog, "%s:voice %d, control=%04x (raw=%04x & %04x)\n", machine.describe_context(), chip->current_page & 0x1f, voice->control, data, mem_mask ^ 0xffff);
1624
1623
                        break;
1625
1624
 
1626
1625
                case 0x01:      /* FC */
1629
1628
                        if (ACCESSING_BITS_8_15)
1630
1629
                                voice->freqcount = (voice->freqcount & ~0x1fe00) | ((data & 0xff00) << 1);
1631
1630
                        if (LOG_COMMANDS && eslog)
1632
 
                                fprintf(eslog, "%s:voice %d, freq count=%08x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->freqcount);
 
1631
                                fprintf(eslog, "%s:voice %d, freq count=%08x\n", machine.describe_context(), chip->current_page & 0x1f, voice->freqcount);
1633
1632
                        break;
1634
1633
 
1635
1634
                case 0x02:      /* STRT (hi) */
1638
1637
                        if (ACCESSING_BITS_8_15)
1639
1638
                                voice->start = (voice->start & ~0x7c000000) | ((data & 0x1f00) << 18);
1640
1639
                        if (LOG_COMMANDS && eslog)
1641
 
                                fprintf(eslog, "%s:voice %d, loop start=%08x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->start);
 
1640
                                fprintf(eslog, "%s:voice %d, loop start=%08x\n", machine.describe_context(), chip->current_page & 0x1f, voice->start);
1642
1641
                        break;
1643
1642
 
1644
1643
                case 0x03:      /* STRT (lo) */
1647
1646
                        if (ACCESSING_BITS_8_15)
1648
1647
                                voice->start = (voice->start & ~0x0003fc00) | ((data & 0xff00) << 2);
1649
1648
                        if (LOG_COMMANDS && eslog)
1650
 
                                fprintf(eslog, "%s:voice %d, loop start=%08x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->start);
 
1649
                                fprintf(eslog, "%s:voice %d, loop start=%08x\n", machine.describe_context(), chip->current_page & 0x1f, voice->start);
1651
1650
                        break;
1652
1651
 
1653
1652
                case 0x04:      /* END (hi) */
1659
1658
                        voice->control |= CONTROL_STOP0;
1660
1659
#endif
1661
1660
                        if (LOG_COMMANDS && eslog)
1662
 
                                fprintf(eslog, "%s:voice %d, loop end=%08x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->end);
 
1661
                                fprintf(eslog, "%s:voice %d, loop end=%08x\n", machine.describe_context(), chip->current_page & 0x1f, voice->end);
1663
1662
                        break;
1664
1663
 
1665
1664
                case 0x05:      /* END (lo) */
1671
1670
                        voice->control |= CONTROL_STOP0;
1672
1671
#endif
1673
1672
                        if (LOG_COMMANDS && eslog)
1674
 
                                fprintf(eslog, "%s:voice %d, loop end=%08x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->end);
 
1673
                                fprintf(eslog, "%s:voice %d, loop end=%08x\n", machine.describe_context(), chip->current_page & 0x1f, voice->end);
1675
1674
                        break;
1676
1675
 
1677
1676
                case 0x06:      /* K2 */
1680
1679
                        if (ACCESSING_BITS_8_15)
1681
1680
                                voice->k2 = (voice->k2 & ~0xff00) | (data & 0xff00);
1682
1681
                        if (LOG_COMMANDS && eslog)
1683
 
                                fprintf(eslog, "%s:voice %d, K2=%04x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->k2);
 
1682
                                fprintf(eslog, "%s:voice %d, K2=%04x\n", machine.describe_context(), chip->current_page & 0x1f, voice->k2);
1684
1683
                        break;
1685
1684
 
1686
1685
                case 0x07:      /* K1 */
1689
1688
                        if (ACCESSING_BITS_8_15)
1690
1689
                                voice->k1 = (voice->k1 & ~0xff00) | (data & 0xff00);
1691
1690
                        if (LOG_COMMANDS && eslog)
1692
 
                                fprintf(eslog, "%s:voice %d, K1=%04x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->k1);
 
1691
                                fprintf(eslog, "%s:voice %d, K1=%04x\n", machine.describe_context(), chip->current_page & 0x1f, voice->k1);
1693
1692
                        break;
1694
1693
 
1695
1694
                case 0x08:      /* LVOL */
1696
1695
                        if (ACCESSING_BITS_8_15)
1697
1696
                                voice->lvol = (voice->lvol & ~0xff00) | (data & 0xff00);
1698
1697
                        if (LOG_COMMANDS && eslog)
1699
 
                                fprintf(eslog, "%s:voice %d, left vol=%04x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->lvol);
 
1698
                                fprintf(eslog, "%s:voice %d, left vol=%04x\n", machine.describe_context(), chip->current_page & 0x1f, voice->lvol);
1700
1699
                        break;
1701
1700
 
1702
1701
                case 0x09:      /* RVOL */
1703
1702
                        if (ACCESSING_BITS_8_15)
1704
1703
                                voice->rvol = (voice->rvol & ~0xff00) | (data & 0xff00);
1705
1704
                        if (LOG_COMMANDS && eslog)
1706
 
                                fprintf(eslog, "%s:voice %d, right vol=%04x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->rvol);
 
1705
                                fprintf(eslog, "%s:voice %d, right vol=%04x\n", machine.describe_context(), chip->current_page & 0x1f, voice->rvol);
1707
1706
                        break;
1708
1707
 
1709
1708
                case 0x0a:      /* ACC (hi) */
1712
1711
                        if (ACCESSING_BITS_8_15)
1713
1712
                                voice->accum = (voice->accum & ~0x7c000000) | ((data & 0x1f00) << 18);
1714
1713
                        if (LOG_COMMANDS && eslog)
1715
 
                                fprintf(eslog, "%s:voice %d, accum=%08x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->accum);
 
1714
                                fprintf(eslog, "%s:voice %d, accum=%08x\n", machine.describe_context(), chip->current_page & 0x1f, voice->accum);
1716
1715
                        break;
1717
1716
 
1718
1717
                case 0x0b:      /* ACC (lo) */
1721
1720
                        if (ACCESSING_BITS_8_15)
1722
1721
                                voice->accum = (voice->accum & ~0x0003fc00) | ((data & 0xff00) << 2);
1723
1722
                        if (LOG_COMMANDS && eslog)
1724
 
                                fprintf(eslog, "%s:voice %d, accum=%08x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->accum);
 
1723
                                fprintf(eslog, "%s:voice %d, accum=%08x\n", machine.describe_context(), chip->current_page & 0x1f, voice->accum);
1725
1724
                        break;
1726
1725
 
1727
1726
                case 0x0c:      /* unused */
1732
1731
                        {
1733
1732
                                chip->active_voices = data & 0x1f;
1734
1733
                                chip->sample_rate = chip->master_clock / (16 * (chip->active_voices + 1));
1735
 
                                stream_set_sample_rate(chip->stream, chip->sample_rate);
 
1734
                                chip->stream->set_sample_rate(chip->sample_rate);
1736
1735
 
1737
1736
                                if (LOG_COMMANDS && eslog)
1738
1737
                                        fprintf(eslog, "active voices=%d, sample_rate=%d\n", chip->active_voices, chip->sample_rate);
1752
1751
 
1753
1752
INLINE void es5505_reg_write_high(es5506_state *chip, es5506_voice *voice, offs_t offset, UINT16 data, UINT16 mem_mask)
1754
1753
{
1755
 
        running_machine *machine = chip->device->machine;
 
1754
        running_machine &machine = chip->device->machine();
1756
1755
 
1757
1756
        switch (offset)
1758
1757
        {
1770
1769
                                                                  ((data << 2) & (CONTROL_CA0 | CONTROL_CA1));
1771
1770
                        }
1772
1771
                        if (LOG_COMMANDS && eslog)
1773
 
                                fprintf(eslog, "%s:voice %d, control=%04x (raw=%04x & %04x)\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->control, data, mem_mask);
 
1772
                                fprintf(eslog, "%s:voice %d, control=%04x (raw=%04x & %04x)\n", machine.describe_context(), chip->current_page & 0x1f, voice->control, data, mem_mask);
1774
1773
                        break;
1775
1774
 
1776
1775
                case 0x01:      /* O4(n-1) */
1779
1778
                        if (ACCESSING_BITS_8_15)
1780
1779
                                voice->o4n1 = (INT16)((voice->o4n1 & ~0xff00) | (data & 0xff00));
1781
1780
                        if (LOG_COMMANDS && eslog)
1782
 
                                fprintf(eslog, "%s:voice %d, O4(n-1)=%05x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->o4n1 & 0x3ffff);
 
1781
                                fprintf(eslog, "%s:voice %d, O4(n-1)=%05x\n", machine.describe_context(), chip->current_page & 0x1f, voice->o4n1 & 0x3ffff);
1783
1782
                        break;
1784
1783
 
1785
1784
                case 0x02:      /* O3(n-1) */
1788
1787
                        if (ACCESSING_BITS_8_15)
1789
1788
                                voice->o3n1 = (INT16)((voice->o3n1 & ~0xff00) | (data & 0xff00));
1790
1789
                        if (LOG_COMMANDS && eslog)
1791
 
                                fprintf(eslog, "%s:voice %d, O3(n-1)=%05x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->o3n1 & 0x3ffff);
 
1790
                                fprintf(eslog, "%s:voice %d, O3(n-1)=%05x\n", machine.describe_context(), chip->current_page & 0x1f, voice->o3n1 & 0x3ffff);
1792
1791
                        break;
1793
1792
 
1794
1793
                case 0x03:      /* O3(n-2) */
1797
1796
                        if (ACCESSING_BITS_8_15)
1798
1797
                                voice->o3n2 = (INT16)((voice->o3n2 & ~0xff00) | (data & 0xff00));
1799
1798
                        if (LOG_COMMANDS && eslog)
1800
 
                                fprintf(eslog, "%s:voice %d, O3(n-2)=%05x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->o3n2 & 0x3ffff);
 
1799
                                fprintf(eslog, "%s:voice %d, O3(n-2)=%05x\n", machine.describe_context(), chip->current_page & 0x1f, voice->o3n2 & 0x3ffff);
1801
1800
                        break;
1802
1801
 
1803
1802
                case 0x04:      /* O2(n-1) */
1806
1805
                        if (ACCESSING_BITS_8_15)
1807
1806
                                voice->o2n1 = (INT16)((voice->o2n1 & ~0xff00) | (data & 0xff00));
1808
1807
                        if (LOG_COMMANDS && eslog)
1809
 
                                fprintf(eslog, "%s:voice %d, O2(n-1)=%05x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->o2n1 & 0x3ffff);
 
1808
                                fprintf(eslog, "%s:voice %d, O2(n-1)=%05x\n", machine.describe_context(), chip->current_page & 0x1f, voice->o2n1 & 0x3ffff);
1810
1809
                        break;
1811
1810
 
1812
1811
                case 0x05:      /* O2(n-2) */
1815
1814
                        if (ACCESSING_BITS_8_15)
1816
1815
                                voice->o2n2 = (INT16)((voice->o2n2 & ~0xff00) | (data & 0xff00));
1817
1816
                        if (LOG_COMMANDS && eslog)
1818
 
                                fprintf(eslog, "%s:voice %d, O2(n-2)=%05x\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->o2n2 & 0x3ffff);
 
1817
                                fprintf(eslog, "%s:voice %d, O2(n-2)=%05x\n", machine.describe_context(), chip->current_page & 0x1f, voice->o2n2 & 0x3ffff);
1819
1818
                        break;
1820
1819
 
1821
1820
                case 0x06:      /* O1(n-1) */
1824
1823
                        if (ACCESSING_BITS_8_15)
1825
1824
                                voice->o1n1 = (INT16)((voice->o1n1 & ~0xff00) | (data & 0xff00));
1826
1825
                        if (LOG_COMMANDS && eslog)
1827
 
                                fprintf(eslog, "%s:voice %d, O1(n-1)=%05x (accum=%08x)\n", cpuexec_describe_context(machine), chip->current_page & 0x1f, voice->o2n1 & 0x3ffff, voice->accum);
 
1826
                                fprintf(eslog, "%s:voice %d, O1(n-1)=%05x (accum=%08x)\n", machine.describe_context(), chip->current_page & 0x1f, voice->o2n1 & 0x3ffff, voice->accum);
1828
1827
                        break;
1829
1828
 
1830
1829
                case 0x07:
1840
1839
                        {
1841
1840
                                chip->active_voices = data & 0x1f;
1842
1841
                                chip->sample_rate = chip->master_clock / (16 * (chip->active_voices + 1));
1843
 
                                stream_set_sample_rate(chip->stream, chip->sample_rate);
 
1842
                                chip->stream->set_sample_rate(chip->sample_rate);
1844
1843
 
1845
1844
                                if (LOG_COMMANDS && eslog)
1846
1845
                                        fprintf(eslog, "active voices=%d, sample_rate=%d\n", chip->active_voices, chip->sample_rate);
1884
1883
                        {
1885
1884
                                chip->active_voices = data & 0x1f;
1886
1885
                                chip->sample_rate = chip->master_clock / (16 * (chip->active_voices + 1));
1887
 
                                stream_set_sample_rate(chip->stream, chip->sample_rate);
 
1886
                                chip->stream->set_sample_rate(chip->sample_rate);
1888
1887
 
1889
1888
                                if (LOG_COMMANDS && eslog)
1890
1889
                                        fprintf(eslog, "active voices=%d, sample_rate=%d\n", chip->active_voices, chip->sample_rate);
1907
1906
        es5506_state *chip = get_safe_token(device);
1908
1907
        es5506_voice *voice = &chip->voice[chip->current_page & 0x1f];
1909
1908
 
1910
 
//  logerror("%s:ES5505 write %02x/%02x = %04x & %04x\n", cpuexec_describe_context(machine), chip->current_page, offset, data, mem_mask);
 
1909
//  logerror("%s:ES5505 write %02x/%02x = %04x & %04x\n", machine.describe_context(), chip->current_page, offset, data, mem_mask);
1911
1910
 
1912
1911
        /* force an update */
1913
 
        stream_update(chip->stream);
 
1912
        chip->stream->update();
1914
1913
 
1915
1914
        /* switch off the page and register */
1916
1915
        if (chip->current_page < 0x20)
2123
2122
                fprintf(eslog, "read from %02x/%02x -> ", chip->current_page, offset);
2124
2123
 
2125
2124
        /* force an update */
2126
 
        stream_update(chip->stream);
 
2125
        chip->stream->update();
2127
2126
 
2128
2127
        /* switch off the page and register */
2129
2128
        if (chip->current_page < 0x20)