36 lines
657 B
C++
36 lines
657 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "core/time.h"
|
|
|
|
namespace kku
|
|
{
|
|
|
|
/// Music
|
|
///
|
|
/// Object for streaming music file
|
|
class Music
|
|
{
|
|
public:
|
|
virtual ~Music() = default;
|
|
|
|
virtual bool open(const std::string &filepath) = 0;
|
|
|
|
virtual void play() = 0;
|
|
virtual void pause() = 0;
|
|
virtual void stop() = 0;
|
|
|
|
virtual bool isPlaying() const = 0;
|
|
|
|
virtual void setVolume(float volume) = 0;
|
|
|
|
virtual void setOffset(const kku::microsec &offset) = 0;
|
|
virtual void moveOffset(const kku::microsec &delta) = 0;
|
|
|
|
virtual kku::microsec fetchOffset() = 0;
|
|
virtual kku::microsec getDuration() const = 0;
|
|
};
|
|
|
|
} // namespace kku
|