43#ifndef BACKENDS_AUDIOCD_AUDIOCD_STREAM_H
44#define BACKENDS_AUDIOCD_AUDIOCD_STREAM_H
46#include "audio/audiostream.h"
47#include "common/mutex.h"
48#include "common/queue.h"
49#include "common/timer.h"
56 int readBuffer(int16 *buffer,
const int numSamples)
override;
57 bool isStereo()
const override {
return true; }
58 int getRate()
const override {
return 44100; }
64 virtual uint getStartFrame()
const = 0;
65 virtual uint getEndFrame()
const = 0;
66 virtual bool readFrame(
int frame, int16 *buffer) = 0;
68 void startTimer(
bool fillBuffer =
false);
72 kBytesPerFrame = 2352,
73 kSamplesPerFrame = kBytesPerFrame / 2
77 kSecondsPerMinute = 60,
83 kBufferThreshold = kFramesPerSecond
87 int16 _buffer[kSamplesPerFrame];
96 bool shouldForceStop()
const;
100 bool readNextFrame();
101 static void timerProc(
void *refCon);
Definition: audiostream.h:212
Definition: timestamp.h:83
Definition: audiocd-stream.h:51
bool isStereo() const override
Definition: audiocd-stream.h:57
bool seek(const Audio::Timestamp &where) override
Audio::Timestamp getLength() const override
bool endOfData() const override
int readBuffer(int16 *buffer, const int numSamples) override
int getRate() const override
Definition: audiocd-stream.h:58