B4J Question [SOLVED] AudioStreamer

Star-Dust

Expert
Licensed User
Longtime User
In B4A there is the audio library that makes the AudioStramer class available. Thus it is possible to send supine in byte format.
B4X:
Dim Data() as Byte

AudioStreamer.Write(Data)

Is there anything similar for B4J?
 

Star-Dust

Expert
Licensed User
Longtime User
Yes, I had already tried it to no avail.
 
Last edited:
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
SOLVED ? ? ? ?

In any case, by translating a Java code found on the internet I created a class that plays a byte-format audio. Just what I need for audio streaming between Android and Desktop (maybe ios in the future)

I share the class, which can serve as a correspondent (or almostI) of AudioStreamer for Android.

PlayDataAudio
  • Functions:
    • Class_Globals As String
    • Initialize As String
    • IsInitialized As Boolean
    • StartAudioPlayer ' Start audio player
    • SendDataPlayer (data() As Byte) ' plays music captured by the microphone or streamed
    • StopAudioPlayer ' Stop audio player


PS. It was tiring for me since I'm not good at java. :mad::mad::mad::mad:
 

Attachments

  • PlayDataAudio.bas
    1.9 KB · Views: 524
Last edited:
Upvote 0
Top