void vrpn_Sound_Server_Miles::unloadSound(vrpn_SoundID id) /*unloads id from samples. Sets the corresponding cell in samples to FAIL. */ { if (provider != 0) { AIL_release_3D_sample_handle(getSample(id)); unloadHandle(id); } else fprintf(stderr,"No provider has been set prior to unloadSound\n"); }
// // Destructor // ~Voice() { // Release the voice if (flag3D) { AIL_release_3D_sample_handle(handle3D); } else { AIL_release_sample_handle(handle2D); } }
void vrpn_Sound_Server_Miles::unloadAllSounds() //clears out samples { for(vrpn_int32 i = 0; i < H_Cur; i++) { if (samples[i] == NULL) continue; S32 status = AIL_3D_sample_status(samples[i]); if(status == SMP_DONE || status == SMP_STOPPED) //if handle is loaded and not playing, unload { AIL_release_3D_sample_handle(samples[i]); } if(status == SMP_PLAYING) //if handle is playing, stop then unload { AIL_stop_3D_sample(samples[i]); AIL_release_3D_sample_handle(samples[i]); } } H_Cur = 0; }