mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-24 14:36:15 +02:00
refactoring
git-svn-id: svn://elaine/murooma/trunk@328 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
611b2a6c9f
commit
c40bfda64c
35 changed files with 192 additions and 178 deletions
|
@ -5,7 +5,7 @@
|
|||
using namespace std;
|
||||
|
||||
|
||||
OggEncoder::OggEncoder(const SampleFormat& format) : Encoder(format)
|
||||
OggEncoder::OggEncoder(const msg::SampleFormat& format) : Encoder(format)
|
||||
{
|
||||
init();
|
||||
lastGranulepos = -1;
|
||||
|
@ -13,7 +13,7 @@ OggEncoder::OggEncoder(const SampleFormat& format) : Encoder(format)
|
|||
|
||||
|
||||
|
||||
double OggEncoder::encode(PcmChunk* chunk)
|
||||
double OggEncoder::encode(msg::PcmChunk* chunk)
|
||||
{
|
||||
double res = 0;
|
||||
if (tv_sec == 0)
|
||||
|
@ -126,7 +126,7 @@ void OggEncoder::init()
|
|||
|
||||
*********************************************************************/
|
||||
|
||||
ret=vorbis_encode_init_vbr(&vi, sampleFormat.channels, sampleFormat.rate, 0.9);
|
||||
ret=vorbis_encode_init_vbr(&vi, sampleFormat.channels, sampleFormat.rate, 1.0);
|
||||
|
||||
/* do not continue if setup failed; this can happen if we ask for a
|
||||
mode that libVorbis does not support (eg, too low a bitrate, etc,
|
||||
|
@ -165,7 +165,7 @@ void OggEncoder::init()
|
|||
*/
|
||||
// while(!eos){
|
||||
size_t pos(0);
|
||||
headerChunk = new HeaderMessage("ogg");
|
||||
headerChunk = new msg::Header("ogg");
|
||||
while (true)
|
||||
{
|
||||
int result=ogg_stream_flush(&os,&og);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue