Added DJ audio track player
This commit is contained in:
@@ -20,25 +20,36 @@ public:
|
||||
void writeSamples(frame_t *begin, frame_t *end);
|
||||
|
||||
bool playing() const { return m_playing; }
|
||||
void setPlaying(bool playing) { m_playing = playing; emit playingChanged(playing); }
|
||||
void setPlaying(bool playing);
|
||||
|
||||
std::size_t position() const { return m_position; }
|
||||
void setPosition(std::size_t position) { m_position = position; emit positionChanged(position); }
|
||||
double position() const { return m_position; }
|
||||
void setPosition(double position);
|
||||
|
||||
float speed() const { return m_speed; }
|
||||
void setSpeed(float speed);
|
||||
|
||||
float volume() const { return m_volume; }
|
||||
void setVolume(float volume);
|
||||
|
||||
const QAudioBuffer &buffer() const { return m_buffer; }
|
||||
void setBuffer(const QAudioBuffer &buffer) { emit bufferChanged(m_buffer = buffer); }
|
||||
void setBuffer(const QAudioBuffer &buffer);
|
||||
|
||||
void togglePlaying();
|
||||
void restart();
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void playingChanged(bool playing);
|
||||
void positionChanged(std::size_t position);
|
||||
void positionChanged(double position);
|
||||
void speedChanged(float speed);
|
||||
void volumeChanged(float volume);
|
||||
void bufferChanged(const QAudioBuffer &buffer);
|
||||
|
||||
private:
|
||||
bool m_playing{false};
|
||||
std::size_t m_position{};
|
||||
double m_position{};
|
||||
float m_speed{1.f};
|
||||
float m_volume{1.f};
|
||||
QAudioBuffer m_buffer;
|
||||
|
||||
QDateTime m_lastPositionUpdate;
|
||||
|
Reference in New Issue
Block a user