chipweinberger / dart_melty_soundfont

A port of Melty Synth by Nobuaki Tanaka (C#) to Dart
Other
33 stars 8 forks source link

Build Failure on iOS with Readme example code #3

Closed abegehr closed 2 years ago

abegehr commented 2 years ago

I'm running the example code from the readme: https://pub.dev/packages/dart_melty_soundfont#example And am getting a build failure on iOS.

Build failure logs ``` ** BUILD FAILED ** Xcode's output: ↳ Writing result bundle at path: [/var/folders/qm/p7v8v0tn1rs_7lzhx8s_39q00000gn/T/flutter_tools.EXfodr/flutter_ios_build_temp_dirqI0dsC/temporary_xcresult_bundle]() : Error: Type 'ByteData' not found. ../…/lib/synthesizer.dart:112 factory Synthesizer.loadByteData(ByteData data, [SynthesizerSettings? settings]) ^^^^^^^^ : Error: Expected ';' after this. ../…/services/binding.dart:374 ui.channelBuffers.setListenerchannel, (ByteData? data, ui.PlatformMessageResponseCallback callback) async { ^^^^^^^^^^^^^^^^^^ : Error: Expected an identifier, but got ','. ../…/services/binding.dart:374 Try inserting an identifier before ','. ui.channelBuffers.setListenerchannel, (ByteData? data, ui.PlatformMessageResponseCallback callback) async { ^ : Error: Unexpected token ','. ../…/services/binding.dart:374 ui.channelBuffers.setListenerchannel, (ByteData? data, ui.PlatformMessageResponseCallback callback) async { ^ : Error: Expected ';' after this. ../…/services/binding.dart:388 }); ^ : Error: Expected an identifier, but got ')'. ../…/services/binding.dart:388 Try inserting an identifier before ')'. }); ^ : Error: Unexpected token ')'. ../…/services/binding.dart:388 }); ^ : Error: The getter 'setListenerchannel' isn't defined for the class 'ChannelBuffers'. ../…/services/binding.dart:374 - 'ChannelBuffers' is from 'dart:ui'. Try correcting the name to the name of an existing getter, or defining a getter or field named 'setListenerchannel'. ui.channelBuffers.setListenerchannel, (ByteData? data, ui.PlatformMessageResponseCallback callback) async { ^^^^^^^^^^^^^^^^^^ : Error: 'ByteData' isn't a type. ../…/lib/synthesizer.dart:112 factory Synthesizer.loadByteData(ByteData data, [SynthesizerSettings? settings]) ^^^^^^^^ Failed to package [/Users/anton/local/repos/mashup.]() Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order Result bundle written to path: [/var/folders/qm/p7v8v0tn1rs_7lzhx8s_39q00000gn/T/flutter_tools.EXfodr/flutter_ios_build_temp_dirqI0dsC/temporary_xcresult_bundle]() Could not build the precompiled application for the device. ```
Flutter doctor output ``` [flutter] flutter doctor -v [✓] Flutter (Channel beta, 2.11.0-0.1.pre, on macOS 12.3 21E5222a darwin-x64, locale en-DE) • Flutter version 2.11.0-0.1.pre at /Users/anton/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision b101bfe32f (2 weeks ago), 2022-02-16 07:36:54 -0800 • Engine revision e355993572 • Dart version 2.17.0 (build 2.17.0-69.2.beta) • DevTools version 2.10.0-dev.1 [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at /Users/anton/Library/Android/sdk • Platform android-32, build-tools 32.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.3) • Xcode at /Applications/Xcode-beta.app/Contents/Developer • CocoaPods version 1.11.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2020.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165) [✓] VS Code (version 1.62.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.29.0 [✓] Connected device (2 available) • Anton’s iPhone (mobile) • 00008101-0002249636B8001E • ios • iOS 15.4 19E5241a • Chrome (web) • chrome • web-javascript • Google Chrome 99.0.4844.51 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! exit code 0 ```
abegehr commented 2 years ago

@chipweinberger, I've opened a PR to fix the missing import #4 I've noticed that your code is not formatted with the dart formatter. Is there a reason for that? I just noticed when I made the import fix and saved the file, VSC formatted the file for me.

chipweinberger commented 2 years ago

The original C# MeltySynch uses longer lines than Dart formatter likes, and legibility was greatly decreased for some code.

It's possible some other files could benefit, but I don't want to apply it universally.

chipweinberger commented 2 years ago

I'll merge your PR!