kwave
18.07.70
|
#include <QtGlobal>
#include <limits>
#include <sys/types.h>
Go to the source code of this file.
Macros | |
#define | SAMPLE_INDEX_MAX ( std::numeric_limits<sample_index_t>::max() ) |
#define | SAMPLE_BITS 24 |
#define | SAMPLE_STORAGE_BITS (sizeof(sample_storage_t) * 8) |
#define | SAMPLE_MIN (-(1 << (SAMPLE_BITS - 1)) + 1) |
#define | SAMPLE_MAX (+(1 << (SAMPLE_BITS - 1)) - 1) |
Typedefs | |
typedef quint64 | sample_index_t |
typedef qint32 | sample_t |
typedef qint32 | sample_storage_t |
Functions | |
static sample_t | float2sample (const float f) |
static float | sample2float (const sample_t s) |
static double | sample2double (const sample_t s) |
static sample_t | double2sample (const double f) |
#define SAMPLE_BITS 24 |
number of significant bits per sample
Definition at line 43 of file Sample.h.
Referenced by Kwave::AudiofileDecoder::decode(), Kwave::WavDecoder::decode(), decode_linear(), decode_NULL(), double2sample(), Kwave::TrackPixmap::drawOverview(), Kwave::WavEncoder::encode(), Kwave::FlacEncoder::encode(), encode_linear(), float2sample(), Kwave::OggDecoder::parseHeader(), Kwave::MP3Decoder::parseMp3Header(), Kwave::MP3Decoder::processOutput(), sample2double(), sample2float(), and Kwave::FlacDecoder::write_callback().
#define SAMPLE_INDEX_MAX ( std::numeric_limits<sample_index_t>::max() ) |
the highest possible sample index
Definition at line 31 of file Sample.h.
Referenced by Kwave::OverViewWidget::calculateBitmap(), Kwave::TrackView::canHandleSelection(), Kwave::SignalView::canHandleSelection(), Kwave::SignalView::dragEnterEvent(), Kwave::SignalView::dragLeaveEvent(), Kwave::SignalView::dragMoveEvent(), Kwave::SignalView::dropEvent(), Kwave::MetaData::lastSample(), Kwave::LabelList::nextLabelRight(), Kwave::SignalManager::openReader(), Kwave::TrackView::paintEvent(), Kwave::MetaDataList::scalePositions(), Kwave::SelectionTracker::selectRange(), Kwave::MetaDataList::shiftRight(), Kwave::OverViewWidget::showCursor(), Kwave::OverViewCache::slotInvalidated(), Kwave::SonagramPlugin::slotInvalidated(), Kwave::SelectionTracker::slotSamplesDeleted(), Kwave::SelectionTracker::slotSamplesInserted(), and Kwave::UndoAddMetaDataAction::UndoAddMetaDataAction().
#define SAMPLE_MAX (+(1 << (SAMPLE_BITS - 1)) - 1) |
highest sample value
Definition at line 52 of file Sample.h.
Referenced by Kwave::OpusDecoder::decode(), decodeFrame(), Kwave::TrackPixmap::drawInterpolatedSignal(), Kwave::TrackPixmap::drawPolyLineSignal(), Kwave::OverViewCache::getMinMax(), Kwave::OverViewCache::getOverView(), Kwave::SampleReader::minMax(), Kwave::DebugPlugin::run(), Kwave::OverViewCache::scaleUp(), and Kwave::OverViewCache::slotTrackInserted().
#define SAMPLE_MIN (-(1 << (SAMPLE_BITS - 1)) + 1) |
lowest sample value
Definition at line 49 of file Sample.h.
Referenced by Kwave::OpusDecoder::decode(), decodeFrame(), Kwave::OverViewCache::getMinMax(), Kwave::SampleReader::minMax(), Kwave::DebugPlugin::run(), Kwave::OverViewCache::scaleUp(), and Kwave::OverViewCache::slotTrackInserted().
#define SAMPLE_STORAGE_BITS (sizeof(sample_storage_t) * 8) |
number of bits used for storing samples in integer representation
Definition at line 46 of file Sample.h.
Referenced by Kwave::AudiofileDecoder::decode(), Kwave::WavDecoder::decode(), Kwave::WavEncoder::encode(), Kwave::AudiofileDecoder::open(), and Kwave::WavDecoder::open().
typedef quint64 sample_index_t |
typedef qint32 sample_storage_t |
typedef qint32 sample_t |
|
inlinestatic |
Simple conversion from double to sample_t
Definition at line 81 of file Sample.h.
References SAMPLE_BITS.
Referenced by Kwave::OpusDecoder::decode(), decodeFrame(), Kwave::Osc::goOn(), Kwave::CurveStreamAdapter::goOn(), Kwave::NoiseGenerator::input(), Kwave::Normalizer::input(), Kwave::LowPassFilter::input(), Kwave::NotchFilter::input(), Kwave::BandPass::input(), and Kwave::DebugPlugin::run().
|
inlinestatic |
Simple conversion from float to sample_t
Definition at line 57 of file Sample.h.
References SAMPLE_BITS.
Referenced by Kwave::RateConverter::input(), Kwave::PitchShiftFilter::input(), Kwave::Mul::multiply(), and Kwave::DebugPlugin::run().
|
inlinestatic |
Simple conversion from sample_t to double
Definition at line 73 of file Sample.h.
References SAMPLE_BITS.
Referenced by Kwave::NormalizePlugin::getMaxPowerOfTrack(), Kwave::NoiseGenerator::input(), Kwave::Normalizer::input(), Kwave::LowPassFilter::input(), Kwave::NotchFilter::input(), Kwave::BandPass::input(), Kwave::SonagramPlugin::makeAllValid(), and Kwave::NoiseDialog::updateDisplay().
|
inlinestatic |
Simple conversion from sample_t to float
Definition at line 65 of file Sample.h.
References SAMPLE_BITS.
Referenced by Kwave::RecordPlugin::checkTrigger(), Kwave::VorbisEncoder::encode(), Kwave::OpusEncoder::fillInBuffer(), Kwave::RateConverter::input(), Kwave::PitchShiftFilter::input(), Kwave::Mul::multiply(), and Kwave::LevelMeter::updateTrack().