Welcome to MorphOS-Storage, a webserver dedicated to MorphOS users. ©2016-2023 Meta-MorphOS.org
Description:A sbar plugin to listen to WebRadios
Developer/Porter:Thomas Igracki
Short: A sbar plugin to listen to WebRadios
Kurz: Ein sbar Plugin um WebRadios anzuhören
Author: Thomas Igracki
Uploader: Thomas@Igracki.de
Version: 3.0 beta
Type: util/wb
Architecture: ppc-morphos

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.youtube.com) 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

- 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)

- toggle recording from the currently playing station
- STOP stops the recording
- INFO shows information about the currently recording station (if any)

- stop playing

- mute/unmute

- 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.

LtAddGroup(): do a MakeDir in STATIONICONS directory
and when editing a GroupName or Icon also rename the directory and the icon...
also edit the iconname of ALL children of that group...

- If an icon is still a url, ask the user to download and scale it
- Remove should also remove the icon!
- When downloading an icon, change the suffix to png if neccessary
- add a way to check if there are any unused icons around...

When moving an entry in EditStations also rename the icon to the new location
NOTE: if you don't save the list after moving entries to other subdirs,

chg: adaption to new csv format

chg: don't delete the icons, move them to
fix: SearchStations: if no criteria were given, codec wasn't set to mp3 only

chg: EditStations: only rename/move the icons if you save the list
new: ARexx: if the PLAY command didn't finds the station it tries to find it
w/o the subdir name
i.e. "Play Radio Paradiso" if the stationname is "Radio/Radio Paradiso"

new: EditStations: when adding a new station from the SearchWindow, the icon
will be downloaded, scaled to 32x20 and saved to the correct path
new: EditStations: moving an entry automatically renames the icon too!
So be sure to save the list after moving entries to other subdirs!

chg: don't set the envvar WebRadio_LastStation when testing a station
chg: use "_empty.png" (a 32x20 alpha png) if the station icon doesn't exists
chg: SearchStations: convert the languages to lower case
chg: SearchStations: convert the countries first char to upper case the rest
to lower case

chg: SearchStations: Aborting the download, now displays already dowloaded
stations instead of showing an error
chg: SearchStations: Url column is now hidden as default
fix: SearchStations: if no criterias were used, limit didn't worked

new: EditStations: added support for limiting the search result

new: EditStations: a "Test" button for test hearing the current station
new: SearchStations: a "Test" button for test hearing the current station
fix: SearchWin: add support for double double-quotes and very long lines in
the downloaded radio station list
fix: don't close the EditStations window if another screen gets closed
fix: don't close the StreamInfo window if another screen gets closed

new: a SearchWindow to search for radio stations, powered by radio-browser.info

fix: EditStations: enable the Apply-Button, if you move one entry up/down
fix: the first station couldn't be started
new: added minimal support for m3u urls. The first url found will be played

chg: EditStations: the name of the imported listnode changed from "Imported"
to the name of the file

chg: EditStations: window width/height will now defaults to 40% of the
visible screen area on first start

chg: don't open the PopupMenu while we are in connecting phase
chg: if connecting takes too long, you can abort by pressing RMB over the icon

chg: EditStations: rewrote ListtreeMoveUp/Down, should work better

fix: EditStations: group icons weren't shown in the PopupMenu
new: EditStations: also show the iconname for a group entry
new: EditStations: show the icon on the right side

chg: EditStations: adding a group if the active entry is a closed group,
adds the new group right after the current entry, instead of opening it
and adding it at the bottom
chg: EditStations: adding a station if the active entry is a opened group,
adds the new station at the head instead of the tail of the group
fix: EditStations: Apply could create a wrong PopupMenu

fix: multiple sub groups didn't worked, should work now

chg: Don't close the StreamInfo window, if you change a station
new: Automatically choose images for the group names from the parent dir
of the station icons
You have to put the images of the stations in a subdir, then the group
will get the icon of the parent dir as icon in the popup-menu

fix: Move-Up/Down didn't worked if the prev/next was an empty listnode
fix: handle a too high number of Stations in the Stations.txt

chg: addded PlaceHolder strings for the string gadgets in the StationEditor

fix: calling an arexx cmd w/o arguments, causes a mungwall hit
fix: stations which started with a number (i.e. 80er), were treated as an
index number in the PLAY arexx cmd
chg: now the PLAY arexx cmd ignores the case of the station names

new: added arexx cmd "REC STOP/S,INFO/S" to control recording via arexx

chg: the "Load..." button can now import stations from a custom list
fix: disable the "Apply" button after applying entries to the popup-menu

fix: submenus weren't removed, after re-loading the stations ("Load" button)
fix: the "Load" button just removed menuitems not disposed them, sorry;)

new: stations can be grouped in submenus, simply use "/" inbetween names,
submenus are automatically created, f.e. M1.FM/Charts
TODO, use a listtree in the StationsEditor
[suggested by Stefanos Karousos]
chg: the http stream process now is now named "WebRadio HttpStream"

fix: recording a stream while playing didn't updated the current title
fix: make sure the RecStation-Icon fits in the str-gadget (StreamInfo)

29-Okt-2020, v2.3
fix: fixed a crash when quitting Wayfarer on an own screen

31-Aug-2020, v2.2
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

07-Aug-2020, v2.1
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]

02-Aug-2020, v2.0
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
also included

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
the window
new: show the bitrate, samplerate and number of channels in the "Station:"
text field

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

10-Jan-2020, v1.11
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
gets closed
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

02-Okt-2019, v1.10
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

01-Okt-2019, v1.9
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

03-Aug-2019, v1.8
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

02-Aug-2019, v1.7
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

31-Jul-2019, v1.6
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

24-Jul-2019, v1.5
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

21-Jul-2019, v1.4
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

15-Jul-2019, v1.3
fix: fixed some deadlock when changing the radio station
new: 60 seconds after startup a UpdateCheck is done

10-Jul-2019, v1.2
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
case chars!)

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
or recording

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
"connected" bubble
- 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
internal stations!
- 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

Upload Date:May 31 2023
Size:263 KB
Last Comments
08 Jun 2023
Le programme se bloque sur certaines radios mais en attendant il se débloque ensuite. Néanmoins, dans le court readme il indique 'version 3.0 beta'. Peut-être suivra une version plus stable.
02 Jun 2023
apres une utilisation intensive pour etre sur rebloque finalement
02 Jun 2023
de base freeze aussi avec morphos3.18 sinon marche parfaitement pour le moment avec une amelioration a determiner
pour ma part pour le moment