How fleshold/soundrecsprobe works
Main Components
A. Application Layer (Kotlin)
• MainActivity (Entry point)
• RecordPlayScreen (UI Component)
• RecordEngine Kotlin wrapper
B. Native Layer (C++)
• AudioRecordingProbe (Core audio handling)
• RecordEngine (Native implementation)
• JNI Bridge (native-lib.cpp)
C. Android System Audio APIs
• OpenSL ES (API 16+)
• AAudio (API 27+)
• [UI Layer]
• ↕
• [Application Layer]
• ↕
• [Native Layer]
• ↕
• [System Audio APIs]
Component Relationships
• UI Layer → Application Layer (User interactions)
• Application Layer → Native Layer (JNI calls)
• Native Layer → System Audio APIs (Audio recording)
• Bidirectional audio data flow between components
Specific Elements
a) UI Components:
• [RecordPlayScreen.kt] → [MainActivity.kt]
b) Bridge Layer:
• [RecordEngine.kt] ←→ [JNI Bridge]
c) Native Implementation:
• [AudioRecordingProbe.cpp/h] ←→ [RecordEngine.cpp/h]
d) System API Selection:
• [API Version Check]
• ↙ ↘
• [OpenSL ES] [AAudio]
Technical Details to Highlight
• JNI interface methods
• Audio buffer flow
• API version-dependent paths
• Resource management
• Error handling paths