Difference between revisions of "love.sound.newDecoder"

(Added old functions with 'removed in' tags)
(4 intermediate revisions by 3 users not shown)
Line 7: Line 7:
 
=== Arguments ===
 
=== Arguments ===
 
{{param|File|file|The file with encoded sound data.}}
 
{{param|File|file|The file with encoded sound data.}}
{{param|number|buffer (1024)|The size of each decoded chunk, in bytes.}}
+
{{param|number|buffer (2048)|The size of each decoded chunk, in bytes.}}
 
=== Returns ===
 
=== Returns ===
 
{{param|Decoder|decoder|A new Decoder object.}}
 
{{param|Decoder|decoder|A new Decoder object.}}
Line 17: Line 17:
 
=== Arguments ===
 
=== Arguments ===
 
{{param|string|filename|The filename of the file with encoded sound data.}}
 
{{param|string|filename|The filename of the file with encoded sound data.}}
{{param|number|buffer (1024)|The size of each decoded chunk, in bytes.}}
+
{{param|number|buffer (2048)|The size of each decoded chunk, in bytes.}}
 
=== Returns ===
 
=== Returns ===
 
{{param|Decoder|decoder|A new Decoder object.}}
 
{{param|Decoder|decoder|A new Decoder object.}}
 
== Function ==
 
== Function ==
{{oldin|[[0.7.1]]|type=variant}}
+
{{oldin|[[0.7.1]]|071|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 28: Line 28:
 
=== Arguments ===
 
=== Arguments ===
 
{{param|File|file|The file with encoded sound data.}}
 
{{param|File|file|The file with encoded sound data.}}
{{param|number|buffer (1024)|The size of each decoded chunk, in bytes.}}
+
{{param|number|buffer (2048)|The size of each decoded chunk, in bytes.}}
 
{{param|number|rate (44100)|Samples per second, or quality of the audio. Use either 44100 (good), 22050 (medium) or 11025 (poor).}}
 
{{param|number|rate (44100)|Samples per second, or quality of the audio. Use either 44100 (good), 22050 (medium) or 11025 (poor).}}
 
=== Returns ===
 
=== Returns ===
 
{{param|Decoder|decoder|A new Decoder object.}}
 
{{param|Decoder|decoder|A new Decoder object.}}
 
== Function ==
 
== Function ==
{{oldin|[[0.7.1]]|type=variant}}
+
{{oldin|[[0.7.1]]|071|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 40: Line 40:
 
=== Arguments ===
 
=== Arguments ===
 
{{param|string|filename|The filename of the file with encoded sound data.}}
 
{{param|string|filename|The filename of the file with encoded sound data.}}
{{param|number|buffer (1024)|The size of each decoded chunk, in bytes.}}
+
{{param|number|buffer (2048)|The size of each decoded chunk, in bytes.}}
 
{{param|number|rate (44100)|Samples per second, or quality of the audio. Use either 44100 (good), 22050 (medium) or 11025 (poor).}}
 
{{param|number|rate (44100)|Samples per second, or quality of the audio. Use either 44100 (good), 22050 (medium) or 11025 (poor).}}
 
=== Returns ===
 
=== Returns ===
Line 46: Line 46:
 
== See Also ==
 
== See Also ==
 
* [[parent::love.sound]]
 
* [[parent::love.sound]]
 +
* [[Constructs::Decoder]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Attempts to find a decoder for the encoded sound data in the specified file.}}
 
{{#set:Description=Attempts to find a decoder for the encoded sound data in the specified file.}}
== See Also ==
+
{{#set:Since=000}}
* [[parent::love.sound]]
 
[[Category:Functions]]
 
{{#set:Description=Attempts to find a decoder for the encoded sound data in the specified file.}}
 
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.sound.newDecoder}}
 
{{i18n|love.sound.newDecoder}}

Revision as of 02:06, 27 August 2013

Attempts to find a decoder for the encoded sound data in the specified file.

Function

Synopsis

decoder = love.sound.newDecoder( file, buffer )

Arguments

File file
The file with encoded sound data.
number buffer (2048)
The size of each decoded chunk, in bytes.

Returns

Decoder decoder
A new Decoder object.

Function

Synopsis

decoder = love.sound.newDecoder( filename, buffer )

Arguments

string filename
The filename of the file with encoded sound data.
number buffer (2048)
The size of each decoded chunk, in bytes.

Returns

Decoder decoder
A new Decoder object.

Function

Removed in LÖVE 0.7.1
This variant is not supported in that and later versions.

Synopsis

decoder = love.sound.newDecoder( file, buffer, rate )

Arguments

File file
The file with encoded sound data.
number buffer (2048)
The size of each decoded chunk, in bytes.
number rate (44100)
Samples per second, or quality of the audio. Use either 44100 (good), 22050 (medium) or 11025 (poor).

Returns

Decoder decoder
A new Decoder object.

Function

Removed in LÖVE 0.7.1
This variant is not supported in that and later versions.

Synopsis

decoder = love.sound.newDecoder( filename, buffer, rate )

Arguments

string filename
The filename of the file with encoded sound data.
number buffer (2048)
The size of each decoded chunk, in bytes.
number rate (44100)
Samples per second, or quality of the audio. Use either 44100 (good), 22050 (medium) or 11025 (poor).

Returns

Decoder decoder
A new Decoder object.

See Also


Other Languages