annotate src/sound.h @ 2039:fd0cbe945410

[xemacs-hg @ 2004-04-22 03:24:00 by james] Change VALBITS to INT_VALBITS in a number of places.
author james
date Thu, 22 Apr 2004 03:24:02 +0000
parents 804517e16990
children ecf1ebac70d8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
1 /* Sound functions.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
2 Copyright (C) 2000 Free Software Foundation, Inc.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
3 Copyright (C) 2001 Ben Wing.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
4
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
5 This file is part of XEmacs.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
6
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
10 later version.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
11
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
15 for more details.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
16
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
21
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
23
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
24 /* This file Mule-ized by Ben Wing, 5-15-01. */
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
25
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
26 #include "buffer.h"
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
27
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
28 /* Defined in *play.c */
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
29 void play_sound_file (Extbyte *name, int volume);
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
30 int play_sound_data (UChar_Binary *data, int length, int volume);
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
31
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 616
diff changeset
32 # define sound_perror(string) \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 616
diff changeset
33 do { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 771
diff changeset
34 Ibyte *errmess; \
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 771
diff changeset
35 Ibyte *string_int; \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 665
diff changeset
36 GET_STRERROR (errmess, errno); \
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 616
diff changeset
37 EXTERNAL_TO_C_STRING (string, string_int, Qnative); \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 616
diff changeset
38 warn_when_safe (Qsound, Qerror, "audio: %s, %s", string_int, errmess); \
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
39 } while (0)
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
40 # define sound_warn(string) \
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
41 do { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 771
diff changeset
42 Ibyte *string_int; \
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
43 EXTERNAL_TO_C_STRING (GETTEXT (string), string_int, Qnative); \
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
44 warn_when_safe (Qsound, Qwarning, "audio: %s", string_int); \
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
45 } while (0)