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);
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);
Audio::Timestamp getLength() const
Definition: timestamp.h:83
Definition: audiostream.h:212
int getRate() const
Definition: audiocd-stream.h:58
Definition: audiocd-stream.h:51
bool isStereo() const
Definition: audiocd-stream.h:57
int readBuffer(int16 *buffer, const int numSamples)
bool seek(const Audio::Timestamp &where)