From 2dabc9c2d9900a2f3439b40feafd181f0848f5d3 Mon Sep 17 00:00:00 2001 From: mudlord Date: Thu, 6 Dec 2007 13:54:29 +0000 Subject: [PATCH] soundBufferTotalLen is in DirectSound.cpp now Added correct sound device selection in OpenAL git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@170 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/Sound.cpp | 2 +- src/win32/DirectSound.cpp | 3 +++ src/win32/OpenAL.cpp | 6 +----- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Sound.cpp b/src/Sound.cpp index 94573461..6520a488 100644 --- a/src/Sound.cpp +++ b/src/Sound.cpp @@ -51,7 +51,7 @@ int soundTicks = SOUND_CLOCK_TICKS_; u16 soundFinalWave [1470]; int soundBufferLen = 1470; -int soundBufferTotalLen = 14700; + int soundDebug = 0; u32 soundNextPosition = 0; diff --git a/src/win32/DirectSound.cpp b/src/win32/DirectSound.cpp index e814c614..6831bf1c 100644 --- a/src/win32/DirectSound.cpp +++ b/src/win32/DirectSound.cpp @@ -35,6 +35,7 @@ #pragma comment( lib, "Dsound" ) #pragma comment( lib, "Dxguid" ) +int soundBufferTotalLen = 14700; extern bool soundBufferLow; extern void setsystemSoundOn(bool value); @@ -47,6 +48,7 @@ private: LPDIRECTSOUNDNOTIFY8 dsbNotify; HANDLE dsbEvent; WAVEFORMATEX wfx; // Primary buffer wave format + public: DirectSound(); @@ -69,6 +71,7 @@ DirectSound::DirectSound() dsbSecondary = NULL; dsbNotify = NULL; dsbEvent = NULL; + } diff --git a/src/win32/OpenAL.cpp b/src/win32/OpenAL.cpp index 37a2decb..65a6aefe 100644 --- a/src/win32/OpenAL.cpp +++ b/src/win32/OpenAL.cpp @@ -160,11 +160,7 @@ bool OpenAL::init() winlog( "OpenAL::init\n" ); assert( initialized == false ); - if (theApp.OpenALAudiomixing) - { - device = alcOpenDevice( "Generic Software" ); - } - device = alcOpenDevice( NULL ); + device = alcOpenDevice( theApp.OpenALAudiomixing ? "Generic Software" : NULL ); assert( device != NULL ); context = alcCreateContext( device, NULL );