Skip to content

Commit

Permalink
Merge pull request #54789 from Calinou/pulseaudio-print-input-channels
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Nov 9, 2021
2 parents c6062cd + de912a8 commit 03a70a9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/pulseaudio/audio_driver_pulseaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Error AudioDriverPulseAudio::init_device() {
Error err = detect_channels();
if (err != OK) {
// This most likely means there are no sinks.
ERR_PRINT("PulseAudio: init device failed to detect number of channels");
ERR_PRINT("PulseAudio: init device failed to detect number of output channels");
return err;
}

Expand All @@ -212,7 +212,7 @@ Error AudioDriverPulseAudio::init_device() {
break;

default:
WARN_PRINT("PulseAudio: Unsupported number of channels: " + itos(pa_map.channels));
WARN_PRINT("PulseAudio: Unsupported number of output channels: " + itos(pa_map.channels));
pa_channel_map_init_stereo(&pa_map);
channels = 2;
break;
Expand All @@ -222,8 +222,8 @@ Error AudioDriverPulseAudio::init_device() {
buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
pa_buffer_size = buffer_frames * pa_map.channels;

print_verbose("PulseAudio: detected " + itos(pa_map.channels) + " channels");
print_verbose("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
print_verbose("PulseAudio: detected " + itos(pa_map.channels) + " output channels");
print_verbose("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated output latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");

pa_sample_spec spec;
spec.format = PA_SAMPLE_S16LE;
Expand Down Expand Up @@ -700,6 +700,8 @@ Error AudioDriverPulseAudio::capture_init_device() {
break;
}

print_verbose("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels");

pa_sample_spec spec;

spec.format = PA_SAMPLE_S16LE;
Expand Down

0 comments on commit 03a70a9

Please sign in to comment.