summaryrefslogtreecommitdiffstats
path: root/plugins/audio/audio-alsa.h
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-21 04:21:51 +0100
committerManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-21 04:25:23 +0100
commit03bebc12f0fd5006a72e430084146a36d2db7c8d (patch)
treec9dc5d4e03099c802bf3cc4bf08a4658665b5408 /plugins/audio/audio-alsa.h
parent6f22e88cd3e6d502efa7100ad2b129641305fb53 (diff)
Untie Radio and Audio APIs
Radio and Audio API functions do not cross-call themselves directly anymore ; this is necessary to have independent plugin binaries (.so) in the near future. (PS : audio buffer securization is WIP) Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'plugins/audio/audio-alsa.h')
-rw-r--r--plugins/audio/audio-alsa.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/audio/audio-alsa.h b/plugins/audio/audio-alsa.h
index 776ac819..56b4f55f 100644
--- a/plugins/audio/audio-alsa.h
+++ b/plugins/audio/audio-alsa.h
@@ -19,24 +19,29 @@
#ifndef AUDIO_ALSA_H
#define AUDIO_ALSA_H
+#include <pthread.h>
#include <alsa/asoundlib.h>
#include "local-def.h"
-typedef struct adev_ctx adev_ctx_T;
+typedef struct dev_ctx dev_ctx_T;
-struct adev_ctx {
+struct dev_ctx {
char *name;
snd_pcm_t *dev;
snd_pcm_hw_params_t *params;
snd_mixer_elem_t *mixer_elm;
long vol_max;
long vol;
+ pthread_t thr;
+ unsigned char thr_should_run;
+ unsigned char thr_finished;
};
+STATIC void* _play_thread_fn (void *);
PUBLIC unsigned int _alsa_get_volume (unsigned int);
PUBLIC unsigned char _alsa_get_mute (unsigned int);
-static struct adev_ctx **adev_ctx = NULL;
+static struct dev_ctx **dev_ctx = NULL;
#endif /* AUDIO_ALSA_H */