• Nicolas George's avatar
    asrc_flite: do not crash on multiple instances. · 4ce87ecf
    Nicolas George authored
    The voice register functions return the same voice structure
    upon multiple registration. It causes us two problems:
    
    If we delete a voice without deregistering it, it leaves
    a dangling pointer inside the library.
    
    If we delete or unregister a voice at uninit, it may still
    be in use by another instance of the filter.
    
    The second problem is solved by keeping an usage counter inside
    asrc_flite. This is not thread-safe, but neither is flite itself.
    4ce87ecf
asrc_flite.c 9.19 KB