Attempts to find a decoder for the encoded sound data in the specified file.
== Function ==
=== Synopsis ===
<source lang="lua">
decoder = love.sound.newDecoder( file, buffer )
</source>
=== Arguments ===
{{param|File|file|The file with encoded sound data.}}
{{param|number|buffer (2048)|The size of each decoded chunk, in bytes.}}
=== Returns ===
{{param|Decoder|decoder|A new Decoder object.}}
== Function ==
=== Synopsis ===
<source lang="lua">
decoder = love.sound.newDecoder( filename, buffer )
</source>
=== Arguments ===
{{param|string|filename|The filename of the file with encoded 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 ===
<source lang="lua">
decoder = love.sound.newDecoder( file, buffer, rate )
</source>
=== Arguments ===
{{param|File|file|The file with encoded sound data.}}
{{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).}}
=== Returns ===
{{param|Decoder|decoder|A new Decoder object.}}
== Function ==
{{oldin|[[0.7.1]]|071|type=variant}}
=== Synopsis ===
<source lang="lua">
decoder = love.sound.newDecoder( filename, buffer, rate )
</source>
=== Arguments ===
{{param|string|filename|The filename of the file with encoded sound data.}}
{{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).}}
=== Returns ===
{{param|Decoder|decoder|A new Decoder object.}}
== See Also ==
* [[parent::love.sound]]
* [[Constructs::Decoder]]
[[Category:Functions]]
{{#set:Description=Attempts to find a decoder for the encoded sound data in the specified file.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|love.sound.newDecoder}}