summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/audioplay.h
diff options
context:
space:
mode:
authorGeoffrey Pitsch <gpitsch@google.com>2016-07-12 14:46:19 -0400
committerGeoffrey Pitsch <gpitsch@google.com>2016-07-13 15:51:24 -0400
commita91a2d737586ebd0040129333055d8093899751b (patch)
tree0ca3a04b3397357204fc39d968a3d6968aaf52f1 /cmds/bootanimation/audioplay.h
parentf6d766020f9b4d082ee38c38e6496655e1e56c61 (diff)
Fixes delay when playing first sound in BootAnimation
audioplay is initialized with an example of the type of clip it will play. Also remove asserts and debug compile settings from BootAnimation. BUG:24800792 Change-Id: Icb78489417aee0549c340c746b25e57ccdb3427e
Diffstat (limited to 'cmds/bootanimation/audioplay.h')
-rw-r--r--cmds/bootanimation/audioplay.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmds/bootanimation/audioplay.h b/cmds/bootanimation/audioplay.h
index bdc0a1c84b6e..0e5705af0ad0 100644
--- a/cmds/bootanimation/audioplay.h
+++ b/cmds/bootanimation/audioplay.h
@@ -22,10 +22,12 @@
namespace audioplay {
-void create();
+// Initializes the engine with an example of the type of WAV clip to play.
+// All buffers passed to playClip are assumed to be in the same format.
+bool create(const uint8_t* exampleClipBuf, int exampleClipBufSize);
-// Play a WAV pointed to by buf. All clips are assumed to be in the same format.
-// playClip should not be called while a clip is still playing.
+// Plays a WAV contained in buf.
+// Should not be called while a clip is still playing.
bool playClip(const uint8_t* buf, int size);
void setPlaying(bool isPlaying);
void destroy();