view src/xs_backend.h @ 873:50111e99456a

Oops. Fix previous commit.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 09 Nov 2012 04:39:41 +0200
parents b02f934d8224
children d03e5c73eb51
line wrap: on
line source

#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_init_emu_backend(XSEngineState *state, gint *preferred);


#ifdef __cplusplus
}
#endif
#endif /* XS_PLAYER_H */