当前位置: 首页>>代码示例>>C++>>正文


C++ SDL_FreeAudioMem函数代码示例

本文整理汇总了C++中SDL_FreeAudioMem函数的典型用法代码示例。如果您正苦于以下问题:C++ SDL_FreeAudioMem函数的具体用法?C++ SDL_FreeAudioMem怎么用?C++ SDL_FreeAudioMem使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SDL_FreeAudioMem函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QSA_CloseDevice

static void
QSA_CloseDevice(_THIS)
{
    if (this->hidden != NULL) {
        if (this->hidden->audio_handle != NULL) {
            if (!this->hidden->iscapture) {
                /* Finish playing available samples */
                snd_pcm_plugin_flush(this->hidden->audio_handle,
                                     SND_PCM_CHANNEL_PLAYBACK);
            } else {
                /* Cancel unread samples during capture */
                snd_pcm_plugin_flush(this->hidden->audio_handle,
                                     SND_PCM_CHANNEL_CAPTURE);
            }
            snd_pcm_close(this->hidden->audio_handle);
            this->hidden->audio_handle = NULL;
        }

        SDL_FreeAudioMem(this->hidden->pcm_buf);
        this->hidden->pcm_buf = NULL;

        SDL_free(this->hidden);
        this->hidden = NULL;
    }
}
开发者ID:KSLcom,项目名称:caesaria-game,代码行数:25,代码来源:SDL_qsa_audio.c

示例2: PULSEAUDIO_CloseDevice

static void
PULSEAUDIO_CloseDevice(_THIS)
{
    if (this->hidden != NULL) {
        if (this->hidden->mixbuf != NULL) {
            SDL_FreeAudioMem(this->hidden->mixbuf);
            this->hidden->mixbuf = NULL;
        }
        if (this->hidden->stream) {
            PULSEAUDIO_pa_stream_disconnect(this->hidden->stream);
            PULSEAUDIO_pa_stream_unref(this->hidden->stream);
            this->hidden->stream = NULL;
        }
        if (this->hidden->context != NULL) {
            PULSEAUDIO_pa_context_disconnect(this->hidden->context);
            PULSEAUDIO_pa_context_unref(this->hidden->context);
            this->hidden->context = NULL;
        }
        if (this->hidden->mainloop != NULL) {
            PULSEAUDIO_pa_mainloop_free(this->hidden->mainloop);
            this->hidden->mainloop = NULL;
        }
        SDL_free(this->hidden);
        this->hidden = NULL;
    }
}
开发者ID:Plombo,项目名称:SDL,代码行数:26,代码来源:SDL_pulseaudio.c

示例3: DUMMYAUD_CloseAudio

static void DUMMYAUD_CloseAudio(_THIS)
{
	if ( this->hidden->mixbuf != NULL ) {
		SDL_FreeAudioMem(this->hidden->mixbuf);
		this->hidden->mixbuf = NULL;
	}
}
开发者ID:3bu1,项目名称:crossbridge,代码行数:7,代码来源:SDL_dummyaudio.c

示例4: MPFAUD_CloseAudio

static void MPFAUD_CloseAudio(_THIS)
{
	if ( this->hidden->mixbuf != NULL ) {
		SDL_FreeAudioMem(this->hidden->mixbuf);
		this->hidden->mixbuf = NULL;
	}
	sys_sound_deinit();
}
开发者ID:arsane,项目名称:mp4sdk,代码行数:8,代码来源:SDL_mpf_audio.c

示例5: DCAUD_CloseAudio

static void DCAUD_CloseAudio(_THIS)
{
	aica_stop(0);
	if (this->spec.channels==2) aica_stop(1);
	if ( this->hidden->mixbuf != NULL ) {
		SDL_FreeAudioMem(this->hidden->mixbuf);
		this->hidden->mixbuf = NULL;
	}
}
开发者ID:foreverlikeyou9999,项目名称:kos-ports,代码行数:9,代码来源:SDL_dcaudio.c

示例6: ARTSC_CloseAudio

static void ARTSC_CloseAudio(_THIS)
{
	if ( mixbuf != NULL ) {
		SDL_FreeAudioMem(mixbuf);
		mixbuf = NULL;
	}
	if ( stream ) {
		arts_close_stream(stream);
		stream = 0;
	}
}
开发者ID:wwzbwwzb,项目名称:fbdri,代码行数:11,代码来源:SDL_artsaudio.c

示例7: DISKAUD_CloseAudio

