~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/audio/suna8.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        suna8_state *state = device->machine().driver_data<suna8_state>();
17
17
        if( data )
18
18
        {
 
19
                samples_device *samples = downcast<samples_device *>(device);
19
20
                if( ~data & 0x10 )
20
21
                {
21
 
                        sample_start_raw(device, 0, &state->m_samplebuf[0x800*state->m_sample], 0x0800, 4000, 0);
 
22
                        samples->start_raw(0, &state->m_samplebuf[0x800*state->m_sample], 0x0800, 4000);
22
23
                }
23
24
                else if( ~data & 0x08 )
24
25
                {
25
26
                        state->m_sample &= 3;
26
 
                        sample_start_raw(device, 0, &state->m_samplebuf[0x800*(state->m_sample+7)], 0x0800, 4000, 0);
 
27
                        samples->start_raw(0, &state->m_samplebuf[0x800*(state->m_sample+7)], 0x0800, 4000);
27
28
                }
28
29
        }
29
30
}
35
36
        {
36
37
                if(( state->m_sample != 0 ) && ( ~data & 0x30 ))        // don't play state->m_sample zero when the bit is active
37
38
                {
38
 
                        sample_start_raw(device, 0, &state->m_samplebuf[0x800*state->m_sample], 0x0800, 4000, 0);
 
39
                        samples_device *samples = downcast<samples_device *>(device);
 
40
                        samples->start_raw(0, &state->m_samplebuf[0x800*state->m_sample], 0x0800, 4000);
39
41
                }
40
42
        }
41
43
}
48
50
 
49
51
SAMPLES_START( suna8_sh_start )
50
52
{
51
 
        suna8_state *state = device->machine().driver_data<suna8_state>();
52
 
        running_machine &machine = device->machine();
53
 
        int i, len = machine.region("samples")->bytes();
54
 
        UINT8 *ROM = machine.region("samples")->base();
 
53
        suna8_state *state = device.machine().driver_data<suna8_state>();
 
54
        running_machine &machine = device.machine();
 
55
        int i, len = state->memregion("samples")->bytes();
 
56
        UINT8 *ROM = state->memregion("samples")->base();
55
57
 
56
58
        state->m_samplebuf = auto_alloc_array(machine, INT16, len);
57
59