summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/audit.c4
-rw-r--r--src/emu/clifront.c2
-rw-r--r--src/emu/info.c4
-rw-r--r--src/emu/machine/laserdsc.c6
-rw-r--r--src/emu/machine/laserdsc.h4
-rw-r--r--src/emu/sound/2203intf.h2
-rw-r--r--src/emu/sound/2608intf.h2
-rw-r--r--src/emu/sound/2610intf.c4
-rw-r--r--src/emu/sound/ay8910.c12
-rw-r--r--src/emu/sound/ay8910.h8
-rw-r--r--src/emu/sound/custom.c2
-rw-r--r--src/emu/sound/custom.h5
-rw-r--r--src/emu/sound/samples.c2
-rw-r--r--src/emu/sound/samples.h3
-rw-r--r--src/emu/sound/sn76477.c6
-rw-r--r--src/emu/sound/sn76477.h3
16 files changed, 38 insertions, 31 deletions
diff --git a/src/emu/audit.c b/src/emu/audit.c
index 0332b133b4d..3ad452149b6 100644
--- a/src/emu/audit.c
+++ b/src/emu/audit.c
@@ -130,7 +130,7 @@ int audit_samples(core_options *options, const game_driver *gamedrv, audit_recor
for (sndnum = 0; sndnum < ARRAY_LENGTH(config->sound); sndnum++)
if (config->sound[sndnum].type == SOUND_SAMPLES)
{
- const struct Samplesinterface *intf = (const struct Samplesinterface *)config->sound[sndnum].config;
+ const samples_interface *intf = (const samples_interface *)config->sound[sndnum].config;
if (intf->samplenames != NULL)
{
@@ -155,7 +155,7 @@ int audit_samples(core_options *options, const game_driver *gamedrv, audit_recor
for (sndnum = 0; sndnum < ARRAY_LENGTH(config->sound); sndnum++)
if (config->sound[sndnum].type == SOUND_SAMPLES)
{
- const struct Samplesinterface *intf = (const struct Samplesinterface *)config->sound[sndnum].config;
+ const samples_interface *intf = (const samples_interface *)config->sound[sndnum].config;
const char *sharedname = NULL;
if (intf->samplenames != NULL)
diff --git a/src/emu/clifront.c b/src/emu/clifront.c
index e7ad38ee971..b1a2a0905f9 100644
--- a/src/emu/clifront.c
+++ b/src/emu/clifront.c
@@ -565,7 +565,7 @@ int cli_info_listsamples(core_options *options, const char *gamename)
for (sndnum = 0; sndnum < MAX_SOUND && config->sound[sndnum].type != SOUND_DUMMY; sndnum++)
if (config->sound[sndnum].type == SOUND_SAMPLES)
{
- const char *const *samplenames = ((const struct Samplesinterface *)config->sound[sndnum].config)->samplenames;
+ const char *const *samplenames = ((const samples_interface *)config->sound[sndnum].config)->samplenames;
int sampnum;
/* if the list is legit, walk it and print the sample info */
diff --git a/src/emu/info.c b/src/emu/info.c
index ff6e5d18283..0ba5e0552db 100644
--- a/src/emu/info.c
+++ b/src/emu/info.c
@@ -499,7 +499,7 @@ static void print_game_sampleof(FILE *out, const game_driver *game, const machin
for (sndnum = 0; sndnum < ARRAY_LENGTH(config->sound) && config->sound[sndnum].type != SOUND_DUMMY; sndnum++)
if (config->sound[sndnum].type == SOUND_SAMPLES)
{
- const char *const *samplenames = ((const struct Samplesinterface *)config->sound[sndnum].config)->samplenames;
+ const char *const *samplenames = ((const samples_interface *)config->sound[sndnum].config)->samplenames;
if (samplenames != NULL)
{
int sampnum;
@@ -533,7 +533,7 @@ static void print_game_sample(FILE *out, const game_driver *game, const machine_
for (sndnum = 0; sndnum < ARRAY_LENGTH(config->sound) && config->sound[sndnum].type != SOUND_DUMMY; sndnum++)
if (config->sound[sndnum].type == SOUND_SAMPLES)
{
- const char *const *samplenames = ((const struct Samplesinterface *)config->sound[sndnum].config)->samplenames;
+ const char *const *samplenames = ((const samples_interface *)config->sound[sndnum].config)->samplenames;
if (samplenames != NULL)
{
int sampnum;
diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c
index 6c186e4fc4f..61398379243 100644
--- a/src/emu/machine/laserdsc.c
+++ b/src/emu/machine/laserdsc.c
@@ -304,7 +304,7 @@ static void read_track_data(laserdisc_state *ld);
static void process_track_data(const device_config *device);
static void fake_metadata(UINT32 track, UINT8 which, vbi_metadata *metadata);
static void render_display(UINT16 *videodata, UINT32 rowpixels, UINT32 width, int frame);
-static void *custom_start(int clock, const struct CustomSound_interface *config);
+static void *custom_start(int clock, const custom_sound_interface *config);
static void custom_stream_callback(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
/* Pioneer PR-7820 implementation */
@@ -351,7 +351,7 @@ static void vp932_state_changed(laserdisc_state *ld, UINT8 oldstate);
GLOBAL VARIABLES
***************************************************************************/
-const struct CustomSound_interface laserdisc_custom_interface =
+const custom_sound_interface laserdisc_custom_interface =
{
custom_start
};
@@ -1484,7 +1484,7 @@ static void render_display(UINT16 *videodata, UINT32 rowpixels, UINT32 width, in
for laserdiscs
-------------------------------------------------*/
-static void *custom_start(int clock, const struct CustomSound_interface *config)
+static void *custom_start(int clock, const custom_sound_interface *config)
{
sound_token *token = auto_malloc(sizeof(*token));
token->stream = stream_create(0, 2, 48000, token, custom_stream_callback);
diff --git a/src/emu/machine/laserdsc.h b/src/emu/machine/laserdsc.h
index 211bc022fef..04b22f7451b 100644
--- a/src/emu/machine/laserdsc.h
+++ b/src/emu/machine/laserdsc.h
@@ -14,6 +14,8 @@
#ifndef __LASERDSC_H__
#define __LASERDSC_H__
+#include "sound/custom.h"
+
/***************************************************************************
@@ -92,7 +94,7 @@ struct _laserdisc_config
GLOBAL VARIABLES
***************************************************************************/
-extern const struct CustomSound_interface laserdisc_custom_interface;
+extern const custom_sound_interface laserdisc_custom_interface;
diff --git a/src/emu/sound/2203intf.h b/src/emu/sound/2203intf.h
index 6ce0e3fabf2..b15b1ef9ac0 100644
--- a/src/emu/sound/2203intf.h
+++ b/src/emu/sound/2203intf.h
@@ -5,7 +5,7 @@
struct YM2203interface
{
- const struct AY8910interface ay8910_intf;
+ const AY8910_interface ay8910_intf;
void (*handler)(running_machine *machine, int irq);
};
diff --git a/src/emu/sound/2608intf.h b/src/emu/sound/2608intf.h
index d447979987c..e009e481f52 100644
--- a/src/emu/sound/2608intf.h
+++ b/src/emu/sound/2608intf.h
@@ -6,7 +6,7 @@
struct YM2608interface
{
- const struct AY8910interface ay8910_intf;
+ const AY8910_interface ay8910_intf;
void ( *handler )( running_machine *machine, int irq ); /* IRQ handler for the YM2608 */
};
diff --git a/src/emu/sound/2610intf.c b/src/emu/sound/2610intf.c
index e0dcfb8c239..f9974b9d20e 100644
--- a/src/emu/sound/2610intf.c
+++ b/src/emu/sound/2610intf.c
@@ -123,7 +123,7 @@ static STATE_POSTLOAD( ym2610_postload )
static void *ym2610_start(const char *tag, int sndindex, int clock, const void *config)
{
static const struct YM2610interface generic_2610 = { 0 };
- static const struct AY8910interface generic_ay8910 =
+ static const AY8910_interface generic_ay8910 =
{
AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
AY8910_DEFAULT_LOADS,
@@ -189,7 +189,7 @@ static void ym2610b_stream_update(void *param, stream_sample_t **inputs, stream_
static void *ym2610b_start(const char *tag, int sndindex, int clock, const void *config)
{
static const struct YM2610interface generic_2610 = { 0 };
- static const struct AY8910interface generic_ay8910 =
+ static const AY8910_interface generic_ay8910 =
{
AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
AY8910_DEFAULT_LOADS,
diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c
index 1844f5f7558..13ac3db100d 100644
--- a/src/emu/sound/ay8910.c
+++ b/src/emu/sound/ay8910.c
@@ -164,7 +164,7 @@ struct _ay8910_context
int streams;
int ready;
sound_stream *channel;
- const struct AY8910interface *intf;
+ const AY8910_interface *intf;
INT32 register_latch;
UINT8 regs[16];
INT32 last_enable;
@@ -657,7 +657,7 @@ static void ay8910_statesave(ay8910_context *psg, int sndindex)
*
*************************************/
-void *ay8910_start_ym(sound_type chip_type, int sndindex, int clock, const struct AY8910interface *intf)
+void *ay8910_start_ym(sound_type chip_type, int sndindex, int clock, const AY8910_interface *intf)
{
ay8910_context *info;
@@ -818,25 +818,25 @@ int ay8910_read_ym(void *chip)
static void *ay8910_start(const char *tag, int sndindex, int clock, const void *config)
{
- static const struct AY8910interface generic_ay8910 =
+ static const AY8910_interface generic_ay8910 =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
NULL, NULL, NULL, NULL
};
- const struct AY8910interface *intf = (config ? config : &generic_ay8910);
+ const AY8910_interface *intf = (config ? config : &generic_ay8910);
return ay8910_start_ym(SOUND_AY8910, sndindex+16, clock, intf);
}
static void *ym2149_start(const char *tag, int sndindex, int clock, const void *config)
{
- static const struct AY8910interface generic_ay8910 =
+ static const AY8910_interface generic_ay8910 =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
NULL, NULL, NULL, NULL
};
- const struct AY8910interface *intf = (config ? config : &generic_ay8910);
+ const AY8910_interface *intf = (config ? config : &generic_ay8910);
return ay8910_start_ym(SOUND_YM2149, sndindex+16, clock, intf);
}
diff --git a/src/emu/sound/ay8910.h b/src/emu/sound/ay8910.h
index b00718d6513..6cc8120fcf9 100644
--- a/src/emu/sound/ay8910.h
+++ b/src/emu/sound/ay8910.h
@@ -56,10 +56,11 @@ YMZ294: 0 I/O port
* mixing modul (i.e. mpatrol ties 6 channels from
* AY-3-8910 together). Do not use it now.
*/
-/* TODO: implement mixing modul */
+/* TODO: implement mixing module */
#define AY8910_RAW_OUTPUT (8)
-struct AY8910interface
+typedef struct _AY8910_interface AY8910_interface;
+struct _AY8910_interface
{
int flags; /* Flags */
int res_load[3]; /* Load on channel in ohms */
@@ -69,6 +70,7 @@ struct AY8910interface
write8_machine_func portBwrite;
};
+
void ay8910_set_volume(int chip,int channel,int volume);
@@ -122,7 +124,7 @@ WRITE16_HANDLER( AY8910_write_port_4_msb_w );
/*********** An interface for SSG of YM2203 ***********/
-void *ay8910_start_ym(sound_type chip_type, int sndindex, int clock, const struct AY8910interface *intf);
+void *ay8910_start_ym(sound_type chip_type, int sndindex, int clock, const AY8910_interface *intf);
void ay8910_stop_ym(void *chip);
void ay8910_reset_ym(void *chip);
diff --git a/src/emu/sound/custom.c b/src/emu/sound/custom.c
index d54c42616c4..3384da40cb0 100644
--- a/src/emu/sound/custom.c
+++ b/src/emu/sound/custom.c
@@ -4,7 +4,7 @@
struct custom_info
{
- const struct CustomSound_interface *intf;
+ const custom_sound_interface *intf;
void * token;
};
diff --git a/src/emu/sound/custom.h b/src/emu/sound/custom.h
index 45422b3579d..303a7be6118 100644
--- a/src/emu/sound/custom.h
+++ b/src/emu/sound/custom.h
@@ -1,9 +1,10 @@
#ifndef CUSTOM_H
#define CUSTOM_H
-struct CustomSound_interface
+typedef struct _custom_sound_interface custom_sound_interface;
+struct _custom_sound_interface
{
- void *(*start)(int clock, const struct CustomSound_interface *config);
+ void *(*start)(int clock, const custom_sound_interface *config);
void (*stop)(void *token);
void (*reset)(void *token);
void *extra_data;
diff --git a/src/emu/sound/samples.c b/src/emu/sound/samples.c
index 731ff0baa94..ecec83e0e0d 100644
--- a/src/emu/sound/samples.c
+++ b/src/emu/sound/samples.c
@@ -532,7 +532,7 @@ static STATE_POSTLOAD( samples_postload )
static void *samples_start(const char *tag, int sndindex, int clock, const void *config)
{
int i;
- const struct Samplesinterface *intf = config;
+ const samples_interface *intf = config;
struct samples_info *info;
info = auto_malloc(sizeof(*info));
diff --git a/src/emu/sound/samples.h b/src/emu/sound/samples.h
index 2ff8e7cadf3..03ec3496436 100644
--- a/src/emu/sound/samples.h
+++ b/src/emu/sound/samples.h
@@ -14,7 +14,8 @@ struct loaded_samples
struct loaded_sample sample[1]; /* array of samples */
};
-struct Samplesinterface
+typedef struct _samples_interface samples_interface;
+struct _samples_interface
{
int channels; /* number of discrete audio channels needed */
const char *const *samplenames;
diff --git a/src/emu/sound/sn76477.c b/src/emu/sound/sn76477.c
index dd7d5755598..6b08c76337c 100644
--- a/src/emu/sound/sn76477.c
+++ b/src/emu/sound/sn76477.c
@@ -98,7 +98,7 @@
#if TEST_MODE
#include "input.h"
-static const struct SN76477interface empty_interface =
+static const SN76477_interface empty_interface =
{
0, /* 4 noise_clock_res */
0, /* 5 filter_res */
@@ -2390,11 +2390,11 @@ static void state_save_register(struct SN76477 *sn)
static void *sn76477_start(const char *tag, int sndindex, int clock, const void *config)
{
struct SN76477 *sn;
- struct SN76477interface *intf;
+ SN76477_interface *intf;
#if TEST_MODE == 0
- intf = (struct SN76477interface *)config;
+ intf = (SN76477_interface *)config;
#else
intf = &test_interface;
#endif
diff --git a/src/emu/sound/sn76477.h b/src/emu/sound/sn76477.h
index d224cbe2ca8..5eb7b137f89 100644
--- a/src/emu/sound/sn76477.h
+++ b/src/emu/sound/sn76477.h
@@ -46,7 +46,8 @@
*
*****************************************************************************/
-struct SN76477interface
+typedef struct _SN76477_interface SN76477_interface;
+struct _SN76477_interface
{
double noise_clock_res;
double noise_filter_res;