Skip to content

Commit 34a5435

Browse files
authored
Merge pull request #173 from flucoma/pre-production
[release] 1.0.7
2 parents 386d174 + 34ffbf0 commit 34a5435

File tree

13 files changed

+243
-88
lines changed

13 files changed

+243
-88
lines changed

.clang-format

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: LLVM
4+
AccessModifierOffset: -2
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: true
8+
AlignEscapedNewlines: Right
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
AllowShortBlocksOnASingleLine: true
13+
AllowShortCaseLabelsOnASingleLine: true
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: false
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BraceWrapping:
24+
AfterClass: true
25+
AfterControlStatement: true
26+
AfterEnum: false
27+
AfterFunction: true
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: true
31+
AfterUnion: true
32+
AfterExternBlock: false
33+
BeforeCatch: false
34+
BeforeElse: true
35+
IndentBraces: false
36+
SplitEmptyFunction: false
37+
SplitEmptyRecord: false
38+
SplitEmptyNamespace: false
39+
BreakBeforeBinaryOperators: None
40+
BreakBeforeBraces: Custom
41+
BreakBeforeInheritanceComma: false
42+
BreakBeforeTernaryOperators: true
43+
BreakConstructorInitializersBeforeComma: false
44+
BreakConstructorInitializers: BeforeColon
45+
BreakAfterJavaFieldAnnotations: false
46+
BreakStringLiterals: true
47+
ColumnLimit: 80
48+
CommentPragmas: '^ IWYU pragma:'
49+
CompactNamespaces: false
50+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
51+
ConstructorInitializerIndentWidth: 4
52+
ContinuationIndentWidth: 4
53+
Cpp11BracedListStyle: true
54+
DerivePointerAlignment: false
55+
DisableFormat: false
56+
ExperimentalAutoDetectBinPacking: false
57+
FixNamespaceComments: true
58+
ForEachMacros:
59+
- foreach
60+
- Q_FOREACH
61+
- BOOST_FOREACH
62+
IncludeBlocks: Merge
63+
# Try and group includes by 'locality'
64+
# We use "" with rel paths for headers in same repo
65+
# Headers in quotes wiht no relative path at top
66+
# Group ../ and ../../ with different priorities, so they get sorted separately
67+
# <> headers *with a folder break* likely not to be STL -> STL / systems headers last
68+
IncludeCategories:
69+
- Regex: '<.+/'
70+
Priority: 4
71+
- Regex: '"../../'
72+
Priority: 3
73+
- Regex: '../' #
74+
Priority: 2
75+
- Regex: '".+hpp"'
76+
Priority: 1
77+
IncludeIsMainRegex: '(Test)?$'
78+
IndentCaseLabels: false
79+
IndentPPDirectives: None
80+
IndentWidth: 2
81+
IndentWrappedFunctionNames: false
82+
JavaScriptQuotes: Leave
83+
JavaScriptWrapImports: true
84+
KeepEmptyLinesAtTheStartOfBlocks: true
85+
MacroBlockBegin: ''
86+
MacroBlockEnd: ''
87+
MaxEmptyLinesToKeep: 2
88+
NamespaceIndentation: None
89+
ObjCBinPackProtocolList: Auto
90+
ObjCBlockIndentWidth: 2
91+
ObjCSpaceAfterProperty: false
92+
ObjCSpaceBeforeProtocolList: true
93+
PenaltyBreakAssignment: 2
94+
PenaltyBreakBeforeFirstCallParameter: 19
95+
PenaltyBreakComment: 300
96+
PenaltyBreakFirstLessLess: 120
97+
PenaltyBreakString: 1000
98+
PenaltyExcessCharacter: 1000000
99+
PenaltyReturnTypeOnItsOwnLine: 60
100+
PointerAlignment: Left
101+
ReflowComments: true
102+
SortIncludes: true
103+
SortUsingDeclarations: true
104+
SpaceAfterCStyleCast: true
105+
SpaceAfterTemplateKeyword: true
106+
SpaceBeforeAssignmentOperators: true
107+
SpaceBeforeCtorInitializerColon: true
108+
SpaceBeforeInheritanceColon: true
109+
SpaceBeforeParens: ControlStatements
110+
SpaceBeforeRangeBasedForLoopColon: true
111+
SpaceInEmptyParentheses: false
112+
SpacesBeforeTrailingComments: 1
113+
SpacesInAngles: false
114+
SpacesInContainerLiterals: true
115+
SpacesInCStyleCastParentheses: false
116+
SpacesInParentheses: false
117+
SpacesInSquareBrackets: false
118+
Standard: Cpp11
119+
TabWidth: 8
120+
UseTab: Never
121+
...

