Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow audio loading. #38

Open
aomi opened this issue Nov 23, 2019 · 3 comments
Open

Slow audio loading. #38

aomi opened this issue Nov 23, 2019 · 3 comments
Labels

Comments

@aomi
Copy link
Member

aomi commented Nov 23, 2019

For a full sized lecture (ie 50 minutes or so), it takes a while for the audio to load and be ready for playback. A simple solution to this is to enable the HTML5 option in the Howler.js lib.

However enabling this kills the loading all together and currently there is a bug in Howler.js.
There appears to be a workaround if the server can respond to partial content requests.

goldfire/howler.js#1110

goldfire/howler.js#1180

@aomi aomi added the enhancement New feature or request label Nov 23, 2019
@aomi
Copy link
Member Author

aomi commented Mar 31, 2020

@guest271314
Copy link

An AudioWorkletNode can be substituted for createBufferSource() and createSourceBuffer(), see https://plnkr.co/edit/nECtUZ?preview where a 291MB WAV file is fetch()ed parsed to Float32Arrays and streamed to audio output, an alternative approach using a 70+MB WAV file spliced into N files and streamed https://github.com/guest271314/AudioWorkletStream. There is the potential for issues with glitches at *nix at Chromium https://bugs.chromium.org/p/chromium/issues/detail?id=825823.

Note, latencyHint can affect Callback Buffer Size and Render Capacity of AudioContext instance. WebAudio/web-audio-api-v2#70. Whether Cache disabled is checked or not can also affect audio output if AudioWorkletProcessor is being used, which may or may not be related to *nix/PulseAudio callback timing (priority) issue.

@guest271314
Copy link

Given the duration of the audio is known, if animation of words on screen is synchronized to audio output, that synchronization is not explicitly necessary. Animations can run separately from audio due to total duration known. Element.animate() can be used separately from audio timing and should nonetheless (be configured to) progress at the same rate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants