Skip to content
  • Rafael Kitover's avatar
    cleanup SoundSDL #139 #130 #97 #67 #65 #46 #47 · 1e3a85a3
    Rafael Kitover authored
    Rewrite SoundSDL (the SDL sound driver).
    
    Clean up the code and eliminate all deadlocks/hangs/crashes (hopefully.)
    
    Many of the deadlocks were caused by initialize() not de-initializing
    properly and causing the audio callback thread to deadlock, fix this.
    
    Also use better logic for the semaphore controls, which will also
    hopefully increase audio quality.
    
    Use better logic for the throttle control, with throttle == 0 being the
    same as throttle == 100 and implement setThrottle().
    
    Also increase the buffer size to 300ms and the number of samples to
    2048, for hopefully less choppiness in audio overall.
    1e3a85a3