diff options
author | 2008-12-12 06:11:15 +0000 | |
---|---|---|
committer | 2008-12-12 06:11:15 +0000 | |
commit | b400e7978bb626a14196fae7b45bb89dfeeae249 (patch) | |
tree | 454f1b103d0f8e80e719dbf37251b2304c07a91e /src/emu/sound/samples.c | |
parent | 9dc496610928a3adee6c2d46f954634fcb83063a (diff) |
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Thursday, December 11, 2008 6:52 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] deprecat.h cpu cleanup
Hi mamedev,
This patch purges the last few uses of deprecat.h from the cpu cores,
plus a handful of other Machine cases elsewhere that were found by
script inspection.
~aa
--
Hi mamedev,
This patch eliminates most uses of deprecat.h in the sound cores by
attaching the device to the state object and using it where
appropriate. Given that all the cpu objects use this convention, and
three sound cores already do this, this seemed an appropriate
approach.
~aa
Diffstat (limited to 'src/emu/sound/samples.c')
-rw-r--r-- | src/emu/sound/samples.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/emu/sound/samples.c b/src/emu/sound/samples.c index b45190a767b..ca497e6bfb8 100644 --- a/src/emu/sound/samples.c +++ b/src/emu/sound/samples.c @@ -1,6 +1,5 @@ #include "driver.h" #include "streams.h" -#include "deprecat.h" #include "samples.h" @@ -20,6 +19,7 @@ struct sample_channel struct samples_info { + const device_config *device; int numchannels; /* how many channels */ struct sample_channel *channel;/* array of channels */ struct loaded_samples *samples;/* array of samples */ @@ -261,7 +261,7 @@ void sample_start_n(int num,int channel,int samplenum,int loop) chan->pos = 0; chan->frac = 0; chan->basefreq = sample->frequency; - chan->step = ((INT64)chan->basefreq << FRAC_BITS) / Machine->sample_rate; + chan->step = ((INT64)chan->basefreq << FRAC_BITS) / info->device->machine->sample_rate; chan->loop = loop; } @@ -290,7 +290,7 @@ void sample_start_raw_n(int num,int channel,const INT16 *sampledata,int samples, chan->pos = 0; chan->frac = 0; chan->basefreq = frequency; - chan->step = ((INT64)chan->basefreq << FRAC_BITS) / Machine->sample_rate; + chan->step = ((INT64)chan->basefreq << FRAC_BITS) / info->device->machine->sample_rate; chan->loop = loop; } @@ -312,7 +312,7 @@ void sample_set_freq_n(int num,int channel,int freq) /* force an update before we start */ stream_update(chan->stream); - chan->step = ((INT64)freq << FRAC_BITS) / Machine->sample_rate; + chan->step = ((INT64)freq << FRAC_BITS) / info->device->machine->sample_rate; } void sample_set_freq(int channel,int freq) @@ -537,6 +537,7 @@ static SND_START( samples ) info = auto_malloc(sizeof(*info)); memset(info, 0, sizeof(*info)); + info->device = device; sndintrf_register_token(info); /* read audio samples */ |