mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-19 03:56: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)
|
ifeq ($(TARGET), ANDROID)
|
||||||
|
|
||||||
CXX = $(PROGRAM_PREFIX)clang++
|
CXX = $(NDK_DIR)/bin/arm-linux-androideabi-g++
|
||||||
STRIP = $(PROGRAM_PREFIX)strip
|
STRIP = $(NDK_DIR)/bin/arm-linux-androideabi-strip
|
||||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -fPIC -DHAS_TREMOR -DHAS_OPENSL -I$(NDK_DIR)/include
|
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 -latomic -llog
|
LDFLAGS = -L$(NDK_DIR)/lib -pie -lvorbisidec -logg -lFLAC -lOpenSLES
|
||||||
OBJ += player/openslPlayer.o
|
OBJ += player/openslPlayer.o
|
||||||
|
|
||||||
else ifeq ($(TARGET), OPENWRT)
|
else ifeq ($(TARGET), OPENWRT)
|
||||||
|
|
||||||
STRIP = echo
|
STRIP = echo
|
||||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_OGG -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||||
LDFLAGS += -lasound -lvorbisidec -lavahi-client -lavahi-common -latomic
|
LDFLAGS = -lasound -lvorbisidec -logg -lFLAC -lavahi-client -lavahi-common -latomic
|
||||||
OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
OBJ += player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||||
|
|
||||||
else ifeq ($(TARGET), BUILDROOT)
|
else ifeq ($(TARGET), BUILDROOT)
|
||||||
|
|
||||||
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
CXXFLAGS += -pthread -DNO_CPP11_STRING -DHAS_OGG -DHAS_TREMOR -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||||
LDFLAGS += -lasound -lvorbisidec -lavahi-client -lavahi-common -latomic
|
LDFLAGS += -lasound -lvorbisidec -logg -lFLAC -lavahi-client -lavahi-common -latomic
|
||||||
OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
OBJ += player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||||
|
|
||||||
else ifeq ($(TARGET), MACOS)
|
else ifeq ($(TARGET), MACOS)
|
||||||
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
STRIP = strip
|
STRIP = strip
|
||||||
CXXFLAGS += -DHAS_OGG -DHAS_COREAUDIO -DFREEBSD -DHAS_BONJOUR -DHAS_DAEMON -I/usr/local/include -Wno-unused-local-typedef -Wno-deprecated
|
CXXFLAGS += -DHAS_OGG -DHAS_VORBIS -DHAS_COREAUDIO -DFREEBSD -DMACOS -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
|
LDFLAGS = -logg -lvorbis -lFLAC -L/usr/local/lib -framework AudioToolbox -framework CoreFoundation
|
||||||
OBJ += ../common/daemon.o player/coreAudioPlayer.o browseZeroConf/browseBonjour.o
|
OBJ += player/coreAudioPlayer.o browseZeroConf/browseBonjour.o
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
STRIP = strip
|
STRIP = strip
|
||||||
CXXFLAGS += -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
CXXFLAGS += -pthread -DHAS_OGG -DHAS_VORBIS -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||||
LDFLAGS += -lrt -lasound -lvorbis -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -latomic
|
LDFLAGS = -lrt -lasound -logg -lvorbis -lFLAC -lavahi-client -lavahi-common -static-libgcc -static-libstdc++
|
||||||
OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
OBJ += player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#if defined(HAS_OGG) || defined(HAS_TREMOR)
|
#if defined(HAS_OGG) && (defined(HAS_TREMOR) || defined(HAS_VORBIS))
|
||||||
#include "decoder/oggDecoder.h"
|
#include "decoder/oggDecoder.h"
|
||||||
#endif
|
#endif
|
||||||
#include "decoder/pcmDecoder.h"
|
#include "decoder/pcmDecoder.h"
|
||||||
|
@ -106,7 +106,7 @@ void Controller::onMessageReceived(ClientConnection* connection, const msg::Base
|
||||||
|
|
||||||
if (headerChunk_->codec == "pcm")
|
if (headerChunk_->codec == "pcm")
|
||||||
decoder_.reset(new PcmDecoder());
|
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")
|
else if (headerChunk_->codec == "ogg")
|
||||||
decoder_.reset(new OggDecoder());
|
decoder_.reset(new OggDecoder());
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue