Refactor!

This commit is contained in:
IlyaShurupov 2023-12-02 19:04:42 +03:00
parent 5d7a343a20
commit a5f4d7149a
14 changed files with 13024 additions and 1920 deletions

View file

@ -0,0 +1,34 @@
#pragma once
#include "Library.hpp"
class Context;
class MusicStream {
friend Context;
public:
MusicStream();
~MusicStream();
bool openStream(SongId id);
void closeStream();
tp::halnf* getBuffer();
tp::ualni* getProgressLive();
tp::uhalni getRate() const;
void continueStream();
tp::ualni getFramesLength() const;
tp::ualni getFramesLoaded() const;
public:
class Context* mContext = nullptr;
// tp::Mutex mMutex;
tp::ualni mLengthFrames = 0;
tp::ualni mChanels = 0;
tp::ualni mRate = 0;
tp::ualni mProgress;
tp::Buffer<tp::halnf> mBuffer;
};