DEPARTMENT OF COMPUTING

CS 3005: Programming in C++

Audio Track Class

Introduction

A digital audio track is a sequence of values that describe the intensity of sound at different times. For example, this image show the first second of Eddie Van Halen’s classic guitar solo “Eruption”.

eruption-first-second.png

Audio engineers collect and combine audio tracks to make music files, such as those released by artists for your listening pleasure.

To create higher quality audio, the tracks need to record more samples per second. The more samples per second, the more data, and storage, is needed. So, trade offs are made between quality and storage.

Assignment

In this assignment, you will create a class called AudioTrack that describes an audio track. It will have the ability to store and retrieve audio track information. An audio track object will be configurable with the number of samples per second (quality) and the number of seconds (duration).

The total number of samples in an audio track is determined by the number of samples per second multiplied by the number of seconds. Anytime an audio track object’s samples per second or number of seconds is changed, the size of the audio track will change. Your class will control this by automatically resizing a vector to meet the requirements.

In this assignment, you will be creating the first portion of the library-audiofiles library. In future assignments, another class will be added to allow you to write audio files that can be played back. There is no program for this assignment.

Programming Requirements

Create library-audiofiles/AudioTrack.{h,cpp}

AudioTrack Class

Data Members:

The AudioTrack class should contain data members to track the following information. These data members should be protected or private. They are not allowed to be public.

public Methods:

protected Methods:

Create library-audiofiles/Makefile

This file must contain rules such that any of the following commands will build the libaudiofiles.a library:

This file must contain rules such that the following command will install the libaudiofiles.a library into the lib directory:

Update Makefile

Update the project-level Makefile so that make and make all in the project directory will call make install in the library-audiofiles directory.

Additional Documentation

Grading Instructions

To receive credit for this assignment:

Extra Challenges (Not Required)

Last Updated 08/28/2024