11 #include "threads/CriticalSection.h" 12 #include "utils/RingBuffer.h" 18 #define PACKET_SIZE 3840 // audio packet size - we keep 1 in reserve for gapless playback 22 #define INPUT_SIZE PACKET_SIZE * 3 // input data size we read from the codecs at a time 25 #define OUTPUT_SAMPLES PACKET_SIZE // max number of output samples 26 #define INPUT_SAMPLES PACKET_SIZE // number of input samples (distributed over channels) 28 #define STATUS_NO_FILE 0 29 #define STATUS_QUEUING 1 30 #define STATUS_QUEUED 2 31 #define STATUS_PLAYING 3 32 #define STATUS_ENDING 4 33 #define STATUS_ENDED 5 46 bool Create(
const CFileItem &file, int64_t seekOffset);
52 int64_t Seek(int64_t time);
54 void SetTotalTime(int64_t time);
55 void Start() { m_canPlay =
true;};
56 int GetStatus() {
return m_status; }
57 void SetStatus(
int status) { m_status = status; }
60 unsigned int GetChannels();
62 unsigned int GetDataSize(
bool checkPktSize);
63 void *GetData(
unsigned int samples);
64 uint8_t* GetRawData(
int &size);
65 ICodec *GetCodec()
const {
return m_codec; }
66 float GetReplayGain(
float &peakVal);
73 float m_outputBuffer[OUTPUT_SAMPLES];
76 uint8_t m_pcmInputBuffer[INPUT_SIZE];
77 float m_inputBuffer[INPUT_SAMPLES];
90 CCriticalSection m_critSection;
Definition: AudioDecoder.h:40
Definition: RingBuffer.h:13
int ReadSamples(int numsamples)
Definition: AudioDecoder.cpp:244
Represents a file on a share.
Definition: FileItem.h:102