Skip to content

Support audio input on Android - #35

Merged
kevinstadler merged 2 commits into
processing:masterfrom
Calsign:android-audio-input
May 24, 2019
Merged

kevinstadler merged 2 commits into
processing:masterfrom
Calsign:android-audio-input

Conversation

@Calsign

@Calsign Calsign commented May 23, 2019

Copy link
Copy Markdown
Contributor

Implement AndroidAudioInputStream using Android's AudioRecord. Create a new example demoing audio input functionality on Android. See #20.

Calsign added 2 commits May 23, 2019 16:52
…dioRecord.

The AudioInput example does not yet request the RECORD_AUDIO permission, but
other than that, audio input appears to be working correctly.
We can't use the same example for both desktop and Android because we need to
request the RECORD_AUDIO permission on Android and the API for doing this does
not exist on the desktop.
@kevinstadler
kevinstadler merged commit 7468904 into processing:master May 24, 2019
@kevinstadler

Copy link
Copy Markdown
Collaborator

This looks fantastic, thank you very much!

One question, do you think it would be feasible to include the step of requesting Audio permission in the AudioIn class itself, i.e. so that the user doesn't have to do it themselves? Upon instantiation of AudioIn the constructor could check if the current audio engine is an instance of JsynAndroidAudioDeviceManager and if it is call the corresponding Android API to request permission. As long as the android.jar is present during building I don't think this Android-specific bit of code should cause any problems for Processing on desktop since the missing Android API methods won't ever actually get invoked there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants