audio_core: Migrate logging macros

Follow-up of #3533

Replace prefix of all logging macros from LOG to NGLOG
This commit is contained in:
Daniel Lim Wee Soong 2018-03-24 21:35:44 +08:00
parent 327ad8bcce
commit 693b190274
6 changed files with 67 additions and 67 deletions

View file

@ -84,21 +84,21 @@ std::vector<u8> DspHle::Impl::PipeRead(DspPipe pipe_number, u32 length) {
const size_t pipe_index = static_cast<size_t>(pipe_number); const size_t pipe_index = static_cast<size_t>(pipe_number);
if (pipe_index >= num_dsp_pipe) { if (pipe_index >= num_dsp_pipe) {
LOG_ERROR(Audio_DSP, "pipe_number = %zu invalid", pipe_index); NGLOG_ERROR(Audio_DSP, "pipe_number = {} invalid", pipe_index);
return {}; return {};
} }
if (length > UINT16_MAX) { // Can only read at most UINT16_MAX from the pipe if (length > UINT16_MAX) { // Can only read at most UINT16_MAX from the pipe
LOG_ERROR(Audio_DSP, "length of %u greater than max of %u", length, UINT16_MAX); NGLOG_ERROR(Audio_DSP, "length of {} greater than max of {}", length, UINT16_MAX);
return {}; return {};
} }
std::vector<u8>& data = pipe_data[pipe_index]; std::vector<u8>& data = pipe_data[pipe_index];
if (length > data.size()) { if (length > data.size()) {
LOG_WARNING( NGLOG_WARNING(
Audio_DSP, Audio_DSP,
"pipe_number = %zu is out of data, application requested read of %u but %zu remain", "pipe_number = {} is out of data, application requested read of {} but {} remain",
pipe_index, length, data.size()); pipe_index, length, data.size());
length = static_cast<u32>(data.size()); length = static_cast<u32>(data.size());
} }
@ -115,7 +115,7 @@ size_t DspHle::Impl::GetPipeReadableSize(DspPipe pipe_number) const {
const size_t pipe_index = static_cast<size_t>(pipe_number); const size_t pipe_index = static_cast<size_t>(pipe_number);
if (pipe_index >= num_dsp_pipe) { if (pipe_index >= num_dsp_pipe) {
LOG_ERROR(Audio_DSP, "pipe_number = %zu invalid", pipe_index); NGLOG_ERROR(Audio_DSP, "pipe_number = {} invalid", pipe_index);
return 0; return 0;
} }
@ -126,8 +126,8 @@ void DspHle::Impl::PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer)
switch (pipe_number) { switch (pipe_number) {
case DspPipe::Audio: { case DspPipe::Audio: {
if (buffer.size() != 4) { if (buffer.size() != 4) {
LOG_ERROR(Audio_DSP, "DspPipe::Audio: Unexpected buffer length %zu was written", NGLOG_ERROR(Audio_DSP, "DspPipe::Audio: Unexpected buffer length {} was written",
buffer.size()); buffer.size());
return; return;
} }
@ -146,30 +146,30 @@ void DspHle::Impl::PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer)
switch (static_cast<StateChange>(buffer[0])) { switch (static_cast<StateChange>(buffer[0])) {
case StateChange::Initialize: case StateChange::Initialize:
LOG_INFO(Audio_DSP, "Application has requested initialization of DSP hardware"); NGLOG_INFO(Audio_DSP, "Application has requested initialization of DSP hardware");
ResetPipes(); ResetPipes();
AudioPipeWriteStructAddresses(); AudioPipeWriteStructAddresses();
dsp_state = DspState::On; dsp_state = DspState::On;
break; break;
case StateChange::Shutdown: case StateChange::Shutdown:
LOG_INFO(Audio_DSP, "Application has requested shutdown of DSP hardware"); NGLOG_INFO(Audio_DSP, "Application has requested shutdown of DSP hardware");
dsp_state = DspState::Off; dsp_state = DspState::Off;
break; break;
case StateChange::Wakeup: case StateChange::Wakeup:
LOG_INFO(Audio_DSP, "Application has requested wakeup of DSP hardware"); NGLOG_INFO(Audio_DSP, "Application has requested wakeup of DSP hardware");
ResetPipes(); ResetPipes();
AudioPipeWriteStructAddresses(); AudioPipeWriteStructAddresses();
dsp_state = DspState::On; dsp_state = DspState::On;
break; break;
case StateChange::Sleep: case StateChange::Sleep:
LOG_INFO(Audio_DSP, "Application has requested sleep of DSP hardware"); NGLOG_INFO(Audio_DSP, "Application has requested sleep of DSP hardware");
UNIMPLEMENTED(); UNIMPLEMENTED();
dsp_state = DspState::Sleeping; dsp_state = DspState::Sleeping;
break; break;
default: default:
LOG_ERROR(Audio_DSP, NGLOG_ERROR(Audio_DSP,
"Application has requested unknown state transition of DSP hardware %hhu", "Application has requested unknown state transition of DSP hardware {}",
buffer[0]); buffer[0]);
dsp_state = DspState::Off; dsp_state = DspState::Off;
break; break;
} }
@ -177,8 +177,8 @@ void DspHle::Impl::PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer)
return; return;
} }
default: default:
LOG_CRITICAL(Audio_DSP, "pipe_number = %zu unimplemented", NGLOG_CRITICAL(Audio_DSP, "pipe_number = {} unimplemented",
static_cast<size_t>(pipe_number)); static_cast<size_t>(pipe_number));
UNIMPLEMENTED(); UNIMPLEMENTED();
return; return;
} }

View file

@ -38,49 +38,49 @@ void Mixers::ParseConfig(DspConfiguration& config) {
if (config.mixer1_enabled_dirty) { if (config.mixer1_enabled_dirty) {
config.mixer1_enabled_dirty.Assign(0); config.mixer1_enabled_dirty.Assign(0);
state.mixer1_enabled = config.mixer1_enabled != 0; state.mixer1_enabled = config.mixer1_enabled != 0;
LOG_TRACE(Audio_DSP, "mixers mixer1_enabled = %hu", config.mixer1_enabled); NGLOG_TRACE(Audio_DSP, "mixers mixer1_enabled = {}", config.mixer1_enabled);
} }
if (config.mixer2_enabled_dirty) { if (config.mixer2_enabled_dirty) {
config.mixer2_enabled_dirty.Assign(0); config.mixer2_enabled_dirty.Assign(0);
state.mixer2_enabled = config.mixer2_enabled != 0; state.mixer2_enabled = config.mixer2_enabled != 0;
LOG_TRACE(Audio_DSP, "mixers mixer2_enabled = %hu", config.mixer2_enabled); NGLOG_TRACE(Audio_DSP, "mixers mixer2_enabled = {}", config.mixer2_enabled);
} }
if (config.volume_0_dirty) { if (config.volume_0_dirty) {
config.volume_0_dirty.Assign(0); config.volume_0_dirty.Assign(0);
state.intermediate_mixer_volume[0] = config.volume[0]; state.intermediate_mixer_volume[0] = config.volume[0];
LOG_TRACE(Audio_DSP, "mixers volume[0] = %f", config.volume[0]); NGLOG_TRACE(Audio_DSP, "mixers volume[0] = {}", config.volume[0]);
} }
if (config.volume_1_dirty) { if (config.volume_1_dirty) {
config.volume_1_dirty.Assign(0); config.volume_1_dirty.Assign(0);
state.intermediate_mixer_volume[1] = config.volume[1]; state.intermediate_mixer_volume[1] = config.volume[1];
LOG_TRACE(Audio_DSP, "mixers volume[1] = %f", config.volume[1]); NGLOG_TRACE(Audio_DSP, "mixers volume[1] = {}", config.volume[1]);
} }
if (config.volume_2_dirty) { if (config.volume_2_dirty) {
config.volume_2_dirty.Assign(0); config.volume_2_dirty.Assign(0);
state.intermediate_mixer_volume[2] = config.volume[2]; state.intermediate_mixer_volume[2] = config.volume[2];
LOG_TRACE(Audio_DSP, "mixers volume[2] = %f", config.volume[2]); NGLOG_TRACE(Audio_DSP, "mixers volume[2] = {}", config.volume[2]);
} }
if (config.output_format_dirty) { if (config.output_format_dirty) {
config.output_format_dirty.Assign(0); config.output_format_dirty.Assign(0);
state.output_format = config.output_format; state.output_format = config.output_format;
LOG_TRACE(Audio_DSP, "mixers output_format = %zu", NGLOG_TRACE(Audio_DSP, "mixers output_format = {}",
static_cast<size_t>(config.output_format)); static_cast<size_t>(config.output_format));
} }
if (config.headphones_connected_dirty) { if (config.headphones_connected_dirty) {
config.headphones_connected_dirty.Assign(0); config.headphones_connected_dirty.Assign(0);
// Do nothing. (Note: Whether headphones are connected does affect coefficients used for // Do nothing. (Note: Whether headphones are connected does affect coefficients used for
// surround sound.) // surround sound.)
LOG_TRACE(Audio_DSP, "mixers headphones_connected=%hu", config.headphones_connected); NGLOG_TRACE(Audio_DSP, "mixers headphones_connected={}", config.headphones_connected);
} }
if (config.dirty_raw) { if (config.dirty_raw) {
LOG_DEBUG(Audio_DSP, "mixers remaining_dirty=%x", config.dirty_raw); NGLOG_DEBUG(Audio_DSP, "mixers remaining_dirty={}", config.dirty_raw);
} }
config.dirty_raw = 0; config.dirty_raw = 0;
@ -132,7 +132,7 @@ void Mixers::DownmixAndMixIntoCurrentFrame(float gain, const QuadFrame32& sample
return; return;
} }
UNREACHABLE_MSG("Invalid output_format %zu", static_cast<size_t>(state.output_format)); UNREACHABLE_MSG("Invalid output_format {}", static_cast<size_t>(state.output_format));
} }
void Mixers::AuxReturn(const IntermediateMixSamples& read_samples) { void Mixers::AuxReturn(const IntermediateMixSamples& read_samples) {

View file

@ -54,35 +54,35 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
if (config.reset_flag) { if (config.reset_flag) {
config.reset_flag.Assign(0); config.reset_flag.Assign(0);
Reset(); Reset();
LOG_TRACE(Audio_DSP, "source_id=%zu reset", source_id); NGLOG_TRACE(Audio_DSP, "source_id={} reset", source_id);
} }
if (config.partial_reset_flag) { if (config.partial_reset_flag) {
config.partial_reset_flag.Assign(0); config.partial_reset_flag.Assign(0);
state.input_queue = std::priority_queue<Buffer, std::vector<Buffer>, BufferOrder>{}; state.input_queue = std::priority_queue<Buffer, std::vector<Buffer>, BufferOrder>{};
LOG_TRACE(Audio_DSP, "source_id=%zu partial_reset", source_id); NGLOG_TRACE(Audio_DSP, "source_id={} partial_reset", source_id);
} }
if (config.enable_dirty) { if (config.enable_dirty) {
config.enable_dirty.Assign(0); config.enable_dirty.Assign(0);
state.enabled = config.enable != 0; state.enabled = config.enable != 0;
LOG_TRACE(Audio_DSP, "source_id=%zu enable=%d", source_id, state.enabled); NGLOG_TRACE(Audio_DSP, "source_id={} enable={}", source_id, state.enabled);
} }
if (config.sync_dirty) { if (config.sync_dirty) {
config.sync_dirty.Assign(0); config.sync_dirty.Assign(0);
state.sync = config.sync; state.sync = config.sync;
LOG_TRACE(Audio_DSP, "source_id=%zu sync=%u", source_id, state.sync); NGLOG_TRACE(Audio_DSP, "source_id={} sync={}", source_id, state.sync);
} }
if (config.rate_multiplier_dirty) { if (config.rate_multiplier_dirty) {
config.rate_multiplier_dirty.Assign(0); config.rate_multiplier_dirty.Assign(0);
state.rate_multiplier = config.rate_multiplier; state.rate_multiplier = config.rate_multiplier;
LOG_TRACE(Audio_DSP, "source_id=%zu rate=%f", source_id, state.rate_multiplier); NGLOG_TRACE(Audio_DSP, "source_id={} rate={}", source_id, state.rate_multiplier);
if (state.rate_multiplier <= 0) { if (state.rate_multiplier <= 0) {
LOG_ERROR(Audio_DSP, "Was given an invalid rate multiplier: source_id=%zu rate=%f", NGLOG_ERROR(Audio_DSP, "Was given an invalid rate multiplier: source_id={} rate={}",
source_id, state.rate_multiplier); source_id, state.rate_multiplier);
state.rate_multiplier = 1.0f; state.rate_multiplier = 1.0f;
// Note: Actual firmware starts producing garbage if this occurs. // Note: Actual firmware starts producing garbage if this occurs.
} }
@ -93,69 +93,69 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
std::transform(adpcm_coeffs, adpcm_coeffs + state.adpcm_coeffs.size(), std::transform(adpcm_coeffs, adpcm_coeffs + state.adpcm_coeffs.size(),
state.adpcm_coeffs.begin(), state.adpcm_coeffs.begin(),
[](const auto& coeff) { return static_cast<s16>(coeff); }); [](const auto& coeff) { return static_cast<s16>(coeff); });
LOG_TRACE(Audio_DSP, "source_id=%zu adpcm update", source_id); NGLOG_TRACE(Audio_DSP, "source_id={} adpcm update", source_id);
} }
if (config.gain_0_dirty) { if (config.gain_0_dirty) {
config.gain_0_dirty.Assign(0); config.gain_0_dirty.Assign(0);
std::transform(config.gain[0], config.gain[0] + state.gain[0].size(), state.gain[0].begin(), std::transform(config.gain[0], config.gain[0] + state.gain[0].size(), state.gain[0].begin(),
[](const auto& coeff) { return static_cast<float>(coeff); }); [](const auto& coeff) { return static_cast<float>(coeff); });
LOG_TRACE(Audio_DSP, "source_id=%zu gain 0 update", source_id); NGLOG_TRACE(Audio_DSP, "source_id={} gain 0 update", source_id);
} }
if (config.gain_1_dirty) { if (config.gain_1_dirty) {
config.gain_1_dirty.Assign(0); config.gain_1_dirty.Assign(0);
std::transform(config.gain[1], config.gain[1] + state.gain[1].size(), state.gain[1].begin(), std::transform(config.gain[1], config.gain[1] + state.gain[1].size(), state.gain[1].begin(),
[](const auto& coeff) { return static_cast<float>(coeff); }); [](const auto& coeff) { return static_cast<float>(coeff); });
LOG_TRACE(Audio_DSP, "source_id=%zu gain 1 update", source_id); NGLOG_TRACE(Audio_DSP, "source_id={} gain 1 update", source_id);
} }
if (config.gain_2_dirty) { if (config.gain_2_dirty) {
config.gain_2_dirty.Assign(0); config.gain_2_dirty.Assign(0);
std::transform(config.gain[2], config.gain[2] + state.gain[2].size(), state.gain[2].begin(), std::transform(config.gain[2], config.gain[2] + state.gain[2].size(), state.gain[2].begin(),
[](const auto& coeff) { return static_cast<float>(coeff); }); [](const auto& coeff) { return static_cast<float>(coeff); });
LOG_TRACE(Audio_DSP, "source_id=%zu gain 2 update", source_id); NGLOG_TRACE(Audio_DSP, "source_id={} gain 2 update", source_id);
} }
if (config.filters_enabled_dirty) { if (config.filters_enabled_dirty) {
config.filters_enabled_dirty.Assign(0); config.filters_enabled_dirty.Assign(0);
state.filters.Enable(config.simple_filter_enabled.ToBool(), state.filters.Enable(config.simple_filter_enabled.ToBool(),
config.biquad_filter_enabled.ToBool()); config.biquad_filter_enabled.ToBool());
LOG_TRACE(Audio_DSP, "source_id=%zu enable_simple=%hu enable_biquad=%hu", source_id, NGLOG_TRACE(Audio_DSP, "source_id={} enable_simple={} enable_biquad={}", source_id,
config.simple_filter_enabled.Value(), config.biquad_filter_enabled.Value()); config.simple_filter_enabled.Value(), config.biquad_filter_enabled.Value());
} }
if (config.simple_filter_dirty) { if (config.simple_filter_dirty) {
config.simple_filter_dirty.Assign(0); config.simple_filter_dirty.Assign(0);
state.filters.Configure(config.simple_filter); state.filters.Configure(config.simple_filter);
LOG_TRACE(Audio_DSP, "source_id=%zu simple filter update", source_id); NGLOG_TRACE(Audio_DSP, "source_id={} simple filter update", source_id);
} }
if (config.biquad_filter_dirty) { if (config.biquad_filter_dirty) {
config.biquad_filter_dirty.Assign(0); config.biquad_filter_dirty.Assign(0);
state.filters.Configure(config.biquad_filter); state.filters.Configure(config.biquad_filter);
LOG_TRACE(Audio_DSP, "source_id=%zu biquad filter update", source_id); NGLOG_TRACE(Audio_DSP, "source_id={} biquad filter update", source_id);
} }
if (config.interpolation_dirty) { if (config.interpolation_dirty) {
config.interpolation_dirty.Assign(0); config.interpolation_dirty.Assign(0);
state.interpolation_mode = config.interpolation_mode; state.interpolation_mode = config.interpolation_mode;
LOG_TRACE(Audio_DSP, "source_id=%zu interpolation_mode=%zu", source_id, NGLOG_TRACE(Audio_DSP, "source_id={} interpolation_mode={}", source_id,
static_cast<size_t>(state.interpolation_mode)); static_cast<size_t>(state.interpolation_mode));
} }
if (config.format_dirty || config.embedded_buffer_dirty) { if (config.format_dirty || config.embedded_buffer_dirty) {
config.format_dirty.Assign(0); config.format_dirty.Assign(0);
state.format = config.format; state.format = config.format;
LOG_TRACE(Audio_DSP, "source_id=%zu format=%zu", source_id, NGLOG_TRACE(Audio_DSP, "source_id={} format={}", source_id,
static_cast<size_t>(state.format)); static_cast<size_t>(state.format));
} }
if (config.mono_or_stereo_dirty || config.embedded_buffer_dirty) { if (config.mono_or_stereo_dirty || config.embedded_buffer_dirty) {
config.mono_or_stereo_dirty.Assign(0); config.mono_or_stereo_dirty.Assign(0);
state.mono_or_stereo = config.mono_or_stereo; state.mono_or_stereo = config.mono_or_stereo;
LOG_TRACE(Audio_DSP, "source_id=%zu mono_or_stereo=%zu", source_id, NGLOG_TRACE(Audio_DSP, "source_id={} mono_or_stereo={}", source_id,
static_cast<size_t>(state.mono_or_stereo)); static_cast<size_t>(state.mono_or_stereo));
} }
u32_dsp play_position = {}; u32_dsp play_position = {};
@ -182,15 +182,15 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
play_position, play_position,
false, false,
}); });
LOG_TRACE(Audio_DSP, "enqueuing embedded addr=0x%08x len=%u id=%hu start=%u", NGLOG_TRACE(Audio_DSP, "enqueuing embedded addr={0:#010x} len={} id={} start={}",
config.physical_address, config.length, config.buffer_id, config.physical_address, config.length, config.buffer_id,
static_cast<u32>(config.play_position)); static_cast<u32>(config.play_position));
} }
if (config.loop_related_dirty && config.loop_related != 0) { if (config.loop_related_dirty && config.loop_related != 0) {
config.loop_related_dirty.Assign(0); config.loop_related_dirty.Assign(0);
LOG_WARNING(Audio_DSP, "Unhandled complex loop with loop_related=0x%08x", NGLOG_WARNING(Audio_DSP, "Unhandled complex loop with loop_related={0:#010x}",
static_cast<u32>(config.loop_related)); static_cast<u32>(config.loop_related));
} }
if (config.buffer_queue_dirty) { if (config.buffer_queue_dirty) {
@ -212,15 +212,15 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
{}, // 0 in u32_dsp {}, // 0 in u32_dsp
false, false,
}); });
LOG_TRACE(Audio_DSP, "enqueuing queued %zu addr=0x%08x len=%u id=%hu", i, NGLOG_TRACE(Audio_DSP, "enqueuing queued {} addr={0:#010x} len={} id={}", i,
b.physical_address, b.length, b.buffer_id); b.physical_address, b.length, b.buffer_id);
} }
} }
config.buffers_dirty = 0; config.buffers_dirty = 0;
} }
if (config.dirty_raw) { if (config.dirty_raw) {
LOG_DEBUG(Audio_DSP, "source_id=%zu remaining_dirty=%x", source_id, config.dirty_raw); NGLOG_DEBUG(Audio_DSP, "source_id={} remaining_dirty={}", source_id, config.dirty_raw);
} }
config.dirty_raw = 0; config.dirty_raw = 0;
@ -255,7 +255,7 @@ void Source::GenerateFrame() {
break; break;
case InterpolationMode::Polyphase: case InterpolationMode::Polyphase:
// TODO(merry): Implement polyphase interpolation // TODO(merry): Implement polyphase interpolation
LOG_DEBUG(Audio_DSP, "Polyphase interpolation unimplemented; falling back to linear"); NGLOG_DEBUG(Audio_DSP, "Polyphase interpolation unimplemented; falling back to linear");
AudioInterp::Linear(state.interp_state, state.current_buffer, state.rate_multiplier, AudioInterp::Linear(state.interp_state, state.current_buffer, state.rate_multiplier,
current_frame, frame_position); current_frame, frame_position);
break; break;
@ -304,9 +304,9 @@ bool Source::DequeueBuffer() {
break; break;
} }
} else { } else {
LOG_WARNING(Audio_DSP, NGLOG_WARNING(Audio_DSP,
"source_id=%zu buffer_id=%hu length=%u: Invalid physical address 0x%08X", "source_id={} buffer_id={} length={}: Invalid physical address {0:#010x}",
source_id, buf.buffer_id, buf.length, buf.physical_address); source_id, buf.buffer_id, buf.length, buf.physical_address);
state.current_buffer.clear(); state.current_buffer.clear();
return true; return true;
} }
@ -322,9 +322,9 @@ bool Source::DequeueBuffer() {
state.input_queue.push(buf); state.input_queue.push(buf);
} }
LOG_TRACE(Audio_DSP, "source_id=%zu buffer_id=%hu from_queue=%s current_buffer.size()=%zu", NGLOG_TRACE(Audio_DSP, "source_id={} buffer_id={} from_queue={} current_buffer.size()={}",
source_id, buf.buffer_id, buf.from_queue ? "true" : "false", source_id, buf.buffer_id, buf.from_queue ? "true" : "false",
state.current_buffer.size()); state.current_buffer.size());
return true; return true;
} }

View file

@ -25,7 +25,7 @@ struct SDL2Sink::Impl {
SDL2Sink::SDL2Sink() : impl(std::make_unique<Impl>()) { SDL2Sink::SDL2Sink() : impl(std::make_unique<Impl>()) {
if (SDL_Init(SDL_INIT_AUDIO) < 0) { if (SDL_Init(SDL_INIT_AUDIO) < 0) {
LOG_CRITICAL(Audio_Sink, "SDL_Init(SDL_INIT_AUDIO) failed with: %s", SDL_GetError()); NGLOG_CRITICAL(Audio_Sink, "SDL_Init(SDL_INIT_AUDIO) failed with: {}", SDL_GetError());
impl->audio_device_id = 0; impl->audio_device_id = 0;
return; return;
} }
@ -58,8 +58,8 @@ SDL2Sink::SDL2Sink() : impl(std::make_unique<Impl>()) {
impl->audio_device_id = SDL_OpenAudioDevice( impl->audio_device_id = SDL_OpenAudioDevice(
device, false, &desired_audiospec, &obtained_audiospec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE); device, false, &desired_audiospec, &obtained_audiospec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
if (impl->audio_device_id <= 0) { if (impl->audio_device_id <= 0) {
LOG_CRITICAL(Audio_Sink, "SDL_OpenAudioDevice failed with code %d for device \"%s\"", NGLOG_CRITICAL(Audio_Sink, "SDL_OpenAudioDevice failed with code {} for device \"{}\"",
impl->audio_device_id, Settings::values.audio_device_id.c_str()); impl->audio_device_id, Settings::values.audio_device_id.c_str());
return; return;
} }

View file

@ -30,7 +30,7 @@ const SinkDetails& GetSinkDetails(std::string sink_id) {
if (sink_id == "auto" || iter == g_sink_details.end()) { if (sink_id == "auto" || iter == g_sink_details.end()) {
if (sink_id != "auto") { if (sink_id != "auto") {
LOG_ERROR(Audio, "AudioCore::SelectSink given invalid sink_id %s", sink_id.c_str()); NGLOG_ERROR(Audio, "AudioCore::SelectSink given invalid sink_id {}", sink_id.c_str());
} }
// Auto-select. // Auto-select.
// g_sink_details is ordered in terms of desirability, with the best choice at the front. // g_sink_details is ordered in terms of desirability, with the best choice at the front.

View file

@ -55,7 +55,7 @@ std::vector<s16> TimeStretcher::Process(size_t samples_in_queue) {
std::vector<s16> samples = GetSamples(); std::vector<s16> samples = GetSamples();
if (samples_in_queue >= DROP_FRAMES_SAMPLE_DELAY) { if (samples_in_queue >= DROP_FRAMES_SAMPLE_DELAY) {
samples.clear(); samples.clear();
LOG_DEBUG(Audio, "Dropping frames!"); NGLOG_DEBUG(Audio, "Dropping frames!");
} }
return samples; return samples;
} }