1 /* 2 * Mask header 3 * Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org> 4 * 5 * 6 * This library is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU Lesser General Public License as 8 * published by the Free Software Foundation; either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 */ 21 22 typedef struct _snd_mask snd_mask_t; 23 24 #define SND_MASK_MAX 64 25 26 #ifdef SND_MASK_INLINE 27 #include "mask_inline.h" 28 #else 29 void snd_mask_none(snd_mask_t *mask); 30 void snd_mask_any(snd_mask_t *mask); 31 void snd_mask_load(snd_mask_t *mask, unsigned int msk); 32 int snd_mask_empty(const snd_mask_t *mask); 33 int snd_mask_full(const snd_mask_t *mask); 34 void snd_mask_set(snd_mask_t *mask, unsigned int val); 35 void snd_mask_reset(snd_mask_t *mask, unsigned int val); 36 void snd_mask_copy(snd_mask_t *mask, const snd_mask_t *v); 37 int snd_mask_test(const snd_mask_t *mask, unsigned int val); 38 void snd_mask_intersect(snd_mask_t *mask, const snd_mask_t *v); 39 void snd_mask_union(snd_mask_t *mask, const snd_mask_t *v); 40 unsigned int snd_mask_count(const snd_mask_t *mask); 41 unsigned int snd_mask_min(const snd_mask_t *mask); 42 unsigned int snd_mask_max(const snd_mask_t *mask); 43 void snd_mask_set_range(snd_mask_t *mask, unsigned int from, unsigned int to); 44 void snd_mask_reset_range(snd_mask_t *mask, unsigned int from, unsigned int to); 45 void snd_mask_leave(snd_mask_t *mask, unsigned int val); 46 int snd_mask_eq(const snd_mask_t *mask, const snd_mask_t *v); 47 int snd_mask_single(const snd_mask_t *mask); 48 int snd_mask_refine(snd_mask_t *mask, const snd_mask_t *v); 49 int snd_mask_refine_first(snd_mask_t *mask); 50 int snd_mask_refine_last(snd_mask_t *mask); 51 int snd_mask_refine_min(snd_mask_t *mask, unsigned int val); 52 int snd_mask_refine_max(snd_mask_t *mask, unsigned int val); 53 int snd_mask_refine_set(snd_mask_t *mask, unsigned int val); 54 int snd_mask_value(const snd_mask_t *mask); 55 int snd_mask_always_eq(const snd_mask_t *m1, const snd_mask_t *m2); 56 int snd_mask_never_eq(const snd_mask_t *m1, const snd_mask_t *m2); 57 #endif 58