Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AudioGrabber Class Reference

#include <Devices/AudioGrabber.H>

Inheritance diagram for AudioGrabber:

Inheritance graph
[legend]
Collaboration diagram for AudioGrabber:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class to grab audio samples from an audio device.

For now, grabbing is done using a blocking read() onto the DSP device.

Definition at line 49 of file AudioGrabber.H.

Public Member Functions

 AudioGrabber (OptionManager &mgr, const std::string &descrName="Audio Grabber Driver", const std::string &tagName="AudioGrabber")
 Constructor.
 ~AudioGrabber ()
 Destructor.
template<class T>
void grab (AudioBuffer< T > &buf) const
 Grab a buffer.

Protected Member Functions

void start2 ()
 get started (see ModelComponent.H)
void stop1 ()
 get stopped (see ModelComponent.H)

Protected Attributes

OModelParam< std::stringitsDevName
 audio device name
OModelParam< uintitsBits
 bits per sample (8 or 16)
OModelParam< uintitsFreq
 sampling frequency (Hz)
OModelParam< uintitsBufsamples
 samples per buffer
OModelParam< bool > itsStereo
 stereo recording?


Constructor & Destructor Documentation

AudioGrabber::AudioGrabber OptionManager mgr,
const std::string descrName = "Audio Grabber Driver",
const std::string tagName = "AudioGrabber"
 

Constructor.

Definition at line 55 of file AudioGrabber.C.

AudioGrabber::~AudioGrabber  ) 
 

Destructor.

Definition at line 136 of file AudioGrabber.C.


Member Function Documentation

template<class T>
void AudioGrabber::grab AudioBuffer< T > &  buf  )  const
 

Grab a buffer.

Definition at line 141 of file AudioGrabber.C.

References ASSERT, AudioBuffer< T >::getDataPtr(), OModelParam< T >::getVal(), itsBits, itsBufsamples, itsFreq, itsStereo, NO_INIT, PLERROR, and AudioBuffer< T >::sizeBytes().

Referenced by audiorecorder(), and grabAudio().

void AudioGrabber::start2  )  [protected, virtual]
 

get started (see ModelComponent.H)

Reimplemented from ModelComponent.

Definition at line 67 of file AudioGrabber.C.

References OModelParam< T >::getVal(), itsBits, itsBufsamples, itsDevName, itsFreq, itsStereo, LDEBUG, LFATAL, LINFO, PLERROR, PLFATAL, and x.

void AudioGrabber::stop1  )  [protected, virtual]
 

get stopped (see ModelComponent.H)

Reimplemented from ModelComponent.

Definition at line 123 of file AudioGrabber.C.

References PLFATAL.


Member Data Documentation

OModelParam<uint> AudioGrabber::itsBits [protected]
 

bits per sample (8 or 16)

Definition at line 69 of file AudioGrabber.H.

Referenced by grab(), and start2().

OModelParam<uint> AudioGrabber::itsBufsamples [protected]
 

samples per buffer

Definition at line 71 of file AudioGrabber.H.

Referenced by grab(), and start2().

OModelParam<std::string> AudioGrabber::itsDevName [protected]
 

audio device name

Definition at line 68 of file AudioGrabber.H.

Referenced by start2().

OModelParam<uint> AudioGrabber::itsFreq [protected]
 

sampling frequency (Hz)

Definition at line 70 of file AudioGrabber.H.

Referenced by grab(), and start2().

OModelParam<bool> AudioGrabber::itsStereo [protected]
 

stereo recording?

Definition at line 72 of file AudioGrabber.H.

Referenced by grab(), and start2().


The documentation for this class was generated from the following files:
Generated on Sat Nov 7 13:35:00 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4