X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fntplay.c;h=780441861504f3046c507067fbc7a8ebbd7e6d40;hb=eeca41d3213b7a3b7efcf6508693e748c1590748;hp=d535fd97da39d7d4f93b1609d21312948b0e02d1;hpb=3890a2e3064a7f562107c58e59d928284ec04741;p=chise%2Fxemacs-chise.git.1 diff --git a/src/ntplay.c b/src/ntplay.c index d535fd9..7804418 100644 --- a/src/ntplay.c +++ b/src/ntplay.c @@ -18,19 +18,14 @@ along with XEmacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/ -#include #include -#include -#include "sysfile.h" #include "lisp.h" -#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \ - CYGWIN_VERSION_DLL_MAJOR < 21 -extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD); -#else -#include -#endif -static void play_sound_data_1 (unsigned char *data, int length, +#include "sysfile.h" +#include "nt.h" +#include "nativesound.h" + +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 +71,7 @@ void play_sound_file (char *sound_file, int volume) /* 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 +93,11 @@ static void play_sound_data_1 (unsigned char *data, int length, int volume, 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); }