summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldrin Martoq <amartoq@dcc.uchile.cl>2008-02-22 17:42:56 +0100
committerTakashi Iwai <tiwai@suse.de>2008-02-22 17:42:56 +0100
commit882f93ac26b549bd30dc3b061694f78d42cd7521 (patch)
treee4708499af03f1cf6fd753709b09fcb3b648c230
parent0e5b2a006ac56f5008d949e06c792404e548ab2d (diff)
add snd_seq_unset_bit()
Added snd_seq_unset_bit() to alsa sequencer API Signed-off-by: Aldrin Martoq <amartoq@dcc.uchile.cl>
-rw-r--r--include/seq.h1
-rw-r--r--src/seq/seq.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/seq.h b/include/seq.h
index 397a73c5..a9a57e7b 100644
--- a/include/seq.h
+++ b/include/seq.h
@@ -575,6 +575,7 @@ int snd_seq_remove_events(snd_seq_t *handle, snd_seq_remove_events_t *info);
*/
void snd_seq_set_bit(int nr, void *array);
+void snd_seq_unset_bit(int nr, void *array);
int snd_seq_change_bit(int nr, void *array);
int snd_seq_get_bit(int nr, void *array);
diff --git a/src/seq/seq.c b/src/seq/seq.c
index 56d9ea82..4e3faecc 100644
--- a/src/seq/seq.c
+++ b/src/seq/seq.c
@@ -4663,6 +4663,14 @@ void snd_seq_set_bit(int nr, void *array)
}
/**
+ * \brief unset a bit flag
+ */
+void snd_seq_unset_bit(int nr, void *array)
+{
+ ((unsigned int *)array)[nr >> 5] &= ~(1UL << (nr & 31));
+}
+
+/**
* \brief change a bit flag
*/
int snd_seq_change_bit(int nr, void *array)