Trying to compile the MIPS-specific AECM audio processing file for mips64el on Debian results in the following errors: ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc: In function ‘int webrtc::WebRtcAecm_ProcessBlock(AecmCore*, const int16_t*, const int16_t*, const int16_t*, int16_t*)’: ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:955:30: error: cast from ‘int16_t*’ {aka ‘short int*’} to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive] 955 | int16_t* fft = (int16_t*)(((uint32_t)fft_buf + 31) & ~31); | ^~~~~~~~~~~~~~~~~ ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:955:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 955 | int16_t* fft = (int16_t*)(((uint32_t)fft_buf + 31) & ~31); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:956:36: error: cast from ‘int32_t*’ {aka ‘int*’} to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive] 956 | int32_t* echoEst32 = (int32_t*)(((uint32_t)echoEst32_buf + 31) & ~31); | ^~~~~~~~~~~~~~~~~~~~~~~ ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:956:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 956 | int32_t* echoEst32 = (int32_t*)(((uint32_t)echoEst32_buf + 31) & ~31); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:957:40: error: cast from ‘int32_t*’ {aka ‘int*’} to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive] 957 | ComplexInt16* dfw = (ComplexInt16*)(((uint32_t)dfw_buf + 31) & ~31); | ^~~~~~~~~~~~~~~~~ ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:957:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 957 | ComplexInt16* dfw = (ComplexInt16*)(((uint32_t)dfw_buf + 31) & ~31); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:958:40: error: cast from ‘int32_t*’ {aka ‘int*’} to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive] 958 | ComplexInt16* efw = (ComplexInt16*)(((uint32_t)efw_buf + 31) & ~31); | ^~~~~~~~~~~~~~~~~ ../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:958:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 958 | ComplexInt16* efw = (ComplexInt16*)(((uint32_t)efw_buf + 31) & ~31); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Presumably, this file was written for 32-bit MIPS so the author used uint32_t to do pointer arithmetic over these arrays. Fix the errors by using uintptr_t to work with pointers. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
About
This is meant to be a more Linux packaging friendly copy of the AudioProcessing module from the WebRTC project. The ideal case is that we make no changes to the code to make tracking upstream code easy.
This package currently only includes the AudioProcessing bits, but I am very open to collaborating with other projects that wish to distribute other bits of the code and hopefully eventually have a single point of packaging all the WebRTC code to help people reuse the code and avoid keeping private copies in several different projects.
Building
This project uses the Meson build system. The quickest way to build is:
# Initialise into the build/ directory, for a prefixed install into the
# install/ directory
meson . build -Dprefix=$PWD/install
# Run the actual build
ninja -C build
# Install locally
ninja -C build install
# The libraries, headers, and pkg-config files are now in the install/
# directory
Feedback
Patches, suggestions welcome. You can file an issue on our Gitlab repository.
Notes
- It might be nice to try LTO on the library. We build a lot of code as part of the main AudioProcessing module deps, and it's possible that this could provide significant space savings.
Description
Languages
C++
81.2%
C
16.5%
Python
1.2%
Meson
0.7%
Assembly
0.4%