Пример #1
0
/*
==========
idAudioHardwareOSX::Reset
==========
*/
void idAudioHardwareOSX::Reset() {
	OSStatus status;
	if( activeIOProc ) {
		status = AudioDeviceStop( selectedDevice, DeviceIOProc );
		if( status != kAudioHardwareNoError ) {
			common->Warning( "idAudioHardwareOSX::Reset: AudioDeviceStop failed. status: %s", ExtractStatus( status ) );
		}
		status = AudioDeviceRemoveIOProc( selectedDevice, DeviceIOProc );
		if( status != kAudioHardwareNoError ) {
			common->Warning( "idAudioHardwareOSX::Reset: AudioDeviceRemoveIOProc failed. status %s\n", ExtractStatus( status ) );
		}
		activeIOProc = false;
	}
	selectedDevice = kAudioDeviceUnknown;
	AudioHardwareUnload();
}
JNIEXPORT jint JNICALL Java_com_apple_audio_hardware_AudioHardware_AudioHardwareUnload
  (JNIEnv *, jclass)
{
	return (jint)AudioHardwareUnload();
}