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
17class VFS_Multi : public VFS {
18 public:
20 void add(VFS& vfs, const char* mountPoint) {
21 vfs.setMountPoint(mountPoint);
22 vfs_vector.push_back(&vfs);
23 }
25 bool begin() override {
26 bool result = true;
27 for (int j = 0; j < vfs_vector.size(); j++) {
28 result = result && vfs_vector[j]->begin();
29 }
30 return result;
31 }
32 // unmount the file systems
33 void end() override {
34 for (int j = 0; j < vfs_vector.size(); j++) {
35 vfs_vector[j]->end();
36 }
37 }
39 virtual void setMountPoint(const char* mp) { LOGE("not supported"); }
40
41 protected:
43};
44
45} // namespace audio_tools
#define LOGE(...)
Definition AudioLoggerIDF.h:30
Define multipe VFS with their mount point.
Definition VFS_Multi.h:17
virtual void setMountPoint(const char *mp)
Not used!
Definition VFS_Multi.h:39
void add(VFS &vfs, const char *mountPoint)
adds a vfs with the corresponding mount point
Definition VFS_Multi.h:20
void end() override
unmount the file system
Definition VFS_Multi.h:33
Vector< VFS * > vfs_vector
Definition VFS_Multi.h:42
bool begin() override
mount the file systems
Definition VFS_Multi.h:25
Base class which uses c++ file functions. It is also used as base class for an ESP32 Virtual File Sys...
Definition VFS.h:18
const char * mountPoint()
provides the actual mount point
Definition VFS.h:57
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:508