This callback is invoked if an OSC message has been received setting either value.
| 954 | |
| 955 | // This callback is invoked if an OSC message has been received setting either value. |
| 956 | void NeuralPiAudioProcessorEditor::valueChanged(Value& value) |
| 957 | { |
| 958 | if (value.refersToSameSourceAs(oscReceiver.getGainValue())) |
| 959 | { |
| 960 | if (!approximatelyEqual(static_cast<double> (value.getValue()), getGainSlider().getValue())) |
| 961 | { |
| 962 | getGainSlider().setValue(static_cast<double> (value.getValue()), |
| 963 | NotificationType::sendNotification); |
| 964 | } |
| 965 | } |
| 966 | else if (value.refersToSameSourceAs(oscReceiver.getMasterValue())) |
| 967 | { |
| 968 | if (!approximatelyEqual(static_cast<double> (value.getValue()), getMasterSlider().getValue())) |
| 969 | { |
| 970 | getMasterSlider().setValue(static_cast<double> (value.getValue()), |
| 971 | NotificationType::sendNotification); |
| 972 | } |
| 973 | } |
| 974 | if (value.refersToSameSourceAs(oscReceiver.getBassValue())) |
| 975 | { |
| 976 | if (!approximatelyEqual(static_cast<double> (value.getValue()), getBassSlider().getValue())) |
| 977 | { |
| 978 | getBassSlider().setValue(static_cast<double> (value.getValue()), |
| 979 | NotificationType::sendNotification); |
| 980 | } |
| 981 | } |
| 982 | else if (value.refersToSameSourceAs(oscReceiver.getMidValue())) |
| 983 | { |
| 984 | if (!approximatelyEqual(static_cast<double> (value.getValue()), getMidSlider().getValue())) |
| 985 | { |
| 986 | getMidSlider().setValue(static_cast<double> (value.getValue()), |
| 987 | NotificationType::sendNotification); |
| 988 | } |
| 989 | } |
| 990 | if (value.refersToSameSourceAs(oscReceiver.getTrebleValue())) |
| 991 | { |
| 992 | if (!approximatelyEqual(static_cast<double> (value.getValue()), getTrebleSlider().getValue())) |
| 993 | { |
| 994 | getTrebleSlider().setValue(static_cast<double> (value.getValue()), |
| 995 | NotificationType::sendNotification); |
| 996 | } |
| 997 | } |
| 998 | else if (value.refersToSameSourceAs(oscReceiver.getPresenceValue())) |
| 999 | { |
| 1000 | if (!approximatelyEqual(static_cast<double> (value.getValue()), getPresenceSlider().getValue())) |
| 1001 | { |
| 1002 | getPresenceSlider().setValue(static_cast<double> (value.getValue()), |
| 1003 | NotificationType::sendNotification); |
| 1004 | } |
| 1005 | } |
| 1006 | if (value.refersToSameSourceAs(oscReceiver.getDelayValue())) |
| 1007 | { |
| 1008 | if (!approximatelyEqual(static_cast<double> (value.getValue()), getDelaySlider().getValue())) |
| 1009 | { |
| 1010 | getDelaySlider().setValue(static_cast<double> (value.getValue()), |
| 1011 | NotificationType::sendNotification); |
| 1012 | } |
| 1013 | } |
nothing calls this directly
no outgoing calls
no test coverage detected