Skip to content

Commit cc451a1

Browse files
committed
Merge branch 'main' into pre-production
2 parents 722f817 + 16de960 commit cc451a1

File tree

9 files changed

+162
-29
lines changed

9 files changed

+162
-29
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
* text=auto
2+
3+
*.yml text
4+
*.gitignore text
5+
*.maxpat text
6+
*.hpp text
7+
*.cmake text
8+
*.md text
9+
*.txt text
10+
*.yaml text
11+
12+
*.png binary

.github/workflows/nightly.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,23 @@ jobs:
9090
with:
9191
name: winbuild
9292

93-
- uses: dev-drprasad/delete-tag-and-release@v0.2.0
93+
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
9494
with:
9595
delete_release: true # default: false
9696
tag_name: nightly # tag name to delete
9797
env:
9898
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9999

100-
- name: package and upload
101-
uses: softprops/action-gh-release@v1
100+
- name: create release
101+
uses: ncipollo/release-action@v1
102102
with:
103103
name: FluCoMa CLI Nightly Release
104+
artifacts: "FluCoMa*"
104105
body: "This is a nightly build of the FluCoMa CLI tools. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}"
105-
files: FluCoMa*
106+
tag: nightly
106107
prerelease: true
107-
tag_name: nightly
108108
draft: false
109+
allowUpdates: true
109110

110111

111112

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ winbuild
55
**/.DS_Store
66
release-packaging/
77
docs
8+
.vscode

CMakeLists.txt

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

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/FluidCLIWrapper.hpp

Lines changed: 18 additions & 18 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)
@@ -10,8 +10,8 @@ under the European Union’s Horizon 2020 research and innovation programme
1010

1111
#pragma once
1212

13-
#include <AudioFile/IAudioFile.h>
14-
#include <AudioFile/OAudioFile.h>
13+
#include <audio_file/in_file.hpp>
14+
#include <audio_file/out_file.hpp>
1515
#include <clients/common/FluidBaseClient.hpp>
1616
#include <clients/common/OfflineClient.hpp>
1717
#include <clients/common/ParameterSet.hpp>
@@ -41,15 +41,15 @@ class CLIBufferAdaptor : public BufferAdaptor
4141
{
4242
// TODO: only read if needed!...
4343

44-
HISSTools::IAudioFile file(mPath);
44+
htl::in_audio_file file(mPath);
4545

46-
mReadError = file.getErrorFlags();
46+
mReadError = file.error_flags();
4747

48-
if (file.isOpen())
48+
if (file.is_open())
4949
{
50-
resize(file.getFrames(), file.getChannels(), file.getSamplingRate());
50+
resize(file.frames(), file.channels(), file.sampling_rate());
5151
file.seek();
52-
file.readInterleaved(mData.data(),file.getFrames());
52+
file.read_interleaved(mData.data(),file.frames());
5353
}
5454
}
5555

@@ -82,25 +82,25 @@ class CLIBufferAdaptor : public BufferAdaptor
8282
{
8383
// TODO: file extensions/paths
8484

85-
constexpr auto fileType = HISSTools::BaseAudioFile::kAudioFileWAVE;
86-
constexpr auto depthType = HISSTools::BaseAudioFile::kAudioFileFloat32;
85+
constexpr auto fileType = htl::audio_file_format::file_type::wave;
86+
constexpr auto depthType = htl::audio_file_format::pcm_format::float32;
8787

8888
uint16_t chans = static_cast<uint16_t>(
8989
std::min(asSigned(std::numeric_limits<uint16_t>::max()), numChans()));
9090

91-
HISSTools::OAudioFile file(mPath, fileType, depthType, chans,
91+
htl::out_audio_file file(mPath, fileType, depthType, chans,
9292
mSamplingRate);
9393

94-
if (file.isOpen())
94+
if (file.is_open())
9595
{
9696
std::cout << "Writing " << mPath << '\n';
9797
file.seek();
98-
file.writeInterleaved(mData.data(), static_cast<uint32_t>(numFrames()));
98+
file.write_interleaved(mData.data(), static_cast<uint32_t>(numFrames()));
9999

100-
if(file.getIsError())
100+
if(file.is_error())
101101
{
102102
result = false;
103-
for(auto&& e:file.getErrors()) std::cerr << HISSTools::BaseAudioFile::getErrorString(e) << '\n';
103+
for(auto&& e:file.get_errors()) std::cerr << file.error_string(e) << '\n';
104104
}
105105
}
106106
else
@@ -385,10 +385,10 @@ class CLIWrapper
385385
if(ifile->readError())
386386
{
387387
std::cout << ifile->readError() << '\n';
388-
using Audio = HISSTools::BaseAudioFile;
388+
using AudioFile = htl::base_audio_file;
389389
result = false;
390-
std::vector<Audio::Error> errors = Audio::extractErrorsFromFlags(ifile->readError());
391-
for(auto&& e:errors) std::cerr << Audio::getErrorString(e) << '\n';
390+
std::vector<AudioFile::error_type> errors = AudioFile::extract_errors_from_flags(ifile->readError());
391+
for(auto&& e:errors) std::cerr << AudioFile::error_string(e) << '\n';
392392
}
393393
}
394394
}

scripts/MakeCLIStub.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
2-
# Copyright 2017-2019 University of Huddersfield.
2+
# Copyright University of Huddersfield.
33
# Licensed under the BSD-3 License.
44
# See license.md file in the project root for full license information.
55
# This project has received funding from the European Research Council (ERC)
@@ -34,7 +34,6 @@ function (add_cli_binary name source)
3434
PRIVATE
3535
FLUID_DECOMPOSITION
3636
FLUID_CLI_WRAPPER
37-
HISSTools_AudioFile
3837
)
3938

4039
target_include_directories(

scripts/target_post.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
2-
# Copyright 2017-2019 University of Huddersfield.
2+
# Copyright University of Huddersfield.
33
# Licensed under the BSD-3 License.
44
# See license.md file in the project root for full license information.
55
# This project has received funding from the European Research Council (ERC)
@@ -21,7 +21,6 @@ target_link_libraries(${PROG}
2121
PRIVATE
2222
FLUID_DECOMPOSITION
2323
FLUID_CLI_WRAPPER
24-
HISSTools_AudioFile
2524
)
2625

2726
target_include_directories(

0 commit comments

Comments
 (0)