mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-12-07 19:26:35 +01:00
initial import, >900commits predate this
This commit is contained in:
32
framework/sound/src/mm/soloud_filesystem_file_impl.hpp
Normal file
32
framework/sound/src/mm/soloud_filesystem_file_impl.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user