SilentEye 0.4.1
|
Representation of .wav file (WAVE PCM soundfile format) More...
#include <audiowav.h>
Public Types | |
enum | HeaderPosition { BEGINNING = 1, ENDING = 2 } |
enum | DataDistribution { INLINE = 1, EQUI = 2 } |
Public Member Functions | |
AudioWav (const QString &) | |
AudioWav (const Audio &) | |
AudioWav (Audio *) | |
~AudioWav () | |
quint16 | nbBitsUsed () const |
void | setNbBitsUsed (const quint16) |
quint16 | nbChannelUsed () const |
void | setNbChannelUsed (const quint16) |
void | setDistribution (DataDistribution) |
void | setHeaderPosition (HeaderPosition) |
quint32 | capacity () const |
bool | loadData () |
bool | saveToDir (QString &) |
Protected Member Functions | |
int | computeHeaderSampleSize () const |
qint32 | computeDistributionStep (quint32) const |
bool | writeSampleChannel (QDataStream &, quint32) |
Private Member Functions | |
void | init () |
Private Attributes | |
quint16 | m_nbBitsUsed |
quint16 | m_nbChannelUsed |
HeaderPosition | m_headerPosition |
DataDistribution | m_distribution |
QPointer< Logger > | m_logger |
Representation of .wav file (WAVE PCM soundfile format)
Definition at line 28 of file audiowav.h.
Definition at line 32 of file audiowav.h.
Definition at line 31 of file audiowav.h.
SEFormatWAV::AudioWav::AudioWav | ( | const QString & | ) |
SEFormatWAV::AudioWav::AudioWav | ( | const Audio & | audio | ) |
Definition at line 29 of file audiowav.cpp.
SEFormatWAV::AudioWav::AudioWav | ( | Audio * | audio | ) |
Definition at line 35 of file audiowav.cpp.
SEFormatWAV::AudioWav::~AudioWav | ( | ) |
Definition at line 52 of file audiowav.cpp.
References m_logger.
quint32 SEFormatWAV::AudioWav::capacity | ( | ) | const [virtual] |
Reimplemented from SilentEyeFramework::Media.
Definition at line 94 of file audiowav.cpp.
References m_nbBitsUsed, m_nbChannelUsed, and SilentEyeFramework::Audio::sampleSize().
Referenced by loadData(), and saveToDir().
qint32 SEFormatWAV::AudioWav::computeDistributionStep | ( | quint32 | size | ) | const [protected] |
Definition at line 347 of file audiowav.cpp.
References m_logger, m_nbBitsUsed, m_nbChannelUsed, and SilentEyeFramework::Audio::sampleSize().
Referenced by loadData(), and saveToDir().
int SEFormatWAV::AudioWav::computeHeaderSampleSize | ( | ) | const [protected] |
Definition at line 342 of file audiowav.cpp.
References m_nbBitsUsed, and m_nbChannelUsed.
Referenced by loadData(), and saveToDir().
void SEFormatWAV::AudioWav::init | ( | ) | [private] |
Definition at line 41 of file audiowav.cpp.
bool SEFormatWAV::AudioWav::loadData | ( | ) | [virtual] |
Reimplemented from SilentEyeFramework::Media.
Definition at line 102 of file audiowav.cpp.
References SilentEyeFramework::EncodedData::append(), BEGINNING, capacity(), SilentEyeFramework::Audio::closeSamples(), computeDistributionStep(), computeHeaderSampleSize(), ENDING, SilentEyeFramework::Audio::hasNextSample(), SilentEyeFramework::EncodedData::initialize(), SilentEyeFramework::Audio::m_bitPerSample, SilentEyeFramework::Media::m_data, SilentEyeFramework::Media::m_filePath, m_headerPosition, SilentEyeFramework::Media::m_isLoaded, m_logger, m_nbBitsUsed, m_nbChannelUsed, SilentEyeFramework::Audio::m_numChannels, SilentEyeFramework::Audio::m_subDataSize, SilentEyeFramework::Audio::openSamples(), SilentEyeFramework::Audio::readSample(), SilentEyeFramework::Audio::sampleSize(), SilentEyeFramework::Audio::skipSample(), and SilentEyeFramework::EncodedData::toUInt32().
quint16 SEFormatWAV::AudioWav::nbBitsUsed | ( | ) | const |
Definition at line 60 of file audiowav.cpp.
References m_nbBitsUsed.
quint16 SEFormatWAV::AudioWav::nbChannelUsed | ( | ) | const |
Definition at line 70 of file audiowav.cpp.
References m_nbChannelUsed.
bool SEFormatWAV::AudioWav::saveToDir | ( | QString & | outputDirPath | ) | [virtual] |
Reimplemented from SilentEyeFramework::Media.
Definition at line 186 of file audiowav.cpp.
References BEGINNING, capacity(), SilentEyeFramework::Audio::closeSamples(), computeDistributionStep(), computeHeaderSampleSize(), ENDING, SilentEyeFramework::Audio::hasNextSample(), SilentEyeFramework::Audio::m_bitPerSample, SilentEyeFramework::Audio::m_byteOrder, SilentEyeFramework::Media::m_data, SilentEyeFramework::Media::m_filePath, m_headerPosition, m_logger, m_nbBitsUsed, m_nbChannelUsed, SilentEyeFramework::Audio::m_numChannels, SilentEyeFramework::Media::m_shortName, SilentEyeFramework::Audio::m_subDataSize, SilentEyeFramework::Audio::openSamples(), SilentEyeFramework::Audio::readSample(), SilentEyeFramework::Audio::sampleSize(), writeSampleChannel(), and SilentEyeFramework::Audio::writeWaveHeader().
void SEFormatWAV::AudioWav::setDistribution | ( | DataDistribution | value | ) |
Definition at line 84 of file audiowav.cpp.
References m_distribution.
Referenced by SEFormatWAV::SEFormatWav::updateAudio().
void SEFormatWAV::AudioWav::setHeaderPosition | ( | HeaderPosition | value | ) |
Definition at line 89 of file audiowav.cpp.
References m_headerPosition.
Referenced by SEFormatWAV::SEFormatWav::updateAudio().
void SEFormatWAV::AudioWav::setNbBitsUsed | ( | const quint16 | value | ) |
Definition at line 65 of file audiowav.cpp.
References m_nbBitsUsed.
Referenced by SEFormatWAV::SEFormatWav::updateAudio().
void SEFormatWAV::AudioWav::setNbChannelUsed | ( | const quint16 | value | ) |
Definition at line 75 of file audiowav.cpp.
References m_nbChannelUsed, and SilentEyeFramework::Audio::m_numChannels.
Referenced by SEFormatWAV::SEFormatWav::updateAudio().
bool SEFormatWAV::AudioWav::writeSampleChannel | ( | QDataStream & | out, |
quint32 | sample | ||
) | [protected] |
Definition at line 363 of file audiowav.cpp.
Referenced by saveToDir().
Definition at line 38 of file audiowav.h.
Referenced by setDistribution().
Definition at line 37 of file audiowav.h.
Referenced by loadData(), saveToDir(), and setHeaderPosition().
QPointer<Logger> SEFormatWAV::AudioWav::m_logger [private] |
Definition at line 40 of file audiowav.h.
Referenced by computeDistributionStep(), loadData(), saveToDir(), and ~AudioWav().
quint16 SEFormatWAV::AudioWav::m_nbBitsUsed [private] |
Definition at line 35 of file audiowav.h.
Referenced by capacity(), computeDistributionStep(), computeHeaderSampleSize(), loadData(), nbBitsUsed(), saveToDir(), and setNbBitsUsed().
quint16 SEFormatWAV::AudioWav::m_nbChannelUsed [private] |
Definition at line 36 of file audiowav.h.
Referenced by capacity(), computeDistributionStep(), computeHeaderSampleSize(), loadData(), nbChannelUsed(), saveToDir(), and setNbChannelUsed().