diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-01-10 19:22:46 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-01-10 19:22:46 +0100 |
commit | fc4e49001eb220342713c94ee6a3021b7db5f1eb (patch) | |
tree | fdd31cd87466524ed9a855d22509539dda83f1bb /encoders | |
parent | e5d94a47b5fb35f0a24bf3d2b604c4ed469ce6a1 (diff) |
Fixed typo in VorbisEncoder.
Diffstat (limited to 'encoders')
-rw-r--r-- | encoders/vorbis_encoder.cpp | 6 | ||||
-rw-r--r-- | encoders/vorbis_encoder.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/encoders/vorbis_encoder.cpp b/encoders/vorbis_encoder.cpp index e00e31f..dc8f34a 100644 --- a/encoders/vorbis_encoder.cpp +++ b/encoders/vorbis_encoder.cpp @@ -49,11 +49,11 @@ std::size_t VorbisEncoder::write_pages(char *buf, std::size_t buf_size) { } /** Read from source and write pages. - * Decodes a number of samples read from \c source, + * Encodes a number of samples read from \c source, * then calls \c write_pages to write completed pages. * \return Number of bytes written by \c write_pages. */ -std::size_t VorbisEncoder::decode(char *buf, std::size_t buf_size) { +std::size_t VorbisEncoder::encode(char *buf, std::size_t buf_size) { const int samples_n = 1024; // samples_n samples, 2 channels, 2 byte per sample @@ -108,7 +108,7 @@ std::size_t VorbisEncoder::read(char* buf, std::size_t buf_size) { // run until we have a page or reached end of stream while(written == 0 && !ogg_page_eos(&og)) { - written += decode(buf+written, buf_size-written); + written += encode(buf+written, buf_size-written); } return written; diff --git a/encoders/vorbis_encoder.h b/encoders/vorbis_encoder.h index c3e3728..cba8c21 100644 --- a/encoders/vorbis_encoder.h +++ b/encoders/vorbis_encoder.h @@ -19,7 +19,7 @@ class VorbisEncoder : public Encoder { protected: std::size_t write_pages(char *buf, std::size_t buf_size); - std::size_t decode(char *buf, std::size_t buf_size); + std::size_t encode(char *buf, std::size_t buf_size); public: VorbisEncoder(RawAudioSource::p source_); |