logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

portaudio-19.06.00-sndio.patch (3414B)


  1. $OpenBSD: patch-Makefile_in,v 1.4 2013/03/12 00:59:50 brad Exp $
  2. --- portaudio/Makefile.in.orig Thu Jul 5 23:44:34 2012
  3. +++ portaudio/Makefile.in Thu Jul 5 23:49:34 2012
  4. @@ -146,6 +146,7 @@ SRC_DIRS = \
  5. src/hostapi/dsound \
  6. src/hostapi/jack \
  7. src/hostapi/oss \
  8. + src/hostapi/sndio \
  9. src/hostapi/wasapi \
  10. src/hostapi/wdmks \
  11. src/hostapi/wmme \
  12. $OpenBSD: patch-configure_in,v 1.5 2019/02/06 14:21:15 jca Exp $
  13. Index: configure.in
  14. --- portaudio/configure.in.orig
  15. +++ portaudio/configure.in
  16. @@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
  17. AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
  18. [with_alsa=$withval])
  19. +AC_ARG_WITH(sndio,
  20. + AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
  21. + [with_sndio=$withval])
  22. +
  23. AC_ARG_WITH(jack,
  24. AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
  25. [with_jack=$withval])
  26. @@ -120,6 +124,10 @@ have_alsa=no
  27. if test "x$with_alsa" != "xno"; then
  28. AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
  29. fi
  30. +have_sndio=no
  31. +if test "x$with_sndio" != "xno"; then
  32. + AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
  33. +fi
  34. have_asihpi=no
  35. if test "x$with_asihpi" != "xno"; then
  36. AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
  37. @@ -406,6 +414,13 @@ case "${host_os}" in
  38. AC_DEFINE(PA_USE_ALSA,1)
  39. fi
  40. + if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
  41. + DLL_LIBS="$DLL_LIBS -lsndio"
  42. + LIBS="$LIBS -lsndio"
  43. + OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
  44. + AC_DEFINE(PA_USE_SNDIO,1)
  45. + fi
  46. +
  47. if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
  48. DLL_LIBS="$DLL_LIBS $JACK_LIBS"
  49. CFLAGS="$CFLAGS $JACK_CFLAGS"
  50. @@ -509,6 +524,7 @@ case "$target_os" in
  51. ;;
  52. *)
  53. AC_MSG_RESULT([
  54. + Sndio ....................... $have_sndio
  55. OSS ......................... $have_oss
  56. JACK ........................ $have_jack
  57. ])
  58. $OpenBSD: patch-include_portaudio_h,v 1.3 2019/02/06 14:21:15 jca Exp $
  59. Index: include/portaudio.h
  60. --- portaudio/include/portaudio.h.orig
  61. +++ portaudio/include/portaudio.h
  62. @@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
  63. paWDMKS=11,
  64. paJACK=12,
  65. paWASAPI=13,
  66. - paAudioScienceHPI=14
  67. + paAudioScienceHPI=14,
  68. + paSndio=15
  69. } PaHostApiTypeId;
  70. $OpenBSD: patch-src_os_unix_pa_unix_hostapis_c,v 1.2 2013/03/12 00:59:50 brad Exp $
  71. --- portaudio/src/os/unix/pa_unix_hostapis.c.orig Thu Jul 5 23:44:45 2012
  72. +++ portaudio/src/os/unix/pa_unix_hostapis.c Thu Jul 5 23:49:33 2012
  73. @@ -44,6 +44,7 @@
  74. PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
  75. PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
  76. +PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
  77. PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
  78. /* Added for IRIX, Pieter, oct 2, 2003: */
  79. PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
  80. @@ -78,6 +79,10 @@ PaUtilHostApiInitializer *paHostApiInitializers[] =
  81. #endif
  82. #endif /* __linux__ */
  83. +
  84. +#ifdef PA_USE_SNDIO
  85. + PaSndio_Initialize,
  86. +#endif
  87. #if PA_USE_JACK
  88. PaJack_Initialize,