Fixed right-channel missing bug in disc audio mixer. Fixed discAudio() command.
This commit is contained in:
parent
94071d5ec1
commit
aa16512939
4 changed files with 11 additions and 8 deletions
|
@ -64,6 +64,8 @@ __attribute__((noreturn))
|
|||
void showUsage(char *name, char *message) {
|
||||
int result = 0;
|
||||
|
||||
// 00000000011111111112222222222333333333344444444445555555555666666666677777777778
|
||||
// 12345678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
utilSay(" ___ ___ _ _ ___ ___");
|
||||
utilSay("/ __|_ _| \\| |/ __| __| Somewhat Interactive Nostalgic Game Emulator %s", VERSION_STRING);
|
||||
utilSay("\\__ \\| || .` | (_ | _| Copyright (c) 2006-%s Scott C. Duensing", COPYRIGHT_END_YEAR);
|
||||
|
@ -80,8 +82,6 @@ void showUsage(char *name, char *message) {
|
|||
utilSay(" -w, --fullscreen_window run in windowed full screen mode");
|
||||
utilSay(" -l, --volume_vldp=PERCENT specify laserdisc volume in percent");
|
||||
utilSay(" -e, --volume_nonvldp=PERCENT specify sound effects volume in percent");
|
||||
// 00000000011111111112222222222333333333344444444445555555555666666666677777777778
|
||||
// 12345678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
utilSay(" -z, --scalefactor=PERCENT reduce screen size for overscan compensation");
|
||||
utilSay(" -a, --aspect=N:D force aspect ratio");
|
||||
utilSay(" -u, --stretch use ugly stretched video");
|
||||
|
|
|
@ -458,9 +458,10 @@ int apiDiscAudio(lua_State *L) {
|
|||
if (lua_isnumber(L, 1)) {
|
||||
if (lua_isboolean(L, 2)) {
|
||||
d = lua_tonumber(L, 1); channel = (int)d;
|
||||
d = lua_tonumber(L, 2); onOff = (bool)d;
|
||||
if ((channel == 1) && onOff) left = _confVolumeVldp;
|
||||
if ((channel == 2) && onOff) right = _confVolumeVldp;
|
||||
d = lua_toboolean(L, 2); onOff = (bool)d;
|
||||
videoGetVolume(_videoHandle, &left, &right);
|
||||
if (channel == 1) left = (onOff ? _confVolumeVldp : 0);
|
||||
if (channel == 2) right = (onOff ? _confVolumeVldp : 0);
|
||||
videoSetVolume(_videoHandle, left, right);
|
||||
result = true;
|
||||
}
|
||||
|
@ -663,6 +664,8 @@ int apiDiscSkipToFrame(lua_State *L) {
|
|||
} else {
|
||||
luaTrace(L, "discSkipToFrame", "Failed!");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -934,7 +937,7 @@ int apiOverlayPrint(lua_State *L) {
|
|||
if (n == 3) {
|
||||
if (lua_isnumber(L, 1)) {
|
||||
if (lua_isnumber(L, 2)) {
|
||||
if (lua_isnumber(L, 3)) {
|
||||
if (lua_isstring(L, 3)) {
|
||||
//***TODO*** g_pSingeIn->draw_string((char *)lua_tostring(L, 3), lua_tonumber(L, 1), lua_tonumber(L, 2), g_se_surface);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
|
||||
#define SINGE_VERSION 2.00
|
||||
#define VERSION_STRING "v2.00"
|
||||
#define VERSION_STRING "v2.00b4"
|
||||
#define COPYRIGHT_END_YEAR "2020"
|
||||
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ void _dequeueVideoAudio(int channel, void *stream, int bytes, void *udata) {
|
|||
Mix_Volume(channel, MIX_MAX_VOLUME);
|
||||
for (i=0; i<bytesRead / 2; i+=2) {
|
||||
data[i] = (Sint16)((float)data[i] * (float)v->volumeLeft * (float)0.01);
|
||||
data[i + 1] = (Sint16)((float)data[i] * (float)v->volumeRight * (float)0.01);
|
||||
data[i + 1] = (Sint16)((float)data[i + 1] * (float)v->volumeRight * (float)0.01);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue