To narrow down what/where the problem is, if you just write the encoded data to a file (not network) and then try playing that file, does that work?
If you want to send the data over a network, you could try BASSenc's built-in server feature (see BASS_Encode_ServerInit) and then BASS_StreamCreateURL on the client side. That should make things much simpler for you, eg. no need for callback functions. You can check the SERVER.C example (and pre-compiled SERVER.EXE) included in the BASSenc package for a demonstration.
I tried it and the same problem. Changing using all types has the same problem
As for BASS_Encode_ServerInit, I used it and it succeeded, but there is a delay and I want to transfer in real time, so I used this method
encodeHandle= BASS_Encode_AAC_Start(recordChannel, "--object-type 2 --vbr 0 --bitrate 32000", 0, encodeProcx,null);
public static com.un4seen.bass.BASSenc.ENCODEPROCEX encodeProcx = (int handle, int channel, ByteBuffer buffer, int length, long offset, Object user) -> {
byte[] data = new byte[length];
buffer.get(data);
sendEncodedData(data);
};
ByteBuffer byteBuffer = ByteBuffer.wrap(encodedData);
int channel = BASS_AAC_StreamCreateFile(byteBuffer, 0, encodedData.length, 0);
BASS.BASS_ChannelPlay(channel, false);
AAC, OGG , OPUS All Type same problem