-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const int waveDataSize = record_time * 88000; #2
Comments
Hi, how can I do to record for ever? I mean, in code I can se that the WAV file header depends on the record time and I want to get it recording until I press a buton or something like that. |
Hey, I tested it and he made a typo. I think its supposed to be 44100 * 16 * 1 / 8 (44100 hz, 16 bit and 1 channel), 88200. If I record with 88000 my files get ever so slighty shorter. |
Hey, thats what I want to accomplish as well. Simply put, just write zeros at the header file size, write all audio to your file and after the final button press, get the file size with (fseek(file, 0, SEEK_END);) int size = ftell(file);, seek to the position of the size in header, I think that would be fseek(file, 4, SEEK_SET); and then write all 4 chars to the size you just measured as in the header file specified. |
Then you have to change the for loop to a while(button not pressed) |
Hi Brother, I read it and implement this in my code but I am getting some errors. So can you please add this feature to your code and then finally send me the code with this feature added in it. |
Hey, what does the '8' represents ? |
The number of bits in a byte. 44100 * 16 * 1 / 8 is the number of bytes/second produced (sample rate * bits per sample * number of channels / bits per byte) |
Hello,
What is meaning this constants at .ino file 88000 and 8000?
Is it somehow belongs to sample rate 44100 Hz @ 16bits?
The text was updated successfully, but these errors were encountered: