| Summary: | getOutputTimestamp() seems to use wrong time scale | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | chrisguttandin |
| Component: | Web Audio | Assignee: | Chris Dumez <cdumez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | cdumez, jer.noble, webkit-bug-importer, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
chrisguttandin
2023-11-06 02:33:21 PST
```
diff --git a/Source/WebCore/platform/audio/AudioDestinationResampler.cpp b/Source/WebCore/platform/audio/AudioDestinationResampler.cpp
index efd262000a29..257d72887a19 100644
--- a/Source/WebCore/platform/audio/AudioDestinationResampler.cpp
+++ b/Source/WebCore/platform/audio/AudioDestinationResampler.cpp
@@ -109,7 +109,7 @@ size_t AudioDestinationResampler::pullRendered(size_t numberOfFrames)
bool AudioDestinationResampler::render(double sampleTime, MonotonicTime hostTime, size_t framesToRender)
{
m_outputTimestamp = {
- Seconds { sampleTime / sampleRate() },
+ Seconds { sampleTime },
hostTime
};
// When there is a AudioWorklet, we do rendering on the AudioWorkletThread.
```
Need to write a test case.
Pull request: https://github.com/WebKit/WebKit/pull/24994 Committed 275237@main (33172dfe163a): <https://commits.webkit.org/275237@main> Reviewed commits have been landed. Closing PR #24994 and removing active labels. |