- -( dyne // software :: culture :: events :: planet :: discussion :: museum \\ freaknet )- -
 
Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members

SoundDevice Class Reference

#include <dev_sound.h>

Collaboration diagram for SoundDevice:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SoundDevice ()
 the SoundDevice class constructor

 ~SoundDevice ()
 the SoundDevice class destructor

bool open (bool read, bool write)
 open the sound device

bool input (bool state)
 activate sound input

bool output (bool state)
 activate sound output

void close ()
 close the sound device

int read (void *buf, int len)
 reads audio data from the device in a buffer, len is samples

int write (void *buf, int len)
 writes audio data from a buffer to the device, len is samples

void flush_input ()
void flush_output ()

Public Attributes

bool jack
bool jack_in
bool jack_out

Constructor & Destructor Documentation

SoundDevice::SoundDevice  ) 
 

the SoundDevice class constructor

Definition at line 72 of file dev_sound.cpp.

SoundDevice::~SoundDevice  ) 
 

the SoundDevice class destructor

Definition at line 88 of file dev_sound.cpp.


Member Function Documentation

void SoundDevice::close  ) 
 

close the sound device

Definition at line 272 of file dev_sound.cpp.

void SoundDevice::flush_input  ) 
 

Definition at line 336 of file dev_sound.cpp.

void SoundDevice::flush_output  ) 
 

Definition at line 333 of file dev_sound.cpp.

bool SoundDevice::input bool  state  ) 
 

activate sound input

Definition at line 113 of file dev_sound.cpp.

bool SoundDevice::open bool  read,
bool  write
 

open the sound device

Tries to open the sound device for read and/or write if full-duplex is requested but not supported, it returns error and must be called again to fallback on half-duplex mode

Parameters:
read true if device is opened for reading audio
write true if device is opened for writing audio
Returns:
true in case of success, false otherwise

Definition at line 226 of file dev_sound.cpp.

bool SoundDevice::output bool  state  ) 
 

activate sound output

Definition at line 219 of file dev_sound.cpp.

int SoundDevice::read void *  buf,
int  len
 

reads audio data from the device in a buffer, len is samples

Definition at line 303 of file dev_sound.cpp.

int SoundDevice::write void *  buf,
int  len
 

writes audio data from a buffer to the device, len is samples

Definition at line 319 of file dev_sound.cpp.


Member Data Documentation

bool SoundDevice::jack
 

Definition at line 59 of file dev_sound.h.

bool SoundDevice::jack_in
 

Definition at line 60 of file dev_sound.h.

bool SoundDevice::jack_out
 

Definition at line 61 of file dev_sound.h.


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