I have a class : https://paste.ubuntu.com/p/j7qBb6Cs5m/
And It converts AudioFormat to AudioFormatDDJ (that's a format available in a library), and the coder had coded it for Desktop Environment and I want to implement in to Android, and I had written a code AudioFormat audioFormat = new AudioFormat.Builder()
.setChannelMask(channelCount)
.setEncoding(AudioFormat.ENCODING_PCM_16BIT)
.setSampleRate(sampleRate)
.build(); but the AudioFormat doesn't read byte array or InputStream so how can it work?