mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-10 14:51:41 +02:00
Reenable Linux and MacOS travis builds
This commit is contained in:
parent
e5047f1aff
commit
adfed6a1a8
3 changed files with 153 additions and 152 deletions
288
.travis.yml
288
.travis.yml
|
@ -5,164 +5,164 @@ group: edge
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: gcc
|
compiler: gcc
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=g++-4.9
|
- COMPILER=g++-4.9
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# packages:
|
packages:
|
||||||
# - g++-4.9 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- g++-4.9 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: gcc
|
compiler: gcc
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=g++-5
|
- COMPILER=g++-5
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# packages:
|
packages:
|
||||||
# - g++-5 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- g++-5 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: gcc
|
compiler: gcc
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=g++-6
|
- COMPILER=g++-6
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# packages:
|
packages:
|
||||||
# - g++-6 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- g++-6 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: gcc
|
compiler: gcc
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=g++-7
|
- COMPILER=g++-7
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# packages:
|
packages:
|
||||||
# - g++-7 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- g++-7 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: gcc
|
compiler: gcc
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=g++-8
|
- COMPILER=g++-8
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# packages:
|
packages:
|
||||||
# - g++-8 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- g++-8 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: gcc
|
compiler: gcc
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=g++-9
|
- COMPILER=g++-9
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# packages:
|
packages:
|
||||||
# - g++-9 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- g++-9 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: clang
|
compiler: clang
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=clang++-3.9
|
- COMPILER=clang++-3.9
|
||||||
# - CXXFLAGS=-stdlib=libc++
|
- CXXFLAGS=-stdlib=libc++
|
||||||
# - CC=clang-3.9
|
- CC=clang-3.9
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - llvm-toolchain-trusty-3.9
|
- llvm-toolchain-trusty-3.9
|
||||||
# packages:
|
packages:
|
||||||
# - clang-3.9 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- clang-3.9 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: clang
|
compiler: clang
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=clang++-4.0
|
- COMPILER=clang++-4.0
|
||||||
# - CXXFLAGS=-stdlib=libc++
|
- CXXFLAGS=-stdlib=libc++
|
||||||
# - CC=clang-4.0
|
- CC=clang-4.0
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - llvm-toolchain-trusty-4.0
|
- llvm-toolchain-trusty-4.0
|
||||||
# packages:
|
packages:
|
||||||
# - clang-4.0 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- clang-4.0 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: clang
|
compiler: clang
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=clang++-5.0
|
- COMPILER=clang++-5.0
|
||||||
# - CXXFLAGS=-stdlib=libc++
|
- CXXFLAGS=-stdlib=libc++
|
||||||
# - CC=clang-5.0
|
- CC=clang-5.0
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - llvm-toolchain-trusty-5.0
|
- llvm-toolchain-trusty-5.0
|
||||||
# packages:
|
packages:
|
||||||
# - clang-5.0 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- clang-5.0 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: clang
|
compiler: clang
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=clang++-6.0
|
- COMPILER=clang++-6.0
|
||||||
# - CXXFLAGS=-stdlib=libc++
|
- CXXFLAGS=-stdlib=libc++
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - llvm-toolchain-trusty-6.0
|
- llvm-toolchain-trusty-6.0
|
||||||
# - ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# packages:
|
packages:
|
||||||
# - clang-6.0 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- clang-6.0 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# - os: linux
|
- os: linux
|
||||||
# compiler: clang
|
compiler: clang
|
||||||
# env:
|
env:
|
||||||
# - COMPILER=clang++-7
|
- COMPILER=clang++-7
|
||||||
# - CXXFLAGS=-stdlib=libc++
|
- CXXFLAGS=-stdlib=libc++
|
||||||
# addons:
|
addons:
|
||||||
# apt:
|
apt:
|
||||||
# sources:
|
sources:
|
||||||
# - sourceline: 'ppa:mhier/libboost-latest'
|
- sourceline: 'ppa:mhier/libboost-latest'
|
||||||
# - llvm-toolchain-trusty-7
|
- llvm-toolchain-trusty-7
|
||||||
# - ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# packages:
|
packages:
|
||||||
# - clang-7 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
- clang-7 boost1.70 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libavahi-client-dev avahi-daemon
|
||||||
|
|
||||||
# # build on osx
|
# build on osx
|
||||||
# - os: osx
|
- os: osx
|
||||||
# osx_image: xcode9.4
|
osx_image: xcode9.4
|
||||||
# env:
|
env:
|
||||||
# - MATRIX_EVAL="brew update && brew unlink python@2 && brew upgrade boost && brew install flac opus libvorbis libsoxr"
|
- MATRIX_EVAL="brew update && brew unlink python@2 && brew upgrade boost && brew install flac opus libvorbis libsoxr"
|
||||||
|
|
||||||
# - os: osx
|
- os: osx
|
||||||
# osx_image: xcode10.3
|
osx_image: xcode10.3
|
||||||
# env:
|
env:
|
||||||
# - MATRIX_EVAL="brew update && brew install flac opus libvorbis libsoxr"
|
- MATRIX_EVAL="brew update && brew install flac opus libvorbis libsoxr"
|
||||||
|
|
||||||
# - os: osx
|
- os: osx
|
||||||
# osx_image: xcode11
|
osx_image: xcode11
|
||||||
# env:
|
env:
|
||||||
# - MATRIX_EVAL="brew update && brew install flac opus libvorbis libsoxr"
|
- MATRIX_EVAL="brew update && brew install flac opus libvorbis libsoxr"
|
||||||
|
|
||||||
# build on windows
|
# build on windows
|
||||||
- os: windows
|
- os: windows
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -115,9 +116,9 @@ bool OggDecoder::decode(msg::PcmChunk* chunk)
|
||||||
{
|
{
|
||||||
int8_t& val = chunkBuffer[sampleFormat_.channels() * i + channel];
|
int8_t& val = chunkBuffer[sampleFormat_.channels() * i + channel];
|
||||||
#ifdef HAS_TREMOR
|
#ifdef HAS_TREMOR
|
||||||
val = clip<int8_t>(pcm[channel][i], -128, 127);
|
val = clip<int8_t>(pcm[channel][i], INT8_MIN, INT8_MAX);
|
||||||
#else
|
#else
|
||||||
val = clip<int8_t>(floor(pcm[channel][i] * 127.f + .5f), -128, 127);
|
val = clip<int8_t>(floor(pcm[channel][i] * 127.f + .5f), INT8_MIN, INT8_MAX);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,9 +129,9 @@ bool OggDecoder::decode(msg::PcmChunk* chunk)
|
||||||
{
|
{
|
||||||
int16_t& val = chunkBuffer[sampleFormat_.channels() * i + channel];
|
int16_t& val = chunkBuffer[sampleFormat_.channels() * i + channel];
|
||||||
#ifdef HAS_TREMOR
|
#ifdef HAS_TREMOR
|
||||||
val = SWAP_16(clip<int16_t>(pcm[channel][i] >> 9, -32768, 32767));
|
val = SWAP_16(clip<int16_t>(pcm[channel][i] >> 9, INT16_MIN, INT16_MAX));
|
||||||
#else
|
#else
|
||||||
val = SWAP_16(clip<int16_t>(floor(pcm[channel][i] * 32767.f + .5f), -32768, 32767));
|
val = SWAP_16(clip<int16_t>(floor(pcm[channel][i] * 32767.f + .5f), INT16_MIN, INT16_MAX));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,9 +142,9 @@ bool OggDecoder::decode(msg::PcmChunk* chunk)
|
||||||
{
|
{
|
||||||
int32_t& val = chunkBuffer[sampleFormat_.channels() * i + channel];
|
int32_t& val = chunkBuffer[sampleFormat_.channels() * i + channel];
|
||||||
#ifdef HAS_TREMOR
|
#ifdef HAS_TREMOR
|
||||||
val = SWAP_32(clip<int32_t>(pcm[channel][i] << 7, -2147483648, 2147483647));
|
val = SWAP_32(clip<int32_t>(pcm[channel][i] << 7, INT32_MIN, INT32_MAX));
|
||||||
#else
|
#else
|
||||||
val = SWAP_32(clip<int32_t>(floor(pcm[channel][i] * 2147483647.f + .5f), -2147483648, 2147483647));
|
val = SWAP_32(clip<int32_t>(floor(pcm[channel][i] * 2147483647.f + .5f), INT32_MIN, INT32_MAX));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,12 +42,12 @@ private:
|
||||||
template <typename T, typename IN_TYPE>
|
template <typename T, typename IN_TYPE>
|
||||||
T clip(const IN_TYPE& value, const T& lower, const T& upper) const
|
T clip(const IN_TYPE& value, const T& lower, const T& upper) const
|
||||||
{
|
{
|
||||||
auto val = static_cast<T>(value);
|
auto val = static_cast<int64_t>(value);
|
||||||
if (val > upper)
|
if (val > upper)
|
||||||
return upper;
|
return upper;
|
||||||
if (val < lower)
|
if (val < lower)
|
||||||
return lower;
|
return lower;
|
||||||
return val;
|
return static_cast<T>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
ogg_sync_state oy; /// sync and verify incoming physical bitstream
|
ogg_sync_state oy; /// sync and verify incoming physical bitstream
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue