--- /dev/null
+/* audio.c -- audio management stuff
+ *
+ * author: hackbard@hackdaworld.dyndns.org
+ *
+ */
+
+#include "audio.h"
+
+int audio_init(t_audio *audio) {
+
+ puts("[audio] initializing audio ...");
+
+ if((audio->fd=open(audio->device,O_RDONLY))==-1) {
+ perror("[audio] open call");
+ return A_ERROR;
+ }
+
--- /dev/null
+/* audio.h -- audio headers */
+
+#ifndef AUDIO_H
+#define AUDIO_H
+
+/* includes */
+#include <sys/soundcard.h>
+
+/* defines */
+#define MAX_CHAR_DEVICE 32
+#define SOUND_DEVICE "/dev/dsp"
+
+/* audio specific variables */
+typedef struct s_audio {
+ int fd;
+ char device[MAX_CHAR_DEVICE];
+ int cap;
+} t_audio;
+
+#endif