Mercurial > hg > xemacs-beta
comparison src/sound.c @ 44:8d2a9b52c682 r19-15prefinal
Import from CVS: tag r19-15prefinal
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:55:10 +0200 |
parents | 859a2309aef8 |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
43:23cafc5d2038 | 44:8d2a9b52c682 |
---|---|
73 where WAV files are also supported. | 73 where WAV files are also supported. |
74 DEVICE defaults to the selected device. | 74 DEVICE defaults to the selected device. |
75 */ | 75 */ |
76 (file, volume, device)) | 76 (file, volume, device)) |
77 { | 77 { |
78 /* This function can GC */ | 78 /* This function can call lisp */ |
79 int vol; | 79 int vol; |
80 #if defined (HAVE_NATIVE_SOUND) || defined (HAVE_NAS_SOUND) | 80 #if defined (HAVE_NATIVE_SOUND) || defined (HAVE_NAS_SOUND) |
81 struct device *d = decode_device (device); | 81 struct device *d = decode_device (device); |
82 #endif | 82 #endif |
83 struct gcpro gcpro1; | |
84 | |
83 CHECK_STRING (file); | 85 CHECK_STRING (file); |
84 if (NILP (volume)) | 86 if (NILP (volume)) |
85 vol = bell_volume; | 87 vol = bell_volume; |
86 else | 88 else |
87 { | 89 { |
88 CHECK_INT (volume); | 90 CHECK_INT (volume); |
89 vol = XINT (volume); | 91 vol = XINT (volume); |
90 } | 92 } |
91 | 93 |
94 GCPRO1 (file); | |
92 file = Fexpand_file_name (file, Qnil); | 95 file = Fexpand_file_name (file, Qnil); |
93 if (NILP (Ffile_readable_p (file))) | 96 if (NILP (Ffile_readable_p (file))) |
94 if (NILP (Ffile_exists_p (file))) | 97 if (NILP (Ffile_exists_p (file))) |
95 error ("file does not exist."); | 98 error ("file does not exist."); |
96 else | 99 else |
97 error ("file is unreadable."); | 100 error ("file is unreadable."); |
101 UNGCPRO; | |
98 | 102 |
99 #ifdef HAVE_NAS_SOUND | 103 #ifdef HAVE_NAS_SOUND |
100 if (DEVICE_CONNECTED_TO_NAS_P (d)) | 104 if (DEVICE_CONNECTED_TO_NAS_P (d)) |
101 { | 105 { |
102 char *fileext; | 106 char *fileext; |