GNU Radio Manual and C++ API Reference  3.10.9.1
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 // helper function to print an ASBD
24 
25 std::ostream& GR_AUDIO_API operator<<(std::ostream& s,
26  const AudioStreamBasicDescription& asbd);
27 
28 namespace gr {
29 namespace audio {
30 namespace osx {
31 
32 // returns the number of channels for the provided AudioDeviceID,
33 // input and/or output depending on if the pointer is valid.
34 
36  UInt32* n_input,
37  UInt32* n_output);
38 
39 // search all known audio devices, input or output, for all that
40 // match the provided device_name string (in part or in whole).
41 // Returns a vector of all matching IDs, and another of all
42 // matching names. If the device name is empty, then match all
43 // input or output devices.
44 
45 void GR_AUDIO_API find_audio_devices(const std::string& device_name,
46  bool is_input,
47  std::vector<AudioDeviceID>* all_ad_ids,
48  std::vector<std::string>* all_names);
49 
50 } /* namespace osx */
51 } /* namespace audio */
52 } /* namespace gr */
53 
54 #endif /* INCLUDED_AUDIO_OSX_IMPL_H */
#define GR_AUDIO_API
Definition: gr-audio/include/gnuradio/audio/api.h:18
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)
void GR_AUDIO_API get_num_channels_for_audio_device_id(AudioDeviceID ad_id, UInt32 *n_input, UInt32 *n_output)
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::ostream &GR_AUDIO_API operator<<(std::ostream &s, const AudioStreamBasicDescription &asbd)