TheEVolk
9e8d248044
engine: client: voice api
2026-04-10 14:58:46 +05:00
Alibek Omarov
9205ddc5b4
engine: client: voice: rewrite Voice_IsGoldSrcMode to make it easier to understand and also fix build with Clang
2026-02-21 01:20:34 +05:00
Alibek Omarov
3040552580
engine: client: replace COM_CheckString with COM_StringEmptyOrNULL
2026-02-21 01:20:34 +05:00
Alibek Omarov
cb7f2ad8af
engine: replace Sys_DoubleTime with Platform_DoubleTime in internal code, only use Sys_DoubleTime in APIs
...
As Sys_DoubleTime is marked with GAME_EXPORT attribute that helps us to
maintain compatible binary interface.
2026-01-13 05:51:19 +05:00
Alibek Omarov
5584e6376c
engine: client: voice: shutdown refactoring
2025-12-24 06:51:16 +05:00
Alibek Omarov
d366e04682
engine: client: voice: fix typo, sequence must be incremented after it's written to the buffer
2025-11-09 02:55:58 +05:00
Alibek Omarov
955c5570d8
engine: client: voice: increment sequence before it's passed into LittleShort macro
2025-11-06 20:06:51 +05:00
Sergey Degtyar
ee7dce68b8
engine: client: streamline samples handling
2025-11-01 21:24:49 +08:00
Alibek Omarov
c2e2686b6a
engine: voice: send disabled voice status when raw chan is exhausted, also send enabled status only when we have something to play
...
And other minor refactorings.
2025-09-03 04:20:22 +05:00
Alibek Omarov
5106ebae58
engine: voice: fix local player server ack'ed message
2025-09-03 03:40:15 +05:00
Alibek Omarov
6b6bf7e458
Revert "engine: voice: unconditionally notify client.dll about talking player if we received the data"
...
This reverts commit 9fda7a15cb .
2025-09-03 03:30:24 +05:00
Alibek Omarov
2daaa94666
engine: voice: fix voice loopback on GoldSrc proto
2025-09-03 03:07:36 +05:00
Alibek Omarov
b129ed8f76
engine: voice: fix another off-by-one error, to fix server's ack status of local player talking
2025-09-03 03:01:49 +05:00
Alibek Omarov
9fda7a15cb
engine: voice: unconditionally notify client.dll about talking player if we received the data
2025-09-03 02:23:54 +05:00
Alibek Omarov
a0a0d58be5
engine: client: unify quality options between Xash and GoldSrc protocol (lowering overall bitrate for Xash servers, which might help overcome default rate limitations)
2025-08-30 19:32:50 +05:00
SNMetamorph
599b1b48ec
engine: voice: added wrapper for players voice status array to avoid mess with off-by-one errors
2025-07-15 18:54:01 +05:00
Alibek Omarov
40dfd2e711
engine: client: voice: fix off by one errors (as suggested by @SNMetamorph)
2025-07-09 18:29:36 +05:00
Sergey Degtyar
21b0516724
engine: client: move voice reset to Voice_Shutdown
2025-07-03 16:25:24 +03:00
Sergey Degtyar
cca1732245
engine: client: refactored voice.c
...
- reformatted code.
- changed function declarations to static.
- ensured consistent use of defined constants for buffer sizes.
2025-07-03 13:50:57 +03:00
Sergey Degtyar
6bb7bcd378
engine: client: GoldSrc voice chat support
...
- Added support for GoldSrc voice mode, including initialization and shutdown functions.
- Implemented data size verification for the GoldSrc voice package.
- Creation and processing of voice packets, CRC verification of data integrity.
- Added a Steam ID field to the client_static_t structure
- Automatic gain control has been introduced for voice samples.
- The voice status structure has been updated.
- Refactored voice data handling for better type consistency and maintainability.
- Fixed ISO C90 compliance issues for better portability.
- Fixed decoder index usage.
2025-07-01 16:09:09 +03:00
Alibek Omarov
8452bec877
engine: client: reduce reads of cls.legacymode
2024-10-14 04:13:10 +03:00
Alibek Omarov
bbb076c0d4
engine: client: voice: don't print about unsupported codec with empty string name
2024-10-10 23:40:23 +03:00
Alibek Omarov
2e30acf611
engine: client: voice: allow restoring voice after toggling voice_enable while connected to server
2024-07-28 17:12:32 +03:00
Alibek Omarov
d3586c2143
engine: soundlib: add support for converting stereo to mono and back, attempt to simplify conversion boilerplate
2024-07-16 05:05:50 +03:00
SNMetamorph
2a4fafc3f9
engine: voice: added voice_transmit_scale cvar to configure outcoming voice audio volume
2024-03-23 23:37:03 +03:00
SNMetamorph
9b3ccf5f04
engine: voice: output_buffer renamed to compress_buffer
2024-03-23 23:37:03 +03:00
SNMetamorph
f59ac2360a
engine: voice: made voice_scale to influence incoming voice audio volume
2024-03-23 23:37:03 +03:00
Alibek Omarov
ff21fb42e6
engine: client: create separate Opus decoders for each player
...
Turns out, we can't re-use same decoder for different streams.
2024-03-20 18:41:52 +03:00
Alibek Omarov
5d6cf62405
engine: client: voice: open microphone only after server sends svc_voiceinit to us and shutdown immediately after disconnect
2024-01-24 20:52:21 +03:00
Alibek Omarov
7d2bf93c72
engine: client: voice: do not reinitialize voice with same parameters
2023-05-15 17:48:15 +03:00
Alibek Omarov
305b2579eb
engine: client: voice: fix crackling voice file input on low FPS
2022-10-19 01:08:39 +03:00
Alibek Omarov
4be4870982
engine: client: remove voice_codecinfo command, as Opus Custom don't give any encoder info, possibly an Opus bug
2022-08-31 19:50:31 +03:00
Alibek Omarov
19c2061831
wscript: define CUSTOM_MODES and try to link with export that only exists when CUSTOM_MODES was defined in build-time
2022-08-31 19:48:42 +03:00
Alibek Omarov
82ab06efdd
engine: client: voice: new version, move to Opus Custom codec
...
* Despite Opus Custom have strict requirements, it's more barebones, allowing us to use maximum
frame size and custom sample rate, without resampling
* Encode each frame size to network buffer, allowing smooth voice chat even in 10 FPS
* Fix possible buffer overruns, underruns and races with platform side
* Revise all usages of offset variables, samples vs bytes
2022-08-31 06:44:45 +03:00
Alibek Omarov
8630ef2c67
engine: client: voice: allow using inputfromfile when microphone isn't connected
2022-08-20 06:13:33 +03:00
Alibek Omarov
0b50678912
engine: client: voice: refactor, fix issues when missing mic disables voice chat, fix few possible crashes and memory leaks
2022-08-20 03:56:54 +03:00
SNMetamorph
8e48a98d48
engine: client: voice: codec quality levels changed
2022-08-19 20:47:01 +03:00
SNMetamorph
76dbefb9ec
engine: client: voice: fixed initialization checks
2022-08-19 20:47:01 +03:00
Alibek Omarov
327dcc0293
engine: client: voice: simplify code, simplify including voice.h, do not depend on opus headers globally
...
Autofix few code style mistakes
2022-08-19 05:52:53 +03:00
SNMetamorph
74707551ae
engine: client: voice: fixed hanging voice status
2022-08-19 04:14:25 +03:00
SNMetamorph
2f5f5ef0a6
engine: client: voice: fixed sound playback from file
2022-08-19 04:14:25 +03:00
SNMetamorph
f7dc9d8e72
engine: client: voice: frame size increased to 40 msec
2022-08-19 04:14:25 +03:00
SNMetamorph
b0ff51d5a0
engine: client: voice: changed bitrate units to kbps in voice_codecinfo
2022-08-18 04:46:11 +03:00
SNMetamorph
0a6885e02d
engine: client: voice chat cvars set as privileged
2022-08-18 04:46:11 +03:00
SNMetamorph
aa5a509316
engine: client: voice: added GPL notice
2022-08-18 04:46:11 +03:00
SNMetamorph
97879430e9
engine: small code fixes related to voice chat
2022-08-18 04:46:11 +03:00
SNMetamorph
ae97eae42f
engine: client: voice: implemented automatic gain control
2022-08-18 04:46:11 +03:00
SNMetamorph
c5d7e3c783
engine: client: fixed players voice state changing
2022-08-18 04:46:11 +03:00
SNMetamorph
9bcd36cc24
engine: voice code minor refactoring
2022-08-18 04:46:11 +03:00
SNMetamorph
c6881a425f
engine: client: added support for variable voice chat quality
2022-08-18 04:46:11 +03:00