Merge pull request #1893 from jpark37/fix-win-speaker-macros
win-wasapi: Speaker enum fixes
This commit is contained in:
commit
82afc219f9
@ -16,9 +16,8 @@ using namespace std;
|
|||||||
|
|
||||||
static void GetWASAPIDefaults(obs_data_t *settings);
|
static void GetWASAPIDefaults(obs_data_t *settings);
|
||||||
|
|
||||||
// Fix inconsistent defs of speaker_surround between avutil & wasapi
|
#define OBS_KSAUDIO_SPEAKER_4POINT1 \
|
||||||
#define KSAUDIO_SPEAKER_2POINT1 (KSAUDIO_SPEAKER_STEREO|SPEAKER_LOW_FREQUENCY)
|
(KSAUDIO_SPEAKER_SURROUND|SPEAKER_LOW_FREQUENCY)
|
||||||
#define KSAUDIO_SPEAKER_4POINT1 (KSAUDIO_SPEAKER_QUAD|SPEAKER_LOW_FREQUENCY)
|
|
||||||
|
|
||||||
class WASAPISource {
|
class WASAPISource {
|
||||||
ComPtr<IMMDevice> device;
|
ComPtr<IMMDevice> device;
|
||||||
@ -245,7 +244,7 @@ static speaker_layout ConvertSpeakerLayout(DWORD layout, WORD channels)
|
|||||||
switch (layout) {
|
switch (layout) {
|
||||||
case KSAUDIO_SPEAKER_2POINT1: return SPEAKERS_2POINT1;
|
case KSAUDIO_SPEAKER_2POINT1: return SPEAKERS_2POINT1;
|
||||||
case KSAUDIO_SPEAKER_SURROUND: return SPEAKERS_4POINT0;
|
case KSAUDIO_SPEAKER_SURROUND: return SPEAKERS_4POINT0;
|
||||||
case KSAUDIO_SPEAKER_4POINT1: return SPEAKERS_4POINT1;
|
case OBS_KSAUDIO_SPEAKER_4POINT1: return SPEAKERS_4POINT1;
|
||||||
case KSAUDIO_SPEAKER_5POINT1_SURROUND: return SPEAKERS_5POINT1;
|
case KSAUDIO_SPEAKER_5POINT1_SURROUND: return SPEAKERS_5POINT1;
|
||||||
case KSAUDIO_SPEAKER_7POINT1_SURROUND: return SPEAKERS_7POINT1;
|
case KSAUDIO_SPEAKER_7POINT1_SURROUND: return SPEAKERS_7POINT1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user