<commit_before>/*
 * MpdAudioSource.cpp
 *
 * Created on: Jul 30, 2015
 *     Author: dpayne
 */

#include "Source/MpdAudioSource.h"
#include "Utils/Logger.h"
#include <string.h>
#include <iostream>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>

namespace
{
static const int32_t k_read_attempts = 100;
static const int64_t k_read_attempt_sleep_interval_nanosecs =
    1L * 1000000L; // 1 millisecond
static struct timespec k_read_attempt_sleep_timespec = {
    0, k_read_attempt_sleep_interval_nanosecs};
}

vis::MpdAudioSource::MpdAudioSource(const Settings *const settings)
    : m_settings{settings}
{
    open_mpd_fifo();
}
<commit_msg>Fixed build on linux<commit_after>/*
 * MpdAudioSource.cpp
 *
 * Created on: Jul 30, 2015
 *     Author: dpayne
 */

#include "Source/MpdAudioSource.h"
#include "Utils/Logger.h"
#include <string.h>
#include <iostream>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>

#ifdef _LINUX
#include <unistd.h>
#endif

namespace
{
static const int32_t k_read_attempts = 100;
static const int64_t k_read_attempt_sleep_interval_nanosecs =
    1L * 1000000L; // 1 millisecond
static struct timespec k_read_attempt_sleep_timespec = {
    0, k_read_attempt_sleep_interval_nanosecs};
}

vis::MpdAudioSource::MpdAudioSource(const Settings *const settings)
    : m_settings{settings}
{
    open_mpd_fifo();
}

{'fraction_non_alphanumeric': 0.11689237348538846, 'fraction_numerical': 0.03278688524590164, 'mean_word_length': 5.0257510729613735, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3195823', 'n_tokens_mistral': 571, 'n_tokens_neox': 523, 'n_words': 110}