static boolean isEncodingSupported(final AudioFormat targetFormat) {
        final FFAudioFormat.FFEncoding ffEncoding = FFAudioFormat.FFEncoding.getInstance(targetFormat.getEncoding().toString());
        boolean supported;
        if (PCM_UNSIGNED.getEncoding().equals(ffEncoding) && targetFormat.getSampleSizeInBits() >= 8 && targetFormat.getSampleSizeInBits() <= 32) {
            supported = true;
        } else if (PCM_FLOAT.getEncoding().equals(ffEncoding) && (targetFormat.getSampleSizeInBits() == 32 || targetFormat.getSampleSizeInBits() == 64)) {
            supported = true;
        } else if (PCM_SIGNED.getEncoding().equals(ffEncoding) && targetFormat.getSampleSizeInBits() >= 8 && targetFormat.getSampleSizeInBits() <= 32) {
            supported = true;
        } else {
            supported = false;
        }
        return supported;
    }