Changed location of asoundlib.h from sys dir to alsa dir.

(it means that official location is '#include <alsa/asoundlib.h>')
This commit is contained in:
Jaroslav Kysela 2001-09-11 09:34:13 +00:00
parent 3c9d27c82d
commit 0a8749a802
7 changed files with 13 additions and 63 deletions

View file

@ -1,5 +1,5 @@
sysincludedir = ${includedir}/sys
sysinclude_HEADERS = asoundlib.h
alsaincludedir = ${includedir}/alsa
alsainclude_HEADERS = asoundlib.h
# This is the order they will be concatenated into asoundlib.h!
#
@ -39,3 +39,7 @@ stamp-vh: $(top_builddir)/configure.in
-@rm -f ver.tmp
INCLUDES=-I$(top_srcdir)/include
install-exec-hook:
rm -f $(alsaincludedir)/asoundef.h
(cd $(DESTDIR)$(alsaincludedir) && $(LN_S) ../sound/asoundef.h asoundef.h)

View file

@ -28,7 +28,9 @@
#ifndef __ASOUNDLIB_H
#define __ASOUNDLIB_H
#include <sound/asoundef.h>
#ifndef __ASOUNDEF_H
#include <alsa/asoundef.h>
#endif
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

View file

@ -74,6 +74,7 @@ typedef struct sndrv_seq_event snd_seq_event_t;
#define _snd_timer_status sndrv_timer_status
#include <sound/asound.h>
#include <sound/asoundef.h>
#include <sound/asequencer.h>
#include "asoundlib.h"
#include "list.h"

View file

@ -20,7 +20,7 @@
#include <curses.h>
#include <errno.h>
#include <sys/asoundlib.h>
#include <alsa/asoundlib.h>
#define BAR_WIDTH 70
/* milliseconds to go from 32767 to 0 */

View file

@ -1,7 +1,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/asoundlib.h>
#include "../include/asoundlib.h"
#include <string.h>
#include <signal.h>

View file

@ -1,57 +0,0 @@
#include <stdio.h>
#include <string.h>
#include "../include/asoundlib.h"
static void mixer_test(int card, int device)
{
int err;
snd_mixer_t *handle;
snd_mixer_info_t info;
if ((err = snd_mixer_open(&handle, card, device)) < 0) {
printf("Mixer open error: %s\n", snd_strerror(err));
return;
}
printf("Mixer %i/%i open ok...\n", card, device);
if ((err = snd_mixer_info(handle, &info)) < 0) {
printf("Mixer info error: %s\n", snd_strerror(err));
return;
}
printf(" Info:\n");
printf(" type - %i\n", info.type);
printf(" elements - %i\n", info.elements);
printf(" groups - %i\n", info.groups);
printf(" switches - %i\n", info.switches);
printf(" attrib - 0x%x\n", info.attrib);
printf(" id - '%s'\n", info.id);
printf(" name - '%s'\n", info.name);
snd_mixer_close(handle);
}
int main(void)
{
int idx, idx1, cards, err;
snd_ctl_t *handle;
snd_ctl_card_info_t info;
cards = snd_cards();
printf("Detected %i soundcard%s...\n", cards, cards > 1 ? "s" : "");
if (cards <= 0) {
printf("Giving up...\n");
return 0;
}
for (idx = 0; idx < cards; idx++) {
if ((err = snd_ctl_open(&handle, idx)) < 0) {
printf("Open error: %s\n", snd_strerror(err));
continue;
}
if ((err = snd_ctl_card_info(handle, &info)) < 0) {
printf("HW info error: %s\n", snd_strerror(err));
continue;
}
for (idx1 = 0; idx1 < info.mixerdevs; idx1++)
mixer_test(idx, idx1);
snd_ctl_close(handle);
}
return 0;
}

View file

@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/asoundlib.h>
#include "../include/asoundlib.h"
#include <signal.h>
static void usage(void)