Nsound
0.9.4
|
Very simple Wavefile reading class. More...
#include <Nsound/Wavefile.h>
Static Public Member Functions | |
static std::string | decodeFormatTag (const uint16 format_tag) |
static uint32 | getDefaultSampleRate () |
static uint32 | getDefaultSampleSize () |
static void | setDefaultSampleRate (const int32 rate) |
static void | setDefaultSampleRate (const float64 &rate) |
static void | setDefaultSampleSize (uint32 size) |
static void | setIEEEFloat (boolean flag) |
static void | setDefaults (const float64 &sample_rate=44100.0, const float64 &sample_bits=16.0, const boolean &use_ieee_floats=false) |
static boolean | read (const std::string &fileName, AudioStream &astream) |
static boolean | readHeader (const std::string &filename, std::string &info) |
Reads the basic header information and sets the info string. More... | |
static boolean | write (const std::string &fileName, const AudioStream &as, uint32 bits_per_sample=16) |
static boolean | write (const std::string &fileName, const Buffer &as, uint32 bits_per_sample, uint32 sample_rate) |
Static Public Attributes | |
static const uint32 | DATA_ = 1635017060 |
static const uint32 | FACT_ = 1952670054 |
static const uint32 | FMT_ = 544501094 |
static const uint32 | PEAK_ = 1262568784 |
static const uint32 | RIFF_ = 1179011410 |
static const uint32 | WAVE_ = 1163280727 |
static const uint16 | WAVE_FORMAT_PCM_ = 0x0001 |
static const uint16 | WAVE_FORMAT_IEEE_FLOAT_ = 0x0003 |
static const raw_float64 | SIGNED_64_BIT_ = 9223372036854775807.0 |
static const raw_float64 | SIGNED_48_BIT_ = 140737488355327.0 |
static const raw_float64 | SIGNED_32_BIT_ = 2147483647.0 |
static const raw_float64 | SIGNED_24_BIT_ = 8388607.0 |
static const raw_float64 | SIGNED_16_BIT_ = 32767.0 |
static const raw_float64 | SIGNED_8_BIT_ = 127.0 |
static const raw_uint64 | UNSIGNED_64_BIT_ = 18446744073709551615ULL |
static const raw_uint64 | UNSIGNED_48_BIT_ = 281474976710655ULL |
static const raw_uint64 | UNSIGNED_32_BIT_ = 4294967295ULL |
static const raw_uint64 | UNSIGNED_24_BIT_ = 16777215ULL |
static const raw_uint64 | UNSIGNED_16_BIT_ = 65535ULL |
static const raw_uint64 | UNSIGNED_8_BIT_ = 255ULL |
Static Protected Member Functions | |
static boolean | read (const std::string &filename, std::vector< Buffer * > *b_vector, AudioStream *as, std::stringstream *out) |
Static Protected Attributes | |
static uint32 | default_sample_rate_ = 44100 |
static uint32 | default_sample_size_ = 16 |
static uint16 | default_wave_format_ = Wavefile::WAVE_FORMAT_PCM_ |
Friends | |
Buffer & | operator<< (Buffer &lhs, const char *rhs) |
void | operator>> (const Buffer &lhs, const char *rhs) |
AudioStream & | operator<< (AudioStream &lhs, const char *rhs) |
void | operator>> (const AudioStream &lhs, const char *rhs) |
Very simple Wavefile reading class.
Definition at line 116 of file Wavefile.h.
|
static |
Definition at line 1309 of file Wavefile.cc.
|
inlinestatic |
Definition at line 153 of file Wavefile.h.
References default_sample_rate_.
Referenced by Nsound::operator>>().
|
inlinestatic |
Definition at line 157 of file Wavefile.h.
References default_sample_size_.
Referenced by Nsound::operator>>().
|
static |
Definition at line 70 of file Wavefile.cc.
References default_sample_rate_, and M_ASSERT_VALUE.
Referenced by main(), my_main(), setDefaults(), and setDefaultSampleRate().
|
inlinestatic |
Definition at line 165 of file Wavefile.h.
References setDefaultSampleRate().
|
static |
Definition at line 79 of file Wavefile.cc.
References default_sample_size_, and M_THROW.
Referenced by Buffer_UnitTest(), BufferResample_UnitTest(), DelayLine_UnitTest(), FFTransform_UnitTest(), FilterCombLowPassFeedback_UnitTest(), FilterDelay_UnitTest(), FilterLeastSquaresFIR_UnitTest(), FilterParametricEqualizer_UnitTest(), Generator_UnitTest(), main(), setDefaults(), Sine_UnitTest(), Triangle_UnitTest(), and Wavefile_UnitTest().
|
static |
Definition at line 98 of file Wavefile.cc.
References default_sample_size_, default_wave_format_, WAVE_FORMAT_IEEE_FLOAT_, and WAVE_FORMAT_PCM_.
Referenced by BufferResample_UnitTest(), DelayLine_UnitTest(), FFTransform_UnitTest(), FilterLeastSquaresFIR_UnitTest(), FilterParametricEqualizer_UnitTest(), Generator_UnitTest(), main(), setDefaults(), Sine_UnitTest(), and Triangle_UnitTest().
|
static |
Definition at line 117 of file Wavefile.cc.
References setDefaultSampleRate(), setDefaultSampleSize(), and setIEEEFloat().
Referenced by main().
|
static |
Definition at line 920 of file Wavefile.cc.
Referenced by Nsound::operator<<(), and readHeader().
|
static |
Reads the basic header information and sets the info
string.
Reads the basic header information and sets the info
string.
Definition at line 934 of file Wavefile.cc.
References read().
Referenced by main().
|
static |
Definition at line 952 of file Wavefile.cc.
References DATA_, default_wave_format_, FACT_, FMT_, Nsound::AudioStream::getLength(), Nsound::AudioStream::getNChannels(), Nsound::AudioStream::getSampleRate(), M_THROW, PEAK_, RIFF_, SIGNED_16_BIT_, SIGNED_24_BIT_, SIGNED_32_BIT_, SIGNED_48_BIT_, SIGNED_64_BIT_, SIGNED_8_BIT_, WAVE_, WAVE_FORMAT_IEEE_FLOAT_, WAVE_FORMAT_PCM_, writeFloat32(), writeFloat64(), and writeInt().
Referenced by Nsound::operator>>().
|
static |
Definition at line 1132 of file Wavefile.cc.
References DATA_, default_wave_format_, FACT_, FMT_, Nsound::Buffer::getLength(), M_THROW, PEAK_, RIFF_, SIGNED_16_BIT_, SIGNED_24_BIT_, SIGNED_32_BIT_, SIGNED_48_BIT_, SIGNED_64_BIT_, SIGNED_8_BIT_, WAVE_, WAVE_FORMAT_IEEE_FLOAT_, WAVE_FORMAT_PCM_, writeFloat32(), writeFloat64(), and writeInt().
|
staticprotected |
|
friend |
|
friend |
|
friend |
|
static |
Definition at line 122 of file Wavefile.h.
Referenced by findID3v1Tag(), and write().
|
static |
Definition at line 123 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 124 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 125 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 126 of file Wavefile.h.
Referenced by findID3v1Tag(), and write().
|
static |
Definition at line 127 of file Wavefile.h.
Referenced by findID3v1Tag(), and write().
|
static |
Definition at line 129 of file Wavefile.h.
Referenced by setIEEEFloat(), and write().
|
static |
Definition at line 130 of file Wavefile.h.
Referenced by setIEEEFloat(), and write().
|
static |
Definition at line 133 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 134 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 135 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 136 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 137 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 138 of file Wavefile.h.
Referenced by write().
|
static |
Definition at line 140 of file Wavefile.h.
|
static |
Definition at line 141 of file Wavefile.h.
|
static |
Definition at line 142 of file Wavefile.h.
|
static |
Definition at line 143 of file Wavefile.h.
|
static |
Definition at line 144 of file Wavefile.h.
|
static |
Definition at line 145 of file Wavefile.h.
|
staticprotected |
Definition at line 234 of file Wavefile.h.
Referenced by getDefaultSampleRate(), and setDefaultSampleRate().
|
staticprotected |
Definition at line 235 of file Wavefile.h.
Referenced by getDefaultSampleSize(), setDefaultSampleSize(), and setIEEEFloat().
|
staticprotected |
Definition at line 236 of file Wavefile.h.
Referenced by setIEEEFloat(), and write().