.gitattributes

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* text=auto
2+
3+
*.cmake text
4+
*.cpp text
5+
*.csv text
6+
*.gitignore text
7+
*.hpp text
8+
*.in text
9+
*.json text
10+
*.md text
11+
*.sc text
12+
*.scd text
13+
*.schelp text
14+
*.txt text
15+
*.yaml text
16+
*.yml text
17+
18+
*.png binary

.github/workflows/nightly.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,20 @@ jobs:
9393
with:
9494
name: linuxbuild
9595

96-
- uses: dev-drprasad/[email protected].0
96+
- uses: dev-drprasad/[email protected].1
9797
with:
9898
delete_release: true # default: false
9999
tag_name: nightly # tag name to delete
100100
env:
101101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102102

103-
- name: package and upload
104-
uses: softprops/action-gh-release@v1
103+
- name: create release
104+
uses: ncipollo/release-action@v1
105105
with:
106106
name: FluCoMa SuperCollider Nightly Release
107+
artifacts: "FluCoMa*"
107108
body: "This is a nightly build of the FluCoMa SuperCollider package. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}"
108-
files: FluCoMa*
109+
tag: nightly
109110
prerelease: true
110-
tag_name: nightly
111111
draft: false
112+
allowUpdates: true

CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2019 University of Huddersfield.
1+
# Copyright University of Huddersfield.
22
# Licensed under the BSD-3 License.
33
# See license.md file in the project root for full license information.
44
# This project has received funding from the European Research Council (ERC)
@@ -132,11 +132,6 @@ if(APPLE OR WIN32)
132132
set(CMAKE_SHARED_MODULE_SUFFIX ".scx")
133133
endif()
134134

135-
#needed for complaint-free static linking with GCC
136-
if(CMAKE_COMPILER_IS_GNUCXX)
137-
target_compile_options( HISSTools_FFT PUBLIC -fPIC )
138-
endif()
139-
140135
#sandbox regrettable dependency on SC internals for SendReply()
141136

142137
if(SYSTEM_BOOST)

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2017-2020 University of Huddersfield
3+
Copyright University of Huddersfield
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

include/FluidSCWrapper.hpp

