soundBufferTotalLen is in DirectSound.cpp now

Added correct sound device selection in OpenAL
This commit is contained in:
mudlord 2007-12-06 13:54:29 +00:00
parent 15c99f1fd6
commit 4d85dab10b
3 changed files with 5 additions and 6 deletions

View File

@ -51,7 +51,7 @@ int soundTicks = SOUND_CLOCK_TICKS_;
u16 soundFinalWave [1470];
int soundBufferLen = 1470;
int soundBufferTotalLen = 14700;
int soundDebug = 0;
u32 soundNextPosition = 0;

View File

@ -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;
}

View File

@ -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 );