You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setting source to 'auto' (also the default pulse source now)
automatically finds the monitor interface of the defualt sink
this will in most cases be most usefull
people who has manualy specified the old default value: 'defualt'
will now get an error message.
//This function defines a callback so the server will tell us its state.
79
+
pa_context_set_state_callback(pulseaudio_context,
80
+
pulseaudio_context_state_callback,
81
+
NULL);
82
+
83
+
//starting a mainloop to get default sink
84
+
if (pa_mainloop_run(m_pulseaudio_mainloop, &ret) <0)
85
+
{
86
+
printf("Could not open pulseaudio mainloop to "
87
+
"find default device name: %d",
88
+
ret);
89
+
}
90
+
91
+
}
92
+
9
93
void*input_pulse(void*data)
10
94
{
11
95
12
96
structaudio_data*audio= (structaudio_data*)data;
13
-
14
97
inti, n;
15
-
16
98
int16_tbuf[BUFSIZE / 2];
17
99
18
100
/* The sample type to use */
@@ -29,8 +111,7 @@ void* input_pulse(void* data)
29
111
pa_simple*s=NULL;
30
112
interror;
31
113
32
-
/* Create the recording stream */
33
-
if (!(s=pa_simple_new(NULL, "cava", PA_STREAM_RECORD, audio->source, "audio for cava", &ss, NULL, &pb, &error))) {
114
+
if (!(s=pa_simple_new(NULL, "cava", PA_STREAM_RECORD, audio->source, "audio for cava", &ss, NULL, &pb, &error))) {
34
115
fprintf(stderr, __FILE__": Could not open pulseaudio source: %s, %s. To find a list of your pulseaudio sources run 'pacmd list-sources'\n",audio->source, pa_strerror(error));
0 commit comments