mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Merged new-mixer branch...
This commit is contained in:
parent
e54aada1a6
commit
c0e741dd8a
12 changed files with 307 additions and 19 deletions
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