Name Date Size #Lines LOC

..--

src/main/H25-Apr-2025-919651

README.mdH A D25-Apr-20251.6 KiB4731

build.gradleH A D25-Apr-20251.4 KiB5451

proguard-rules.proH A D25-Apr-2025751 2218

soundboard_image.pngHD25-Apr-202538.5 KiB

README.md

1Soundboard
2==========
3Do you want to just jam with some digital tunes? Now you can!
4
5This sample demonstrates how to obtain the lowest latency and optimal computational throughput by:
6
71) Leaving Oboe to choose the best default stream properties for the current device
82) Setting performance mode to LowLatency
93) Setting sharing mode to Exclusive
104) Setting the buffer size to 2 bursts
115) Using the `-Ofast` compiler optimization flag, even when building the `Debug` variant
12
13The [following article explaining how to debug CPU performance problems](https://medium.com/@donturner/debugging-audio-glitches-on-android-ed10782f9c64) may also be useful when looking at this code.
14
15Implementation details
16---
17The stream properties are left to Oboe as such the app must output audio data in a format which matches that of the stream.
18
19Four different formats are supported:
20
21|Channel count|Format|
22|-------------|------|
23|1 - Mono|16-bit int|
24|2 - Stereo|16-bit int|
25|1 - Mono|Float|
26|2 - Stereo|Float|
27
28The signal chain for mono streams is:
29
30    SynthSound->Mixer
31
32For stereo chains a mono to stereo converter is added to the end of the chain:
33
34    SynthSound->Mixer->MonoToStereo
35
36The compiler optimization flag `-Ofast` can be found in [CMakeLists.txt](CMakeLists.txt).
37
38Each SynthSound is a series of 5 Oscillators, creating a pleasant sounding note when combined.
39
40There are 30 notes, corresponding to G3 to C6, moving left to right, top to bottom.
41
42In order to determine whether a note should be played, MusicTileView demonstrates how to keep track of where each finger is.
43
44Images
45-----------
46![soundboard_image](soundboard_image.png)
47