summaryrefslogtreecommitdiff
path: root/src/audiobackend-pulse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/audiobackend-pulse.cc')
-rw-r--r--src/audiobackend-pulse.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/audiobackend-pulse.cc b/src/audiobackend-pulse.cc
index 83fc93d..2eadedf 100644
--- a/src/audiobackend-pulse.cc
+++ b/src/audiobackend-pulse.cc
@@ -26,6 +26,7 @@
*/
#include "audiobackend-pulse.h"
#include "mediaconfig.h"
+#include "stdio.h"
#ifdef WITH_PULSE
@@ -50,6 +51,8 @@ AudioBackendPulse::AudioBackendPulse(const char *device)
ss.channels = 1;
ss.rate = SAMPLERATE;
+ int error;
+
sIn = pa_simple_new(NULL, // Use the default server.
"SimpleRTP", // Our application's name.
PA_STREAM_RECORD,
@@ -58,9 +61,10 @@ AudioBackendPulse::AudioBackendPulse(const char *device)
&ss, // Our sample format.
NULL, // Use default channel map
NULL, // Use default buffering attributes.
- NULL // Ignore error code.
+ &error // Ignore error code.
);
-
+ printf("Pulse in: %s\n", pa_strerror(error));
+
sOut = pa_simple_new(NULL, // Use the default server.
"SimpleRTP", // Our application's name.
PA_STREAM_PLAYBACK,
@@ -69,8 +73,9 @@ AudioBackendPulse::AudioBackendPulse(const char *device)
&ss, // Our sample format.
NULL, // Use default channel map
NULL, // Use default buffering attributes.
- NULL // Ignore error code.
+ &error // Ignore error code.
);
+ printf("Pulse out: %s\n", pa_strerror(error));
}
AudioBackendPulse::~AudioBackendPulse()