Soundfile Class Reference

#include <soundfile.h>

List of all members.

Public Slots

void seek (Position new_pos)

Public Member Functions

bool open (const QString &fileName)
void close ()
int process (unsigned long size, float *output)

Protected Attributes

SNDFILE * m_sndfile
QReadWriteLock m_sndfile_lock
SF_INFO m_info
QReadWriteLock m_info_lock
AudioCtlm_audioctl


Detailed Description

class for managing soundfileIO for a single track it is using the library libsndfile - see http://www.mega-nerd.com/libsndfile/


Member Function Documentation

bool Soundfile::open ( const QString &  fileName  ) 

opens a mono or stereo soundfile

Parameters:
fileName path to the file
Returns:
true if successful

void Soundfile::close (  ) 

close the soundfile if loaded

int Soundfile::process ( unsigned long  size,
float *  output 
)

adds the audiodata of this track to the buffer output

Note:
everything here must be threadsafe !!!
Parameters:
size nr. of samples to write (bufsize)
output output buffer: always stereo !!! (see AudioCtl how to write into this buffer !)
Returns:
-1 if file is over, otherwise 0
Note:
there are a number of locks here in this function, which should be avoided in future !!! Also the file access etc. should be done in a separate thread !

void Soundfile::seek ( Position  new_pos  )  [slot]

seek in the sound file

Parameters:
new_pos seek in samples from the beginning


Member Data Documentation

SNDFILE* Soundfile::m_sndfile [protected]

the soundfile pointer and it's lock

SF_INFO Soundfile::m_info [protected]

info about the soundfile and it's lock

AudioCtl* Soundfile::m_audioctl [protected]

the audio controller


The documentation for this class was generated from the following files:
Generated on Fri Jul 6 12:38:40 2007 for audioeditor.kdevelop by  doxygen 1.5.2