blob: cba8c21f7ccd3f5daa5e7ffa8a9f6f6eeb00a2ed (
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
26
27
28
29
30
31
|
#ifndef VORBIS_ENCODER_H
#define VORBIS_ENCODER_H
#include "encoder.h"
#include <vorbis/vorbisenc.h>
#include <ogg/ogg.h>
class VorbisEncoder : public Encoder {
private:
vorbis_info vi;
vorbis_dsp_state dsp;
vorbis_block vb;
ogg_stream_state os;
ogg_page og;
RawAudioSource::p source;
//! Set to true when ogg stream headers are written.
bool headers_written;
protected:
std::size_t write_pages(char *buf, std::size_t buf_size);
std::size_t encode(char *buf, std::size_t buf_size);
public:
VorbisEncoder(RawAudioSource::p source_);
virtual ~VorbisEncoder ();
virtual std::size_t read(char* buf, std::size_t buf_size);
};
#endif
|