feat: media_async + media_index modules, media_files table, tests
- media_async: thread-per-task async engine with primitives (sha256, sign, copy, uuid, file_size) - media_index: media_files DB table with register_async for indexing chunks - chat_msg: async media submission via register_async, simplified chat_msg_submit fields - voice_recorder/attachment_sender: write single file (no chunk splitting on caller side) - inputbar/messagelist: updated to new simplified submit interface - test_media_async: 4-thread stress test (200K ops / 2 sec, 0 errors) - test_media_index: 9 cases covering commit edge cases + async flow - build: Makefile.am, CMakeLists.txt, utun_sources.cmake updated
This commit is contained in:
1 parent
ce5a84da24
commit
65dbfa6813
43 files changed
+1983
-391
No files matched your search
@@ -67,7 +67,7 @@ static void test_basic_push_flush(void) {
|
||||
audio_compressor_config_t cfg = {0};
|
||||
cfg.sample_rate = 48000; cfg.channels = 1;
|
||||
cfg.block_duration_ms = 20; cfg.lookback_ms = 200; cfg.lookahead_ms = 100;
|
||||
cfg.max_gain_db = 30.0f; cfg.rise_rate_per_500ms = 2.0f; cfg.target_level = 0.25f;
|
||||
cfg.max_gain_db = 30.0f; cfg.rise_rate_per_sec = 4.0f; cfg.target_level = 1.0f;
|
||||
audio_compressor_configure(ac, &cfg);
|
||||
|
||||
int16_t in[960];
|
||||
@@ -97,7 +97,7 @@ static void test_silence_in_silence_out(void) {
|
||||
audio_compressor_config_t cfg = {0};
|
||||
cfg.sample_rate = 48000; cfg.channels = 1;
|
||||
cfg.block_duration_ms = 20; cfg.lookback_ms = 200; cfg.lookahead_ms = 100;
|
||||
cfg.max_gain_db = 30.0f; cfg.rise_rate_per_500ms = 2.0f; cfg.target_level = 0.25f;
|
||||
cfg.max_gain_db = 30.0f; cfg.rise_rate_per_sec = 4.0f; cfg.target_level = 1.0f;
|
||||
audio_compressor_configure(ac, &cfg);
|
||||
|
||||
int16_t in[960]; fill_silence(in, 960);
|
||||
@@ -121,7 +121,7 @@ static void test_reset(void) {
|
||||
audio_compressor_config_t cfg = {0};
|
||||
cfg.sample_rate = 48000; cfg.channels = 1;
|
||||
cfg.block_duration_ms = 20; cfg.lookback_ms = 200; cfg.lookahead_ms = 100;
|
||||
cfg.max_gain_db = 30.0f; cfg.rise_rate_per_500ms = 2.0f; cfg.target_level = 0.25f;
|
||||
cfg.max_gain_db = 30.0f; cfg.rise_rate_per_sec = 4.0f; cfg.target_level = 1.0f;
|
||||
audio_compressor_configure(ac, &cfg);
|
||||
|
||||
int16_t in[960];
|
||||
@@ -156,7 +156,7 @@ static void test_stress(void) {
|
||||
cfg.block_duration_ms = 20; cfg.lookback_ms = (rand() % 200) + 50;
|
||||
cfg.lookahead_ms = (rand() % 100) + 20;
|
||||
cfg.max_gain_db = (float)(rand() % 31);
|
||||
cfg.rise_rate_per_500ms = 1.1f + (float)(rand() % 90) / 10.0f;
|
||||
cfg.rise_rate_per_sec = 0.4f + (float)(rand() % 27) / 10.0f;
|
||||
cfg.target_level = 0.1f + (float)(rand() % 30) / 100.0f;
|
||||
audio_compressor_configure(ac, &cfg);
|
||||
|
||||
|
||||
Reference in new issue
Block a user