Cleanups: Set to NULL after free, remove commented out code

This commit is contained in:
Dave Vasilevsky 2015-12-27 22:39:23 -05:00
parent 09a0525aac
commit 4fa03d5fb1

View File

@ -161,6 +161,7 @@ static void close_audio(void)
// Close audio device // Close audio device
SDL_CloseAudio(); SDL_CloseAudio();
free(audio_mix_buf); free(audio_mix_buf);
audio_mix_buf = NULL;
audio_open = false; audio_open = false;
} }
@ -223,10 +224,6 @@ static void stream_func(void *arg, uint8 *stream, int stream_len)
memset((uint8 *)stream, silence_byte, stream_len); memset((uint8 *)stream, silence_byte, stream_len);
SDL_MixAudio(stream, audio_mix_buf, work_size, audio_volume); SDL_MixAudio(stream, audio_mix_buf, work_size, audio_volume);
// Mac2Host_memcpy(stream, ReadMacInt32(apple_stream_info + scd_buffer), work_size);
// if (work_size != stream_len)
// memset((uint8 *)stream + work_size, silence_byte, stream_len - work_size);
D(bug("stream: data written\n")); D(bug("stream: data written\n"));
} else } else