mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-08 05:41:46 +02:00
Allow building server and client without FLAC support
Allows building the server and the client without FLAC support: ``` readelf -d ./bin/snapserver | grep NEEDED 0x00000001 (NEEDED) Shared library: [libjsonrpcpp.so] 0x00000001 (NEEDED) Shared library: [libavahi-common.so.3] 0x00000001 (NEEDED) Shared library: [libavahi-client.so.3] 0x00000001 (NEEDED) Shared library: [libstdc++.so.6] 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x00000001 (NEEDED) Shared library: [libc.so] ``` Note, that the current client and server Makefiles always enable FLAC support.
This commit is contained in:
parent
a5ffa356fe
commit
9abeac8365
3 changed files with 13 additions and 5 deletions
|
@ -21,6 +21,7 @@
|
|||
#if defined(HAS_OGG) && defined(HAS_VORBIS) && defined(HAS_VORBIS_ENC)
|
||||
#include "oggEncoder.h"
|
||||
#endif
|
||||
#if defined(HAS_FLAC)
|
||||
#include "flacEncoder.h"
|
||||
#include "common/utils/string_utils.h"
|
||||
#include "common/snapException.h"
|
||||
|
@ -46,8 +47,10 @@ Encoder* EncoderFactory::createEncoder(const std::string& codecSettings) const
|
|||
else if (codec == "ogg")
|
||||
encoder = new OggEncoder(codecOptions);
|
||||
#endif
|
||||
#if defined(HAS_FLAC)
|
||||
else if (codec == "flac")
|
||||
encoder = new FlacEncoder(codecOptions);
|
||||
#endif
|
||||
else
|
||||
{
|
||||
throw SnapException("unknown codec: " + codec);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue