I'm using DSound to record and manipulate audio data. I need to
calculate the right size of my input buffer since I think I'm using a
too large buffer.
Now I'm using the following:
LONG AvgBytePerSec = (sample_rate_ * ((audio_params_.nChannels *
bits_per_sample_) / 8));
buffer_frames_ = static_cast<UINT16>(buffer_time_size_ *
AvgBytePerSec);
buffer_frames_ += (buffer_frames_ % 2);
buffer_frames_ /= audio_params_.nChannels;
For a 2ch 8Khz 32bit (I use float) with a time_size of 0,04 I have a
buffer of 1280 byte.
Now, can I use a smaller one? There are some constraints?
Regards,
Daniele.