Extra credit.
Add additional features to the program such as:
- Start with the Load button disabled. Only enable the button once they type a filename that is a file that exists (but may not necessarily be valid).
- If a command-line argument is given, pre-populate the text field with that value and attempt to load the waveform.
- Allow users to use their mouse to highlight a portion of the waveform by holding down the button and dragging left or right.
If such a portion is highlighted, make Play only play that section.
If the user single clicks in the waveform area without dragging, reset to playing the whole waveform.
- Add a checkbox that causes the playback to be done in reverse.
- Add a slider widget that adjusts the gain on the audio, causing a multiplicative increase or decrease in sample values.
Update the waveform display live as the user drags around the slider.
- Create a label that displays the sample value and time offset of the user's current mouse x-position in the waveform.
Submission.
Submit your programs WavPlayer.java and WavPanel.java using Moodle.
Be sure each submitted source file has the required header with your name, username, and a description of the program.
For extra-credit, please submit a single zip file containing all your programs/graphics/sounds via the special Assignment #7 extra-credit drop box.
Page last updated: December 30, 2014
|