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

get_microphone cannot take int index (as mentioned in windows, linux documentation) #101

Closed ipelupessy closed 4 years ago

ipelupessy commented 4 years ago

I think the get_microphone (and get_speaker) cannot take an id that is an integer index (mentioned in the docstring). this is easy to add ofcourse, or the documentation must be changed (but think giving a simple index is convenient since id strings are not so nice..)

bastibe commented 4 years ago

If I remember correctly, the macOS version uses numerical IDs, whereas Linux and Windows use string IDs.

Adding a numerical ID to Linux and Windows is not trivial, since available sound cards can change arbitrarily at any time.

But you are right that the documentation is wrong for Linux and Windows. Since the Linux documentation is the one rendered by ReadTheDocs, it needs to include information about all three versions. But it should be made clear that ints are only valid on macOS.

Would you like to contribute this as a pull request?

ipelupessy commented 4 years ago

ok, I think also for coreaudio this id cannot be a int (unless I misunderstand AudioObjectID) so the PR just remove mentoion of int

ipelupessy commented 4 years ago

..oops, got to read the .h; the AudioObjectID is an int..