mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Merge pull request #29 from freakdave/master
(Xbox 1) Fixed low volume issue
This commit is contained in:
commit
3ddb4a97ec
@ -21,6 +21,18 @@
|
|||||||
// The caller does not have the priority level required for the function to
|
// The caller does not have the priority level required for the function to
|
||||||
// succeed
|
// succeed
|
||||||
#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
|
#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
|
||||||
|
// Send the audio signal (stereo, without attenuation) to all existing speakers
|
||||||
|
DSMIXBINVOLUMEPAIR dsmbvp[8] = {
|
||||||
|
{DSMIXBIN_FRONT_LEFT, DSBVOLUME_MAX},
|
||||||
|
{DSMIXBIN_FRONT_RIGHT, DSBVOLUME_MAX},
|
||||||
|
{DSMIXBIN_FRONT_CENTER, DSBVOLUME_MAX},
|
||||||
|
{DSMIXBIN_FRONT_CENTER, DSBVOLUME_MAX},
|
||||||
|
{DSMIXBIN_BACK_LEFT, DSBVOLUME_MAX},
|
||||||
|
{DSMIXBIN_BACK_RIGHT, DSBVOLUME_MAX},
|
||||||
|
{DSMIXBIN_LOW_FREQUENCY, DSBVOLUME_MAX},
|
||||||
|
{DSMIXBIN_LOW_FREQUENCY, DSBVOLUME_MAX}};
|
||||||
|
|
||||||
|
DSMIXBINS dsmb;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../driver.h"
|
#include "../driver.h"
|
||||||
@ -338,6 +350,16 @@ static void *dsound_init(const char *device, unsigned rate, unsigned latency)
|
|||||||
if (IDirectSound_CreateSoundBuffer(ds->ds, &bufdesc, &ds->dsb, 0) != DS_OK)
|
if (IDirectSound_CreateSoundBuffer(ds->ds, &bufdesc, &ds->dsb, 0) != DS_OK)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
IDirectSoundBuffer_SetVolume(ds->dsb, DSBVOLUME_MAX);
|
||||||
|
|
||||||
|
#ifdef _XBOX
|
||||||
|
dsmb.dwMixBinCount = 8;
|
||||||
|
dsmb.lpMixBinVolumePairs = dsmbvp;
|
||||||
|
|
||||||
|
IDirectSoundBuffer_SetHeadroom(ds->dsb, DSBHEADROOM_MIN);
|
||||||
|
IDirectSoundBuffer_SetMixBins(ds->dsb, &dsmb);
|
||||||
|
#endif
|
||||||
|
|
||||||
IDirectSoundBuffer_SetCurrentPosition(ds->dsb, 0);
|
IDirectSoundBuffer_SetCurrentPosition(ds->dsb, 0);
|
||||||
|
|
||||||
dsound_clear_buffer(ds);
|
dsound_clear_buffer(ds);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user