Lab 4: Volume
Labs are practice problems which, time permitting, may be started or completed in your section, and are assessed on completness only. You are encouraged to collaborate with classmates on this lab, though each member in a group collaborating is expected to contribute equally to the lab.
Write a program to modify the volume of an audio file.
$ ./volume INPUT.wav OUTPUT.wav 2.0
Where INPUT.wav
is the name of an original audio file and OUTPUT.wav
is the name of an audio file with a volume that has been scaled by the given factor (e.g., 2.0).
Getting Started
Open VS Code.
Start by clicking inside your terminal window, then execute cd
by itself. You should find that its “prompt” resembles the below.
$
Click inside of that terminal window and then execute
wget https://cdn.cs50.net/2022/fall/labs/4/volume.zip
followed by Enter in order to download a ZIP called volume.zip
in your codespace. Take care not to overlook the space between wget
and the following URL, or any other character for that matter!
Now execute
unzip volume.zip
to create a folder called volume
. You no longer need the ZIP file, so you can execute
rm volume.zip
and respond with “y” followed by Enter at the prompt to remove the ZIP file you downloaded. Finally, right-click on the volume
folder and click “Open in CS50 Lab”. You should see the specification for this problem on the left-hand side and its distribution code on the right-hand side.