mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-18 19:46:14 +02:00
Improve macro check for ogg decoder
The OGG decoder needs libogg and (tremor or libvorbis).
This commit is contained in:
parent
0489221d7f
commit
c4e38b60b0
2 changed files with 18 additions and 18 deletions
|
@ -49,40 +49,40 @@ endif
|
|||
|
||||
ifeq ($(TARGET), ANDROID)
|
||||
|
||||
CXX = $(PROGRAM_PREFIX)clang++
|
||||
STRIP = $(PROGRAM_PREFIX)strip
|
||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -fPIC -DHAS_TREMOR -DHAS_OPENSL -I$(NDK_DIR)/include
|
||||
LDFLAGS = -L$(NDK_DIR)/lib -pie -lvorbisidec -logg -lFLAC -lOpenSLES -latomic -llog
|
||||
CXX = $(NDK_DIR)/bin/arm-linux-androideabi-g++
|
||||
STRIP = $(NDK_DIR)/bin/arm-linux-androideabi-strip
|
||||
CXXFLAGS += -pthread -DANDROID -DNO_CPP11_STRING -fPIC -DHAS_OGG -DHAS_TREMOR -DHAS_OPENSL -I$(NDK_DIR)/include
|
||||
LDFLAGS = -L$(NDK_DIR)/lib -pie -lvorbisidec -logg -lFLAC -lOpenSLES
|
||||
OBJ += player/openslPlayer.o
|
||||
|
||||
else ifeq ($(TARGET), OPENWRT)
|
||||
|
||||
STRIP = echo
|
||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||
LDFLAGS += -lasound -lvorbisidec -lavahi-client -lavahi-common -latomic
|
||||
OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_OGG -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||
LDFLAGS = -lasound -lvorbisidec -logg -lFLAC -lavahi-client -lavahi-common -latomic
|
||||
OBJ += player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||
|
||||
else ifeq ($(TARGET), BUILDROOT)
|
||||
|
||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||
LDFLAGS += -lasound -lvorbisidec -lavahi-client -lavahi-common -latomic
|
||||
OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_OGG -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||
LDFLAGS += -lasound -lvorbisidec -logg -lFLAC -lavahi-client -lavahi-common -latomic
|
||||
OBJ += player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||
|
||||
else ifeq ($(TARGET), MACOS)
|
||||
|
||||
CXX = g++
|
||||
STRIP = strip
|
||||
CXXFLAGS += -DHAS_OGG -DHAS_COREAUDIO -DFREEBSD -DHAS_BONJOUR -DHAS_DAEMON -I/usr/local/include -Wno-unused-local-typedef -Wno-deprecated
|
||||
LDFLAGS += -lvorbis -lFLAC -L/usr/local/lib -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework IOKit
|
||||
OBJ += ../common/daemon.o player/coreAudioPlayer.o browseZeroConf/browseBonjour.o
|
||||
CXXFLAGS += -DHAS_OGG -DHAS_VORBIS -DHAS_COREAUDIO -DFREEBSD -DMACOS -DHAS_BONJOUR -DHAS_DAEMON -I/usr/local/include -Wno-unused-local-typedef -Wno-deprecated
|
||||
LDFLAGS = -logg -lvorbis -lFLAC -L/usr/local/lib -framework AudioToolbox -framework CoreFoundation
|
||||
OBJ += player/coreAudioPlayer.o browseZeroConf/browseBonjour.o
|
||||
|
||||
else
|
||||
|
||||
CXX = g++
|
||||
STRIP = strip
|
||||
CXXFLAGS += -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||
LDFLAGS += -lrt -lasound -lvorbis -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -latomic
|
||||
OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||
CXXFLAGS += -pthread -DHAS_OGG -DHAS_VORBIS -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||
LDFLAGS = -lrt -lasound -logg -lvorbis -lFLAC -lavahi-client -lavahi-common -static-libgcc -static-libstdc++
|
||||
OBJ += player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
#include "controller.h"
|
||||
#if defined(HAS_OGG) || defined(HAS_TREMOR)
|
||||
#if defined(HAS_OGG) && (defined(HAS_TREMOR) || defined(HAS_VORBIS))
|
||||
#include "decoder/oggDecoder.h"
|
||||
#endif
|
||||
#include "decoder/pcmDecoder.h"
|
||||
|
@ -106,7 +106,7 @@ void Controller::onMessageReceived(ClientConnection* connection, const msg::Base
|
|||
|
||||
if (headerChunk_->codec == "pcm")
|
||||
decoder_.reset(new PcmDecoder());
|
||||
#if defined(HAS_OGG) || defined(HAS_TREMOR)
|
||||
#if defined(HAS_OGG) && (defined(HAS_TREMOR) || defined(HAS_VORBIS))
|
||||
else if (headerChunk_->codec == "ogg")
|
||||
decoder_.reset(new OggDecoder());
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue