mute.c 1.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
/*
 *
 *  postfish
 *    
 *      Copyright (C) 2002-2004 Monty and Xiph.Org
 *
 *  Postfish is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *   
 *  Postfish is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *   
 *  You should have received a copy of the GNU General Public License
 *  along with Postfish; see the file COPYING.  If not, write to the
 *  Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * 
 */

#include <sys/types.h>
#include "postfish.h"
26
#include "mix.h"
27 28 29
#include "mute.h"

extern int input_ch;
30
extern sig_atomic_t *mixpanel_active;
31 32 33 34 35 36 37 38 39 40 41 42 43 44

int mute_load(void){
  return 0;
}

int mute_channel_muted(u_int32_t active,int i){
  return(!(active&(1<<i)));
}

time_linkage *mute_read(time_linkage *in){
  u_int32_t val=0;
  int i;

  for(i=0;i<input_ch;i++)
45
    if(mixpanel_active[i])
46 47 48 49 50
      val|= (1<<i);

  in->active=val;
  return(in);
}