subject

Your main program will then call a subroutine that fills in the audio data with sinusoid waves whose frequencies are those selected by the user . This subroutine will receive (as an argument) the pointer-to-pointer to short int audio-data array. (Note: you calloc( )'d a 2-D array in step 3). The name of this array is a pointer-to-pointer-to-short int. It holds the memory address of the start of the 0th cell of the 1-D array of pointers to the rows of the 2-D array. Therefore, your subroutine can access the pointers to the start of each row, and therefore access the values in each row. See previous programming assignments for more information. 7) Open a file called tones2.wav in the directory from which your program is executed. Open it in mode "wb". 8) Write out the wav file header using a single fwrite( ). 9) Finally, write out the audio data. In a stereo wav file, the data from the left and right channels are interleaved; first one 2-byte sample for the left channel, then one 2-byte for the right channel, then one 2-byte for the left channel, etc.. Use a for-loop to write out these interleaved 2-byte samples from the 2-D array. 10) fclose( ) the wav file. 11) free the allocated memory

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
You picked the corridor which led you here. if the guards find you, they're going to be really angry! what is the synonym of angry
Answers: 1
question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 25.06.2019 00:30
Which of these serves as a bridge between the programming team and the audio team?
Answers: 2
question
Computers and Technology, 25.06.2019 07:00
Afile named data.txt contains an unknown number of lines, each consisting of a single integer. write some code that creates two files, dataplus.txt and dataminus.txt, and copies all the lines of data1.txt that have positive integers to dataplus.txt, and all the lines of data1.txt that have negative integers to dataminus.txt. zeros are not copied anywhere.
Answers: 2
You know the right answer?
Your main program will then call a subroutine that fills in the audio data with sinusoid waves whose...
Questions
question
Mathematics, 18.05.2021 22:10
question
Mathematics, 18.05.2021 22:10
question
Mathematics, 18.05.2021 22:10
question
Mathematics, 18.05.2021 22:10
Questions on the website: 13722361