Mercurial > love-experiments
annotate src/scripts/audio.lua @ 1448:108ee2e81f65 default tip
Fix a case typo, imageData.h -> ImageData.h
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sat, 18 Jan 2014 13:57:44 +0100 |
| parents | b7f097053d74 |
| children |
| rev | line source |
|---|---|
| 1096 | 1 --[[ |
|
1282
b7f097053d74
Updated copyright text for the new year
Alex Szpakowski <slime73@gmail.com>
parents:
1096
diff
changeset
|
2 Copyright (c) 2006-2013 LOVE Development Team |
| 1096 | 3 |
| 4 This software is provided 'as-is', without any express or implied | |
| 5 warranty. In no event will the authors be held liable for any damages | |
| 6 arising from the use of this software. | |
| 7 | |
| 8 Permission is granted to anyone to use this software for any purpose, | |
| 9 including commercial applications, and to alter it and redistribute it | |
| 10 freely, subject to the following restrictions: | |
| 11 | |
| 12 1. The origin of this software must not be misrepresented; you must not | |
| 13 claim that you wrote the original software. If you use this software | |
| 14 in a product, an acknowledgment in the product documentation would be | |
| 15 appreciated but is not required. | |
| 16 2. Altered source versions must be plainly marked as such, and must not be | |
| 17 misrepresented as being the original software. | |
| 18 3. This notice may not be removed or altered from any source distribution. | |
| 19 --]] | |
| 20 | |
| 21 function love.audio.newSource(a, b) | |
| 22 if type(a) == "string" then | |
| 23 a = love.filesystem.newFile(a) | |
| 24 end | |
| 25 if type(a) == "userdata" then | |
| 26 if a:typeOf("File") then | |
| 27 a = love.sound.newDecoder(a) | |
| 28 end | |
| 29 | |
| 30 if a:typeOf("Decoder") then | |
| 31 if b == "static" then | |
| 32 a = love.sound.newSoundData(a) | |
| 33 end | |
| 34 return love.audio.newSource1(a) | |
| 35 end | |
| 36 if a:typeOf("SoundData") then | |
| 37 return love.audio.newSource1(a) | |
| 38 end | |
| 39 end | |
| 40 error("No matching overload") | |
|
210
1401d3998edd
Major developments to love.audio/love.sound. Music and Sound are gone. There are only Sources now, which is much cleaner.
rude
parents:
diff
changeset
|
41 end |
