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
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: