You would use BASS_StreamCreate something like this:
stream = BASS.BASS_StreamCreate(freq, chans, 0, StreamProc, null); // create stream
BASS.BASS_ChannelPlay(stream, false); // start it
BASS.STREAMPROC StreamProc = new BASS.STREAMPROC() {
public int STREAMPROC(int handle, ByteBuffer buffer, int length, Object user) {
// put up to "length" bytes of data in "buffer" here and return the amount
}
};
Another option is to create a "push" stream, where you use BASS_StreamPutData instead of a STREAMPROC to provide the data. Something like this:
stream = BASS.BASS_StreamCreate(freq, chans, 0, BASS.STREAMPROC_PUSH, null); // create stream
BASS.BASS_StreamPutData(stream, buffer, length); // give it data to play
BASS.BASS_ChannelPlay(stream, false); // start it
Please see the BASS_StreamCreate documentation for details.