Media Computation in C
Hi Mark,
Attached are four ZIP files that include all the code and assignments I've developed to do something like Media Comp in C. Media_Comp_in_C__Libraries,_Assignments,_and_Solutions.zip
There are 10 lab assignments because Santa Clara is on a 10 week quarter system. Lab #7 hasn't been written yet, but is intended to be a multi-threaded version of Lab #5 using pthreads. I can send that to you later when it is completed.
Each lab assignment provides the student with an assignment, a main program, a data file, and a library. Students are asked to implement a couple of functions within the main program; the rest of the main program is provided for them. Their functions manipulate the image or audio recording.
libbmp is for 24-bit BMP images. libwav is for 16-bit mono WAV files.
Inside the lab assignments are the compiled .a library files for a 64-bit Mac, which is what we use in the lab. However, we normally provide the students with compiled versions of the libraries for 64-bit Linux and for Windows (using the Dev-C++ compiler) so that they can work on the assignments on their own computer before coming to lab if they wish.
The main programs given to the student are designed to use command line arguments, such as the input filename, the output filename, and an option number. If these are omitted, the main program simply prints a summary of what is expected on the command line. The input and output filenames are required; the option number is not. If the option number is omitted, the program displays a menu and the student selects the option at run time.
When the programs run, they not only produce the output file, but they also automatically open an image viewer or Audacity to give immediate feedback to the student. Of course there are assumptions about having those applications installed. The main program contains some conditional compilation directives to load the appropriate application according to whether it is running on a Mac, Linux, or Windows.
'Hope you find it useful. Feel free to make it available to anyone who wants it. I only ask that my name and affiliation information remain in the source code files.
'Best,
Dan Lewis
Attachments: Media_Comp_in_C__Libraries,_Assignments,_and_Solutions.zip