Public Member Functions

SoundfileData Class Reference

An abstract interface for decoding sound files. More...

#include <soundfile.hpp>

Inheritance diagram for SoundfileData:
MP3Data SndfileData

List of all members.

Public Member Functions

virtual ~SoundfileData ()
virtual QString error () const =0
 Used to get details in case of an error.
virtual real_vec read_channel (int channel)=0
 Loads a specified channel into a real-valued vector.
virtual size_t frames () const =0
 Returns the number of audio frames in each channel.
virtual double length () const =0
 Returns the length of the audio track in seconds.
virtual int samplerate () const =0
 Returns the samplerate of the audio file in Hz.
virtual int channels () const =0
 Returns the number of channels.
virtual bool valid () const =0
 Checks if the audio file is loaded correctly and ready for use.

Detailed Description

An abstract interface for decoding sound files.

It provides abstraction for all low-level functions used on sound files, implementation can be different for each format.

Definition at line 16 of file soundfile.hpp.


Constructor & Destructor Documentation

virtual SoundfileData::~SoundfileData (  )  [inline, virtual]

Definition at line 19 of file soundfile.hpp.


Member Function Documentation

virtual int SoundfileData::channels (  )  const [pure virtual]

Returns the number of channels.

Implemented in SndfileData, and MP3Data.

virtual QString SoundfileData::error (  )  const [pure virtual]

Used to get details in case of an error.

Implemented in SndfileData, and MP3Data.

virtual size_t SoundfileData::frames (  )  const [pure virtual]

Returns the number of audio frames in each channel.

Implemented in SndfileData, and MP3Data.

virtual double SoundfileData::length (  )  const [pure virtual]

Returns the length of the audio track in seconds.

Implemented in SndfileData, and MP3Data.

virtual real_vec SoundfileData::read_channel ( int  channel  )  [pure virtual]

Loads a specified channel into a real-valued vector.

Implemented in SndfileData, and MP3Data.

virtual int SoundfileData::samplerate (  )  const [pure virtual]

Returns the samplerate of the audio file in Hz.

Implemented in SndfileData, and MP3Data.

virtual bool SoundfileData::valid (  )  const [pure virtual]

Checks if the audio file is loaded correctly and ready for use.

Implemented in SndfileData, and MP3Data.


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