Skip to contentSkip to conversation

alsa-utils: fix timespec to msec conversion

PATCH Applied Olivier Langlois 2 participants 2 messages Jan 21, 2014 – Jan 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-utils: fix timespec to msec conversion

There is 1M nsec in a msec.

---
 aplay/aplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
aplay/aplay.c +1 -1
index 69e8bda..33a8ed5 100644
@@ -1509,7 +1509,7 @@ static void xrun(void)
 			timermsub(&now, &tstamp, &diff);
 			fprintf(stderr, _("%s!!! (at least %.3f ms long)\n"),
 				stream == SND_PCM_STREAM_PLAYBACK ? _("underrun") : _("overrun"),
-				diff.tv_sec * 1000 + diff.tv_nsec / 10000000.0);
+				diff.tv_sec * 1000 + diff.tv_nsec / 1000000.0);
 #else
 			fprintf(stderr, "%s !!!\n", _("underrun"));
 #endif
Signature · 1 line
1.8.5.3
Applied
#1 lore raw

At Tue, 21 Jan 2014 15:25:12 -0500,

Quoted 4 lines · Olivier Langlois

There is 1M nsec in a msec.

Applied, thanks.

Takashi

Quoted 25 lines
---
 aplay/aplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
aplay/aplay.c +1 -1
index 69e8bda..33a8ed5 100644
@@ -1509,7 +1509,7 @@ static void xrun(void)
 			timermsub(&now, &tstamp, &diff);
 			fprintf(stderr, _("%s!!! (at least %.3f ms long)\n"),
 				stream == SND_PCM_STREAM_PLAYBACK ? _("underrun") : _("overrun"),
-				diff.tv_sec * 1000 + diff.tv_nsec / 10000000.0);
+				diff.tv_sec * 1000 + diff.tv_nsec / 1000000.0);
 #else
 			fprintf(stderr, "%s !!!\n", _("underrun"));
 #endif
Signature · 6 lines
1.8.5.3

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel