OpenLoco/src/OpenLoco/Audio/MusicChannel.h

33 lines
648 B
C
Raw Normal View History

2018-09-15 19:06:29 +02:00
#pragma once
2020-09-07 21:31:46 +02:00
#include "../Core/FileSystem.hpp"
#include "../Things/Thing.h"
#include "Audio.h"
#include "Channel.h"
2018-09-15 19:06:29 +02:00
struct _Mix_Music;
typedef struct _Mix_Music Mix_Music;
namespace openloco::audio
{
class music_channel
{
private:
Mix_Music* _music_track;
int32_t _current_music = -1;
public:
music_channel() = default;
music_channel(const music_channel&) = delete;
~music_channel();
bool isPlaying() const;
2018-09-15 19:06:29 +02:00
bool load(const fs::path& path);
bool play(bool loop);
void stop();
void setVolume(int32_t volume);
void disposeMusic();
2018-09-15 19:06:29 +02:00
};
}