Lines changed: 45 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
3-
Copyright 2017-2019 University of Huddersfield.
3+
Copyright University of Huddersfield.
44
Licensed under the BSD-3 License.
55
See license.md file in the project root for full license information.
66
This project has received funding from the European Research Council (ERC)
@@ -24,10 +24,10 @@ template <typename C>
2424
class FluidSCWrapper : public impl::FluidSCWrapperBase<C>
2525
{
2626
using FloatControlsIter = impl::FloatControlsIter;
27-
28-
//I would like to template these to something more scaleable, but baby steps
29-
friend class impl::RealTime<C,FluidSCWrapper>;
30-
friend class impl::NonRealTime<C,FluidSCWrapper>;
27+
28+
// I would like to template these to something more scaleable, but baby steps
29+
friend class impl::RealTime<C, FluidSCWrapper>;
30+
friend class impl::NonRealTime<C, FluidSCWrapper>;
3131

3232
static void doVersion(Unit*, sc_msg_iter*)
3333
{
@@ -38,12 +38,14 @@ class FluidSCWrapper : public impl::FluidSCWrapperBase<C>
3838
bool mInit{false};
3939

4040
public:
41-
4241
template <size_t N, typename T>
43-
using ArgumentSetter = typename ClientParams<FluidSCWrapper>::template Setter<sc_msg_iter, N, T>;
42+
using ArgumentSetter =
43+
typename ClientParams<FluidSCWrapper>::template Setter<sc_msg_iter, N, T>;
4444

4545
template <size_t N, typename T>
46-
using ControlSetter = typename ClientParams<FluidSCWrapper>::template Setter<FloatControlsIter, N, T>;
46+
using ControlSetter =
47+
typename ClientParams<FluidSCWrapper>::template Setter<FloatControlsIter,
48+
N, T>;
4749

4850
using Client = C;
4951
using ParamSetType = typename C::ParamSetType;
@@ -66,73 +68,67 @@ class FluidSCWrapper : public impl::FluidSCWrapperBase<C>
6668
getInterfaceTable(ft);
6769
impl::FluidSCWrapperBase<Client>::setup(ft, name);
6870
ft->fDefineUnitCmd(name, "version", doVersion);
69-
71+
7072
std::string commandName("/");
7173
commandName += getName();
7274
commandName += "/version";
73-
ft->fDefinePlugInCmd(commandName.c_str(),
74-
[](World*, void*, sc_msg_iter*, void*){ doVersion(nullptr,nullptr); },
75-
nullptr);
76-
75+
ft->fDefinePlugInCmd(
76+
commandName.c_str(),
77+
[](World*, void*, sc_msg_iter*, void*) { doVersion(nullptr, nullptr); },
78+
nullptr);
7779
}
7880

7981
static auto& setParams(Unit* x, ParamSetType& p, FloatControlsIter& inputs,
8082
Allocator& alloc, bool constrain = false,
8183
bool initialized = true)
8284
{
8385
bool verbose = x->mWorld->mVerbosity > 0;
84-
86+
8587
using Reportage = decltype(static_cast<FluidSCWrapper*>(x)->mReportage);
86-
87-
Reportage* reportage = initialized ? &(static_cast<FluidSCWrapper*>(x)->mReportage) : new Reportage();
88+
89+
Reportage* reportage = initialized
90+
? &(static_cast<FluidSCWrapper*>(x)->mReportage)
91+
: new Reportage();
8892

8993
p.template setParameterValuesRT<ControlSetter>(
9094
verbose ? reportage : nullptr, x, inputs, p, alloc);
9195
if (constrain) p.constrainParameterValuesRT(verbose ? reportage : nullptr);
92-
if(verbose)
96+
if (verbose)
9397
{
94-
for(auto& r:*reportage)
98+
for (auto& r : *reportage)
9599
{
96-
if(!r.ok()) printResult(x->mParent->mNode.mWorld, r);
100+
if (!r.ok()) printResult(x->mParent->mNode.mWorld, r);
97101
}
98102
}
99-
if(!initialized) delete reportage;
103+
if (!initialized) delete reportage;
100104
return p;
101105
}
102106

103-
// static void printResult(SharedState<C>& x, Result& r)
104-
// {
105-
// if (!x.get() || !x->mNodeAlive) return;
106-
// FluidSCWrapper::printResult(x->mNode->mWorld, r);
107-
// }
108-
109-
static void printResult(World* w,Result& r)
107+
static void printResult(World* w, Result& r)
110108
{
111-
109+
112110
switch (r.status())
113111
{
114-
case Result::Status::kWarning:
115-
{
116-
if (!w || w->mVerbosity > 0)
117-
std::cout << "WARNING: " << getName() << " - " << r.message().c_str() << '\n';
118-
break;
119-
}
120-
case Result::Status::kError:
121-
{
122-
std::cout << "ERROR: " << getName() << " - " << r.message().c_str() << '\n';
123-
break;
124-
}
125-
case Result::Status::kCancelled:
126-
{
127-
std::cout << getName() << ": Task cancelled\n" << '\n';
128-
break;
129-
}
130-
default:
131-
{
132-
}
133-
}
112+
case Result::Status::kWarning: {
113+
if (!w || w->mVerbosity > 0)
114+
std::cout << "WARNING: " << getName() << " - " << r.message().c_str()
115+
<< '\n';
116+
break;
117+
}
118+
case Result::Status::kError: {
119+
std::cout << "ERROR: " << getName() << " - " << r.message().c_str()
120+
<< '\n';
121+
break;
122+
}
123+
case Result::Status::kCancelled: {
124+
std::cout << getName() << ": Task cancelled\n" << '\n';
125+
break;
126+
}
127+
default: {
128+
}
129+
}
134130
}
135-
131+
136132
private:
137133
std::array<Result, Client::getParameterDescriptors().size()> mReportage;
138134
};

include/SCBufferAdaptor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
3-
Copyright 2017-2019 University of Huddersfield.
3+
Copyright University of Huddersfield.
44
Licensed under the BSD-3 License.
55
See license.md file in the project root for full license information.
66
This project has received funding from the European Research Council (ERC)

0 commit comments

Comments
 (0)