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