Play streaming audio with b4j
I exploit this module hier playDataAudio to play knowledge acquired from b4a that use AudioStreamer from b4j
B4X:
B4X:
B4X:
Private Sub Astream_NewData (Buffer() As Byte)
log("knowledge arrived")
playaudio.SendDataPlayer(Buffer)
B4X:
Sub Class_Globals
Private nativeMe As JavaObject
End Sub
'Initializes the item. You can add parameters to this technique if wanted.
Public Sub Initialize
nativeMe = Me
nativeMe.RunMethod( "initialaudio", Null)
End Sub
Public Sub StartAudioPlayer
nativeMe.RunMethod( "startaudio", Null)
End Sub
Public Sub StopAudioPlayer
nativeMe.RunMethod( "stopaudio", Null)
End Sub
Public Sub SendDataPlayer (knowledge() As Byte)
nativeMe.RunMethod( "playaudio", Array(knowledge,knowledge.Length))
End Sub
#IF JAVA
import javax.sound.sampled.*;
SourceDataLine _speaker;
public void initialaudio() throws LineUnavailableException{
// specifying the audio format
AudioFormat _format = new AudioFormat(22050.F,// Sample Rate...
HI-FI News
through B4X Programming Forum https://ift.tt/0lZMkuV
August 4, 2025 at 09:53AM
-
Product on sale
Audiophile Vinyl Records Cleaning BundleOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Product on sale
Easy Start Vinyl Records Cleaning KitOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Vinyl Records Cleaner Easy Groove Concentrate€34.95 incl. VAT -
Easy Groove Super Set€199.00 incl. VAT -
Easy Groove Enzycaster – vinyl records prewash cleaner€34.95 incl. VAT -
Easy Groove Extreme MK. II- vinyl records prewash cleaner€45.00 incl. VAT -
Vinyl Records Cleaner – Easy Groove Virgin Concentrate€35.00 incl. VAT -
Easy Groove Spray&Wipe vinyl records cleaner€34.95 incl. VAT








