#pragma once #include "playback_backend.hpp" extern "C" { #include "vgmstream.h" } #include #include #include "file_backend.hpp" class VgmStreamBackend : public PlaybackBackend { STREAMFILE *sf; VGMSTREAM *vf; File *file; public: inline std::string get_id() override { return "vgmstream"; } inline std::string get_name() override { return "VGMStream"; } void seek(double 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; double get_position() override; void add_licenses() override; inline ~VgmStreamBackend() override { } };