Comments (2)
Thanks. This is an awkward one. So this is actually coming from dr_flac, which I amalgamate into miniaudio using a tool. It's used in a tight loop deep in the decoding logic and is important that it's used if available. dr_flac will do a runtime support check to ensure the instruction is not executed if unavailable, so I don't think it's causing any harm in practice at runtime, but I'm not sure how to disable this error. I want it to still be compiled into the executable even if the compiler is targeting i386. Do you have any suggestions?
Is compilation actually succeeding, or is this presenting as an error instead of a warning? If it's a warning, since I'm doing a runtime check, I suppose silencing the warning work?
from miniaudio.
@mackron It causes the build to fail, but admittedly this is a minority case, and it should not be disabled for everyone because it fails here.
This seems to be a somewhat common problem, because many multimedia-related projects either simply assume that all x86 SIMD are available on all x86 cpus or rely on a compiler version check, which is of no help in fact, since a compiler may support a given flag, while assembler may not, and that will break everything.
I do not really have a neat solution here. In principle, it should be checked that an instruction from a specific SIMD type can be actually compiled (instead of using a macro to check GCC/Clang version or check support for passing -mavx
etc. flags – that is useless) – that gonna ensure that both compiler and assembler can handle those. But this may be bothersome to implement, and very few users will perhaps benefit from that.
As a simple and safe solution maybe just add a configure option to turn off AXV stuff (or even SIMD altogether)? So that default behavior does not change, but if someone gets a problem, there will be a neat way to have this compiled correctly.
Given that miniaudio
can be borrowed by other projects, so there will be no native configure, a macro will do: say, if someone needs to avoid AVX, just pass a cppflag -DNO_AVX
, or smth to that effect.
from miniaudio.
Related Issues (20)
- Android: Build failure of dev branch due to pthread_attr_setinheritsched HOT 2
- WASM duplicate symbol HOT 3
- Emscripten WASM Thread Problem HOT 2
- Question about Attenuation in Miniaudio. HOT 1
- Javascript error after uninitializing miniaudio HOT 4
- "Error: Invalid argument" due to ma_channel_map_is_valid HOT 6
- Does miniaudio support encoding PCM sample data into ADPCM sample data? HOT 1
- Uncaught RuntimeError: memory access out of bounds after starting playing the sound. HOT 8
- DELETED HOT 1
- Miniaudio waiting infinitely when calling ma_engine_uninit HOT 1
- Is there a way to gracefully shut down all threads created by miniaudio when the application exits? HOT 1
- Channel Convert Init Access Violation going from 2 channels to >2 channels HOT 2
- Sound system lags when playing sounds quickly and using delay or reverb HOT 1
- ma_device_uninit crash on Android <= 10 HOT 3
- error when compiling on android HOT 1
- "[ALSA] poll() failed" Bug. HOT 1
- Consider ditching ReadFile() in favor of FILE* fread() HOT 2
- Compile error with gcc: `error: invalid conversion from 'UInt32*' {aka 'long unsigned int*'} to 'ma_uint32*' {aka 'unsigned int*'} [-fpermissive]` HOT 8
- How can I Cache ma_sound's into memory? HOT 1
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 miniaudio.