Chris Robinson
4d1795e90b
Remove an unused function
2018-01-27 19:04:32 -08:00
kcat
277127829a
Merge pull request #166 from Ybalrid/betterReadme
...
Better readme
2018-01-27 19:03:50 -08:00
Arthur Brainville
58fd9d70d2
Additional corrections as mentionned in the PR
2018-01-28 03:26:02 +01:00
Arthur Brainville
d2cf61c99a
Added AppVeyor badge
2018-01-28 02:29:54 +01:00
Arthur Brainville
6562a939ea
Add project overview and travis build badge
...
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-01-28 01:37:00 +01:00
Chris Robinson
031cf24880
Use an array lookup for source IDs
...
This is now similar to buffers, being stored in groups of 64 in a vector with
the ID providing the array indices.
2018-01-27 14:34:05 -08:00
Chris Robinson
38261a0f2a
Make some more functions static where they're used
2018-01-27 14:34:05 -08:00
Chris Robinson
c4a76af397
Add some casts to pacify MSVC
2018-01-27 14:34:05 -08:00
Chris Robinson
f76ab02bd4
Add a ctz64 fallback using _BitScanForward when available
2018-01-27 14:34:05 -08:00
kcat
4d392a8b87
Merge pull request #165 from Ybalrid/Ybalrid-readme-patch
...
Reformat README for a nicer display on github
2018-01-27 14:33:38 -08:00
Arthur Brainville
c969dad6c2
Reformat README for a nicer display on github
2018-01-27 23:16:36 +01:00
Chris Robinson
9718502e5d
Check for _BitScanForward64 before using it
2018-01-27 11:11:39 -08:00
Chris Robinson
9613b4bfe2
Use a different method for storing and looking up buffers
...
Rather than each buffer being individually allocated with a generated 'thunk'
ID that's used with a uint:ptr map, buffers are allocated in arrays of 64
within a vector. Each group of 64 has an associated 64-bit mask indicating
which are free to use, and the buffer ID is comprised of the two array indices
which directly locate the buffer (no searching, binary or otherwise).
Currently no buffers are actually deallocated after being allocated, though
they are reused. So an app that creates a ton of buffers once, then deletes
them all and uses only a couple from then on, will have a bit of waste, while
an app that's more consistent with the number of used buffers won't be a
problem. This can be improved by removing elements of the containing vector
that contain all-free buffers while there are plenty of other free buffers.
Also, this method can easily be applied to other resources, like sources.
2018-01-27 01:51:01 -08:00
Chris Robinson
5d2196c119
Don't rely on alMain.h in alBuffer.h
2018-01-26 21:32:43 -08:00
Chris Robinson
a885fd6d0e
Make some functions static that are only used in one source
2018-01-26 21:11:12 -08:00
Chris Robinson
3ba4746ff8
Allow preserving converted samples
2018-01-26 16:41:14 -08:00
Chris Robinson
e1e1c73ae6
Read the buffer unpack alignment under the buffer lock
2018-01-26 15:58:38 -08:00
Chris Robinson
fbafbe6272
Improve error reporting for buffers
2018-01-26 00:13:03 -08:00
Chris Robinson
6ae7fc5df1
Add the printf-format attribute to alSetError
2018-01-25 23:52:09 -08:00
Chris Robinson
99f0377ae3
Construct error messages using parameterized values
2018-01-25 15:59:59 -08:00
Chris Robinson
932939c5a8
Enable events in alffplay
2018-01-24 20:04:57 -08:00
Chris Robinson
0c9c846522
Report AL_SOFTX_events as an in-progress extension
2018-01-24 19:59:22 -08:00
Chris Robinson
f5236ab186
Use more appropriate enum values for events
2018-01-24 19:25:15 -08:00
Chris Robinson
2a7f5aa569
Add a deprecated event type for alDopplerVelocity
2018-01-24 18:47:19 -08:00
Chris Robinson
1d86aea61c
Fix ordering of alGetPointervSOFT
2018-01-24 18:30:32 -08:00
Chris Robinson
2ded5547ba
Provide messages for the remaining AL errors
2018-01-24 17:07:01 -08:00
Chris Robinson
395278fcdb
Set the buffer load error in LoadData
2018-01-24 12:45:56 -08:00
Chris Robinson
786a05876e
Call the event callback when an error is generated
...
Most errors don't yet provide correct object IDs or text messages for the AL
error.
2018-01-24 12:10:48 -08:00
Chris Robinson
caa3b4f7f8
Handle event properties
...
This just implements the event methods insofar as tracked state. No events are
generated/reported yet.
2018-01-23 18:25:59 -08:00
Chris Robinson
2266a9e01e
Declare the beginnings of an event extension
2018-01-23 17:42:39 -08:00
Chris Robinson
def2547e40
Fix some 'may be used initialized' warnings
2018-01-23 16:03:06 -08:00
Chris Robinson
2ac0adaebb
Use a new proper buffer function with a flags parameter
...
Rather than hackily combining bit flags with the format, to increase the number
of potential flags. alBufferData now behaves as if calling alBufferStorageSOFT
with a flags value of 0.
2018-01-23 14:33:30 -08:00
Chris Robinson
4ebb97bf73
Test mapped buffers in alffplay
2018-01-23 11:15:25 -08:00
Chris Robinson
b05592b0ab
Ensure read or write flags are specified with persistent mappings
2018-01-23 10:59:51 -08:00
Chris Robinson
9ee58fd454
Track the buffer's mapped section
2018-01-23 10:51:23 -08:00
Chris Robinson
4f9a0460c4
Add a flag for persistent mapping
...
And a function to "flush" a mapped buffer
2018-01-23 10:38:27 -08:00
Chris Robinson
ad61392318
Slightly simplify alBufferSubDataSOFT
2018-01-22 16:17:45 -08:00
Chris Robinson
a852ecf8ce
Ensure proper alignment when preserving data too
2018-01-22 15:52:53 -08:00
Chris Robinson
d6d6ec03f1
Don't bother allocating cleared memory for buffer storage
2018-01-22 15:46:46 -08:00
Chris Robinson
fce72610bb
Add a flag for alBufferData to non-destructively resize the data
...
Requires having the same format as the last call to alBufferData. Also only
makes sense when given a NULL data pointer, as otherwise the internal data will
be overwritten anyway.
2018-01-22 11:34:16 -08:00
Chris Robinson
4a368ab905
Fix the return type of the al_fwrite wrapper
2018-01-22 10:48:55 -08:00
Chris Robinson
f1f7fba3b9
Don't convert/copy samples with a NULL dest buffer
...
Only happens with a 0 size, so there's nothing to copy or convert anyway.
2018-01-22 00:31:27 -08:00
Chris Robinson
ca07e210a7
Remove now-unused alloca and VLA checks
2018-01-21 23:50:47 -08:00
Chris Robinson
5f3ae527c9
More cleanup for buffer loading
...
Don't bother with unnecessary and unused converters, and remove some
unsupported queries.
2018-01-21 23:35:28 -08:00
Chris Robinson
db13af1935
Handle double-precision buffers in the mixer
2018-01-21 18:34:03 -08:00
Chris Robinson
efd11f32a2
Remove support for (signed) byte and ushort sample storage
...
Also not used without buffer_samples
2018-01-21 18:16:27 -08:00
Chris Robinson
6489fb586b
Remove (u)int32 sample storage conversion
...
Unused without the buffer_samples extension
2018-01-21 17:55:35 -08:00
Chris Robinson
427212705f
Remove the old buffer_samples functions
...
The symbols are still there and exported to retain ABI compatibility, but they
no longer do anything except set an AL_INVALID_OPERATION error. They're also
removed from the function and enum tables, since they're not part of any
supported extension.
2018-01-21 17:19:57 -08:00
Chris Robinson
f6276164f3
Fix the return type of the LPALUNMAPBUFFERSOFT typedef
2018-01-21 16:32:37 -08:00
Chris Robinson
dcb934fc2e
Avoid repeating some code
2018-01-21 10:32:48 -08:00