Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
int myOsc_PropertySet(int property, char* typedata, int channel) { int count; float fValue = 0; switch (property) { case 0: count = Osc_ExtractData( typedata, "f", &fValue); SetGain(fValue); } void SetGain(float gain){ G_iGain = gain; return; } int PresOsc_PropertyGet(int property,int channel) { float fValue = 0; switch (property) { case 0: fValue = GetGain( ); snprintf(G_cOSCout,OSC_SCRATCH_SIZE, "/%s/%s",PresOsc_Name, PresOsc_PropertyNames[property]); Osc_CreateMessage(channel,G_cOSCout,",f",fValue); break; } float GetGain(void){ return (float) G_iGain; }
This paste will be private.
From the Design Piracy series on my blog: