/* sound.c -- sound support.
- Copyright (C) 1998-1999, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* Close device SD. */
void (* close) (struct sound_device *sd);
- /* Configure SD accoring to device-dependent parameters. */
+ /* Configure SD according to device-dependent parameters. */
void (* configure) (struct sound_device *device);
/* Choose a device-dependent format for outputting sound S. */
read from the start of a sound file. */
char *header;
- /* Number of bytes raed from sound file. This is always <=
+ /* Number of bytes read from sound file. This is always <=
MAX_SOUND_HEADER_BYTES. */
int header_size;
err = snd_pcm_hw_params_get_buffer_size (p->hwparams, &buffer_size);
if (err < 0)
- alsa_sound_perror("Unable to get buffer size for playback", err);
+ alsa_sound_perror ("Unable to get buffer size for playback", err);
err = snd_pcm_sw_params_current (p->handle, p->swparams);
if (err < 0)
snd_mixer_selem_set_playback_volume (e, chn, vol);
}
}
- snd_mixer_close(handle);
+ snd_mixer_close (handle);
}
}
}
else if (err == -ESTRPIPE)
{
while ((err = snd_pcm_resume (p->handle)) == -EAGAIN)
- sleep(1); /* wait until the suspend flag is released */
+ sleep (1); /* wait until the suspend flag is released */
if (err < 0)
{
err = snd_pcm_prepare (p->handle);
}
else if (FLOATP (attrs[SOUND_VOLUME]))
{
- ui_volume_tmp = (unsigned long) XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
+ ui_volume_tmp = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
}
/*
Based on some experiments I have conducted, a value of 100 or less
void
syms_of_sound (void)
{
- QCdevice = intern_c_string(":device");
- staticpro (&QCdevice);
- QCvolume = intern_c_string (":volume");
- staticpro (&QCvolume);
- Qsound = intern_c_string ("sound");
- staticpro (&Qsound);
- Qplay_sound_functions = intern_c_string ("play-sound-functions");
- staticpro (&Qplay_sound_functions);
+ DEFSYM (QCdevice, ":device");
+ DEFSYM (QCvolume, ":volume");
+ DEFSYM (Qsound, "sound");
+ DEFSYM (Qplay_sound_functions, "play-sound-functions");
defsubr (&Splay_sound_internal);
}