104 #ifndef _NSOUND_WAVEFILE_H_
105 #define _NSOUND_WAVEFILE_H_
179 const float64 & sample_rate = 44100.0,
180 const float64 & sample_bits = 16.0,
181 const boolean & use_ieee_floats =
false);
198 readHeader(
const std::string & filename, std::string & info);
208 write(
const std::string & fileName,
210 uint32 bits_per_sample = 16);
220 write(
const std::string & fileName,
241 const std::string & filename,
242 std::vector<Buffer *> * b_vector,
244 std::stringstream * out);
258 ID3v1Tag(
const std::string & filename =
"",
boolean show_warnings =
true);
262 read(
const std::string & filename,
boolean show_warnings =
true);
266 write(
const std::string & filename,
boolean show_warnings =
true);
static boolean read(const std::string &fileName, AudioStream &astream)
static const raw_uint64 UNSIGNED_24_BIT_
static const raw_float64 SIGNED_48_BIT_
static const raw_float64 SIGNED_24_BIT_
static const uint32 RIFF_
std::ostream & operator<<(std::ostream &out, const Buffer &rhs_buffer)
static boolean readHeader(const std::string &filename, std::string &info)
Reads the basic header information and sets the info string.
friend void operator>>(const Buffer &lhs, const char *rhs)
static const raw_uint64 UNSIGNED_16_BIT_
static const raw_float64 SIGNED_16_BIT_
static const uint16 WAVE_FORMAT_PCM_
static void setDefaultSampleRate(const float64 &rate)
static uint16 default_wave_format_
static const raw_float64 SIGNED_32_BIT_
static boolean write(const std::string &fileName, const AudioStream &as, uint32 bits_per_sample=16)
static uint32 default_sample_size_
static const uint32 PEAK_
static const raw_uint64 UNSIGNED_8_BIT_
static const raw_uint64 UNSIGNED_64_BIT_
static std::string decodeFormatTag(const uint16 format_tag)
void operator>>(const AudioStream &lhs, AudioPlayback &rhs)
boolean write(const std::string &filename, boolean show_warnings=true)
Returns true if it successfully wrote the tag to the end of the file, false otherwise.
static const uint32 FACT_
static void setDefaults(const float64 &sample_rate=44100.0, const float64 &sample_bits=16.0, const boolean &use_ieee_floats=false)
Very simple Wavefile reading class.
static uint32 getDefaultSampleRate()
static void setIEEEFloat(boolean flag)
unsigned long long raw_uint64
friend std::ostream & operator<<(std::ostream &out, const ID3v1Tag &rhs)
Sends the contents of the Buffer to the output stream.
static const raw_float64 SIGNED_8_BIT_
static const raw_float64 SIGNED_64_BIT_
A Buffer for storing audio samples.
static const uint32 DATA_
static const raw_uint64 UNSIGNED_32_BIT_
static uint32 default_sample_rate_
ID3v1Tag(const std::string &filename="", boolean show_warnings=true)
static const raw_uint64 UNSIGNED_48_BIT_
static void setDefaultSampleRate(const int32 rate)
static void setDefaultSampleSize(uint32 size)
boolean read(const std::string &filename, boolean show_warnings=true)
Returns true if it found the tag, false otherwise.
static uint32 getDefaultSampleSize()
static const uint16 WAVE_FORMAT_IEEE_FLOAT_
friend Buffer & operator<<(Buffer &lhs, const char *rhs)
static const uint32 WAVE_