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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
Description: Handle building on non-Linux systems with ALSA
Author: A. Maitland Bottoms <bottoms@debian.org>
--- a/gr-audio/lib/alsa/alsa_source.cc
+++ b/gr-audio/lib/alsa/alsa_source.cc
@@ -472,7 +472,7 @@
}
continue; // try again
}
-
+#ifdef ESTRPIPE
else if(r == -ESTRPIPE) { // h/w is suspended (whatever that means)
// This is apparently related to power management
d_nsuspends++;
@@ -482,7 +482,7 @@
}
continue; // try again
}
-
+#endif
else if(r < 0) {
output_error_msg("snd_pcm_readi failed", r);
return false;
--- a/gr-audio/lib/alsa/alsa_sink.cc
+++ b/gr-audio/lib/alsa/alsa_sink.cc
@@ -507,7 +507,7 @@
}
continue; // try again
}
-
+#ifdef ESTRPIPE
else if(r == -ESTRPIPE) { // h/w is suspended (whatever that means)
// This is apparently related to power management
d_nsuspends++;
@@ -517,7 +517,7 @@
}
continue; // try again
}
-
+#endif
else if (r < 0) {
output_error_msg("snd_pcm_writei failed", r);
return false;
--- a/gr-audio/lib/CMakeLists.txt
+++ b/gr-audio/lib/CMakeLists.txt
@@ -46,7 +46,7 @@
########################################################################
find_package(ALSA)
-if(ALSA_FOUND)
+if((ALSA_FOUND) AND NOT (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") AND NOT (CMAKE_SYSTEM_NAME STREQUAL GNU))
add_definitions(-DALSA_FOUND)
GR_APPEND_SUBCOMPONENT("alsa")
@@ -61,7 +61,7 @@
)
list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gr-audio-alsa.conf)
-endif(ALSA_FOUND)
+endif((ALSA_FOUND) AND NOT (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") AND NOT (CMAKE_SYSTEM_NAME STREQUAL GNU))
########################################################################
## OSS Support
|