X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=6a4c9dbead6c61bbaaedfb484369749404dbe7b5;hp=486a33ff5a26f9c5147e14a8c3eabd7c0246e816;hb=cf66f48eb13a66f1d89d612be3ad8f950ece5816;hpb=0a5226b8f6b9131024893f35de615d0b829afe27 diff --git a/audiod.c b/audiod.c index 486a33ff..6a4c9dbe 100644 --- a/audiod.c +++ b/audiod.c @@ -7,9 +7,7 @@ /** \file audiod.c the paraslash's audio daemon */ #include #include -#include #include -#include #include #include "para.h" @@ -33,6 +31,7 @@ #include "write.h" #include "write_common.h" #include "signal.h" +#include "version.h" /** define the array of error lists needed by para_audiod */ INIT_AUDIOD_ERRLISTS; @@ -167,7 +166,7 @@ struct command_task { * \return The audio format number on success, -E_UNSUPPORTED_AUDIO_FORMAT if * \a name is not a supported audio format. */ -int get_audio_format_num(const char *name) +static int get_audio_format_num(const char *name) { int i; @@ -430,22 +429,15 @@ static void kill_btrn(struct btr_node *btrn, struct task *t, int error) static void kill_all_decoders(int error) { - int i, j; + int i; FOR_EACH_SLOT(i) { - struct slot_info *s = &slot[i]; - struct audio_format_info *a; + struct slot_info *s = slot + i; if (s->format < 0) continue; - a = afi + s->format; - if (s->wns) - for (j = 0; j < a->num_writers; j++) - kill_btrn(s->wns[j].btrn, &s->wns[j].task, error); - if (s->fns) - for (j = 0; j < a->num_writers; j++) - kill_btrn(s->fns[j].btrn, &s->wns[j].task, error); - if (s->receiver_node) - kill_btrn(s->receiver_node->btrn, &s->receiver_node->task, + if (!s->receiver_node) + continue; + kill_btrn(s->receiver_node->btrn, &s->receiver_node->task, error); } } @@ -469,20 +461,6 @@ static int get_empty_slot(void) return -E_NO_MORE_SLOTS; } -/** - * get the number of filters - * - * \param audio_format_num the number identifying the audio format - * - * \return the number of filters for the given audio format - * - * \sa struct filter; - */ -int num_filters(int audio_format_num) -{ - return afi[audio_format_num].num_filters; -} - static void open_filters(struct slot_info *s) { struct audio_format_info *a = afi + s->format;