engine/source/gamelib/soundmix.c
// Changed to conserve memory: added this function
Changed to conserve memory: added this function
Changed to conserve memory : added this function
void sound_unload_sample(int index)
{
    if(!mixing_inited)
    {
        return;
    }
    if(index < 0 || index >= sound_cached)
    {
        return;
    }
    if(soundcache[index].sample.sampleptr != NULL)
    {
        free(soundcache[index].sample.sampleptr);
        soundcache[index].sample.sampleptr = NULL;
        memset(&soundcache[index].sample, 0, sizeof(samplestruct));
    }
}
void sound_unload_sample ( int index ) { if ( ! mixing_inited ) { return ; } if ( index < 0 || index >= sound_cached ) { return ; } if ( soundcache [ index ] . sample . sampleptr != NULL ) { free ( soundcache [ index ] . sample . sampleptr ) ; soundcache [ index ] . sample . sampleptr = NULL ; memset ( & soundcache [ index ] . sample , 0 , sizeof ( samplestruct ) ) ; } }
Changed to conserve memory: added this function
Changed to conserve memory : added this function