Skip to content

Commit

Permalink
always #include <cstdio> when using *printf
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiapoirier committed Feb 26, 2023
1 parent ff3023f commit 6e1923e
Show file tree
Hide file tree
Showing 23 changed files with 148 additions and 131 deletions.
17 changes: 9 additions & 8 deletions bufferoverride/gui/bufferoverrideeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ To contact the author, use the contact form at http:https://destroyfx.org
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>

#include "bufferoverride-base.h"
Expand Down Expand Up @@ -182,7 +183,7 @@ static bool divisorDisplayProc(float inValue, char* outText, void*)
{
int const precision = (inValue <= 99.99f) ? 2 : 1;
float const effectiveValue = (inValue < 2.0f) ? 1.0f : inValue;
return snprintf(outText, DGTextDisplay::kTextMaxLength, "%.*f", precision, effectiveValue) > 0;
return std::snprintf(outText, DGTextDisplay::kTextMaxLength, "%.*f", precision, effectiveValue) > 0;
}

static bool bufferSizeDisplayProc(float inValue, char* outText, void* inEditor)
Expand All @@ -198,7 +199,7 @@ static bool bufferSizeDisplayProc(float inValue, char* outText, void* inEditor)
}
else
{
return snprintf(outText, DGTextDisplay::kTextMaxLength, "%.1f", inValue) > 0;
return std::snprintf(outText, DGTextDisplay::kTextMaxLength, "%.1f", inValue) > 0;
}
}

Expand All @@ -211,13 +212,13 @@ static bool lfoRateGenDisplayProc(float inValue, char* outText, void* inEditor,
{
if (std::optional<std::string> const valueString = dgEditor->getparametervaluestring(rateSyncParameterID))
{
return snprintf(outText, DGTextDisplay::kTextMaxLength, "%s / beat", valueString->c_str()) > 0;
return std::snprintf(outText, DGTextDisplay::kTextMaxLength, "%s / beat", valueString->c_str()) > 0;
}
return false;
}

int const precision = (inValue <= 9.99f) ? 2 : 1;
return snprintf(outText, DGTextDisplay::kTextMaxLength, "%.*f Hz", precision, inValue) > 0;
return std::snprintf(outText, DGTextDisplay::kTextMaxLength, "%.*f Hz", precision, inValue) > 0;
}

static bool divisorLFORateDisplayProc(float inValue, char* outText, void* inEditor)
Expand All @@ -232,23 +233,23 @@ static bool bufferLFORateDisplayProc(float inValue, char* outText, void* inEdito

static bool lfoDepthDisplayProc(float inValue, char* outText, void*)
{
return snprintf(outText, DGTextDisplay::kTextMaxLength, "%.0f%%", inValue) > 0;
return std::snprintf(outText, DGTextDisplay::kTextMaxLength, "%.0f%%", inValue) > 0;
}

static bool dryWetMixDisplayProc(float inValue, char* outText, void*)
{
return snprintf(outText, DGTextDisplay::kTextMaxLength, "%.0f%%", inValue) > 0;
return std::snprintf(outText, DGTextDisplay::kTextMaxLength, "%.0f%%", inValue) > 0;
}

static bool pitchBendRangeDisplayProc(float inValue, char* outText, void*)
{
int const precision = (inValue <= 9.99f) ? 2 : 1;
return snprintf(outText, DGTextDisplay::kTextMaxLength, "%s %.*f", dfx::kPlusMinusUTF8, precision, inValue) > 0;
return std::snprintf(outText, DGTextDisplay::kTextMaxLength, "%s %.*f", dfx::kPlusMinusUTF8, precision, inValue) > 0;
}

static bool tempoDisplayProc(float inValue, char* outText, void*)
{
return snprintf(outText, DGTextDisplay::kTextMaxLength, "%.2f", inValue) > 0;
return std::snprintf(outText, DGTextDisplay::kTextMaxLength, "%.2f", inValue) > 0;
}


Expand Down
8 changes: 4 additions & 4 deletions dfx-library/dfxplugin-audiounit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,9 @@ OSStatus DfxPlugin::SetProperty(AudioUnitPropertyID inPropertyID,
else
{
#if 0
fprintf(stderr, "\tSetProperty(AUHostIdentifier)\n");
std::fprintf(stderr, "\tSetProperty(AUHostIdentifier)\n");
CFShow(hostID.hostName);
fprintf(stderr, "version: 0x%X\n", hostID.hostVersion);
std::fprintf(stderr, "version: 0x%X\n", hostID.hostVersion);
#endif
}
break;
Expand Down Expand Up @@ -1550,8 +1550,8 @@ OSStatus DfxPlugin::ChangeStreamFormat(AudioUnitScope inScope, AudioUnitElement
AudioStreamBasicDescription const& inPrevFormat,
AudioStreamBasicDescription const& inNewFormat)
{
//fprintf(stderr, "\nDfxPlugin::ChangeStreamFormat, new sr = %.3lf, old sr = %.3lf\n\n", inNewFormat.mSampleRate, inPrevFormat.mSampleRate);
//fprintf(stderr, "\nDfxPlugin::ChangeStreamFormat, new num channels = %lu, old num channels = %lu\n\n", inNewFormat.mChannelsPerFrame, inPrevFormat.mChannelsPerFrame);
//std::fprintf(stderr, "\nDfxPlugin::ChangeStreamFormat, new sr = %.3lf, old sr = %.3lf\n\n", inNewFormat.mSampleRate, inPrevFormat.mSampleRate);
//std::fprintf(stderr, "\nDfxPlugin::ChangeStreamFormat, new num channels = %lu, old num channels = %lu\n\n", inNewFormat.mChannelsPerFrame, inPrevFormat.mChannelsPerFrame);
// if this AU supports only specific I/O channel count configs,
// then check whether the incoming format is allowed
if (!mChannelConfigs.empty())
Expand Down
11 changes: 6 additions & 5 deletions dfx-library/dfxplugin-rtas.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*------------------------------------------------------------------------
Destroy FX Library is a collection of foundation code
for creating audio processing plug-ins.
Copyright (C) 2009-2022 Sophia Poirier
Copyright (C) 2009-2023 Sophia Poirier
This file is part of the Destroy FX Library (version 1.0).
Expand Down Expand Up @@ -29,6 +29,7 @@ This is where we connect the RTAS/AudioSuite API to our DfxPlugin system.

#include <algorithm>
#include <cmath>
#include <cstring>

#include "CEffectTypeAS.h"
#include "CEffectTypeRTAS.h"
Expand Down Expand Up @@ -94,7 +95,7 @@ ComponentResult bypassResult = GetMasterBypassControl(&bypassControlIndex);
CPluginControl_Discrete* bypassControl = dynamic_cast<CPluginControl_Discrete*>( GetControl(bypassControlIndex) );
char bypassName[32] {};
bypassControl->GetNameOfLength(bypassName, std::size(bypassName) - 1, 0);
fprintf(stderr, "%s IsAutomatable() = %s (error = %ld)\n", bypassName, bypassControl->IsAutomatable() ? "true" : "false", bypassResult);
std::fprintf(stderr, "%s IsAutomatable() = %s (error = %ld)\n", bypassName, bypassControl->IsAutomatable() ? "true" : "false", bypassResult);
*/
}

Expand Down Expand Up @@ -307,7 +308,7 @@ ComponentResult DfxPlugin::GetValueString(long inParameterIndex, long inValue, S
if (shortValueString != nullptr)
{
strlcpy((char*)(outValueString + 1), shortValueString, inMaxLength + 1);
outValueString[0] = ((signed)strlen(shortValueString) > inMaxLength) ? inMaxLength : strlen(shortValueString);
outValueString[0] = (static_cast<long>(std::strlen(shortValueString)) > inMaxLength) ? inMaxLength : std::strlen(shortValueString);
return noErr;
}
}
Expand Down Expand Up @@ -681,14 +682,14 @@ CPlugInView* DfxPlugin::CreateCPlugInView()

#else
OSType meterFourCharID = 0;
OSType meterIDs[EffectLayerDef::MAX_NUM_CONNECTIONS];
OSType meterIDs[EffectLayerDef::MAX_NUM_CONNECTIONS] {};
for (UInt32 i = 0; i < EffectLayerDef::MAX_NUM_CONNECTIONS; i++)
{
meterFourCharID = DFX_IterateAlphaNumericFourCharCode(meterFourCharID);
meterIDs[i] = meterFourCharID;
}

OSType clipIDs[EffectLayerDef::MAX_NUM_CONNECTIONS];
OSType clipIDs[EffectLayerDef::MAX_NUM_CONNECTIONS] {};
for (UInt32 i = 0; i < EffectLayerDef::MAX_NUM_CONNECTIONS; i++)
{
meterFourCharID = DFX_IterateAlphaNumericFourCharCode(meterFourCharID);
Expand Down
18 changes: 9 additions & 9 deletions dfx-library/dfxplugin-vst.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*------------------------------------------------------------------------
Destroy FX Library is a collection of foundation code
for creating audio processing plug-ins.
Copyright (C) 2002-2022 Sophia Poirier
Copyright (C) 2002-2023 Sophia Poirier
This file is part of the Destroy FX Library (version 1.0).
Expand Down Expand Up @@ -123,8 +123,8 @@ bool DfxPlugin::getInputProperties(VstInt32 index, VstPinProperties* properties)
{
if ((index >= 0) && (dfx::math::ToIndex(index) < getnuminputs()) && properties)
{
snprintf(properties->label, kVstMaxLabelLen, "%s input %d", PLUGIN_NAME_STRING, index + 1);
snprintf(properties->shortLabel, kVstMaxShortLabelLen, "in %d", index + 1);
std::snprintf(properties->label, kVstMaxLabelLen, "%s input %d", PLUGIN_NAME_STRING, index + 1);
std::snprintf(properties->shortLabel, kVstMaxShortLabelLen, "in %d", index + 1);
properties->flags = kVstPinIsActive;
if (getnuminputs() == 2)
{
Expand All @@ -140,8 +140,8 @@ bool DfxPlugin::getOutputProperties(VstInt32 index, VstPinProperties* properties
{
if ((index >= 0) && (dfx::math::ToIndex(index) < getnumoutputs()) && properties)
{
snprintf(properties->label, kVstMaxLabelLen, "%s output %d", PLUGIN_NAME_STRING, index + 1);
snprintf(properties->shortLabel, kVstMaxShortLabelLen, "out %d", index + 1);
std::snprintf(properties->label, kVstMaxLabelLen, "%s output %d", PLUGIN_NAME_STRING, index + 1);
std::snprintf(properties->shortLabel, kVstMaxShortLabelLen, "out %d", index + 1);
properties->flags = kVstPinIsActive;
if (getnumoutputs() == 2)
{
Expand Down Expand Up @@ -303,7 +303,7 @@ bool DfxPlugin::getProgramNameIndexed(VstInt32 /*inCategory*/, VstInt32 inIndex,
}
else
{
snprintf(outText, kVstMaxProgNameLen + 1, "default %" PRIi32, inIndex + 1);
std::snprintf(outText, kVstMaxProgNameLen + 1, "default %" PRIi32, inIndex + 1);
}
return true;
}
Expand Down Expand Up @@ -405,10 +405,10 @@ void DfxPlugin::getParameterDisplay(VstInt32 index, char* text)
switch (getparametervaluetype(parameterID))
{
case DfxParam::ValueType::Float:
snprintf(text, kVstMaxParamStrLen + 1, "%.3f", getparameter_f(parameterID));
std::snprintf(text, kVstMaxParamStrLen + 1, "%.3f", getparameter_f(parameterID));
break;
case DfxParam::ValueType::Int:
snprintf(text, kVstMaxParamStrLen + 1, "%" PRIi64, getparameter_i(parameterID));
std::snprintf(text, kVstMaxParamStrLen + 1, "%" PRIi64, getparameter_i(parameterID));
break;
case DfxParam::ValueType::Boolean:
vst_strncpy(text, getparameter_b(parameterID) ? "on" : "off", kVstMaxParamStrLen);
Expand Down Expand Up @@ -586,7 +586,7 @@ VstInt32 DfxPlugin::processEvents(VstEvents* events)
}

// cast the incoming event as a VstMidiEvent
auto const midiEvent = reinterpret_cast<VstMidiEvent*>(events->events[i]);
auto const midiEvent = reinterpret_cast<VstMidiEvent const*>(events->events[i]);
// address the midiData[4] string from the event to this temp data pointer
auto const midiData = midiEvent->midiData;

Expand Down
26 changes: 13 additions & 13 deletions dfx-library/dfxplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1786,15 +1786,15 @@ void DfxPlugin::processtimeinfo()
if (status == noErr)
{
#ifdef DFX_DEBUG_PRINT_MUSICAL_TIME_INFO
fprintf(stderr, "\ntempo = %.2f\nbeat = %.2f\n", tempo, beat);
std::fprintf(stderr, "\ntempo = %.2f\nbeat = %.2f\n", tempo, beat);
#endif
mTimeInfo.mTempoBPS = bpmToBPS(tempo);
mTimeInfo.mBeatPos = beat;

mHostCanDoTempo = true;
}
#ifdef DFX_DEBUG_PRINT_MUSICAL_TIME_INFO
else fprintf(stderr, "CallHostBeatAndTempo() error %ld\n", status);
else std::fprintf(stderr, "CallHostBeatAndTempo() error %ld\n", status);
#endif

// the number of samples until the next beat from the start sample of the current rendering buffer
Expand All @@ -1811,7 +1811,7 @@ else fprintf(stderr, "CallHostBeatAndTempo() error %ld\n", status);
// get the song beat position of the beginning of the current measure
mTimeInfo.mBarPos = currentMeasureDownBeat;
#ifdef DFX_DEBUG_PRINT_MUSICAL_TIME_INFO
fprintf(stderr, "time sig = %.0f/%lu\nmeasure beat = %.2f\n", timeSigNumerator, timeSigDenominator, currentMeasureDownBeat);
std::fprintf(stderr, "time sig = %.0f/%lu\nmeasure beat = %.2f\n", timeSigNumerator, timeSigDenominator, currentMeasureDownBeat);
#endif
// get the numerator of the time signature - this is the number of beats per measure
mTimeInfo.mTimeSignature =
Expand All @@ -1821,7 +1821,7 @@ fprintf(stderr, "time sig = %.0f/%lu\nmeasure beat = %.2f\n", timeSigNumerator,
};
}
#ifdef DFX_DEBUG_PRINT_MUSICAL_TIME_INFO
else fprintf(stderr, "CallHostMusicalTimeLocation() error %ld\n", status);
else std::fprintf(stderr, "CallHostMusicalTimeLocation() error %ld\n", status);
#endif

Boolean isPlaying {};
Expand All @@ -1834,13 +1834,13 @@ else fprintf(stderr, "CallHostMusicalTimeLocation() error %ld\n", status);
if (status == noErr)
{
#ifdef DFX_DEBUG_PRINT_MUSICAL_TIME_INFO
fprintf(stderr, "is playing = %s\ntransport changed = %s\n", isPlaying ? "true" : "false", transportStateChanged ? "true" : "false");
std::fprintf(stderr, "is playing = %s\ntransport changed = %s\n", isPlaying ? "true" : "false", transportStateChanged ? "true" : "false");
#endif
mTimeInfo.mPlaybackChanged = transportStateChanged;
mTimeInfo.mPlaybackIsOccurring = isPlaying;
}
#ifdef DFX_DEBUG_PRINT_MUSICAL_TIME_INFO
else fprintf(stderr, "CallHostTransportState() error %ld\n", status);
else std::fprintf(stderr, "CallHostTransportState() error %ld\n", status);
#endif
#endif
// TARGET_API_AUDIOUNIT
Expand Down Expand Up @@ -2060,7 +2060,7 @@ DfxPluginCore* DfxPlugin::getplugincore(size_t inChannel) const
void DfxPlugin::handlemidi_noteon(int inChannel, int inNote, int inVelocity, size_t inOffsetFrames)
{
#ifdef DFX_DEBUG_PRINT_MUSIC_EVENTS
fprintf(stderr, "note on: note = %d, velocity = %d, channel = %d, sample offset = %zu\n", inNote, inVelocity, inChannel, inOffsetFrames);
std::fprintf(stderr, "note on: note = %d, velocity = %d, channel = %d, sample offset = %zu\n", inNote, inVelocity, inChannel, inOffsetFrames);
#endif
mMidiState.handleNoteOn(inChannel, inNote, inVelocity, inOffsetFrames);
mDfxSettings->handleNoteOn(inChannel, inNote, inVelocity, inOffsetFrames);
Expand All @@ -2070,7 +2070,7 @@ fprintf(stderr, "note on: note = %d, velocity = %d, channel = %d, sample offset
void DfxPlugin::handlemidi_noteoff(int inChannel, int inNote, int inVelocity, size_t inOffsetFrames)
{
#ifdef DFX_DEBUG_PRINT_MUSIC_EVENTS
fprintf(stderr, "note off: note = %d, velocity = %d, channel = %d, sample offset = %zu\n", inNote, inVelocity, inChannel, inOffsetFrames);
std::fprintf(stderr, "note off: note = %d, velocity = %d, channel = %d, sample offset = %zu\n", inNote, inVelocity, inChannel, inOffsetFrames);
#endif
mMidiState.handleNoteOff(inChannel, inNote, inVelocity, inOffsetFrames);
mDfxSettings->handleNoteOff(inChannel, inNote, inVelocity, inOffsetFrames);
Expand All @@ -2080,7 +2080,7 @@ fprintf(stderr, "note off: note = %d, velocity = %d, channel = %d, sample offse
void DfxPlugin::handlemidi_allnotesoff(int inChannel, size_t inOffsetFrames)
{
#ifdef DFX_DEBUG_PRINT_MUSIC_EVENTS
fprintf(stderr, "all notes off: channel = %d, sample offset = %zu\n", inChannel, inOffsetFrames);
std::fprintf(stderr, "all notes off: channel = %d, sample offset = %zu\n", inChannel, inOffsetFrames);
#endif
mMidiState.handleAllNotesOff(inChannel, inOffsetFrames);
mDfxSettings->handleAllNotesOff(inChannel, inOffsetFrames);
Expand All @@ -2090,7 +2090,7 @@ fprintf(stderr, "all notes off: channel = %d, sample offset = %zu\n", inChannel
void DfxPlugin::handlemidi_channelaftertouch(int inChannel, int inValue, size_t inOffsetFrames)
{
#ifdef DFX_DEBUG_PRINT_MUSIC_EVENTS
fprintf(stderr, "channel aftertouch: value = %d, channel = %d, sample offset = %zu\n", inValue, inChannel, inOffsetFrames);
std::fprintf(stderr, "channel aftertouch: value = %d, channel = %d, sample offset = %zu\n", inValue, inChannel, inOffsetFrames);
#endif
mMidiState.handleChannelAftertouch(inChannel, inValue, inOffsetFrames);
mDfxSettings->handleChannelAftertouch(inChannel, inValue, inOffsetFrames);
Expand All @@ -2100,7 +2100,7 @@ fprintf(stderr, "channel aftertouch: value = %d, channel = %d, sample offset =
void DfxPlugin::handlemidi_pitchbend(int inChannel, int inValueLSB, int inValueMSB, size_t inOffsetFrames)
{
#ifdef DFX_DEBUG_PRINT_MUSIC_EVENTS
fprintf(stderr, "pitchbend: LSB = %d, MSB = %d, channel = %d, sample offset = %zu\n", inValueLSB, inValueMSB, inChannel, inOffsetFrames);
std::fprintf(stderr, "pitchbend: LSB = %d, MSB = %d, channel = %d, sample offset = %zu\n", inValueLSB, inValueMSB, inChannel, inOffsetFrames);
#endif
mMidiState.handlePitchBend(inChannel, inValueLSB, inValueMSB, inOffsetFrames);
mDfxSettings->handlePitchBend(inChannel, inValueLSB, inValueMSB, inOffsetFrames);
Expand All @@ -2110,7 +2110,7 @@ fprintf(stderr, "pitchbend: LSB = %d, MSB = %d, channel = %d, sample offset = %
void DfxPlugin::handlemidi_cc(int inChannel, int inControllerNum, int inValue, size_t inOffsetFrames)
{
#ifdef DFX_DEBUG_PRINT_MUSIC_EVENTS
fprintf(stderr, "MIDI CC: controller = 0x%02X, value = %d, channel = %d, sample offset = %zu\n", inControllerNum, inValue, inChannel, inOffsetFrames);
std::fprintf(stderr, "MIDI CC: controller = 0x%02X, value = %d, channel = %d, sample offset = %zu\n", inControllerNum, inValue, inChannel, inOffsetFrames);
#endif
mMidiState.handleCC(inChannel, inControllerNum, inValue, inOffsetFrames);
mDfxSettings->handleCC(inChannel, inControllerNum, inValue, inOffsetFrames);
Expand All @@ -2120,7 +2120,7 @@ fprintf(stderr, "MIDI CC: controller = 0x%02X, value = %d, channel = %d, sample
void DfxPlugin::handlemidi_programchange(int inChannel, int inProgramNum, size_t inOffsetFrames)
{
#ifdef DFX_DEBUG_PRINT_MUSIC_EVENTS
fprintf(stderr, "program change: program num = %d, channel = %d, sample offset = %zu\n", inProgramNum, inChannel, inOffsetFrames);
std::fprintf(stderr, "program change: program num = %d, channel = %d, sample offset = %zu\n", inProgramNum, inChannel, inOffsetFrames);
#endif
mMidiState.handleProgramChange(inChannel, inProgramNum, inOffsetFrames);
}
Expand Down
11 changes: 6 additions & 5 deletions dfx-library/dfxsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Welcome to our settings persistence mess.
#include <concepts>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <numeric>
Expand Down Expand Up @@ -465,7 +466,7 @@ try
#endif
validateRange(firstNewPresetByteAddress, sizeOfStoredPreset * numStoredPresets, "presets");

auto const getPresetNameWithFallback = [](std::string_view presetName) -> std::string_view
constexpr auto getPresetNameWithFallback = [](std::string_view presetName) -> std::string_view
{
return presetName.empty() ? "(unnamed)" : presetName;
};
Expand Down Expand Up @@ -1641,10 +1642,10 @@ void DfxSettings::debugAlertCorruptData(char const* inDataItemName, size_t inDat
}
#elif TARGET_OS_WIN32
std::array<char, 512> msg {};
snprintf(msg.data(), msg.size(),
"Something is wrong with the settings data! "
"Info for bug reports: name: %s size: %zu total: %zu",
inDataItemName, inDataItemSize, inDataTotalSize);
std::snprintf(msg.data(), msg.size(),
"Something is wrong with the settings data! "
"Info for bug reports: name: %s size: %zu total: %zu",
inDataItemName, inDataItemSize, inDataTotalSize);
MessageBoxA(nullptr, msg.data(), "DFX Error!", 0);
#else
#warning "implementation missing"
Expand Down
9 changes: 5 additions & 4 deletions dfxgui/dfxguieditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ To contact the author, use the contact form at http:https://destroyfx.org
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <exception>
#include <functional>
Expand Down Expand Up @@ -769,11 +770,11 @@ void DfxGuiEditor::TextEntryForParameterValue(dfx::ParameterID inParameterID)
std::array<char, dfx::kParameterValueStringMaxLength> textValue {};
if (GetParameterValueType(inParameterID) == DfxParam::ValueType::Float)
{
snprintf(textValue.data(), textValue.size(), "%.6lf", getparameter_f(inParameterID));
std::snprintf(textValue.data(), textValue.size(), "%.6lf", getparameter_f(inParameterID));
}
else
{
snprintf(textValue.data(), textValue.size(), "%ld", getparameter_i(inParameterID));
std::snprintf(textValue.data(), textValue.size(), "%ld", getparameter_i(inParameterID));
}
mTextEntryDialog->setText(textValue.data());

Expand Down Expand Up @@ -1891,7 +1892,7 @@ void DfxGuiEditor::TextEntryForParameterMidiCC(dfx::ParameterID inParameterID)
auto const currentParameterAssignment = getparametermidiassignment(inParameterID);
if (currentParameterAssignment.mEventType == dfx::MidiEventType::CC)
{
snprintf(initialText.data(), initialText.size(), "%d", currentParameterAssignment.mEventNum);
std::snprintf(initialText.data(), initialText.size(), "%d", currentParameterAssignment.mEventNum);
}
mTextEntryDialog->setText(initialText.data());

Expand Down Expand Up @@ -2776,7 +2777,7 @@ void DfxGuiEditor::ShowMessage(std::string const& inMessage)
}
if (!shown)
{
fprintf(stderr, "%s\n", inMessage.c_str());
std::fprintf(stderr, "%s\n", inMessage.c_str());
}
}

Expand Down

0 comments on commit 6e1923e

Please sign in to comment.