Replies: 4 comments 5 replies
-
I don't have experience with Flutter nor Dart so not sure I'll be of much help, but does Flutter run on Web technologies under the hood?miniaudio supports web, but it's done through Emscripten so I don't think the FFI system would pick that up properly. The way miniaudio's build system works is that it only compiles in the backends that are relevant for the compiler you're using. For example, if you're compiling using a Linux compiler, it'll only include the ALSA and PulseAudio backends in the build. Could this perhaps be the problem? How are you supplying Dart with the C code? I'm guessing you need to compile it into a library and then give that to Dart with some kind of description of the relevant functions? |
Beta Was this translation helpful? Give feedback.
-
Just getting back to this. I was able to integrate miniaudio with flutter and call my native Android C++ function via Dart FFI that runs the miniaudio code. I'm using a slightly modified [Hello World example] Output:*
Modified Hello World Example
|
Beta Was this translation helpful? Give feedback.
-
Added the
|
Beta Was this translation helpful? Give feedback.
-
The code you posted is not going to work. That is initialising the engine then stopping it straight away after 5 milliseconds. You need to keep the engine alive for the life of your program. |
Beta Was this translation helpful? Give feedback.
-
I've built the example, simple_capture into a flutter app using Dart:FFI to see if I can get the library to record from the microphone on a google pixel 3a. However I only get the failed to initialize output file error. The app is not prompting for the microphone access either. I feel like I'm missing something. Is there more that I need to do than simply copying the code from the the example? The example does not mention doing anything more.
Beta Was this translation helpful? Give feedback.
All reactions