[vlc-commits] auhal: Use encoded audio output if this was stored before

David Fuhrmann git at videolan.org
Tue Feb 18 22:43:14 CET 2020


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Feb 15 12:27:06 2020 +0100| [cb9845dd5cd0f9e61a73d13b1361d42d42d8c0a8] | committer: David Fuhrmann

auhal: Use encoded audio output if this was stored before

Encoded output is stored in VLCs settings by adding the
AOUT_VAR_SPDIF_FLAG flag to the integer. Make sure this
configuration is also picked up again after restart, if it is stored
and actually available.

Credits: Andrey Y.
fixes #21170

(cherry picked from commit a8176a8353dc21a9302e939c59a0738227cb68ee)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=cb9845dd5cd0f9e61a73d13b1361d42d42d8c0a8
---

 modules/audio_output/auhal.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 6c507b2bcf..0026fcc3b2 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -526,6 +526,7 @@ RebuildDeviceList(audio_output_t * p_aout, UInt32 *p_id_exists)
             continue;
         }
 
+        // Report back audio device in analog mode
         if (p_id_exists && i_id == i_id_exists)
             *p_id_exists = i_id;
 
@@ -547,6 +548,10 @@ RebuildDeviceList(audio_output_t * p_aout, UInt32 *p_id_exists)
             CFArrayAppendValue(currentListOfDevices, deviceNumber);
             CFRelease(deviceNumber);
             free(psz_encoded_name);
+
+            // Report back audio device in digital mode
+            if (p_id_exists && i_id == i_id_exists)
+                *p_id_exists = i_id;
         }
 
         // TODO: only register once for each device



More information about the vlc-commits mailing list