-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad01aef
commit cb387e4
Showing
8 changed files
with
872 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
#include "types.h" | ||
|
||
void __AXVPBInit(); | ||
void __AXVPBInitSpecifyMem(u32, u32); | ||
void __AXVPBQuit(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#include "revolution/os/OS.h" | ||
#include <revolution/AX.h> | ||
|
||
const char* __AXVersion = "<< RVL_SDK - AX \trelease build: Dec 11 2009 15:55:44 (0x4302_145) >>"; | ||
static BOOL __init = FALSE; | ||
|
||
void AXInit(void) { | ||
if (__init == FALSE) { | ||
OSRegisterVersion(__AXVersion); | ||
__AXAllocInit(); | ||
__AXVPBInit(); | ||
__AXSPBInit(); | ||
__AXAuxInit(); | ||
__AXClInit(); | ||
__AXOutInit(0); | ||
__init = TRUE; | ||
} | ||
} | ||
|
||
void AXInitSpecifyMem(u32 a, u32 b) { | ||
if (__init == FALSE) { | ||
OSRegisterVersion(__AXVersion); | ||
__AXAllocInit(); | ||
__AXVPBInitSpecifyMem(a, b); | ||
__AXSPBInit(); | ||
__AXAuxInit(); | ||
__AXClInit(); | ||
__AXOutInit(0); | ||
__init = TRUE; | ||
} | ||
} | ||
|
||
void AXQuit(void) { | ||
if (__init != FALSE) { | ||
__AXOutQuit(); | ||
__AXAllocQuit(); | ||
__AXVPBQuit(); | ||
__AXSPBQuit(); | ||
__AXAuxQuit(); | ||
__AXClQuit(); | ||
__init = FALSE; | ||
} | ||
} | ||
|
||
BOOL AXIsInit(void) { return __init; } |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "revolution/axfx/AXFXHooks.h" | ||
#include "revolution/os/OSAlloc.h" | ||
#include <revolution/AXFX.h> | ||
|
||
void* __AXFXAllocFunction(u32 size) { | ||
return OSAllocFromHeap(__OSCurrHeap, size); | ||
} | ||
|
||
void __AXFXFreeFunction(void *data) { | ||
OSFreeToHeap(__OSCurrHeap, data); | ||
} | ||
|
||
void AXFXSetHooks(AXFXAlloc alloc, AXFXFree free) { | ||
__AXFXAlloc = alloc; | ||
__AXFXFree = free; | ||
} | ||
|
||
void AXFXGetHooks(AXFXAlloc* alloc, AXFXFree* free) { | ||
*alloc = __AXFXAlloc; | ||
*free = __AXFXFree; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include <revolution/AXFX.h> | ||
|
||
s32 __SinTableFixedPoint[128] = { | ||
0x00000000, 0x00064855, 0x000c8fb3, 0x0012d520, | ||
0x001917a6, 0x001f564e, 0x00259020, 0x002bc428, | ||
0x0031f170, 0x00381704, 0x003e33f3, 0x0044474a, | ||
0x004a5018, 0x00504d72, 0x00563e6a, 0x005c2215, | ||
0x0061f78b, 0x0067bde5, 0x006d7440, 0x007319ba, | ||
0x0078ad75, 0x007e2e94, 0x00839c3d, 0x0088f59b, | ||
0x008e39da, 0x0093682b, 0x00987fc0, 0x009d7fd2, | ||
0x00a2679a, 0x00a73656, 0x00abeb4a, 0x00b085bb, | ||
0x00b504f3, 0x00b96842, 0x00bdaefa, 0x00c1d871, | ||
0x00c5e403, 0x00c9d112, 0x00cd9f02, 0x00d14d3d, | ||
0x00d4db32, 0x00d84853, 0x00db941b, 0x00debe05, | ||
0x00e1c598, 0x00e4aa59, 0x00e76bd8, 0x00ea09a7, | ||
0x00ec835e, 0x00eed89e, 0x00f10908, 0x00f31448, | ||
0x00f4fa0b, 0x00f6ba07, 0x00f853f8, 0x00f9c79d, | ||
0x00fb14bf, 0x00fc3b28, 0x00fd3aac, 0x00fe1324, | ||
0x00fec46d, 0x00ff4e6d, 0x00ffb10f, 0x00ffec43, | ||
0x01000000, 0x00ffec43, 0x00ffb10f, 0x00ff4e6d, | ||
0x00fec46d, 0x00fe1323, 0x00fd3aac, 0x00fc3b28, | ||
0x00fb14be, 0x00f9c79d, 0x00f853f8, 0x00f6ba07, | ||
0x00f4fa0a, 0x00f31447, 0x00f10908, 0x00eed89e, | ||
0x00ec835e, 0x00ea09a6, 0x00e76bd8, 0x00e4aa59, | ||
0x00e1c597, 0x00debe06, 0x00db941a, 0x00d84852, | ||
0x00d4db30, 0x00d14d3d, 0x00cd9f02, 0x00c9d111, | ||
0x00c5e404, 0x00c1d870, 0x00bdaef8, 0x00b96840, | ||
0x00b504f3, 0x00b085ba, 0x00abeb48, 0x00a73656, | ||
0x00a26799, 0x009d7fd0, 0x00987fbd, 0x0093682a, | ||
0x008e39d9, 0x0088f598, 0x00839c3d, 0x007e2e92, | ||
0x0078ad73, 0x007319bb, 0x006d743f, 0x0067bde3, | ||
0x0061f788, 0x005c2215, 0x00563e69, 0x00504d70, | ||
0x004a5019, 0x00444749, 0x003e33f1, 0x00381702, | ||
0x0031f170, 0x002bc427, 0x0025901e, 0x001f564e, | ||
0x001917a6, 0x0012d51e, 0x000c8faf, 0x00064855 | ||
}; | ||
|
||
s32* __AXFXGetLfoSinTable(void) { | ||
return __SinTableFixedPoint; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
#include <revolution/AXFX.h> | ||
|
||
SrcCoef __SrcTab12khz[128] = { { 0.09750366, 0.80221558, 0.10159302, -0.0009765625 }, | ||
{ 0.093505859, 0.80203247, 0.10580444, -0.0010375977 }, | ||
{ 0.089599609, 0.80169678, 0.11010742, -0.001159668 }, | ||
{ 0.08578491, 0.80117798, 0.114471435, -0.0012817383 }, | ||
{ 0.08203125, 0.80047607, 0.118927, -0.0014038086 }, | ||
{ 0.07836914, 0.79962158, 0.12347412, -0.0015258789 }, | ||
{ 0.074798584, 0.7986145, 0.12814331, -0.0016479492 }, | ||
{ 0.071350098, 0.7974243, 0.13287354, -0.0017700195 }, | ||
{ 0.067962646, 0.796051, 0.13769531, -0.0019226074 }, | ||
{ 0.064697266, 0.79452515, 0.14260864, -0.0020446777 }, | ||
{ 0.06149292, 0.79284668, 0.14761353, -0.0021972656 }, | ||
{ 0.058349609, 0.7909851, 0.15270996, -0.0023193359 }, | ||
{ 0.055328369, 0.7889404, 0.15789795, -0.0024719238 }, | ||
{ 0.052368164, 0.78674316, 0.16317749, -0.0026550293 }, | ||
{ 0.04949951, 0.7844238, 0.16851807, -0.0028076172 }, | ||
{ 0.046722412, 0.78189087, 0.17398071, -0.0029907227 }, | ||
{ 0.044006348, 0.7792053, 0.17950439, -0.0031433105 }, | ||
{ 0.041412354, 0.77636719, 0.18511963, -0.003326416 }, | ||
{ 0.038879395, 0.77337646, 0.19082642, -0.0035095215 }, | ||
{ 0.03640747, 0.77023315, 0.19659424, -0.003692627 }, | ||
{ 0.0340271, 0.76693726, 0.20248413, -0.0038757324 }, | ||
{ 0.03173828, 0.76348877, 0.20843506, -0.0040588379 }, | ||
{ 0.029510498, 0.75985718, 0.21444702, -0.0042724609 }, | ||
{ 0.027374268, 0.7561035, 0.22055054, -0.0044555664 }, | ||
{ 0.025299072, 0.75219727, 0.2267456, -0.0046691895 }, | ||
{ 0.02331543, 0.74816895, 0.23300171, -0.0048522949 }, | ||
{ 0.021392822, 0.74398804, 0.23931885, -0.005065918 }, | ||
{ 0.019561768, 0.73965454, 0.24572754, -0.0053100586 }, | ||
{ 0.017791748, 0.73519897, 0.25219727, -0.0055236816 }, | ||
{ 0.016052246, 0.7305908, 0.25872803, -0.005706787 }, | ||
{ 0.014404297, 0.7258606, 0.26535034, -0.00592041 }, | ||
{ 0.012817383, 0.7210083, 0.27203369, -0.0061645508 }, | ||
{ 0.0113220215, 0.7160034, 0.27877808, -0.0063781738 }, | ||
{ 0.009887695, 0.71090698, 0.2855835, -0.0065612793 }, | ||
{ 0.008514404, 0.70565796, 0.29244995, -0.0067749023 }, | ||
{ 0.0072021484, 0.70031738, 0.29934692, -0.007019043 }, | ||
{ 0.00592041, 0.69485474, 0.30633545, -0.007232666 }, | ||
{ 0.004699707, 0.68927, 0.313385, -0.0074157715 }, | ||
{ 0.0035705566, 0.68356323, 0.32046509, -0.0076293945 }, | ||
{ 0.0024719238, 0.67773438, 0.3276062, -0.007873535 }, | ||
{ 0.0014343262, 0.67184448, 0.33477783, -0.008087158 }, | ||
{ 0.00045776367, 0.6658325, 0.34197998, -0.0082702637 }, | ||
{ -0.00048828125, 0.659729, 0.34924316, -0.008453369 }, | ||
{ -0.0013427734, 0.65353394, 0.35656738, -0.0086364746 }, | ||
{ -0.002166748, 0.6472168, 0.3638916, -0.0088500977 }, | ||
{ -0.002960205, 0.6408386, 0.37127686, -0.009033203 }, | ||
{ -0.003692627, 0.63433838, 0.37869263, -0.0092163086 }, | ||
{ -0.0043640137, 0.6277771, 0.38613892, -0.0093383789 }, | ||
{ -0.0049743652, 0.62115479, 0.39361572, -0.0094909668 }, | ||
{ -0.0055847168, 0.6144409, 0.40109253, -0.0096435547 }, | ||
{ -0.006134033, 0.6076355, 0.40859985, -0.0097961426 }, | ||
{ -0.006652832, 0.60076904, 0.41610718, -0.0099182129 }, | ||
{ -0.0071411133, 0.59384155, 0.42364502, -0.010009766 }, | ||
{ -0.0075683594, 0.586853, 0.43121338, -0.010131836 }, | ||
{ -0.0079650879, 0.57977295, 0.43875122, -0.010223389 }, | ||
{ -0.0083312988, 0.57266235, 0.44631958, -0.010284424 }, | ||
{ -0.008666992, 0.56552124, 0.45388794, -0.010345459 }, | ||
{ -0.008972168, 0.55831909, 0.4614563, -0.010406494 }, | ||
{ -0.0092163086, 0.5510559, 0.46902466, -0.010406494 }, | ||
{ -0.009460449, 0.54373169, 0.47659302, -0.010406494 }, | ||
{ -0.009674072, 0.53640747, 0.48413086, -0.010375977 }, | ||
{ -0.0098571777, 0.5290222, 0.4916687, -0.010375977 }, | ||
{ -0.010009766, 0.52160645, 0.49917603, -0.010314941 }, | ||
{ -0.010131836, 0.51416016, 0.50668335, -0.010253906 }, | ||
{ -0.010253906, 0.50668335, 0.51416016, -0.010131836 }, | ||
{ -0.010314941, 0.49917603, 0.52160645, -0.010009766 }, | ||
{ -0.010375977, 0.4916687, 0.5290222, -0.0098571777 }, | ||
{ -0.010375977, 0.48413086, 0.53640747, -0.009674072 }, | ||
{ -0.010406494, 0.47659302, 0.54373169, -0.009460449 }, | ||
{ -0.010406494, 0.46902466, 0.5510559, -0.0092163086 }, | ||
{ -0.010406494, 0.4614563, 0.55831909, -0.008972168 }, | ||
{ -0.010345459, 0.45388794, 0.56552124, -0.008666992 }, | ||
{ -0.010284424, 0.44631958, 0.57266235, -0.0083312988 }, | ||
{ -0.010223389, 0.43875122, 0.57977295, -0.0079650879 }, | ||
{ -0.010131836, 0.43121338, 0.586853, -0.0075683594 }, | ||
{ -0.010009766, 0.42364502, 0.59384155, -0.0071411133 }, | ||
{ -0.0099182129, 0.41610718, 0.60076904, -0.006652832 }, | ||
{ -0.0097961426, 0.40859985, 0.6076355, -0.006134033 }, | ||
{ -0.0096435547, 0.40109253, 0.6144409, -0.0055847168 }, | ||
{ -0.0094909668, 0.39361572, 0.62115479, -0.0049743652 }, | ||
{ -0.0093383789, 0.38613892, 0.6277771, -0.0043640137 }, | ||
{ -0.0092163086, 0.37869263, 0.63433838, -0.003692627 }, | ||
{ -0.009033203, 0.37127686, 0.6408386, -0.002960205 }, | ||
{ -0.0088500977, 0.3638916, 0.6472168, -0.002166748 }, | ||
{ -0.0086364746, 0.35656738, 0.65353394, -0.0013427734 }, | ||
{ -0.008453369, 0.34924316, 0.659729, -0.00048828125 }, | ||
{ -0.0082702637, 0.34197998, 0.6658325, 0.00045776367 }, | ||
{ -0.008087158, 0.33477783, 0.67184448, 0.0014343262 }, | ||
{ -0.007873535, 0.3276062, 0.67773438, 0.0024719238 }, | ||
{ -0.0076293945, 0.32046509, 0.68356323, 0.0035705566 }, | ||
{ -0.0074157715, 0.313385, 0.68927, 0.004699707 }, | ||
{ -0.007232666, 0.30633545, 0.69485474, 0.00592041 }, | ||
{ -0.007019043, 0.29934692, 0.70031738, 0.0072021484 }, | ||
{ -0.0067749023, 0.29244995, 0.70565796, 0.008514404 }, | ||
{ -0.0065612793, 0.2855835, 0.71090698, 0.009887695 }, | ||
{ -0.0063781738, 0.27877808, 0.7160034, 0.0113220215 }, | ||
{ -0.0061645508, 0.27203369, 0.7210083, 0.012817383 }, | ||
{ -0.00592041, 0.26535034, 0.7258606, 0.014404297 }, | ||
{ -0.005706787, 0.25872803, 0.7305908, 0.016052246 }, | ||
{ -0.0055236816, 0.25219727, 0.73519897, 0.017791748 }, | ||
{ -0.0053100586, 0.24572754, 0.73965454, 0.019561768 }, | ||
{ -0.005065918, 0.23931885, 0.74398804, 0.021392822 }, | ||
{ -0.0048522949, 0.23300171, 0.74816895, 0.02331543 }, | ||
{ -0.0046691895, 0.2267456, 0.75219727, 0.025299072 }, | ||
{ -0.0044555664, 0.22055054, 0.7561035, 0.027374268 }, | ||
{ -0.0042724609, 0.21444702, 0.75985718, 0.029510498 }, | ||
{ -0.0040588379, 0.20843506, 0.76348877, 0.03173828 }, | ||
{ -0.0038757324, 0.20248413, 0.76693726, 0.0340271 }, | ||
{ -0.003692627, 0.19659424, 0.77023315, 0.03640747 }, | ||
{ -0.0035095215, 0.19082642, 0.77337646, 0.038879395 }, | ||
{ -0.003326416, 0.18511963, 0.77636719, 0.041412354 }, | ||
{ -0.0031433105, 0.17950439, 0.7792053, 0.044006348 }, | ||
{ -0.0029907227, 0.17398071, 0.78189087, 0.046722412 }, | ||
{ -0.0028076172, 0.16851807, 0.7844238, 0.04949951 }, | ||
{ -0.0026550293, 0.16317749, 0.78674316, 0.052368164 }, | ||
{ -0.0024719238, 0.15789795, 0.7889404, 0.055328369 }, | ||
{ -0.0023193359, 0.15270996, 0.7909851, 0.058349609 }, | ||
{ -0.0021972656, 0.14761353, 0.79284668, 0.06149292 }, | ||
{ -0.0020446777, 0.14260864, 0.79452515, 0.064697266 }, | ||
{ -0.0019226074, 0.13769531, 0.796051, 0.067962646 }, | ||
{ -0.0017700195, 0.13287354, 0.7974243, 0.071350098 }, | ||
{ -0.0016479492, 0.12814331, 0.7986145, 0.074798584 }, | ||
{ -0.0015258789, 0.12347412, 0.79962158, 0.07836914 }, | ||
{ -0.0014038086, 0.118927, 0.80047607, 0.08203125 }, | ||
{ -0.0012817383, 0.114471435, 0.80117798, 0.08578491 }, | ||
{ -0.001159668, 0.11010742, 0.80169678, 0.089599609 }, | ||
{ -0.0010375977, 0.10580444, 0.80203247, 0.093505859 }, | ||
{ -0.0009765625, 0.10159302, 0.80221558, 0.09750366 } }; | ||
|
||
SrcCoef *__AXFXGetSrcCoef(int idx) { return &__SrcTab12khz[idx]; } |