23 lines
445 B
C++
23 lines
445 B
C++
#ifndef GAME_MUSIC_H
|
|
#define GAME_MUSIC_H
|
|
|
|
#include <cstddef>
|
|
|
|
class Music {
|
|
public:
|
|
Music();
|
|
explicit Music(const char *path);
|
|
~Music();
|
|
|
|
[[nodiscard]] bool isValid() const;
|
|
void loadFromFile(const char* path);
|
|
void unload();
|
|
private:
|
|
friend class AudioPlayer;
|
|
[[nodiscard]] void *getData() const { return _data; }
|
|
size_t _length{0};
|
|
void *_data{nullptr};
|
|
};
|
|
|
|
|
|
#endif //GAME_MUSIC_H
|