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
audiostream_ = pa_stream_new(c, desc, &sample_spec, &channel_map);
if (!audiostream_) {
ERROR("Pulse: %s: pa_stream_new() failed : %s" , desc, pa_strerror(pa_context_errno(c)));
throw std::runtime_error("Pulse : could not create stream\n");
ERROR("%s: pa_stream_new() failed : %s" , desc, pa_strerror(pa_context_errno(c)));
throw std::runtime_error("Could not create stream\n");
}
pa_buffer_attr attributes;
......@@ -102,30 +102,30 @@ AudioStream::stream_state_callback(pa_stream* s, void* /*user_data*/)
switch (pa_stream_get_state(s)) {
case PA_STREAM_CREATING:
DEBUG("Pulse: Stream is creating...");
DEBUG("Stream is creating...");
break;
case PA_STREAM_TERMINATED:
DEBUG("Pulse: Stream is terminating...");
DEBUG("Stream is terminating...");
break;
case PA_STREAM_READY:
DEBUG("Pulse: Stream successfully created, connected to %s", pa_stream_get_device_name(s));
DEBUG("Pulse: maxlength %u", pa_stream_get_buffer_attr(s)->maxlength);
DEBUG("Pulse: tlength %u", pa_stream_get_buffer_attr(s)->tlength);
DEBUG("Pulse: prebuf %u", pa_stream_get_buffer_attr(s)->prebuf);
DEBUG("Pulse: minreq %u", pa_stream_get_buffer_attr(s)->minreq);
DEBUG("Pulse: 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("Stream successfully created, connected to %s", pa_stream_get_device_name(s));
DEBUG("maxlength %u", pa_stream_get_buffer_attr(s)->maxlength);
DEBUG("tlength %u", pa_stream_get_buffer_attr(s)->tlength);
DEBUG("prebuf %u", pa_stream_get_buffer_attr(s)->prebuf);
DEBUG("minreq %u", pa_stream_get_buffer_attr(s)->minreq);
DEBUG("fragsize %u", pa_stream_get_buffer_attr(s)->fragsize);
DEBUG("samplespec %s", pa_sample_spec_snprint(str, sizeof(str), pa_stream_get_sample_spec(s)));
break;
case PA_STREAM_UNCONNECTED:
DEBUG("Pulse: Stream unconnected");
DEBUG("Stream unconnected");
break;
case PA_STREAM_FAILED:
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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment