looper/backends/playback/vgmstream/vgmstream.hpp

30 lines
788 B
C++
Raw Permalink Normal View History

2024-08-08 13:12:37 -07:00
#pragma once
#include "playback_backend.hpp"
extern "C" {
#include "vgmstream.h"
}
#include <stddef.h>
#include <stdint.h>
#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;
2024-11-12 14:53:44 -08:00
void add_licenses() override;
2024-08-08 13:12:37 -07:00
inline ~VgmStreamBackend() override { }
};