Misc. Tweaks

This commit is contained in:
Rui Pinheiro 2018-12-26 23:12:21 +00:00 committed by kd-11
parent 650bc0c1f2
commit 48db0430d4
3 changed files with 7 additions and 7 deletions

View file

@ -15,10 +15,10 @@ class AudioBackend
public: public:
enum Capabilities : u32 enum Capabilities : u32
{ {
PLAY_PAUSE_FLUSH = 0x1, // AddData implements Play, Pause, Flush PLAY_PAUSE_FLUSH = 0x1, // Implements Play, Pause, Flush
IS_PLAYING = 0x2, // Implements IsPlaying method IS_PLAYING = 0x2, // Implements IsPlaying
GET_NUM_ENQUEUED_SAMPLES = 0x4, // Supports GetNumEnqueuedSamples method GET_NUM_ENQUEUED_SAMPLES = 0x4, // Implements GetNumEnqueuedSamples
SET_FREQUENCY_RATIO = 0x8, // Implements SetFrequencyRatio method SET_FREQUENCY_RATIO = 0x8, // Implements SetFrequencyRatio
}; };
virtual ~AudioBackend() = default; virtual ~AudioBackend() = default;

View file

@ -182,9 +182,9 @@ struct cell_audio_config
/* /*
* Buffering * Buffering
*/ */
const u64 desired_buffer_duration = g_cfg.audio.enable_buffering ? g_cfg.audio.desired_buffer_duration : 0; const u64 desired_buffer_duration = g_cfg.audio.desired_buffer_duration * 1000llu;
private: private:
const bool raw_buffering_enabled = g_cfg.audio.enable_buffering && (desired_buffer_duration >= audio_block_period); const bool raw_buffering_enabled = static_cast<bool>(g_cfg.audio.enable_buffering);
public: public:
// We need a non-blocking backend (implementing play/pause/flush) to be able to do buffering correctly // We need a non-blocking backend (implementing play/pause/flush) to be able to do buffering correctly
// We also need to be able to query the current playing state // We also need to be able to query the current playing state

View file

@ -529,7 +529,7 @@ struct cfg_root : cfg::node
cfg::_int<1, 128> startt{this, "Start Threshold", 1}; // TODO: used only by ALSA, should probably be removed once ALSA is upgraded cfg::_int<1, 128> startt{this, "Start Threshold", 1}; // TODO: used only by ALSA, should probably be removed once ALSA is upgraded
cfg::_int<0, 200> volume{this, "Master Volume", 100}; cfg::_int<0, 200> volume{this, "Master Volume", 100};
cfg::_bool enable_buffering{this, "Enable Buffering", true}; cfg::_bool enable_buffering{this, "Enable Buffering", true};
cfg::_int <0, 250'000> desired_buffer_duration{this, "Desired Audio Buffer Duration", 100'000}; cfg::_int <20, 250> desired_buffer_duration{this, "Desired Audio Buffer Duration", 100};
cfg::_int<1, 1000> sampling_period_multiplier{this, "Sampling Period Multiplier", 100}; cfg::_int<1, 1000> sampling_period_multiplier{this, "Sampling Period Multiplier", 100};
cfg::_bool enable_time_stretching{this, "Enable Time Stretching", false}; cfg::_bool enable_time_stretching{this, "Enable Time Stretching", false};
cfg::_int<0, 100> time_stretching_threshold{this, "Time Stretching Threshold", 75}; cfg::_int<0, 100> time_stretching_threshold{this, "Time Stretching Threshold", 75};