comparison playsound/playsound.c @ 409:0dbf37be0a5a

Valgrind cleanups.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 29 Jul 2002 22:36:21 +0000
parents 325af3e2cbb3
children 50bb9a6cebfe
comparison
equal deleted inserted replaced
408:3da217bd0e48 409:0dbf37be0a5a
732 732
733 int main(int argc, char **argv) 733 int main(int argc, char **argv)
734 { 734 {
735 Sound_AudioInfo sound_desired; 735 Sound_AudioInfo sound_desired;
736 SDL_AudioSpec sdl_desired; 736 SDL_AudioSpec sdl_desired;
737 SDL_AudioSpec sdl_actual;
738 Uint32 audio_buffersize; 737 Uint32 audio_buffersize;
739 Uint32 decode_buffersize; 738 Uint32 decode_buffersize;
740 Sound_Sample *sample; 739 Sound_Sample *sample;
741 int use_specific_audiofmt = 0; 740 int use_specific_audiofmt = 0;
742 int i; 741 int i;
835 { 834 {
836 if (global_state.seek_list != NULL) 835 if (global_state.seek_list != NULL)
837 free((void *) global_state.seek_list); 836 free((void *) global_state.seek_list);
838 837
839 memset((void *) &global_state, '\0', sizeof (global_state)); 838 memset((void *) &global_state, '\0', sizeof (global_state));
839 memset(&sdl_desired, '\0', sizeof (SDL_AudioSpec));
840 global_state.volume = 1.0; 840 global_state.volume = 1.0;
841 global_state.bytes_before_next_seek = -1; 841 global_state.bytes_before_next_seek = -1;
842 audio_buffersize = DEFAULT_AUDIOBUF; 842 audio_buffersize = DEFAULT_AUDIOBUF;
843 decode_buffersize = DEFAULT_DECODEBUF; 843 decode_buffersize = DEFAULT_DECODEBUF;
844 new_sample = 0; 844 new_sample = 0;