Chris Robinson
f79b0e24d4
Avoid a few more explicit loops
2018-12-04 15:30:39 -08:00
Chris Robinson
a0967967de
Read atomic variables in the reverse order they're set
2018-12-04 14:48:08 -08:00
Chris Robinson
31b54eb86a
Avoid a few more explicit loops
2018-12-03 01:41:52 -08:00
Chris Robinson
85e83bbdff
Use a std::string for the source state change message
2018-12-02 19:34:09 -08:00
Chris Robinson
45b65366bb
Improve some checks for compiler analysis
2018-12-02 15:29:26 -08:00
Chris Robinson
60254488e9
Add a couple missing source lock guards
2018-12-02 14:36:53 -08:00
Chris Robinson
4e17ad3ec0
Avoid a few more explicit loops
2018-12-02 13:35:07 -08:00
Chris Robinson
607fb3e632
Use a lambda to apply the NFC mixes
2018-12-01 23:25:34 -08:00
Chris Robinson
e1af866a3d
Rework source sample counting for mixing a bit
2018-12-01 13:47:56 -08:00
Chris Robinson
255c07def9
Try to pacify MSVC's missing a suitable default constructor
2018-12-01 11:28:11 -08:00
Chris Robinson
cc161fe7c1
Add a missing include
2018-12-01 01:12:05 -08:00
Chris Robinson
7b1548af3c
Handle source state changed events uniquely in the event loop
...
To avoid the need of constructing the string in the mixer thread, which is
commonly formatted anyway.
2018-11-30 21:39:59 -08:00
Chris Robinson
1e6e84374b
Use std::array for the voice's PrevSamples
2018-11-30 21:23:43 -08:00
Chris Robinson
c7569c31ad
Improve construction and destruction of ALvoices
2018-11-30 19:04:38 -08:00
Chris Robinson
4b7ac4a6ed
Don't bother making ALvoiceProps dynamically sized
2018-11-30 16:56:23 -08:00
Chris Robinson
364850e8f9
Move a variable declaration to a more appropriate place
2018-11-30 10:08:18 -08:00
Chris Robinson
b582f1346a
Avoid hard-coding a couple sizes
2018-11-29 22:56:33 -08:00
Chris Robinson
8ca8da30bd
Store the source ID with the voice instead of the source pointer
2018-11-29 22:49:01 -08:00
Chris Robinson
0d2bbe17f2
Rename a function for consistency
2018-11-29 13:34:06 -08:00
Chris Robinson
c5d5d574e6
Reorganize some device members
2018-11-29 13:10:46 -08:00
Chris Robinson
57bb467072
Pass the desired resampler to CreateSampleConverter
2018-11-28 23:19:25 -08:00
Chris Robinson
e017d9e40f
Clean up the converter a bit
2018-11-28 22:42:46 -08:00
Chris Robinson
5df89c504e
Remove an improper Connected check
2018-11-28 19:29:20 -08:00
Chris Robinson
38f4a0cf2c
Avoid the update size going to 0 with a relatively large device period
2018-11-28 18:45:35 -08:00
Chris Robinson
c3c0a5022a
Don't bother with (really) old pulseaudio headers
2018-11-28 15:09:19 -08:00
Chris Robinson
14d746e7c2
Don't sever a paused source from its voice on disconnect
2018-11-28 14:38:26 -08:00
Chris Robinson
598851fed7
Attempt to reconnect lost devices with alcResetDeviceSOFT
...
Be aware there's currently possible race conditions with PulseAudio's callbacks
(the state callbacks need to be cleared while not playing).
Also paused sources will assert/crash if attempted to play again without being
explicitly stopped or rewound first.
Both of these will eventually be fixed (though a paused source's offset will be
lost regardless).
2018-11-28 12:24:12 -08:00
Chris Robinson
16aa3ab196
Reduce some indentation
2018-11-28 11:55:43 -08:00
Chris Robinson
ed2e456dfb
Avoid some explicit loops
2018-11-28 11:30:44 -08:00
Chris Robinson
8d95b6a0f2
Avoid an unnecessary lambda
2018-11-28 08:42:30 -08:00
Chris Robinson
ec2927cd32
Small cleanup for ~ALCcontext_struct
2018-11-27 21:19:30 -08:00
Chris Robinson
ff8c694957
Clean up the JACK backend
2018-11-27 20:29:54 -08:00
Chris Robinson
0116e763ea
Add a unique_ptr alias for the ringbuffer
2018-11-27 19:49:45 -08:00
Chris Robinson
2179388430
Remove unneeded mutex checks
2018-11-27 15:23:18 -08:00
Chris Robinson
c2da83dea8
Avoid alsem* wrappers for al::semaphore
2018-11-27 14:52:04 -08:00
Chris Robinson
89abbe8d94
Replace last uses of alsem_t with al::semaphore
2018-11-27 14:05:56 -08:00
Chris Robinson
f26083e9ed
Make and use a semaphore class
2018-11-27 13:41:30 -08:00
Chris Robinson
3f745be1dc
Return a signed integer from altime_get
2018-11-27 12:11:11 -08:00
Chris Robinson
ff6dda06ad
Add the appropriate include for the _POSIX_TIMERS macro
2018-11-27 10:35:00 -08:00
Chris Robinson
07670ed36a
Swap context references in the move assignment
2018-11-27 10:08:25 -08:00
Chris Robinson
ee2d756d94
Disable MSVC warning C4065
...
"switch statement contains 'default' but no 'case' labels"
2018-11-27 00:04:55 -08:00
Chris Robinson
9b2b83f99c
Fix use of clock_gettime
2018-11-27 00:02:31 -08:00
Chris Robinson
2530370ff2
Avoid relying on struct timespec
2018-11-26 23:45:04 -08:00
Chris Robinson
d7d99adc91
Avoid including threads.h in the example helpers
2018-11-26 23:18:51 -08:00
Chris Robinson
d06f76957c
Remove althrd_yield
2018-11-26 23:06:49 -08:00
Chris Robinson
4c1fc3ae00
Remove unused almtx stuff
2018-11-26 22:36:55 -08:00
Chris Robinson
2d45ec8dc3
Use a standard mutex for the remaining locks
2018-11-26 22:06:53 -08:00
Chris Robinson
68eef6abb4
Use a standard mutex for the source and effect slot locks
2018-11-26 21:50:48 -08:00
Chris Robinson
2e73c2ca92
Use a standard mutex for the proplock
2018-11-26 21:39:31 -08:00
Chris Robinson
d8b9230ee4
Use a standard mutex for the backend lock
2018-11-26 21:39:31 -08:00