Commit Graph

6603 Commits

Author SHA1 Message Date
Chris Robinson f7b574c8f2 Redo resampler strings to be safer
Now the name is guaranteed to match the type, and to be ordered as the enum
declares.
2019-09-28 03:15:48 -07:00
Chris Robinson 882b4acae8 Add "fast" variants for the bsinc resamplers
This simply omits the scale factor from the filter, similar to how up-sampling
does. The consequence of this is less smooth transitions when ramping the
pitch while down-sampling, but otherwise behaves fine.
2019-09-28 01:58:29 -07:00
Chris Robinson 00d5356b96 Remove the unnecessary FRACTIONONE from bsincgen 2019-09-28 00:01:21 -07:00
Chris Robinson 9b64e5e0db Implement a "fast" bsinc path
This takes advantage of the fact than when increment <= 1 (when not down-
sampling), the scale factor is always 0. As a result, the scale and scale-phase
deltas never contribute to the filtered output. Removing those multiply+add
operations cuts half of the work done by the inner loop.

Sounds that do need to down-sample (when played with a high pitch, or is 48khz
on 44.1khz output, for example), still go through the normal bsinc process.
2019-09-26 19:24:29 -07:00
Chris Robinson d50ca464cd Use a span for holding the source handles 2019-09-25 03:01:58 -07:00
Chris Robinson f009219523 Avoid extraneous parameters 2019-09-25 02:11:37 -07:00
Chris Robinson 5bb91b858f Use blended HRIRs for the B-Format decode 2019-09-24 22:27:12 -07:00
Chris Robinson 16a715a2b5 Fix unsigned 8-bit buffers 2019-09-24 21:49:12 -07:00
Chris Robinson 6963712d46 Use an array to match the HRTF rendering method 2019-09-24 13:51:40 -07:00
Chris Robinson 96865d6b99 Only build ex-common as needed 2019-09-24 01:16:57 -07:00
Chris Robinson bf31ce688a Add a missing header for Android 2019-09-23 19:23:33 -07:00
Chris Robinson e01b32f8e0 Use istream for makemhr input 2019-09-23 18:37:36 -07:00
Chris Robinson 34a0fad6cd Use a unique_ptr to auto-free MYSOFA_HRTF 2019-09-23 17:38:43 -07:00
Chris Robinson 4a111f7671 Update changelog 2019-09-22 21:27:59 -07:00
Chris Robinson 61ffa23e44 Fix a couple more conversion warnings 2019-09-22 21:27:10 -07:00
Chris Robinson 24db8a3f4b Make the resampler type an enum class 2019-09-22 21:19:19 -07:00
Chris Robinson 95996effaf Move the ifstream wrapper to common 2019-09-22 12:23:41 -07:00
Chris Robinson 9c95f62e95 Remove large file macros
Large file offsets aren't being utilized, and C++ seems to use to 64-bit
offsets anyway.
2019-09-22 11:17:31 -07:00
Chris Robinson 5f6a35c960 Avoid storing an integer in a pointer
C++ does not guarantee that, given an int of sufficient size, converting
int->ptr->int will result in the original value. A pointer may have more than
one integer representation. Only ptr->int->ptr round trips are well-defined.
2019-09-21 23:35:24 -07:00
Chris Robinson 9325f1d507 Split some code into separate functions 2019-09-21 21:14:11 -07:00
Chris Robinson 9993ea818c Restructure the changelog updates 2019-09-21 19:46:19 -07:00
Chris Robinson 564c953e94 Make the buffer frequency unsigned 2019-09-21 16:47:33 -07:00
Chris Robinson 146afcbd70 Explicitly mark a couple functions as inline 2019-09-21 16:12:48 -07:00
Chris Robinson c83055ff53 Initial update for the changelog 2019-09-21 15:49:18 -07:00
Chris Robinson 28e62456ac Use an array and loop instead of individual tests 2019-09-21 12:08:45 -07:00
Chris Robinson 8907a4fb04 Cleanup some router warnings 2019-09-20 15:45:59 -07:00
Chris Robinson a0a8af47ae Include VS2017 in AppVeyor builds 2019-09-20 14:56:21 -07:00
Chris Robinson 2ae1f8b8b6 Revert "Silence some unreachable code warnings on MSVC"
This reverts commit 2ab4883439.

It apparently didn't work at silencing anything.
2019-09-20 14:40:12 -07:00
Chris Robinson 2ab4883439 Silence some unreachable code warnings on MSVC 2019-09-20 14:25:06 -07:00
Chris Robinson 65eb0987e2 Remove and simplify some functions 2019-09-20 13:35:29 -07:00
Chris Robinson 79a621ac47 Simplify some REQUIRES uses 2019-09-20 10:59:12 -07:00
Chris Robinson b9daffe159 Don't clean up more than necessary on destruction 2019-09-20 10:58:29 -07:00
Chris Robinson 057b253adb Use an anonymous namespace instead of static 2019-09-19 21:01:10 -07:00
Chris Robinson c0678816fc Remove deprecated CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 2019-09-19 18:50:45 -07:00
Chris Robinson ffb5623ead Fix a couple more annoying conversion warnings 2019-09-18 20:13:58 -07:00
Chris Robinson a092624ed3 Fix some Windows warnings 2019-09-18 18:20:11 -07:00
Chris Robinson 9a0a5c79d8 Avoid hiding a class member function 2019-09-18 17:02:33 -07:00
Chris Robinson 24a1058952 Work around MSVC's lack of standard _Pragma support 2019-09-18 13:58:04 -07:00
Chris Robinson b8f64155e9 Silence a couple specific warning instances 2019-09-18 13:24:16 -07:00
Chris Robinson 66565ca7a3 Enable and fix some more warnings 2019-09-18 10:09:04 -07:00
Chris Robinson da80a7c2b2 Disable warnings 4268 and 4324 on MSVC
warning C4268: 'const' static/global data initialized with compiler generated
default constructor fills the object with zeros

warning C4324: structure was padded due to alignment specifier
2019-09-18 09:31:32 -07:00
Chris Robinson ab87e56b22 Enable some more MSVC warnings 2019-09-18 09:01:46 -07:00
Chris Robinson dffb874478 Some cleanup for CMakeLists.txt 2019-09-18 08:58:36 -07:00
Chris Robinson aca9f4e095 Make the bsinc l and m coefficients unsigned 2019-09-17 18:38:46 -07:00
Chris Robinson 1da7512628 Avoid an unnecessary multiply 2019-09-16 21:49:06 -07:00
Chris Robinson 62972babea Remove unnecessary long long checks 2019-09-16 18:10:01 -07:00
Chris Robinson 6398bd8373 Add preprocessor defines for the common lib 2019-09-16 15:57:05 -07:00
Chris Robinson b00128411f Add a missing include directory for the common lib 2019-09-16 15:45:20 -07:00
Chris Robinson 899a414591 Remove the last uses of the system's str[n]casecmp 2019-09-16 15:10:36 -07:00
Chris Robinson 6d93b2ba81 Use our case-insensitive compare functions in makemhr 2019-09-16 14:55:52 -07:00