7 Commits

Author SHA1 Message Date
Yi Kong
911ac2394e [BootAnimation] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: I3d1d08ce91b351227dad11f0ac0302832b9563b4
2019-03-24 01:49:02 -07:00
Ed Coyne
33f4b7d63b Refactor audio code out of bootanimation_main.
So it can be shared with the iot/ variant I refactored it into the
audioplay.h file. This keeps all of the audio code local, we could hide
the functions and only expose the callback but that would make testing
harder.

Test: Ran a bootanimation.zip with audio.wav on Marlin, works as expected.
Bug: 67051984
Change-Id: Ie31dc5f2cfaad5bb23134ef81be712afa6b3cd6f
2018-05-31 11:50:47 -07:00
Geoffrey Pitsch
db90897b5f Support multichannel sounds in bootanim
Manually handle the 1-2 channel cases to avoid the warning
log when 0 is passed as the channelMask.

Bug: 30820152
Change-Id: I4d2c8736ff442fae9a4c5eb16061646fb53151b6
2016-08-24 16:59:16 -04:00
Eric Laurent
197e47979a bootanimation: fix glitchy playback
Do not use low latency playback mode to be more
robust against scheduling problems during boot phase.

Also:
- remove unused reverb on output mix
- fix WAV file parser.

Bug: 30277818
Change-Id: I1e15d3003a25c93d4995006885b32a754d17343f
2016-07-22 11:31:25 -07:00
Geoffrey Pitsch
5613313533 Play boot sound on the System stream.
Turning down the ring volume will also turn down boot sound.

BUG:30132711
Change-Id: I902e56b20f105c27209dd47f054e98085647ee85
2016-07-15 10:50:04 -04:00
Geoffrey Pitsch
a91a2d7375 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
2016-07-13 15:51:24 -04:00
Geoffrey Pitsch
d6d9a1d0b9 OpenSL-based audio support for BootAnimation
Respects dnd settings for sound playback.
Basic implementation uses in-memory wavs as buffers.
audioplay::playClip should not be called before previous clip ends.
Updated FORMAT.md to reflect no more audio_conf.txt

Bug: 29055299
Change-Id: Ifc358d7c85f11b8b54ae6446c40643b87bc567f2
2016-07-06 11:13:48 -04:00