/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <string.h> /* strerror() */
-#include <stdlib.h> /* calloc(), malloc(), free() */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include "aout_internal.h"
+#include <vlc_aout.h>
#include <windows.h>
#include <mmsystem.h>
aout_sys_t *p_sys = p_aout->output.p_sys;
/* Before calling waveOutClose we must reset the device */
- p_aout->b_die = VLC_TRUE;
+ vlc_object_kill( p_aout );
waveOutReset( p_sys->h_waveout );
if( (p_waveheader[i].dwFlags & WHDR_DONE) &&
p_waveheader[i].dwUser )
{
+ aout_buffer_t *p_buffer =
+ (aout_buffer_t *)(p_waveheader[i].dwUser);
/* Unprepare and free the buffers which has just been played */
waveOutUnprepareHeader( p_sys->h_waveout, &p_waveheader[i],
sizeof(WAVEHDR) );
if( p_waveheader[i].dwUser != 1 )
- aout_BufferFree( (aout_buffer_t *)p_waveheader[i].dwUser );
+ aout_BufferFree( p_buffer );
p_waveheader[i].dwUser = 0;
}