FLAC support:

- FLAC container input and output support
- FLAC container analyser
- FLAC codec support in EBML input and output
This commit is contained in:
Ramkoemar 2022-10-06 15:08:28 +02:00 committed by Thulinma
parent 0f692233e8
commit a7183aedc5
17 changed files with 948 additions and 1 deletions

32
lib/flac.h Normal file
View file

@ -0,0 +1,32 @@
#pragma once
#include <mist/defines.h>
#include <ostream>
#include <sstream>
#include <string>
#include <unistd.h> //for stat
#include <util.h>
namespace FLAC{
bool is_header(const char *header); ///< Checks the first 4 bytes for the string "flaC".
size_t utfBytes(char p); // UTF encoding byte size
uint32_t utfVal(char *p); // UTF encoding value
size_t rate();
uint8_t channels();
class Frame{
public:
Frame(char *pkt);
uint16_t samples();
uint32_t rate();
uint8_t channels();
uint8_t size();
uint32_t utfVal(); // UTF encoding value
std::string toPrettyString();
private:
char *data;
};
}// namespace FLAC