Comments (11)
You're absolutely right, I missed that. That _M_IX86
check is in the wrong part of that line. It's currently in the x64 check, but needs to be moved to the x86+SSE2 check.
This line is actually from the minimp3 part of dr_mp3 (dr_mp3 is a wrapper around minimp3). I'll fix it in dr_mp3 in a bit. Thanks for the report!
@lieff - I think this change needs to be applied to minimp3?
from dr_libs.
In that line, the __SSE2__
is intended to be used for checking support for non-MSVC compilers. But you're right, it's not defined by MSVC. It's from the minimp3 project which I didn't write and it's a different style to the way I do it. I usually just check the version of MSVC to determine if the intrinsics are available at compile time, and then I do a runtime check to determine whether or not it's safe to execute those instructions.
I've added a check for _M_IX86_FP == 2
to the dev branch. Thanks for the heads up on that one. Hopefully that hasn't broken the fix I did in the previous commit 🤞.
from dr_libs.
The defined(__SSE2__)
part of that line is supposed to guard this. It sounds to me that the __SSE2__
option is incorrectly being defined at compile time. What's the compiler? On the surface this feels like a compiler-specific issue. I just don't see why the compiler will be throwing that error, but still defining __SSE2__
.
from dr_libs.
The defined(SSE2) part of that line is supposed to guard this.
It doesn't, here is the formatted conditional:
(
(defined(_MSC_VER) && _MSC_VER >= 1400) &&
(defined(_M_IX86) || defined(_M_X64))
) || (
(defined(__i386__) || defined(__x86_64__)) && defined(__SSE2__)
)
So if _M_IX86
is defined, it does not check __SSE2__
from dr_libs.
Perhaps this should just be:
- #if ((defined(_MSC_VER) && _MSC_VER >= 1400) && (defined(_M_IX86) || defined(_M_X64))) || ((defined(__i386__) || defined(__x86_64__)) && defined(__SSE2__))
+ #if defined(_MSC_VER) && _MSC_VER >= 1400 && defined(__SSE2__)
from dr_libs.
I've pushed a fix to the dev branch. Are you able to give that a try?
Just reviewing that line it seems a quite confusing. I might refactor that later.
from dr_libs.
Verified that it now compiles!
from dr_libs.
Are you guys sure that MSVC really defines __SSE2__
? As far as I
remember, it does not (but I'd like to be corrected), therefore the
_M_IX86
+ __SSE2__
combination is useless there.
from dr_libs.
Should be _M_IX86_FP == 2
, see https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
from dr_libs.
Can we close this now? @glebm Did you update after the latest change?
from dr_libs.
The issue on the xbox is fixed, I haven't updated SDL_audiolib since the latest change but the change looks OK
from dr_libs.
Related Issues (20)
- dr_mp3: support getting Length in ms HOT 4
- Advice for internet streaming of FLAC? HOT 2
- dr_mp3 frameInfo never filled HOT 2
- dr_flac: crashing on Nintendo 3DS HOT 10
- How to use this on Android NDK? HOT 2
- dr_wav bext is before fmt HOT 2
- How to update wav size info when I generating a wav file? HOT 2
- SIGSEGV when reading WAV metadata HOT 6
- DSD support HOT 1
- Support for streaming use-cases (i.e. write files without making a copy of the raw samples) HOT 2
- Make results consistent when trying to seek beyond the end of sounds.
- dr_wav 0.13.8 fails to load a .wav (invalid data) HOT 4
- dr_mp3 crash if the invalid file is loaded and uninit is called HOT 3
- Possible UB in memcpy due to non-null argument HOT 9
- dr_mp3: Remove customization of output channels and sample rate. HOT 1
- test dr_wav_playback hardcodes miniaudio include path, intended? HOT 1
- Cannot decode very short mp3 file HOT 2
- Make it compile on Cortex M0 (Raspberry Pico) HOT 6
- Suggestion for a MIDI synthesis library HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dr_libs.