Added a latency setting to the audio settings.

Removed the Sample Rate setting.  It is now hardcoded to 48000hz (accurate audio timing).

Fixes issue 5672.
This commit is contained in:
skidau
2013-01-13 00:05:30 +11:00
parent 73140c7da7
commit 1c462a1eca
11 changed files with 57 additions and 39 deletions

View File

@ -44,8 +44,8 @@
// 16 bit Stereo
#define SFX_MAX_SOURCE 1
#define OAL_NUM_BUFFERS 16
#define OAL_MAX_SAMPLES 512
#define OAL_MAX_BUFFERS 32
#define OAL_MAX_SAMPLES 256
#define SURROUND_CHANNELS 6 // number of channels in surround mode
#define SIZE_FLOAT 4 // size of a float in bytes
#endif
@ -75,10 +75,12 @@ private:
Common::Event soundSyncEvent;
short realtimeBuffer[OAL_MAX_SAMPLES * 2];
soundtouch::SAMPLETYPE sampleBuffer[OAL_MAX_SAMPLES * SIZE_FLOAT * SURROUND_CHANNELS * OAL_NUM_BUFFERS];
ALuint uiBuffers[OAL_NUM_BUFFERS];
soundtouch::SAMPLETYPE sampleBuffer[OAL_MAX_SAMPLES * SIZE_FLOAT * SURROUND_CHANNELS * OAL_MAX_BUFFERS];
ALuint uiBuffers[OAL_MAX_BUFFERS];
ALuint uiSource;
ALfloat fVolume;
u8 numBuffers;
#else
public:
OpenALStream(CMixer *mixer, void *hWnd = NULL): SoundStream(mixer) {}