#include <unistd.h>
#include <sys/types.h>
#include <errno.h>
+#include <setjmp.h>
#include "lisp.h"
#include "dispextern.h"
#include "atimer.h"
if (err < 0)
alsa_sound_perror ("Unable to set avail min for playback", err);
- /* Align all transfers to 1 period */
- err = snd_pcm_sw_params_set_xfer_align (p->handle, p->swparams,
- p->period_size);
- if (err < 0)
- alsa_sound_perror ("Unable to set transfer align for playback", err);
-
err = snd_pcm_sw_params (p->handle, p->swparams);
if (err < 0)
alsa_sound_perror ("Unable to set sw params for playback\n", err);
/* BEGIN: Windows specific functions */
-#define SOUND_WARNING(fun, error, text) \
- { \
- char buf[1024]; \
- char err_string[MAXERRORLENGTH]; \
+#define SOUND_WARNING(fun, error, text) \
+ { \
+ char buf[1024]; \
+ char err_string[MAXERRORLENGTH]; \
fun (error, err_string, sizeof (err_string)); \
- snprintf (buf, sizeof (buf), "%s\nError: %s", \
- text, err_string); \
- sound_warning (buf); \
+ _snprintf (buf, sizeof (buf), "%s\nError: %s", \
+ text, err_string); \
+ sound_warning (buf); \
}
static int
void
syms_of_sound ()
{
- QCdevice = intern (":device");
+ QCdevice = intern_c_string(":device");
staticpro (&QCdevice);
- QCvolume = intern (":volume");
+ QCvolume = intern_c_string (":volume");
staticpro (&QCvolume);
- Qsound = intern ("sound");
+ Qsound = intern_c_string ("sound");
staticpro (&Qsound);
- Qplay_sound_functions = intern ("play-sound-functions");
+ Qplay_sound_functions = intern_c_string ("play-sound-functions");
staticpro (&Qplay_sound_functions);
defsubr (&Splay_sound_internal);