From 91a8ac30ecb925950613f7b2d9a7e93f6222b5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hauke=20Kr=C3=BCger?= Date: Thu, 16 May 2024 13:18:00 +0200 Subject: [PATCH] 1) Cleanup of sdk cmake files for flutter. 2) Cleanup of file naming 3) Removal of all binrender project specific stuff --- .../cmake-ayf-minimal-header-includes.cmake | 1 - flutter/ayf_webhost/example/lib/main.dart | 4 +- .../example/lib/models/ayf_ui_specific.dart | 57 ------------------- .../lib/models/ayf_ui_specific_widgets.dart | 26 --------- flutter/ayf_webhost/example/pubspec.yaml | 3 - ...web_backend_host.dart => ayf_webhost.dart} | 0 .../ayf_webhost/test/ayf_ffihost_test.dart | 2 +- 7 files changed, 3 insertions(+), 90 deletions(-) rename flutter/ayf_webhost/lib/{ayf_web_backend_host.dart => ayf_webhost.dart} (100%) diff --git a/cmake-sdk/cmake-ayf-minimal-header-includes.cmake b/cmake-sdk/cmake-ayf-minimal-header-includes.cmake index 26400aae..22401987 100644 --- a/cmake-sdk/cmake-ayf-minimal-header-includes.cmake +++ b/cmake-sdk/cmake-ayf-minimal-header-includes.cmake @@ -1,7 +1,6 @@ list(APPEND AYF_MINIMAL_SDK_HEADER_INCLUDE_LIST "${AYF_SDK_PATH}/include/include" "${AYF_SDK_PATH}/include/jvx-system-min/include" - "${AYF_SDK_PATH}/include/ayfbinrender-native-config/include" "${AYF_SDK_PATH}/include/jvx-system-min/include/platform/windows" "${AYF_SDK_PATH}/include/jvx-system-base/include" "${AYF_SDK_PATH}/include/jvx-system-base/include/platform/windows" diff --git a/flutter/ayf_webhost/example/lib/main.dart b/flutter/ayf_webhost/example/lib/main.dart index 0057aa00..bb7ef17a 100644 --- a/flutter/ayf_webhost/example/lib/main.dart +++ b/flutter/ayf_webhost/example/lib/main.dart @@ -9,8 +9,8 @@ import '/models/ayf_ui_specific_widgets.dart'; import 'models/ayf_be_specific.dart'; import 'package:ayf_pack/ayf_pack.dart'; -import 'package:ayf_webhost/ayf_web_backend_host.dart' - if (dart.library.html) 'package:ayf_webhost/ayf_web_backend_host.dart'; +import 'package:ayf_webhost/ayf_webhost.dart' + if (dart.library.html) 'package:ayf_webhost/ayf_webhost.dart'; // import 'package:flutter_native_splash/flutter_native_splash.dart'; diff --git a/flutter/ayf_webhost/example/lib/models/ayf_ui_specific.dart b/flutter/ayf_webhost/example/lib/models/ayf_ui_specific.dart index 36725e70..744fd0e4 100644 --- a/flutter/ayf_webhost/example/lib/models/ayf_ui_specific.dart +++ b/flutter/ayf_webhost/example/lib/models/ayf_ui_specific.dart @@ -5,23 +5,11 @@ import 'package:ayf_pack_native/ayf_pack_native.dart' // import '../ayfpacks/ayf_pack.dart'; -import 'package:ayfbinrender/ayf_binrender_widget.dart'; import 'package:ayf_pack/main-widgets/ayf_audio_settings_widget.dart'; class AudYoFloUiModelSpecific extends AudYoFloUiModel with AudYoFloUiElementsTabBar { // ========================================================================== - // We define the ui modeling parameters for the binaural rendering widget here. - // Note that this instance also defines a local property shown in the settings - // ========================================================================== - AudYoFloBinauralRendererSection binauralRenderer = - AudYoFloBinauralRendererSection(true, - 'packages/ayf_pack/images/ayf_icons/ayf-brender.png', 'Bin. Renderer', - imageNameIcon: 'packages/ayf_pack/images/ayf_icons/ayf-micsrc.png', - height: 70, - width: 70); - - // ========================================================================== // We define some rendering parameters for the audio io widget. // We use package specific icons here. // ========================================================================== @@ -47,7 +35,6 @@ class AudYoFloUiModelSpecific extends AudYoFloUiModel imageNameApp = 'images/ayfbinrender_icons/ayfbinrender-logo.png'; // Define some specific configuration entities - widgetSpecificConfigurations['binauralRenderer'] = binauralRenderer; widgetSpecificConfigurations['soundIo'] = soundIo; widgetSpecificConfigurations['headtracker'] = headtracker; widgetSpecificConfigurations['fileinput'] = fileinput; @@ -68,31 +55,6 @@ class AudYoFloUiModelSpecific extends AudYoFloUiModel oneSection = AudYoFloSettingsConfigurationSection(); oneSection.nameEntry = 'Application'; - // ======================================================================= - // Initialize the local property at this position - // ======================================================================= - binauralRenderer.propIconSize.selection - .initialize(flags.compileNum32BitBitfield); - binauralRenderer.propIconSize.selection.bitZSet(0); - AudYoFloOneComponentSettingsLocal addThisLoUi = - AudYoFloOneComponentSettingsLocal('Ui Properties', [ - binauralRenderer.propIconSize, - binauralRenderer.propSpread, - fastRefreshPerMsecs, - slowRefreshPerMsecs - ], propTags: [ - 'Binaural Render Icon Size', - 'Spread Azimuth Angle', - 'Fast callback period', - 'Slow callback period', - ], propTooltips: [ - 'Specify the size of the binaural render icon.', - 'Setup the maximum spread angle in case of icon spread button', - ' Specify the period for the fast timer', - ' Specify the period for the slow timer', - ]); - oneSection.addEntry(addThisLoUi); - AudYoFloOneComponentSettingsBackend addThisBeHost = AudYoFloOneComponentSettingsBackend( JvxComponentIdentification( @@ -188,25 +150,6 @@ class AudYoFloUiModelSpecific extends AudYoFloUiModel return jvxErrorType.JVX_NO_ERROR; } - if (prop.descriptor == binauralRenderer.propIconSize.descriptor) { - if (binauralRenderer.propIconSize.selection.bitTest(0)) { - binauralRenderer.height = 40; - binauralRenderer.width = 40; - } else if (binauralRenderer.propIconSize.selection.bitTest(1)) { - binauralRenderer.height = 70; - binauralRenderer.width = 70; - } else if (binauralRenderer.propIconSize.selection.bitTest(2)) { - binauralRenderer.height = 100; - binauralRenderer.width = 100; - } - notifyThis = true; - } - - if (prop.descriptor == binauralRenderer.propSpread.descriptor) { - binauralRenderer.spreadAngle = binauralRenderer.propSpread.value; - notifyThis = true; - } - if (notifyThis) { notifyListeners(); } diff --git a/flutter/ayf_webhost/example/lib/models/ayf_ui_specific_widgets.dart b/flutter/ayf_webhost/example/lib/models/ayf_ui_specific_widgets.dart index c2bac5a9..a89452ba 100644 --- a/flutter/ayf_webhost/example/lib/models/ayf_ui_specific_widgets.dart +++ b/flutter/ayf_webhost/example/lib/models/ayf_ui_specific_widgets.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:ayf_pack/ayf_pack.dart'; import 'ayf_ui_specific.dart'; -import 'package:ayfbinrender/ayf_binrender_widget.dart'; import 'package:ayf_pack/main-widgets/ayf_audio_settings_widget.dart'; import 'package:flutter/foundation.dart' show kIsWeb; @@ -70,31 +69,6 @@ class AudYoFloUiModelSpecificWithWidget extends AudYoFloUiModelSpecific { // Add the Binaural rendering widget // ====================================================================== - JvxComponentIdentification cpBin = widgetConfigCpId( - entriesCfgWidgets, - JvxComponentIdentification( - cpTp: JvxComponentTypeEnum.JVX_COMPONENT_AUDIO_NODE, - slotid: 0, - slotsubid: 0), - 'binrender'); - theAllocatedTabs.add(RotatedBox( - quarterTurns: -1, - child: Tooltip( - message: cpBin.txt, - child: Column(children: [ - Image.asset(binauralRenderer.imageName, - filterQuality: FilterQuality.medium, - width: navButtonSizeMain, - height: navButtonSizeMain), - GestureDetector( - onSecondaryLongPress: () { - // print('Hello'); to be filled later - }, - child: Text(binauralRenderer.textShow), - ) // <- maybe, make this switchable by right click? - ]), - ))); - theAllocatedTabViews.add(AudYoFloBinRenderWidget(cpBin)); // ====================================================================== // Add the primary audio device widget // ====================================================================== diff --git a/flutter/ayf_webhost/example/pubspec.yaml b/flutter/ayf_webhost/example/pubspec.yaml index d4b16af1..f87423b0 100644 --- a/flutter/ayf_webhost/example/pubspec.yaml +++ b/flutter/ayf_webhost/example/pubspec.yaml @@ -21,9 +21,6 @@ dependencies: ayf_pack: path: ../../ayf_pack - ayfbinrender: - path: ../../ayfbinrender/ayfbinrender - ayf_webhost: path: '..' # path: '../../ayf_ffihost' diff --git a/flutter/ayf_webhost/lib/ayf_web_backend_host.dart b/flutter/ayf_webhost/lib/ayf_webhost.dart similarity index 100% rename from flutter/ayf_webhost/lib/ayf_web_backend_host.dart rename to flutter/ayf_webhost/lib/ayf_webhost.dart diff --git a/flutter/ayf_webhost/test/ayf_ffihost_test.dart b/flutter/ayf_webhost/test/ayf_ffihost_test.dart index 0c231bd7..4a227700 100644 --- a/flutter/ayf_webhost/test/ayf_ffihost_test.dart +++ b/flutter/ayf_webhost/test/ayf_ffihost_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:ayf_webhost/ayf_web_backend_host.dart'; +import 'package:ayf_webhost/ayf_webhost.dart'; void main() { test('adds one to input values', () {