summaryrefslogtreecommitdiff
path: root/www/seamonkey/patches/patch-mozilla_media_libcubeb_src_cubeb.c
blob: aaa6ab42e85fc4e17297dc7b889b15050d99140d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-mozilla_media_libcubeb_src_cubeb.c,v 1.7 2021/02/08 12:26:20 ryoon Exp $

- Sun Audio support.

--- media/libcubeb/src/cubeb.c.orig	2020-02-17 23:37:58.000000000 +0000
+++ media/libcubeb/src/cubeb.c
@@ -46,6 +46,9 @@ int wasapi_init(cubeb ** context, char c
 #if defined(USE_SNDIO)
 int sndio_init(cubeb ** context, char const * context_name);
 #endif
+#if defined(USE_SUN)
+int sun_init(cubeb ** context, char const * context_name);
+#endif
 #if defined(USE_OPENSL)
 int opensl_init(cubeb ** context, char const * context_name);
 #endif
@@ -143,6 +146,10 @@ cubeb_init(cubeb ** context, char const 
 #if defined(USE_SNDIO)
       init_oneshot = sndio_init;
 #endif
+    } else if (!strcmp(backend_name, "sun")) {
+#if defined(USE_SUN)
+      init_oneshot = sun_init;
+#endif
     } else if (!strcmp(backend_name, "opensl")) {
 #if defined(USE_OPENSL)
       init_oneshot = opensl_init;
@@ -190,6 +197,9 @@ cubeb_init(cubeb ** context, char const 
 #if defined(USE_SNDIO)
     sndio_init,
 #endif
+#if defined(USE_SUN)
+    sun_init,
+#endif
 #if defined(USE_OPENSL)
     opensl_init,
 #endif