static void DISKAUD_CloseAudio(_THIS)
{
	if ( this->hidden->mixbuf != NULL ) {
		SDL_FreeAudioMem(this->hidden->mixbuf);
		this->hidden->mixbuf = NULL;
	}
	if ( this->hidden->audio_fd >= 0 ) {
		close(this->hidden->audio_fd);
		this->hidden->audio_fd = -1;
	}
}
开发者ID:Goettsch,项目名称:game-editor,代码行数:11,代码来源:SDL_diskaudio.c

示例8: DSP_CloseAudio

static void DSP_CloseAudio(_THIS)
{
	if ( mixbuf != NULL ) {
		SDL_FreeAudioMem(mixbuf);
		mixbuf = NULL;
	}
	if ( audio_fd >= 0 ) {
		close(audio_fd);
		audio_fd = -1;
	}
}
开发者ID:wwzbwwzb,项目名称:fbdri,代码行数:11,代码来源:SDL_dspaudio.c

示例9: DISKAUD_CloseAudio

static void DISKAUD_CloseAudio(_THIS)
{
	if ( this->hidden->mixbuf != NULL ) {
		SDL_FreeAudioMem(this->hidden->mixbuf);
		this->hidden->mixbuf = NULL;
	}
	if ( this->hidden->output != NULL ) {
		SDL_RWclose(this->hidden->output);
		this->hidden->output = NULL;
	}
}
开发者ID:cuttl,项目名称:wii2600,代码行数:11,代码来源:SDL_diskaudio.c

示例10: NAS_CloseAudio

static void NAS_CloseAudio(_THIS)
{
	if ( this->hidden->mixbuf != NULL ) {
		SDL_FreeAudioMem(this->hidden->mixbuf);
		this->hidden->mixbuf = NULL;
	}
	if ( this->hidden->aud ) {
		AuCloseServer(this->hidden->aud);
		this->hidden->aud = 0;
	}
}
开发者ID:bohwaz,项目名称:ozex,代码行数:11,代码来源:SDL_nasaudio.c

示例11: SNDIO_CloseAudio

static void SNDIO_CloseAudio(_THIS)
{
	if ( mixbuf != NULL ) {
		SDL_FreeAudioMem(mixbuf);
		mixbuf = NULL;
	}
	if ( hdl != NULL ) {
		sio_close(hdl);
		hdl = NULL;
	}
}
开发者ID:Ptr-mat,项目名称:bitrig-ports,代码行数:11,代码来源:SDL_sndioaudio.c

示例12: AL_CloseAudio

static void AL_CloseAudio(_THIS)
{
	if ( mixbuf != NULL ) {
		SDL_FreeAudioMem(mixbuf);
		mixbuf = NULL;
	}
	if ( audio_port != NULL ) {
		alClosePort(audio_port);
		audio_port = NULL;
	}
}
开发者ID:BluePandaLi,项目名称:mpeg4ip,代码行数:11,代码来源:SDL_irixaudio.c

示例13: ALSA_CloseAudio

static void ALSA_CloseAudio(_THIS)
{
	if ( mixbuf != NULL ) {
		SDL_FreeAudioMem(mixbuf);
		mixbuf = NULL;
	}
	if ( pcm_handle ) {
		SDL_NAME(snd_pcm_drain)(pcm_handle);
		SDL_NAME(snd_pcm_close)(pcm_handle);
		pcm_handle = NULL;
	}
}
开发者ID:RDCH106,项目名称:n64oid,代码行数:12,代码来源:SDL_alsa_audio.c

示例14: DSP_CloseAudio

void DSP_CloseAudio(_THIS)
{
    if ( mixbuf != NULL ) {
        SDL_FreeAudioMem(mixbuf);
        mixbuf = NULL;
    }
    if ( ulaw_buf != NULL ) {
        free(ulaw_buf);
        ulaw_buf = NULL;
    }
    close(audio_fd);
}
开发者ID:wwzbwwzb,项目名称:fbdri,代码行数:12,代码来源:SDL_sunaudio.c

示例15: PULSE_CloseAudio

static void PULSE_CloseAudio(_THIS)
{
	if ( mixbuf != NULL ) {
		SDL_FreeAudioMem(mixbuf);
		mixbuf = NULL;
	}
	if ( stream != NULL ) {
		SDL_NAME(pa_simple_drain)(stream, NULL);
		SDL_NAME(pa_simple_free)(stream);
		stream = NULL;
	}
}
开发者ID:RDCH106,项目名称:n64oid,代码行数:12,代码来源:SDL_pulseaudio.c


注:本文中的SDL_FreeAudioMem函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。