Rename love.audio.setMixMode to setMixWithSystem. Fix some copyright notice typos.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-07-29 23:22:54 -03:00
parent 17cf7bba83
commit 02aa7937a1
12 changed files with 39 additions and 25 deletions
+18 -2
View File
@@ -13,18 +13,34 @@
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered Audio versions must be plainly marked as such, and must not be
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any Audio distribution.
* 3. This notice may not be removed or altered from any source distribution.
**/
#include "Audio.h"
#include "common/config.h"
#ifdef LOVE_IOS
#include "common/ios.h"
#endif
namespace love
{
namespace audio
{
bool Audio::setMixWithSystem(bool mix)
{
#ifdef LOVE_IOS
love::ios::setAudioMixWithOthers(mix);
return true;
#else
LOVE_UNUSED(mix);
return false;
#endif
}
StringMap<Audio::DistanceModel, Audio::DISTANCE_MAX_ENUM>::Entry Audio::distanceModelEntries[] =
{
{"none", Audio::DISTANCE_NONE},
+7 -1
View File
@@ -9,7 +9,7 @@
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented = 0; you must not
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
@@ -256,6 +256,12 @@ public:
*/
virtual bool isEFXsupported() const = 0;
/**
* Sets whether audio from other apps mixes with love.audio or is muted,
* on supported platforms.
**/
bool setMixWithSystem(bool mix);
private:
static StringMap<DistanceModel, DISTANCE_MAX_ENUM>::Entry distanceModelEntries[];
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2016 LOVE Development Team
* Copyright (c) 2006-2017 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2016 LOVE Development Team
* Copyright (c) 2006-2017 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
+1 -1
View File
@@ -9,7 +9,7 @@
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented = 0; you must not
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
+1 -1
View File
@@ -9,7 +9,7 @@
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented = 0; you must not
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
+1 -1
View File
@@ -9,7 +9,7 @@
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented = 0; you must not
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
+1 -1
View File
@@ -9,7 +9,7 @@
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented = 0; you must not
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
+1 -1
View File
@@ -9,7 +9,7 @@
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented = 0; you must not
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
+4 -12
View File
@@ -25,9 +25,6 @@
#include "null/Audio.h"
#include "common/runtime.h"
#ifdef LOVE_IOS
#include "common/ios.h"
#endif
// C++
#include <iostream>
@@ -521,15 +518,10 @@ int w_isEffectsSupported(lua_State *L)
return 1;
}
#ifdef LOVE_IOS
int w_setMixMode(lua_State *L)
int w_setMixWithSystem(lua_State *L)
{
love::ios::setAudioMixWithOthers(lua_toboolean(L, 1));
#else
int w_setMixMode(lua_State *)
{
#endif
return 0;
luax_pushboolean(L, instance()->setMixWithSystem(luax_toboolean(L, 1)));
return 1;
}
// List of functions to wrap.
@@ -562,7 +554,7 @@ static const luaL_Reg functions[] =
{ "getMaxSceneEffects", w_getMaxSceneEffects },
{ "getMaxSourceEffects", w_getMaxSourceEffects },
{ "isEffectsSupported", w_isEffectsSupported },
{ "setMixMode", w_setMixMode },
{ "setMixWithSystem", w_setMixWithSystem },
{ 0, 0 }
};