106 void * (*alloc)(
unsigned int);
111 void (*free)(
void *);
169 #define API68_IDLE_BIT 1
170 #define API68_CHANGE_BIT 2
171 #define API68_LOOP_BIT 4
172 #define API68_END_BIT 5
174 #define API68_IDLE (1<<API68_IDLE_BIT)
175 #define API68_CHANGE (1<<API68_CHANGE_BIT)
176 #define API68_LOOP (1<<API68_LOOP_BIT)
177 #define API68_END (1<<API68_END_BIT)
179 #define API68_MIX_OK 0
180 #define API68_MIX_ERROR -1
197 api68_t * api68_init(api68_init_t * init);
int api68_open(api68_t *api, api68_disk_t disk)
Change current disk.
int api68_tracks(api68_t *api)
Get number of tracks.
unsigned int start_ms
Absolute start time in disk in ms.
Definition: api68.h:154
Music information.
Definition: api68.h:138
int api68_config_save(api68_t *api)
Save config file.
int api68_verify_file(const char *filename)
Verify an sc68 disk.
unsigned int rate
Replay rate.
Definition: api68.h:155
void * debug_cookie
debug cookie.
Definition: api68.h:127
int api68_music_info(api68_t *api, api68_music_info_t *info, int track, api68_disk_t disk)
Get disk/track information.
debugmsg68_t debug
debug message handler.
Definition: api68.h:124
struct _api68_s api68_t
API information.
Definition: api68.h:160
void api68_set_share(api68_t *api, const char *path)
Set share data path.
int api68_config_load(api68_t *api)
Load config file.
int tracks
Number of track.
Definition: api68.h:140
int api68_load_mem(api68_t *api, const void *buffer, int len)
Verify an sc68 disk.
void api68_free(void *data)
Free dynamic memory.
int api68_play(api68_t *api, int track)
Set/Get current track.
const char * composer
Composer name.
Definition: api68.h:143
int api68_verify_mem(const void *buffer, int len)
Verify an sc68 disk.
const char * replay
Replay name.
Definition: api68.h:144
api68_disk_t api68_load_disk(istream_t *is)
Load an sc68 disk outside the API.
const char * hwname
Hardware description.
Definition: api68.h:145
const char * user_path
user resource path (0 default).
Definition: api68.h:116
api68_disk_t api68_disk_load_mem(const void *buffer, int len)
Verify an sc68 disk.
int api68_seek(api68_t *api, int time_ms)
Set/Get current play position.
const char * author
Author name.
Definition: api68.h:142
ym2149_t ym
YM-2149 emulator internal data.
void api68_debug(const char *fmt,...)
Display debug message.
void api68_shutdown(api68_t *api)
Shutdown sc68 API.
int track
Track number (0:disk information).
Definition: api68.h:139
const char * shared_path
shared resource path (0 default).
Definition: api68.h:121
void * api68_disk_t
API disk.
Definition: api68.h:163
void api68_set_user(api68_t *api, const char *path)
Set user data path.
API initialization.
Definition: api68.h:96
void * api68_alloc(unsigned int n)
Allocate dynamic memory.
unsigned int time_ms
Duration in ms.
Definition: api68.h:153
int api68_config_get(api68_t *api, int idx, int *v)
Get config variable value.
int api68_load(api68_t *api, istream_t *is)
Load an sc68 disk for playing.
void api68_config_apply(api68_t *api)
Apply current configuration to api.
const char * title
Disk or track title.
Definition: api68.h:141
unsigned int addr
Load address.
Definition: api68.h:156
Input stream structure.
Definition: istream68_def.h:67
const char * api68_error(void)
Pop and return last stacked error message.
unsigned int sampling_rate
sampling rate in hz (non 0 value overrides config default).
Definition: api68.h:101
void api68_close(api68_t *api)
Close current disk.
int api68_stop(api68_t *api)
Stop playing.
int api68_verify(istream_t *is)
Verify an sc68 disk.
api68_disk_t api68_load_disk_file(const char *filename)
Verify an sc68 disk.
int api68_config_id(api68_t *api, const char *name)
Get config variable idex.
void(* debugmsg68_t)(void *cookie, const char *fmt, va_list list)
Debug handler type.
Definition: debugmsg68.h:24
int api68_config_set(api68_t *api, int idx, int v)
Set config variable value.
int api68_process(api68_t *api, void *buf, int n)
Fill PCM buffer.
int api68_load_file(api68_t *api, const char *filename)
Verify an sc68 disk.
unsigned int api68_sampling_rate(api68_t *api, unsigned int f)
Set/Get sampling rate.
generic stream operation.