summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2017-05-09 12:15:25 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2017-05-09 12:15:25 -0700
commit74f87e9fa60b3643401be33e79afed099af5ab6f (patch)
tree338eb6eba11b313a15e1585fcd9c3150ba6ee6c5
parent0e3b5e453c15ae46a66f2a8636c21ad3869dfaf4 (diff)
parent0137459ee4cefafaceeb93a57ffb4e1ff912db7c (diff)
Merge remote-tracking branch 'github/pr/1308' into maint
-rw-r--r--gr-audio/include/gnuradio/audio/osx_impl.h14
-rw-r--r--gr-audio/lib/osx/osx_common.h5
-rw-r--r--gr-audio/lib/osx/osx_impl.cc8
3 files changed, 16 insertions, 11 deletions
diff --git a/gr-audio/include/gnuradio/audio/osx_impl.h b/gr-audio/include/gnuradio/audio/osx_impl.h
index 891685a335..6db130447e 100644
--- a/gr-audio/include/gnuradio/audio/osx_impl.h
+++ b/gr-audio/include/gnuradio/audio/osx_impl.h
@@ -33,10 +33,6 @@
#include <AudioToolbox/AudioToolbox.h>
#include <AudioUnit/AudioUnit.h>
-namespace gr {
-namespace audio {
-namespace osx {
-
// Check the version of MacOSX being used
#ifdef __APPLE_CC__
#include <AvailabilityMacros.h>
@@ -50,15 +46,19 @@ namespace osx {
// helper function to print an ASBD
-extern std::ostream& GR_AUDIO_API
+std::ostream& GR_AUDIO_API
operator<<
(std::ostream& s,
const AudioStreamBasicDescription& asbd);
+namespace gr {
+namespace audio {
+namespace osx {
+
// returns the number of channels for the provided AudioDeviceID,
// input and/or output depending on if the pointer is valid.
-extern void GR_AUDIO_API
+void GR_AUDIO_API
get_num_channels_for_audio_device_id
(AudioDeviceID ad_id,
UInt32* n_input,
@@ -70,7 +70,7 @@ get_num_channels_for_audio_device_id
// matching names. If the device name is empty, then match all
// input or output devices.
-extern void GR_AUDIO_API
+void GR_AUDIO_API
find_audio_devices
(const std::string& device_name,
bool is_input,
diff --git a/gr-audio/lib/osx/osx_common.h b/gr-audio/lib/osx/osx_common.h
index 59b866dbe3..5d8a3800a5 100644
--- a/gr-audio/lib/osx/osx_common.h
+++ b/gr-audio/lib/osx/osx_common.h
@@ -29,8 +29,13 @@ namespace gr {
namespace audio {
namespace osx {
+#ifndef _OSX_AU_DEBUG_
#define _OSX_AU_DEBUG_ 0
+#endif
+
+#ifndef _OSX_AU_DEBUG_RENDER_
#define _OSX_AU_DEBUG_RENDER_ 0
+#endif
#define check_error_and_throw(err,what,throw_str) \
if(err) { \
diff --git a/gr-audio/lib/osx/osx_impl.cc b/gr-audio/lib/osx/osx_impl.cc
index aa0320d18a..d18c24c786 100644
--- a/gr-audio/lib/osx/osx_impl.cc
+++ b/gr-audio/lib/osx/osx_impl.cc
@@ -33,10 +33,6 @@
#include <locale>
#include <stdexcept>
-namespace gr {
-namespace audio {
-namespace osx {
-
std::ostream&
operator<<
(std::ostream& s,
@@ -70,6 +66,10 @@ operator<<
return(s);
};
+namespace gr {
+namespace audio {
+namespace osx {
+
static UInt32
_get_num_channels
(AudioDeviceID ad_id,