GNU Radio Manual and C++ API Reference
3.10.3.0
The Free & Open Software Radio Ecosystem
osx_impl.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2006, 2013-2014 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio.
6
*
7
* SPDX-License-Identifier: GPL-3.0-or-later
8
*
9
*/
10
11
#ifndef INCLUDED_AUDIO_OSX_IMPL_H
12
#define INCLUDED_AUDIO_OSX_IMPL_H
13
14
#include <
gnuradio/audio/api.h
>
15
16
#include <vector>
17
18
#include <string.h>
19
20
#include <AudioToolbox/AudioToolbox.h>
21
#include <AudioUnit/AudioUnit.h>
22
23
// Check the version of MacOSX being used
24
#ifdef __APPLE_CC__
25
#include <AvailabilityMacros.h>
26
#ifndef MAC_OS_X_VERSION_10_6
27
#define MAC_OS_X_VERSION_10_6 1060
28
#endif
29
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
30
#define GR_USE_OLD_AUDIO_UNIT
31
#endif
32
#endif
33
34
// helper function to print an ASBD
35
36
std::ostream&
GR_AUDIO_API
operator<<
(std::ostream& s,
37
const
AudioStreamBasicDescription& asbd);
38
39
namespace
gr
{
40
namespace
audio {
41
namespace
osx {
42
43
// returns the number of channels for the provided AudioDeviceID,
44
// input and/or output depending on if the pointer is valid.
45
46
void
GR_AUDIO_API
get_num_channels_for_audio_device_id
(AudioDeviceID ad_id,
47
UInt32* n_input,
48
UInt32* n_output);
49
50
// search all known audio devices, input or output, for all that
51
// match the provided device_name string (in part or in whole).
52
// Returns a vector of all matching IDs, and another of all
53
// matching names. If the device name is empty, then match all
54
// input or output devices.
55
56
void
GR_AUDIO_API
find_audio_devices
(
const
std::string& device_name,
57
bool
is_input,
58
std::vector<AudioDeviceID>* all_ad_ids,
59
std::vector<std::string>* all_names);
60
61
}
/* namespace osx */
62
}
/* namespace audio */
63
}
/* namespace gr */
64
65
#endif
/* INCLUDED_AUDIO_OSX_IMPL_H */
gr::audio::osx::find_audio_devices
void GR_AUDIO_API find_audio_devices(const std::string &device_name, bool is_input, std::vector< AudioDeviceID > *all_ad_ids, std::vector< std::string > *all_names)
api.h
GR_AUDIO_API
#define GR_AUDIO_API
Definition:
gr-audio/include/gnuradio/audio/api.h:18
operator<<
std::ostream &GR_AUDIO_API operator<<(std::ostream &s, const AudioStreamBasicDescription &asbd)
gr::audio::osx::get_num_channels_for_audio_device_id
void GR_AUDIO_API get_num_channels_for_audio_device_id(AudioDeviceID ad_id, UInt32 *n_input, UInt32 *n_output)
gr
GNU Radio logging wrapper.
Definition:
basic_block.h:29
gr-audio
include
gnuradio
audio
osx_impl.h
Generated by
1.8.17