iOS Question Audiostream

Nizze

Active Member
Licensed User
Longtime User
Hi

Is there a way to listen to a audio stream in B4I

Like we can in B4A

I have searched , but i cant se how to

I miss this :

audioStream.Initialize("AudioStream", 8000, False, 16, audioStream.VOLUME_MUSIC)

I have an app in an raspberry that streams audio in s16e format that i want to connect to

Br

Nizze
 

Nizze

Active Member
Licensed User
Longtime User
You should try it.

Okey , i tryed to ..
But i dont hear a thing ..
Can i do anything else ?

Private player1 As NativeObject


B4X:
       player1 = CreatePlayer("http://82.16.XXX.XXX:6001")
       player1.RunMethod("play", Null)

B4X:
Sub CreatePlayer(url As String) As NativeObject
    Dim u As NativeObject
    u = u.Initialize("NSURL").RunMethod("URLWithString:", Array(url))
    Dim player As NativeObject
    player = player.Initialize("AVPlayer").RunMethod("alloc", Null).RunMethod("initWithURL:", Array(u))
    Return player
End Sub
 
Upvote 0
Top