made decode() always return new SoundData

--HG--
branch : minor-manual-decoders
This commit is contained in:
Raidho
2016-10-23 21:09:13 +03:00
parent 78f5779214
commit a605243709
3 changed files with 23 additions and 23 deletions
+12
View File
@@ -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.