Git Product home page Git Product logo

Comments (2)

mgeier avatar mgeier commented on July 28, 2024

PortAudio doesn't provide a platform-independent way to select arbitrary channels. You can only specify a certain number of channels N, which means that the channels 1 to N are used.

For convenience, I added the mapping argument to play() and rec() and input_mapping/output_mapping to playrec(). However, this simply checks for the largest channel number, requests this number of channels from PortAudio and fills the unneeded output channels with zeros (and ignores the unneeded input channels). It's not ideal if you have many unneeded channels, but it gets the job done

And that's what you can do in your code using RawInputStream, too.

Having said that, PortAudio also has some platform-specific functions to select certain channels (see http://portaudio.com/docs/v19-doxydocs/group__public__header.html), but those are currently not implemented in python-sounddevice (see #4). If you think they should be implemented, please leave a comment at #4. On what platform/host API would you need that feature?

from python-sounddevice.

mgeier avatar mgeier commented on July 28, 2024

Selecting arbitrary channels is now possible with ASIO (see #34). If you need other platform-specific features, please comment on #4 or open a new issue.

from python-sounddevice.

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.