MCPcopy Create free account
hub / github.com/audacity/audacity / ProcessOne

Method ProcessOne

libraries/lib-nyquist-effects/NyquistBase.cpp:1139–1726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1137// NyquistBase implementation
1138
1139bool NyquistBase::ProcessOne(
1140 NyxContext& nyxContext, EffectOutputTracks* pOutputs)
1141{
1142 const auto mCurNumChannels = nyxContext.mCurNumChannels;
1143 nyx_rval rval;
1144
1145 wxString cmd;
1146 cmd += wxT("(snd-set-latency 0.1)");
1147
1148 // A tool may be using AUD-DO which will potentially invalidate *TRACK*
1149 // so tools do not get *TRACK*.
1150 if (GetType() == EffectTypeTool)
1151 cmd += wxT("(setf S 0.25)\n"); // No Track.
1152 else if (mVersion >= 4)
1153 {
1154 nyx_set_audio_name("*TRACK*");
1155 cmd += wxT("(setf S 0.25)\n");
1156 }
1157 else
1158 {
1159 nyx_set_audio_name("S");
1160 cmd += wxT("(setf *TRACK* '*unbound*)\n");
1161 }
1162
1163 if (mVersion >= 4)
1164 {
1165 cmd += mProps;
1166 cmd += mPerTrackProps;
1167 }
1168
1169 const auto& mCurChannelGroup = nyxContext.mCurChannelGroup;
1170
1171 if ((mVersion >= 4) && (GetType() != EffectTypeTool))
1172 {
1173 // Set the track TYPE and VIEW properties
1174 wxString type;
1175 wxString view;
1176 wxString bitFormat;
1177 wxString spectralEditp;
1178
1179 mCurChannelGroup->TypeSwitch(
1180 [&](const WaveTrack& wt) {
1181 type = wxT("wave");
1182 spectralEditp = SpectrogramSettings::Get(*mCurChannelGroup)
1183 .SpectralSelectionEnabled() ?
1184 wxT("T") :
1185 wxT("NIL");
1186 view = wxT("NIL");
1187 // Find() not Get() to avoid creation-on-demand of views in case we
1188 // are only previewing
1189 const auto displays = GetDisplaysHook::Call(&wt);
1190 const auto format = [&](decltype(displays[0]) display) {
1191 // Get the English name of the view type, without menu codes,
1192 // as a string that Lisp can examine
1193 return wxString::Format(
1194 wxT("\"%s\""), display.name.Stripped().Debug());
1195 };
1196 if (displays.empty())

Callers

nothing calls this directly

Calls 15

GetFunction · 0.85
CallClass · 0.85
GetClipBoundariesFunction · 0.85
maxFunction · 0.85
ShowMessageBoxFunction · 0.85
VerbatimFunction · 0.85
inputTracksFunction · 0.85
moveFunction · 0.85
GroupFunction · 0.85
StrippedMethod · 0.80
GetVolumeMethod · 0.80

Tested by

no test coverage detected