view src/xs_backend.h @ 970:d90bca05521e

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 21 Nov 2012 00:16:03 +0200
parents 4c6c5247de7d
children
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;


typedef struct
{
    gchar *name;
    gchar *filename;
    size_t size;
} XSROMImageData;

#define XS_C64_ROM_IMAGES 3
extern const XSROMImageData xs_rom_images[XS_C64_ROM_IMAGES];

gboolean xs_init_emu_backend(XSEngineState *state, gint *preferred);

gboolean xs_load_rom_image(gint index, guint8 **data);
void     xs_free_rom_images(guint8 **roms);
gboolean xs_load_rom_images(guint8 **roms);


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