We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Similar to:
But in this case, I would not expect CODAL to be able to return early as it needs to record the expected length of audio before it returns.
With the default rate works as expected:
>>> af = audio.AudioFrame(100) >>> t1 = running_time(); microphone.record_into(af); t2 = running_time(); t2-t1 101
With low enough rates with have issue #201 and it returns immediately:
>>> af = audio.AudioFrame(1000, rate=128) >>> t1 = running_time(); microphone.record_into(af); t2 = running_time(); t2-t1 2 >>> bytes(af) b'\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80' >>>
But with a rate of 256, data does go into the AudioFrame, but takes less time than expected:
>>> af = audio.AudioFrame(200, rate=256) >>> len(af) 64 >>> t1 = running_time(); microphone.record_into(af); t2 = running_time(); t2-t1 162 >>> bytes(af) b'\x81\x81\x80\x83\x81\x81\x80\x82\x81z~\x7f\x81\x81\x80\x7f\x80\x82~\x81\x80\x81\x80{|\x80\x80z\x85\x80\x80\x7f~~\x80\x81\x80\x83\x81\x85\x81\x82\x83\x82{|\x80{|\x82}\x80\x80\x80~\x82\x81}}\x7f|}\x80\x81' >>> af.get_rate() 256 >>>
I guess this could also be an issue in CODAL, if that's the case let me know and I'll raise it in the codal-microbit-v2 repository.
The text was updated successfully, but these errors were encountered:
I'll try to replicate this on CODAL first to check if this is an issue there.
Sorry, something went wrong.
microbit-carlos
No branches or pull requests
Similar to:
But in this case, I would not expect CODAL to be able to return early as it needs to record the expected length of audio before it returns.
With the default rate works as expected:
With low enough rates with have issue #201 and it returns immediately:
But with a rate of 256, data does go into the AudioFrame, but takes less time than expected:
I guess this could also be an issue in CODAL, if that's the case let me know and I'll raise it in the codal-microbit-v2 repository.
The text was updated successfully, but these errors were encountered: