Page 1 of 1

SunVox DLL: cannot lock/unlock to load a module [FIXED 23.10.16]

Posted: Tue Oct 18, 2016 5:47 am
by queries
I'm running into trouble loading a module from disk while using user-audio-callback and one-thread flags.

It won't let me use lock/unlock even though I am definitely calling them.

I've been able to replicate it with the test code.

Here's the output I get:

Code: Select all

Language: en_US
SunVox lib version: 1.9.1
Loading SunVox song from file...
< ... >
Loaded.
sv_connect_module error: use it within sv_lock_slot() / sv_unlock_slot() block only!
SOUND: sound_stream_deinit() begin
SOUND: sound_stream_deinit() end
Max memory used: 1952718
Here's the diff:

Code: Select all

diff --git a/osx/sample_project/test5.cpp b/osx/sample_project/test5.cpp
index 2155a75..d7a7df1 100644
--- a/osx/sample_project/test5.cpp
+++ b/osx/sample_project/test5.cpp
@@ -52,6 +52,11 @@ int main()
            printf( "Load error.\n" );
        sv_volume( 0, 256 );

+       sv_lock_slot( 0 );
+       int module = sv_load_module( 0, "organ.sunsynth", 512, 512, 512 );
+       sv_connect_module( 0, module, 0 );
+       sv_unlock_slot( 0 );
+
        sv_play_from_beginning( 0 );

        //Saving the audio stream to the file:

Re: SunVox DLL: cannot lock/unlock to load a module

Posted: Sun Oct 23, 2016 4:29 pm
by NightRadio
I believe it is fixed now :) Please download the latest version (based on SunVox 1.9.2 BETA2): http://warmplace.ru/soft/sunvox/sunvox_dll.zip

Re: SunVox DLL: cannot lock/unlock to load a module

Posted: Mon Oct 24, 2016 3:16 am
by queries
Fantastic! I'll be sure to test it soon.