Here is my text file, I want to read file and be able to print it. CS101 # A rea
ID: 3542301 • Letter: H
Question
Here is my text file, I want to read file and be able to print it.
CS101
# A really short sound to illustrate this file format
Samples 4
# We are doing something bizarre with the channels?
Channels 3
BitDepth 8
SampleRate 11025
# From here on things are more rigid
StartData
0 -127 127
10 45 -103
20 83 -4
30 0 99
Here is out put should look like
1. Blank (should be ignored)
2. Starting with "#" (should be ignored)
3. "keyword (whitespace) (value)" where (whitespace) refers to any number of tabs and spaces, and (value) refers to an integer. Legal keywords are: SampleRate, Samples, Channels, BitDepth.
The "<samples>" section consists of a line for each sample, where each sample is of the form "(value)1 (whitespace) (value)2 (whitespace) . . . (value)c" where c is the number of channels. The file itself has the following restrictions.
The sample rate (SampleRate), number of channels (Channels), and bit depth (BitDepth) must be specied. The number of samples (Samples) is optional.
The values specied for each sample are signed integers and are in the appropriate range for the bit
depth. For example, if the bit depth is n, then the legal range for all sample data is from -2^(n-1)to
2^(n-1) - 1.
If the number of samples is specied, then there must be exactly that much sample data in the file.
Explanation / Answer
I think this will help you if needed then let me know i can explain it other way also
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.