[vlc-commits] ALSA: add all supported S/PDIF frequencies

Rémi Denis-Courmont git at videolan.org
Thu Apr 14 18:06:38 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr 14 19:06:08 2011 +0300| [7a7ebd9f420e1d42b25f164147b19f57762afa52] | committer: Rémi Denis-Courmont

ALSA: add all supported S/PDIF frequencies

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

 modules/audio_output/alsa.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 214c3b2..d8d2205 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -179,14 +179,15 @@ static int Open (vlc_object_t *obj)
 
         switch (p_aout->output.output.i_rate)
         {
-            case 48000:
-                aes3 = IEC958_AES3_CON_FS_48000;
-                break;
-            case 44100:
-                aes3 = IEC958_AES3_CON_FS_44100;
-                break;
+#define FS(freq) \
+            case freq: aes3 = IEC958_AES3_CON_FS_ ## freq; break;
+            FS( 44100) /* def. */ FS( 48000) FS( 32000)
+            FS( 22050)            FS( 24000)
+            FS( 88200) FS(768000) FS( 96000)
+            FS(176400)            FS(192000)
+#undef FS
             default:
-                aes3 = IEC958_AES3_CON_FS_32000;
+                aes3 = IEC958_AES3_CON_FS_NOTID;
                 break;
         }
 



More information about the vlc-commits mailing list