Add loop method to all input and outputs
Adds a virtual loop() method to the file input and audio output objects. By default does nothing, but it can be used to prefill buffers/etc. in the case of a buffered input, or to update a volume meter on an output, etc. The AudioGenerators all now call it as part of their own loop()s, so there is no user intervention required to make it work. Thanks to @armSeb for the idea with his SPI RAM code.
This commit is contained in:
1 parent
df4588197f
commit
fece88a9be
10 files changed
+72
-23
No files matched your search
@@ -36,6 +36,10 @@ class AudioFileSourceBuffer : public AudioFileSource
|
||||
virtual bool isOpen() override;
|
||||
virtual uint32_t getSize() override;
|
||||
virtual uint32_t getPos() override;
|
||||
virtual bool loop() override;
|
||||
|
||||
private:
|
||||
virtual void fill();
|
||||
|
||||
private:
|
||||
AudioFileSource *src;
|
||||
|
||||
Reference in new issue
Block a user