Skip to content

Commit

Permalink
FEAT(client, ui): Added JACK transport recording options for external…
Browse files Browse the repository at this point in the history
… per-user audio capture/processing
  • Loading branch information
IsaMorphic committed Nov 23, 2023
1 parent 200d103 commit 4ca8439
Show file tree
Hide file tree
Showing 125 changed files with 6,020 additions and 6,793 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ environment:

matrix:
- MUMBLE_ENVIRONMENT_TRIPLET: 'x64-windows-static-md'
MUMBLE_ENVIRONMENT_VERSION: 'windows-static-1.5.x~2022-05-17~cd7e2c9.x64'
MUMBLE_ENVIRONMENT_VERSION: 'windows-static-1.5.x~2023-10-06~0310159.x64'

install:
- ps: .ci/install-environment_windows.ps1
Expand Down
2 changes: 1 addition & 1 deletion .ci/azure-pipelines/main-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
pool:
vmImage: 'windows-2022'
variables:
MUMBLE_ENVIRONMENT_VERSION: 'windows-static-1.5.x~2022-05-17~cd7e2c9.x64'
MUMBLE_ENVIRONMENT_VERSION: 'windows-static-1.5.x~2023-10-06~0310159.x64'
MUMBLE_ENVIRONMENT_TRIPLET: 'x64-windows-static-md'
steps:
- template: steps_windows.yml
Expand Down
2 changes: 1 addition & 1 deletion .ci/azure-pipelines/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pool:
vmImage: 'windows-2022'
variables:
MUMBLE_ENVIRONMENT_VERSION: 'windows-static-1.5.x~2022-05-17~cd7e2c9.x64'
MUMBLE_ENVIRONMENT_VERSION: 'windows-static-1.5.x~2023-10-06~0310159.x64'
MUMBLE_ENVIRONMENT_TRIPLET: 'x64-windows-static-md'
steps:
- template: steps_windows.yml
Expand Down
4 changes: 1 addition & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
url = https://github.com/mumble-voip/mach_override.git
[submodule "3rdparty/speexdsp"]
path = 3rdparty/speexdsp
url = https://github.com/mumble-voip/speexdsp.git
url = https://github.com/xiph/speexdsp.git
[submodule "3rdparty/rnnoise-src"]
path = 3rdparty/rnnoise-src
url = https://github.com/mumble-voip/rnnoise.git
Expand All @@ -25,5 +25,3 @@
[submodule "3rdparty/SPSCQueue"]
path = 3rdparty/SPSCQueue
url = https://github.com/rigtorp/SPSCQueue.git
[submodule "opus"]
url = https://github.com/mumble-voip/opus.git
2 changes: 1 addition & 1 deletion 3rdparty/speexdsp
2 changes: 1 addition & 1 deletion 3rdparty/tracy
Submodule tracy updated 379 files
14 changes: 6 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,9 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
"-DDEBUG"
"-DSNAPSHOT_BUILD"
)

# Disable LTO in Debug builds in order to reduce time required for linking
set(LTO_DEFAULT OFF)
endif()

option(lto "Enables link-time optimizations" ${LTO_DEFAULT})
option(lto "Enables link-time optimizations for release builds" ${LTO_DEFAULT})

include(compiler)
include(os)
Expand All @@ -108,14 +105,14 @@ target_architecture(MUMBLE_TARGET_ARCH)
string(TOLOWER "${MUMBLE_TARGET_ARCH}" MUMBLE_TARGET_ARCH)

message(STATUS "##################################################")
message(STATUS "Mumble version: ${PROJECT_VERSION}")
message(STATUS "Architecture: ${MUMBLE_TARGET_ARCH}")
message(STATUS "Mumble version: ${PROJECT_VERSION}")
message(STATUS "Architecture: ${MUMBLE_TARGET_ARCH}")
if(NOT IS_MULTI_CONFIG)
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
else()
message(STATUS "Using multi-config generator that will determine build type on-the-fly")
endif()
message(STATUS "Using LTO: ${lto}")
message(STATUS "Using LTO in release builds: ${lto}")
message(STATUS "##################################################")

