What is KVR Audio? | Submit News | Advertise | Developer Account

Options (Affects News & Product results only):

OS:
Format:
Include:
Quick Search KVR

"Quick Search" KVR Audio's Product Database, News Items, Developer Listings, Forum Topics and videos here. For advanced Product Database searching please use the full product search. For the forum you can use the phpBB forum search.

To utilize the power of Google you can use the integrated Google Site Search.

Products 0

Developers 0

News 0

Forum 0

Videos 0

Search  

processReplacing() and input buffers

DSP, Plug-in and Host development discussion.

Moderator: Moderators (Main)

KVRAF
 
2921 posts since 28 May, 2001, from New York, NY
 

Postby Big Tick; Sat Apr 19, 2014 2:56 am processReplacing() and input buffers

Everybody here knows about this method:

Code: Select all
processReplacing (float** inputs, float** outputs, VstInt32 sampleframes)


Now, does anybody knows if plugins are allowed to modify the contents of the inputs buffers ? I can't find anything about it in the sdk.
KVRAF
 
2921 posts since 28 May, 2001, from New York, NY
 

Postby Big Tick; Sat Apr 19, 2014 3:45 am Re: processReplacing() and input buffers

Unfortunately if the sdk doesn't specify anything, and since the API doesn't use const float for inputs, I'm afraid one can't assume the plugin won't trash the input.
KVRist
 
110 posts since 1 Jan, 2013

Postby Mayae; Sat Apr 19, 2014 5:18 am Re: processReplacing() and input buffers

Big Tick wrote:Unfortunately if the sdk doesn't specify anything, and since the API doesn't use const float for inputs, I'm afraid one can't assume the plugin won't trash the input.

Unspecified behaviour doesn't mean green lights. I must admit I'm not sure, but I've seen plenty of similar implementations that reserves the input buffers - this allows hosts to use the same buffer for parallel / additive processing, which is a significant optimization.

Why would you want to do it anyway?
KVRAF
 
2921 posts since 28 May, 2001, from New York, NY
 

Postby Big Tick; Sat Apr 19, 2014 9:10 am Re: processReplacing() and input buffers

I don't want to do it. I'm writing a host, and I have some weird behavior that could only be explained by the plugin trashing the input.... I want to know if the plugin is allowed to do it (in which case I need to change my implementation and copy the input buffers for each plugin), or if it is not.
KVRAF
 
4419 posts since 16 Feb, 2005

Postby camsr; Sat Apr 19, 2014 11:37 am Re: processReplacing() and input buffers

My plugin SoftClipper overwrites the input buffer.
It seems like an obvious speedup, not needing to use dynamic memory in the plugin itself and copying it.
Test it out to verify this behavior :) Use v2 for this.
If it is a problem for some hosts, I can change it, but no one has reported any problem like that so far.
Image
KVRAF
 
2921 posts since 28 May, 2001, from New York, NY
 

Postby Big Tick; Sat Apr 19, 2014 2:05 pm Re: processReplacing() and input buffers

I think most plugins don't, but because of a few that do, hosts need to duplicate the input buffers for each and every plugin :(
KVRAF
 
4419 posts since 16 Feb, 2005

Postby camsr; Sat Apr 19, 2014 3:59 pm Re: processReplacing() and input buffers

Then I take it, it didn't work?
Image
KVRAF
 
2921 posts since 28 May, 2001, from New York, NY
 

Postby Big Tick; Sat Apr 19, 2014 8:34 pm Re: processReplacing() and input buffers

My host is for instruments only, not effects...
User avatar
Urs
u-he
 
16951 posts since 7 Aug, 2002, from Berlin
 

Postby Urs; Mon Apr 21, 2014 12:57 am Re: processReplacing() and input buffers

Don't most hosts send same buffers for input and output anyway? I think we have a lot of stupid extra code to prevent our stuff from writing to outputs before reading inputs.
KVRAF
 
2921 posts since 28 May, 2001, from New York, NY
 

Postby Big Tick; Mon Apr 21, 2014 6:33 am Re: processReplacing() and input buffers

Actually Urs, I think I noticed a weird behavior with Zebra, when sending the same input for the left & right buffers. It would generate some kind of strange reverb-like ringing in the output.
User avatar
Urs
u-he
 
16951 posts since 7 Aug, 2002, from Berlin
 

Postby Urs; Mon Apr 21, 2014 6:50 am Re: processReplacing() and input buffers

Big Tick wrote:Actually Urs, I think I noticed a weird behavior with Zebra, when sending the same input for the left & right buffers. It would generate some kind of strange reverb-like ringing in the output.

Yes, possibly...

Moderator: Moderators (Main)

Return to DSP and Plug-in Development