Comments (3)
You've included the implementation in both main.cpp and audio.cpp because your .h file has #define MINIAUDIO_IMPLEMENTATION
in it before #include miniaudio.h
. The implementation can only be included once. Either remove MINIAUDIO_IMPLEMENTATION
to one .cpp file, or use the split version in the extras folder like a traditional .h/.c pair.
from miniaudio.
Thank you for your answer, as you said, I used the .c and .h files in the miniaudio/extras/miniaudio_split folder, but this time I encounter the following error:
wasm-ld: error: --shared-memory is disallowed by CMakeFiles/Wasm_Thread_Testt.dir/Audio/miniaudio.c.o because it was not compiled with 'atomics' or 'bulk-memory' features.
NOTE:
I get this error when I add CMakeLists.txt -sUSE_PTHREADS, I need this flag to add a worker to my project.
CMakeLists.txt:
cmake_minimum_required(VERSION 3.22)
project(Wasm_Thread_Testt)
set(CMAKE_CXX_STANDARD 23)
add_executable(Wasm_Thread_Testt main.cpp Audio/audio.cpp Audio/miniaudio.c)
set_target_properties(Wasm_Thread_Testt PROPERTIES LINK_FLAGS "-s USE_PTHREADS -sPTHREAD_POOL_SIZE=20 -s EXPORT_ALL=1")
from miniaudio.
from miniaudio.
Related Issues (20)
- 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
- [i386] `miniaudio.h:83477:no such instruction: `lzcntl %eax, %ecx'` HOT 2
- How can I Cache ma_sound's into memory? HOT 1
- HELP , create a virtual microfone device for windows. HOT 1
- MA_NODE_FLAG_SILENT is not usable (or i do not know how...) HOT 6
- jack: only open as many channels as requested, option to not autoconnect to default device HOT 2
- UBSAN error in ma_lcg_rand_s32 HOT 1
- emscripten threading HOT 3
- WASM on Windows 11 (supported WASAPI) - DEBUG output "DEBUG: WASAPI backend is disabled." HOT 1
- How to get the audio format? HOT 1
- recording multi channel HOT 2
- Remove use of `ASYNCIFY` for Emscripten Audio Worklets
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.