Commits

Alex Szpakowski  committed ec35bd4

Improved error checking for some enum strings (resolves issue #690).

Also moved love.audio.newSource from Lua code into C++ code

  • Participants
  • Parent commits 87161dc

Comments (0)

Files changed (9)

File platform/macosx/love-framework.xcodeproj/project.pbxproj

 		53C6151E07FB1E3471590CB9 /* ltn12.lua.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ltn12.lua.h; sourceTree = "<group>"; };
 		53EE57FF4DBD52BB22701160 /* ParticleSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ParticleSystem.h; sourceTree = "<group>"; };
 		54A13C2209F945671BC27974 /* FileData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FileData.h; sourceTree = "<group>"; };
-		54CC34F563B7405046FF1E43 /* audio.lua.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = audio.lua.h; sourceTree = "<group>"; };
 		54E653E84E8873D467C750FC /* mime.lua.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mime.lua.h; sourceTree = "<group>"; };
 		54E85987318206E93DC8189F /* PolygonShape.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PolygonShape.cpp; sourceTree = "<group>"; };
 		55A759CE711E157339930E58 /* b2BlockAllocator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = b2BlockAllocator.cpp; sourceTree = "<group>"; };
 		FA577A8616C71CF000860150 /* Shader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shader.h; sourceTree = "<group>"; };
 		FA577A8716C71CF000860150 /* wrap_Shader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Shader.cpp; sourceTree = "<group>"; };
 		FA577A8816C71CF000860150 /* wrap_Shader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Shader.h; sourceTree = "<group>"; };
-		FA577A8B16C71D3600860150 /* audio.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = audio.lua; sourceTree = "<group>"; };
 		FA577A8C16C71D3600860150 /* auto.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = auto.lua; sourceTree = "<group>"; };
 		FA577A8D16C71D3600860150 /* boot.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = boot.lua; sourceTree = "<group>"; };
 		FA577A8E16C71D3600860150 /* graphics.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = graphics.lua; sourceTree = "<group>"; };
 		352E6C5F6F8A681766EB5299 /* scripts */ = {
 			isa = PBXGroup;
 			children = (
-				FA577A8B16C71D3600860150 /* audio.lua */,
-				54CC34F563B7405046FF1E43 /* audio.lua.h */,
 				FA577A8C16C71D3600860150 /* auto.lua */,
 				FA577A8D16C71D3600860150 /* boot.lua */,
 				503971A86B7167A91B670FBA /* boot.lua.h */,

File src/modules/audio/wrap_Audio.cpp

 #include "openal/Audio.h"
 #include "null/Audio.h"
 
-#include "scripts/audio.lua.h"
-
 #include "common/runtime.h"
 
 namespace love
 	return 1;
 }
 
-int w_newSource1(lua_State *L)
+int w_newSource(lua_State *L)
 {
+	if (lua_isstring(L, 1) || luax_istype(L, 1, FILESYSTEM_FILE_T))
+		luax_convobj(L, 1, "filesystem", "newFileData");
+
+	if (luax_istype(L, 1, FILESYSTEM_FILE_DATA_T))
+		luax_convobj(L, 1, "sound", "newDecoder");
+
+	Source::Type stype = Source::TYPE_STREAM;
+
+	const char *stypestr = lua_isnoneornil(L, 2) ? 0 : lua_tostring(L, 2);
+	if (stypestr && !Source::getConstant(stypestr, stype))
+		return luaL_error(L, "Invalid source type: %s", stypestr);
+
+	if (stype == Source::TYPE_STATIC && luax_istype(L, 1, SOUND_DECODER_T))
+		luax_convobj(L, 1, "sound", "newSoundData");
+
 	Source *t = 0;
 
 	if (luax_istype(L, 1, SOUND_SOUND_DATA_T))
 		return 1;
 	}
 	else
-		return luaL_error(L, "No matching overload");
-
-	return 0;
+		return luax_typerror(L, 1, "Decoder or SoundData");
 }
 
 int w_play(lua_State *L)
 static const luaL_Reg functions[] =
 {
 	{ "getSourceCount", w_getSourceCount },
-	{ "newSource1", w_newSource1 },
+	{ "newSource", w_newSource },
 	{ "play", w_play },
 	{ "stop", w_stop },
 	{ "pause", w_pause },
 
 	int n = luax_register_module(L, w);
 
-	if (luaL_loadbuffer(L, (const char *)audio_lua, sizeof(audio_lua), "audio.lua") == 0)
-		lua_call(L, 0, 0);
-
 	return n;
 }
 

File src/modules/audio/wrap_Audio.h

 {
 
 int w_getSourceCount(lua_State *L);
-int w_newSource1(lua_State *L);
+int w_newSource(lua_State *L);
 int w_play(lua_State *L);
 int w_stop(lua_State *L);
 int w_pause(lua_State *L);

File src/modules/audio/wrap_Source.cpp

 	Source *t = luax_checksource(L, 1);
 	float offset = (float)luaL_checknumber(L, 2);
 	if (offset < 0)
-		return luaL_error(L, "Can't seek to a negative position");
+		return luaL_argerror(L, 2, "can't seek to a negative position");
 
-	const char *unit = luaL_optstring(L, 3, "seconds");
-	Source::Unit u;
-	t->getConstant(unit, u);
+	Source::Unit u = Source::UNIT_SECONDS;
+	const char *unit = lua_isnoneornil(L, 3) ? 0 : lua_tostring(L, 3);
+	if (unit && !t->getConstant(unit, u))
+		return luaL_error(L, "Invalid Source time unit: %s", unit);
+
 	t->seek(offset, u);
 	return 0;
 }
 int w_Source_tell(lua_State *L)
 {
 	Source *t = luax_checksource(L, 1);
-	const char *unit = luaL_optstring(L, 2, "seconds");
-	Source::Unit u;
-	t->getConstant(unit, u);
+
+	Source::Unit u = Source::UNIT_SECONDS;
+	const char *unit = lua_isnoneornil(L, 2) ? 0 : lua_tostring(L, 2);
+	if (unit && !t->getConstant(unit, u))
+		return luaL_error(L, "Invalid Source time unit: %s", unit);
+
 	lua_pushnumber(L, t->tell(u));
 	return 1;
 }

File src/modules/filesystem/physfs/wrap_Filesystem.cpp

 
 	FileData::Decoder decoder = FileData::FILE;
 
-	if (decstr)
-		FileData::getConstant(decstr, decoder);
+	if (decstr && !FileData::getConstant(decstr, decoder))
+		return luaL_error(L, "Invalid FileData decoder: %s", decstr);
 
 	FileData *t = 0;
 
 		t = instance->newFileData(str, filename);
 		break;
 	default:
-		return luaL_error(L, "Unrecognized FileData decoder: %s", decstr);
+		return luaL_error(L, "Invalid FileData decoder: %s", decstr);
 	}
 
 	luax_newtype(L, "FileData", FILESYSTEM_FILE_DATA_T, (void *)t);

