Comments (9)
Can you try with C capture example https://github.com/dr-soft/miniaudio ? If it works there I can work on updating the library here.
from malgo.
Yes, I was able to run the c capture example, it seems to work fine.
from malgo.
Can you try whether v0.10.4 fixes things #19?
from malgo.
Unfortunately it looks like the same problem, but a different line number in miniaudi.sh:
➜ capture git:(fixes) ✗ go run .
Recording...
Press Enter to stop recording...
Assertion failed: (pLPF->format == ma_format_f32), function ma_lpf_process_pcm_frame_f32, file /Users/craig/Projects/malgo/miniaudio.h, line 31279.
signal: abort trap
from malgo.
Pushed an additional fix.
from malgo.
PR is merged, but I see now same error on the same line with playback example. When commenting that assert check on line 31279 it just works.
from malgo.
I suspect that the audio would be slowed down by some amount.
I think the reason is that the device uses sample rate that's defined in the file, rather what the device supports. It does seem to have resampling support and I think the playback example should use that instead.
Although there does seem to be some internal resampling available:
The `config.playback.channels` member sets the number of channels to use with the device. The channel count cannot exceed MA_MAX_CHANNELS. The
`config.sampleRate` member sets the sample rate (which must be the same for both playback and capture in full-duplex configurations). This is usually set to
44100 or 48000, but can be set to anything. It's recommended to keep this between 8000 and 384000, however.
Note that leaving the format, channel count and/or sample rate at their default values will result in the internal device's native configuration being used
which is useful if you want to avoid the overhead of miniaudio's automatic data conversion.
No clue why it would fail though.
from malgo.
Now master is working for me.
from malgo.
Managed to reproduce it directly in miniaudio. The difference is that currently the package is using empty DeviceConfig, however, the miniaudio examples use ma_device_config_init
, which also sets deviceConfig.resampling.linear.lpfOrder
.
from malgo.
Related Issues (20)
- 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
- SIGSEGV from `ma_device_uninit` HOT 4
- test segfault after upgrade to v0.11.10 HOT 1
- Dynamic Linking fails on OSX OSX 13.5.2 and 14.0 (Sonoma) HOT 2
- NULL Audio device on MacOS 14.1.1 (23B81) HOT 3
- Q: Support for High Level API HOT 1
- Release v0.11.11 HOT 2
- How is Capture device set supposed to work? HOT 2
- Runtime selection between PulseAudio and ALSA? HOT 1
- Capture on mac HOT 1
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.