Skip to content
New issue

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

How can I use raw PCM data directly as input? #26

Open
staymillion opened this issue Jul 15, 2020 · 4 comments
Open

How can I use raw PCM data directly as input? #26

staymillion opened this issue Jul 15, 2020 · 4 comments

Comments

@staymillion
Copy link

staymillion commented Jul 15, 2020

I have an audio monitor hardware and I can get raw PCM data from it.
How can I use the data as fft plot input?
I'm checking the run() method in SamplingLoop.java file, is it the correct place that I can modify to use raw PCM data as input?

@bewantbe
Copy link
Owner

Yeah, that is the right place.
Btw is that hardware run in an Android system?

@staymillion
Copy link
Author

Yeah, that is the right place.
Btw is that hardware run in an Android system?

Thank you very much, I got it and your code works very fine!
No, our hardware is just a single integrated circuit board and it runs c program to collect audio signal, then encode them into PCM data and send to Android phone via UDP socket

@fhaefele
Copy link

I have a Patterson M500-384 ultrasound microphone that I connect to my Google Pixel 7 running Android 13.
https://batsound.com/product/m500-384-usb-ultrasound-microphone/

I thought I can use the USB audio stream as input, but I see no option of doing so. It seems that the ADC in the phone itself is sampling the incoming audio stream again at the highest sampling rate of 192k which is obviously lower than the intended 384k. Do you know how I could stream the microphone data directly into the app?

@bewantbe
Copy link
Owner

Hi fhaefele, may be try look up the menu (settings->audio source), and try different source. If nothing worked, then the code might need some change.

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

No branches or pull requests

3 participants