case AL_FORMAT_MONO16:
_tracks = 1; _bits = 16; _compressed = false;
break;
- case AL_FORMAT_STEREO8:
- _tracks = 2; _bits = 8; _compressed = false;
- break;
- case AL_FORMAT_STEREO16:
- _tracks = 2; _bits = 16; _compressed = false;
- break;
#ifdef AL_EXT_MULAW_MCFORMATS
case AL_FORMAT_MONO_MULAW:
- _tracks = 1; _bits = 16; _compressed = true;
+ _tracks = 1; _bits = 8; _compressed = true;
break;
- case AL_FORMAT_STEREO_MULAW:
- _tracks = 2; _bits = 16; _compressed = true;
+#endif
+#ifdef AL_EXT_IMA4
+ case AL_EXT_IMA4:
+ _tracks = 1; _bits = 4; _compressed = true;
break;
#endif
default:
unsigned int rv = AL_FORMAT_MONO16;
if (_tracks == 1 && _bits == 8) rv = AL_FORMAT_MONO8;
- else if (_tracks == 2 && _bits == 8) rv = AL_FORMAT_STEREO8;
- else if (_tracks == 2 && _bits == 16) rv = AL_FORMAT_STEREO16;
#ifdef AL_EXT_MULAW_MCFORMATS
- else if (_tracks == 1 && _bits == 16 && _compressed) rv = AL_FORMAT_MONO_MULAW;
- else if (_tracks == 2 && _bits == 16 && _compressed) rv = AL_FORMAT_STEREO_MULAW;
+ else if (_tracks == 1 && _bits == 8 && _compressed)
+ rv = AL_FORMAT_MONO_MULAW;
+#endif
+#ifdef AL_EXT_IMA4
+ else if (_tracks == 1 && _bits == 4 && _compressed)
+ rv = AL_EXT_IMA4;
#endif
return rv;
SG_SAMPLE_8BITS = 8,
SG_SAMPLE_16BITS = 16,
+ SG_SAMPLE_UNCOMPRESSED = 0,
SG_SAMPLE_COMPRESSED = 256,
- SG_SAMPLE_MONO8 = (SG_SAMPLE_MONO|SG_SAMPLE_8BITS),
- SG_SAMPLE_MONO16 = (SG_SAMPLE_MONO|SG_SAMPLE_16BITS),
- SG_SAMPLE_STEREO8 = (SG_SAMPLE_STEREO|SG_SAMPLE_8BITS),
- SG_SAMPLE_STEREO16 = (SG_SAMPLE_STEREO|SG_SAMPLE_16BITS),
- SG_SAMPLE_MONO_MULAW = (SG_SAMPLE_MONO16|SG_SAMPLE_COMPRESSED),
- SG_SAMPLE_STEREO_MULAW = (SG_SAMPLE_STEREO16|SG_SAMPLE_COMPRESSED)
+ SG_SAMPLE_MONO8 = (SG_SAMPLE_MONO|SG_SAMPLE_8BITS),
+ SG_SAMPLE_MONO16 = (SG_SAMPLE_MONO|SG_SAMPLE_16BITS),
+ SG_SAMPLE_MULAW = (SG_SAMPLE_MONO|SG_SAMPLE_8BITS|SG_SAMPLE_COMPRESSED),
+ SG_SAMPLE_ADPCM = (SG_SAMPLE_MONO|SG_SAMPLE_4BITS|SG_SAMPLE_COMPRESSED)
};
* @return Data size
*/
inline size_t get_size() const {
-printf("<-- samples: %i, tracks: %i, bits: %i\n", _samples, _tracks, _bits);
-return (_samples * _tracks * _bits)/8;
-}
+ return (_samples * _tracks * _bits)/8;
+ }
/**