19 #ifndef __libbackend_portaudio_pcmio_h__
20 #define __libbackend_portaudio_pcmio_h__
28 #include <portaudio.h>
59 bool get_asio_buffer_properties (
int device_id,
60 long& min_size_samples,
61 long& max_size_samples,
62 long& preferred_size_samples,
65 bool get_asio_buffer_sizes(
int device_id,
66 std::vector<uint32_t>& buffer_size,
76 uint32_t samples_per_period);
81 uint32_t samples_per_period,
82 PaStreamCallback* callback,
120 PaStreamParameters& outputParam)
const;
122 PaStreamParameters& inputParam)
const;
128 PaStreamParameters& inputParam,
130 PaStreamParameters& outputParam,
132 uint32_t samples_per_period);
static void get_default_buffer_sizes(std::vector< uint32_t > &)
uint32_t _playback_channels
std::string _host_api_name
PaHostApiIndex _host_api_index
double sample_rate(void) const
std::string get_output_channel_name(int device_id, uint32_t channel) const
PaErrorCode open_blocking_stream(int device_input, int device_output, double sample_rate, uint32_t samples_per_period)
static void get_default_sample_rates(std::vector< float > &)
uint32_t capture_latency(void) const
std::string get_input_channel_name(int device_id, uint32_t channel) const
static bool pa_initialize()
PaErrorCode pre_stream_open(int device_input, PaStreamParameters &inputParam, int device_output, PaStreamParameters &outputParam, uint32_t sample_rate, uint32_t samples_per_period)
std::string control_app_name(int device_id) const
int available_sample_rates(int device_id, std::vector< float > &sample_rates)
PaDeviceIndex get_default_output_device() const
bool get_output_stream_params(int device_output, PaStreamParameters &outputParam) const
float * get_playback_buffer()
PaHostApiIndex get_host_api_index_from_name(const std::string &name)
uint32_t playback_latency(void) const
void host_api_list(std::vector< std::string > &)
void reset_stream_dependents()
std::map< int, paDevice * > _input_devices
PaHostApiTypeId get_current_host_api_type() const
uint32_t _capture_channels
PaDeviceIndex get_default_input_device() const
bool get_input_stream_params(int device_input, PaStreamParameters &inputParam) const
uint32_t n_capture_channels(void) const
int set_playback_channel(uint32_t chn, const float *input, uint32_t n_samples)
PaErrorCode close_stream(void)
float * get_capture_buffer()
void add_default_devices()
int get_capture_channel(uint32_t chn, float *input, uint32_t n_samples)
int available_buffer_sizes(int device_id, std::vector< uint32_t > &buffer_sizes)
bool set_host_api(const std::string &host_api_name)
bool allocate_buffers_for_blocking_api(uint32_t samples_per_period)
static bool & pa_initialized()
bool set_sample_rate_and_latency_from_stream()
void input_device_list(std::map< int, std::string > &devices) const
void launch_control_app(int device_id)
PaErrorCode open_callback_stream(int device_input, int device_output, double sample_rate, uint32_t samples_per_period, PaStreamCallback *callback, void *data)
static bool pa_deinitialize()
std::string get_host_api_name_from_index(PaHostApiIndex index)
uint32_t _cur_input_latency
uint32_t _cur_output_latency
void clear_device_lists()
double stream_time(void) const
std::string get_host_api() const
std::map< int, paDevice * > _output_devices
void output_device_list(std::map< int, std::string > &devices) const
PaErrorCode start_stream(void)
int next_cycle(uint32_t n_samples)
uint32_t n_playback_channels(void) const
GtkImageIconNameData name
paDevice(std::string n, uint32_t i, uint32_t o)