Restyle
This commit is contained in:
parent
5b79f296d6
commit
fccf66fba2
280 changed files with 56975 additions and 71885 deletions
76
lib/vorbis.h
76
lib/vorbis.h
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
#include <cmath>
|
||||
#include <sys/types.h>
|
||||
#include <deque>
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <deque>
|
||||
#include <sys/types.h>
|
||||
|
||||
namespace vorbis{
|
||||
struct mode{
|
||||
|
@ -12,41 +12,39 @@ namespace vorbis{
|
|||
unsigned short transformType;
|
||||
char mapping;
|
||||
};
|
||||
|
||||
inline unsigned int ilog(unsigned int input){
|
||||
return (std::log(input))/(std::log(2))+1;
|
||||
}
|
||||
|
||||
bool isHeader(const char * newData, unsigned int length);
|
||||
|
||||
inline unsigned int ilog(unsigned int input){return (std::log(input)) / (std::log(2)) + 1;}
|
||||
|
||||
bool isHeader(const char *newData, unsigned int length);
|
||||
class header{
|
||||
public:
|
||||
~header();
|
||||
header(char* newData, unsigned int length);
|
||||
int getHeaderType();
|
||||
long unsigned int getVorbisVersion();
|
||||
char getAudioChannels();
|
||||
long unsigned int getAudioSampleRate();
|
||||
long unsigned int getBitrateMaximum();
|
||||
long unsigned int getBitrateNominal();
|
||||
long unsigned int getBitrateMinimum();
|
||||
char getBlockSize0();
|
||||
char getBlockSize1();
|
||||
char getFramingFlag();
|
||||
std::string toPrettyString(size_t indent = 0);
|
||||
std::deque<mode> readModeDeque(char audioChannels);
|
||||
bool isHeader();
|
||||
unsigned int getDataSize(){
|
||||
return datasize;
|
||||
}
|
||||
protected:
|
||||
uint32_t getInt32(size_t index);
|
||||
uint32_t getInt24(size_t index);
|
||||
uint16_t getInt16(size_t index);
|
||||
private:
|
||||
std::deque<mode> modes;
|
||||
char* data;
|
||||
unsigned int datasize;
|
||||
bool checkDataSize(unsigned int size);
|
||||
bool validate();
|
||||
};
|
||||
}
|
||||
public:
|
||||
~header();
|
||||
header(char *newData, unsigned int length);
|
||||
int getHeaderType();
|
||||
long unsigned int getVorbisVersion();
|
||||
char getAudioChannels();
|
||||
long unsigned int getAudioSampleRate();
|
||||
long unsigned int getBitrateMaximum();
|
||||
long unsigned int getBitrateNominal();
|
||||
long unsigned int getBitrateMinimum();
|
||||
char getBlockSize0();
|
||||
char getBlockSize1();
|
||||
char getFramingFlag();
|
||||
std::string toPrettyString(size_t indent = 0);
|
||||
std::deque<mode> readModeDeque(char audioChannels);
|
||||
bool isHeader();
|
||||
unsigned int getDataSize(){return datasize;}
|
||||
|
||||
protected:
|
||||
uint32_t getInt32(size_t index);
|
||||
uint32_t getInt24(size_t index);
|
||||
uint16_t getInt16(size_t index);
|
||||
|
||||
private:
|
||||
std::deque<mode> modes;
|
||||
char *data;
|
||||
unsigned int datasize;
|
||||
bool checkDataSize(unsigned int size);
|
||||
bool validate();
|
||||
};
|
||||
}// namespace vorbis
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue