[all-devices-app] Integrate Real Audio Playback for POSIX Chime Device#71644
[all-devices-app] Integrate Real Audio Playback for POSIX Chime Device#71644soares-sergio wants to merge 28 commits intoproject-chip:masterfrom
Conversation
e7451fe to
73b23ce
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the ChimeDevice to support a dynamic list of sounds, introduces a POSIX-specific implementation using the miniaudio library for in-memory WAV playback, and adjusts BoringSSL build flags. Feedback focuses on ensuring cross-platform correctness by using Little-Endian encoding for WAV headers, implementing an explicit Shutdown method for robust resource management, removing hardcoded sound mappings in the playback logic, and optimizing binary data construction to minimize memory allocations.
|
I have refactored the implementation to address the remaining review comments:
All changes are pushed and the build is verified! Please let me know if it looks good now! |
|
PR #71644: Size comparison from 5f28762 to d2cd884 Full report (10 builds for cc13x4_26x4, cc32xx, nrfconnect, realtek, stm32)
|
|
I have checked the remaining review comments and here is the status:
All changes are pushed and build is verified! Please let me know if anything else is needed. |
|
PR #71644: Size comparison from 5f28762 to dd24f4e Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #71644 +/- ##
=======================================
Coverage 54.40% 54.40%
=======================================
Files 1582 1582
Lines 108395 108395
Branches 13384 13384
=======================================
Hits 58976 58976
Misses 49419 49419 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
[all-devices-app] Integrate Real Audio Playback for POSIX Chime Device
This PR integrates real audio playback into the
PosixChimeDevicefor theall-devices-appon POSIX platforms (Linux and Darwin). It uses theminiaudiolibrary to generate and play synthetic sounds entirely from memory.Changes
Audio Integration (
miniaudio)miniaudioas a git submodule inthird_party/miniaudio/repo.miniaudio.cppto host the implementation define.PosixChimeDeviceto useminiaudio's engine to play sounds.In-Memory Sound Synthesis
GenerateWavMemoryinPosixChimeDevice.cppto generate synthetic WAV files in memory buffers (avoiding disk I/O).Build System & Compatibility
BUILD.gnfiles for POSIX, Linux, and Darwin to includeminiaudioinclude paths.Testing
I verified the changes with the following steps:
all-devices-appbuilds successfully for Linux x64 with BoringSSL.--device chimeand usedchip-toolto trigger both Chime 0 and Chime 1.test_chime.sh
Helper script to build chip-tool + all-devices-app and run a test that triggers both "Ding Dong" and "Ring Ring".