bastibe / SoundCard

A Pure-Python Real-Time Audio Library
https://soundcard.readthedocs.io
BSD 3-Clause "New" or "Revised" License
680 stars 69 forks source link

Feature Information Query: Reading Audio buffer by name #43

Closed ishwara-bhat closed 4 years ago

ishwara-bhat commented 5 years ago

Hi, Thanks for the library. I guess this is a great stuff considering that it works on multiple OSes.

One query. I have a need to read the audio buffer after starting the playback. i.e. if there are CODEC issues, I want to capture through that. This is only for windows. In audio pipeline I want to get buffer , just when the device is writing to the end point. (I guess, at API-level it is "IAudioRenderClient::GetBuffer " ? ) Please let me know if this library supports this functionality at python-level.

Thanks Ishwar

bastibe commented 5 years ago

Hi, I'm sorry, I don't quite get what you need. If you need the lowest possible latency, use read with no argument. SoundCard does not work with encoded data. Everything is handled in float numpy buffers containing the raw sample data.

ishwara-bhat commented 5 years ago

Thanks for the response. My overall goal is to test a CODEC. In audio pipeline, I intend to play audio on DUT and access the end point buffer after that. In the below diagram, I am just wondering how much 'down' I could go with SoundCard.

image

Thanks in advance for the response!

bastibe commented 5 years ago

SoundCard interacts with WASAPI only.