MimeSource that determines the mime type from the file name extension of the file that an AudioPlayer is currently playing.
More...
#include <AudioPlayerMimeSourceFromFile.h>
template<typename FileT>
class audio_tools::AudioPlayerMimeSourceFromFile< FileT >
MimeSource that determines the mime type from the file name extension of the file that an AudioPlayer is currently playing.
Intended to be used together with a MultiDecoder (via MultiDecoder::setMimeSource()) whenever the AudioPlayer's AudioSource is disk based (e.g. AudioSourceSDMMC, AudioSourceSD, AudioSourceSDFAT, AudioSourceSPIFFS, AudioSourceLittleFS, AudioSourceVFS, ...). The decoder is then selected from the file name extension instead of relying on (potentially ambiguous or slower) content sniffing.
- Template Parameters
-
| FileT | the File type returned by the AudioSource in use (e.g. fs::File for AudioSourceSD/AudioSourceSDMMC). The type must provide a name() method that returns the (base) file name. |
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ AudioPlayerMimeSourceFromFile()
template<typename FileT >
◆ mime()
template<typename FileT >
Determines the mime type from the extension of the currently playing file. Returns nullptr if no file is active or the extension is unknown.
Implements MimeSource.
◆ mimeResolver()
template<typename FileT >
Provides access to the mime resolver, e.g. to register additional extension -> mime mappings via addMimeEntry().
◆ p_player
template<typename FileT >
◆ resolver
template<typename FileT >
The documentation for this class was generated from the following file: