Change the shift method in Program 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
* frequenc y
* @param f req the desired frequenc y
*/
public void s hiftFreq ( int freq)
{
double factor = this.getLength ( ) * (freq / this . getSampl ingRate ( ) ) ;
this. changeFreq2 (factor) ;
}
```
Computer Science & Information Technology
You might also like to view...
Drop shadows can be added using the text-shadow styletext-shadow: color offsetX offsetY blur;where the offsetX is the distance of the shadow from the text in the ____ direction.
A. vertical B. diagonal C. inverted D. horizontal
Computer Science & Information Technology
Explain how you can override a unifying type imposed by Java. Show an example.
What will be an ideal response?
Computer Science & Information Technology