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

« back to all changes in this revision

Viewing changes to src/mame/audio/vicdual.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:
120
120
 
121
121
 
122
122
MACHINE_CONFIG_FRAGMENT( frogs_audio )
123
 
        MCFG_SOUND_ADD("samples", SAMPLES, 0)
124
 
        MCFG_SOUND_CONFIG(frogs_samples_interface)
 
123
        MCFG_SAMPLES_ADD("samples", frogs_samples_interface)
125
124
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
126
125
 
127
126
        MCFG_SOUND_ADD("discrete", DISCRETE, 0)
132
131
 
133
132
static TIMER_CALLBACK( frogs_croak_callback )
134
133
{
135
 
        device_t *samples = machine.device("samples");
136
 
        sample_stop(samples, 2);
 
134
        samples_device *samples = machine.device<samples_device>("samples");
 
135
        samples->stop(2);
137
136
}
138
137
 
139
138
 
145
144
 
146
145
WRITE8_HANDLER( frogs_audio_w )
147
146
{
148
 
        device_t *samples = space->machine().device("samples");
 
147
        samples_device *samples = space->machine().device<samples_device>("samples");
149
148
        device_t *discrete = space->machine().device("discrete");
150
149
        static int last_croak = 0;
151
150
        static int last_buzzz = 0;
160
159
//  discrete_sound_w(discrete, FROGS_SPLASH_EN, data & 0x80);
161
160
 
162
161
        if (data & 0x01)
163
 
                sample_start (samples, 3, 3, 0);        // Hop
 
162
                samples->start(3, 3);   // Hop
164
163
        if (data & 0x02)
165
 
                sample_start (samples, 0, 0, 0);        // Boing
 
164
                samples->start(0, 0);   // Boing
166
165
        if (new_croak)
167
 
                sample_start (samples, 2, 2, 0);        // Croak
 
166
                samples->start(2, 2);   // Croak
168
167
        else
169
168
        {
170
169
                if (last_croak)
187
186
         * 12 seconds.
188
187
         */
189
188
                if (!last_buzzz)
190
 
                        sample_start (samples, 1, 1, 1);        // Buzzz
 
189
                        samples->start(1, 1, true);     // Buzzz
191
190
        }
192
191
        else
193
 
                sample_stop(samples, 1);
 
192
                samples->stop(1);
194
193
        if (data & 0x80)
195
 
                sample_start (samples, 4, 4, 0);        // Splash
 
194
                samples->start(4, 4);   // Splash
196
195
 
197
196
        last_croak = new_croak;
198
197
        last_buzzz = new_buzzz;