A screen titlebar plug-in class to listen to internet radio stations streaming
using ShoutCast protocol in MPEG audio format (usually MP3, MPEG-1 Layer III)
*Note* that it cannot decode other stream formats like Ogg Vorbis, WMA or AAC+
It's based on CgmRadio v2.0 from Grzegorz Kraszewski. Thanks Krashan!
If you click on the WebRadio icon in the screenbar, you can choose to start
audio streaming/playing by selecting a station from the pop-up menu.
You can also record the current station you are listening to by selecting the
"Record" option from the pop-up menu.
** Legality Notice **
It is advised that you ONLY RECORD streams if this is allowed!
It's also possible to stop playing or play another radio station while still
recording that initial stream!
The path where the recorded stream is saved to, can be changed in the screen
titlebar settings (right-click on the top-right screen depth-gadget, select
Preferences or Settings). The default path is RAM:.
There is a default radio station list to get you started, which you can edit
by choosing the option "Edit Stations" from the pop-up menu item.
Selecting the "Stream info" menu item opens a window with information about
the current radio stream.
By opening the Title's popup-list and pressing the right mouse button a
context menu opens where you can search for the selected title on the web
(https://www.invidio.us) with your standard browser or clear the list.
Or just click the Title gadget itself to search for the current title.
There is now also an ARexxPort available to control WebRadio from scripts.
ARexxCommands for WebRadio (portname is WEBRADIO):
- show this help text
PLAY STATION/F, NEXT/S, PREV/S, LAST=LASTUSED/S
- start playing STATION, NEXT/PREV will play next/prev station (loops at
the end or beginning!)
LASTUSED will play last used station (the station before stopping)
- stop playing
GET TITLE/S, STATE/S, STATION/S, LIST=STATIONLIST/S
- get the current title, state (Playing, Stoped, Recording), station name
or station list
Just copy the contents from the "SYS" folder to your SYS: partition manually,
or execute/double-click the "Install" icon file to do this.
Then by right mouse-clicking in the top-right screen depth-gadget, select the
option Modules>Rescan or just reboot your system.
Note: This is only needed if you install by hand!
- Please visit http://www.igracki.de to checkout my other software and/or
make a donation.
- Neil Pearson for proof-reading and testing
- jPV for disclaimer text;)
This software is made available to you as Freeware and you may use it in
whatever way you wish, but the author accepts no liability for any damage
caused to your system or other connected peripherals by using this software.
fix: fixed a crash when quitting Wayfarer on an own screen
chg: changed the "Connecting..." bubble to show the station name
fix: if a connection takes longer (several seconds), the sbar could freeze
fix: don't close the connection bubble if user opens the popup-menu
fix: update the state of the sbar icon before connecting
fix: if the Stream-Info window was open while connecting to a new station
which takes longer to connect a freeze could happen
chg: the "Failed to setup" req now contains additional information about why
it failed (http error code and response code)
fix: the arexx PLAY command now shows correct state while in connection phase
fix: If a stream name started with "http/https", recording of it failed
fix: The Edit-Stations window could throw some "Notify_SET: invalid obj" hits
new: if the sample-rate or channels isn't specified in the MetaHeader get
them directly from the output stream
new: added arexx cmd "PLAY LAST=LASTUSED/S" to play the last station again
before you stopped playing.
The last played station is stored in the envvar "WebRadio_LastStation",
so it survives a reboot and you can hear it again the next time
chg: you don't need to use quotes anymore for the PLAY command if the
Stationname contains spaces (STATION is now defined as STATION/F)
fix: the title returned by "GET TITLE" also contained alt-spaces
fix: the station names contained alt-spaces chars to prevent splitting the
name in the bubble, so you couldn't easily use a stationname with
spaces in "PLAY <Station>", if you don't knew it.
The alt-spaces in the stationnames will be converted during loading!
[06-Aug-20: reported by jPV]
fix: if an arexx command returns 5 (WARN), no result string was shown,
now I prepend the string with "Warning: " and return OK
chg: the STATION arg in the PLAY command can also be a number (cnt from 0!)
fix: invoking a PLAY NEXT/PREV while connection phase will be ignored (could
lead to a freeze!)
fix: sometimes the ARexx commands weren't received, the program which sends
them seemed to hang, I'm using a own process for this now
[04-Aug-20: reported by jPV]
new: added an ARexxPort (see above for the commands)
chg: the StreamInfo window is now automatically created on startup, so the
titles played before opening the StreamInfo window the first time are
chg: compiled with gcc v9.3.0
fix: if the icy values icy-br or icy-sr were at index 0, they were shown as
fix: the "Station:" and the "Title:" text will be clipped if its wider than
new: show the bitrate, samplerate and number of channels in the "Station:"
fix: changed RadioParadiso stream url, the old didn't worked anymore
23-Feb-2020, not released yet
new: now you can mute/unmute by right clicking over the sbar's image
new: draw a "X" over the sbar's image if sound is muted
new: added a Mute menuitem to mute the sound
fix: removed some debug out in WebRadio_UpdateBufferLevel()
fix: resize the Station str-gadget (StreamInfo window) for the station icon
new: added a shorthelp to the title gadget in the StreamInfo window to inform
the user what happens if he clicks on it
fix: don't clear the titles list from the StreamInfo window if another screen
fix: if you first open the EditStations window on one screen then open it on
another screen, the requesters were opened on the other screen
new: now you can also click the Title gadget in the StreamInfo window to open
the browser and search for the current title in www.invidio.us
chg: the Update button and the HTTP-Header listview can now dissappear, if
the window gets too small, this is usefull if you only want to see the
Listening (and Recording) group
fix: reloading the screenbar in the InstallScript now works with MorphOS 3.12
new: added a context menu to the titles list in the StreamInfo window,to open
the browser and search for the selected title in www.invidio.us
chg: removed the ClearList ("x") button in the StreamInfo window, and added
a "Clear list" entry to the new context menu
fix: if recording stoped, the sbar icon was showing the wrong state
fix: forgot to put the fixed downloader script into the archive
new: display the bufferlevel of the playing stream in the StreamInfo window
fix: update the StreamInfo window if you start/stop recording
fix: removed the text gadgets in the StreamInfo window from the cycle-chain
new: added a UpdateCheck menuitem
new: udpate the title in the StreamInfo window if the title changes
new: update the StreamInfo window if you switch the station
fix: fixed a hit if you switch a station or close a screen, if you had the
StreamInfo window opened before
chg: the Title gadget in the StreamInfo window is now a poplist which contains
all played titles
fix: (hopefully) fixed the mouse-freeze bug if you switch the channel, while
the "Listening to..." bubble is open, by closing the bubble before
opening the popup-menu
chg: while connecting to a station all menuitems will be disabled
chg: the 20 pixels sbar icon now has one empty line at the bottom, this looks
better if the screenbar is exactly 20 pixels height
chg: getting the recorded filesize is now done with Dos.Examine64(), because
MMA_OutputBytes can take several seconds!
This fixes the delay while recording and displaying the shorthelp or
update the stream infos in the StreamInfo window
fix: removing the sbar while the "Listening to" bubble is open, could crash
fix: the prefs page had a fixed width
chg: the New-Version-Bubble now shows "WebRadio.sbar" in the first line
fix: the "Listening to.." bubble now appears on the current screen
fix: fixed two "dead obj in pushstack" log msgs on cleanup
chg: the shorthelp now shows if there is a new version available
fix: fixed some deadlock when changing the radio station
new: 60 seconds after startup a UpdateCheck is done
chg: changed again some internals to handle lost of internet connection while
playing seems to be working now!
chg: changed again some internals to handle lost of internet connection while
playing still not finished yet
fix: changed some internals to prevent hanging of the screenbar if you are
going offline while playing a stream
[xx-Jun-19: reported by Neil Pearson]
new: show the current station/state/metatitle in the StreamInfo window
new: show recording infos in the StreamInfo window
chg: changing to a new state (play, stop, rec) is now "animated"
chg: there is now only one bubble at a time visible, no more overlapping
bubbles only the "Listening to .." bubble can coexist
fix: stopping of the recording stream wasn't recognized, if the you are not
listening to any station
fix: convert any ":" or "/" in station's name to "_"
fix: the recording bubbles were only shown on the first screen not the current
and so the color of sbar icon wasn't refreshed correctly on other screens
Note: it could still occur that the color stays green (until next redraw
of the sbar icon), if you switch the screen after you stopped recording
but before recording really stopped!
Just force a redraw by f.e. clicking on it, switching screen or so.
new: if a word in metainfo-title has two successive uppercase chars, convert
the rest of the word to lower case (Berliner Rundfunk uses all upper
chg: changed the way to recognize if the record-stream stopped (faster)
chg: now check every 3 seconds for a new metainfo
fix: this sbar should be now more robust, when closing screens while playing
fix: if you change the station, but the new station fails to play, the color
of the icon wasn't correct
chg: checking metainfo and testing if the playing/recording stream stopped
is now done in a slave object, so it doesn't blocks the screenbar
because checking if the recorded stream stopped takes several seconds
chg: starting/stoping the recording stream is now done in a slave object, so
it doesn't blocks the screenbar
fix: the detection if the recording stream stopped didn't worked
chg: the format of the date in the recorded filename is now "dd-mm-yy",
because f.e. in the UK, the date format is "dd/mm/yyyy", and "/" isn't
allowed in filenames
[15-Apr-19: reported by Neil Pearson]
14-Apr-2019, bumped to v1.0
chg: the format of the date in the recorded filename is now the default for
your locale, not (yy-mmm-dd)
new: while recording, the ShortHelp now shows the time the recording started
chg: changed the way to retrieve the MetaInfo
new: while recording, the ShortHelp shows the filesize of a recorded stream
new: recognises if the playing or recording stream has stopped
new: added a prefs item to en-/disable display of the metatitle
chg: removed the ID3tag.demuxer object, as MMETA_TITLE is now available from
fix: if you change the name of the currently playing station and then press
"Apply", the menu item of that station wasn't then disabled
new: added two prefs items to enable changing the colour of the icon while
playing and recording
chg: the "Stream Buffer n" task is renamed to "WebRadio Play StreamBuffer"
chg: the "Audio Output n" task is renamed to "WebRadio AudioOutput"
chg: the "Stream Buffer n" task for recording is renamed to
"WebRadio Rec StreamBuffer"
chg: the "File Output n" task for recording is renamed to
"WebRadio Rec FileOutput"
chg: raised the "Stream Buffer" tasks priority from 0 to 1
(proposed in the autodocs for realtime buffering)
chg: raised the "File Output" tasks priority from -1 to 1
(proposed in the autodocs for realtime buffering)
fix: global current metatitle is reset when changing to a new radio station
new: the Name sting gadget is activated after pressing the "New" button
fix: forgot to dispose of the Play objects after stopping, which is not so
problematic, as they were disposed at the end or when playing restarted
fix: if you remove the sbar while metaTitle bubble is open, it wasn't closed
- new: A check every 5 seconds is done to find if a new MMETA_Title is in the
stream, if yes it is shown in a "bubble"
- fix: the MetaTitle bubble will be shown on the current screen
- chg: the current MetaTitle is now also shown in the ShortHelp bubble
- chg: the filename of the recorded stream now gets the time and date appended
- chg: the list entries of the StationsList are now changed while typing not
only after pressing RETURN
- new: the Shorthelp bubble now shows which station you are listening to and
also from which station you are recording.
- new: added a id3tag.demuxer object to the pipe, but it seems so that the
shoutcast.demuxer has the same MetaData!?
- fix: the Shorthelp-bubble of my sbar is now the same an all screens
- fix: the sbar image on all screens is now recolored if the state has changed
(stopped/playing/recording), not only on the active screen
03/04-Apr-2019, bumped to v0.9
- new: added recording of the station you are currently listening to!
- new: added a prefs item for choosing the path where the recordings are saved,
the filename is the name of the radio station
- new: while playing the titlebar image is green!
- new: while recording the titlebar image is red!
- new: the station-list is now drag sortable
- fix: the string gagdets are disabled if no station is selected
- the screenbar image is now automatically converted to negative, if the
background is dark
- changed column order in the Edit Stations listview, now "Name, Icon, Stream"
- the value for the attr "ice-audio-info" seems to be a little different than
for "icy-audio-info", I use this template now "ice-channels=channels/A/K/N,
- if there is no "ic(e|y)-audio-info" attr, use "icy-br" and "icy-sr" for the
- delete the "connected" bubble before showing the "connecting" bubble
- added a StreamInfo window, to show some icy attributes of the playing song
- A "connected" bubble is displayed with the name of the station, samplerate,
bitrate, and number of channels!
15-Aug-2018, bumped to v0.5
- "New" doesn't add the new entry AFTER the current or at the end if there is
no entry selected
- the new entry will be selected
- MM_WebRadio_StationsSave now saves the entries from the listview NOT the
- added "Apply" button to re-create the pop-up menu and internal stations list
- put the Channels prefs in its own window, not in SBar prefs - not finished!
- added showing a bubble while connecting
- added some gfx for the sbar (sys:Data/Screenbar/NetRadio/NetRadio_xx.png)
- added (hardcoded) support for the station image in the pop-up menu
- started to merge example_sbar.c and cgmRadio.c into NetRadio.sbar