mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
Merged new-mixer branch...
This commit is contained in:
parent
e54aada1a6
commit
c0e741dd8a
12 changed files with 307 additions and 19 deletions
|
|
@ -1,4 +1,4 @@
|
|||
check_PROGRAMS=control mixer switches pause pcm latency seq playmidi1
|
||||
check_PROGRAMS=control mixer switches pause pcm latency seq playmidi1 timer
|
||||
|
||||
control_LDADD=../src/libasound.la
|
||||
mixer_LDADD=../src/libasound.la
|
||||
|
|
@ -8,6 +8,7 @@ pcm_LDADD=../src/libasound.la
|
|||
latency_LDADD=../src/libasound.la
|
||||
seq_LDADD=../src/libasound.la
|
||||
playmidi1_LDADD=../src/libasound.la
|
||||
timer_LDADD=../src/libasound.la
|
||||
|
||||
INCLUDES=-I$(top_srcdir)/include
|
||||
CFLAGS=-static -Wall -pipe -g
|
||||
|
|
|
|||
21
test/timer.c
Normal file
21
test/timer.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "../include/asoundlib.h"
|
||||
|
||||
void main(void)
|
||||
{
|
||||
int err;
|
||||
void *handle;
|
||||
snd_timer_general_info_t info;
|
||||
|
||||
if ((err = snd_timer_open(&handle))<0) {
|
||||
fprintf(stderr, "timer open %i (%s)\n", err, snd_strerror(err));
|
||||
exit(0);
|
||||
}
|
||||
if (snd_timer_general_info(handle, &info)<0) {
|
||||
fprintf(stderr, "timer general info %i (%s)\n", err, snd_strerror(err));
|
||||
exit(0);
|
||||
}
|
||||
printf("global timers = %i\n", info.count);
|
||||
snd_timer_close(handle);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue