-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into lukas/chat-api
- Loading branch information
Showing
74 changed files
with
10,225 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
packages livekit livekit-ffi livekit-protocol livekit-runtime livekit-api libwebrtc webrtc-sys webrtc-sys/build | ||
packages livekit livekit-ffi livekit-protocol livekit-runtime livekit-api libwebrtc webrtc-sys webrtc-sys/build soxr-sys |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
version 0.1.0 | ||
language rust |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "soxr-sys" | ||
version = "0.1.0" | ||
authors = ["Theo Monnom <theo.8bits@gmail.com"] | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
||
|
||
[build-dependencies] | ||
cc = "1.0" | ||
|
||
[dev-dependencies] | ||
hound = "3.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
fn main() { | ||
let mut build = cc::Build::new(); | ||
|
||
build.include("src"); | ||
build.define("SOXR_LIB", "0"); | ||
|
||
build | ||
.flag_if_supported("-std=gnu89") | ||
.flag_if_supported("-Wnested-externs") | ||
.flag_if_supported("-Wmissing-prototypes") | ||
.flag_if_supported("-Wstrict-prototypes") | ||
.flag_if_supported("-Wconversion") | ||
.flag_if_supported("-Wall") | ||
.flag_if_supported("-Wextra") | ||
.flag_if_supported("-pedantic") | ||
.flag_if_supported("-Wundef") | ||
.flag_if_supported("-Wpointer-arith") | ||
.flag_if_supported("-Wno-long-long"); | ||
|
||
// TODO(theomonnom): Add SIMD support | ||
let sources = [ | ||
"src/soxr.c", | ||
"src/data-io.c", | ||
"src/dbesi0.c", | ||
"src/filter.c", | ||
"src/cr.c", | ||
"src/cr32.c", | ||
"src/fft4g32.c", | ||
"src/fft4g.c", | ||
"src/fft4g64.c", | ||
"src/vr32.c", | ||
]; | ||
|
||
for source in &sources { | ||
build.file(source); | ||
} | ||
|
||
build.compile("libsoxr.a"); | ||
println!("cargo:rustc-link-lib=m"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bindgen --no-prepend-enum-name src/soxr.h -o src/soxr.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
SoX Resampler Library Copyright (c) 2007-18 robs@users.sourceforge.net | ||
|
||
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. | ||
|
||
This library is distributed in the hope that it will be useful, but | ||
WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser | ||
General Public License for more details. | ||
|
||
You should have received a copy of the GNU Lesser General Public License | ||
along with this library; if not, see <https://www.gnu.org/licenses/>. | ||
|
||
|
||
Notes | ||
|
||
1. Re software in the `examples' directory: works that are not resampling | ||
examples but are based on the given examples -- for example, applications using | ||
the library -- shall not be considered to be derivative works of the examples. | ||
|
||
2. If building with pffft.c, see the licence embedded in that file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* SoX Resampler Library Copyright (c) 2007-16 robs@users.sourceforge.net | ||
* Licence for this file: LGPL v2.1 See LICENCE for details. */ | ||
|
||
#if defined SOXR_LIB | ||
|
||
#define lsx_bessel_I_0 _soxr_bessel_I_0 | ||
#define lsx_cdft_f _soxr_cdft_f | ||
#define lsx_cdft _soxr_cdft | ||
#define lsx_clear_fft_cache_f _soxr_clear_fft_cache_f | ||
#define lsx_clear_fft_cache _soxr_clear_fft_cache | ||
#define lsx_ddct_f _soxr_ddct_f | ||
#define lsx_ddct _soxr_ddct | ||
#define lsx_ddst_f _soxr_ddst_f | ||
#define lsx_ddst _soxr_ddst | ||
#define lsx_design_lpf _soxr_design_lpf | ||
#define lsx_dfct_f _soxr_dfct_f | ||
#define lsx_dfct _soxr_dfct | ||
#define lsx_dfst_f _soxr_dfst_f | ||
#define lsx_dfst _soxr_dfst | ||
#define lsx_fir_to_phase _soxr_fir_to_phase | ||
#define lsx_f_resp _soxr_f_resp | ||
#define lsx_init_fft_cache_f _soxr_init_fft_cache_f | ||
#define lsx_init_fft_cache _soxr_init_fft_cache | ||
#define lsx_inv_f_resp _soxr_inv_f_resp | ||
#define lsx_kaiser_beta _soxr_kaiser_beta | ||
#define lsx_kaiser_params _soxr_kaiser_params | ||
#define lsx_make_lpf _soxr_make_lpf | ||
#define lsx_ordered_convolve_f _soxr_ordered_convolve_f | ||
#define lsx_ordered_convolve _soxr_ordered_convolve | ||
#define lsx_ordered_partial_convolve_f _soxr_ordered_partial_convolve_f | ||
#define lsx_ordered_partial_convolve _soxr_ordered_partial_convolve | ||
#define lsx_rdft_f _soxr_rdft_f | ||
#define lsx_rdft _soxr_rdft | ||
#define lsx_safe_cdft_f _soxr_safe_cdft_f | ||
#define lsx_safe_cdft _soxr_safe_cdft | ||
#define lsx_safe_rdft_f _soxr_safe_rdft_f | ||
#define lsx_safe_rdft _soxr_safe_rdft | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net | ||
* Licence for this file: LGPL v2.1 See LICENCE for details. */ | ||
|
||
#include <stdlib.h> | ||
#include <math.h> | ||
#include <libavcodec/avfft.h> | ||
#include "filter.h" | ||
#include "rdft_t.h" | ||
|
||
static void * forward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),DFT_R2C);} | ||
static void * backward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),IDFT_C2R);} | ||
static void rdft(int length, void * setup, float * h) {av_rdft_calc(setup, h); (void)length;} | ||
static int multiplier(void) {return 2;} | ||
static void nothing(void) {} | ||
static int flags(void) {return 0;} | ||
|
||
fn_t _soxr_rdft32_cb[] = { | ||
(fn_t)forward_setup, | ||
(fn_t)backward_setup, | ||
(fn_t)av_rdft_end, | ||
(fn_t)rdft, | ||
(fn_t)rdft, | ||
(fn_t)rdft, | ||
(fn_t)rdft, | ||
(fn_t)_soxr_ordered_convolve_f, | ||
(fn_t)_soxr_ordered_partial_convolve_f, | ||
(fn_t)multiplier, | ||
(fn_t)nothing, | ||
(fn_t)malloc, | ||
(fn_t)calloc, | ||
(fn_t)free, | ||
(fn_t)flags, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net | ||
* Licence for this file: LGPL v2.1 See LICENCE for details. */ | ||
|
||
#include <math.h> | ||
#include <libavcodec/avfft.h> | ||
#include "util32s.h" | ||
#include "rdft_t.h" | ||
|
||
static void * forward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),DFT_R2C);} | ||
static void * backward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),IDFT_C2R);} | ||
static void rdft(int length, void * setup, float * h) {av_rdft_calc(setup, h); (void)length;} | ||
static int multiplier(void) {return 2;} | ||
static void nothing(void) {} | ||
static int flags(void) {return RDFT_IS_SIMD;} | ||
|
||
fn_t _soxr_rdft32s_cb[] = { | ||
(fn_t)forward_setup, | ||
(fn_t)backward_setup, | ||
(fn_t)av_rdft_end, | ||
(fn_t)rdft, | ||
(fn_t)rdft, | ||
(fn_t)rdft, | ||
(fn_t)rdft, | ||
(fn_t)ORDERED_CONVOLVE_SIMD, | ||
(fn_t)ORDERED_PARTIAL_CONVOLVE_SIMD, | ||
(fn_t)multiplier, | ||
(fn_t)nothing, | ||
(fn_t)SIMD_ALIGNED_MALLOC, | ||
(fn_t)SIMD_ALIGNED_CALLOC, | ||
(fn_t)SIMD_ALIGNED_FREE, | ||
(fn_t)flags, | ||
}; |
Oops, something went wrong.