mirror of
https://github.com/holub/mame
synced 2025-05-22 13:48:55 +03:00
cdda - Added a per-channel volume setting function [Barry Rodewald]
This commit is contained in:
parent
79c16f4260
commit
1f6995b11c
@ -303,6 +303,21 @@ void cdda_set_volume(running_device *device,int volume)
|
||||
stream_set_output_gain(cdda->stream,1,volume / 100.0);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
cdda_set_channel_volume - sets CD-DA volume level
|
||||
for either speaker, used for fade in/out effects
|
||||
-------------------------------------------------*/
|
||||
|
||||
void cdda_set_channel_volume(running_device *device, int channel, int volume)
|
||||
{
|
||||
cdda_info *cdda = get_safe_token(device);
|
||||
|
||||
if(channel == 0)
|
||||
stream_set_output_gain(cdda->stream,0,volume / 100.0);
|
||||
if(channel == 1)
|
||||
stream_set_output_gain(cdda->stream,1,volume / 100.0);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Generic get_info
|
||||
**************************************************************************/
|
||||
|
@ -11,7 +11,8 @@ running_device *cdda_from_cdrom(running_machine *machine, void *file);
|
||||
void cdda_start_audio(running_device *device, UINT32 startlba, UINT32 numblocks);
|
||||
void cdda_stop_audio(running_device *device);
|
||||
void cdda_pause_audio(running_device *device, int pause);
|
||||
void cdda_set_volume(running_device *device,int volume);
|
||||
void cdda_set_volume(running_device *device, int volume);
|
||||
void cdda_set_channel_volume(running_device *device, int channel, int volume);
|
||||
|
||||
UINT32 cdda_get_audio_lba(running_device *device);
|
||||
int cdda_audio_active(running_device *device);
|
||||
|
Loading…
Reference in New Issue
Block a user