1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00
freebsd-ports/audio/libsndfile/files/patch-examples_sndfile-play.c
Pav Lucistnik db5cad7305 - Make sndfile-play work
PR:		ports/72716
Submitted by:	Michael Johnson <ahze@ahze.net>
2004-10-15 11:43:25 +00:00

30 lines
751 B
C

--- examples/sndfile-play.c.orig Thu Oct 14 18:07:25 2004
+++ examples/sndfile-play.c Thu Oct 14 18:11:13 2004
@@ -34,7 +34,7 @@
#include <sys/time.h>
#endif
-#if defined (__linux__)
+#if defined (__linux__) || defined (__FreeBSD__)
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
@@ -326,7 +326,7 @@
** Linux/OSS functions for playing a sound.
*/
-#if defined (__linux__)
+#if defined (__linux__) || defined (__FreeBSD__)
static int linux_open_dsp_device (int channels, int srate) ;
@@ -869,7 +869,7 @@
return 1 ;
} ;
-#if defined (__linux__)
+#if defined (__linux__) || defined(__FreeBSD__)
#if HAVE_ALSA_ASOUNDLIB_H
if (access ("/proc/asound/cards", R_OK) == 0)
alsa_play (argc, argv) ;