diff src/xs_backend.h @ 872:b02f934d8224

Move some code to xs_backend.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 09 Nov 2012 04:37:25 +0200
parents src/xs_player.h@13483b855058
children 50111e99456a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xs_backend.h	Fri Nov 09 04:37:25 2012 +0200
@@ -0,0 +1,52 @@
+#ifndef XS_PLAYER_H
+#define XS_PLAYER_H
+
+#include "xmms-sid.h"
+#include "xs_support.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct XSEngineState;
+
+typedef struct {
+    gint        plrIdent;
+    gboolean    (*plrProbe)(XSFile *);
+    gboolean    (*plrInit)(struct XSEngineState *);
+    void        (*plrClose)(struct XSEngineState *);
+    gboolean    (*plrInitSong)(struct XSEngineState *);
+    guint       (*plrFillBuffer)(struct XSEngineState *, gchar *, guint);
+    gboolean    (*plrLoadSID)(struct XSEngineState *, gchar *);
+    void        (*plrDeleteSID)(struct XSEngineState *);
+    XSTuneInfo* (*plrGetSIDInfo)(const gchar *);
+    gboolean    (*plrUpdateSIDInfo)(struct XSEngineState *);
+    void        (*plrFlush)(struct XSEngineState *);
+} XSEngine;
+
+
+typedef struct XSEngineState {
+    gint        audioFrequency,    /* Audio settings */
+                audioChannels,
+                audioBitsPerSample;
+    AFormat     audioFormat;
+
+    void        *internal;         /* SID-emulation internal engine data */
+    XSEngine    *engine;           /* Selected player engine */
+    gboolean    error,
+                playing,
+                paused;
+    gint        currSong,          /* Current sub-tune */
+                lastTime;
+
+    XSTuneInfo *tuneInfo;
+} XSEngineState;
+
+
+gboolean xs_initialize_emu_backend(XSEngineState *state, gint *preferred);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* XS_PLAYER_H */