Two sound API bugs slipped into b14. Fixed.

This commit is contained in:
Scott Duensing 2020-04-02 20:56:22 -05:00
parent 127ac9891b
commit e8779a528e
3 changed files with 9 additions and 8 deletions

View file

@ -696,7 +696,7 @@ int32_t apiDiscSkipForward(lua_State *L) {
} }
} }
} else { } else {
luaDie(L, "discSkipForward", "Failed! Disc is stopped."); luaTrace(L, "discSkipForward", "Failed! Disc is stopped.");
return 0; return 0;
} }
@ -1480,13 +1480,13 @@ int32_t apiSoundPlay(lua_State *L) {
// Play it (can gracefully fail if we run out of channels) // Play it (can gracefully fail if we run out of channels)
r = Mix_PlayChannel(-1, sound->chunk, 0); r = Mix_PlayChannel(-1, sound->chunk, 0);
if (r >= 0) { if (r >= 0) {
Mix_Volume(result, _global.effectsVolume * 2); Mix_Volume(r, _global.effectsVolume * 2);
} }
result = true; result = true;
} }
} }
if (sound) { if (result) {
luaTrace(L, "soundPlay", "%d", r); luaTrace(L, "soundPlay", "%d", r);
} else { } else {
luaDie(L, "soundPlay", "Failed!"); luaDie(L, "soundPlay", "Failed!");
@ -1596,6 +1596,7 @@ int32_t apiSoundIsPlaying(lua_State *L) {
if (lua_isnumber(L, 1)) { if (lua_isnumber(L, 1)) {
d = lua_tonumber(L, 1); channel = (int32_t)d; d = lua_tonumber(L, 1); channel = (int32_t)d;
r = (bool)Mix_Playing(channel); r = (bool)Mix_Playing(channel);
result = true;
} }
} }

View file

@ -31,7 +31,7 @@
// Don't forget to update singe.rc! // Don't forget to update singe.rc!
#define SINGE_VERSION 2.00 #define SINGE_VERSION 2.00
#define VERSION_STRING "v2.00b14" #define VERSION_STRING "v2.00b15"
#define COPYRIGHT_END_YEAR "2020" #define COPYRIGHT_END_YEAR "2020"

View file

@ -1,7 +1,7 @@
101 ICON "/tmp/icon.ico" 101 ICON "/tmp/icon.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 2,0,0,14 FILEVERSION 2,0,0,15
PRODUCTVERSION 2,0,0,14 PRODUCTVERSION 2,0,0,15
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
@ -9,12 +9,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Kangaroo Punch Studios" VALUE "CompanyName", "Kangaroo Punch Studios"
VALUE "FileDescription", "Somewhat Interactive Nostalgic Game Engine" VALUE "FileDescription", "Somewhat Interactive Nostalgic Game Engine"
VALUE "FileVersion", "2.00b14" VALUE "FileVersion", "2.00b15"
VALUE "InternalName", "Singe" VALUE "InternalName", "Singe"
VALUE "LegalCopyright", "Copyright 2006-2020 Scott C. Duensing" VALUE "LegalCopyright", "Copyright 2006-2020 Scott C. Duensing"
VALUE "OriginalFilename", "singe.exe" VALUE "OriginalFilename", "singe.exe"
VALUE "ProductName", "Singe" VALUE "ProductName", "Singe"
VALUE "ProductVersion", "2.00b14" VALUE "ProductVersion", "2.00b15"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"