fixed REALLY bad threading bugs with audio
[fishladder.git] / fishladder.c
index e6d2ef7da97ca18bc2f92965bd84fc7fd9898c97..d7a1f28343749ef16bbb47c3c8853af2cba18ad5 100644 (file)
@@ -597,6 +597,7 @@ void vg_update(void)
                else
                        world.selected = -1;
        }
+       else world.selected = -1;
        
        // Simulation stop/start
        if( vg_get_button_down("go") )
@@ -638,9 +639,10 @@ void vg_update(void)
        // Fish ticks
        if( world.simulating )
        {
-               while( world.sim_frame < (int)((vg_time-world.sim_start)*2.0f) )
+               while( world.sim_frame < (int)((vg_time-world.sim_start)*20.0f) )
                {
                        vg_info( "frame: %u\n", world.sim_frame );
+                       sfx_set_playrnd( &audio_random, &audio_system_balls_switching, 0, 5 );
                        
                        for( int i = 0; i < arrlen( world.io ); i ++ )
                        {
@@ -1100,4 +1102,5 @@ void vg_render(void)
 void vg_ui(void)
 {
        //ui_test();
+       sfx_internal_debug_overlay();
 }