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

WavFile Class Reference

#include </home/clem/local/src/opie/noncore/multimedia/opierec/wavFile.h>

Collaboration diagram for WavFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WavFile (QObject *parent=0, const QString &fileName=0, bool newFile=0, int sampleRate=0, int channels=0, int resolution=0, int format=0)
 ~WavFile ()
bool adjustHeaders (int fd, int total)
QString trackName ()
int wavHandle ()
int getFormat ()
int getResolution ()
int getSampleRate ()
int getNumberSamples ()
int getChannels ()
bool isTempFile ()
int openFile (const QString &)
bool newFile ()
void closeFile ()

Public Attributes

wavhdr hdr
QString currentFileName
QFile track

Private Member Functions

bool setWavHeader (int fd, wavhdr *hdr)
int parseWavHeader (int fd)

Private Attributes

int wavFormat
int wavChannels
int wavResolution
int wavSampleRate
int wavNumberSamples
bool useTmpFile

Constructor & Destructor Documentation

WavFile::WavFile QObject *  parent = 0,
const QString fileName = 0,
bool  newFile = 0,
int  sampleRate = 0,
int  channels = 0,
int  resolution = 0,
int  format = 0
 

Definition at line 26 of file wavFile.cpp.

References newFile(), oendl, openFile(), owarn, useTmpFile, wavChannels, wavFormat, wavResolution, and wavSampleRate.

WavFile::~WavFile  ) 
 

Definition at line 101 of file wavFile.cpp.

References closeFile().


Member Function Documentation

bool WavFile::adjustHeaders int  fd,
int  total
 

Definition at line 159 of file wavFile.cpp.

References i, and write().

Referenced by QtRec::endRecording().

void WavFile::closeFile  ) 
 

Definition at line 106 of file wavFile.cpp.

References QFile::close(), QIODevice::isOpen(), and track.

Referenced by QtRec::endRecording(), QtRec::errorStop(), openFile(), and ~WavFile().

int WavFile::getChannels  ) 
 

Definition at line 311 of file wavFile.cpp.

References wavChannels.

Referenced by QtRec::openPlayFile().

int WavFile::getFormat  ) 
 

Definition at line 291 of file wavFile.cpp.

References wavFormat.

Referenced by QtRec::openPlayFile().

int WavFile::getNumberSamples  ) 
 

Definition at line 303 of file wavFile.cpp.

References wavNumberSamples.

Referenced by QtRec::openPlayFile().

int WavFile::getResolution  ) 
 

Definition at line 295 of file wavFile.cpp.

References wavResolution.

Referenced by QtRec::openPlayFile().

int WavFile::getSampleRate  ) 
 

Definition at line 299 of file wavFile.cpp.

References wavSampleRate.

Referenced by QtRec::openPlayFile().

bool WavFile::isTempFile  ) 
 

Definition at line 307 of file wavFile.cpp.

References useTmpFile.

Referenced by QtRec::endRecording().

bool WavFile::newFile  ) 
 

Definition at line 44 of file wavFile.cpp.

References QDateTime::currentDateTime(), currentFileName, QString::find(), QFile::handle(), hdr, QDir::homeDirPath(), IO_ReadWrite, IO_Truncate, message, odebug, oendl, QFile::open(), Opie::Core::perror(), Config::readEntry(), QString::replace(), QString::right(), Config::setGroup(), QFile::setName(), setWavHeader(), QDateTime::toString(), track, and useTmpFile.

Referenced by WavFile().

int WavFile::openFile const QString  ) 
 

Definition at line 111 of file wavFile.cpp.

References closeFile(), QFile::handle(), IO_ReadOnly, message, odebug, oendl, QFile::open(), parseWavHeader(), qWarning(), QFile::setName(), and track.

Referenced by WavFile().

int WavFile::parseWavHeader int  fd  )  [private]
 

Definition at line 169 of file wavFile.cpp.

References fmt(), odebug, oendl, Opie::Internal::string(), wavChannels, WAVE_FORMAT_DVI_ADPCM, WAVE_FORMAT_PCM, wavFormat, wavNumberSamples, wavResolution, and wavSampleRate.

Referenced by openFile().

bool WavFile::setWavHeader int  fd,
wavhdr hdr
[private]
 

Definition at line 128 of file wavFile.cpp.

References wavChannels, WAVE_FORMAT_DVI_ADPCM, WAVE_FORMAT_PCM, wavFormat, wavResolution, wavSampleRate, and write().

Referenced by newFile().

QString WavFile::trackName  ) 
 

Definition at line 283 of file wavFile.cpp.

References QFile::name(), and track.

Referenced by QtRec::endRecording(), and QtRec::rec().

int WavFile::wavHandle  ) 
 

Definition at line 287 of file wavFile.cpp.

References QFile::handle(), and track.

Referenced by QtRec::openPlayFile(), and QtRec::setUpFile().


Member Data Documentation

QString WavFile::currentFileName
 

Definition at line 35 of file wavFile.h.

Referenced by QtRec::endRecording(), and newFile().

wavhdr WavFile::hdr
 

Definition at line 33 of file wavFile.h.

Referenced by newFile().

QFile WavFile::track
 

Definition at line 38 of file wavFile.h.

Referenced by QtRec::changeTimeSlider(), closeFile(), QtRec::endRecording(), QtRec::FastforwardPressed(), QtRec::FastforwardReleased(), newFile(), openFile(), QtRec::rewindPressed(), QtRec::rewindReleased(), trackName(), and wavHandle().

bool WavFile::useTmpFile [private]
 

Definition at line 52 of file wavFile.h.

Referenced by isTempFile(), newFile(), and WavFile().

int WavFile::wavChannels [private]
 

Definition at line 51 of file wavFile.h.

Referenced by getChannels(), parseWavHeader(), setWavHeader(), and WavFile().

int WavFile::wavFormat [private]
 

Definition at line 51 of file wavFile.h.

Referenced by getFormat(), parseWavHeader(), setWavHeader(), and WavFile().

int WavFile::wavNumberSamples [private]
 

Definition at line 51 of file wavFile.h.

Referenced by getNumberSamples(), and parseWavHeader().

int WavFile::wavResolution [private]
 

Definition at line 51 of file wavFile.h.

Referenced by getResolution(), parseWavHeader(), setWavHeader(), and WavFile().

int WavFile::wavSampleRate [private]
 

Definition at line 51 of file wavFile.h.

Referenced by getSampleRate(), parseWavHeader(), setWavHeader(), and WavFile().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:55:32 2005 for OPIE by  doxygen 1.4.2