summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/windows/sound.c')
-rw-r--r--src/osd/windows/sound.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/osd/windows/sound.c b/src/osd/windows/sound.c
index 413c8fb9e0b..9ccfc39e6c3 100644
--- a/src/osd/windows/sound.c
+++ b/src/osd/windows/sound.c
@@ -66,7 +66,7 @@
// DEBUGGING
//============================================================
-#define LOG_SOUND 0
+#define LOG_SOUND 0
#define LOG(x) do { if (LOG_SOUND) logerror x; } while(0)
@@ -76,35 +76,35 @@
//============================================================
// DirectSound objects
-static LPDIRECTSOUND dsound;
-static DSCAPS dsound_caps;
+static LPDIRECTSOUND dsound;
+static DSCAPS dsound_caps;
// sound buffers
-static LPDIRECTSOUNDBUFFER primary_buffer;
-static LPDIRECTSOUNDBUFFER stream_buffer;
-static UINT32 stream_buffer_size;
-static UINT32 stream_buffer_in;
+static LPDIRECTSOUNDBUFFER primary_buffer;
+static LPDIRECTSOUNDBUFFER stream_buffer;
+static UINT32 stream_buffer_size;
+static UINT32 stream_buffer_in;
// descriptors and formats
-static DSBUFFERDESC primary_desc;
-static DSBUFFERDESC stream_desc;
-static WAVEFORMATEX primary_format;
-static WAVEFORMATEX stream_format;
+static DSBUFFERDESC primary_desc;
+static DSBUFFERDESC stream_desc;
+static WAVEFORMATEX primary_format;
+static WAVEFORMATEX stream_format;
// buffer over/underflow counts
-static int buffer_underflows;
-static int buffer_overflows;
+static int buffer_underflows;
+static int buffer_overflows;
//============================================================
// PROTOTYPES
//============================================================
-static void sound_exit(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);
+static void sound_exit(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);
@@ -297,12 +297,12 @@ static HRESULT dsound_init(running_machine &machine)
}
// make a format description for what we want
- stream_format.wBitsPerSample = 16;
- stream_format.wFormatTag = WAVE_FORMAT_PCM;
- stream_format.nChannels = 2;
- 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;
+ stream_format.wBitsPerSample = 16;
+ stream_format.wFormatTag = WAVE_FORMAT_PCM;
+ stream_format.nChannels = 2;
+ 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;
@@ -359,7 +359,7 @@ static HRESULT dsound_create_buffers(void)
// create a buffer desc for the primary buffer
memset(&primary_desc, 0, sizeof(primary_desc));
- primary_desc.dwSize = sizeof(primary_desc);
+ primary_desc.dwSize = sizeof(primary_desc);
primary_desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_GETCURRENTPOSITION2;
primary_desc.lpwfxFormat = NULL;
@@ -394,7 +394,7 @@ static HRESULT dsound_create_buffers(void)
stream_desc.dwSize = sizeof(stream_desc);
stream_desc.dwFlags = DSBCAPS_CTRLVOLUME | DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2;
stream_desc.dwBufferBytes = stream_buffer_size;
- stream_desc.lpwfxFormat = &stream_format;
+ stream_desc.lpwfxFormat = &stream_format;
// create the stream buffer
result = IDirectSound_CreateSoundBuffer(dsound, &stream_desc, &stream_buffer, NULL);