From fc4e49001eb220342713c94ee6a3021b7db5f1eb Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 10 Jan 2011 19:22:46 +0100 Subject: Fixed typo in VorbisEncoder. --- encoders/vorbis_encoder.cpp | 6 +++--- encoders/vorbis_encoder.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'encoders') 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_); -- cgit v1.2.3