mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
made decode() always return new SoundData
--HG-- branch : minor-manual-decoders
This commit is contained in:
@@ -66,6 +66,18 @@ public:
|
||||
**/
|
||||
SoundData *newSoundData(int samples, int sampleRate, int bitDepth, int channels);
|
||||
|
||||
/**
|
||||
* Creates a new SoundData with the specified number of samples and format
|
||||
* and loads data from specified buffer.
|
||||
* @param data Buffer to load data from.
|
||||
* @param samples The number of samples.
|
||||
* @param sampleRate Number of samples per second.
|
||||
* @param bitDepth Bits per sample (8 or 16).
|
||||
* @param channels Either 1 for mono, or 2 for stereo.
|
||||
* @return A new SoundData object, or zero in case of errors.
|
||||
**/
|
||||
SoundData *newSoundData(void *data, int samples, int sampleRate, int bitDepth, int channels);
|
||||
|
||||
/**
|
||||
* Attempts to find a decoder for the encoded sound data in the
|
||||
* specified file.
|
||||
|
||||
Reference in New Issue
Block a user