looper/backends/playback/sdl_mixer_x/sdl_mixer_x.hpp
Zachary Hall 8fdf30878b
Some checks failed
Build / build-gentoo (push) Successful in 1m22s
Build / download-system-deps (push) Successful in 1m37s
Build / get-source-code (push) Successful in 4m30s
Build / build-appimage (push) Successful in 1m15s
Build / build-android (push) Failing after 4m34s
Build / build-windows (push) Failing after 4m33s
Add Haiku frontend
2024-11-12 14:53:44 -08:00

27 lines
810 B
C++

#pragma once
#include "playback_backend.hpp"
#include <SDL_mixer.h>
#include "file_backend.hpp"
class SDLMixerXBackend : public PlaybackBackend {
Mix_Music *music;
Mix_CommonMixer_t mixer;
File *file;
bool initial = false;
public:
inline std::string get_id() override {
return "sdl_mixer_x";
}
inline std::string get_name() override {
return "SDL Mixer X";
}
std::optional<uint64_t> get_max_samples() override;
void seek(double position) override;
double get_position() override;
void load(const char *filename) override;
void switch_stream(int idx) override;
void cleanup() override;
size_t render(void *buf, size_t maxlen) override;
void add_licenses() override;
SDLMixerXBackend();
~SDLMixerXBackend() override;
};