diff options
author | Geoffrey Pitsch <gpitsch@google.com> | 2016-07-19 14:56:39 -0400 |
---|---|---|
committer | Wei Wang <wvw@google.com> | 2017-01-31 15:49:06 -0800 |
commit | a917353da0ed6079d45487a8c96b892c5d754637 (patch) | |
tree | fc1514cfdd649543301b3b1ead2690a03d5b7a39 /cmds/bootanimation/BootAnimation.h | |
parent | 45250aca6d55988a58fdcb4ba0e8a58d36b1f34b (diff) |
Initialize bootanimation sound on separate thread
Blocks when it's time to play the first sound.
Bug: 30189706
Test: on marlin
Change-Id: Ib3666fbfb5f109c633ed59edad4a283b8ada8ae2
Diffstat (limited to 'cmds/bootanimation/BootAnimation.h')
-rw-r--r-- | cmds/bootanimation/BootAnimation.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h index 7a2e4c28f767..f1fc98e10c1e 100644 --- a/cmds/bootanimation/BootAnimation.h +++ b/cmds/bootanimation/BootAnimation.h @@ -39,8 +39,7 @@ class SurfaceControl; class BootAnimation : public Thread, public IBinder::DeathRecipient { public: - BootAnimation(); - virtual ~BootAnimation(); + BootAnimation(); sp<SurfaceComposerClient> session() const; @@ -68,6 +67,16 @@ private: BootAnimation* mBootAnimation; }; + class InitAudioThread : public Thread { + public: + InitAudioThread(uint8_t* exampleAudioData, int mExampleAudioLength); + private: + virtual bool threadLoop(); + + uint8_t* mExampleAudioData; + int mExampleAudioLength; + }; + struct Texture { GLint w; GLint h; @@ -156,7 +165,8 @@ private: bool mSystemBoot; String8 mZipFileName; SortedVector<String8> mLoadedFiles; - sp<TimeCheckThread> mTimeCheckThread; + sp<TimeCheckThread> mTimeCheckThread = nullptr; + sp<InitAudioThread> mInitAudioThread = nullptr; }; // --------------------------------------------------------------------------- |