Panda3D
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes

MicrophoneAudio Class Reference

Class MicrophoneAudio provides the means to read raw audio samples from a microphone. More...

#include "microphoneAudio.h"

Inheritance diagram for MicrophoneAudio:
MovieAudio TypedWritableReferenceCount Namable TypedWritable ReferenceCount MemoryBase TypedObject MemoryBase MemoryBase

List of all members.

Public Member Functions

virtual TypeHandle force_init_type ()
int get_channels () const
 Returns the number of channels.
int get_rate () const
 Returns the sample rate.
virtual TypeHandle get_type () const
 MAKE_SEQ (get_options, get_num_options, get_option)
virtual PT (MovieAudioCursor) open()=0

Static Public Member Functions

static void find_all_microphones ()
 Scans the hardware for microphones, and pushes them onto the global list of all microphones.
static TypeHandle get_class_type ()
static int get_num_options ()
 Returns the number of microphone options.
static void init_type ()
static PT (MicrophoneAudio) get_option(int n)

Protected Attributes

int _channels
int _rate

Static Protected Attributes

static pvector< PT(MicrophoneAudio)> _all_microphones

Detailed Description

Class MicrophoneAudio provides the means to read raw audio samples from a microphone.

Definition at line 27 of file microphoneAudio.h.


Member Function Documentation

void MicrophoneAudio::find_all_microphones ( ) [static]

Scans the hardware for microphones, and pushes them onto the global list of all microphones.

There are several implementations of MicrophoneAudio, including one based on DirectShow, one based on Linux ALSA, and so forth. These implementations are contained in one C++ file each, and they export nothing at all except a single "find_all" function. Otherwise, they can only be accessed through the virtual methods of the MicrophoneAudio objects they create.

Definition at line 46 of file microphoneAudio.cxx.

Referenced by get_num_options().

int MicrophoneAudio::get_channels ( ) const [inline]

Returns the number of channels.

Definition at line 21 of file microphoneAudio.I.

int MicrophoneAudio::get_num_options ( ) [static]

Returns the number of microphone options.

An "option" consists of a device plus a set of configuration parameters. For example, "Soundblaster Audigy Line in at 44,100 samples/sec" would be an option.

Definition at line 71 of file microphoneAudio.cxx.

References find_all_microphones().

int MicrophoneAudio::get_rate ( ) const [inline]

Returns the sample rate.

Definition at line 31 of file microphoneAudio.I.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations