About / What is BIRadio
-----------------------

BIRadio is a high-end internet radio frontend using fmodex from Firelight
Technologies. The primary reason for writing this little app was to have a very
simple internet radio player that automatically reconnects if the stream
'starves' or a disconnect occurs. It was originaly developed for Partyservice
Falk, but always intendet to be adoptable for other internet radio stations.

All stuff needed for branding is stored as resources (dialogs, stringtable,
icons), you will find further information in 'Branding'


As long there are bugs or requests, BIRadio is under development. The latest
official version can be found at http://www.ctuser.net. For suggestions,
questions, requests or bug reports, send eMail to info@ctuser.net.
  
The executable without any resources (without any resource section at all) is
about 10kb, entirely written in extreme assembly style.

This document will give you additional information of BIRadio.

Requirements
------------

This player is written in assembly, and therefore has no special runtime
requirements, but it uses some libraries:
    * kernel32
    * user32
    * advapi
    * version  (to show up the version as set in the resource)
    * shell32  (for launching browser)
    * comctl32 (for the up/down control, should work with any version)
    * msvcrt (required by FMOD Ex only, see below)
    * fmodex (which may require some more dlls; For older Windows versions you
      may need msvcrt.dll; Note that fmodex currently does not support Windows
      95 due a few missing APIs). Please choose your fmodex version carefully,
      because some versions may not work properly.

Features:
 * Unicode aware (GUI mostly, URLs etc are ANSI only and are threaded as such)
 * Extreme small and fast (extreme coding style, and even code, import and data
   sections are combined)
 * Non-blocking handling (FMOD Ex feature)
 * Automatic reconnect
 * All branding relevant stuff is found in the resources

Copying / License / ...
-----------------------

Please note that fmodex has different a different license, check their homepage
if you plan to use it for your own project/branded version.



BIRadio is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA  02111-1307  USA

If you have any questions, suggestions or bug reports about this product,
contact me: info@ctuser.net

Branding
--------

There are plenty of ways where to replace the resources; The perhaps simplest
way is to use a resource tool/editor that can directly edit the resources of the
executable.

For advanced developers: Consider that when assembling, flat assembler uses the
resource file (.res). If you work with the resource script (.rc) you have to
build the resource file (.res). Also note the resource script currently does not
include the icon, because older versions do not support compressed icons.

So what do you do? Well you can modify the resources any way you like.

Dialogs:
  BIRadio uses two dialogs, the 'main' dialog and the info dialog; There are no
  controls generated at runtime. This dialogs consist of different controls:
   - controls relevant to the program. This have an ID so the program can
     identify them; So you can fully edit this controls, doing so may result in
     program missbehavior. Typically you first get familiar with the existing
     controls and what they do; Then you choose to resize, move, hide or even
     delete controls. Try not to make controls too small, or text within may be
     displayed trunctated etc.
   - controls that are not relevant to the program. This usually do not have an
     ID and typically ignored by the program. These are typically of the class
     'STATIC', like icons, bitmaps, and strings. You can add and play around
     with those as you like.
  When modifing, always consider this:
   - Do not use the same ID for multiple controls.
   - Check controls do not overlap by accident, or some text etc. may not be
     fully visible.
   - The controls typically use the colors the user set in the display
     properties. For using custom fore/background colors, best use an bitmap
     instead.
   - To add icons, first add the icon itself to the resources (you specify a
     resource ID, or the editor sets one). Then open the dialog and add a new
     'STATIC'; For name, enter the resource ID of the icon, and select/check
     'SS_ICON' in the styles. 16x16 icons are typically size 10x10 (resources
     do not measure in pixels), 32x32 are 20x20...
     You can use the icons in the resource multiple times in all (both) dialogs.
   - To add bitmaps: Similar like adding icons (see above), however you add a
     bitmap to the resources, and select/check 'SS_BITMAP' instead of 'SS_ICON'.
   - You can reduce size by using optimized indexed bitmaps and icons. Typically
     the icons, esp. the Vista icon require most of the size of the final
     executable.

BIRadio specific resource infos:
 - The volume control consists of an up down where you change the volume, and a
   'STATIC' vor displaying. Typical windows sliders were not used because they
   do not have a transparent background.
 - It supports unicode (when run on NT series only; otherwise Ansi is used
   for compatibility), but with these restrictions:
    - URLs (string 10, and (optional) 20 to 24)
    - (Optional) string 11, which specifies a subkey for the registry (see below)
 - Strings will be trunctated if longer than ~127 chars (or ~255 chars when Ansi
   is used); Internet addresses are always used as Ansi (so max ~255 chars)
 - String 5 is followed by the percentage of buffer; Maybe future versions will
   support some formating options.
 - String resource 11 specifies The subkey within HKEY_CURRENT_USER\Software.
   This string is always used as ANSI
   If not defined, ctuser\BIRadio is used.
 - String resource 20 is default homepage, triggered by button ID 8;
   String resource 21-24 homepages are triggered by button IDs 1-4.
   This buttons are optional and not all buttons/strings may be present;
   Add/Remove as demanded.
 - If the dialog cannot load at all, the player will exit immediatelly, same if
   the URL string resource cannot be used.

Version history
---------------

1.00b build 2011.11.07
 - Added compatibility fix for FMODEx v4.33.06+

1.00a build 2009.11.17
 - Fixed close button ID on german info dialog
