Mercurial > hg > xemacs-beta
diff src/ntplay.c @ 406:b8cc9ab3f761 r21-2-33
Import from CVS: tag r21-2-33
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:17:09 +0200 |
parents | a86b2b5e0111 |
children | 501cfd01ee6d |
line wrap: on
line diff
--- a/src/ntplay.c Mon Aug 13 11:16:09 2007 +0200 +++ b/src/ntplay.c Mon Aug 13 11:17:09 2007 +0200 @@ -23,6 +23,7 @@ #include <stdio.h> #include "sysfile.h" #include "lisp.h" +#include "nativesound.h" #if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \ CYGWIN_VERSION_DLL_MAJOR < 21 @@ -30,7 +31,7 @@ #else #include <mmsystem.h> #endif -static void play_sound_data_1 (unsigned char *data, int length, +static int play_sound_data_1 (unsigned char *data, int length, int volume, int convert); void play_sound_file (char *sound_file, int volume) @@ -76,7 +77,7 @@ /* mswindows can't cope with playing a sound from alloca space so we have to convert if necessary */ -static void play_sound_data_1 (unsigned char *data, int length, int volume, +static int play_sound_data_1 (unsigned char *data, int length, int volume, int convert_to_malloc) { DWORD flags = SND_ASYNC | SND_MEMORY | SND_NODEFAULT; @@ -98,10 +99,11 @@ PlaySound(sound_data, NULL, flags); - return; + /* #### Error handling? */ + return 1; } -void play_sound_data (unsigned char *data, int length, int volume) +int play_sound_data (unsigned char *data, int length, int volume) { - play_sound_data_1 (data, length, volume, TRUE); + return play_sound_data_1 (data, length, volume, TRUE); }