Skip to content

Commit ca90090

Browse files
Implement voice chat (VoIP)
Signed-off-by: LegendaryGuard <rootuser999@gmail.com>
1 parent d93f9c4 commit ca90090

18 files changed

Lines changed: 1151 additions & 60 deletions

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install dependencies
1818
run: |
1919
apt update
20-
apt install --yes build-essential git libjpeg-dev libsdl2-dev libcurl4-openssl-dev libpng-dev libfreetype-dev libvorbis-dev
20+
apt install --yes build-essential git libjpeg-dev libsdl2-dev libcurl4-openssl-dev libpng-dev libfreetype-dev libvorbis-dev libopus-dev
2121
2222
- name: Fetch repository
2323
uses: actions/checkout@v4.1.1

DPiOS.xcodeproj/project.pbxproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
1414
74063A3E1751ADDB0015D12C /* mod_skeletal_animatevertices_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = 74063A3C1751ADDA0015D12C /* mod_skeletal_animatevertices_sse.c */; };
1515
74063A421751B0AF0015D12C /* clvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 74063A411751B0AF0015D12C /* clvm_cmds.c */; };
16+
7463B7F612F9CE6B00983F6A /* libopus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7463B7F512F9CE6B00983F6A /* libopus.a */; };
1617
74063A491751B9B60015D12C /* libSDL2-ios-armv7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 74063A471751B9B60015D12C /* libSDL2-ios-armv7.a */; };
1718
74063A4A1751B9B60015D12C /* libSDL2-ios-simulator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 74063A481751B9B60015D12C /* libSDL2-ios-simulator.a */; };
1819
74063A511751C4560015D12C /* gamedata in Resources */ = {isa = PBXBuildFile; fileRef = 74063A501751C4560015D12C /* gamedata */; };
@@ -87,6 +88,7 @@
8788
7463B7BF12F9CE6B00983F6A /* snd_mix.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75512F9CE6B00983F6A /* snd_mix.c */; };
8889
7463B7C112F9CE6B00983F6A /* snd_ogg.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75812F9CE6B00983F6A /* snd_ogg.c */; };
8990
7463B7C212F9CE6B00983F6A /* snd_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75A12F9CE6B00983F6A /* snd_sdl.c */; };
91+
7463B7F412F9CE6B00983F6A /* snd_voip.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B7F112F9CE6B00983F6A /* snd_voip.c */; };
9092
7463B7C312F9CE6B00983F6A /* snd_wav.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75B12F9CE6B00983F6A /* snd_wav.c */; };
9193
7463B7C412F9CE6B00983F6A /* sv_demo.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75F12F9CE6B00983F6A /* sv_demo.c */; };
9294
7463B7C512F9CE6B00983F6A /* sv_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76112F9CE6B00983F6A /* sv_main.c */; };
@@ -122,6 +124,7 @@
122124
74063A3C1751ADDA0015D12C /* mod_skeletal_animatevertices_sse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mod_skeletal_animatevertices_sse.c; sourceTree = "<group>"; };
123125
74063A3D1751ADDA0015D12C /* mod_skeletal_animatevertices_sse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mod_skeletal_animatevertices_sse.h; sourceTree = "<group>"; };
124126
74063A411751B0AF0015D12C /* clvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = clvm_cmds.c; sourceTree = "<group>"; };
127+
7463B7F512F9CE6B00983F6A /* libopus.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopus.a; path = "lib/libopus.a"; sourceTree = "<group>"; };
125128
74063A471751B9B60015D12C /* libSDL2-ios-armv7.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libSDL2-ios-armv7.a"; path = "lib/libSDL2-ios-armv7.a"; sourceTree = "<group>"; };
126129
74063A481751B9B60015D12C /* libSDL2-ios-simulator.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libSDL2-ios-simulator.a"; path = "lib/libSDL2-ios-simulator.a"; sourceTree = "<group>"; };
127130
74063A501751C4560015D12C /* gamedata */ = {isa = PBXFileReference; lastKnownFileType = folder; path = gamedata; sourceTree = "<group>"; };
@@ -272,6 +275,8 @@
272275
7463B75812F9CE6B00983F6A /* snd_ogg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_ogg.c; sourceTree = "<group>"; };
273276
7463B75912F9CE6B00983F6A /* snd_ogg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_ogg.h; sourceTree = "<group>"; };
274277
7463B75A12F9CE6B00983F6A /* snd_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_sdl.c; sourceTree = "<group>"; };
278+
7463B7F112F9CE6B00983F6A /* snd_voip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_voip.c; sourceTree = "<group>"; };
279+
7463B7F212F9CE6B00983F6A /* snd_voip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_voip.h; sourceTree = "<group>"; };
275280
7463B75B12F9CE6B00983F6A /* snd_wav.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_wav.c; sourceTree = "<group>"; };
276281
7463B75C12F9CE6B00983F6A /* snd_wav.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_wav.h; sourceTree = "<group>"; };
277282
7463B75D12F9CE6B00983F6A /* sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sound.h; sourceTree = "<group>"; };
@@ -322,6 +327,7 @@
322327
FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */,
323328
FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */,
324329
FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */,
330+
7463B7F612F9CE6B00983F6A /* libopus.a in Frameworks */,
325331
74063A491751B9B60015D12C /* libSDL2-ios-armv7.a in Frameworks */,
326332
74063A4A1751B9B60015D12C /* libSDL2-ios-simulator.a in Frameworks */,
327333
);
@@ -506,6 +512,8 @@
506512
7463B75A12F9CE6B00983F6A /* snd_sdl.c */,
507513
7463B75B12F9CE6B00983F6A /* snd_wav.c */,
508514
7463B75C12F9CE6B00983F6A /* snd_wav.h */,
515+
7463B7F112F9CE6B00983F6A /* snd_voip.c */,
516+
7463B7F212F9CE6B00983F6A /* snd_voip.h */,
509517
7463B75D12F9CE6B00983F6A /* sound.h */,
510518
7463B75E12F9CE6B00983F6A /* spritegn.h */,
511519
7463B75F12F9CE6B00983F6A /* sv_demo.c */,
@@ -565,6 +573,7 @@
565573
FD779EC50E26B99E00F39101 /* Libraries */ = {
566574
isa = PBXGroup;
567575
children = (
576+
7463B7F512F9CE6B00983F6A /* libopus.a */,
568577
74063A471751B9B60015D12C /* libSDL2-ios-armv7.a */,
569578
74063A481751B9B60015D12C /* libSDL2-ios-simulator.a */,
570579
);
@@ -706,6 +715,7 @@
706715
7463B7BF12F9CE6B00983F6A /* snd_mix.c in Sources */,
707716
7463B7C112F9CE6B00983F6A /* snd_ogg.c in Sources */,
708717
7463B7C212F9CE6B00983F6A /* snd_sdl.c in Sources */,
718+
7463B7F412F9CE6B00983F6A /* snd_voip.c in Sources */,
709719
7463B7C312F9CE6B00983F6A /* snd_wav.c in Sources */,
710720
7463B7C412F9CE6B00983F6A /* sv_demo.c in Sources */,
711721
7463B7C512F9CE6B00983F6A /* sv_main.c in Sources */,
@@ -745,6 +755,7 @@
745755
GCC_PREFIX_HEADER = "";
746756
GCC_PREPROCESSOR_DEFINITIONS = (
747757
__IPHONEOS__,
758+
CONFIG_VOIP,
748759
USE_GLES2,
749760
"FORCEGAME=\\\"steelstorm\\\"",
750761
"DP_FS_BASEDIR=\\\"\\\"",
@@ -771,6 +782,7 @@
771782
GCC_PREFIX_HEADER = "";
772783
GCC_PREPROCESSOR_DEFINITIONS = (
773784
__IPHONEOS__,
785+
CONFIG_VOIP,
774786
USE_GLES2,
775787
"FORCEGAME=\\\"steelstorm\\\"",
776788
"DP_FS_BASEDIR=\\\"\\\"",
@@ -801,6 +813,7 @@
801813
OTHER_CFLAGS = "";
802814
OTHER_LDFLAGS = (
803815
"-ObjC",
816+
"-lopus",
804817
"-lz",
805818
);
806819
PRODUCT_NAME = Darkplaces;
@@ -822,6 +835,7 @@
822835
OTHER_CFLAGS = "";
823836
OTHER_LDFLAGS = (
824837
"-ObjC",
838+
"-lopus",
825839
"-lz",
826840
);
827841
PRODUCT_NAME = Darkplaces;

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The supported compilers are GCC and Clang.
6868
The following package names are for Debian, see below for Windows and Mac.
6969

7070
##### Client
71-
Build (mandatory): `build-essential` `libjpeg-dev` `libsdl2-dev`
71+
Build (mandatory): `build-essential` `libjpeg-dev` `libsdl2-dev` `libopus-dev`
7272
Runtime (optional): `libcurl` `libpng` `libfreetype6` `libvorbisfile`
7373

7474
##### Dedicated Server
@@ -81,7 +81,7 @@ Runtime (optional): `libcurl` `libpng`
8181
2. Once you've installed MSYS2 and have fully updated it, open a MinGW64 terminal (***not an MSYS2 terminal***) and input the following command:
8282

8383
```
84-
pacman -S --needed gcc make mingw-w64-x86_64-{toolchain,libjpeg-turbo,libpng,libogg,libvorbis,SDL2}
84+
pacman -S --needed gcc make mingw-w64-x86_64-{toolchain,libjpeg-turbo,libpng,libogg,libvorbis,opus,SDL2}
8585
```
8686

8787
3. See [Unix instructions](#unix-(general)).
@@ -92,7 +92,7 @@ pacman -S --needed gcc make mingw-w64-x86_64-{toolchain,libjpeg-turbo,libpng,lib
9292
3. In the same (or a different terminal), input the following command:
9393

9494
```
95-
brew install sdl2 libjpeg-turbo libpng libvorbis curl
95+
brew install sdl2 libjpeg-turbo libpng libvorbis opus curl
9696
```
9797

9898
4. See [Unix instructions](#unix-(general)).

0 commit comments

Comments
 (0)