removed cdda volume trampolines (nw)

This commit is contained in:
smf- 2016-10-29 10:09:20 +01:00
parent a3b4058bf7
commit 89444a3a46
5 changed files with 9 additions and 33 deletions

View File

@ -221,28 +221,6 @@ void cdda_device::get_audio_data(stream_sample_t *bufL, stream_sample_t *bufR, u
}
}
/*-------------------------------------------------
cdda_set_volume - sets CD-DA volume level
for both speakers, used for fade in/out effects
-------------------------------------------------*/
void cdda_device::set_volume(int volume)
{
m_stream->set_output_gain(0,volume / 100.0);
m_stream->set_output_gain(1,volume / 100.0);
}
/*-------------------------------------------------
cdda_set_channel_volume - sets CD-DA volume level
for either speaker, used for fade in/out effects
-------------------------------------------------*/
void cdda_device::set_channel_volume(int channel, int volume)
{
m_stream->set_output_gain(channel,volume / 100.0);
}
/*-------------------------------------------------
cdda_get_channel_volume - sets CD-DA volume level
for either speaker, used for volume control display

View File

@ -18,8 +18,6 @@ public:
void start_audio(uint32_t startlba, uint32_t numblocks);
void stop_audio();
void pause_audio(int pause);
void set_volume(int volume);
void set_channel_volume(int channel, int volume);
int16_t get_channel_volume(int channel);
uint32_t get_audio_lba();

View File

@ -2038,9 +2038,9 @@ WRITE8_MEMBER(towns_state::towns_volume_w)
case 2:
m_towns_volume[m_towns_volume_select] = data;
if(m_towns_volume_select == 4)
m_cdda->set_channel_volume(0,100.0f * (data / 64.0f));
m_cdda->set_output_gain(0, data / 64.0f);
if(m_towns_volume_select == 5)
m_cdda->set_channel_volume(1,100.0f * (data / 64.0f));
m_cdda->set_output_gain(1, data / 64.0f);
break;
case 3: // select channel
if(data < 8)

View File

@ -998,13 +998,13 @@ WRITE16_MEMBER( lc89510_temp_device::segacd_cdfader_w )
cdfader_vol = (double)((data & 0x3ff0) >> 4);
if(data & 0x4000)
cdfader_vol = 100.0;
cdfader_vol = 1.0;
else
cdfader_vol = (cdfader_vol / 1024.0) * 100.0;
cdfader_vol = cdfader_vol / 1024.0;
//printf("%f\n",cdfader_vol);
m_cdda->set_volume(cdfader_vol);
m_cdda->set_output_gain(ALL_OUTPUTS, cdfader_vol);
}
void lc89510_temp_device::reset_cd(void)

View File

@ -1009,14 +1009,14 @@ TIMER_CALLBACK_MEMBER(pce_cd_device::cdda_fadeout_callback)
if (m_cdda_volume <= 0)
{
m_cdda_volume = 0.0;
m_cdda->set_volume(0.0);
m_cdda_fadeout_timer->adjust(attotime::never);
}
else
{
m_cdda->set_volume(m_cdda_volume);
m_cdda_fadeout_timer->adjust(attotime::from_usec(param), param);
}
m_cdda->set_output_gain(ALL_OUTPUTS, m_cdda_volume / 100.0);
}
TIMER_CALLBACK_MEMBER(pce_cd_device::cdda_fadein_callback)
@ -1026,14 +1026,14 @@ TIMER_CALLBACK_MEMBER(pce_cd_device::cdda_fadein_callback)
if (m_cdda_volume >= 100.0)
{
m_cdda_volume = 100.0;
m_cdda->set_volume(100.0);
m_cdda_fadein_timer->adjust(attotime::never);
}
else
{
m_cdda->set_volume(m_cdda_volume);
m_cdda_fadein_timer->adjust(attotime::from_usec(param), param);
}
m_cdda->set_output_gain(ALL_OUTPUTS, m_cdda_volume / 100.0);
}
TIMER_CALLBACK_MEMBER(pce_cd_device::adpcm_fadeout_callback)