mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-09 04:37:39 +02:00
removed trailing whitespaces
This commit is contained in:
parent
fa65490192
commit
043f76e35e
9 changed files with 12 additions and 12 deletions
|
@ -123,7 +123,7 @@ void CoreAudioPlayer::worker()
|
||||||
logE << "CoreAudioPlayer::worker\n";
|
logE << "CoreAudioPlayer::worker\n";
|
||||||
AudioQueueCreateTimeline(queue, &timeLine_);
|
AudioQueueCreateTimeline(queue, &timeLine_);
|
||||||
AudioQueueStart(queue, NULL);
|
AudioQueueStart(queue, NULL);
|
||||||
CFRunLoopRun();
|
CFRunLoopRun();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ static std::string getMacAddress(int sock)
|
||||||
char mac[19];
|
char mac[19];
|
||||||
sprintf(mac, "%02x:%02x:%02x:%02x:%02x:%02x", *ptr, *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4), *(ptr+5));
|
sprintf(mac, "%02x:%02x:%02x:%02x:%02x:%02x", *ptr, *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4), *(ptr+5));
|
||||||
if (strcmp(mac, "00:00:00:00:00:00") == 0)
|
if (strcmp(mac, "00:00:00:00:00:00") == 0)
|
||||||
continue;
|
continue;
|
||||||
freeifaddrs(ifap);
|
freeifaddrs(ifap);
|
||||||
return mac;
|
return mac;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ struct tv
|
||||||
namespace msg
|
namespace msg
|
||||||
{
|
{
|
||||||
|
|
||||||
const size_t max_size = 1000000;
|
const size_t max_size = 1000000;
|
||||||
|
|
||||||
struct BaseMessage
|
struct BaseMessage
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,19 +81,19 @@ void FlacEncoder::encode(const msg::PcmChunk* chunk)
|
||||||
|
|
||||||
if (sampleFormat_.sampleSize == 1)
|
if (sampleFormat_.sampleSize == 1)
|
||||||
{
|
{
|
||||||
FLAC__int8* buffer = (FLAC__int8*)chunk->payload;
|
FLAC__int8* buffer = (FLAC__int8*)chunk->payload;
|
||||||
for(int i=0; i<samples; i++)
|
for(int i=0; i<samples; i++)
|
||||||
pcmBuffer_[i] = (FLAC__int32)(buffer[i]);
|
pcmBuffer_[i] = (FLAC__int32)(buffer[i]);
|
||||||
}
|
}
|
||||||
else if (sampleFormat_.sampleSize == 2)
|
else if (sampleFormat_.sampleSize == 2)
|
||||||
{
|
{
|
||||||
FLAC__int16* buffer = (FLAC__int16*)chunk->payload;
|
FLAC__int16* buffer = (FLAC__int16*)chunk->payload;
|
||||||
for(int i=0; i<samples; i++)
|
for(int i=0; i<samples; i++)
|
||||||
pcmBuffer_[i] = (FLAC__int32)(buffer[i]);
|
pcmBuffer_[i] = (FLAC__int32)(buffer[i]);
|
||||||
}
|
}
|
||||||
else if (sampleFormat_.sampleSize == 4)
|
else if (sampleFormat_.sampleSize == 4)
|
||||||
{
|
{
|
||||||
FLAC__int32* buffer = (FLAC__int32*)chunk->payload;
|
FLAC__int32* buffer = (FLAC__int32*)chunk->payload;
|
||||||
for(int i=0; i<samples; i++)
|
for(int i=0; i<samples; i++)
|
||||||
pcmBuffer_[i] = (FLAC__int32)(buffer[i]);
|
pcmBuffer_[i] = (FLAC__int32)(buffer[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,13 +69,13 @@ void OggEncoder::encode(const msg::PcmChunk* chunk)
|
||||||
}
|
}
|
||||||
else if (sampleFormat_.sampleSize == 2)
|
else if (sampleFormat_.sampleSize == 2)
|
||||||
{
|
{
|
||||||
int16_t* chunkBuffer = (int16_t*)chunk->payload;
|
int16_t* chunkBuffer = (int16_t*)chunk->payload;
|
||||||
for (int i=0; i<frames; i++)
|
for (int i=0; i<frames; i++)
|
||||||
buffer[channel][i]= chunkBuffer[sampleFormat_.channels*i + channel] / 32768.f;
|
buffer[channel][i]= chunkBuffer[sampleFormat_.channels*i + channel] / 32768.f;
|
||||||
}
|
}
|
||||||
else if (sampleFormat_.sampleSize == 4)
|
else if (sampleFormat_.sampleSize == 4)
|
||||||
{
|
{
|
||||||
int32_t* chunkBuffer = (int32_t*)chunk->payload;
|
int32_t* chunkBuffer = (int32_t*)chunk->payload;
|
||||||
for (int i=0; i<frames; i++)
|
for (int i=0; i<frames; i++)
|
||||||
buffer[channel][i]= chunkBuffer[sampleFormat_.channels*i + channel] / 2147483648.f;
|
buffer[channel][i]= chunkBuffer[sampleFormat_.channels*i + channel] / 2147483648.f;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ void PublishBonjour::worker()
|
||||||
DNSServiceErrorType err = DNSServiceProcessResult(clients[n]);
|
DNSServiceErrorType err = DNSServiceProcessResult(clients[n]);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
logE << "DNSServiceProcessResult returned " << err << "\n";
|
logE << "DNSServiceProcessResult returned " << err << "\n";
|
||||||
active_ = false;
|
active_ = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ ProcessStream::~ProcessStream()
|
||||||
bool ProcessStream::fileExists(const std::string& filename)
|
bool ProcessStream::fileExists(const std::string& filename)
|
||||||
{
|
{
|
||||||
struct stat buffer;
|
struct stat buffer;
|
||||||
return (stat(filename.c_str(), &buffer) == 0);
|
return (stat(filename.c_str(), &buffer) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string exe_;
|
std::string exe_;
|
||||||
std::string path_;
|
std::string path_;
|
||||||
std::string params_;
|
std::string params_;
|
||||||
std::unique_ptr<Process> process_;
|
std::unique_ptr<Process> process_;
|
||||||
std::thread stderrReaderThread_;
|
std::thread stderrReaderThread_;
|
||||||
|
|
|
@ -54,7 +54,7 @@ PcmStreamPtr StreamManager::addStream(const std::string& uri)
|
||||||
|
|
||||||
// for (auto kv: streamUri.query)
|
// for (auto kv: streamUri.query)
|
||||||
// logD << "key: '" << kv.first << "' value: '" << kv.second << "'\n";
|
// logD << "key: '" << kv.first << "' value: '" << kv.second << "'\n";
|
||||||
PcmStreamPtr stream(nullptr);
|
PcmStreamPtr stream(nullptr);
|
||||||
|
|
||||||
if (streamUri.scheme == "pipe")
|
if (streamUri.scheme == "pipe")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue