In the fourth week of the CS50 (Harvard) course, we learned how to work with memory, which will help you perform a laboratory work on changing the volume of the sound in a .wav file using a program that receives the original music file and receives the value of the factor via the command line (how many times you need to change volume). So if the user enters a factor of 2, this means that the resulting file should become twice as loud (volume.c).
To complete this task, you need to take into account that the music file has a 44-byte header that contains metadata, and only after that there are 2-byte (16-bit) values that describe the sounds. To overwrite a new file with a changed volume, you need to read and change the values of each of the two bytes that describe the sound. To separate the header values, you can enter a new uint8_t header[44] data array, and write the rest of the values into an int16_t buffer (these are two special types of variables that can then be used as an argument in the fread and fwrite functions).


