-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore EAX effects through OpenAL's EFX.
- Loading branch information
Showing
15 changed files
with
435 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,9 +42,6 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
#include "HeadSpin.h" | ||
#include <al.h> | ||
#include <efx.h> | ||
#ifdef EAX_SDK_AVAILABLE | ||
#include <eax.h> | ||
#endif | ||
#include <memory> | ||
#include <array> | ||
|
||
|
@@ -74,7 +71,7 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
ST::string kDefaultDeviceMagic = ST_LITERAL("(Default Device)"); | ||
|
||
#define FADE_TIME 3 | ||
#define MAX_NUM_SOURCES 128 | ||
#define MAX_NUM_SOURCES 256 | ||
#define UPDATE_TIME_MS 100 | ||
|
||
plProfile_CreateTimer("EAX Update", "Sound", SoundEAXUpdate); | ||
|
@@ -304,6 +301,7 @@ bool plAudioSystem::Init() | |
plStatusLog::AddLineSF("audio.log", "OpenAL version: {}", alGetString(AL_VERSION)); | ||
plStatusLog::AddLineSF("audio.log", "OpenAL renderer: {}", alGetString(AL_RENDERER)); | ||
plStatusLog::AddLineSF("audio.log", "OpenAL extensions: {}", alGetString(AL_EXTENSIONS)); | ||
plStatusLog::AddLineSF("audio.log", "OpenAL context extensions: {}", alcGetString(fPlaybackDevice, ALC_EXTENSIONS)); | ||
plStatusLog::AddLineS("audio.log", plStatusLog::kGreen, "ASYS: Detecting caps..."); | ||
|
||
// Detect maximum number of voices that can be created. | ||
|
@@ -323,15 +321,15 @@ bool plAudioSystem::Init() | |
plStatusLog::AddLineSF("audio.log", "Max Number of sources: {}", fMaxNumSources); | ||
SetMaxNumberOfActiveSounds(); | ||
|
||
// TODO: Detect EAX support. Not adding this in now until the replacement is implemented. | ||
// TODO: Detect EFX support. | ||
|
||
// attempt to init the EAX listener. | ||
// attempt to init the EFX listener. | ||
if (plgAudioSys::fEnableEAX) { | ||
fUsingEAX = plEAXListener::GetInstance().Init(); | ||
fUsingEAX = plEAXListener::GetInstance().Init(fPlaybackDevice); | ||
if (fUsingEAX) | ||
plStatusLog::AddLineS("audio.log", plStatusLog::kGreen, "ASYS: EAX support detected and enabled."); | ||
plStatusLog::AddLineS("audio.log", plStatusLog::kGreen, "ASYS: EFX support detected and enabled."); | ||
else | ||
plStatusLog::AddLineS("audio.log", plStatusLog::kRed, "ASYS: EAX support NOT detected. EAX effects disabled."); | ||
plStatusLog::AddLineS("audio.log", plStatusLog::kRed, "ASYS: EFX support NOT detected. EAX effects disabled."); | ||
} else { | ||
fUsingEAX = false; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,9 +47,6 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
#include <al.h> | ||
#include <alc.h> | ||
#include <efx.h> | ||
#ifdef EAX_SDK_AVAILABLE | ||
#include <eax.h> | ||
#endif | ||
#include <memory> | ||
#include <set> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,6 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
#include "HeadSpin.h" | ||
#include "hsThread.h" | ||
#include "plDSoundBuffer.h" | ||
#include <al.h> | ||
|
||
#include "plgDispatch.h" | ||
#include "plAudioSystem.h" | ||
|
@@ -59,9 +58,10 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
#include "plEAXEffects.h" | ||
|
||
#include "plProfile.h" | ||
|
||
#include "plStatusLog/plStatusLog.h" | ||
|
||
#include <al.h> | ||
|
||
uint32_t plDSoundBuffer::fNumBuffers = 0; | ||
plProfile_CreateCounterNoReset( "Playing", "Sound", SoundPlaying ); | ||
plProfile_CreateCounterNoReset( "Allocated", "Sound", NumAllocated ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
Mead, WA 99021 | ||
*==LICENSE==*/ | ||
|
||
////////////////////////////////////////////////////////////////////////////// | ||
// // | ||
// plDSoundBuffer - Simple wrapper class for a DirectSound buffer. // | ||
|
@@ -56,15 +57,12 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
#define STREAMING_BUFFERS 16 | ||
#define STREAM_BUFFER_SIZE 4608*4 | ||
|
||
//#define VOICE_BUFFERS 4 | ||
//#define VOICE_BUFFER_SIZE 4608 | ||
|
||
class plWAVHeader; | ||
class plAudioFileReader; | ||
|
||
|
||
// Ported to OpenAL from DirectSound May 2006. Idealy the openal sources would be seperate from this class. | ||
// OpenAl sound buffer, and source. | ||
// Ported to OpenAL from DirectSound May 2006. Ideally the OpenAL sources would be separate from this class. | ||
// OpenAL sound buffer, and source. | ||
class plDSoundBuffer | ||
{ | ||
public: | ||
|
Oops, something went wrong.