GithubHelp home page GithubHelp logo

Comments (7)

maks avatar maks commented on July 21, 2024

Hmm, yes I probably should have changed that code to be a bit better when I did the port to null-safety.
But how are you passing in the path to the libao dll ? The exception is occurring because the path is null.

from libao.

sleepreading avatar sleepreading commented on July 21, 2024

Same Problem!
Environment:

Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18116933e7 (9 weeks ago) • 2021-10-15 10:46:35 -0700
Engine • revision d3ea636dc5
Tools • Dart 2.14.4

change code Libao.open() to Libao.open(""), will cause this exception:

Invalid argument(s): Failed to load dynamic library '': dlopen failed: can't read file "/data/app/......-w8jcxgmbluIa0EgCRsGHow==/lib/arm64": Is a directory stack:#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:55)
I/flutter (10825): #1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:20:12)

from libao.

maks avatar maks commented on July 21, 2024

@sleepreading ok but where is the libao shared library that you are trying to use located? The whole point is that you do need to supply the path the library.
It would help if you could also mention what OS/platform you are trying to run this on?

from libao.

sleepreading avatar sleepreading commented on July 21, 2024

@maks
Sorry for my poor English, this is my Android Phone:

Honor 10 - COL AL10
System: EMUI
Android Version: 10
Kernel-Version: 4.14.116
CPU: HiSilicon Kirin 970
RAM: 6GB

I used your demo code: final ao = Libao.open(); and this will cause the problem as mentioned by @UNIcodeX above:
Null check operator used on a null value, so I change open() to open(''), and this will cause a new exception as I mentioned above.

from libao.

maks avatar maks commented on July 21, 2024

No worries and no need to apologise.
Ah I see what you are trying to do now.
As far as I know Libao only supports some desktop operating systems and does not really support Android. You can see the list of all the platforms Libao supports on thier homepage.
However it does seem that some people have experimented with getting it compiled for Android but from what I can see it is not fully functional.

Depending on what audio playback functionality you need, you may be better off looking to use something like just_audio.

from libao.

sleepreading avatar sleepreading commented on July 21, 2024

Thanks!
I must admit that this library is awesome because just_audio and audioplayers are both non-supported for playBytes()(They only support playing raw audio bytes on android), But your library supports almost every platform(except web).
Turns out, it's really hard to play raw audio bytes(which I received from a server using HTTP or grpc) on all platforms.

from libao.

maks avatar maks commented on July 21, 2024

@sleepreading I agree, I really like this package too, but it doesn't change that the underlying libao library does not support Android. I maybe working on a similar Dart FFI package for Android's Oboe library, so I'll make sure to mention it here if I do get it published in the future.

from libao.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.