#pragma once #include "playback_backend.hpp" #include #include #include #include #include #include #include #include #include #include #include #include "file_backend.hpp" class GmeBackend : public PlaybackBackend { File *file; Fifo audio_buf; Music_Emu *gme_backend; int streamidx; int loop_len, loop_start; std::map voices; public: uint64_t get_min_samples() override; std::optional get_max_samples() override; inline std::string get_id() override { return "gme"; } inline std::string get_name() override { return "Game Music Emu"; } void add_licenses() override; //std::vector get_property_list() override; void seek_samples(uint64_t position) override; void load(const char *filename) override; void switch_stream(int idx) override; void cleanup() override; int get_stream_idx() override; size_t render(void *buf, size_t maxlen) override; uint64_t get_position_samples() override; inline uint64_t get_length_samples() override { return length; } inline ~GmeBackend() override { } };