AudioPlugin: uniqueID

i’ve noticed that in my laziness i ignored the uniqueID in my plugs :hihi: so i’ve registered them and plonked them in. However, i was just wondering if my method of doing them is a bit ‘round the houses’ and if there was a nice simple juce way of doing it. There’s nothing wrong with what i’ve done, but for the sake of my tutorials and stuff i just want to see if there’s a more intuitive way.

currently:


uint8 uid[4] = {'d','c','b','a'};
info.id = *((uint32*) uid);

i haven’t checked the string class yet to see if it has a way of getting such an arrangement of bytes from a string, but i expect that, because it’s usually unicode, it probably doesn’t.

You’d want to use littleEndianInt() to convert it though, because it’ll be different on a mac…

thanks :smiley: that’s exactly what i needed to know. so i do that instead of casting… smashing :smiley: that’ll be in the plugin guide ‘fo sho’