Main Page   Class Hierarchy   Compound List   File List   Compound Members  

AUFile Class Reference

#include <AUFile.h>

Collaboration diagram for AUFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AUFile (void)
 ~AUFile (void)
 AUFile (AUFile &source)
bool open (const char *filename)
bool write (const char *filename)
bool record (const char *filename, unsigned int duration)
bool play (void) const
void normalize (void)
bool cutSampleRange (unsigned int length)
vector< double > & getData (void)
unsigned int getSize (void)
AU_info_datagetInformation (void)
bool setInformation (unsigned int size, unsigned char *data)
void setSize (unsigned int size)
const char * getFilename (void)

Private Attributes

char * filename
au_filehdr au_header
vector< double > au_data
AU_info_data i_data
bool if_open

Friends

class GUIMainImpl

Detailed Description

One AU format sound file. Represents the entire file without information loss and provides means of changing each part of the file.


Constructor & Destructor Documentation

AUFile::AUFile void   
 

Standard constructor.

AUFile::~AUFile void   
 

Standard destructor.

AUFile::AUFile AUFile &    source
 

Copy constructor.


Member Function Documentation

bool AUFile::cutSampleRange unsigned int    length
 

Shrink an AU file to the usable samplerange.

Parameters:
length Length of the samplerange
Returns:
true if successful, false if failed

vector< double > & AUFile::getData void   
 

Getter for the audio data stream

const char * AUFile::getFilename void   
 

Getter for the filename.

Returns:
filename of the au-file this object contains.

AU_info_data * AUFile::getInformation void   
 

Getter for the additional header information

unsigned int AUFile::getSize void   
 

Getter for the audio stream size

void AUFile::normalize void   
 

Normalize the audio stream data.

bool AUFile::open const char *    filename
 

Open an AU file and write its content to the class.

Parameters:
filename Filename of the AU file which should be opened.
Returns:
True on success, false on failure.

bool AUFile::play void    const
 

Play the AU file.

Returns:
True on success, false on failure.

bool AUFile::record const char *    filename,
unsigned int    duration
 

Record a new AU file

Parameters:
filename Filename the data is written to.
duration Length of recording in seconds. Must be in the range of 1 to 20.
Returns:
True on success, false on failure.

bool AUFile::setInformation unsigned int    size,
unsigned char *    data
 

Setter for the additional header information.

Parameters:
size The byte-length of the new information.
data The byte array data.
Returns:
false in case the information could not be set, true when the information have been successfully updated.

void AUFile::setSize unsigned int    size
 

Setter for audio data stream size.

Parameters:
size New size of the stream

bool AUFile::write const char *    filename
 

Write the class data to an AU file.

Parameters:
filename Filename the data is written to.
Returns:
True in case of success, false when failed.


Member Data Documentation

vector<double> AUFile::au_data [private]
 

The audio data stream of the au-file.

au_filehdr AUFile::au_header [private]
 

The header of the au-file.

char* AUFile::filename [private]
 

Filename when loaded from file or NULL when new object.

AU_info_data AUFile::i_data [private]
 

Additional information which can be added at the end of the header

bool AUFile::if_open [private]
 

Flag, which is set to true once a file has been loaded. Otherwise, that is before any data has been loaded, it is set to false.


The documentation for this class was generated from the following files:
Generated on Mon Feb 24 19:37:44 2003 by doxygen1.3-rc3