diff --git a/src/scripts/audio.lua b/src/scripts/audio.lua index c2946bac7..31d20c26c 100644 --- a/src/scripts/audio.lua +++ b/src/scripts/audio.lua @@ -20,10 +20,10 @@ freely, subject to the following restrictions: function love.audio.newSource(a, b) if type(a) == "string" then - a = love.filesystem.newFile(a) + a = love.filesystem.newFileData(a) end if type(a) == "userdata" then - if a:typeOf("File") then + if a:typeOf("File") or a:typeOf("FileData") then a = love.sound.newDecoder(a) end @@ -37,5 +37,5 @@ function love.audio.newSource(a, b) return love.audio.newSource1(a) end end - error("No matching overload") + error("No matching function overload", 2) end \ No newline at end of file diff --git a/src/scripts/audio.lua.h b/src/scripts/audio.lua.h index 1350c64e6..0ab50e7df 100644 --- a/src/scripts/audio.lua.h +++ b/src/scripts/audio.lua.h @@ -84,12 +84,13 @@ const unsigned char audio_lua[] = 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, 0x61, 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, 0x28, 0x61, 0x29, 0x0a, + 0x74, 0x65, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x28, 0x61, 0x29, 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, 0x74, 0x68, 0x65, 0x6e, 0x0a, + 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, @@ -111,7 +112,8 @@ const unsigned char audio_lua[] = 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, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x29, 0x0a, + 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 \ No newline at end of file