Difference between revisions of "love.sound.newDecoder"

(Default buffer size changed in 0.6.1 to 2048.)
m
 
(2 intermediate revisions by 2 users not shown)
Line 21: Line 21:
 
{{param|Decoder|decoder|A new Decoder object.}}
 
{{param|Decoder|decoder|A new Decoder object.}}
 
== Function ==
 
== Function ==
{{oldin|[[0.7.1]]|type=variant}}
+
=== Synopsis ===
 +
<source lang="lua">
 +
decoder = love.sound.newDecoder( filedata, buffer )
 +
</source>
 +
=== Arguments ===
 +
{{param|FileData|filedata|The encoded file data to decode into sound data.}}
 +
{{param|number|buffer (2048)|The size of each decoded chunk, in bytes.}}
 +
=== Returns ===
 +
{{param|Decoder|decoder|A new Decoder object.}}
 +
== Function ==
 +
{{oldin|[[0.7.1]]|071|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 33: Line 43:
 
{{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">

Latest revision as of 21:02, 22 April 2022

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

Synopsis

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

Arguments

FileData filedata
The encoded file data to decode into 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