File src/modules/graphics/opengl/wrap_Graphics.cpp

 	SpriteBatch::UsageHint usage = SpriteBatch::USAGE_DYNAMIC;
 	if (lua_gettop(L) > 2)
 	{
-		if (!SpriteBatch::getConstant(luaL_checkstring(L, 3), usage))
-			usage = SpriteBatch::USAGE_DYNAMIC;
+		const char *usagestr = luaL_checkstring(L, 3);
+		if (!SpriteBatch::getConstant(usagestr, usage))
+			return luaL_error(L, "Invalid SpriteBatch usage: %s", usagestr);
 	}
 	SpriteBatch *t = NULL;
 	try

File src/modules/physics/box2d/wrap_Physics.cpp

 	World *world = luax_checktype<World>(L, 1, "World", PHYSICS_WORLD_T);
 	float x = (float)luaL_optnumber(L, 2, 0.0);
 	float y = (float)luaL_optnumber(L, 3, 0.0);
-	const char *type = luaL_optstring(L, 4, "static");
-	Body::Type bodyType;
-	Body::getConstant(type, bodyType);
+
+	Body::Type btype = Body::BODY_STATIC;
+	const char *typestr = lua_isnoneornil(L, 4) ? 0 : lua_tostring(L, 4);
+	if (typestr && !Body::getConstant(typestr, btype))
+		return luaL_error(L, "Invalid Body type: %s", typestr);
+
 	Body *body;
-	ASSERT_GUARD(body = instance->newBody(world, x, y, bodyType);)
+	ASSERT_GUARD(body = instance->newBody(world, x, y, btype);)
 	luax_newtype(L, "Body", PHYSICS_BODY_T, (void *)body);
 	return 1;
 }

File src/scripts/audio.lua

---[[
-Copyright (c) 2006-2013 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
-arising from the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-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; 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.
-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 source distribution.
---]]
-
-function love.audio.newSource(a, b)
-	if type(a) == "string" then
-		local err
-		a, err = love.filesystem.newFileData(a)
-		if not a then
-			error(err, 2)
-		end
-	end
-	if type(a) == "userdata" then
-		if a:typeOf("File") or a:typeOf("FileData") then
-			a = love.sound.newDecoder(a)
-		end
-		
-		if a:typeOf("Decoder") then
-			if b == "static" then
-				a = love.sound.newSoundData(a)
-			end
-			return love.audio.newSource1(a)
-		end
-		if a:typeOf("SoundData") then
-			return love.audio.newSource1(a)
-		end
-	end
-	error("No matching function overload", 2)
-end

File src/scripts/audio.lua.h

