diff options
Diffstat (limited to 'src/osd/windows/sound.c')
-rw-r--r-- | src/osd/windows/sound.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/osd/windows/sound.c b/src/osd/windows/sound.c index 12f5f873bbc..1e7dc3e0d6d 100644 --- a/src/osd/windows/sound.c +++ b/src/osd/windows/sound.c @@ -101,7 +101,7 @@ static int buffer_overflows; //============================================================ static void sound_exit(running_machine &machine); -static HRESULT dsound_init(running_machine *machine); +static HRESULT dsound_init(running_machine &machine); static void dsound_kill(void); static HRESULT dsound_create_buffers(void); static void dsound_destroy_buffers(void); @@ -112,14 +112,14 @@ static void dsound_destroy_buffers(void); // winsound_init //============================================================ -void winsound_init(running_machine *machine) +void winsound_init(running_machine &machine) { // if no sound, don't create anything - if (!machine->options().sound()) + if (!machine.options().sound()) return; // ensure we get called on the way out - machine->add_notifier(MACHINE_NOTIFY_EXIT, sound_exit); + machine.add_notifier(MACHINE_NOTIFY_EXIT, sound_exit); // attempt to initialize directsound // don't make it fatal if we can't -- we'll just run without sound @@ -267,7 +267,7 @@ void windows_osd_interface::set_mastervolume(int attenuation) // dsound_init //============================================================ -static HRESULT dsound_init(running_machine *machine) +static HRESULT dsound_init(running_machine &machine) { HRESULT result; @@ -300,12 +300,12 @@ static HRESULT dsound_init(running_machine *machine) stream_format.wBitsPerSample = 16; stream_format.wFormatTag = WAVE_FORMAT_PCM; stream_format.nChannels = 2; - stream_format.nSamplesPerSec = machine->sample_rate(); + stream_format.nSamplesPerSec = machine.sample_rate(); stream_format.nBlockAlign = stream_format.wBitsPerSample * stream_format.nChannels / 8; stream_format.nAvgBytesPerSec = stream_format.nSamplesPerSec * stream_format.nBlockAlign; // compute the buffer size based on the output sample rate - stream_buffer_size = stream_format.nSamplesPerSec * stream_format.nBlockAlign * downcast<windows_options &>(machine->options()).audio_latency() / 10; + stream_buffer_size = stream_format.nSamplesPerSec * stream_format.nBlockAlign * downcast<windows_options &>(machine.options()).audio_latency() / 10; stream_buffer_size = (stream_buffer_size / 1024) * 1024; if (stream_buffer_size < 1024) stream_buffer_size = 1024; |