summaryrefslogtreecommitdiff
path: root/encoders/lame_encoder.h
blob: d150f60390c27e53aa8cde4d31d277045b361dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef LAME_ENCODER_H
#define LAME_ENCODER_H

#include "encoder.h"

#include <lame/lame.h>
// needed for uint8_t
#include <boost/cstdint.hpp>

class EncoderLame : public Encoder {
	private:
		lame_global_flags *gfp;
		RawAudioSource::p source;
		
		size_t encode(const uint8_t *input, size_t input_size, uint8_t *output, size_t output_size);
		size_t flush(uint8_t *output, size_t output_size);
	
	public:
		EncoderLame(RawAudioSource::p source_);
		~EncoderLame();
		
		virtual std::size_t read(char* buf, std::size_t buf_size);
};

#endif