Streaming Audio from Remote Location

All of the threads I’ve found on this seem to be from a while back so I just thought I’d check in to see if there is any update on this.

Is there any way to easily stream audio from a URL? I’m building a professional app that requires the ability to stream audio from a website. The only way I’ve found to do it is with the “media.playVideo” method which isn’t awful, but doesn’t quite meet my needs. This opens in a full blank screen (since there’s no actual video associated with it). What I’d really like to do is have the audio play inside of UI without having to completely navigate away from it. The past threads I’ve seen say there is no way to do this, but I thought I would check in to see if there was any update released for this or if anybody had come up with a creative solution.

Any thoughts?

Thanks! [import]uid: 172008 topic_id: 31801 reply_id: 331801[/import]

Im also in the same situation. Anyone have news? [import]uid: 123238 topic_id: 31801 reply_id: 127082[/import]

I haven’t solved the problem yet, but if you happen to come up with anything please drop me a line. :slight_smile: [import]uid: 172008 topic_id: 31801 reply_id: 127154[/import]

Im also in the same situation. Anyone have news? [import]uid: 123238 topic_id: 31801 reply_id: 127082[/import]

I haven’t solved the problem yet, but if you happen to come up with anything please drop me a line. :slight_smile: [import]uid: 172008 topic_id: 31801 reply_id: 127154[/import]

These are all old, but I have the same problem. Solved by using native.newVideo, which allows streaming of a remote sound or video file.

That sounds great, but I have a new problem. With the video, I cannot control channels independently. I cannot even see which channels are used. So is it true that I cannot stream a remote audio and also control the channel volumes separately?

I have complex sound files, made for surround sound (using AirPods), but with the ability of the user to silence or enhance certain channels. I don’t see a way to do that with the video player.

Any advancement in ability to stream MP3 or AAC audio from another website or audio server source?

Seems pretty handy in the internet age to play a stream from another location.

I was testing some audio stuff fairly recently, MOD players and such. In one case I tried to integrate the logic itself into the engine: detecting the file format, then do decode + playback. But I also decoded into PCM in a memory buffer and then played from that. The latter approach was using some play-from-memory code in Solar’s audio library; nothing had actually been calling it, so up to that point I was never even sure it would work.

I was able to do those things because I was hacking on Solar itself, but it would
want a little sprucing up and be exposed through plugins, ideally. (There’s another possibility I have in mind, too, but not yet implemented.) This has been done for graphics, or rather textures—the memory bitmap plugin is built on it, for example—so I figure we’d want something similar.

Anyhow, if one could stream into a memory buffer, in theory we’re good to go. That said, there are a LOT of weird quirks in the mixer code, like this rewinding thing, so I’m not sure there wouldn’t be snags. Also, there would be some practical considerations, like what should happen if there’s lag and you don’t supply the next chunk.


SoLoud can play from a memory buffer, but I haven’t tried to implement any kind of networked streaming example.

1 Like

I do have this plugin

https://solar2dmarketplace.com/plugins?MusicStreaming_tech-scotth

2 Likes

Thank you, Scott, good to see that it plays background by default. Will it play full Dolby atmos if the hardware supports it? I assume so.