snd_control_list_t list;
int idx, err;
- err = snd_ctl_hw_open(&handle, cardno);
+ err = snd_ctl_hw_open(&handle, NULL, cardno);
if (err < 0) {
error("snd_ctl_open error: %s", snd_strerror(err));
return err;
snd_config_iterator_t i;
int err;
- err = snd_ctl_hw_open(&handle, card);
+ err = snd_ctl_hw_open(&handle, NULL, card);
if (err < 0) {
error("snd_ctl_open error: %s", snd_strerror(err));
return err;
static int open_mode = 0;
static int stream = SND_PCM_STREAM_PLAYBACK;
static int mmap_flag = 0;
-static char *mmap_data = NULL;
static int nonblock = 0;
static char *audiobuf = NULL;
static int buffer_size = -1;
error("unsupported format %s", snd_pcm_format_name(format->sfmt));
exit(EXIT_FAILURE);
}
+#if 0
if (format->channels > 1) {
if (xfer_mode == SND_PCM_XFER_INTERLEAVED) {
if (!(cpinfo.flags & SND_PCM_INFO_INTERLEAVED)) {
exit(EXIT_FAILURE);
}
}
+#endif
}
static void usage(char *command)
for (card = 0; card < SND_CARDS; card++) {
if (!(mask & (1 << card)))
continue;
- if ((err = snd_ctl_hw_open(&handle, card)) < 0) {
+ if ((err = snd_ctl_hw_open(&handle, NULL, card)) < 0) {
error("control open (%i): %s", card, snd_strerror(err));
continue;
}
exit(EXIT_FAILURE);
}
if (mmap_flag) {
- if (snd_pcm_mmap(handle, (void **)&mmap_data)<0) {
+ if (snd_pcm_mmap(handle)<0) {
error("unable to mmap memory");
exit(EXIT_FAILURE);
}