AU with componentFacturer on 3 chars instead of 4


#1

Hi Jules & all,

I wanted to try the demo of kiloHearts Faturator AudioUnit (http://kilohearts.com/products/faturator) in my homemade juce-based host but it didn’t show up in the list.

After further investigation I noticed it failed to FindNextComponent in AudioUnitFormatHelpers::getComponentDescFromIdentifier() because the bloody plugin has a manufacturer on 3 characters, with a leading space. The identifier “AudioUnit:Effects/aufx,kfat, kHs” is transformed to a “kHs” token in a juce::String which then gets transformed to (OSType)desc.componentManufacturer=‘kHs ’ by Juce. When ’ kHs’ (with leading space) is required. I verified that when replacing the expression ‘kHs ’ by ’ kHs’ in the debugger it then loads properly.

I don’t really know what would be the cleanest way to fix this though… Only calling trim() on tokens that have a length > 4 maybe? What do you think Jules?


#2

Gah… why would they choose a leading space rather than trailing??

I’ll sort that out right away, since I’m doing AU stuff at the moment. Thanks for the heads-up!


#3

Hey, kiloHearts dev here. :slight_smile:

I honestly don’t remeber why we picked a leading space instead of a trailing, but technically it shouldn’t really matter at all.
Sorry for any incovenience it caused.


#4

[quote=“kiloHearts”]Hey, kiloHearts dev here. :slight_smile:

I honestly don’t remeber why we picked a leading space instead of a trailing, but technically it shouldn’t really matter at all.
Sorry for any incovenience it caused.[/quote]

No need to apologise, it was my bug! (The whole idea of using 4-char constants as strings is pretty silly anyway, it’s a throwback to MacOS9)