Block Sizes in Reaper

Hey all,

I’m debugging an issue that seems to be related to the incoming sizes of blocks from Reaper. I tried changing the requested block size in Preferences>Audio>Device>Request block size in order to troubleshoot this.

It seems however that no matter what value I set for the requested block size buffer.getNumSamples() called from inside processBlock() always returns exactly 480. Not changing, not a power of 2, just 480 every single time.

Anyone with reaper experience know what’s going on? Thanks!!

Some DAWs have fixed blocksizes. Cubase as well.

In a plugin, you have no control of the block size. The DAW will report the maximum block size in prepareToPlay(), but in processBlock() you may receive buffers of zero to maximum block size. And it can be different on every call. Again, this is controlled by the DAW—you have no control over this.

If your processing requires a certain number of samples, then you implement a FIFO which you fill in processBlock() and feed your DSP and then the buffer from there.

To be clear,

I’m not trying to use the plugin to change the host block size. I mean that even when I go to the settings IN REAPER and change the requested block size there, it’s delivering blocks of 480 samples to my plugin.

Are you using Windows and a non-ASIO driver perchance?

Yes…using windows and a Realtek driver to send audio to my headphones. Although the “Audio System” specified in Reaper is still listed as ASIO

My point was that inside of processBlock() you have no control of the block size. The block size there is entirely up to the DAW, Reaper or otherwise. So, any changes you make will have no effect there.

I have just done a quick test. On my Intel-chip macOS (default system devices), Reaper uses the block size I request (256 & 512). However, since the term is Request block size here, I guess there is a situation where the request fails?

1 Like

I think we’re on the same page. I’m not trying to change it from inside processBlock(). I’m trying to change it in Reaper’s settings, and then I’m just logging the size of the block to my debug output to see what it’s sending to the plugin.

@asimilon 's response seems to indicate he knows something about how the selection of driver could affect this on Windows. Eagerly awaiting his reply here :grimacing:

I’m afraid I probably won’t be much help, but I guessed this based on the weird block size. I suspect that it’s not a “real” ASIO driver based on this too. I recently came up against some nasty issues in Windows that all seemed to be down to not having a “professional” soundcard with a proper ASIO driver capable of dealing with 48kHz sample rate. I ended up just giving up on it and will just advise anyone who comes up against the same problem to either invest in a decent soundcard or use 44.1kHz!

edit: so yeah, I’m afraid it’s very likely the only way you’ll get Reaper to succeed in its “request” for a block size is by using a “proper” ASIO driver.

1 Like

Does ASIO4All work or is that not proper?

I don’t think it is, the problems I had were with a cheapo Behringer audio interface and ASIO4All.

1 Like