Giter VIP home page Giter VIP logo

Comments (8)

intxcc avatar intxcc commented on September 2, 2024 3

Thank you for that suggestion!
Did not think much about that as it was never a problem for me.

I will see if I can implement the first solution you suggested.

Best,
Marvin

from pyaudio_portaudio.

Nufflee avatar Nufflee commented on September 2, 2024

This would be very useful. Hopefully it's implemented soon. +1

from pyaudio_portaudio.

intxcc avatar intxcc commented on September 2, 2024

The silence isn't perfect yet, but there you go.
Moved this in an extra branch, as long as it has some issues.
PyAudio-0.2.11.win-amd64-py3.7.msi.zip

from pyaudio_portaudio.

intxcc avatar intxcc commented on September 2, 2024

Usage

stream = p.open(format = pyaudio.paInt16,
                channels = channelcount,
                rate = int(device_info["defaultSampleRate"]),
                input = True,
                frames_per_buffer = defaultframes,
                input_device_index = device_info["index"],
                as_loopback = useloopback,
                wasapi_fill_silence = True)

from pyaudio_portaudio.

intxcc avatar intxcc commented on September 2, 2024

Or instead of silence I could return NULL when the loopback output stream has no frames available.
One would then be able to handle this case oneself in the python code, as the operation will then be non-blocking.

from pyaudio_portaudio.

jangxx avatar jangxx commented on September 2, 2024

Sounds like a great idea, but this would make the loopback streams a special edge case, which don't always return audio like all the other streams. Considering the loopback streams are special anyway however, I think both ways would be fine from a design perspective and having an specific return value for when no audio is available could be useful I guess.

from pyaudio_portaudio.

tavin-inc avatar tavin-inc commented on September 2, 2024

I downloaded this version with wasapi_fill_silence but it's giving me an error in init(), saying that this parameter doesn't exist

from pyaudio_portaudio.

mikhailTochilin avatar mikhailTochilin commented on September 2, 2024

Could you please drop the .wheel package of this version with wasapi?

from pyaudio_portaudio.

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.