arduino-audio-tools
Loading...
Searching...
No Matches
VFS_Multi.h
Go to the documentation of this file.
1#pragma once
4
5namespace audio_tools {
6
14class VFS_Multi : public VFS {
15 public:
17 void add(VFS& vfs, const char* mountPoint) {
18 vfs.setMountPoint(mountPoint);
19 vfs_vector.push_back(&vfs);
20 }
22 bool begin() override {
23 bool result = true;
24 for (int j = 0; j < vfs_vector.size(); j++) {
25 result = result && vfs_vector[j]->begin();
26 }
27 return result;
28 }
29 // unmount the file systems
30 void end() override {
31 for (int j = 0; j < vfs_vector.size(); j++) {
32 vfs_vector[j]->end();
33 }
34 }
36 virtual void setMountPoint(const char* mp) { LOGE("not supported"); }
37
38 protected:
40};
41
42} // namespace audio_tools
#define LOGE(...)
Definition AudioLoggerIDF.h:30
Define multipe VFS with their mount point.
Definition VFS_Multi.h:14
virtual void setMountPoint(const char *mp)
Not used!
Definition VFS_Multi.h:36
void add(VFS &vfs, const char *mountPoint)
adds a vfs with the corresponding mount point
Definition VFS_Multi.h:17
void end() override
unmount the file system
Definition VFS_Multi.h:30
Vector< VFS * > vfs_vector
Definition VFS_Multi.h:39
bool begin() override
mount the file systems
Definition VFS_Multi.h:22
Base class which uses c++ file functions. It is also used as base class for an ESP32 Virtual File Sys...
Definition VFS.h:15
const char * mountPoint()
provides the actual mount point
Definition VFS.h:54
Vector implementation which provides the most important methods as defined by std::vector....
Definition Vector.h:21
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition AudioCodecsBase.h:10
size_t writeData(Print *p_out, T *data, int samples, int maxSamples=512)
Definition AudioTypes.h:512