pslab-android
pslab-android copied to clipboard
Wave Generator: Implement option to generate waves without PSLab Device
Signed-off-by: Daniel W. S. Almeida [email protected]
First steps for #1974
This is not ready yet. ~~Current code crashes with java.lang.IllegalStateException: Unable to retrieve AudioTrack pointer for write() . I will investigate.~~
I would appreciate some feedback on this, specially as I am not sure whether I have understood the task 100%. I have based my work on this blog post.
Changes:
Add a button to generate waves without a PSLab device, using the phone as the source for the signal. Refactor existing sampling code from its current implementation in ProduceSoundTask into a separate method for code reuse.
Checklist:
- [x] I have used resources from
strings.xml,dimens.xmlandcolors.xmlwithout hard-coding them - [x] No modifications done at the end of resource files
strings.xml,dimens.xmlorcolors.xml - [ ] I have reformatted code in every file included in this PR [CTRL+ALT+L]
- [x] My code does not contain any extra lines or extra spaces
- [ ] I have requested reviews from other members
Hi @dwlsalmeida how is it going. Would be great to get this feature in. Would love to see the next steps.
Hey @mariobehling
This is semi-working. Might as well give it another go today. Did you try it out? I'd appreciate some feedback.
Sent from my Redmi Note 5 using FastHub
@mariobehling @CloudyPadmal can I get someone to look this over?
I have implemented a radio button that checks whether there's anything hooked up into the audio jack before playing the signal. What now?
Any guidance is appreciated, thanks! :)