diff options
author | Chris Robinson <[email protected]> | 2014-11-27 02:30:52 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-27 02:30:52 -0800 |
commit | 82780a703b46849f6e786c1b28edbfcd21333a3b (patch) | |
tree | 8f20879658ac9661889ec66efe901143cca5ac8a /Alc | |
parent | 1db83923446bde61b9c5cce7a6cb9c4da56269c9 (diff) |
Set headphones when dsound reports headphones
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/backends/dsound.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c index fee1fd98..cde1aaf1 100644 --- a/Alc/backends/dsound.c +++ b/Alc/backends/dsound.c @@ -444,9 +444,9 @@ static ALCboolean ALCdsoundPlayback_reset(ALCdsoundPlayback *self) hr = IDirectSound_GetSpeakerConfig(self->DS, &speakers); if(SUCCEEDED(hr)) { + speakers = DSSPEAKER_CONFIG(speakers); if(!(device->Flags&DEVICE_CHANNELS_REQUEST)) { - speakers = DSSPEAKER_CONFIG(speakers); if(speakers == DSSPEAKER_MONO) device->FmtChans = DevFmtMono; else if(speakers == DSSPEAKER_STEREO || speakers == DSSPEAKER_HEADPHONE) @@ -462,6 +462,8 @@ static ALCboolean ALCdsoundPlayback_reset(ALCdsoundPlayback *self) else ERR("Unknown system speaker config: 0x%lx\n", speakers); } + device->IsHeadphones = (device->FmtChans == DevFmtStereo && + speakers == DSSPEAKER_HEADPHONE); switch(device->FmtChans) { |