Added a Dolby Pro Logic II (DPL2) decoder in the OpenAL backend. DPL2 audio is decoded to 5.1. Code adapted from ffdshow.

Added an option in the DSP settings to disable the DPL2 decoder in case Dolphin incorrectly detects a 5.1 audio system.
Updated the OpenAL files to OpenAL Soft 1.15.1 in the Windows build.

Fixes issue 3023.
This commit is contained in:
skidau
2013-01-11 14:03:09 +11:00
parent c7ccf7e5c6
commit 80f4475e76
20 changed files with 2598 additions and 1566 deletions

View File

@ -26,12 +26,14 @@
#ifdef _WIN32
#include <OpenAL/include/al.h>
#include <OpenAL/include/alc.h>
#include <OpenAL/include/alext.h>
#elif defined __APPLE__
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#include <AL/alext.h>
#endif
#include "Core.h"
@ -44,6 +46,8 @@
#define SFX_MAX_SOURCE 1
#define OAL_NUM_BUFFERS 16
#define OAL_MAX_SAMPLES 512
#define SURROUND_CHANNELS 6 // number of channels in surround mode
#define SIZE_FLOAT 4 // size of a float in bytes
#endif
class OpenALStream: public SoundStream
@ -72,7 +76,7 @@ private:
Common::Event mainSyncEvent;
short realtimeBuffer[OAL_MAX_SAMPLES * 2];
soundtouch::SAMPLETYPE sampleBuffer[OAL_MAX_SAMPLES * 2 * OAL_NUM_BUFFERS];
soundtouch::SAMPLETYPE sampleBuffer[OAL_MAX_SAMPLES * SIZE_FLOAT * SURROUND_CHANNELS * OAL_NUM_BUFFERS];
ALuint uiBuffers[OAL_NUM_BUFFERS];
ALuint uiSource;
ALfloat fVolume;