Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose I want to play an audio file every three seconds (maybe some regular alarm) There are two ways to this On startup Play audio

image text in transcribed
Suppose I want to play an audio file every three seconds (maybe some regular alarm) There are two ways to this On startup Play audio file Set timer for 3 seconds OnTimer Play audio file Set timer for 3 seconds OnStartup starttime = timeGetTime() Play audio file next audiotime = 3 Set timer for next audiotime. (timegertime()-starttime) Ontimer play audio file nextaudiotime + = 3 set timer for nextaudiotime-(timegettime()=starttime) Assume the time to service a timer expiration averages 3 milliseconds and the time to start up an audio file averages 20 milliseconds. After one hour, how many times will method A and expected to play the audio file After one day, how many times will method A and method B be expected to play the audio file? It common that a multimedia presentation will have a characteristic called latency. Latency is a processing delay exhibited by the media As an example, playing audio from a file may require a variable amount of time, depending on how busy the system is. how quickly the file can be accessed, and how much decompress an is required For this reason, most multimedia allow you to load the media, then play it. So, you can tell it to open an audio file in advance, then tell it to play the audio fie The time to start playing is generally why small is this case because the systems has been able to prepare for t suppose pay requires less than a millisecond, open can secure up to 1 second Monty the algorithm tom Method B above to play different audio file every three seconds and ensure the audio is played on time (with 5 milliseconds will be acceptable). Suppose I want to play an audio file every three seconds (maybe some regular alarm) There are two ways to this On startup Play audio file Set timer for 3 seconds OnTimer Play audio file Set timer for 3 seconds OnStartup starttime = timeGetTime() Play audio file next audiotime = 3 Set timer for next audiotime. (timegertime()-starttime) Ontimer play audio file nextaudiotime + = 3 set timer for nextaudiotime-(timegettime()=starttime) Assume the time to service a timer expiration averages 3 milliseconds and the time to start up an audio file averages 20 milliseconds. After one hour, how many times will method A and expected to play the audio file After one day, how many times will method A and method B be expected to play the audio file? It common that a multimedia presentation will have a characteristic called latency. Latency is a processing delay exhibited by the media As an example, playing audio from a file may require a variable amount of time, depending on how busy the system is. how quickly the file can be accessed, and how much decompress an is required For this reason, most multimedia allow you to load the media, then play it. So, you can tell it to open an audio file in advance, then tell it to play the audio fie The time to start playing is generally why small is this case because the systems has been able to prepare for t suppose pay requires less than a millisecond, open can secure up to 1 second Monty the algorithm tom Method B above to play different audio file every three seconds and ensure the audio is played on time (with 5 milliseconds will be acceptable)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

Do you currently have a team agreement?

Answered: 1 week ago

Question

How will the members be held accountable?

Answered: 1 week ago