Skip to content

Commit

Permalink
fix firstArg behavior in BinaryOpUGen by a list-approved hack
Browse files Browse the repository at this point in the history
  • Loading branch information
James Harkins authored and timblechmann committed Dec 13, 2010
1 parent 9683d49 commit abd96a4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions common/build/SCClassLibrary/Common/Audio/BasicOpsUGen.sc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ BasicOpUGen : UGen {
// }
operator_ { arg op;
operator = op;
specialIndex = operator.specialIndex;
// 'firstArg' check is necessary for audio-rate Demand units
if(specialIndex < 0 and: { operator != 'firstArg' }) {
// 'firstArg' exists in the server
// but the 'specialIndex' primitive doesn't report the right value
// admittedly this is a hack, but the hack was approved on sc-dev
if(operator == 'firstArg') {
specialIndex = 46
} {
specialIndex = operator.specialIndex;
};
if(specialIndex < 0) {
Error("Operator '%' applied to a UGen is not supported in scsynth".format(operator)).throw
}
}
Expand Down

0 comments on commit abd96a4

Please sign in to comment.