summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch')
-rw-r--r--media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch b/media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch
new file mode 100644
index 000000000000..f94e5b64ea53
--- /dev/null
+++ b/media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch
@@ -0,0 +1,42 @@
+Always compile the `oss_sample_types` function
+Bug: https://bugs.gentoo.org/621758
+
+Also, conditionally use pulseaudio_sample_types:
+```
+audio.c: In function ‘mus_audio_device_sample_type’:
+audio.c:5687:5: error: implicit declaration of function ‘pulseaudio_sample_types’; did you mean ‘alsa_sample_types’? [-Werror=implicit-function-declaration]
+ 5687 | pulseaudio_sample_types(dev, mixer_vals);
+ | ^~~~~~~~~~~~~~~~~~~~~~~
+ | alsa_sample_types
+```
+--- a/audio.c
++++ b/audio.c
+@@ -744,7 +744,6 @@ static int oss_mus_audio_open_input(int ur_dev, int srate, int chans, mus_sample
+ }
+
+
+-#if (!HAVE_ALSA) && (!HAVE_JACK_IN_LINUX)
+ static int oss_sample_types(int ur_dev, mus_sample_t *val)
+ {
+ int fd, samp_types = 0, sys, ind;
+@@ -775,7 +774,6 @@ static int oss_sample_types(int ur_dev, mus_sample_t *val)
+ val[0] = (mus_sample_t)(ind - 1);
+ return(MUS_NO_ERROR);
+ }
+-#endif
+
+
+
+--- a/audio.c
++++ b/audio.c
+@@ -5682,7 +5682,7 @@ mus_sample_t mus_audio_device_sample_type(int dev) /* snd-dac */
+ #endif
+ #endif
+
+-#if defined(MUS_PULSEAUDIO)
++#if defined(MUS_PULSEAUDIO) && (!(defined(AUDIO_OK)))
+ if (mixer_vals[0] == MUS_UNKNOWN_SAMPLE)
+ pulseaudio_sample_types(dev, mixer_vals);
+ #endif
+--
+2.38.0