Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
180 views
in Technique[技术] by (71.8m points)

Real duration of audios played through browsers

I need to play 4 audios through a browser web. These audios last 150ms, 300ms, 450ms and 600ms.

I don't care about latency (if an audio is played 100 ms after it's not that important for my purpose). But I do care about the duration of these audios: is the 150ms audio last exactly 150ms or there is an error due to the audio board or other components?

I know for sure that there is an error (I see a test using a Mac). My question is: can anyone show me a paper, an article or anything that talks about the duration and test different setting or tell me if this error is always (Windows, Mac, old device, new device) very small (less than 10ms for example).

In other words: if I play an audio of 100ms how long does it really last (100ms? more? less?)?

question from:https://stackoverflow.com/questions/65923470/real-duration-of-audios-played-through-browsers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In what manner is the sound not lasting the correct amount of time?

Does the beginning or the end get cut off? Does the sound play back slower or faster than it should?

In my experience, I've never heard an error with playback rates caused by the browser or sound boards. But I have come across situations where a sound is played back with a different audio format than which is was encoded. For example, a sound encoded at 48000 fps played back at 44100 fps will take longer to execute, but will be very close to the original in pitch (maybe about a 1/2 step lower). I recommend as a diagnostic step to confirm the audio format used at each end. How to do so will depend on the systems being used.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...