include(install-paths)
Expand Down Expand Up @@ -162,6 +159,7 @@ add_compile_definitions(MUMBLE_TARGET_OS="${MUMBLE_TARGET_OS}")


set(CMAKE_UNITY_BUILD_BATCH_SIZE 40)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${lto})

if(client OR server)
add_subdirectory(src)
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ are met:
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
`AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ If you want to report a bug or create a feature-request, you can open a new issu
[GitHub](https://github.com/mumble-voip/mumble/issues/new/choose).


## Code Signing

We graciously acknowledge that this program uses free code signing provided by
[SignPath.io](https://signpath.io?utm_source=foundation&utm_medium=github&utm_campaign=mumble), and a free code signing certificate by the
[SignPath Foundation](https://signpath.org?utm_source=foundation&utm_medium=github&utm_campaign=mumble).

## Windows

### Running Mumble
Expand Down
18 changes: 12 additions & 6 deletions auxiliary_files/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ if(server)
file(COPY "mumble-server.ini" DESTINATION ${CMAKE_BINARY_DIR})
file(COPY "config_files/mumble-server.conf" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

if(UNIX AND NOT APPLE)
# systemd related files
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
get_pkgconf_variable(
OUTPUT_VARIABLE SYSUSERS_DIR
MODULE systemd
Expand Down Expand Up @@ -102,18 +103,23 @@ if(server)
@ONLY
)

# Install Mumble server man files
install(FILES "man_files/mumble-server.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc)
install(FILES "man_files/mumble-server-user-wrapper.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc)

install(FILES "mumble-server.ini" DESTINATION "${MUMBLE_INSTALL_SYSCONFDIR}" COMPONENT mumble_server)

install(FILES "config_files/mumble-server.sysusers" DESTINATION "${SYSUSERS_DIR}" COMPONENT mumble_server RENAME "mumble-server.conf")

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mumble-server.service" DESTINATION "${SYSTEMD_SERVICE_DIR}" COMPONENT mumble_server)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mumble-server-user-wrapper" DESTINATION "${MUMBLE_INSTALL_EXECUTABLEDIR}" COMPONENT mumble_server)
install(FILES "config_files/mumble-server.conf" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system.d" COMPONENT mumble_server)
install(FILES "${CMAKE_SOURCE_DIR}/src/murmur/MumbleServer.ice" DESTINATION "${MUMBLE_INSTALL_SYSCONFDIR}" COMPONENT mumble_server)
endif()

if(UNIX AND NOT APPLE)
install(FILES "man_files/mumble-server.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc)

install(FILES "mumble-server.ini" DESTINATION "${MUMBLE_INSTALL_SYSCONFDIR}" COMPONENT mumble_server)

if(ice)
install(FILES "${CMAKE_SOURCE_DIR}/src/murmur/MumbleServer.ice" DESTINATION "${MUMBLE_INSTALL_SYSCONFDIR}" COMPONENT mumble_server)
endif()
endif()
endif()

58 changes: 27 additions & 31 deletions docs/dev/IncrementingTheMumbleAPI.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
# Incrementing the Mumble API version

## Overview
[Plugins](/docs/dev/plugins/) are used to extend the Mumble client with custom functionality. They are compiled against multiple [header files](/plugins/) which
contain all function and structure signatures that can be used by the plugin. If you are commiting breaking API changes (such as additions or deletions) to these function signatures
on the Mumble side, the API version will probably have to be increased. This is done to ensure plugins will have access to these functions when they
are compiled against the new API version, while old plugins, using previous API versions, will still work.

## Instructions
If your commit includes breaking API changes, the following steps have to be followed:

1) Create a new ``Mumble_API_v_<MA>_<MI>_x.h`` file in [plugins/](/plugins/).
* Replace ``<MA>`` with the API major version and ``<MI>`` with the API minor version.
* Usually, you will have to increase the ``<MI>`` version by 1 compared to the previous latest version. So if the previous API string was ``1.2.0``, you would probably want to increase the second number by one and create the file ``MumbleAPI_v_1_3_x.h``.
* The last "patch" digit of the version string is reserved for non-breaking API changes such as small fixes. Since non-breaking changes do not require a major or minor API increment, we do not worry about the "patch" digit in this document.
1) Make sure you correctly set the ``MUMBLE_PLUGIN_API_MAJOR_MACRO``, ``MUMBLE_PLUGIN_API_MINOR_MACRO`` and [include guard](https://en.wikipedia.org/wiki/Include_guard) to the new API version.
* You probably want to set the ``MUMBLE_PLUGIN_API_PATCH_MACRO`` to ``0``.
1) Rename the ``struct`` within the file to match the new API version string.
* There is a ``typedef`` at the end of the file which has to use the new ``struct`` name, too.
1) Make your desired changes to the function signatures contained in the header file.
1) Open the [MumbleAPI_structs.h](/src/mumble/MumbleAPI_structs.h) file and add your new API header file as first include.
* Move the previous first include, the last most recent API version, into the ``NO_AUXILIARY_DEFINITIONS`` section.
* This will make sure auxiliary variables and macros always contain the most recent version on the mumble side.
1) Add an ``else`` case to the [Plugin.cpp](/src/mumble/Plugin.cpp) file in the ``Plugin::init`` method.
* You will want to return the newly created ``struct``, if the API version requested by the plugin matches your new one.
1) Create a new function signature in [API.h](/src/mumble/API.h). It should return your new ``struct`` and be of the name ``getMumbleAPI_v_<MA>_<MI>_x``.
1) Amend the previous ``API_v_<MA>_x_x.cpp`` file, or create a new one in [this folder](/src/mumble/).
* For the foreseeable future, reuse the previous cpp file. Creating a new cpp file will probably only be useful on extensive API re-designs.
* If you have created a new ``API_v_<MA>_x_x.cpp``, you must add it to the [CMakeLists.txt](/src/mumble/CMakeLists.txt).
1) Implement the ``getMumbleAPI_v_<MA>_<MI>_x`` function inside the ``API_v_<MA>_x_x.cpp`` file and return a struct with all functions you want to expose in your API version.
1) When adding a new function or new function signature, copy an existing "C FUNCTION WRAPPER" inside the ``API_v_<MA>_x_x.cpp`` file. That wrapper should then call your new function.
1) Implement your new API changes in the ``API_v_<MA>_x_x.cpp`` file.
* If you change the signature of an old function, it is probably best to call the new function in the old implementation with default values.
* This way, old plugins will still be working more or less as expected.
[Plugins](/docs/dev/plugins/) are used to extend the Mumble client with custom functionality. They are compiled against the
[MumblePlugin.h](/plugins/MumblePlugin.h) header, which contains all required definitions (and utilities) that a plugin needs to "do its thing".
Among these definitions, are the functions that are part of the [Mumble API](/docs/dev/plugins/MumbleAPI.md) (search for `Mumble API`). If you modify
these definitions, you'll have to update the API's version number.

Which version to increment, depends on what kind of change you have made:
- The change is only a minor correction (e.g. fixing a typo in a parameter name or fixing a bug in Mumble's implementation of an API function).
Increase the value of `MUMBLE_PLUGIN_API_PATCH_MACRO` by one.
- The change breaks existing plugins (e.g. adding a new parameter to an existing function or adding a new function altogether). Increase the value of
`MUMBLE_PLUGIN_API_MINOR_MACRO` by one and adapt the API code in Mumble (see below).
- The change is not compatible with the existing framework at all. You should never, ever do this without thorough discussions with the project
maintainers. As for the versioning: a custom procedure will have to be agreed on.


## Adapting the Mumble logic

If the API's minor or major version number have been increased, you will have to adapt Mumble's code to make sure that it will be able to serve
individual plugins different versions of the API. For that, you will have to adapt the code inside the `init()` function of the `Plugin` class. More
specifically, you will have to add another branch to the if-statement that selects the requested API struct.

The required `API::getMumbleAPI_v_*` functions are implemented inside the `API.h` and `API.cpp` files. Simply follow the already present examples and
create a specific implementation for the new version. Pointers to functions that have not changed can be used as before.

If you have added a new parameter to an existing function, calling the old function (which should still be available in most cases) should internally
call the new implementation, with that parameter set to a sensible default. This way, all API function calls will end up using the same implementation
on Mumble's side (which reduces maintenance work).

8 changes: 2 additions & 6 deletions docs/dev/TheMumbleSourceCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ When cloning the repo, the source tree should look something like this:
├── src
│   ├── crypto
│   ├── mumble
│   ├── mumble_exe
│   ├── murmur
│   └── tests
└── themes
Expand Down Expand Up @@ -81,11 +80,8 @@ mainly occupied by various scripts used throughout various tasks surrounding Mum
default configuration file for the Mumble server.

Your main focus should lie on the `src` directory as this is where the bulk of Mumble's source code is living. Directly in `src/` are shared sources
that are used by the Mumble client as well as by the server that live in `src/mumble` and `src/murmur` respectively. The `src/mumble_exe` direcrtory
contains code for the Windows-specific executable. In order to make sense of that you have to know that on Windows we are currently using a bit of an
odd system: The main application is packaged inside a DLL that is loaded by the main executable. This is a historic artifact and currently only
serves to create problems every now and then. In any case though, the mentioned "main executable" whose sole job is loading of that DLL lives in
`mumble_exe`. Generally you don't have to worry about it. The remaining directories within `src` should be somewhat self-explanatory.
that are used by the Mumble client as well as by the server that live in `src/mumble` and `src/murmur` respectively. The remaining directories within
`src` should be somewhat self-explanatory.

The `themes` directory contains all built-in themes that are currently shipped with Mumble. At this point there is only one theme available: the
`Default` theme (note that it contains the Lite and the Dark theme variant). If you want to customize any kind of icons within Mumble, this is the
Expand Down
12 changes: 7 additions & 5 deletions docs/dev/build-instructions/build_static.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ their README file.

Once vcpkg is installed on your system, you have to switch into the directory vcpkg is installed in and then install the following packages:
```
qt5-base
qt5-base[mysqlplugin]
qt5-base[postgresqlplugin]
qt5-svg
qt5-tools
qt5-translations
Expand All @@ -53,9 +54,10 @@ libvorbis
libogg
libflac
libsndfile
libmariadb
protobuf
zlib
```
On Windows, you'll also have to install the `mdnsresponder` package.

The command for installing a package is `vcpkg install <packageName> --triplet <triplet>` where `<packageName>` is to be replaced with the name of the
package you want to install and `<triplet>` is the desired target triplet. We recommend using these triplets:
Expand All @@ -72,9 +74,9 @@ Therefore if you are on Windows, you'd install `qt5-base` as `vcpkg install qt5-
vcpkg to install `zeroc-ice`. At the moment Ice can't be built using cmake though and therefore there does not exists a native vcpkg port (install
target) for it.

Instead you'll have to copy the entire [zeroc-ice directory](../../../helpers/vcpkg/ports/zeroc-ice) (not only the contents!) to `<vcpkg dir>/ports/`
Instead you'll have to copy the entire [zeroc-ice directory](../../../helpers/vcpkg/ports/zeroc-ice-mumble) (not only the contents!) to `<vcpkg dir>/ports/`
where `<vcpkg dir>` is the directory you installed vcpkg into. This will make our custom ice port available to be installed via vcpkg. Just install
as a regular vcpkg package named `zeroc-ice`.
as a regular vcpkg package named `zeroc-ice-mumble`.

Note: The custom port uses our [own fork](https://github.com/mumble-voip/ice) of Ice that includes support for cmake.

Expand Down Expand Up @@ -253,7 +255,7 @@ Ref: https://github.com/microsoft/vcpkg/issues/13217
When installing the dependency zlib via vcpkg, it may fail to locate the include file `afxres.h` (when building its mdnsresponder dependency).

```
dll.rc(10): fatal error RC1015: cannot open include file 'afxres.h'. [[…]\vcpkg\buildtrees\mdnsresponder\src\ponder-878-e7e3a9a271.clean\mDNSWindows\DLL\dnssd.vcxproj]
dll.rc(10): fatal error RC1015: cannot open include file 'afxres.h'.
```

To resolve this, ensure MFC has been installed in your Visual Studio installation.
2 changes: 1 addition & 1 deletion docs/dev/build-instructions/cmake_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Build support for JackAudio.

### lto

Enables link-time optimizations
Enables link-time optimizations for release builds
(Default: ${LTO_DEFAULT})

### manual-plugin
Expand Down
16 changes: 5 additions & 11 deletions docs/dev/plugins/CreatePlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ also intended to be used as the basis for everyone that wants to start writing a

What you need for creating a plugin is
- A working C compiler. It does not matter which one
- The Mumble plugin framework header files which are the following (the exact version number in the filename may change depending on which API version
you intend to use):
* [MumbleAPI_v_1_0_x.h](https://github.com/mumble-voip/mumble/blob/master/plugins/MumbleAPI_v_1_0_x.h)
* [MumblePlugin_v_1_0_x.h](https://github.com/mumble-voip/mumble/blob/master/plugins/MumblePlugin_v_1_0_x.h)
* [PluginComponents_v_1_0_x.h](https://github.com/mumble-voip/mumble/blob/master/plugins/PluginComponents_v_1_0_x.h)
- The Mumble plugin header file: [MumblePlugin.h](https://github.com/mumble-voip/mumble/blob/master/plugins/MumblePlugin.h)

Although not strictly required, it usually is handy to use a build system for managing your plugin project. In this guide we'll use
[cmake](https://cmake.org/). If you have never used cmake before, have a look at [this short guide](https://stackoverflow.com/a/26007567).
Expand All @@ -28,9 +24,7 @@ All in all the following file structure is assumed to be present on your device:
```
.
├── include
│   ├── MumbleAPI_v_1_0_x.h
│   ├── MumblePlugin_v_1_0_x.h
│   └── PluginComponents_v_1_0_x.h
│   └── MumblePlugin.h
├── CMakeLists.txt
└── plugin.c
```
Expand Down Expand Up @@ -70,9 +64,9 @@ to build a shared library from the source file `plugin.c` and that everything in

Now that the boilerplate is out of the way, we can start writing the actual plugin. This will be done in the `plugin.c` source file.

The first thing you should do is to include `MumblePlugin_v_1_0_x.h`. Furthermore we'll need a few more C headers that we'll include as well:
The first thing you should do is to include `MumblePlugin.h`. Furthermore we'll need a few more C headers that we'll include as well:
```c
#include "MumblePlugin_v_1_0_x.h"
#include "MumblePlugin.h"

#include <stdio.h>
#include <stdlib.h>
Expand All @@ -82,7 +76,7 @@ The first thing you should do is to include `MumblePlugin_v_1_0_x.h`. Furthermor
Furthermore every plugin needs a way to store at least the Mumble-API and its own ID. In C this can be done using global variables. Therefore go ahead
and create the respective variables in the global namespace:
```c
struct MumbleAPI_v_1_0_x mumbleAPI;
MumbleAPI mumbleAPI;
mumble_plugin_id_t ownID;
```

Expand Down
4 changes: 2 additions & 2 deletions docs/dev/plugins/MumbleAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ That is to say: You must not wait for a job to finish asynchronously that might

## Header files

The following header files describe the Mumble-API struct that contains the function pointers as well as descriptions of the respective functions:
- [Mumble-API v1.0.x](https://github.com/mumble-voip/mumble/blob/master/plugins/MumbleAPI_v_1_0_x.h)
The Mumble API definition is contained in the [MumblePlugin.h](https://github.com/mumble-voip/mumble/blob/master/plugins/MumblePlugin.h) header. It
contains a list of all available functions as well as documentation for every function.

Loading

0 comments on commit 4ca8439

Please sign in to comment.