summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/sound')
-rw-r--r--src/emu/sound/aica.c8
-rw-r--r--src/emu/sound/bsmt2000.c2
-rw-r--r--src/emu/sound/okiadpcm.c2
-rw-r--r--src/emu/sound/okim9810.c48
-rw-r--r--src/emu/sound/okim9810.h10
-rw-r--r--src/emu/sound/rf5c68.c2
-rw-r--r--src/emu/sound/sn76496.c2
-rw-r--r--src/emu/sound/spu.c130
-rw-r--r--src/emu/sound/spu.h2
-rw-r--r--src/emu/sound/spu_tables.c4
-rw-r--r--src/emu/sound/spureverb.c8
-rw-r--r--src/emu/sound/spureverb.h32
12 files changed, 125 insertions, 125 deletions
diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c
index dd645ac4021..ca10f73af89 100644
--- a/src/emu/sound/aica.c
+++ b/src/emu/sound/aica.c
@@ -142,9 +142,9 @@ struct _SLOT
#define SCILV1(aica) ((aica->udata.data[0xac/2]>>0x0)&0xff)
#define SCILV2(aica) ((aica->udata.data[0xb0/2]>>0x0)&0xff)
-#define MCIEB(aica) ((aica->udata.data[0xb4/2]>>0x0)&0xff)
-#define MCIPD(aica) ((aica->udata.data[0xb8/2]>>0x0)&0xff)
-#define MCIRE(aica) ((aica->udata.data[0xbc/2]>>0x0)&0xff)
+#define MCIEB(aica) ((aica->udata.data[0xb4/2]>>0x0)&0xff)
+#define MCIPD(aica) ((aica->udata.data[0xb8/2]>>0x0)&0xff)
+#define MCIRE(aica) ((aica->udata.data[0xbc/2]>>0x0)&0xff)
#define SCIEX0 0
#define SCIEX1 1
@@ -880,7 +880,7 @@ static void AICA_UpdateRegR(aica_state *AICA, int reg)
struct _SLOT *slot=AICA->Slots+slotnum;
unsigned int CA = 0;
- if (PCMS(slot) == 0) // 16-bit samples
+ if (PCMS(slot) == 0) // 16-bit samples
{
CA = (slot->cur_addr>>(SHIFT-1))&AICA->RAM_MASK16;
}
diff --git a/src/emu/sound/bsmt2000.c b/src/emu/sound/bsmt2000.c
index d25a14037bb..93fcf158f5d 100644
--- a/src/emu/sound/bsmt2000.c
+++ b/src/emu/sound/bsmt2000.c
@@ -111,7 +111,7 @@ bsmt2000_device_config::bsmt2000_device_config(const machine_config &mconfig, co
device_config_sound_interface(mconfig, *this),
device_config_memory_interface(mconfig, *this),
m_space_config("samples", ENDIANNESS_LITTLE, 8, 32, 0, NULL, *ADDRESS_MAP_NAME(bsmt2000)),
- m_ready_callback(NULL)
+ m_ready_callback(NULL)
{
m_shortname = "bsmt2000";
}
diff --git a/src/emu/sound/okiadpcm.c b/src/emu/sound/okiadpcm.c
index 98ebc4386e9..75f81ccb33e 100644
--- a/src/emu/sound/okiadpcm.c
+++ b/src/emu/sound/okiadpcm.c
@@ -176,7 +176,7 @@ void oki_adpcm2_state::compute_tables()
// compute the step value
int stepval = floor(floatstep * 1.08f);
floatstep = floatstep * 1.08f;
-
+
// loop over all nibbles and compute the difference
for (int nib = 0; nib < 16; nib++)
{
diff --git a/src/emu/sound/okim9810.c b/src/emu/sound/okim9810.c
index b02f8f1703c..775f1843448 100644
--- a/src/emu/sound/okim9810.c
+++ b/src/emu/sound/okim9810.c
@@ -18,7 +18,7 @@
const device_type OKIM9810 = okim9810_device_config::static_alloc_device_config;
-// volume lookup table. The manual lists a full 16 steps, 2dB per step.
+// volume lookup table. The manual lists a full 16 steps, 2dB per step.
// Given the dB values, that seems to map to a 7-bit volume control.
const UINT8 okim9810_device::okim_voice::s_volume_table[16] =
{
@@ -41,7 +41,7 @@ const UINT8 okim9810_device::okim_voice::s_volume_table[16] =
};
// sampling frequency lookup table.
-const UINT32 okim9810_device::s_sampling_freq_table[16] =
+const UINT32 okim9810_device::s_sampling_freq_table[16] =
{
4000,
8000,
@@ -199,7 +199,7 @@ void okim9810_device::sound_stream_update(sound_stream &stream, stream_sample_t
// reset the output streams
memset(outputs[0], 0, samples * sizeof(*outputs[0]));
memset(outputs[1], 0, samples * sizeof(*outputs[1]));
-
+
// iterate over voices and accumulate sample data
for (int voicenum = 0; voicenum < OKIM9810_VOICES; voicenum++)
m_voice[voicenum].generate_audio(*m_direct, outputs, samples, m_global_volume, clock(), m_filter_type);
@@ -242,19 +242,19 @@ void okim9810_device::write_command(UINT8 data)
{
const UINT8 cmd = (data & 0xf8) >> 3;
const UINT8 channel = (data & 0x07);
-
+
switch(cmd)
{
case 0x00: // START
{
- mame_printf_debug("START channel mask %02x\n", m_TMP_register);
+ mame_printf_debug("START channel mask %02x\n", m_TMP_register);
UINT8 channelMask = 0x01;
for (int i = 0; i < OKIM9810_VOICES; i++, channelMask <<= 1)
{
if (channelMask & m_TMP_register)
{
m_voice[i].m_playing = true;
- mame_printf_debug("\t\tPlaying channel %d: encoder type %d @ %dhz (volume = %d %d). From %08x for %d samples (looping=%d).\n",
+ mame_printf_debug("\t\tPlaying channel %d: encoder type %d @ %dhz (volume = %d %d). From %08x for %d samples (looping=%d).\n",
i,
m_voice[i].m_playbackAlgo,
m_voice[i].m_samplingFreq,
@@ -282,7 +282,7 @@ void okim9810_device::write_command(UINT8 data)
break;
}
case 0x02: // LOOP
- {
+ {
mame_printf_debug("LOOP channel mask %02x\n", m_TMP_register);
UINT8 channelMask = 0x01;
for (int i = 0; i < OKIM9810_VOICES; i++, channelMask <<= 1)
@@ -313,11 +313,11 @@ void okim9810_device::write_command(UINT8 data)
}
case 0x04: // MUON (silence)
{
- mame_printf_warning("MUON channel %d length %02x\n", channel, m_TMP_register);
+ mame_printf_warning("MUON channel %d length %02x\n", channel, m_TMP_register);
mame_printf_warning("MSM9810: UNIMPLEMENTED COMMAND!\n");
break;
}
-
+
case 0x05: // FADR (phrase address)
{
const offs_t base = m_TMP_register * 8;
@@ -343,7 +343,7 @@ void okim9810_device::write_command(UINT8 data)
startAddr = m_direct->read_raw_byte(subTable + 1) << 16;
startAddr |= m_direct->read_raw_byte(subTable + 2) << 8;
startAddr |= m_direct->read_raw_byte(subTable + 3) << 0;
-
+
// TODO: What does byte (subTable + 4) refer to?
endAddr = m_direct->read_raw_byte(subTable + 5) << 16;
endAddr |= m_direct->read_raw_byte(subTable + 6) << 8;
@@ -359,7 +359,7 @@ void okim9810_device::write_command(UINT8 data)
m_voice[channel].m_playbackAlgo = (startFlags & 0x30) >> 4;
m_voice[channel].m_samplingFreq = s_sampling_freq_table[startFlags & 0x0f];
- if (m_voice[channel].m_playbackAlgo == OKIM9810_ADPCM_PLAYBACK ||
+ if (m_voice[channel].m_playbackAlgo == OKIM9810_ADPCM_PLAYBACK ||
m_voice[channel].m_playbackAlgo == OKIM9810_ADPCM2_PLAYBACK)
m_voice[channel].m_count *= 2;
else
@@ -388,13 +388,13 @@ void okim9810_device::write_command(UINT8 data)
{
const UINT8 leftVolIndex = (m_TMP_register & 0xf0) >> 4;
const UINT8 rightVolIndex = m_TMP_register & 0x0f;
- mame_printf_debug("PAN channel %d left index: %02x right index: %02x (%02x)\n", channel, leftVolIndex, rightVolIndex, m_TMP_register);
- mame_printf_debug("\tChannel %d left -> %d right -> %d\n", channel, leftVolIndex, rightVolIndex);
+ mame_printf_debug("PAN channel %d left index: %02x right index: %02x (%02x)\n", channel, leftVolIndex, rightVolIndex, m_TMP_register);
+ mame_printf_debug("\tChannel %d left -> %d right -> %d\n", channel, leftVolIndex, rightVolIndex);
m_voice[channel].m_pan_volume_left = leftVolIndex;
m_voice[channel].m_pan_volume_right = rightVolIndex;
break;
}
- default:
+ default:
{
mame_printf_warning("MSM9810: UNKNOWN COMMAND!\n");
break;
@@ -456,8 +456,8 @@ okim9810_device::okim_voice::okim_voice()
// add them to an output stream
//-------------------------------------------------
-void okim9810_device::okim_voice::generate_audio(direct_read_data &direct,
- stream_sample_t **buffers,
+void okim9810_device::okim_voice::generate_audio(direct_read_data &direct,
+ stream_sample_t **buffers,
int samples,
const UINT8 global_volume,
const UINT32 clock,
@@ -494,13 +494,13 @@ void okim9810_device::okim_voice::generate_audio(direct_read_data &direct,
case OKIM9810_ADPCM_PLAYBACK:
{
m_adpcm.reset();
- m_startSample = (INT32)m_adpcm.clock(nibble0);
+ m_startSample = (INT32)m_adpcm.clock(nibble0);
break;
}
case OKIM9810_ADPCM2_PLAYBACK:
{
m_adpcm2.reset();
- m_startSample = (INT32)m_adpcm2.clock(nibble0);
+ m_startSample = (INT32)m_adpcm2.clock(nibble0);
break;
}
default:
@@ -519,12 +519,12 @@ void okim9810_device::okim_voice::generate_audio(direct_read_data &direct,
{
case OKIM9810_ADPCM_PLAYBACK:
{
- m_endSample = (INT32)m_adpcm.clock(nibble1);
+ m_endSample = (INT32)m_adpcm.clock(nibble1);
break;
}
case OKIM9810_ADPCM2_PLAYBACK:
{
- m_endSample = (INT32)m_adpcm2.clock(nibble1);
+ m_endSample = (INT32)m_adpcm2.clock(nibble1);
break;
}
default:
@@ -574,8 +574,8 @@ void okim9810_device::okim_voice::generate_audio(direct_read_data &direct,
//-------------------------------------------------
-// volume_scale - computes the volume equation as
-// seen on page 29 of the docs.
+// volume_scale - computes the volume equation as
+// seen on page 29 of the docs.
// Returns a value from the volume lookup table.
//-------------------------------------------------
@@ -587,9 +587,9 @@ UINT8 okim9810_device::okim_voice::volume_scale(const UINT8 global_volume_index,
const UINT8& L = pan_volume_index;
const UINT8& O = global_volume_index;
UINT32 index = (V+L) + (O*3);
-
+
if (index > 15)
index = 15;
-
+
return s_volume_table[index];
}
diff --git a/src/emu/sound/okim9810.h b/src/emu/sound/okim9810.h
index 1bc2db9791c..b1c5c01f5e3 100644
--- a/src/emu/sound/okim9810.h
+++ b/src/emu/sound/okim9810.h
@@ -4,8 +4,8 @@
OKI MSM9810 ADCPM(2) sound chip.
- Notes:
- The master clock frequency for this chip can range from 3.5MHz to 4.5Mhz.
+ Notes:
+ The master clock frequency for this chip can range from 3.5MHz to 4.5Mhz.
The typical oscillator is a 4.096Mhz crystal.
***************************************************************************/
@@ -124,8 +124,8 @@ protected:
{
public:
okim_voice();
- void generate_audio(direct_read_data &direct,
- stream_sample_t **buffers,
+ void generate_audio(direct_read_data &direct,
+ stream_sample_t **buffers,
int samples,
const UINT8 global_volume,
const UINT32 clock,
@@ -168,7 +168,7 @@ protected:
direct_read_data* m_direct;
UINT8 m_TMP_register;
-
+
UINT8 m_global_volume; // volume index set with the OPT command
UINT8 m_filter_type; // interpolation filter type set with the OPT command
UINT8 m_output_level; // flag stating if a voltage follower is connected
diff --git a/src/emu/sound/rf5c68.c b/src/emu/sound/rf5c68.c
index 01fca50bfff..ba756d0ec56 100644
--- a/src/emu/sound/rf5c68.c
+++ b/src/emu/sound/rf5c68.c
@@ -169,7 +169,7 @@ READ8_DEVICE_HANDLER( rf5c68_r )
chip->stream->update();
shift = (offset & 1) ? 11 + 8 : 11;
-// printf("%08x\n",(chip->chan[(offset & 0x0e) >> 1].addr));
+// printf("%08x\n",(chip->chan[(offset & 0x0e) >> 1].addr));
return (chip->chan[(offset & 0x0e) >> 1].addr) >> (shift);
}
diff --git a/src/emu/sound/sn76496.c b/src/emu/sound/sn76496.c
index 642421cfb54..e3d66fbed62 100644
--- a/src/emu/sound/sn76496.c
+++ b/src/emu/sound/sn76496.c
@@ -104,7 +104,7 @@
frequency register, while the others have 0x400 as before. Should fix a bug
or two on sega games, particularly Vigilante on Sega Master System. Verified
on SMS hardware.
-
+
TODO: * Implement the TMS9919 - any difference to sn94624?
* Implement the T6W28; has registers in a weird order, needs writes
to be 'sanitized' first. Also is stereo, similar to game gear.
diff --git a/src/emu/sound/spu.c b/src/emu/sound/spu.c
index 7f203ab7f9a..4ffbe31f845 100644
--- a/src/emu/sound/spu.c
+++ b/src/emu/sound/spu.c
@@ -1,9 +1,9 @@
/*
-
+
Sony PlayStation SPU (CXD2922BQ/CXD2925Q) emulator
by pSXAuthor
MAME adaptation by R. Belmont
-
+
*/
#include "emu.h"
@@ -23,7 +23,7 @@
//#define show_xa_debug
//#ifndef _FINAL
-// #define show_cache_update
+// #define show_cache_update
//#endif
#ifdef show_xa_debug
@@ -32,7 +32,7 @@
#define debug_xa if (0)
#endif
-//
+//
//
//
INLINE unsigned int min(unsigned int a, unsigned int b)
@@ -125,10 +125,10 @@ enum srrr_flags
};
static const unsigned int sound_buffer_size=65536*4,
- xa_sector_size=(18*28*8)<<1,
- xa_buffer_sectors=16,
- cdda_sector_size=2352,
- cdda_buffer_sectors=16,
+ xa_sector_size=(18*28*8)<<1,
+ xa_buffer_sectors=16,
+ cdda_sector_size=2352,
+ cdda_buffer_sectors=16,
num_loop_cache_packets=4,
num_loop_cache_samples=num_loop_cache_packets*28,
spu_ram_size=512*1024,
@@ -341,7 +341,7 @@ public:
static unsigned int cache_size;
sample_cache()
- : invalid_start(0xffffffff),
+ : invalid_start(0xffffffff),
invalid_end(0),
last_update_end(0xffffffff),
data(NULL),
@@ -527,12 +527,12 @@ class stream_buffer
public:
stream_buffer(const unsigned int _sector_size,
const unsigned int _num_sectors)
- : head(0),
+ : head(0),
tail(0),
in(0),
sector_size(_sector_size),
num_sectors(_num_sectors),
- marker_head(NULL),
+ marker_head(NULL),
marker_tail(NULL)
{
buffer_size=sector_size*num_sectors;
@@ -575,7 +575,7 @@ public:
while ((marker_tail) && (marker_tail->sector>=sector))
{
-// debug_xa("flushing: %d\n", marker_tail->sector);
+// debug_xa("flushing: %d\n", marker_tail->sector);
stream_marker *xam=marker_tail;
head=xam->offset;
@@ -622,7 +622,7 @@ public:
bool passed=(((olddist==0) && (dist!=0)) || (dist>olddist));
if (! passed) break;
-// debug_xa("passed: %d\n",marker_head->sector);
+// debug_xa("passed: %d\n",marker_head->sector);
stream_marker *xam=marker_head;
marker_head=xam->next;
@@ -896,11 +896,11 @@ bool spu_device::cache_pointer::update(spu_device *spu)
{
if ((cache) && (! cache->valid))
{
-/* log(log_spu,"cache_pointer::update: block %08x-%08x invalidated %08x-%08x\n",
- cache->start,
- cache->end,
- cache->invalid_start,
- cache->invalid_end);*/
+/* log(log_spu,"cache_pointer::update: block %08x-%08x invalidated %08x-%08x\n",
+ cache->start,
+ cache->end,
+ cache->invalid_start,
+ cache->invalid_end);*/
if (! cache->try_update(spu))
{
@@ -1335,7 +1335,7 @@ void spu_device::update_vol(const unsigned int addr)
case 3: printf("exp dec: phase=%d val=%02x\n",(newval>>12)&1,newval&0x7f); break;
}
#endif
- }
+ }
else
{
voice[v].vol[ch]=((int)newval<<17)>>17;
@@ -1397,9 +1397,9 @@ void spu_device::flush_cache(sample_cache *sc,
for (unsigned int a=sc->start; a<sc->end; a+=16)
cache[a>>4]=NULL;
-/* log_static(log_spu,"cache_invalidate: %08x->%08x\n",
- sc->start,
- sc->end);*/
+/* log_static(log_spu,"cache_invalidate: %08x->%08x\n",
+ sc->start,
+ sc->end);*/
sc->invalid_start=min(sc->invalid_start,istart);
sc->invalid_end=max(sc->invalid_end,iend);
@@ -1413,8 +1413,8 @@ void spu_device::flush_cache(sample_cache *sc,
void spu_device::invalidate_cache(const unsigned int st, const unsigned int en)
{
- for (unsigned int a=st; a<en; a+=16)
- if (cache[a>>4]) flush_cache(cache[a>>4],st,en);
+ for (unsigned int a=st; a<en; a+=16)
+ if (cache[a>>4]) flush_cache(cache[a>>4],st,en);
}
//
@@ -1423,7 +1423,7 @@ void spu_device::invalidate_cache(const unsigned int st, const unsigned int en)
spu_device::sample_cache *spu_device::get_sample_cache(const unsigned int addr)
{
-// log_static(log_spu,"get_sample_cache: %08x\n",addr);
+// log_static(log_spu,"get_sample_cache: %08x\n",addr);
assert(addr<spu_ram_size);
sample_cache *sc=cache[addr>>4];
@@ -1466,9 +1466,9 @@ spu_device::sample_cache *spu_device::get_sample_cache(const unsigned int addr)
sc->dend=dp;
sc->add_ref();
-/* log_static(log_spu,"cache_add: %08x->%08x\n",
- sc->start,
- sc->end);*/
+/* log_static(log_spu,"cache_add: %08x->%08x\n",
+ sc->start,
+ sc->end);*/
return sc;
}
@@ -1642,7 +1642,7 @@ spu_device::sample_loop_cache *spu_device::get_loop_cache(sample_cache *cache, c
void spu_device::update_voice_loop(const unsigned int v)
{
-// voicereg *vr=&spureg.voice[v];
+// voicereg *vr=&spureg.voice[v];
voiceinfo *vi=&voice[v];
unsigned int ra = 0;
@@ -1723,11 +1723,11 @@ void spu_device::update_voice_state()
//
// Process voice state and build output segments
//
-// Input: const unsigned int v Voice number
-// const unsigned int sz Amount of time to process (in output samples)
-// unsigned int *tleft Returned number of output samples remaining
+// Input: const unsigned int v Voice number
+// const unsigned int sz Amount of time to process (in output samples)
+// unsigned int *tleft Returned number of output samples remaining
//
-// Output: bool true if voice is still playing
+// Output: bool true if voice is still playing
//
bool spu_device::process_voice(const unsigned int v,
@@ -1761,7 +1761,7 @@ bool spu_device::process_voice(const unsigned int v,
unsigned int ntoplay=fm?1:num,
nextevent=min(vi->samplestoend,
- min(vi->samplestoirq,vi->envsamples));
+ min(vi->samplestoirq,vi->envsamples));
ntoplay=min(ntoplay,nextevent);
if (ntoplay)
@@ -1931,9 +1931,9 @@ bool spu_device::process_voice(const unsigned int v,
//
// Generate voice output samples
//
-// Inputs: const unsigned int v Voice number
-// void *ptr Output buffer (if no reverb)
-// const unsigned int sz Number of samples to output
+// Inputs: const unsigned int v Voice number
+// void *ptr Output buffer (if no reverb)
+// const unsigned int sz Number of samples to output
//
void spu_device::generate_voice(const unsigned int v,
@@ -1977,7 +1977,7 @@ void spu_device::generate_voice(const unsigned int v,
vi->env_level+=(n*vi->env_delta);
- if (noiseptr)
+ if (noiseptr)
{
INT64 dptr=((INT64)n*vi->pitch)+vi->dptr;
unsigned int d=(unsigned int)(dptr>>12);
@@ -2087,7 +2087,7 @@ void spu_device::generate_voice(const unsigned int v,
sp+=(dptr>>12);
dptr&=0xfff;
}
- }
+ }
else
{
while (n--)
@@ -2126,7 +2126,7 @@ void spu_device::generate_voice(const unsigned int v,
if (! nsp)
{
- update_voice_loop(v);
+ update_voice_loop(v);
if (vi->loop) nsp=vi->loop_cache->data;
}
@@ -2143,7 +2143,7 @@ void spu_device::generate_voice(const unsigned int v,
v+=((nv-v)*(int)dptr)>>12;
- int l=(v*env_l)>>15,
+ int l=(v*env_l)>>15,
r=(v*env_r)>>15;
env_l+=envdelta_l;
env_r+=envdelta_r;
@@ -2172,7 +2172,7 @@ void spu_device::generate_voice(const unsigned int v,
v+=((nv-v)*(int)dptr)>>12;
- int l=(v*env_l)>>15,
+ int l=(v*env_l)>>15,
r=(v*env_r)>>15;
env_l+=envdelta_l;
env_r+=envdelta_r;
@@ -2287,7 +2287,7 @@ bool spu_device::update_envelope(const int v)
case 3: // sustain end
voice[v].envsamples=infinity;
- voice[v].env_delta=0.0f;
+ voice[v].env_delta=0.0f;
if (voice[v].env_sr<=0.0f)
{
voice[v].env_level=0.0f;
@@ -2329,7 +2329,7 @@ void spu_device::key_on(const int v)
{
voice[v].loop.reset();
-// printf("key_on: %d @ %x (pitch %x)\n", v, spureg.voice[v].addr<<3, spureg.voice[v].pitch);
+// printf("key_on: %d @ %x (pitch %x)\n", v, spureg.voice[v].addr<<3, spureg.voice[v].pitch);
translate_sample_addr(spureg.voice[v].addr<<3,&voice[v].play);
assert(voice[v].play.ptr<voice[v].play.cache->dend);
@@ -2344,7 +2344,7 @@ void spu_device::key_on(const int v)
voice[v].forceloop=false;
// Note: ChronoCross has note hang problems if this is 0 immediately
- // after key on
+ // after key on
spureg.voice[v].curvol=1;
for (unsigned int ch=0; ch<2; ch++)
@@ -2392,7 +2392,7 @@ void spu_device::key_on(const int v)
}
} else
{
- voice[v].env_sr=get_linear_rate((spureg.voice[v].srrr&srrr_sr_mask)>>srrr_sr_shift);
+ voice[v].env_sr=get_linear_rate((spureg.voice[v].srrr&srrr_sr_mask)>>srrr_sr_shift);
if (spureg.voice[v].srrr&srrr_sd)
voice[v].env_sr=-voice[v].env_sr;
}
@@ -2433,10 +2433,10 @@ void spu_device::generate_xa(void *ptr, const unsigned int sz)
{
// Don't start playing until 8 frames worth of data are in
- if ((! xa_playing) && (xa_buffer->get_bytes_in()<(xa_spf<<3)))
+ if ((! xa_playing) && (xa_buffer->get_bytes_in()<(xa_spf<<3)))
{
-// debug_xa("waiting...\n");
- return;
+// debug_xa("waiting...\n");
+ return;
}
xa_playing=true;
@@ -2587,7 +2587,7 @@ void spu_device::generate_cdda(void *ptr, const unsigned int sz)
void spu_device::key_off(const int v)
{
-// printf("key_off: %d\n", v);
+// printf("key_off: %d\n", v);
if (voice[v].env_state<=3)
{
@@ -2608,15 +2608,15 @@ void spu_device::update_reverb()
if (cur_reverb_preset==NULL)
{
-// printf("spu: reverb=unknown (reg 1c0 = %x)\n", reg[0x1c0]);
+// printf("spu: reverb=unknown (reg 1c0 = %x)\n", reg[0x1c0]);
} else
{
-// printf("spu: reverb=%s\n",cur_reverb_preset->name);
+// printf("spu: reverb=%s\n",cur_reverb_preset->name);
spu_reverb_cfg=&cur_reverb_preset->cfg;
if ((mame_stricmp("reverb off",cur_reverb_preset->name)) && (spu_reverb_cfg->band_gain<=0.0f))
{
-// printf("spu: no reverb config for %s\n",cur_reverb_preset->name);
+// printf("spu: no reverb config for %s\n",cur_reverb_preset->name);
}
}
@@ -2970,8 +2970,8 @@ void spu_device::decode_xa_stereo(const unsigned char *xa,
for (int i=0; i<28; i++)
{
short d=xa[16+(i<<2)+s],
- d0=(d&0xf)<<12,
- d1=(d>>4)<<12;
+ d0=(d&0xf)<<12,
+ d1=(d>>4)<<12;
d0=clamp((int)(d0>>shift0)+(((l0*f0)+(l1*f1)+32)>>6));
*dp++=d0;
l1=l0;
@@ -3000,12 +3000,12 @@ void spu_device::decode_xa_stereo(const unsigned char *xa,
/*
enum
{
- xaencoding_stereo_mask=3,
- xaencoding_freq_shift=2,
- xaencoding_freq_mask=3<<xaencoding_freq_shift,
- xaencoding_bps_shift=4,
- xaencoding_bps_mask=3<<xaencoding_bps_shift,
- xaencoding_emphasis=(1<<6)
+ xaencoding_stereo_mask=3,
+ xaencoding_freq_shift=2,
+ xaencoding_freq_mask=3<<xaencoding_freq_shift,
+ xaencoding_bps_shift=4,
+ xaencoding_bps_mask=3<<xaencoding_bps_shift,
+ xaencoding_emphasis=(1<<6)
};
*/
@@ -3015,7 +3015,7 @@ bool spu_device::play_xa(const unsigned int sector, const unsigned char *xa)
if (xa_buffer->get_bytes_free()<xa_sector_size) return false;
-// debug_xa("play_xa: %d\n",sector);
+// debug_xa("play_xa: %d\n",sector);
// Get XA format from sector header
@@ -3077,7 +3077,7 @@ bool spu_device::play_xa(const unsigned int sector, const unsigned char *xa)
void spu_device::flush_xa(const unsigned int sector)
{
-// debug_xa("flush_xa: %d\n",sector);
+// debug_xa("flush_xa: %d\n",sector);
if (xa_playing)
{
@@ -3107,7 +3107,7 @@ bool spu_device::play_cdda(const unsigned int sector, const unsigned char *cdda)
void spu_device::flush_cdda(const unsigned int sector)
{
-// debug_xa("flush_cdda: %d\n",sector);
+// debug_xa("flush_cdda: %d\n",sector);
if (cdda_playing)
{
@@ -3134,7 +3134,7 @@ static void spu_dma_write( running_machine *machine, UINT32 n_address, INT32 n_s
spu_device *spu = machine->device<spu_device>("spu");
UINT8 *psxram = (UINT8 *)memory_get_shared(*machine, "share1");
-// printf("SPU DMA write from %x, size %x\n", n_address, n_size);
+// printf("SPU DMA write from %x, size %x\n", n_address, n_size);
spu->start_dma(psxram + n_address, true, n_size*4);
}
diff --git a/src/emu/sound/spu.h b/src/emu/sound/spu.h
index 860543f67e2..07a11f1e91e 100644
--- a/src/emu/sound/spu.h
+++ b/src/emu/sound/spu.h
@@ -48,7 +48,7 @@ const unsigned int spu_base_frequency_hz=44100;
class stream_buffer;
-class spu_device : public device_t, public device_sound_interface
+class spu_device : public device_t, public device_sound_interface
{
friend class spu_device_config;
diff --git a/src/emu/sound/spu_tables.c b/src/emu/sound/spu_tables.c
index dd23c88e59f..5e1ed9a8ee1 100644
--- a/src/emu/sound/spu_tables.c
+++ b/src/emu/sound/spu_tables.c
@@ -455,7 +455,7 @@ spu_device::reverb_preset spu_device::reverb_presets[]=
0x0334, 0x01B5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x01B4, 0x0136, 0x00B8, 0x005C, 0x8000, 0x8000
},
- { // made up from studio small [used by BOF3]
+ { // made up from studio small [used by BOF3]
-0.3112f,
0.7832f,
@@ -476,7 +476,7 @@ spu_device::reverb_preset spu_device::reverb_presets[]=
0x031C, 0x025D, 0x025C, 0x018E, 0x022F, 0x0135, 0x01D2, 0x00B7,
0x018F, 0x00B5, 0x00B4, 0x0080, 0x004C, 0x0026, 0x8000, 0x8000
},
- { // made up from studio large [used by Fighters Impact]
+ { // made up from studio large [used by Fighters Impact]
-0.3112f,
0.7832f,
diff --git a/src/emu/sound/spureverb.c b/src/emu/sound/spureverb.c
index 1c83853054b..4f05211be4e 100644
--- a/src/emu/sound/spureverb.c
+++ b/src/emu/sound/spureverb.c
@@ -306,10 +306,10 @@ void reverb::comb_allpass(signed short *sp,
//
void reverb::process(signed short *output,
- signed short *reverb_input,
- const reverb_params *rp,
- const int wetvol_l,
- const int wetvol_r,
+ signed short *reverb_input,
+ const reverb_params *rp,
+ const int wetvol_l,
+ const int wetvol_r,
const unsigned int sz)
{
signed short *sp=(signed short *)reverb_input,
diff --git a/src/emu/sound/spureverb.h b/src/emu/sound/spureverb.h
index f5170b4c7f3..8e94a318a24 100644
--- a/src/emu/sound/spureverb.h
+++ b/src/emu/sound/spureverb.h
@@ -34,24 +34,24 @@
const int wetvol_r,
const unsigned int _sz);
void comb_allpass4(signed short *sp,
- signed short *dp,
- const comb_param &comb_delay,
- const int comb_gain,
- const int allpass_delay,
- const int allpass_gain,
- const int *rvol,
- const unsigned int sz);
+ signed short *dp,
+ const comb_param &comb_delay,
+ const int comb_gain,
+ const int allpass_delay,
+ const int allpass_gain,
+ const int *rvol,
+ const unsigned int sz);
void comb_allpass1(signed short *sp,
- signed short *dp,
- const comb_param &comb_delay,
- const int comb_gain,
- const int allpass_delay,
- const int allpass_gain,
- const int *rvol,
- const unsigned int sz);
+ signed short *dp,
+ const comb_param &comb_delay,
+ const int comb_gain,
+ const int allpass_delay,
+ const int allpass_gain,
+ const int *rvol,
+ const unsigned int sz);
void bandpass(signed short *sp,
- const reverb_params *rp,
- const unsigned int sz);
+ const reverb_params *rp,
+ const unsigned int sz);
public:
reverb(const int hz, const int maxdelay=65536);