A simple class which implements a automatic looping file. In order to support different file implementation the file class is a template parameter. The number of loops can be defined by calling setLoopCount(). You can also optinally limit the total looping file size by calling setSize();.  
 More...
 | 
| 
  | FileLoopT (FileType file, int count=-1, int rewindPos=-1, int startPos=0) | 
|   | 
| int  | available () override | 
|   | 
| virtual int  | availableForWrite () override | 
|   | 
| bool  | begin () | 
|   | 
| void  | end () | 
|   | 
| 
FileType &  | file () | 
|   | Returns the file. 
  | 
|   | 
| virtual void  | flush () override | 
|   | 
| bool  | isLoopActive () | 
|   | 
| 
  | operator bool () | 
|   | 
| size_t  | readBytes (uint8_t *data, size_t len) override | 
|   | 
| 
void  | setCallback (void(*cb)(FileLoopT &loop)) | 
|   | You can be notified about a rewind. 
  | 
|   | 
| 
void  | setFile (FileType file) | 
|   | defines the file that is used for looping 
  | 
|   | 
| void  | setLoopCount (int count) | 
|   | 
| 
void  | setRewindPos (int pos) | 
|   | defines the start position after the rewind. E.g. for wav files this should be 44 
  | 
|   | 
| 
void  | setSize (size_t len) | 
|   | optionally defines the requested playing size in bytes 
  | 
|   | 
| 
void  | setStartPos (int pos) | 
|   | defines the start position at the beginning 
  | 
|   | 
| 
void  | setWriteBufferSize (int size) | 
|   | 
| 
size_t  | size () | 
|   | Returns the (requested) file size. 
  | 
|   | 
| size_t  | write (const uint8_t *data, size_t len) | 
|   | 
| virtual size_t  | write (uint8_t ch) override | 
|   | 
template<class FileType>
class audio_tools::FileLoopT< FileType >
A simple class which implements a automatic looping file. In order to support different file implementation the file class is a template parameter. The number of loops can be defined by calling setLoopCount(). You can also optinally limit the total looping file size by calling setSize();. 
- Author
 - Phil Schatzmann 
 
- Copyright
 - GPLv3