Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.1 feature branches combined #271

Closed
wants to merge 191 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
bbd1581
Simpler lookup for legacy DS index to PF ID
firthm01 Oct 23, 2023
684fa91
Common Def helper pulls pos, labels and LFE
firthm01 Oct 24, 2023
1632fcf
Simplify use of AdmCommonDefinitionHelper in HOA plugin
firthm01 Oct 27, 2023
09f7a72
More helpful ID fields in CD helper
firthm01 Oct 28, 2023
b37a941
Remove hardcoded layouts: remove lists and helpers
firthm01 Nov 3, 2023
cfc1b94
Remove hardcoded layouts: DS->Scene metadata changes
firthm01 Nov 3, 2023
2a5c90f
Remove hardcoded layouts: EARPluginSuite uses pack format ids
firthm01 Nov 3, 2023
7e063ca
Remove hardcoded layouts: ProgrammeStoreAdmSerializer doesn't use lay…
firthm01 Nov 3, 2023
c9d88e6
Remove hardcoded layouts: Make DS UI use pack format ID
firthm01 Nov 3, 2023
658e851
Remove hardcoded layouts: Mon UI uses pack format ID
firthm01 Nov 3, 2023
4c91682
Remove hardcoded layouts: Fix up Scene UI
firthm01 Nov 3, 2023
3418237
Remove hardcoded layouts: Fix tests
firthm01 Nov 3, 2023
73c678c
Remove hardcoded layouts: Check getPackFormatData has val before use
firthm01 Nov 4, 2023
f6c86dd
niceName for channel formats - use speakerLabels for DS
firthm01 Nov 4, 2023
f874f90
Other code to use new niceName prop
firthm01 Nov 4, 2023
460e2a9
ChannelFormatData is a class
firthm01 Nov 5, 2023
b79270e
PackFormatData is a class
firthm01 Nov 6, 2023
f5827f1
Speaker labels map
firthm01 Nov 6, 2023
30b68a1
Remove CF "niceName" and use specific label props
firthm01 Nov 6, 2023
510d6f8
Constness in speaker label lookup table
firthm01 Nov 6, 2023
ddfd725
channelFormatNiceNames map can be a static const
firthm01 Nov 6, 2023
5dac717
Fix silly compare length arg
firthm01 Nov 6, 2023
01eab6a
Improve PackFormatData label generation
firthm01 Nov 6, 2023
dde235e
rn AdmCommonDefinitionHelper to AdmPresetDefinitionsHelper
firthm01 Nov 7, 2023
ed8e232
DS labels: Tidy existing positioning code
firthm01 Nov 7, 2023
5d45ab3
DS labels: nice label radius calc
firthm01 Nov 7, 2023
10aac21
DS labels: Basic alg for inner/outer spk label placement
firthm01 Nov 7, 2023
cc9d080
DS labels: Nudge labels to make clear which spk
firthm01 Nov 7, 2023
7da7d3a
DS labels: Prefer nudging inners over outers
firthm01 Nov 7, 2023
a3ca0a2
DS labels: Make more space for speaker layers
firthm01 Nov 8, 2023
a9d5b45
DS labels: Split speaker_layer into header and source
firthm01 Nov 8, 2023
cb2fa65
DS labels: move alg code into SpeakerLabelPlacement class
firthm01 Nov 8, 2023
a3e3452
DS labels: consolidate copied bits of code
firthm01 Nov 8, 2023
fd0eb59
DS label: consistency in struct and called func args
firthm01 Nov 9, 2023
eff6256
DS label: consistency in struct and called func args - update header
firthm01 Nov 9, 2023
86ff68d
Pull in supplementary defs to helper
firthm01 Nov 9, 2023
dd38905
Sort DS speaker layouts by channel count
firthm01 Nov 9, 2023
a30b590
isCommonDefinition funcs
firthm01 Nov 9, 2023
a1b0875
Use AdmPresetDefinitionsHelper singleton in ProgrammeStoreAdmSerializer
firthm01 Nov 9, 2023
1d5ba65
Add missing definitions from supplements
firthm01 Nov 10, 2023
006bcc0
AdmPresetDefinitionsHelper needs to be able to look up PFs by CFs
firthm01 Nov 10, 2023
e4ec4a5
Look up custom PFs during import by CFs
firthm01 Nov 10, 2023
00845bf
Improve speaker labeling. Support custom CFs.
firthm01 Nov 11, 2023
d42e77e
mv cartesianspeakerlayouts.h/.cpp
firthm01 Nov 11, 2023
8cb0f7f
PF Data lookup methods collected in AdmPresetDefinitionsHelper
firthm01 Nov 11, 2023
ade9e81
Fix lvalue arg issue - MacOS builds
firthm01 Nov 12, 2023
c916818
Consolidate all the "isCommonDefinition" checks
firthm01 Nov 15, 2023
a2241ca
Only ever match supposed Common Def PFs by ID
firthm01 Nov 15, 2023
aacc246
FB360 import supports supplementary definitions for DS types
firthm01 Nov 16, 2023
3955f66
VISR import supports supplementary definitions for DS types
firthm01 Nov 16, 2023
2cc4d7c
Update AdmPresetDefinitionsHelper prop name in ADM Export Source VST
firthm01 Nov 17, 2023
546e1ea
Simplify createTopLevelObject ATUID lookup
firthm01 Nov 17, 2023
865d694
copyMissingTreeElms method to copy supplementary defs
firthm01 Nov 17, 2023
80956ef
ProgrammeStoreAdmSerializer supports supplementary definitions for DS
firthm01 Nov 17, 2023
c8f51c3
Simplify addPresetDefinitionObjectTo even more
firthm01 Nov 17, 2023
5983547
createTopLevelObject can shared logic between HOA and DS
firthm01 Nov 17, 2023
24c53f3
Support preset defs in EAR export code
firthm01 Nov 17, 2023
0e22dcc
Move addPresetDefinitionObjectTo to the helper class
firthm01 Nov 17, 2023
cff77fd
Improve comments in EarVstExportSources
firthm01 Nov 18, 2023
ce3aa74
Break up addPresetDefinitionObjectTo into reusable code
firthm01 Nov 18, 2023
ca890b4
ObjectHolder audioPackFormat prop populated
firthm01 Nov 18, 2023
879e8de
Support preset defs in ADM VST export code
firthm01 Nov 18, 2023
3ab5845
Objects in ADM VST use 2076-2 structures too
firthm01 Nov 18, 2023
d7b3a2e
Update libadm - reassignId fixes
firthm01 Dec 8, 2023
e6ce23a
Lookup CFs by props
firthm01 Dec 11, 2023
b39e230
Fix build
firthm01 Dec 12, 2023
60709fd
Fix crash when DS layout is unset
firthm01 Dec 20, 2023
ca4d096
Remove unused line in ADM Exp Src plugin
firthm01 Dec 20, 2023
1b9289c
Custom CFs must always be matched by properties
firthm01 Dec 20, 2023
86c0ea8
Call reassignIds after generating doc in ProgrammeStoreAdmSerializer
firthm01 Dec 21, 2023
71a9bdf
List custom defs after common and in lighter font
firthm01 Jan 3, 2024
3c6339e
Same light/bold font logic for HOA PFs
firthm01 Jan 3, 2024
332c69b
Neater, safer, faster ID generation
firthm01 Feb 6, 2024
4afae05
Apply ID gen optimisation in store serialiser and fix bug
firthm01 Feb 6, 2024
a90b9b3
stable_sort on speaker locations
firthm01 Feb 7, 2024
7f0994f
Avoid passing raw ptrs around in SpeakerLabelPlacement
firthm01 Feb 7, 2024
986e85a
Improve matchingSpeakers with std::equal
firthm01 Feb 8, 2024
0857191
Remove unreq includes and don't inline convertPackFormatToEpsMetadata
firthm01 Feb 8, 2024
419f3c6
Avoid copies of shared_ptrs where unnecessary
firthm01 Feb 8, 2024
8c3192a
Ensure consistency of dropdown entry ordering
firthm01 Feb 8, 2024
683b52e
Constness of methods in AdmPresetDefinitionsHelper
firthm01 Feb 8, 2024
96f7180
default ctor/dtor for AdmPresetDefinitionsHelper
firthm01 Feb 8, 2024
b9d3e46
typeDefinitionDatas stored as vec rather than map
firthm01 Feb 10, 2024
68da048
Use const for TypeDefinitionData
firthm01 Feb 12, 2024
73f2f8c
Constness of PackFormatData and ChannelFormatData
firthm01 Feb 12, 2024
4cb9571
Constness of relatedChannelFormats/relatedPackFormats
firthm01 Feb 12, 2024
6f7b99a
Improve CF equality code
firthm01 Feb 12, 2024
06ca720
Remove unnecessary line of code
firthm01 Feb 12, 2024
af3ee24
Simplify use of optionals
firthm01 Feb 12, 2024
bba1424
Avoid unnecessary copy
firthm01 Feb 12, 2024
621de00
Move simple assignments to initialiser lists
firthm01 Feb 13, 2024
0481092
Guard against shorter than expected speaker urns
firthm01 Feb 13, 2024
2121086
Consolidate ITU URN parsing code
firthm01 Feb 13, 2024
e169ea5
Tidy setupPresetDefinitionObject before further work
firthm01 Feb 13, 2024
f952424
getDocumentAudioPackFormat func to break up setupPresetDefinitionObject
firthm01 Feb 13, 2024
099d23c
getElementRelationships shouldn't need to be called separately to pop…
firthm01 Feb 13, 2024
5f23407
Simplify matching of channel formats in a pack format
firthm01 Feb 13, 2024
28d09eb
Shouldn't std::move a const
firthm01 Feb 13, 2024
a07f8fd
Enforce use of AdmPresetDefinitionsHelper as singleton using reference
firthm01 Feb 14, 2024
c0411a8
Correct output bus width after 128 ch update
firthm01 Jan 5, 2024
9700948
Correct isBusesLayoutSupported after 128ch update
firthm01 Jan 8, 2024
dc47eb5
Fix missing default return in updateChannelCounts
firthm01 Jan 5, 2024
0fd9315
canClearSelection in EarComboBox
firthm01 Jan 9, 2024
ac4f71f
EarComboBoxEntry ID's can be variant type
firthm01 Jan 9, 2024
d88be25
getBearDataFileDirectory function
firthm01 Jan 4, 2024
b481f3d
bearDataFileDir prop
firthm01 Jan 5, 2024
09a7575
getCustomBearDataFiles func
firthm01 Jan 5, 2024
486452e
BearStatus to track startup of bear and log error
firthm01 Jan 5, 2024
71fd574
statusLabel in UI footer
firthm01 Jan 5, 2024
35a7971
Initial text colours for different states
firthm01 Jan 5, 2024
6fdf950
rn rendererError to rendererStarted
firthm01 Jan 6, 2024
7ea0cb1
Pass BearStatus to frontend connector
firthm01 Jan 8, 2024
822efbb
Frontend Connector gets access to status UI label
firthm01 Jan 8, 2024
19eb9a0
Construct label shared_ptr
firthm01 Jan 8, 2024
2f1465a
Correct Status colour names
firthm01 Jan 9, 2024
855f7ef
Proper UI status text
firthm01 Jan 9, 2024
16adfdf
Remove unnecessary assert
firthm01 Jan 9, 2024
095fb0b
Display data file in status on error
firthm01 Jan 9, 2024
df67f56
Initial combobox UI element for showing filter sets
firthm01 Jan 9, 2024
862ed1e
Pass data file component and combobox handles to FE connector
firthm01 Jan 10, 2024
4ce307f
Plumbing up frontend connector for data file combo box
firthm01 Jan 12, 2024
928039c
DataFileManager class
firthm01 Jan 12, 2024
f270ea9
DataFileManager used by FE conn via proc
firthm01 Jan 12, 2024
b1f7ee9
Pull data file metadata via bear
firthm01 Jan 14, 2024
6766332
onSelectedDataFileChange callback
firthm01 Jan 15, 2024
35123af
setSelectedDataFileDefault func
firthm01 Jan 15, 2024
6b58cf0
onSelectedDataFileChange callback triggers restart of BEAR
firthm01 Jan 15, 2024
bb41e2e
Remove dummy data
firthm01 Jan 15, 2024
75d4ec9
Terminology
firthm01 Jan 15, 2024
cfb58c3
Minor tidy of setSelectedDataFileDefault
firthm01 Jan 15, 2024
8e952c9
Avoid creating new insts of DataFile in updateAvailableFiles
firthm01 Jan 15, 2024
7ad8d36
Better entry labelling
firthm01 Jan 15, 2024
45e9d60
Fix dataFileValueBox visibility and placement
firthm01 Jan 15, 2024
b32c4d8
Strip out BinauralRendererErrorOverlay
firthm01 Jan 15, 2024
8e18fea
Fix wrong ext in CMakeLists headers
firthm01 Jan 15, 2024
43463b4
Tidy comments and redundant code
firthm01 Jan 15, 2024
da72d3a
value_box_data_file can be header only
firthm01 Jan 15, 2024
5a1d102
Zero output if processor/renderer not started
firthm01 Jan 15, 2024
b727161
Minor setRendererStatus improvements
firthm01 Jan 18, 2024
21d31cd
Fix logic around silencing output
firthm01 Jan 19, 2024
f50865a
Inform user of renderer restating in status text
firthm01 Jan 19, 2024
2e131de
Remove redundant (and incorrect) method
firthm01 Jan 19, 2024
0d6c830
Change label wording
firthm01 Jan 19, 2024
70af6c1
Sort data file entries by released and then by filename
firthm01 Jan 19, 2024
b1ecdc0
Label first in data file list and mark custom ones
firthm01 Jan 19, 2024
f024676
Fix really silly logic mistake in rendererStarted
firthm01 Jan 21, 2024
f4090d7
DataFileManager may as well set paths. dataFileManager no need to be …
firthm01 Jan 22, 2024
e4b2c1b
Remove unused method
firthm01 Jan 22, 2024
8eea3fa
Support separate path for custom TFs. Reference DataFile entries by f…
firthm01 Jan 22, 2024
e95cf5b
Fix item initial selection
firthm01 Jan 22, 2024
6a518c8
Fix no default HRTF set if prefs file not found
firthm01 Jan 23, 2024
51dcf13
Correct data file path on MacOS
firthm01 Jan 24, 2024
6d31cbe
Simplify FEC setRendererStatus overloads
firthm01 Jan 26, 2024
105a79c
EarComboBoxTextWithSubtextEntry class
firthm01 Jan 21, 2024
2be7981
Fit multiline subtext in to entry
firthm01 Jan 21, 2024
ddf07bb
Increase text brightness
firthm01 Jan 21, 2024
3e3e10c
Remove nonsense dummy text
firthm01 Jan 21, 2024
1124b02
Consts for padding
firthm01 Jan 21, 2024
292c82c
Take in to account padding for width calc
firthm01 Jan 21, 2024
1d21393
Comment fix
firthm01 Jan 22, 2024
8615a12
addTextWithSubtextEntry supporting StringArray
firthm01 Jan 22, 2024
05db208
Support description in bear data file metadata
firthm01 Jan 22, 2024
a8444d7
Use existing addLines func to replace own code
firthm01 Jan 23, 2024
cbbe2df
Make wordwrapping code more readable
firthm01 Jan 23, 2024
91252a2
Handle multiple consecutive spaces in word wrapping logic
firthm01 Jan 23, 2024
d59e641
Tidy by removing reference semantics for DataFile and using maps to s…
rsjbailey Feb 20, 2024
b785c29
Fix missing #include
rsjbailey Feb 21, 2024
7f01bdb
Bump C++ version
rsjbailey Feb 21, 2024
c2d1a1f
Really bump c++ version
rsjbailey Feb 21, 2024
0954875
Fix char* init after c++ version bump
firthm01 Feb 21, 2024
ee393d8
Clarify why metadata extraction is wrapped in a try
firthm01 Feb 21, 2024
1c68402
Further clarification on why failure to extract metadata is not a wri…
firthm01 Feb 21, 2024
cc41f04
Fix changed/deleted files not updated
firthm01 Feb 23, 2024
7b9a225
Check for defaultIsSelected
firthm01 Feb 23, 2024
72f1b70
Update bear to main with default TF inc metadata
firthm01 Feb 20, 2024
99ed578
Check isBearRelease flag rather than assume from path
firthm01 Feb 23, 2024
0b149a7
Don't auto set default if previous TF now missing
firthm01 Feb 23, 2024
a0dc009
Set Scene bus sizing according to REAPER ch support
firthm01 Jan 24, 2024
58145f9
Set Mon bus sizing according to REAPER ch support
firthm01 Jan 24, 2024
a864764
Set Bin Mon bus sizing according to REAPER ch support
firthm01 Jan 24, 2024
19f72f0
Set ADM Exp Src bus sizing according to REAPER ch support
firthm01 Jan 27, 2024
dca6ad9
Asserts on bus reconfig and general tidy
firthm01 Feb 26, 2024
8345c73
Plugin deprecation warning when user tries to import using FB360/VISR
firthm01 Jan 2, 2024
3a6ccf0
Warning of plugin deprecation on export
firthm01 Jan 2, 2024
20af5f9
Move all plugin deprec stuff to own header - easier removal later
firthm01 Jan 2, 2024
132c233
Update copyright year
firthm01 Jan 29, 2024
8e40fb0
Update CHANGELOG.md
firthm01 Jan 29, 2024
4c2b67e
Update package readme and license
firthm01 Jan 30, 2024
cd3834d
Fix bus size due to init order and simplify scene supported buses
firthm01 Feb 27, 2024
50faa4c
Only show deprec warn on export if ADM Exp Src plugins present
firthm01 Feb 27, 2024
5e4158a
Fix buffer alignment issue using 64ch versions of DAW
firthm01 Feb 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Version 1.1.0

