Loading...
Searching...
No Matches
osx_impl.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2006, 2013-2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_AUDIO_OSX_IMPL_H
#define INCLUDED_AUDIO_OSX_IMPL_H
#include <gnuradio/audio/api.h>
#include <vector>
#include <string.h>
#include <AudioToolbox/AudioToolbox.h>
#include <AudioUnit/AudioUnit.h>
// helper function to print an ASBD
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.
void GR_AUDIO_API get_num_channels_for_audio_device_id(AudioDeviceID ad_id,
UInt32* n_input,
UInt32* n_output);
// search all known audio devices, input or output, for all that
// match the provided device_name string (in part or in whole).
// Returns a vector of all matching IDs, and another of all
// matching names. If the device name is empty, then match all
// input or output 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);
} /* namespace osx */
} /* namespace audio */
} /* namespace gr */
#endif /* INCLUDED_AUDIO_OSX_IMPL_H */
api.h
GR_AUDIO_API
#define GR_AUDIO_API
Definition gr-audio/include/gnuradio/audio/api.h:18
gr::audio::osx
Definition osx_impl.h:30
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)
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::audio
Definition osx_impl.h:29
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
operator<<
std::ostream &GR_AUDIO_API operator<<(std::ostream &s, const AudioStreamBasicDescription &asbd)