#include <audio_windows_sink.h>
input signature is one or two streams of floats. Input samples must be in the range [-1,1].
Public Member Functions | |
~audio_windows_sink () | |
int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
just like gr_block::general_work, only this arranges to call consume_each for you | |
Protected Member Functions | |
int | string_to_int (const std::string &s) |
audio_windows_sink (int sampling_freq, const std::string device_name="") | |
int | open_waveout_device (void) |
int | write_waveout (HPSTR lp_data, DWORD dw_data_size) |
Friends | |
audio_windows_sink_sptr | audio_windows_make_sink (int sampling_freq, const std::string device_name) |
audio_windows_sink::audio_windows_sink | ( | int | sampling_freq, | |
const std::string | device_name = "" | |||
) | [protected] |
References FALSE, NULL, open_waveout_device(), and gr_block::set_output_multiple().
audio_windows_sink::~audio_windows_sink | ( | ) |
int audio_windows_sink::string_to_int | ( | const std::string & | s | ) | [protected] |
Referenced by open_waveout_device().
int audio_windows_sink::open_waveout_device | ( | void | ) | [protected] |
Identifier of the waveform-audio output device to open. It can be either a device identifier or a handle of an open waveform-audio input device. You can use the following flag instead of a device identifier.
Value Meaning WAVE_MAPPER The function selects a waveform-audio output device capable of playing the given format.
References NULL, and string_to_int().
Referenced by audio_windows_sink().
int audio_windows_sink::write_waveout | ( | HPSTR | lp_data, | |
DWORD | dw_data_size | |||
) | [protected] |
Referenced by work().
int audio_windows_sink::work | ( | int | noutput_items, | |
gr_vector_const_void_star & | input_items, | |||
gr_vector_void_star & | output_items | |||
) | [virtual] |
just like gr_block::general_work, only this arranges to call consume_each for you
The user must override work to define the signal processing code
Implements gr_sync_block.
References write_waveout().
audio_windows_sink_sptr audio_windows_make_sink | ( | int | sampling_freq, | |
const std::string | device_name | |||
) | [friend] |