arduino-audio-tools
Loading...
Searching...
No Matches
src
AudioTools
Disk
VFS_Multi.h
Go to the documentation of this file.
1
#pragma once
2
#include "
AudioTools/CoreAudio/AudioBasic/Collections/Vector.h
"
3
#include "
AudioTools/Disk/VFS.h
"
4
5
namespace
audio_tools
{
6
14
class
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
:
39
Vector<VFS*>
vfs_vector
;
40
};
41
42
}
// namespace audio_tools
LOGE
#define LOGE(...)
Definition
AudioLoggerIDF.h:30
VFS.h
Vector.h
audio_tools::VFS_Multi
Define multipe VFS with their mount point.
Definition
VFS_Multi.h:14
audio_tools::VFS_Multi::setMountPoint
virtual void setMountPoint(const char *mp)
Not used!
Definition
VFS_Multi.h:36
audio_tools::VFS_Multi::add
void add(VFS &vfs, const char *mountPoint)
adds a vfs with the corresponding mount point
Definition
VFS_Multi.h:17
audio_tools::VFS_Multi::end
void end() override
unmount the file system
Definition
VFS_Multi.h:30
audio_tools::VFS_Multi::vfs_vector
Vector< VFS * > vfs_vector
Definition
VFS_Multi.h:39
audio_tools::VFS_Multi::begin
bool begin() override
mount the file systems
Definition
VFS_Multi.h:22
audio_tools::VFS
Base class which uses c++ file functions. It is also used as base class for an ESP32 Virtual File Sys...
Definition
VFS.h:15
audio_tools::VFS::mountPoint
const char * mountPoint()
provides the actual mount point
Definition
VFS.h:54
audio_tools::Vector
Vector implementation which provides the most important methods as defined by std::vector....
Definition
Vector.h:21
audio_tools
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition
AudioCodecsBase.h:10
audio_tools::writeData
size_t writeData(Print *p_out, T *data, int samples, int maxSamples=512)
Definition
AudioTypes.h:512
Generated by
1.9.8