Change the shift method to shiftFreq which takes a frequency instead of a factor, then plays the given sound at the desired frequency.

What will be an ideal response?


```
/**
* Method to change the frequency of a sound to the passed
* frequency
* @param freq the d e si r e d frequency
*/
public void s hif tFre q ( int f req )
{
double factor = this . getLength ( ) ยค ( freq / this . getSampl ingRate ( ) ) ;
this. changeFreq2 ( factor ) ;
}
```

Computer Science & Information Technology

You might also like to view...

Compare and contrast the Scrum approach to project management with conventional plan-based approaches as discussed in Chapter 23. Your comparison should be based on the effectiveness of each approach for planning the allocation of people to projects, estimating the cost of projects, maintaining team cohesion and managing changes in project team membership.

What will be an ideal response?

Computer Science & Information Technology

Convert the following hexadecimal numbers into decimal form

a. AB b. A0B c. 10A01 d. FFAAFF

Computer Science & Information Technology

The ________ displays buttons to insert different types of content into a Sway

A) Sway command bar B) All Cards pane C) Storyline D) Preview

Computer Science & Information Technology

The Telemarketing Sales Rule defines "telemarketing" as which of the following?

A. An automated telephone call to a consumer for the purposes of effectuating a sale B. A plan, program, or campaign to induce the purchase of goods or services or a charitable contribution involving more than one interstate telephone call C. The solicitation of goods or services through one or more telephones D. A plan or program to induce the purchase of goods (excluding charitable contributions) involving more than one interstate telephone call

Computer Science & Information Technology