git: c4e303fbdca7 - stable/15 - virtual_oss: Use virtual_oss_delay_ns() to avoid duplication
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 14 Mar 2026 14:03:45 UTC
The branch stable/15 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=c4e303fbdca7cdf9a2a98e56fc906ec3f9d54337
commit c4e303fbdca7cdf9a2a98e56fc906ec3f9d54337
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-07 23:46:25 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-14 14:03:30 +0000
virtual_oss: Use virtual_oss_delay_ns() to avoid duplication
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
(cherry picked from commit 3a410851bf02c247e71bcd06fdeec2706c6b6070)
---
usr.sbin/virtual_oss/virtual_oss/virtual_oss.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.c b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.c
index 891653494f06..fc7892df892c 100644
--- a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.c
+++ b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.c
@@ -62,10 +62,7 @@ virtual_oss_wait(void)
nsec = ts.tv_sec * 1000000000ULL + ts.tv_nsec;
- /* TODO use virtual_oss_delay_ns() */
- delay = voss_dsp_samples;
- delay *= 1000000000ULL;
- delay /= voss_dsp_sample_rate;
+ delay = virtual_oss_delay_ns();
usleep((delay - (nsec % delay)) / 1000);
}