コード例 #1
0
ファイル: drv_pipe.c プロジェクト: LighFusion/surreal
static void pipe_Exit(void)
{
#if defined unix || (defined __APPLE__ && defined __MACH__)
	int pstat;
	pid_t pid2;
#endif

	VC_Exit();
	MikMod_free(audiobuffer);
	if(pipeout) {
		_mm_delete_file_writer(pipeout);
		pipeout=NULL;
	}
	if(pipefile) {
#if !defined unix && (!defined __APPLE__ || !defined __MACH__)
#ifdef __WATCOMC__
		_pclose(pipefile);
#else
		pclose(pipefile);
#endif
#ifdef __EMX__
		_fsetmode(stdout,"t");
#endif
#else
		fclose(pipefile);
		do {
			pid2=waitpid(pid,&pstat,0);
		} while (pid2==-1 && errno==EINTR);
#endif
		pipefile=NULL;
	}
}
コード例 #2
0
ファイル: drv_nos.c プロジェクト: jjgod/SDL
static void NS_Exit(void)
{
	VC_Exit();
#ifndef SDL_MIXER_ONLY
	_mm_free(zerobuf);
#endif
}
コード例 #3
0
ファイル: drv_sun.c プロジェクト: fruitz-of-dojo/libmikmod
static void Sun_Exit(void)
{
	VC_Exit();
	_mm_free(audiobuffer);
	if (sndfd >= 0) {
		close(sndfd);
		sndfd = -1;
	}
}
コード例 #4
0
ファイル: drv_esd.c プロジェクト: OS2World/LIB-SDL-2014
static void ESD_Exit_internal(void)
{
	VC_Exit();
	if (sndfd>=0) {
		esd_closestream(sndfd);
		sndfd=-1;
		signal(SIGPIPE,SIG_DFL);
	}
}
コード例 #5
0
ファイル: drv_nds_sw.c プロジェクト: sypherce/dslua
static void NDS_SW_Exit(void)
{
	MikMod9_SendCommand(NDS_SW_CMD_EXIT << 28);
	VC_Exit();
	_mm_free(ipc->buffer);
	ipc->buffer = NULL;
	_mm_free(ipc);
	ipc = NULL;
}
コード例 #6
0
ファイル: drv_raw.c プロジェクト: dreamsxin/golf
static void RAW_Exit(void)
{
	VC_Exit();
	if (rawout!=-1) {
		close(rawout);
		rawout=-1;
	}
	_mm_free(audiobuffer);
}
コード例 #7
0
ファイル: drv_stdout.c プロジェクト: OS2World/LIB-SDL-2014
static void stdout_Exit(void)
{
	VC_Exit();
#ifdef __EMX__
	_fsetmode(stdout,"t");
#endif
	MikMod_free(audiobuffer);
	audiobuffer=NULL;
}
コード例 #8
0
ファイル: drv_aix.c プロジェクト: mistydemeo/libmikmod
static void AIX_Exit(void)
{
	VC_Exit();
	if (fd>=0) {
		close(fd);
		fd=-1;
	}
	MikMod_free(audiobuffer);
}
コード例 #9
0
void MD_Exit(void)
{
    //	if (md_driver)
    //	{
    //		md_driver->Exit();
    //	}
    VC_Exit();
    mod_free(sl_buffer); 
    sl_buffer = NULL;
}
コード例 #10
0
ファイル: drv_alsa.c プロジェクト: idispatch/libmikmod
static void ALSA_Exit_internal(void)
{
	VC_Exit();
	if (pcm_h) {
		alsa_pcm_drain_playback(pcm_h);
		alsa_pcm_close(pcm_h);
		pcm_h=NULL;
	}
	MikMod_free(audiobuffer);
}
コード例 #11
0
ファイル: drv_alsa.c プロジェクト: OS2World/LIB-SDL-2014
static void ALSA_Exit_internal(void)
{
	enabled = 0;
	VC_Exit();
	if (pcm_h) {
		alsa_pcm_drain(pcm_h);
		alsa_pcm_close(pcm_h);
		pcm_h = NULL;
	}
	MikMod_free(audiobuffer);
	audiobuffer = NULL;
}
コード例 #12
0
ファイル: drv_hp.c プロジェクト: Jay-Jay-OPL/ps2sdk-ports
static void HP_Exit(void)
{
	VC_Exit();
	if (fd>=0) {
		ioctl(fd,AUDIO_DRAIN,0);
		close(fd);
		fd=-1;
	}
	if (audiobuffer) {
		free(audiobuffer);
		audiobuffer=NULL;
	}
}
コード例 #13
0
ファイル: drv_alsa.c プロジェクト: LighFusion/surreal
static void ALSA_Exit_internal(void)
{
	VC_Exit();
	if (pcm_h) {
#ifdef OLD_ALSA
		alsa_pcm_drain_playback(pcm_h);
#else
		alsa_pcm_drain(pcm_h);
#endif
		alsa_pcm_close(pcm_h);
		pcm_h=NULL;
	}
	MikMod_free(audiobuffer);
}
コード例 #14
0
ファイル: drv_wav.c プロジェクト: OS2World/LIB-SDL-2014
static void WAV_Exit(void)
{
	VC_Exit();

	/* write in the actual sizes now */
	if(wavout) {
		putheader();
		_mm_delete_file_writer(wavout);
		fclose(wavfile);
		wavfile=NULL;wavout=NULL;
	}
	MikMod_free(audiobuffer);
	audiobuffer=NULL;
}
コード例 #15
0
ファイル: drv_ds.c プロジェクト: OS2World/LIB-SDL-2014
static void DS_Exit(void)
{
	DWORD statusInfo;

	if(updateBufferHandle) {
		/* Signal thread to exit and wait for the exit */
		if (threadInUse) {
			threadInUse = 0;
			MUTEX_UNLOCK(vars);
			SetEvent (notifyUpdateHandle);
			WaitForSingleObject (updateBufferHandle, INFINITE);
			MUTEX_LOCK(vars);
		}

		CloseHandle(updateBufferHandle),
		updateBufferHandle = NULL;
	}
	if (notifyUpdateHandle) {
		CloseHandle(notifyUpdateHandle),
		notifyUpdateHandle = NULL;
	}

	if (pSoundBufferNotify) {
		IDirectSoundNotify_Release(pSoundBufferNotify);
		pSoundBufferNotify = NULL;
	}
	if(pSoundBuffer) {
		if(IDirectSoundBuffer_GetStatus(pSoundBuffer,&statusInfo)==DS_OK)
			if(statusInfo&DSBSTATUS_PLAYING)
				IDirectSoundBuffer_Stop(pSoundBuffer);
		IDirectSoundBuffer_Release(pSoundBuffer);
		pSoundBuffer = NULL;
	}

	if(pPrimarySoundBuffer) {
		if(IDirectSoundBuffer_GetStatus(pPrimarySoundBuffer,&statusInfo)==DS_OK)
			if(statusInfo&DSBSTATUS_PLAYING)
				IDirectSoundBuffer_Stop(pPrimarySoundBuffer);
		IDirectSoundBuffer_Release(pPrimarySoundBuffer);
		pPrimarySoundBuffer = NULL;
	}

	if (pSoundCard) {
		IDirectSound_Release(pSoundCard);
		pSoundCard = NULL;
	}

	VC_Exit();
}
コード例 #16
0
ファイル: drv_win.c プロジェクト: Bracket-/psp-ports
static void WIN_Exit(void)
{
	int n;

	VC_Exit();
	if (hwaveout) {
		for (n=0;n<NUMBUFFERS;n++) {
			if (header[n].dwFlags&WHDR_PREPARED)
				waveOutUnprepareHeader(hwaveout,&header[n],sizeof(WAVEHDR));
			_mm_free(buffer[n]);
		}
		while (waveOutClose(hwaveout)==WAVERR_STILLPLAYING) Sleep(10);
		hwaveout=NULL;
	}
}
コード例 #17
0
ファイル: drv_ds.c プロジェクト: Jay-Jay-OPL/ps2sdk-ports
static void DS_Exit(void)
{
	DWORD statusInfo;

	if(updateBufferHandle) {

		/* Signal thread to exit and wait for the exit */
		if (threadInUse) {
			threadInUse = 0;
			MUTEX_UNLOCK(vars);
			SetEvent (notifyUpdateHandle);
			WaitForSingleObject (updateBufferHandle, INFINITE);
			MUTEX_LOCK(vars);
		}

		CloseHandle(updateBufferHandle),
		updateBufferHandle = 0;
	}
	if (notifyUpdateHandle) {
		CloseHandle(notifyUpdateHandle),
		notifyUpdateHandle = 0;
	}

	SAFE_RELEASE(pSoundBufferNotify);
	if(pSoundBuffer) {
		if(pSoundBuffer->lpVtbl->GetStatus(pSoundBuffer,&statusInfo)==DS_OK)
			if(statusInfo&DSBSTATUS_PLAYING)
				pSoundBuffer->lpVtbl->Stop(pSoundBuffer);
		SAFE_RELEASE(pSoundBuffer);
	}

	if(pPrimarySoundBuffer) {
		if(pPrimarySoundBuffer->lpVtbl->GetStatus
						(pPrimarySoundBuffer,&statusInfo)==DS_OK)
			if(statusInfo&DSBSTATUS_PLAYING)
				pPrimarySoundBuffer->lpVtbl->Stop(pPrimarySoundBuffer);
		SAFE_RELEASE(pPrimarySoundBuffer);
	}

	SAFE_RELEASE(pSoundCard);

	VC_Exit();
}
コード例 #18
0
ファイル: drv_xaudio2.c プロジェクト: OS2World/LIB-SDL-2014
static void XAudio2_Exit(void) {
	if (UpdateBufferHandle != NULL) {
		/* signal thread to exit and wait for the exit */
		if (threadInUse) {
			threadInUse = 0;
			MUTEX_UNLOCK(vars);
			SetEvent(hBufferEvent);
			WaitForSingleObject(UpdateBufferHandle, INFINITE);
			MUTEX_LOCK(vars);
		}
		CloseHandle(UpdateBufferHandle);
		UpdateBufferHandle = NULL;
	}
	IXAudio2SourceVoice_Stop(pSourceVoice, 0, 0);
	if (pSourceVoice) {
		IXAudio2SourceVoice_DestroyVoice(pSourceVoice);
		pSourceVoice = NULL;
	}
	if (pMasterVoice) {
		IXAudio2MasteringVoice_DestroyVoice(pMasterVoice);
		pMasterVoice = NULL;
	}
	if (pXAudio2) {
		IXAudio2_Release(pXAudio2);
		pXAudio2 = NULL;
	}
#ifndef __cplusplus
	if (hBufferEvent != NULL) {
		CloseHandle(hBufferEvent);
		hBufferEvent = NULL;
	}
#endif
#ifndef _XBOX
	CoUninitialize();
#endif
	VC_Exit();
}
コード例 #19
0
ファイル: drv_osles.c プロジェクト: 0xD34D/libmikmod-android
static void OSLES_Exit(void)
{
	int n;

	VC_Exit();
	for (n=0;n<NUMBUFFERS;n++) {
		_mm_free(buffer[n]);
	}

    // destroy buffer queue audio player object, and invalidate all associated interfaces
    if (bqPlayerObject != NULL) {
    	SLuint32 state;
    	(*bqPlayerPlay)->GetPlayState(bqPlayerPlay, &state);
    	if (state == SL_PLAYSTATE_PLAYING)
    		(*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_STOPPED);
        (*bqPlayerObject)->Destroy(bqPlayerObject);
        bqPlayerObject = NULL;
        bqPlayerPlay = NULL;
        bqPlayerBufferQueue = NULL;
        bqPlayerEffectSend = NULL;
    }

    // destroy output mix object, and invalidate all associated interfaces
    if (outputMixObject != NULL) {
        (*outputMixObject)->Destroy(outputMixObject);
        outputMixObject = NULL;
        outputMixEnvironmentalReverb = NULL;
    }

    // destroy engine object, and invalidate all associated interfaces
    if (engineObject != NULL) {
        (*engineObject)->Destroy(engineObject);
        engineObject = NULL;
        engineEngine = NULL;
    }
}
コード例 #20
0
static void mod_mpd_Exit() {
	VC_Exit();
}
コード例 #21
0
static void NS_Exit(void)
{
	VC_Exit();
	_mm_free(zerobuf);
}
コード例 #22
0
ファイル: drv_android.c プロジェクト: wbb1977/modo_android
static BOOL ANDROID_Reset(void)
{
	VC_Exit();
	return VC_Init();
}
コード例 #23
0
ファイル: drv_gp32.c プロジェクト: gameblabla/methane
static void GP32_Exit(void) {
	gp_clearRingbuffer();
	MikMod_free(GP32_buffer);
	GP32_buffer=NULL;
	VC_Exit();
}
コード例 #24
0
ファイル: drv_stdout.c プロジェクト: fruitz-of-dojo/libmikmod
static BOOL stdout_Reset(void)
{
	VC_Exit();
	return VC_Init();
}
コード例 #25
0
ファイル: drv_nos.c プロジェクト: 0xDEC0DE/uqm-0.6.4-ee
static void NS_Exit(void)
{
	VC_Exit();
	MikMod_free(zerobuf);
}
コード例 #26
0
ファイル: drv_android.c プロジェクト: wbb1977/modo_android
static void ANDROID_Exit(void)
{
	audio_ready = 0;
	playing = 0;
	VC_Exit();
}
コード例 #27
0
ファイル: drv_wss.c プロジェクト: Bracket-/psp-ports
static BOOL WSS_Reset(void)
{
	wss_reset();
	VC_Exit();
	return VC_Init();
}
コード例 #28
0
static void PSP_Exit(void)
{
//	pspAudioEndPre();
//	pspAudioEnd();
    VC_Exit();
}
コード例 #29
0
static BOOL PSP_Reset(void)
{
    VC_Exit();
    return VC_Init();
}
コード例 #30
0
ファイル: drv_wss.c プロジェクト: Bracket-/psp-ports
static void WSS_Exit(void)
{
	VC_Exit();
	wss_close();
}