From 5e5a15359cc7e5e97fd74e897af0f76f019c042e Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Sat, 18 Nov 2017 08:45:48 -0800 Subject: [PATCH] Remove the FastROMFS bits for now Having the FastROMFS file source caused the importation of the entire FastROMFS library, which most folks will not have installed. Remove it for now. --- src/AudioFileSourceFastROMFS.cpp | 73 -------------------------------- src/AudioFileSourceFastROMFS.h | 49 --------------------- 2 files changed, 122 deletions(-) delete mode 100644 src/AudioFileSourceFastROMFS.cpp delete mode 100644 src/AudioFileSourceFastROMFS.h diff --git a/src/AudioFileSourceFastROMFS.cpp b/src/AudioFileSourceFastROMFS.cpp deleted file mode 100644 index 358c82d..0000000 --- a/src/AudioFileSourceFastROMFS.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - AudioFileSourceFastROMFS - Input FastROMFS "file" to be used by AudioGenerator - - Copyright (C) 2017 Earle F. Philhower, III - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include "AudioFileSourceFastROMFS.h" - -AudioFileSourceFastROMFS::AudioFileSourceFastROMFS() -{ - -} - -AudioFileSourceFastROMFS::AudioFileSourceFastROMFS(FastROMFilesystem *fs, const char *filename) -{ - this->fs = fs; - open(filename); -} - -bool AudioFileSourceFastROMFS::open(const char *filename) -{ - f = fs->open(filename, "r"); - return f; -} - -AudioFileSourceFastROMFS::~AudioFileSourceFastROMFS() -{ - if (f) f->close(); - f = NULL; -} - -uint32_t AudioFileSourceFastROMFS::read(void *data, uint32_t len) -{ - return f->read(reinterpret_cast(data), len); -} - -bool AudioFileSourceFastROMFS::seek(int32_t pos, int dir) -{ - return f->seek(pos, dir); -} - -bool AudioFileSourceFastROMFS::close() -{ - f->close(); - return true; -} - -bool AudioFileSourceFastROMFS::isOpen() -{ - return f?true:false; -} - -uint32_t AudioFileSourceFastROMFS::getSize() -{ - if (!f) return 0; - return f->size(); -} - - diff --git a/src/AudioFileSourceFastROMFS.h b/src/AudioFileSourceFastROMFS.h deleted file mode 100644 index cf325bb..0000000 --- a/src/AudioFileSourceFastROMFS.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - AudioFileSourceFastROMFS - Input FastROMFS "file" to be used by AudioGenerator - - Copyright (C) 2017 Earle F. Philhower, III - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#ifndef _AUDIOFILESOURCEFASTROMFS_H -#define _AUDIOFILESOURCEFASTROMFS_H - -#include -#include - -#include "AudioFileSource.h" - -class AudioFileSourceFastROMFS : public AudioFileSource -{ - public: - AudioFileSourceFastROMFS(); - AudioFileSourceFastROMFS(FastROMFilesystem *fs, const char *filename); - virtual ~AudioFileSourceFastROMFS() override; - - virtual bool open(const char *filename) override; - virtual uint32_t read(void *data, uint32_t len) override; - virtual bool seek(int32_t pos, int dir) override; - virtual bool close() override; - virtual bool isOpen() override; - virtual uint32_t getSize() override; - virtual uint32_t getPos() override { if (!f) return 0; else return f->position(); }; - - private: - FastROMFilesystem *fs; - FastROMFile *f; -}; - -#endif