38 static pthread_mutex_t
mutex = PTHREAD_MUTEX_INITIALIZER;
51 g_return_val_if_fail (header !=
NULL,
TRUE);
67 pthread_mutex_lock (&
mutex);
69 AUDDBG (
"Starting effects.\n");
82 pthread_mutex_unlock (&
mutex);
106 pthread_mutex_lock (&
mutex);
111 pthread_mutex_unlock (&
mutex);
116 pthread_mutex_lock (&
mutex);
124 pthread_mutex_unlock (&
mutex);
129 pthread_mutex_lock (&
mutex);
132 ((
RunningEffect *) node->data)->header->finish (data, samples);
134 pthread_mutex_unlock (&
mutex);
139 pthread_mutex_lock (&
mutex);
144 time = ((
RunningEffect *) node->data)->header->decoder_to_output_time (time);
147 pthread_mutex_unlock (&
mutex);
153 pthread_mutex_lock (&
mutex);
158 time = ((
RunningEffect *) node->data)->header->output_to_decoder_time (time);
161 pthread_mutex_unlock (&
mutex);
167 return (effect->
plugin == plugin) ? 0 : -1;
192 if (node->prev !=
NULL)
209 header->start (& channels, & rate);
216 GList * node = g_list_find_custom (
running_effects, plugin, (GCompareFunc)
228 if (ep->preserves_format)
230 pthread_mutex_lock (&
mutex);
237 pthread_mutex_unlock (&
mutex);
254 g_return_val_if_fail (ep !=
NULL,
FALSE);
266 g_return_if_fail (ep !=
NULL);