Reformat all the things!

This commit is contained in:
spycrab
2018-04-12 14:18:04 +02:00
parent d27e85e9d7
commit 40bb9974f2
179 changed files with 1888 additions and 991 deletions

View File

@ -186,8 +186,9 @@ bool AlsaSound::AlsaInit()
// it is probably a bad idea to try to send more than one buffer of data
if ((unsigned int)frames_to_deliver > buffer_size)
frames_to_deliver = buffer_size;
NOTICE_LOG(AUDIO, "ALSA gave us a %ld sample \"hardware\" buffer with %d periods. Will send %d "
"samples per fragments.",
NOTICE_LOG(AUDIO,
"ALSA gave us a %ld sample \"hardware\" buffer with %d periods. Will send %d "
"samples per fragments.",
buffer_size, periods, frames_to_deliver);
snd_pcm_sw_params_alloca(&swparams);

View File

@ -29,6 +29,7 @@ public:
bool SetRunning(bool running) override;
static bool isValid() { return true; }
private:
// maximum number of frames the buffer can hold
static constexpr size_t BUFFER_SIZE_MAX = 8192;

View File

@ -44,6 +44,7 @@ public:
float GetCurrentSpeed() const { return m_speed.load(); }
void UpdateSpeed(float val) { m_speed.store(val); }
private:
static constexpr u32 MAX_SAMPLES = 1024 * 4; // 128 ms
static constexpr u32 INDEX_MASK = MAX_SAMPLES * 2 - 1;

View File

@ -17,6 +17,7 @@ public:
bool Init() override;
bool SetRunning(bool running) override { return running; }
static bool isValid() { return true; }
private:
std::thread thread;
Common::Event soundSyncEvent;

View File

@ -37,6 +37,7 @@ public:
void SetSkipSilence(bool skip) { skip_silence = skip; }
void AddStereoSamplesBE(const short* sample_data, u32 count, int sample_rate); // big endian
u32 GetAudioSize() const { return audio_size; }
private:
static constexpr size_t BUFFER_SIZE = 32 * 1024;