Skip to content

Android Visualizer.OnDataCaptureListener #3

Open
@gsus24

Description

@gsus24

I try to change audio capture instead with microphone with Visualizer.OnDataCaptureListener
https://developer.android.com/reference/android/media/audiofx/Visualizer.OnDataCaptureListener
The output format is an 8-bit unsigned mono PCM

But how to pass it to addPCM8( unsigned char PCMdata[2][1024])?
https://github.com/projectM-visualizer/projectm/blob/d789acbd3414a3c3b431455f0bc40f287928f4c4/src/libprojectM/PCM.cpp#L222

First: Why need addPCM8() an two dimensional array? Android outputs is one dimensional byte [1024]!

Second: My idea was to wait for next capture byte[] and then call addPCM8() and pass the last two.
Any idea to pass the multi array it to JNIEXPORT and finally call addPCM8()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions