aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* Initialize newformat to AL_NONE instead of a valid formatChris Robinson2014-05-151-6/+2
|
* Make RefCount a non-integer typeChris Robinson2014-05-141-3/+3
| | | | | It should only be accessed through the appropriate functions to ensure proper atomicity.
* Only require MSADPCM block alignment to be a multiple of 2Chris Robinson2014-03-061-2/+2
|
* Move the sample conversion routines to a separate fileChris Robinson2014-03-051-1261/+3
|
* Implement a simplistic MSADPCM encoderChris Robinson2014-03-051-19/+47
| | | | It's not particularly good, but it's better than silence.
* Allocate enough temp space for the ADPCM decoders and encodersChris Robinson2014-03-051-4/+4
|
* Use specialized methods for converting ALshort to IMA4 and MSADPCMChris Robinson2014-03-051-2/+32
| | | | As before, to avoid unnecessary direct copies
* Use specialized methods for converting IMA4 and MSADPCM to ALshortChris Robinson2014-03-051-8/+39
| | | | | Since the decoder methods already convert to ALshort, there's no need to use a temp buffer that's just going to copy directly to the destination.
* Use maxi to clamp an int to a lower-boundChris Robinson2014-03-051-1/+1
|
* Expand the sign bit on the initial MSADPCM delta valueChris Robinson2014-03-051-0/+1
|
* Add an extension to support MSADPCM buffer formatsChris Robinson2014-03-041-27/+309
|
* Add an extension to alter the block alignment for buffer unpack/pack opsChris Robinson2014-03-041-16/+71
| | | | | | | | | | | | | | | | This is for unpacking (reading, e.g. alBufferData) and packing (writing, e.g. alGetBufferSamplesSOFT) operations. The alignments are specified in sample frames, with 0 meaning the default (65 for IMA4, 1 otherwise). IMA4 alignment must be a multiple of 8, plus 1 (e.g. alignment = n*8 + 1), otherwise an error will occur during (un)packing. Chenging the block alignment does not affect already-loaded sample data, only future unpack/pack operations... so for example, this is perfectly valid: // Load mono IMA4 data with a block alignment of 1024 bytes, or 2041 sample // frames. alBufferi(buffer, AL_UNPACK_BLOCK_ALIGNMENT_SOFT, 2041); alBufferData(buffer, AL_FORMAT_MONO_IMA4, data, data_len, srate); alBufferi(buffer, AL_UNPACK_BLOCK_ALIGNMENT_SOFT, 0);
* Parameterize the block alignmentChris Robinson2014-03-041-111/+152
|
* Use alloca for temp space decoding/encoding IMA4 blocksChris Robinson2014-03-031-4/+11
|
* Reduce explicit template declarations and ignore IMA4-to-IMA4 conversionsChris Robinson2014-03-031-159/+35
| | | | | | Since we never store IMA4 data in buffers, we should only ever convert from (user input) or to (user output) IMA4. Once we allow user-specified pack/unpack block alignment, this wouldn't be a simple memcpy anyway.
* Store the original frame size alignment in the bufferChris Robinson2014-03-031-8/+22
|
* Use C99 inline in more placesChris Robinson2013-11-041-0/+2
|
* Use C99 inline semanticsChris Robinson2013-11-041-0/+3
|
* Use an UNUSED macro instead of void-tagging unused parametersChris Robinson2013-10-071-16/+4
|
* Remove al_try usage from alBuffer.cChris Robinson2013-10-071-246/+230
|
* Start using a simpler method for error handlingChris Robinson2013-10-061-335/+328
| | | | This helps avoid the al_try/al_throwerr/al_endtry stuff.
* Use a separate value for the maximum buffer channelsChris Robinson2013-07-231-4/+4
| | | | | | | Unlike the device, input buffers are accessed based on channel numbers instead of enums. This means the maximum number of channels they hold depends on the number of channels any one format can have, rather than the total number of recognized channels. Currently, this is 8 for 7.1.
* Silence some clang warningsChris Robinson2013-06-051-6/+7
|
* Use C99's inline instead of __inlineChris Robinson2013-05-281-110/+110
|
* Fix possible overflow when converting float to intChris Robinson2013-05-201-2/+2
| | | | | Same as with the mixer, we can only use 25 bits of precision from floats.
* Simplify al_try codeChris Robinson2013-03-241-5/+4
|
* Use int instead of long for the IMA4 tablesChris Robinson2012-11-101-3/+3
|
* Load Int and UInt samples as float with alBufferDataChris Robinson2012-11-101-2/+2
| | | | | This shouldn't really ever happen, as there's no 32-bit (u)int formats alBufferData can take.
* Don't include alu.h in alMain.hChris Robinson2012-09-141-2/+1
|
* Minor typo fixesChris Robinson2012-06-281-2/+2
|
* Don't use all caps for enum value namesChris Robinson2012-06-281-6/+6
|
* Switch alBuffer.c to the new error handling scheme, and get rid of more ↵Chris Robinson2012-04-241-415/+373
| | | | hungarian notation
* Remove some more hungarian notationChris Robinson2012-04-191-94/+94
|
* Fix comment and rename the buffer's self-idChris Robinson2012-04-191-6/+6
|
* Avoid shadowing a couple variablesChris Robinson2012-04-161-4/+4
|
* Add a COUNTOF macro to get the number of entries in a static arrayChris Robinson2012-02-191-2/+2
|
* Move the endian test macro to alMain.hChris Robinson2012-02-151-5/+0
|
* Ensure ALbyte3 and ALubyte3 are the proper sizeChris Robinson2012-02-071-0/+2
|
* Pass the uncompressed sample count to LoadData and ConvertData for IMA4Chris Robinson2012-01-261-41/+56
|
* Avoid a bit of code duplicationChris Robinson2012-01-251-70/+29
|
* Remove the unnecessary AL_MULAW_SOFT, AL_ALAW_SOFT, and AL_IMA4_SOFT definesChris Robinson2012-01-101-3/+0
|
* Append _SOFT to the AL_SOFT_buffer_samples enumsChris Robinson2012-01-101-49/+49
|
* Use sample frames when handling the buffer lengthChris Robinson2011-10-041-32/+16
|
* Get rid of some unnecessary castingChris Robinson2011-10-021-4/+4
|
* Rename some parametersChris Robinson2011-10-021-18/+18
|
* Remove the OriginalAlign buffer field, and calculate it as neededChris Robinson2011-10-011-6/+11
|
* Fix potential divide-by-0Chris Robinson2011-10-011-5/+11
|
* Add buffer properties to get the internal format, and the length in bytes, ↵Chris Robinson2011-10-011-1/+36
| | | | | | | | | | | samples, and seconds The provided buffer lengths correspond to the source offsets, in that the byte length specifies the end of the byte offset (ie, when the buffer is used for a static source, the offset will range between 0 (inclusive) and the byte length (exclusive)). Although an application could use the AL_SIZE, AL_CHANNELS, AL_BITS, and AL_FREQUENCY properties to find the length in samples and seconds, the byte length cannot be reliably calculated this way.
* Add support for AL_EXT_ALAWChris Robinson2011-10-011-2/+159
|
* Centralize the Lookup and Remove macrosChris Robinson2011-09-241-23/+20
|