···
RadioStation g_stations[] = {
30
-
{14.230f, "SomaFM Groove", "Downtempo and chillout", "http://ice1.somafm.com/groovesalad-128-mp3"},
31
-
{15.770f, "Radio Paradise", "Eclectic music mix", "http://stream.radioparadise.com/mp3-128"},
32
-
{17.895f, "Jazz Radio", "Smooth jazz", "http://jazz-wr04.ice.infomaniak.ch/jazz-wr04-128.mp3"},
33
-
{21.500f, "Classical Music", "Classical radio", "http://stream.wqxr.org/wqxr"},
30
+
{10.230f, "SomaFM Groove", "Downtempo and chillout", "http://ice1.somafm.com/groovesalad-128-mp3"},
31
+
{11.470f, "WBGO Jazz88", "Jazz from Newark", "http://wbgo.streamguys.net/wbgo128"},
32
+
{12.650f, "Radio Paradise", "Eclectic music mix", "http://stream.radioparadise.com/mp3-128"},
33
+
{13.890f, "Classical Music", "Classical radio", "http://stream.wqxr.org/wqxr"},
34
+
{15.120f, "Jazz Radio", "Smooth jazz", "http://jazz-wr04.ice.infomaniak.ch/jazz-wr04-128.mp3"},
35
+
{16.350f, "FIP", "Eclectic French radio", "http://direct.fipradio.fr/live/fip-midfi.mp3"},
36
+
{18.810f, "TSF Jazz", "French jazz radio", "http://tsfjazz.ice.infomaniak.ch/tsfjazz-high.mp3"},
37
+
{20.040f, "Dublab", "Electronic and experimental", "http://dublab.out.airtime.pro:8000/dublab_a"},
38
+
{21.270f, "BBC World Service", "Global news and culture", "http://stream.live.vc.bbcmedia.co.uk/bbc_world_service"},
39
+
{23.730f, "WFMU", "Freeform experimental radio", "http://stream0.wfmu.org/freeform-128k"},
40
+
{24.960f, "ChillHop Music", "Lo-fi hip hop", "http://ice1.somafm.com/fluid"},
41
+
{27.420f, "Worldwide FM", "Global music discovery", "http://worldwidefm.out.airtime.pro:8000/worldwidefm_a"},
#define NUM_STATIONS (sizeof(g_stations) / sizeof(RadioStation))
···
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) {
// Don't allocate console by default - will be toggled via menu
const char* CLASS_NAME = "ShortwaveRadio";
···
// Main panel with simplified metallic gradient effect
RECT panel = {10, 10, rect->right - 10, rect->bottom - 10};
// Simplified gradient effect with fewer steps
for (int i = 0; i < 8; i++) {
···
RadioStation* currentStation = FindNearestStation(g_radio.frequency);
if (currentStation && g_radio.signalStrength > 30) {
RECT stationRect = {50, 320, 550, 360};
// Winamp-style display background
HBRUSH displayBrush = CreateSolidBrush(RGB(0, 0, 0));
FillRect(hdc, &stationRect, displayBrush);
···
HPEN lightBorderPen = CreatePen(PS_SOLID, 1, RGB(64, 64, 64));
HPEN darkBorderPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
SelectObject(hdc, darkBorderPen);
MoveToEx(hdc, stationRect.left, stationRect.bottom, NULL);
LineTo(hdc, stationRect.left, stationRect.top);
LineTo(hdc, stationRect.right, stationRect.top);
SelectObject(hdc, lightBorderPen);
LineTo(hdc, stationRect.right, stationRect.bottom);
LineTo(hdc, stationRect.left, stationRect.bottom);
DeleteObject(lightBorderPen);
DeleteObject(darkBorderPen);
···
void DrawFrequencyDisplay(HDC hdc, int x, int y, float frequency) {
// Winamp-style LCD display with beveled edges
RECT display = {x - 100, y - 25, x + 100, y + 25};
HBRUSH blackBrush = CreateSolidBrush(RGB(0, 0, 0));
FillRect(hdc, &display, blackBrush);
···
sprintf(freqText, "%.3f MHz", frequency);
SetBkMode(hdc, TRANSPARENT);
// Create glow effect by drawing text multiple times with slight offsets
HFONT lcdFont = CreateFont(20, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE,
DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
···
void DrawSignalMeter(HDC hdc, int x, int y, int strength) {
// Winamp-style meter background with bevel
RECT meter = {x, y, x + 80, y + 20};
HBRUSH meterBrush = CreateSolidBrush(RGB(16, 16, 16));
FillRect(hdc, &meter, meterBrush);
···
void DrawVUMeter(HDC hdc, int x, int y, float leftLevel, float rightLevel) {
// Winamp-style VU meter with classic look
RECT meterBg = {x, y, x + 80, y + 40};
HBRUSH bgBrush = CreateSolidBrush(RGB(16, 16, 16));
FillRect(hdc, &meterBg, bgBrush);
···
int leftWidth = (int)(leftLevel * 65);
RECT leftBar = {x + 8, y + 12, x + 8 + leftWidth, y + 17};
// Determine color based on level
if (leftLevel > 0.8f) leftColor = RGB(255, 64, 64); // Red
···
int rightWidth = (int)(rightLevel * 65);
RECT rightBar = {x + 8, y + 22, x + 8 + rightWidth, y + 27};
// Determine color based on level
if (rightLevel > 0.8f) rightColor = RGB(255, 64, 64); // Red
···
// Extract left and right channel levels and apply volume scaling
float rawLeft = (float)LOWORD(level) / 32768.0f;
float rawRight = (float)HIWORD(level) / 32768.0f;
// Apply the same volume scaling as the actual audio output
float streamVolume = g_radio.volume * (g_radio.signalStrength / 100.0f);
g_audio.vuLevelLeft = rawLeft * streamVolume;
···
// Apply static volume scaling
float staticVolume = (100.0f - g_radio.signalStrength) / 100.0f;
float scaledStaticVolume = g_radio.volume * staticVolume * g_audio.staticVolume;
// Ensure minimum static when radio is on but no strong signal
if (g_radio.power && g_radio.signalStrength < 50.0f) {
scaledStaticVolume = fmax(scaledStaticVolume, g_radio.volume * 0.1f);