本文整理汇总了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;
}
}
示例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;
}
}
示例3: DUMMYAUD_CloseAudio
static void DUMMYAUD_CloseAudio(_THIS)
{
if ( this->hidden->mixbuf != NULL ) {
SDL_FreeAudioMem(this->hidden->mixbuf);
this->hidden->mixbuf = NULL;
}
}
示例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();
}
示例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;
}
}
示例6: ARTSC_CloseAudio
static void ARTSC_CloseAudio(_THIS)
{
if ( mixbuf != NULL ) {
SDL_FreeAudioMem(mixbuf);
mixbuf = NULL;
}
if ( stream ) {
arts_close_stream(stream);
stream = 0;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例11: SNDIO_CloseAudio
static void SNDIO_CloseAudio(_THIS)
{
if ( mixbuf != NULL ) {
SDL_FreeAudioMem(mixbuf);
mixbuf = NULL;
}
if ( hdl != NULL ) {
sio_close(hdl);
hdl = NULL;
}
}
示例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;
}
}
示例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;
}
}
示例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);
}
示例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;
}
}