Git Product home page Git Product logo

Comments (7)

justincouch avatar justincouch commented on August 14, 2024 2

I was getting this same error and was able to correct it with the arguments @ddf mentioned above with a slight modification. The built in Macbook Pro microphone is mono, but only works with a bit depth of 8 or 16.
in = minim.getLineIn(Minim.MONO, 1024, 44100, 16); worked for me.
With the caveat that I just upgraded to Processing 4 because of P3D issues. So my setup is:
MacBook Pro (16-inch, 2019)
MacOS Monterey
Processing 4.0b5

from minim.

ddf avatar ddf commented on August 14, 2024

Most likely related to something changing in Big Sur's handling of audio things, might require a Java update, not sure. I can't test Big Sur on my ancient Macbook unfortunately. You could try adding a minim.debugOn() before calling getLineIn() and see what's reported in the console.

from minim.

ddf avatar ddf commented on August 14, 2024

Would also recommend searching the Processing forum to see if other folks have had trouble with audio on Big Sur and if they were able to fix it.

from minim.

paulcanning avatar paulcanning commented on August 14, 2024

The debug line gave me:

==== JavaSound Minim Debug ====
==== TargetDataLine buffer size is 16384
==== TargetDataLine format is PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
==== TargetDataLine info is interface TargetDataLine supporting 14 audio formats, and buffers of at least 32 bytes

=== Minim Debug ===
=== byteBufferSize is 4096

==== JavaSound Minim Debug ====
==== SourceDataLine is class com.sun.media.sound.DirectAudioDevice$DirectSDL
==== Buffer size is 16384 bytes.
==== Format is PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian.

=== Minim Debug ===
=== Likely buffer underrun in AudioOutput.

from minim.

ddf avatar ddf commented on August 14, 2024

Well, that looks like it's successfully getting an input, but it may not be the one you are expecting. I'd recommend running the setInputMixer example in the Advanced folder of the Minim examples and see what you get onscreen for buttons. You can click on a button to attempt to open that input.

from minim.

paulcanning avatar paulcanning commented on August 14, 2024

I did as you asked with the example, and got this message when clicking the button for the onboard mic:

==== JavaSound Minim Error ====
==== Error acquiring TargetDataLine: Line unsupported: interface TargetDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian

=== Minim Error ===
=== Minim.getLineIn: attempt failed, could not secure an AudioInput.

from minim.

ddf avatar ddf commented on August 14, 2024

Ok, so it could be that the onboard mic doesn't support the default format. I'd recommend checking your system settings to see how audio for the mic is configured (ie sample rate, bit-depth) and then modify setInputMIxer to use the version of getLineIn that takes format arguments and provide those values. For example minim.getLineIn(Minim.MONO, 1024, 48000, 24) would try to acquire a mono input with a buffer size of 1024 that has a sample rate of 48kHz and a bit-depth of 24.

from minim.

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.