shithub: choc

Download patch

ref: 210b440bd8a7040913dfb4d1b5ebf68c13b840d7
parent: 8ed2da84d97835024d2f561512c418152077139f
author: Simon Howard <fraggle@gmail.com>
date: Sun Sep 11 19:57:08 EDT 2005

Remove temporary MIDI files generated by sound code.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 102

--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
 
+    Remove temporary MIDI files generated by sound code.
     Fix sound not playing at the right volume
     Allow alt-tab away while running in fullscreen under Windows
     Add second configuration file (chocolate-doom.cfg) to allow 
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: i_sound.c 101 2005-09-11 20:53:17Z fraggle $
+// $Id: i_sound.c 102 2005-09-11 23:57:08Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.19  2005/09/11 23:57:08  fraggle
+// Remove temporary MIDI files generated by sound code.
+//
 // Revision 1.18  2005/09/11 20:53:17  fraggle
 // Fix sounds playing at the wrong volume (too quiet)
 //
@@ -90,7 +93,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: i_sound.c 101 2005-09-11 20:53:17Z fraggle $";
+rcsid[] = "$Id: i_sound.c 102 2005-09-11 23:57:08Z fraggle $";
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -605,6 +608,10 @@
 
             fprintf(stderr, "Error loading midi\n");
         }
+
+        // remove file now
+
+        remove(filename);
     }
 
     Z_Free(mididata);