-/**
- * Copyright (c) 2006-2013 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
- * arising from the use of this software.
- * 
- * Permission is granted to anyone to use this software for any purpose,
- * 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; 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.
- * 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 source distribution.
- **/
-
-namespace love
-{
-
-// [audio.lua]
-const unsigned char audio_lua[] = 
-{
-
-	0x2d, 0x2d, 0x5b, 0x5b, 0x0a,
-	0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30, 0x30, 0x36, 
-	0x2d, 0x32, 0x30, 0x31, 0x33, 0x20, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 
-	0x6d, 0x65, 0x6e, 0x74, 0x20, 0x54, 0x65, 0x61, 0x6d, 0x0a,
-	0x54, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 
-	0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x27, 0x61, 0x73, 0x2d, 0x69, 0x73, 0x27, 0x2c, 0x20, 0x77, 
-	0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 
-	0x20, 0x6f, 0x72, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x0a,
-	0x77, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x74, 0x79, 0x2e, 0x20, 0x20, 0x49, 0x6e, 0x20, 0x6e, 0x6f, 0x20, 0x65, 
-	0x76, 0x65, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x75, 0x74, 0x68, 
-	0x6f, 0x72, 0x73, 0x20, 0x62, 0x65, 0x20, 0x68, 0x65, 0x6c, 0x64, 0x20, 0x6c, 0x69, 0x61, 0x62, 0x6c, 0x65, 
-	0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x0a,
-	0x61, 0x72, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 
-	0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 
-	0x65, 0x2e, 0x0a,
-	0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 
-	0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x75, 
-	0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x66, 
-	0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x2c, 0x0a,
-	0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x69, 
-	0x61, 0x6c, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x61, 
-	0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 
-	0x20, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x69, 0x74, 0x0a,
-	0x66, 0x72, 0x65, 0x65, 0x6c, 0x79, 0x2c, 0x20, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 
-	0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x73, 
-	0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0a,
-	0x31, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 
-	0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 
-	0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6d, 0x69, 0x73, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 
-	0x74, 0x65, 0x64, 0x3b, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x0a,
-	0x20, 0x20, 0x20, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 
-	0x77, 0x72, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 
-	0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 
-	0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x0a,
-	0x20, 0x20, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2c, 0x20, 0x61, 
-	0x6e, 0x20, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 
-	0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x64, 0x6f, 0x63, 0x75, 
-	0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x0a,
-	0x20, 0x20, 0x20, 0x61, 0x70, 0x70, 0x72, 0x65, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x75, 0x74, 
-	0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x2e, 0x0a,
-	0x32, 0x2e, 0x20, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 
-	0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x70, 
-	0x6c, 0x61, 0x69, 0x6e, 0x6c, 0x79, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x73, 
-	0x75, 0x63, 0x68, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 
-	0x62, 0x65, 0x0a,
-	0x20, 0x20, 0x20, 0x6d, 0x69, 0x73, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 
-	0x61, 0x73, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 
-	0x6e, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x0a,
-	0x33, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x6d, 0x61, 0x79, 
-	0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x6f, 0x72, 
-	0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x6e, 0x79, 0x20, 
-	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 
-	0x6e, 0x2e, 0x0a,
-	0x2d, 0x2d, 0x5d, 0x5d, 0x0a,
-	0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 
-	0x6f, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x61, 0x2c, 0x20, 0x62, 0x29, 0x0a,
-	0x09, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x61, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x74, 
-	0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x65, 0x72, 0x72, 0x0a,
-	0x09, 0x09, 0x61, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69, 
-	0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x61, 
-	0x74, 0x61, 0x28, 0x61, 0x29, 0x0a,
-	0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x65, 0x72, 0x72, 0x2c, 0x20, 0x32, 0x29, 0x0a,
-	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
-	0x09, 0x65, 0x6e, 0x64, 0x0a,
-	0x09, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x61, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x75, 0x73, 
-	0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x69, 0x66, 0x20, 0x61, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x66, 0x28, 0x22, 0x46, 0x69, 0x6c, 
-	0x65, 0x22, 0x29, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x66, 0x28, 0x22, 0x46, 
-	0x69, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x61, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x73, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 
-	0x6e, 0x65, 0x77, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x28, 0x61, 0x29, 0x0a,
-	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
-	0x09, 0x09, 0x0a,
-	0x09, 0x09, 0x69, 0x66, 0x20, 0x61, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x66, 0x28, 0x22, 0x44, 0x65, 0x63, 
-	0x6f, 0x64, 0x65, 0x72, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x62, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 
-	0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x09, 0x61, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x73, 0x6f, 0x75, 0x6e, 0x64, 
-	0x2e, 0x6e, 0x65, 0x77, 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x28, 0x61, 0x29, 0x0a,
-	0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
-	0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 
-	0x69, 0x6f, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x31, 0x28, 0x61, 0x29, 0x0a,
-	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
-	0x09, 0x09, 0x69, 0x66, 0x20, 0x61, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x66, 0x28, 0x22, 0x53, 0x6f, 0x75, 
-	0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 
-	0x69, 0x6f, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x31, 0x28, 0x61, 0x29, 0x0a,
-	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
-	0x09, 0x65, 0x6e, 0x64, 0x0a,
-	0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x4e, 0x6f, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 
-	0x67, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 
-	0x64, 0x22, 0x2c, 0x20, 0x32, 0x29, 0x0a,
-	0x65, 0x6e, 0x64, 0x0a,
-}; // [audio.lua]
-} // love