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

Visualizer not working properly for AudioFormat.ENCODING_PCM_16BIT configuration #30

Closed
ghost opened this issue Mar 17, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 17, 2020

Hi Sir,

I think Visualizer not working properly for AudioFormat.ENCODING_PCM_16BIT configuration.
Can you support it?

Thanks,

@bogerchan
Copy link
Owner

bogerchan commented Mar 17, 2020

Hi, @huyletran84 ,
Thanks for using the library, can you show more details about it?

@tpeet
Copy link

tpeet commented Mar 30, 2020

I'm stumbling upon the same problem. When using AudioFormat.ENCODING_PCM_16BIT the data is saved into ShortArrays with 16-bit signed values, instead of unsigned 8-bit ByteArrays.

fetchWaveData() can only return ByteArrays, and currently that would require some manual conversion.

@ghost
Copy link
Author

ghost commented Mar 31, 2020

Hi @bogerchan,

The problem that @tpeet said is the same with my problem now.
About UI, when changing the config to AudioFormat.ENCODING_PCM_16BIT, the visual chart is drawn not well. I can not describe about it because my English is not good. But can you please change the config and run demo application. I think you can understand what i said.

Thanks,

@bogerchan
Copy link
Owner

Thanks for your feedback, I will try to fix the issue.

@bogerchan
Copy link
Owner

Hi, I have updated the code to support AudioFormat.ENCODING_PCM_16BIT, hope to help you.
The PR is #32

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

2 participants