Questions tagged [volume]
The volume tag has no usage guidance.
8
questions
1
vote
0
answers
26
views
Lab 4 not altering output file - using solution word for word
I have looked at all the solutions here on the exchange. I have two issues. Firstly:
const int HEADER_SIZE = 44;
This does not work for me in the context of initializing a header array. I either have ...
1
vote
1
answer
424
views
lab4 volume - Not being able to understand the given solution
I am puzzled by the lab volume in week 4. The few questions I have in particular are:
How does the code below know to skip the first 44 bytes of header when it begins multiplying the bytes by factor?
...
0
votes
1
answer
126
views
lab 4 is not passing check50, but the volume is changing by the factor when we listen to the audio
// Modifies the volume of an audio file
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// Number of bytes in .wav header
const int HEADER_SIZE = 44;
int main(int argc, ...
0
votes
1
answer
10
views
unit16_t error while including library
Declaring Header is causing an error although <stdint.h> library is originally included in the distribution file, please help.
Thanks in Advance.
0
votes
1
answer
136
views
Why do you not need to allocate memory for int16_t in Lab4, volume?
Why, when setting up the buffer below, do you not need to use malloc to set aside memory for it? My code works fine, I just want to understand this a little better. Thanks, in advance, for the help.
...
0
votes
1
answer
92
views
Lab4 trouble multipliying int16_t types
I think i managed to copy the header successfully, but when trying to compile now that i wrote the rest of the code i get the following error:
volume.c:51:19: error: assigning to 'int16_t *' (aka '...
0
votes
1
answer
128
views
How can I know number of samples to add it as an argument for fread and fwrite?
I'm so confused about fread and fwrite. In lab 4 " Volume", how can I know the number of samples in the input wav file? i=I need to use fread(buffer , size , qty , file operator ). So how ...
2
votes
2
answers
401
views
Possible error in solution video of pset4 lab 'volume' within fread() function of header
I think there is an error in the solution video of pset4 lab called 'volume' within the fread() function of the header (of the wav file). I think they swapped 'header_size and '1' - so they swapped ...