audio_osx_source Class Reference

#include <audio_osx_source.h>

Inheritance diagram for audio_osx_source:

Inheritance graph
[legend]
Collaboration diagram for audio_osx_source:

Collaboration graph
[legend]

List of all members.


Detailed Description

audio source using OSX

Input signature is one or two streams of floats. Samples must be in the range [-1,1].

Public Member Functions

 ~audio_osx_source ()
bool start ()
 Called to enable drivers, etc for i/o devices.
bool stop ()
 Called to disable drivers, etc for i/o devices.
bool IsRunning ()
bool check_topology (int ninputs, int noutputs)
 Confirm that ninputs and noutputs is an acceptable combination.
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

 audio_osx_source (int sample_rate=44100, const std::string device_name="", bool do_block=true, int channel_config=-1, int max_sample_count=-1)

Friends

audio_osx_source_sptr audio_osx_make_source (int sample_rate, const std::string device_name, bool do_block, int channel_config, int max_sample_count)


Constructor & Destructor Documentation

audio_osx_source::audio_osx_source ( int  sample_rate = 44100,
const std::string  device_name = "",
bool  do_block = true,
int  channel_config = -1,
int  max_sample_count = -1 
) [protected]

audio_osx_source::~audio_osx_source (  ) 

References CheckError, and stop().


Member Function Documentation

bool audio_osx_source::start ( void   )  [virtual]

Called to enable drivers, etc for i/o devices.

This allows a block to enable an associated driver to begin transfering data just before we start to execute the scheduler. The end result is that this reduces latency in the pipeline when dealing with audio devices, usrps, etc.

Reimplemented from gr_block.

References CheckErrorAndThrow, and IsRunning().

bool audio_osx_source::stop (  )  [virtual]

Called to disable drivers, etc for i/o devices.

Reimplemented from gr_block.

References circular_buffer< T >::abort(), CheckErrorAndThrow, and IsRunning().

Referenced by ~audio_osx_source().

bool audio_osx_source::IsRunning (  ) 

References CheckErrorAndThrow.

Referenced by start(), and stop().

bool audio_osx_source::check_topology ( int  ninputs,
int  noutputs 
) [virtual]

Confirm that ninputs and noutputs is an acceptable combination.

Parameters:
ninputs number of input streams connected
noutputs number of output streams connected
Returns:
true if this is a valid configuration for this block.
This function is called by the runtime system whenever the topology changes. Most classes do not need to override this. This check is in addition to the constraints specified by the input and output gr_io_signatures.

Reimplemented from gr_basic_block.

int audio_osx_source::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 circular_buffer< T >::dequeue(), mld_mutex_t::lock(), mld_mutex_t::unlock(), and mld_condition_t::wait().


Friends And Related Function Documentation

audio_osx_source_sptr audio_osx_make_source ( int  sample_rate,
const std::string  device_name,
bool  do_block,
int  channel_config,
int  max_sample_count 
) [friend]


The documentation for this class was generated from the following files:

Generated on Thu Mar 27 14:42:30 2008 for GNU Radio 3.1.1 by  doxygen 1.5.5