Just FYI :
I am using sv_audio_callback() in another thread than sv_remove_module()/sv_disconnect_module().
Although I am using sv_lock()/sv_unlock() I "sometimes" get an IMA on sv_audio_callback().
The solution is to use my own Mutex.
Perhaps something to look into?
Lib->Multithreaded
Re: Lib->Multithreaded
nm -gU sunvox.dylib > extract.h
where..
T = text section symbol,
S = otherwise places symbol.
To be precise, there are even deep vulnerabilities that can easily be exploited for other things than noise making.
Always check first what really is inside a lib before using it. Telling this no to make anyone afraid.
Its general good advice to look inside pre-compiled stuff. It even helps understanding whats going on.
But.. i do the same, have no drop outs. Guessing my threads do no block each other.
where..
T = text section symbol,
S = otherwise places symbol.
Code: Select all
S _g_sundog_sound_cnt
S _g_sundog_sound_mutex
T __Z17sundog_sound_lockP12sundog_sound // sundog_sound_lock(sundog_sound*)
T __Z19sundog_sound_unlockP12sundog_sound // sundog_sound_unlock(sundog_sound*)
T __Z11smutex_initP6smutexj
T __Z11smutex_lockP6smutex
T __Z13smutex_unlockP6smutex
T __Z14smutex_destroyP6smutex
T __Z14smutex_trylockP6smutex
Always check first what really is inside a lib before using it. Telling this no to make anyone afraid.
Its general good advice to look inside pre-compiled stuff. It even helps understanding whats going on.
But.. i do the same, have no drop outs. Guessing my threads do no block each other.
- NightRadio
- Site Admin
- Posts: 3944
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Lib->Multithreaded
What SV_INIT_FLAG_* flags do you use in sv_init()?
Re: Lib->Multithreaded
Although the SV_INIT_FLAG_ONE_THREAD flag is not set in sv_init(), I still get (very rarely (1 out of 100 times more or less)) a crash on sv_audio_callback() when switching between instruments.
By switching instruments I mean
Surely I could move the switching to the "sv_audio_callback() thread", but stll, something must be wrong somewhere...(?)
By switching instruments I mean
I am not sure whether it is on disconnect, remove or load.//remove previous
sv_lock_slot(0)
sv_disconnect_module(0,...)
sv_remove_module(0,...)
sv_unlock_slot(0)
...
//load new
sv_lock_slot(0)
sv_load_module(0,...)
sv_unlock_slot(0)
Surely I could move the switching to the "sv_audio_callback() thread", but stll, something must be wrong somewhere...(?)
- NightRadio
- Site Admin
- Posts: 3944
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Lib->Multithreaded
So what SV_INIT_FLAG_* flags do you use? :)
And what is your system?
And what is your system?
Re: Lib->Multithreaded
-Flags -> SV_INIT_FLAG_USER_AUDIO_CALLBACK | SV_INIT_FLAG_AUDIO_FLOAT32
-Win10/64bit
-Win10/64bit
- NightRadio
- Site Admin
- Posts: 3944
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Lib->Multithreaded
Thanks!
Unfortunately there is too little information to say something about your case, sorry.
In Linux i can use Valgrind to get all hidden memory problems of the app. In Windows i don't know... maybe Deleaker or something similar.
At least the debugger report can clarify something.
Or the stripped down version of source code, maybe...
Unfortunately there is too little information to say something about your case, sorry.
In Linux i can use Valgrind to get all hidden memory problems of the app. In Windows i don't know... maybe Deleaker or something similar.
At least the debugger report can clarify something.
Or the stripped down version of source code, maybe...