Add sound stuff
This commit is contained in:
parent
1eaa3c4092
commit
db13eea2fc
11
.vscode/settings.json
vendored
Normal file
11
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"string.h": "c",
|
||||
"rideboard.h": "c",
|
||||
"serial.h": "c",
|
||||
"jvs.h": "c",
|
||||
"time.h": "c",
|
||||
"stdarg.h": "c",
|
||||
"ioctl.h": "c"
|
||||
}
|
||||
}
|
9
Makefile
9
Makefile
@ -7,12 +7,19 @@ BUILD = build
|
||||
|
||||
OBJS := $(patsubst %.c,%.o,$(wildcard src/lindbergh/*.c))
|
||||
|
||||
all: lindbergh.so
|
||||
all: lindbergh.so libsegaapi.so
|
||||
|
||||
lindbergh.so: $(OBJS)
|
||||
mkdir -p $(BUILD)
|
||||
$(LD) $(OBJS) $(LDFLAGS) $(CFLAGS) -o $(BUILD)/lindbergh.so
|
||||
rm -f src/lindbergh/*.o
|
||||
|
||||
LIBSEGA_LD=gcc #clang
|
||||
LIBSEGA_LDFLAGS=-m32 -O0 -g
|
||||
|
||||
libsegaapi.so: src/libsegaapi/segaapi.o
|
||||
$(LIBSEGA_LD) $(LIBSEGA_LDFLAGS) src/libsegaapi/segaapi.o -L/usr/lib/i386-linux-gnu -lalut -fPIC -shared -o $(BUILD)/libsegaapi.so
|
||||
rm -f src/libsegaapi/*.o
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD)
|
||||
|
11
src/libsegaapi/Makefile
Normal file
11
src/libsegaapi/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
LD=gcc #clang
|
||||
CC=gcc
|
||||
CFLAGS=-m32 -O0 -g
|
||||
LDFLAGS=$(CFLAGS)
|
||||
|
||||
libsegaapi.so: segaapi.o
|
||||
$(LD) $(LDFLAGS) segaapi.o -L/usr/lib/i386-linux-gnu -lalut -fPIC -shared -o libsegaapi.so
|
||||
clean:
|
||||
rm -f test libsegaapi.so
|
||||
|
||||
force:
|
1148
src/libsegaapi/segaapi.c
Normal file
1148
src/libsegaapi/segaapi.c
Normal file
File diff suppressed because it is too large
Load Diff
1647
src/libsegaapi/segaapi.h
Normal file
1647
src/libsegaapi/segaapi.h
Normal file
File diff suppressed because it is too large
Load Diff
78
src/libsegaapi/segadef.h
Normal file
78
src/libsegaapi/segadef.h
Normal file
@ -0,0 +1,78 @@
|
||||
/****************************************************************************
|
||||
* Copyright (C) 2004 Creative Technology Ltd. All rights reserved.
|
||||
*
|
||||
****************************************************************************
|
||||
* File: segadef.h
|
||||
*
|
||||
* This file contains the types definitions for segaapi.
|
||||
*
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __CTDEF_H
|
||||
|
||||
#ifndef __SEGAAPITYPES_H
|
||||
#define __SEGAAPITYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
/* 8 bit signed value */
|
||||
typedef char CTCHAR, *PCTCHAR, **PPCTCHAR;
|
||||
/* 8 bit unsigned value */
|
||||
typedef unsigned char CTBYTE, *PCTBYTE, **PPCTBYTE;
|
||||
|
||||
typedef unsigned char CTUCHAR, *PCTUCHAR, **PPCTUCHAR;
|
||||
|
||||
/* 16 bit signed value */
|
||||
typedef short CTSHORT, *PCTSHORT, **PPCTSHORT;
|
||||
/* 16 bit unsigned value */
|
||||
typedef unsigned short CTWORD, *PCTWORD, **PPCTWORD;
|
||||
|
||||
typedef unsigned short CTUSHORT, *PCTUSHORT, **PPCTUSHORT;
|
||||
|
||||
/* 32 bit signed value */
|
||||
typedef int CTLONG, *PCTLONG, **PPCTLONG;
|
||||
/* 32 bit unsigned value */
|
||||
typedef unsigned int CTDWORD, *PCTDWORD, **PPCTDWORD;
|
||||
|
||||
typedef unsigned long CTULONG, *PCTULONG, **PPCTULONG;
|
||||
|
||||
typedef int CTBOOL, *PCTBOOL, **PPCTBOOL;
|
||||
|
||||
typedef void * CTHANDLE;
|
||||
|
||||
/* Define basic COM types */
|
||||
#ifndef GUID_DEFINED
|
||||
#define GUID_DEFINED
|
||||
typedef struct _GUID
|
||||
{
|
||||
unsigned long Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[8];
|
||||
} GUID;
|
||||
#endif // GUID_DEFINED
|
||||
|
||||
#ifndef DEFINE_GUID
|
||||
#ifndef INITGUID
|
||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
extern const GUID /*FAR*/ name
|
||||
#else
|
||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
#endif // INITGUID
|
||||
#endif // DEFINE_GUID
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif /* __SEGAAPITYPES_H */
|
||||
|
||||
#endif /* __CTDEF_H */
|
||||
|
||||
|
1478
src/libsegaapi/segaeax.h
Normal file
1478
src/libsegaapi/segaeax.h
Normal file
File diff suppressed because it is too large
Load Diff
43
src/libsegaapi/segaerr.h
Normal file
43
src/libsegaapi/segaerr.h
Normal file
@ -0,0 +1,43 @@
|
||||
/****************************************************************************
|
||||
* Copyright (C) 2004 Creative Technology Ltd. All rights reserved.
|
||||
*
|
||||
****************************************************************************
|
||||
* File: sapidef.h
|
||||
*
|
||||
* This file contains the return codes definition for segaapi.
|
||||
*
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __SEGAAPIERROR_H
|
||||
#define __SEGAAPIERROR_H
|
||||
|
||||
typedef int SEGASTATUS;
|
||||
|
||||
#define SEGA_SUCCEEDED(_x) ((SEGASTATUS) (_x) >= 0)
|
||||
#define SEGA_FAILED(_x) ((SEGASTATUS) (_x) < 0)
|
||||
|
||||
#define SEGARESULT_SUCCESS(_x) (_x)
|
||||
#define SEGARESULT_FAILURE(_x) ((1 << 31) | 0xA000 | (_x))
|
||||
|
||||
#define SEGA_SUCCESS 0L
|
||||
|
||||
|
||||
#define SEGAERR_FAIL SEGARESULT_FAILURE(0)
|
||||
#define SEGAERR_BAD_POINTER SEGARESULT_FAILURE(3)
|
||||
#define SEGAERR_UNSUPPORTED SEGARESULT_FAILURE(5)
|
||||
#define SEGAERR_BAD_PARAM SEGARESULT_FAILURE(9)
|
||||
#define SEGAERR_INVALID_CHANNEL SEGARESULT_FAILURE(10)
|
||||
#define SEGAERR_INVALID_SEND SEGARESULT_FAILURE(11)
|
||||
#define SEGAERR_PLAYING SEGARESULT_FAILURE(12)
|
||||
#define SEGAERR_NO_RESOURCES SEGARESULT_FAILURE(13)
|
||||
#define SEGAERR_BAD_CONFIG SEGARESULT_FAILURE(14)
|
||||
#define SEGAERR_BAD_HANDLE SEGARESULT_FAILURE(18)
|
||||
#define SEGAERR_BAD_SAMPLERATE SEGARESULT_FAILURE(28)
|
||||
#define SEGAERR_OUT_OF_MEMORY SEGARESULT_FAILURE(31)
|
||||
#define SEGAERR_INIT_FAILED SEGARESULT_FAILURE(39)
|
||||
|
||||
|
||||
#endif /* __SEGAAPIERROR_H */
|
||||
|
1640
src/libsegaapi/tsf.h
Normal file
1640
src/libsegaapi/tsf.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user