mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
* chore(i18n): translate every missing string in all locales Adds the 87 strings the bottom-screen Dashboard and in-game stats pages introduced to all 32 locales, plus the 51 older settings strings Japanese and the 50 Chinese locales were still missing. Every locale now has all 3456 translatable strings with the same placeholders as English. Also translates 36 entries that were still English where the language does not use the English word, and makes es-419 touch_app_id use the same %1$s placeholder as English. * chore(patches): drop comments from the lines downstream patches add Removes comment lines and trailing comments from lines our patches add, with hunk headers recounted. Lines that a later patch uses as context and the upstream backport 0123 are left as they are. The gamescope, FEX, proot and xodus series still apply to their pinned sources, and the patched trees differ only in those comments. test_hud_frames now finds the HUD writer by its first declaration. * docs: credit Greenlight, Better xCloud, viture-v2, GameNative and DiRTTelemetryErrorFix These were credited only in source headers and NOTICE files. * chore: remove source comments and unused functions Removes explanatory comments from first-party Kotlin, Java, C, C++, Rust, TypeScript, Python, shell, Gradle, CMake and workflow files. License and attribution headers stay, and vendored third-party trees, generated files and license files are untouched. A shellcheck directive is kept, and udevmon's fallthrough comments became fallthrough attributes. Syntax trees and token streams match the previous sources apart from the comments and Python docstrings. Module docstrings that argparse prints are kept, and device-smoke.sh prints the same --help text from a heredoc. Also removes 37 functions and 4 fields that nothing referenced. * chore: remove comments from the Syncthing integration and the latest main sources * docs: credit Syncthing and the syncthing-android fork * chore(i18n): translate the Syncthing strings in all locales The 107 strings the Syncthing integration added are now in all 32 locales. sync_web_path_locked names the Syncthing tab by its label. * docs: credit @xXJSONDeruloXx for the HUD metric readers The CPU, GPU load, thermal and battery readers come from their PerformanceHudView pull requests #777, #877, #991, #1406 and #1573. The FusionHUD credit line is unchanged. * docs: credit the HUD metric readers to @xXJSONDeruloXx's work
139 lines
2.9 KiB
C
139 lines
2.9 KiB
C
/*
|
|
* Copyright 2026 The412Banner
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*/
|
|
#ifndef DA_RELAY_PROTO_H
|
|
#define DA_RELAY_PROTO_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#define DA_RELAY_VERSION 1
|
|
#define DA_RING_MAGIC 0x44415247u
|
|
#define DA_HELLO_MAGIC 0x44414831u
|
|
#define DA_ACK_MAGIC 0x44414131u
|
|
|
|
#define DA_RELAY_ENV "BANNER_AUDIO_DIRECT_RELAY"
|
|
#define DA_RELAY_DEFAULT_NAME "directaudio-relay"
|
|
|
|
#define DA_RING_RATE 48000
|
|
#define DA_RING_CHANNELS 2
|
|
|
|
#define DA_RING_CAP_MS 250
|
|
#define DA_RING_TARGET_BURSTS 2
|
|
#define DA_RING_MAX_TARGET_MS 100
|
|
|
|
#define DA_CAPTURE_RING_MS 200
|
|
|
|
enum da_ring_state
|
|
{
|
|
DA_RING_OPENING = 0,
|
|
DA_RING_PLAYING = 1,
|
|
DA_RING_ERROR = 2,
|
|
};
|
|
|
|
struct da_ring
|
|
{
|
|
uint32_t magic;
|
|
uint32_t version;
|
|
uint32_t cap_frames;
|
|
uint32_t rate;
|
|
uint32_t channels;
|
|
uint32_t _pad0;
|
|
|
|
volatile uint32_t widx;
|
|
volatile uint32_t ridx;
|
|
|
|
volatile uint32_t wake;
|
|
|
|
volatile uint32_t quit;
|
|
volatile uint32_t state;
|
|
|
|
volatile int32_t target_frames;
|
|
volatile int32_t hw_buf_frames;
|
|
volatile int32_t hw_burst;
|
|
volatile uint32_t underruns;
|
|
volatile uint32_t cb_count;
|
|
uint32_t _pad1[3];
|
|
|
|
float data[];
|
|
};
|
|
|
|
static inline size_t da_ring_bytes(uint32_t cap_frames)
|
|
{
|
|
return sizeof(struct da_ring) + (size_t)cap_frames * DA_RING_CHANNELS * sizeof(float);
|
|
}
|
|
|
|
static inline uint32_t da_ring_avail(const struct da_ring *r)
|
|
{
|
|
uint32_t w = __atomic_load_n(&r->widx, __ATOMIC_ACQUIRE);
|
|
uint32_t rd = __atomic_load_n(&r->ridx, __ATOMIC_ACQUIRE);
|
|
return w - rd;
|
|
}
|
|
|
|
static inline uint32_t da_ring_space(const struct da_ring *r)
|
|
{
|
|
return r->cap_frames - da_ring_avail(r);
|
|
}
|
|
|
|
#define DA_HELLO_MIC 0x01u
|
|
#define DA_HELLO_EXCLUSIVE 0x02u
|
|
#define DA_HELLO_ADAPTIVE 0x04u
|
|
#define DA_HELLO_DECAY 0x08u
|
|
#define DA_HELLO_WATCHDOG 0x10u
|
|
|
|
struct da_hello
|
|
{
|
|
uint32_t magic;
|
|
uint32_t version;
|
|
uint32_t flags;
|
|
int32_t perf;
|
|
int32_t target_ms;
|
|
int32_t max_ms;
|
|
int32_t target_frames;
|
|
int32_t max_frames;
|
|
uint32_t stall_ms;
|
|
uint32_t quiet_ms;
|
|
uint32_t punish_ms;
|
|
uint32_t max_backoff;
|
|
int32_t pid;
|
|
uint32_t log;
|
|
char runtime_path[256];
|
|
char name[64];
|
|
};
|
|
|
|
#define DA_ACK_MIC_FAILED 0x01u
|
|
|
|
struct da_ack
|
|
{
|
|
uint32_t magic;
|
|
int32_t status;
|
|
int32_t rate;
|
|
int32_t burst;
|
|
int32_t buf_frames;
|
|
int32_t out_cap_frames;
|
|
int32_t in_cap_frames;
|
|
int32_t in_rate;
|
|
uint32_t flags;
|
|
uint32_t _pad;
|
|
};
|
|
|
|
enum da_msg_type
|
|
{
|
|
DA_MSG_MIC_START = 1,
|
|
DA_MSG_MIC_STOP = 2,
|
|
DA_MSG_PING = 3,
|
|
};
|
|
|
|
struct da_msg
|
|
{
|
|
uint32_t type;
|
|
int32_t arg;
|
|
};
|
|
|
|
#endif
|