ArmDeveloperEcosystem / microphone-library-for-pico

Capture audio from a microphone on your Raspberry Pi Pico or any RP2040 based board. 🎤
Apache License 2.0
253 stars 50 forks source link

Fixes for microphone example on Windows #8

Closed sandeepmistry closed 3 years ago

sandeepmistry commented 3 years ago

These changes should resolve #6.

They include:

1) a port of https://github.com/hathach/tinyusb/pull/1058

2) bumping CFG_TUD_AUDIO_EP_SZ_IN by one, as per the comment in: https://github.com/hathach/tinyusb/blob/2eaf99e0aa9c10d62dd8d0a4e765f5941bfeaf98/examples/device/audio_4_channel_mic/src/tusb_config.h#L104

// 48 Samples (48 kHz) x 2 Bytes/Sample x CFG_TUD_AUDIO_N_CHANNELS_TX Channels
// - the Windows driver always needs an extra sample per channel of space more, otherwise it complains... found by trial and error

So far, I've tested on a Windows 10 VM and macOS - they seem ok. @iovsiann it would be great if you can test these changes on Windows and Linux and report your feedback.

iovsiann commented 3 years ago

@sandeepmistry, I have checked it, it works both on my Windows laptop (Skype, Audacity) and Ubuntu desktop (Audacity). Many thanks for the fix!

sandeepmistry commented 3 years ago

@iovsiann awesome, thank you for trying the change and the feedback!

I'll go ahead and merge these changes now.