Comments (11)
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.
from malgo.
from malgo.
from malgo.
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.
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.
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.
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.
from malgo.
@gen2brain That should be fixed now. Version 0.10.24.
from malgo.
@mackron Updated, thanks.
from malgo.
Related Issues (20)
- Build on android not playing audio HOT 2
- capture example does not compile HOT 7
- Doesn't work with go mod? HOT 3
- Examples not compiled HOT 3
- Capture example doesn't run on macOS 10.15.3? HOT 9
- How can I select a device to use for capture/playback manually? HOT 9
- Q: Why is iOS not supported? HOT 15
- please update to v0.10.35 HOT 1
- Documentation issue for InitDevice HOT 2
- DeviceInfo.Name function returns a string with null bytes in it HOT 1
- Warnings on macOS 12.1
- Documentation/Examples of using loopback. HOT 1
- Microphone Not Working on built and notarized binary - MacOS HOT 6
- Q: how to encode input audio bytes to PCM properly HOT 1
- Having trouble specifying device dynamically. HOT 1
- Q: Is it possible to get individual audio streams from applications? HOT 1
- Extend WasapiDeviceConfig to support loopbackProcessID and loopbackProcessExclude
- Odd behavior after periodically capturing audio over a long period of time HOT 7
- Plan to update to Miniaudio v0.9.1? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from malgo.