AudioStreamer icon indicating copy to clipboard operation
AudioStreamer copied to clipboard

Streaming Radio ?

Open xcourier opened this issue 6 years ago • 3 comments

Trying to use this framework to stream internet radio. I am able to get some radio stations that stream in .mp3 formats to play, but only for a short period of time . Most stations stream for 30 seconds or so and then go 'silent'. The App does not crash, and there are no errors in the console .. it just seems to go ....silent for lack of a better description ?

The app continues to run and packets seem to still be processed..but no audio ?

The console logs as below, but no audio is heard . ..

2019-08-19 19:26:37.360708-0400 TimePitchStreamer[14105:1198796] [Parser.Packets] ParserPacketCallback(_:_:_:_:_:) - 17 [bytes: 1254, packets: 6, compressed: true]

xcourier avatar Aug 19 '19 23:08 xcourier

To be more precise, when streaming live radio replace

let url = URL(string: "https://cdn.fastlearner.media/bensound-rumble.mp3")!

in ViewController.swift with :

let url = URL(string: "http://radionz-ice.streamguys.com/national.mp3")!

The engine reaches an end of file state after a few seconds of playback

2019-08-20 14:43:28.345860-0400 TimePitchStreamer[22259:1547343] [AudioUnitViewController] streamer(_:changedState:) - 37 [playing]
2019-08-20 14:43:42.275479-0400 TimePitchStreamer[22259:1547343] [Streamer] Scheduler reached end of file

Just wondering if this is fixable ? Thanks for this cool project!

xcourier avatar Aug 20 '19 18:08 xcourier

I'm experiencing the same problem, the radio goes silent after a approximate 30 seconds.

dylancom avatar Jul 22 '20 15:07 dylancom

I also ran into the same issue… I believe this is intended more as a tutorial/basic package thing (which I learned a lot from!) than a production framework.

https://github.com/fethica/FRadioPlayer looks more like a production-ready "clone it and build your UI" framework, and definitely works with shoutcast/icecast/etc.

EricWVGG avatar Dec 28 '20 00:12 EricWVGG