radio: PTT-радио в каналах (src/radio + chatgui + chatgui-android)

Новый модуль src/radio (radio/radio_audio/radio_headless) — push-to-talk
радио поверх topo-групп, доставка аудио в канал, headless-режим и тесты.
Интеграция в chatgui (ptt_hotkey_manager, radio_audio_engine, радионастройки,
вызовы) и chatgui-android (RadioAudioEngine, RadioOverlayService, UI).
This commit is contained in:
evgeny committed 2026-09-19 17:09:00 +03:00
1 parent 398078a28f
commit b96ed8bd00
69 files changed
+5372 -51

No files matched your search

+21
View File
@@ -7,6 +7,7 @@
#include "soundsettingspage.h"
#include "audiodevicesettingspage.h"
#include "storagesettingspage.h"
#include "radiosettingspage.h"
#include "connmonitorwindow.h"
#include "../transport/gui_bridge.h"
#include "../../lib/mem.h"
@@ -145,6 +146,9 @@ SettingsDialog::SettingsDialog(const QString& configPath, DbManager* db, UtunNod
m_audioDevicePage = new AudioDeviceSettingsPage(db, recorder, m_pages);
m_audioDevicePage->setConfigPath(m_configPath);
m_pages->addWidget(m_audioDevicePage);
m_radioPage = new RadioSettingsPage(db, m_pages);
m_pages->addWidget(m_radioPage);
rightLayout->addWidget(m_pages, 1);
// --- Bottom buttons ---
@@ -289,6 +293,23 @@ void SettingsDialog::onSave() {
m_soundPage->applyAndSave();
m_audioDevicePage->applyAndSave();
m_storagePage->applyAndSave();
m_radioPage->apply();
/* save radio PTT hotkeys to ui_state */
{
const char* key = "radio_ptt_hotkeys";
QByteArray val = m_radioPage->hotkeys().join('|').toUtf8();
size_t klen = strlen(key), vlen = (size_t)val.size();
size_t total = klen + 1 + vlen + 1;
if (total <= 256) {
struct save_ui_state_arg* arg = (struct save_ui_state_arg*)u_malloc(sizeof(struct save_ui_state_arg));
if (!arg) return;
arg->inst = gui_bridge_get_inst();
memcpy(arg->data, key, klen + 1);
memcpy(arg->data + klen + 1, val.constData(), vlen + 1);
gui_bridge_post_uasync_fn(chat_core_save_ui_state_trampoline, arg);
}
}
/* save join_policy */
{