mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-10-30 06:45:36 +01:00
33 lines
720 B
C++
33 lines
720 B
C++
|
#pragma once
|
||
|
|
||
|
#include <soloud_file.h>
|
||
|
|
||
|
#include <mm/services/filesystem.hpp>
|
||
|
|
||
|
namespace MM::SoLoud {
|
||
|
|
||
|
class FilesystemFile : public ::SoLoud::File {
|
||
|
private:
|
||
|
Services::FilesystemService::fs_file_t _file_handle;
|
||
|
Services::FilesystemService* _fs_ptr; // convinience
|
||
|
|
||
|
public:
|
||
|
FilesystemFile(void) = delete;
|
||
|
FilesystemFile(Services::FilesystemService::fs_file_t file, Engine& engine);
|
||
|
FilesystemFile(const char* file_path, Engine& engine);
|
||
|
|
||
|
~FilesystemFile(void);
|
||
|
|
||
|
// soloud api
|
||
|
public:
|
||
|
int eof(void) override;
|
||
|
unsigned int read(unsigned char* aDst, unsigned int aBytes) override;
|
||
|
unsigned int length(void) override;
|
||
|
void seek(int aOffset) override;
|
||
|
unsigned int pos(void) override;
|
||
|
|
||
|
};
|
||
|
|
||
|
} // MM
|
||
|
|