mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
removed cdda volume trampolines (nw)
This commit is contained in:
parent
a3b4058bf7
commit
89444a3a46
@ -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
|
cdda_get_channel_volume - sets CD-DA volume level
|
||||||
for either speaker, used for volume control display
|
for either speaker, used for volume control display
|
||||||
|
@ -18,8 +18,6 @@ public:
|
|||||||
void start_audio(uint32_t startlba, uint32_t numblocks);
|
void start_audio(uint32_t startlba, uint32_t numblocks);
|
||||||
void stop_audio();
|
void stop_audio();
|
||||||
void pause_audio(int pause);
|
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);
|
int16_t get_channel_volume(int channel);
|
||||||
|
|
||||||
uint32_t get_audio_lba();
|
uint32_t get_audio_lba();
|
||||||
|
@ -2038,9 +2038,9 @@ WRITE8_MEMBER(towns_state::towns_volume_w)
|
|||||||
case 2:
|
case 2:
|
||||||
m_towns_volume[m_towns_volume_select] = data;
|
m_towns_volume[m_towns_volume_select] = data;
|
||||||
if(m_towns_volume_select == 4)
|
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)
|
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;
|
break;
|
||||||
case 3: // select channel
|
case 3: // select channel
|
||||||
if(data < 8)
|
if(data < 8)
|
||||||
|
@ -998,13 +998,13 @@ WRITE16_MEMBER( lc89510_temp_device::segacd_cdfader_w )
|
|||||||
cdfader_vol = (double)((data & 0x3ff0) >> 4);
|
cdfader_vol = (double)((data & 0x3ff0) >> 4);
|
||||||
|
|
||||||
if(data & 0x4000)
|
if(data & 0x4000)
|
||||||
cdfader_vol = 100.0;
|
cdfader_vol = 1.0;
|
||||||
else
|
else
|
||||||
cdfader_vol = (cdfader_vol / 1024.0) * 100.0;
|
cdfader_vol = cdfader_vol / 1024.0;
|
||||||
|
|
||||||
//printf("%f\n",cdfader_vol);
|
//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)
|
void lc89510_temp_device::reset_cd(void)
|
||||||
|
@ -1009,14 +1009,14 @@ TIMER_CALLBACK_MEMBER(pce_cd_device::cdda_fadeout_callback)
|
|||||||
if (m_cdda_volume <= 0)
|
if (m_cdda_volume <= 0)
|
||||||
{
|
{
|
||||||
m_cdda_volume = 0.0;
|
m_cdda_volume = 0.0;
|
||||||
m_cdda->set_volume(0.0);
|
|
||||||
m_cdda_fadeout_timer->adjust(attotime::never);
|
m_cdda_fadeout_timer->adjust(attotime::never);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_cdda->set_volume(m_cdda_volume);
|
|
||||||
m_cdda_fadeout_timer->adjust(attotime::from_usec(param), param);
|
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)
|
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)
|
if (m_cdda_volume >= 100.0)
|
||||||
{
|
{
|
||||||
m_cdda_volume = 100.0;
|
m_cdda_volume = 100.0;
|
||||||
m_cdda->set_volume(100.0);
|
|
||||||
m_cdda_fadein_timer->adjust(attotime::never);
|
m_cdda_fadein_timer->adjust(attotime::never);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_cdda->set_volume(m_cdda_volume);
|
|
||||||
m_cdda_fadein_timer->adjust(attotime::from_usec(param), param);
|
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)
|
TIMER_CALLBACK_MEMBER(pce_cd_device::adpcm_fadeout_callback)
|
||||||
|
Loading…
Reference in New Issue
Block a user