Repository navigation
Replies: 1 comment
|
Hi, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have been trying to get the library to work on Windows.
I modified "Adafruit_USBD_Audio.cpp" a little as follow.
from
// Setup endpints and interfaces
if (isHeadset() && _desc_len==0) {
_itfnum_mic = TinyUSBDevice.allocInterface(); // input interface
_itfnum_spk = TinyUSBDevice.allocInterface(); // output interface
_ep_mic = TinyUSBDevice.allocEndpoint(TUSB_DIR_IN); // intput
_ep_int = TinyUSBDevice.allocEndpoint(TUSB_DIR_IN); // input
_ep_spk = TinyUSBDevice.allocEndpoint(TUSB_DIR_OUT); // output
_itf_number_total += 2;
}
to
// Setup endpints and interfaces
if (isHeadset() && _desc_len==0) {
_itfnum_spk = TinyUSBDevice.allocInterface(); // spk output interface
_ep_spk = TinyUSBDevice.allocEndpoint(TUSB_DIR_OUT); // spk output
//_ep_int = TinyUSBDevice.allocEndpoint(TUSB_DIR_IN); // spk input
_itfnum_mic = TinyUSBDevice.allocInterface(); // input interface
_ep_mic = TinyUSBDevice.allocEndpoint(TUSB_DIR_IN); // mic intput
_itf_number_total += 2;
}
On Windows, the match between the order of the endpoint configuration and the order of the interfaceDescriptor
seems to be important.
I do not know the role of ep_int, so I can not answer if the removal of ep_int will be allowed to remove.
But, it was not work with _ep_int in Windows.
The sound of the microphone part in “audio_headset.ino” was tested using Audacity on Macos and Windows.
The sound of the spk part without ep_int has not yet been tested, but the counts of ‘Speaker Samples’ have been increased.
Is this approach correct?
All reactions