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, 22.06.2019 19:00
Which parts of a presentation should be the most general? a. introduction and conclusion b. introduction and outline c. outline and conclusion d. outline and body
Answers: 1
question
Computers and Technology, 22.06.2019 21:50
Answer the following questions regarding your system by using the commands listed in this chapter. for each question, write the command you used to obtain the answer. a. what are the total number of inodes in the root filesystem? how many are currently utilized? how many are available for use? b. what filesystems are currently mounted on your system? c. what filesystems are available to be mounted on your system? d. what filesystems will be automatically mounted at boot time?
Answers: 1
question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
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, 23.01.2021 05:00
question
Mathematics, 23.01.2021 05:00
question
Mathematics, 23.01.2021 05:00
question
Social Studies, 23.01.2021 05:00
question
Mathematics, 23.01.2021 05:00
Questions on the website: 13722361