Skip to content

Commit

Permalink
fix xaudio2 when openal is disabled
Browse files Browse the repository at this point in the history
Move the new faudio driver constant AUD_FAUDIO to the end of the sound
driver enum, otherwise the wrong is used.

Also check for NO_OAL before instantiating an openal driver.
  • Loading branch information
rkitover committed Dec 26, 2018
1 parent 3ed08e8 commit edf2c0c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/wx/wxvbam.h
Expand Up @@ -449,8 +449,8 @@ enum renderer {
enum audioapi { AUD_SDL,
AUD_OPENAL,
AUD_DIRECTSOUND,
AUD_FAUDIO,
AUD_XAUDIO2 };
AUD_XAUDIO2,
AUD_FAUDIO };

// an unfortunate legacy default; should have a non-digit preceding %d
// the only reason to keep it is that user can set slotdir to old dir
Expand Down Expand Up @@ -703,11 +703,15 @@ class LogDialog : public wxDialog {

#include "opts.h"

class SoundDriver;
extern SoundDriver* newOpenAL();
// I should add this to SoundDriver, but wxArrayString is wx-specific
// I suppose I could make subclass wxSoundDriver. maybe later.

#ifndef NO_OAL
class SoundDriver;
extern SoundDriver* newOpenAL();
extern bool GetOALDevices(wxArrayString& names, wxArrayString& ids);
#endif

#ifdef __WXMSW__
extern SoundDriver* newDirectSound();
extern bool GetDSDevices(wxArrayString& names, wxArrayString& ids);
Expand Down

0 comments on commit edf2c0c

Please sign in to comment.