Reputation: 1
My question is that, given a buffer of int16_t buffer[128]; used to sample and play back an audio signal at 48kHz=Fs, how would I change the buffer size such that the buffers only store 0.25s of data.
Here's what I think, but I have no way of proving it given my hardware experience:
I'm not that knowledgeable about hardware, so any guidance/direction or help would be greatly appreciated. Thanks ahead of time!
Upvotes: 0
Views: 938
Reputation: 3478
floor(25*48000/100)
ans =
12000
So do you need int16_t buffer[12000]
to get 0.25s of audio.
if you are doing something in real time a buffer of this size can cause undesired latency.
Upvotes: 1