mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-23 11:27:38 +02:00
encoder
git-svn-id: svn://elaine/murooma/trunk@216 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
77826ef57a
commit
66820ec06e
3 changed files with 50 additions and 0 deletions
16
server/encoder.h
Normal file
16
server/encoder.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#ifndef ENCODER_H
|
||||||
|
#define ENCODER_H
|
||||||
|
#include "common/chunk.h"
|
||||||
|
|
||||||
|
|
||||||
|
class Encoder
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Encoder();
|
||||||
|
virtual void encode(Chunk* chunk) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
18
server/oggEncoder.cpp
Normal file
18
server/oggEncoder.cpp
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#include "oggEncoder.h"
|
||||||
|
|
||||||
|
OggEncoder::OggEncoder()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OggEncoder::encode(Chunk* chunk)
|
||||||
|
{
|
||||||
|
WireChunk* wireChunk = chunk->wireChunk;
|
||||||
|
for (size_t n=0; n<wireChunk->length; ++n)
|
||||||
|
wireChunk->payload[n] *= 1.5;
|
||||||
|
// return chunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
16
server/oggEncoder.h
Normal file
16
server/oggEncoder.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#ifndef OGG_ENCODER_H
|
||||||
|
#define OGG_ENCODER_H
|
||||||
|
#include "encoder.h"
|
||||||
|
|
||||||
|
|
||||||
|
class OggEncoder
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OggEncoder();
|
||||||
|
virtual void encode(Chunk* chunk);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue