Skip to content
Snippets Groups Projects
Commit b58b15d1 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #9832: pulse: cleanup logging

parent 34b63542
No related branches found
No related tags found
No related merge requests found
...@@ -53,8 +53,8 @@ AudioStream::AudioStream(pa_context *c, pa_threaded_mainloop *m, const char *des ...@@ -53,8 +53,8 @@ AudioStream::AudioStream(pa_context *c, pa_threaded_mainloop *m, const char *des
audiostream_ = pa_stream_new(c, desc, &sample_spec, &channel_map); audiostream_ = pa_stream_new(c, desc, &sample_spec, &channel_map);
if (!audiostream_) { if (!audiostream_) {
ERROR("Pulse: %s: pa_stream_new() failed : %s" , desc, pa_strerror(pa_context_errno(c))); ERROR("%s: pa_stream_new() failed : %s" , desc, pa_strerror(pa_context_errno(c)));
throw std::runtime_error("Pulse : could not create stream\n"); throw std::runtime_error("Could not create stream\n");
} }
pa_buffer_attr attributes; pa_buffer_attr attributes;
...@@ -102,30 +102,30 @@ AudioStream::stream_state_callback(pa_stream* s, void* /*user_data*/) ...@@ -102,30 +102,30 @@ AudioStream::stream_state_callback(pa_stream* s, void* /*user_data*/)
switch (pa_stream_get_state(s)) { switch (pa_stream_get_state(s)) {
case PA_STREAM_CREATING: case PA_STREAM_CREATING:
DEBUG("Pulse: Stream is creating..."); DEBUG("Stream is creating...");
break; break;
case PA_STREAM_TERMINATED: case PA_STREAM_TERMINATED:
DEBUG("Pulse: Stream is terminating..."); DEBUG("Stream is terminating...");
break; break;
case PA_STREAM_READY: case PA_STREAM_READY:
DEBUG("Pulse: Stream successfully created, connected to %s", pa_stream_get_device_name(s)); DEBUG("Stream successfully created, connected to %s", pa_stream_get_device_name(s));
DEBUG("Pulse: maxlength %u", pa_stream_get_buffer_attr(s)->maxlength); DEBUG("maxlength %u", pa_stream_get_buffer_attr(s)->maxlength);
DEBUG("Pulse: tlength %u", pa_stream_get_buffer_attr(s)->tlength); DEBUG("tlength %u", pa_stream_get_buffer_attr(s)->tlength);
DEBUG("Pulse: prebuf %u", pa_stream_get_buffer_attr(s)->prebuf); DEBUG("prebuf %u", pa_stream_get_buffer_attr(s)->prebuf);
DEBUG("Pulse: minreq %u", pa_stream_get_buffer_attr(s)->minreq); DEBUG("minreq %u", pa_stream_get_buffer_attr(s)->minreq);
DEBUG("Pulse: fragsize %u", pa_stream_get_buffer_attr(s)->fragsize); DEBUG("fragsize %u", pa_stream_get_buffer_attr(s)->fragsize);
DEBUG("Pulse: samplespec %s", pa_sample_spec_snprint(str, sizeof(str), pa_stream_get_sample_spec(s))); DEBUG("samplespec %s", pa_sample_spec_snprint(str, sizeof(str), pa_stream_get_sample_spec(s)));
break; break;
case PA_STREAM_UNCONNECTED: case PA_STREAM_UNCONNECTED:
DEBUG("Pulse: Stream unconnected"); DEBUG("Stream unconnected");
break; break;
case PA_STREAM_FAILED: case PA_STREAM_FAILED:
default: default:
ERROR("Pulse: Sink/Source doesn't exists: %s" , pa_strerror(pa_context_errno(pa_stream_get_context(s)))); ERROR("Sink/Source doesn't exists: %s" , pa_strerror(pa_context_errno(pa_stream_get_context(s))));
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment