Skip to content

Commit

Permalink
Consistent whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sgretscher committed Nov 24, 2021
1 parent 131dc10 commit 3e8cb57
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ExamplesCommon/Utilities/StdUniquePtrUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ inline intptr_t index_of (std::vector<std::unique_ptr<T>> const& container, cons
if (it == container.end ())
return -1;

return std::distance(container.begin (), it);
return std::distance (container.begin (), it);
}

} // namespace ARA
Expand Down
4 changes: 2 additions & 2 deletions IPCDemo/MainProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void audioAccessThreadHandler (bool& keepRunning)
ARA_LOG ("audio access thread stopped.");
}

ARA_SETUP_DEBUG_MESSAGE_PREFIX("IPC-Main");
ARA_SETUP_DEBUG_MESSAGE_PREFIX ("IPC-Main");

int main (int argc, const char * argv[])
{
Expand Down Expand Up @@ -234,7 +234,7 @@ int main (int argc, const char * argv[])
// and offer the user a way to cancel the operation if desired.

// not modelled via IPC yet, currently sent on the remote side where needed.
//documentControllerInterface->notifyModelUpdates(documentControllerRef);
//documentControllerInterface->notifyModelUpdates (documentControllerRef);

//done = documentControllerInterface->isAudioSourceContentAnalysisIncomplete (documentControllerRef, audioSourceRef, kARAContentTypeNotes);
reply = modelPortToPlugIn.sendAndAwaitReply ({ "isAudioSourceContentAnalysisIncomplete",
Expand Down
30 changes: 15 additions & 15 deletions TestHost/TestCases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ARADocumentController* createHostAndBasicDocument (const PlugInEntry* plugInEntr
auto regionSequence { testHost->addRegionSequence (documentName, "Track 1", musicalContext, { 0.0f, 1.0f, 0.0f }) };

double position { 0.0 };
for (size_t i { 0 }; i < audioFiles.size(); ++i)
for (size_t i { 0 }; i < audioFiles.size (); ++i)
{
// add an audio source based on the audio file
const std::string audioSourcePersistentID { "audioSourceTestPersistentID " + std::to_string (i) };
Expand All @@ -103,7 +103,7 @@ ARADocumentController* createHostAndBasicDocument (const PlugInEntry* plugInEntr

// add a playback region encompassing the entire audio source to render modifications in our musical context,
// enabling time stretching if requested & supported
const auto duration { audioSource->getDuration() };
const auto duration { audioSource->getDuration () };
testHost->addPlaybackRegion (documentName, audioModification, ARA::kARAPlaybackTransformationNoChanges, 0.0, duration, position, duration, regionSequence, "Test playback region", { 0.0f, 0.0f, 1.0f });
position += duration;
}
Expand Down Expand Up @@ -235,9 +235,9 @@ void testContentUpdates (const PlugInEntry* plugInEntry, const AudioFileList& au
}

ARA_LOG ("Updating musical context %p (ARAMusicalContextRef %p) with new tempo, bar signature, tuning, key signature, and chord data", musicalContext.get (), araDocumentController->getRef (musicalContext.get ()));
constexpr auto musicalContextUpdateScope { ARA::ContentUpdateScopes::timelineIsAffected() +
ARA::ContentUpdateScopes::harmoniesAreAffected() +
ARA::ContentUpdateScopes::tuningIsAffected() };
constexpr auto musicalContextUpdateScope { ARA::ContentUpdateScopes::timelineIsAffected () +
ARA::ContentUpdateScopes::harmoniesAreAffected () +
ARA::ContentUpdateScopes::tuningIsAffected () };
araDocumentController->beginEditing ();
musicalContext->setTempoEntries (tempoEntries);
musicalContext->setBarSignatures (barSignatures);
Expand All @@ -248,7 +248,7 @@ void testContentUpdates (const PlugInEntry* plugInEntry, const AudioFileList& au
araDocumentController->endEditing ();

ARA_LOG ("Updating audio source %p (ARAAudioSourceRef %p) with new notes, tempo, bar signature, tuning, key signature, and chord data", audioSource.get (), araDocumentController->getRef (audioSource.get ()));
constexpr auto audioSourceUpdateScope { musicalContextUpdateScope + ARA::ContentUpdateScopes::notesAreAffected() };
constexpr auto audioSourceUpdateScope { musicalContextUpdateScope + ARA::ContentUpdateScopes::notesAreAffected () };
araDocumentController->beginEditing ();
audioSource->setNotes (notes);
audioSource->setTempoEntries (tempoEntries);
Expand All @@ -269,7 +269,7 @@ void testContentReading (const PlugInEntry* plugInEntry, const AudioFileList& au

// create basic ARA model graph and perform analysis
std::unique_ptr<TestHost> testHost;
const auto araDocumentController { createHostAndBasicDocument(plugInEntry, testHost, "testContentReading", true, audioFiles) };
const auto araDocumentController { createHostAndBasicDocument (plugInEntry, testHost, "testContentReading", true, audioFiles) };

// read back all content types
for (const auto& audioSource : araDocumentController->getDocument ()->getAudioSources ())
Expand Down Expand Up @@ -426,10 +426,10 @@ void testArchiving (const PlugInEntry* plugInEntry, const AudioFileList& audioFi
for (size_t j { 0 }; j < audioModificationPersistentIDs[audioSource->getPersistentID ()].size (); j++)
{
const std::string audioModificationName { "Test audio modification " + std::to_string (i) + " " + std::to_string (j) };
auto audioModification { testHost->addAudioModification(documentName, audioSource, audioModificationName, audioModificationPersistentIDs[audioSource->getPersistentID()][j]) };
auto audioModification { testHost->addAudioModification (documentName, audioSource, audioModificationName, audioModificationPersistentIDs[audioSource->getPersistentID ()][j]) };

// add a playback region encompassing the entire audio source to render modifications in our musical context
const auto playbackDuration { audioSource->getDuration() };
const auto playbackDuration { audioSource->getDuration () };
testHost->addPlaybackRegion (documentName, audioModification, ARA::kARAPlaybackTransformationNoChanges, 0.0, audioSource->getDuration (), static_cast<double> (i) * playbackDuration, playbackDuration, regionSequence, "Test playback region", { 0.0f, 0.0f, 1.0f });
}
}
Expand Down Expand Up @@ -459,9 +459,9 @@ void testArchiving (const PlugInEntry* plugInEntry, const AudioFileList& audioFi
if (supportsARA2Persistency)
{
araDocumentController->beginEditing ();
auto sourceToRemove { araDocumentController->getDocument()->getAudioSources().front().get() };
auto modificationToRemove { sourceToRemove->getAudioModifications().front().get() };
auto regionToRemove { modificationToRemove->getPlaybackRegions().front().get() };
auto sourceToRemove { araDocumentController->getDocument ()->getAudioSources().front ().get () };
auto modificationToRemove { sourceToRemove->getAudioModifications ().front ().get () };
auto regionToRemove { modificationToRemove->getPlaybackRegions ().front ().get () };
testHost->removePlaybackRegion (araDocumentController->getDocument ()->getName (), regionToRemove);
testHost->removeAudioModification (araDocumentController->getDocument ()->getName (), modificationToRemove);
testHost->removeAudioSource (araDocumentController->getDocument ()->getName (), sourceToRemove);
Expand Down Expand Up @@ -633,7 +633,7 @@ void testPlaybackRendering (PlugInEntry* plugInEntry, bool enableTimeStretchingI

for (auto samplePosition { startOfPlaybackRegionSamples }; samplePosition < endOfPlaybackRegionSamples; samplePosition += renderBlockSize)
{
const auto samplesToRender { std::min(renderBlockSize, static_cast<int> (endOfPlaybackRegionSamples - samplePosition)) };
const auto samplesToRender { std::min (renderBlockSize, static_cast<int> (endOfPlaybackRegionSamples - samplePosition)) };
const auto outputPosition { samplePosition - startOfPlaybackRegionSamples };
plugInInstance->renderSamples (samplesToRender, samplePosition, &outputData[static_cast<size_t> (outputPosition)]);
}
Expand All @@ -652,8 +652,8 @@ void testPlaybackRendering (PlugInEntry* plugInEntry, bool enableTimeStretchingI
araDocumentController->beginEditing ();
for (auto& playbackRegion : playbackRegions)
{
playbackRegion->setTransformationFlags (ARA::kARAPlaybackTransformationTimestretch + playbackRegion->getTransformationFlags());
playbackRegion->setDurationInPlaybackTime (timeStretchFactor * playbackRegion->getDurationInPlaybackTime());
playbackRegion->setTransformationFlags (ARA::kARAPlaybackTransformationTimestretch + playbackRegion->getTransformationFlags ());
playbackRegion->setDurationInPlaybackTime (timeStretchFactor * playbackRegion->getDurationInPlaybackTime ());
araDocumentController->updatePlaybackRegionProperties (playbackRegion);
}
araDocumentController->endEditing ();
Expand Down
6 changes: 3 additions & 3 deletions TestHost/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ARA::ARAAssertFunction assertFunction { &ARA::ARAInterfaceAssert };
ARA::ARAAssertFunction* assertFunctionReference { &assertFunction };


ARA_SETUP_DEBUG_MESSAGE_PREFIX("ARATestHost");
ARA_SETUP_DEBUG_MESSAGE_PREFIX ("ARATestHost");


AudioFileList parseAudioFiles (const std::vector<std::string>& args)
Expand Down Expand Up @@ -115,7 +115,7 @@ int main (int argc, const char* argv[])
{
const std::vector<std::string> args (argv + 1, argv + argc);

ARA::ARASetExternalAssertReference(assertFunctionReference);
ARA::ARASetExternalAssertReference (assertFunctionReference);

// parse the plug-in binary from the command line arguments
auto plugInEntry { PlugInEntry::parsePlugInEntry (args, assertFunctionReference) };
Expand All @@ -141,7 +141,7 @@ int main (int argc, const char* argv[])
const auto testCases { parseTestCases (args) };

// conditionally execute each test case
const auto shouldTest { [&] (const std::string& testCase) { return testCases.empty () || ARA::contains(testCases, testCase); } };
const auto shouldTest { [&] (const std::string& testCase) { return testCases.empty () || ARA::contains (testCases, testCase); } };
if (shouldTest ("PropertyUpdates"))
testPropertyUpdates (plugInEntry.get (), audioFiles);
if (shouldTest ("ContentUpdates"))
Expand Down
4 changes: 2 additions & 2 deletions TestPlugIn/ARATestDocumentController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#endif


ARA_SETUP_DEBUG_MESSAGE_PREFIX(TEST_PLUGIN_NAME);
ARA_SETUP_DEBUG_MESSAGE_PREFIX (TEST_PLUGIN_NAME);


/*******************************************************************************/
Expand Down Expand Up @@ -233,7 +233,7 @@ class ARATestAnalysisTask : public TestAnalysisCallbacks

bool readAudioSamples (int64_t samplePosition, int64_t samplesPerChannel, void* const buffers[]) noexcept
{
return _hostAudioReader->readAudioSamples(samplePosition, samplesPerChannel, buffers);
return _hostAudioReader->readAudioSamples (samplePosition, samplesPerChannel, buffers);
}

bool shouldCancel () const noexcept
Expand Down
2 changes: 1 addition & 1 deletion TestPlugIn/AudioFileChunkWriter/ARATestChunkWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "TestPlugInConfig.h"


ARA_SETUP_DEBUG_MESSAGE_PREFIX("ARATestChunkWriter");
ARA_SETUP_DEBUG_MESSAGE_PREFIX ("ARATestChunkWriter");


class SynchronousTestAnalysis : public TestAnalysisCallbacks
Expand Down

0 comments on commit 3e8cb57

Please sign in to comment.