Many, many, many years ago, the Commodore 64 allowed me to generate sound using peeks and pokes. Is there an equivalent option to generate sounds using B4* ??
Private Sub Play_Click
btnStartRec.Enabled = False
streamer.StartPlaying
For Each b() As Byte In buffers
streamer.Write(b)
Next
streamer.Write(Null) 'when this "message" will be processed, the player will stop.
End Sub
where the b() byte arrays are simply 16-bit samples in... I think little-endian format, but I'll go double-check that.
and that you can use ByteConverter to transform between Array of Shorts (easier for you to work with) and Array of Bytes (that the audio streamer is expecting):
B4X:
Dim bc As ByteConverter
bc.LittleEndian = True
Dim Sample16() As Short = bc.ShortsFromBytes(Buffer)