mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
test: audio_time - fix timestamp2ns() and usage()
BugLink: https://github.com/alsa-project/alsa-lib/issues/132 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
c6e0f24ef9
commit
c71bb0fb39
1 changed files with 2 additions and 3 deletions
|
|
@ -19,7 +19,6 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "../include/asoundlib.h"
|
#include "../include/asoundlib.h"
|
||||||
|
|
||||||
static char *command;
|
|
||||||
static char *pcm_name = "hw:0";
|
static char *pcm_name = "hw:0";
|
||||||
snd_output_t *output = NULL;
|
snd_output_t *output = NULL;
|
||||||
|
|
||||||
|
|
@ -42,7 +41,7 @@ long long timestamp2ns(snd_htimestamp_t t)
|
||||||
{
|
{
|
||||||
long long nsec;
|
long long nsec;
|
||||||
|
|
||||||
nsec = t.tv_sec * 1000000000;
|
nsec = t.tv_sec * 1000000000ULL;
|
||||||
nsec += t.tv_nsec;
|
nsec += t.tv_nsec;
|
||||||
|
|
||||||
return nsec;
|
return nsec;
|
||||||
|
|
@ -149,7 +148,7 @@ int main(int argc, char *argv[])
|
||||||
while ((c = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) {
|
while ((c = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'h':
|
case 'h':
|
||||||
usage(command);
|
usage(argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
case 'p':
|
case 'p':
|
||||||
do_playback = 1;
|
do_playback = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue