From 9652245ef0432143433da57e0563f0a69471965b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 8 Jul 2013 13:51:26 +0200 Subject: ao_coreaudio: fix regression in digital stream selection The condition was checked wrongly on asbd which is the input format description. This lead to the condition always being true, thus selecting lpcm streams for digital input. --- audio/out/ao_coreaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c index bb0c80b044..65e51bce7d 100644 --- a/audio/out/ao_coreaudio.c +++ b/audio/out/ao_coreaudio.c @@ -504,7 +504,7 @@ static int init_digital(struct ao *ao, AudioStreamBasicDescription asbd) d->stream_idx = i; for (int j = 0; j < formats_n; j++) - if (AudioFormatIsDigital(asbd)) { + if (AudioFormatIsDigital(formats[j].mFormat)) { // select the digital format that has exactly the same // samplerate. If an exact match cannot be found, select // the format with highest samplerate as backup. -- cgit v1.2.3