Skip to content

Commit c17091c

Browse files
committed
Doxygen comments
1 parent 219c60b commit c17091c

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/AudioTools/Disk/AudioSource.h

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,16 @@ class NamePrinter : public Print {
232232
* @brief Audio Data Source managing a Vector of (file) names with minimal RAM
233233
* usage. Files are stored with separated path index and name to minimize memory
234234
* consumption. Identical paths are stored only once in a shared path registry.
235-
* This class is a template to support multiple SD libraries.
235+
* This class is a template to support multiple SD libraries and other Streams.
236+
*
237+
* @note A mandatory callback function must be provided to convert a file path (and optionally an old file instance) into a stream or file object. This callback is set via the constructor or setNameToStreamCallback().
238+
*
239+
* Example callback signature:
240+
* FileType* callback(const char* path, FileType& oldFile);
241+
*
242+
* Without this callback, the class cannot open or access files for playback. Also
243+
* don't forget to close the old file to prevent any memory leaks.
244+
*
236245
* @ingroup player
237246
* @author Phil Schatzmann
238247
* @copyright GPLv3
@@ -468,7 +477,16 @@ class AudioSourceVector : public AudioSource, public PathNamesRegistry {
468477
/**
469478
* @brief Audio Data Source managing a static array of file names (const char*).
470479
* Designed for PROGMEM storage on Arduino platforms with static file lists.
471-
* This class is a template to support multiple SD libraries.
480+
* This class is a template to support multiple SD libraries and other Streams.
481+
*
482+
* @note A mandatory callback function must be provided to convert a file path (and optionally an old file instance) into a stream or file object. This callback is set via the constructor or setNameToStreamCallback().
483+
*
484+
* Example callback signature:
485+
* FileType* callback(const char* path, FileType& oldFile);
486+
*
487+
* Without this callback, the class cannot open or access files for playback. Also
488+
* don't forget to close the old file to prevent any memory leaks.
489+
*
472490
* @ingroup player
473491
* @author Phil Schatzmann
474492
* @copyright GPLv3

0 commit comments

Comments
 (0)