* Support for 128 channels when using REAPER >=v7.0 [#244](https://github.com/ebu/ear-production-suite/issues/244) [#254](https://github.com/ebu/ear-production-suite/pull/254) [#267](https://github.com/ebu/ear-production-suite/pull/267)
* Improve import support from third-party tools [#259](https://github.com/ebu/ear-production-suite/pull/259)
* Support HRTF switching in Binaural Monitoring plugin [#266](https://github.com/ebu/ear-production-suite/pull/266)
* Fix monitoring plugins not properly supporting shared inputs [#257](https://github.com/ebu/ear-production-suite/issues/257) [#258](https://github.com/ebu/ear-production-suite/pull/258)
* Apply "version" attribute to ADM as required by ITU-R BS.2076-2 [#248](https://github.com/ebu/ear-production-suite/issues/248) [#255](https://github.com/ebu/ear-production-suite/pull/255)
* Performance fix for envelope creation [#252](https://github.com/ebu/ear-production-suite/pull/252)
* Update BW64 lib for performance fixes [#260](https://github.com/ebu/ear-production-suite/issues/260)
* Allow user to opt-out of update-checking during setup [#256](https://github.com/ebu/ear-production-suite/pull/256)
* Warn user of impending FB360 and VISR support deprecation since these plugin suites are no longer maintained [#265](https://github.com/ebu/ear-production-suite/pull/265)

Version 1.0.0

* Setup Application included
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT.TXT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The content of this repository is

Copyright (C) 2019-2023 British Broadcasting Corporation (BBC)
Copyright (C) 2019-2024 British Broadcasting Corporation (BBC)
Copyright (C) 2020-2021 European Broadcasting Union (EBU)
Copyright (C) 2019-2021 Institut für Rundfunktechnik GmbH (IRT)

Expand Down
4 changes: 3 additions & 1 deletion ear-production-suite-plugins/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ set(EAR_BASE_SOURCES
src/communication/metadata_thread.cpp
src/pending_store.cpp
src/auto_mode_controller.cpp
${EPS_SHARED_DIR}/helper/common_definition_helper.cpp
${EPS_SHARED_DIR}/helper/adm_preset_definitions_helper.cpp
${EPS_SHARED_DIR}/helper/cartesianspeakerlayouts.cpp
${EAR_PROTO_SRC} src/restored_pending_store.cpp
)

Expand Down Expand Up @@ -133,6 +134,7 @@ set(EAR_BASE_HEADERS
include/auto_mode_controller.hpp
include/reaper_integration.hpp
include/reaper_vst3_interfaces.h
${EPS_SHARED_DIR}/helper/adm_preset_definitions_helper.h
${EPS_SHARED_DIR}/helper/container_helpers.hpp
${EPS_SHARED_DIR}/speaker_setups.hpp
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <vector>
#include <string>
#include <../src/dynamic_renderer.hpp>
#include "variable_block_adapter.hpp"
#include <chrono>
Expand All @@ -9,6 +10,20 @@
namespace ear {
namespace plugin {

enum BearStatusStates {
NOT_ATTEMPTED = 0,
FAILED,
SUCCEEDED
};

struct BearStatus {
bear::Config startupConfig;
BearStatusStates startupSuccess{NOT_ATTEMPTED};
std::string startupErrorDesc;
BearStatusStates listenerDataSetSuccess{NOT_ATTEMPTED};
std::string listenerDataSetErrorDesc;
};

/**
* @brief Binaural monitoring plugin dsp implementation
*
Expand Down Expand Up @@ -47,6 +62,8 @@ class BinauralMonitoringAudioProcessor {
BinauralMonitoringAudioProcessor& operator=(
BinauralMonitoringAudioProcessor&&) = delete;

BearStatus getBearStatus() { return bearStatus; }

template <typename InBuffer, typename OutBuffer>
void process(const InBuffer& in, OutBuffer& out) {
using InTraits = BufferTraits<InBuffer>;
Expand All @@ -67,7 +84,7 @@ class BinauralMonitoringAudioProcessor {
void setListenerOrientation(float quatW, float quatX, float quatY,
float quatZ);

bool rendererError() { return !bearRenderer; }
bool rendererStarted() { return bearRenderer && bearStatus.startupSuccess == SUCCEEDED; }

void setIsPlaying(bool state) { isPlaying = state; }
bool getIsPlaying() { return isPlaying; }
Expand All @@ -84,6 +101,7 @@ class BinauralMonitoringAudioProcessor {
std::shared_ptr<bear::DynamicRenderer> bearRenderer; // TODO - why shared?
std::mutex bearListenerMutex_;
bear::Listener bearListener;
BearStatus bearStatus;

bool listenerQuatsDirty{false};
std::array<double, 4> listenerQuats{1.0, 0.0, 0.0, 0.0};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "ear-plugin-base/export.h"
#include "scene_gains_calculator.hpp"
#include "listener_orientation.hpp"
#include "helper/common_definition_helper.h"

#include <string>
#include <memory>
Expand Down Expand Up @@ -103,9 +102,6 @@ class BinauralMonitoringBackend {
std::unique_ptr<communication::MonitoringMetadataReceiver> metadataReceiver_;
communication::MonitoringControlConnection controlConnection_;

std::mutex commonDefinitionHelperMutex_;
AdmCommonDefinitionHelper commonDefinitionHelper{};

bool isExporting_{ false };
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DirectSpeakersMetadataSender {
void name(const std::string& value);
void inputInstanceId(int value);
void colour(int value);
void speakerSetupIndex(int value);
void packFormatIdValue(int value);

ConnectionId getConnectionId() { return sender_.connectionId(); }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#pragma once

#include "helper/protobuf_utilities.hpp"
#include "helper/common_definition_helper.h"
#include "helper/adm_preset_definitions_helper.h"
#include <string>
#include <memory>
#include <adm/detail/id_parser.hpp>

namespace ear {
namespace plugin {
Expand All @@ -26,12 +29,16 @@ struct EpsToEarMetadataConverter {

static std::vector<ear::DirectSpeakersTypeMetadata> convert(
const proto::DirectSpeakersTypeMetadata &epsMetadata) {
auto packFormatId =
proto::SpeakerLayoutTranslator::proto2ear(epsMetadata.layout());

adm::AudioPackFormatId audioPackFormatID(
adm::TypeDefinition::DIRECT_SPEAKERS,
adm::AudioPackFormatIdValue(epsMetadata.packformatidvalue()));
auto audioPackFormatIDstr = adm::formatId(audioPackFormatID);

std::vector<ear::DirectSpeakersTypeMetadata> earMetadata;
for (auto epsSpeaker : epsMetadata.speakers()) {
ear::DirectSpeakersTypeMetadata earSpeaker;
earSpeaker.audioPackFormatID = packFormatId;
earSpeaker.audioPackFormatID = audioPackFormatIDstr;
earSpeaker.position = ear::PolarSpeakerPosition(
epsSpeaker.position().azimuth(), epsSpeaker.position().elevation(),
epsSpeaker.position().distance());
Expand All @@ -48,11 +55,9 @@ struct EpsToEarMetadataConverter {
return earMetadata;
}
static ear::HOATypeMetadata convert(
const proto::HoaTypeMetadata &epsMetadata,
AdmCommonDefinitionHelper &commonDefinitionHelper) {
auto pfData = commonDefinitionHelper.getPackFormatData(
const proto::HoaTypeMetadata &epsMetadata) {
auto pfData = AdmPresetDefinitionsHelper::getSingleton().getPackFormatData(
4, epsMetadata.packformatidvalue());

ear::HOATypeMetadata earMetadata;

if (pfData) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,13 @@
#pragma once

#include <map>
#include "type_metadata.pb.h"
#include <speaker_setups.hpp>

namespace ear {
namespace plugin {
namespace proto {

class SpeakerLayoutTranslator {
public:
static std::string proto2ear(const SpeakerLayout& layout);
static SpeakerLayout ear2proto(const std::string& layout);

private:
static std::map<SpeakerLayout, std::string> SpeakerLayoutProtoToEarLUT_;
static std::map<std::string, SpeakerLayout> SpeakerLayoutEarToProtoLUT_;
};

inline proto::DirectSpeakersTypeMetadata* convertSpeakerSetupToEpsMetadata(
int setupIndex) {
auto ds_metadata = new proto::DirectSpeakersTypeMetadata();

ds_metadata->set_layout(proto::SpeakerLayout(setupIndex));
for (auto speaker : speakerSetupByIndex(setupIndex).speakers) {
auto newSpeaker = ds_metadata->add_speakers();
newSpeaker->set_is_lfe(speaker.isLfe);
newSpeaker->add_labels(speaker.label);
newSpeaker->mutable_position()->set_azimuth(speaker.azimuth);
newSpeaker->mutable_position()->set_elevation(speaker.elevation);
}
return ds_metadata;
}
proto::DirectSpeakersTypeMetadata* convertPackFormatToEpsMetadata(
int packFormatIdValue);

} // namespace proto
} // namespace plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <bw64/bw64.hpp>
#include <vector>
#include <map>
#include <helper/common_definition_helper.h>

namespace ear {
namespace plugin {
Expand Down Expand Up @@ -49,8 +48,6 @@ class ProgrammeStoreAdmSerializer {
void setInteractivity(adm::AudioObject& object, const proto::Object& object1);
void setImportance(adm::AudioObject& object, const proto::Object& object1);
bool isSerializedWithDifferentObjectSettings(const proto::Object& object);

AdmCommonDefinitionHelper admCommonDefinitionHelper;
};

} // namespace plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <map>
#include <string>
#include <vector>
#include "helper/common_definition_helper.h"

namespace ear {
namespace plugin {
Expand Down Expand Up @@ -44,9 +43,6 @@ class SceneGainsCalculator {
ear::GainCalculatorHOA hoaCalculator_;

std::map<communication::ConnectionId, ItemGains> routingCache_;

std::mutex commonDefinitionHelperMutex_;
AdmCommonDefinitionHelper commonDefinitionHelper_{};
};

} // namespace plugin
Expand Down
29 changes: 1 addition & 28 deletions ear-production-suite-plugins/lib/messages/type_metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,6 @@ package ear.plugin.proto;

import "common_types.proto";

// XXX: the numbers directly correspond to the indicies in the speaker layout combobox
enum SpeakerLayout {
ITU_BS_2051_UNKNOWN = -1;
ITU_BS_2051_0_1_0 = 0;
ITU_BS_2051_0_2_0 = 1;
ITU_BS_755_0_3_0 = 2;
ITU_BS_755_0_4_0 = 3;
ITU_BS_2051_0_5_0_NO_LFE = 4;
ITU_BS_2051_0_5_0 = 5;
ITU_BS_2051_0_6_0 = 6;
ITU_BS_2094_0_7_0_FRONT = 7;
ITU_BS_2051_0_7_0_BACK = 8;
ITU_BS_2051_2_5_0 = 9;
ITU_BS_2094_0_7_0_SIDE = 10;
ITU_BS_2094_2_5_0 = 11;
ITU_BS_2094_2_7_0_SCREEN = 12;
ITU_BS_2094_2_7_0 = 13;
ITU_BS_2051_4_5_0 = 14;
ITU_BS_2051_4_5_1 = 15;
ITU_BS_2051_3_7_0 = 16;
ITU_BS_2094_4_7_0 = 17;
ITU_BS_2051_4_7_0 = 18;
ITU_BS_2051_4_9_0 = 19;
ITU_BS_2051_9_10_3 = 20;
ITU_BS_2094_9_9_0 = 21;
}

message Speaker {
optional int32 id = 1 [default = 0];
repeated string labels = 2;
Expand All @@ -40,7 +13,7 @@ message Speaker {
}

message DirectSpeakersTypeMetadata {
optional SpeakerLayout layout = 1 [default = ITU_BS_2051_UNKNOWN];
optional int32 packFormatIdValue = 1 [default = 0];
repeated Speaker speakers = 2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ BinauralMonitoringAudioProcessor::BinauralMonitoringAudioProcessor(

bearListener.set_position_cart(std::array<double, 3>{0.0, 0.0, 0.0});

bearStatus.startupConfig = bearConfig;
try {
bearRenderer = std::make_shared<bear::DynamicRenderer>(
blockSize,
std::max(std::max(maxObjChannels, maxDsChannels), maxHoaChannels));
bearRenderer->set_config_blocking(bearConfig);
bearStatus.startupSuccess = BearStatusStates::SUCCEEDED;
try {
bearRenderer->set_listener(bearListener);
bearStatus.listenerDataSetSuccess = BearStatusStates::SUCCEEDED;
} catch (std::exception &e) {
bearStatus.listenerDataSetSuccess = BearStatusStates::FAILED;
bearStatus.listenerDataSetErrorDesc = e.what();
bearRenderer.reset();
assert(false);
}
} catch (std::exception &e) {
bearStatus.startupSuccess = BearStatusStates::FAILED;
bearStatus.startupErrorDesc = e.what();
bearRenderer.reset();
assert(false);
}
}

Expand Down Expand Up @@ -218,6 +224,7 @@ bool BinauralMonitoringAudioProcessor::updateChannelCounts(
// Do immediate update
bearRenderer->set_config_blocking(bearConfig);
}
return true;
}

} // namespace plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ BinauralMonitoringBackend::BinauralMonitoringBackend(
activeObjectIds.reserve(inputChannelCount);
activeHoaIds.reserve(inputChannelCount);

commonDefinitionHelper
.getElementRelationships(); // Save doing it later in time-critical calls

allActiveIds.reserve(inputChannelCount);

controlConnection_.logger(logger_);
Expand Down Expand Up @@ -153,15 +150,12 @@ BinauralMonitoringBackend::getLatestHoaTypeMetadata(ConnId id) {
if (!epsMD || !epsMD->has_hoa_metadata()) {
return std::optional<HoaEarMetadataAndRouting>();
}
{
std::lock_guard<std::mutex> lock(commonDefinitionHelperMutex_);
setInMap<ConnId, HoaEarMetadataAndRouting>(
latestHoaTypeMetadata, id,
HoaEarMetadataAndRouting{
epsMD->has_routing() ? epsMD->routing() : -1,
EpsToEarMetadataConverter::convert(epsMD->hoa_metadata(),
commonDefinitionHelper)});
}

setInMap<ConnId, HoaEarMetadataAndRouting>(
latestHoaTypeMetadata, id,
HoaEarMetadataAndRouting{
epsMD->has_routing() ? epsMD->routing() : -1,
EpsToEarMetadataConverter::convert(epsMD->hoa_metadata())});

earMD = getValuePointerFromMap<ConnId, HoaEarMetadataAndRouting>(
latestHoaTypeMetadata, id);
Expand Down Expand Up @@ -229,15 +223,14 @@ void BinauralMonitoringBackend::onSceneReceived(proto::SceneStore store) {
}
if (item.has_hoa_metadata()) {
auto hoaId = item.hoa_metadata().packformatidvalue();
{
std::lock_guard<std::mutex> lock(commonDefinitionHelperMutex_);
// TODO: May need to revisit later -
// this is a high-frequency call but may be slow to to execute
auto pfData = commonDefinitionHelper.getPackFormatData(4, hoaId);
if (pfData) {
auto cfCount = pfData->relatedChannelFormats.size();
totalHoaChannels += cfCount;
}
// TODO: May need to revisit later -
// this is a high-frequency call but may be slow to to execute
auto pfData =
AdmPresetDefinitionsHelper::getSingleton().getPackFormatData(4,
hoaId);
if (pfData) {
auto cfCount = pfData->relatedChannelFormats.size();
totalHoaChannels += cfCount;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ void DirectSpeakersMetadataSender::inputInstanceId(int value)
void DirectSpeakersMetadataSender::colour(int value) {
setData([value](auto data) { data->set_colour(value); });
}
void DirectSpeakersMetadataSender::speakerSetupIndex(int value) {
void DirectSpeakersMetadataSender::packFormatIdValue(int value) {
setData([value](auto data) {
data->set_allocated_ds_metadata(
proto::convertSpeakerSetupToEpsMetadata(value));
proto::convertPackFormatToEpsMetadata(value));
});
}

Expand Down
Loading
Loading