Giter Site home page Giter Site logo

Comments (11)

gen2brain avatar gen2brain commented on July 17, 2024

Hi, I am really the wrapper guy, miniaudio does all magic here, I understand here and there but I don't know the internals and I certainly don't know much about audio. Are there real problems you experience or just numbers do not match? Is there something missing maybe from your formula, why do you expect that e.g. there was a bug with mp3 example, where all it was needed was ReadAll. see here e8a71e7 .

We can ask for help from the author, but better not to bother him if this is not a bug but just a question. If you can browse first through miniaudio code, check, look, verify, and try some examples in C and compare that would be great. Is it a miniaudio or malgo problem is the main question.

from malgo.

claudio-ortega avatar claudio-ortega commented on July 17, 2024

from malgo.

claudio-ortega avatar claudio-ortega commented on July 17, 2024

from malgo.

claudio-ortega avatar claudio-ortega commented on July 17, 2024

from malgo.

mackron avatar mackron commented on July 17, 2024

I'm the author of miniaudio. So this error is happening on Linux? I'm assuming you have PulseAudio installed? I just a fixed a couple of bugs with capture mode on PulseAudio, so if you're using PulseAudio it might be worth an upgrade. These are the relevant issue reports - maybe your issue is related? mackron/miniaudio#106, mackron/miniaudio#187. As a test, run your program with pavucontrol open and see if your test runs as expected (random, I know...). If so, it's almost certainly related to those issues and will be fixed when malgo is updated to the latest version.

I think your assertion about the device taking time to deliver data is probably accurate for the macOS case.

from malgo.

gen2brain avatar gen2brain commented on July 17, 2024

Thanks, @mackron, I updated malgo to the latest miniaudio version.
Btw. now I see that PA -> ALSA fallback will crash, i.e. if I start playback example as root and it cannot initialize PA, that used to work.

from malgo.

mackron avatar mackron commented on July 17, 2024

Hmm, that's annoying. If you disable the PA backend do you get the crash still? Just wondering if it's the PA backend not initializing that's causing the crash or the ALSA backend. Will take a look soon.

from malgo.

gen2brain avatar gen2brain commented on July 17, 2024

With just the ALSA backend it works. Here is the gdb output from Go binary with default backends order:

XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
LOG <[PulseAudio] Failed to connect PulseAudio context.>

Thread 1 "playback" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000000004e2f52 in ma_device_start (pDevice=0x6522c0) at miniaudio.h:32821
#2  0x00000000004cc407 in _cgo_f39c4aee37ed_Cfunc_ma_device_start (v=0xc000505b00) at cgo-gcc-prolog:138
#3  0x000000000046da30 in runtime.asmcgocall () at /home/milann/go/src/runtime/asm_amd64.s:656

from malgo.

claudio-ortega avatar claudio-ortega commented on July 17, 2024

from malgo.

mackron avatar mackron commented on July 17, 2024

@gen2brain That should be fixed now. Version 0.10.24.

from malgo.

gen2brain avatar gen2brain commented on July 17, 2024

@mackron Updated, thanks.

from malgo.

Related Issues (20)

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.