summaryrefslogtreecommitdiff
path: root/protocols/mRadio/i_vars.inc
blob: 26e7024cc15b7a47635424bcd9d14944c75f7da1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{used variables}

{$include m_radio.inc}

const
  optActiveCodec:PAnsiChar = 'ActiveCodec';
  optLastStn    :PAnsiChar = 'LastStation';
  optConnect    :PAnsiChar = 'AutoConnect';
  optAutoMute   :PAnsiChar = 'AutoMute';
  optEQ_OFF     :PAnsiChar = 'eqoff';
  optStatusMsg  :PAnsiChar = 'StatusMsg';
  optCurElement :PAnsiChar = 'LastPlayed';
  optPlayFirst  :PAnsiChar = 'PlayFromFirst'; 
  optActiveURL  :PAnsiChar = 'ActiveURL';
  optContRec    :PAnsiChar = 'ContRec';
  optLoop       :PAnsiChar = 'Loop';
  optShuffle    :PAnsiChar = 'Shuffle';
  optRecPath    :PAnsiChar = 'RecordPath';
  optStatus     :PAnsiChar = 'Status';
  optVolume     :PAnsiChar = 'Volume';
  optBuffer     :PAnsiChar = 'Buffer';
  optPreBuf     :PAnsiChar = 'PreBuf';
  optTimeout    :PAnsiChar = 'Timeout';
  optVersion    :PAnsiChar = 'version';
  optStatusTmpl :PAnsiChar = 'StatusTmpl';
  optNumTries   :PAnsiChar = 'NumTries';
  optOffline    :PAnsiChar = 'asOffline';
  // mRadio compatibility
  optStationURL :PAnsiChar = 'StationURL';
  optMyHandle   :PAnsiChar = 'MyHandle';
  optGenre      :PAnsiChar = 'Genre';
  optBitrate    :PAnsiChar = 'Bitrate';
  // UserInfo compatibility
  optFirstName  :PAnsiChar = 'FirstName';
  optNick       :PAnsiChar = 'Nick';
  optLastName   :PAnsiChar = 'LastName';
  optAge        :PAnsiChar = 'Age';
  // 3D sound support
  optEAXType    :PAnsiChar = 'EAXtype';
  optForcedMono :PAnsiChar = 'ForcedMono';

  optGroup      :PAnsiChar = 'Group';
  optBASSPath   :PAnsiChar = 'BASSpath';
  optTitle      :PAnsiChar = 'Title';
  optArtist     :PAnsiChar = 'Artist';

var
  hhRadioStatus,
  // service handles
  hsPlayStop,
  hsRecord,
  hsSettings,
  hsSetVol,
  hsGetVol,
  hsMute,
  hsCommand,
  hsExport,
  hsImport,
  hsTrayMenu,
  hsEqOnOff,

  hNetLib,
  hDblClick,
  hHookShutdown,
  hCMenuItemRec,
  hCMenuItemPlay,
  contexthook,
  opthook,
  onsetting,
  ondelete,
  onloadhook:THANDLE;
  hiddenwindow:HWND;
var
  plist:tPlaylist;
//  plFile:pWideChar; // playlist file name (for delete after using?)
//  plLocal:boolean;  // true - no need to delete playlist
var
  RemoteSong:bool;
  gVolume:integer;
  NumTries:cardinal;
  doLoop:cardinal;
  PlayFirst:cardinal;
  doShuffle:cardinal;
  ForcedMono:cardinal;
  doContRec:cardinal;
  AuConnect:cardinal;
  AuMute:cardinal;
  AsOffline:cardinal;
  isEQ_OFF:cardinal;
  PluginStatus:integer;
  storagep,storage:PAnsiChar;
  recpath:pWideChar;
  sBuffer,
  sTimeout,
  sPreBuf:cardinal;
const
  hVolCtrl    :HWND=0;
  hVolFrmCtrl :HWND=0;
const
  {$IFDEF KOL_MCK}
  btnMute:pIcoButton = nil;
  {$ELSE}
  hMuteFrmCtrl:HWND=0;
  {$ENDIF}
const
  Inited:boolean=false;
const
  StatusTmpl:pWideChar = nil;
  proxy:pAnsiChar = nil;
type
  tEQRec = record
    fx    :HFX;
    wnd   :HWND;
    param :BASS_DX8_PARAMEQ;
    text  :PAnsiChar;
  end;
var
  eq:array [0..9] of tEQRec = (
    (fx:0;wnd:0;param:(fCenter:80   ;fBandwidth:18;fGain:0);text:'80'),
    (fx:0;wnd:0;param:(fCenter:170  ;fBandwidth:18;fGain:0);text:'170'),
    (fx:0;wnd:0;param:(fCenter:310  ;fBandwidth:18;fGain:0);text:'310'),
    (fx:0;wnd:0;param:(fCenter:600  ;fBandwidth:18;fGain:0);text:'600'),
    (fx:0;wnd:0;param:(fCenter:1000 ;fBandwidth:18;fGain:0);text:'1k'),
    (fx:0;wnd:0;param:(fCenter:3000 ;fBandwidth:18;fGain:0);text:'3k'),
    (fx:0;wnd:0;param:(fCenter:6000 ;fBandwidth:18;fGain:0);text:'6k'),
    (fx:0;wnd:0;param:(fCenter:12000;fBandwidth:18;fGain:0);text:'12k'),
    (fx:0;wnd:0;param:(fCenter:14000;fBandwidth:18;fGain:0);text:'14k'),
    (fx:0;wnd:0;param:(fCenter:16000;fBandwidth:18;fGain:0);text:'16k'));
const
  IcoBtnSettings:PAnsiChar = 'Radio_Setting';
  IcoBtnOn      :PAnsiChar = 'Radio_On';
  IcoBtnOff     :PAnsiChar = 'Radio_Off';
  IcoBtnRecUp   :PAnsiChar = 'Radio_RecUp';
  IcoBtnRecDn   :PAnsiChar = 'Radio_RecDn';
  IcoBtnAdd     :PAnsiChar = 'Radio_Add';
  IcoBtnDel     :PAnsiChar = 'Radio_Del';
const
  hRecord      :THANDLE = 0;
  chan         :HSTREAM = 0;
  ActiveContact:THANDLE = 0;
  ActiveURLw   :PWideChar = nil;

type
  TEAXItem = record
    name:PWideChar;
    code:dword;
  end;
const
  EAXItems:array [0..EAX_ENVIRONMENT_COUNT] of TEAXItem=(
    (name:'Off'             ; code:0),
    (name:'Generic'         ; code:EAX_ENVIRONMENT_GENERIC),
    (name:'Padded Cell'     ; code:EAX_ENVIRONMENT_PADDEDCELL),
    (name:'Room'            ; code:EAX_ENVIRONMENT_ROOM),
    (name:'Bathroom'        ; code:EAX_ENVIRONMENT_BATHROOM),
    (name:'Living Room'     ; code:EAX_ENVIRONMENT_LIVINGROOM),
    (name:'Stone Room'      ; code:EAX_ENVIRONMENT_STONEROOM),
    (name:'Auditorium'      ; code:EAX_ENVIRONMENT_AUDITORIUM),
    (name:'Concert Hall'    ; code:EAX_ENVIRONMENT_CONCERTHALL),
    (name:'Cave'            ; code:EAX_ENVIRONMENT_CAVE),
    (name:'Arena'           ; code:EAX_ENVIRONMENT_ARENA),
    (name:'Hangar'          ; code:EAX_ENVIRONMENT_HANGAR),
    (name:'Carpeted Hallway'; code:EAX_ENVIRONMENT_CARPETEDHALLWAY),
    (name:'Hallway'         ; code:EAX_ENVIRONMENT_HALLWAY),
    (name:'Stone Corridor'  ; code:EAX_ENVIRONMENT_STONECORRIDOR),
    (name:'Alley'           ; code:EAX_ENVIRONMENT_ALLEY),
    (name:'Forrest'         ; code:EAX_ENVIRONMENT_FOREST),
    (name:'City'            ; code:EAX_ENVIRONMENT_CITY),
    (name:'Mountains'       ; code:EAX_ENVIRONMENT_MOUNTAINS),
    (name:'Quarry'          ; code:EAX_ENVIRONMENT_QUARRY),
    (name:'Plain'           ; code:EAX_ENVIRONMENT_PLAIN),
    (name:'Parking Lot'     ; code:EAX_ENVIRONMENT_PARKINGLOT),
    (name:'Sewer Pipe'      ; code:EAX_ENVIRONMENT_SEWERPIPE),
    (name:'Under Water'     ; code:EAX_ENVIRONMENT_UNDERWATER),
    (name:'Drugged'         ; code:EAX_ENVIRONMENT_DRUGGED),
    (name:'Dizzy'           ; code:EAX_ENVIRONMENT_DIZZY),
    (name:'Psychotic'       ; code:EAX_ENVIRONMENT_PSYCHOTIC));

type
  tPreset = record
    name  :PWideChar;
    preset:array [0..9] of shortint;
  end;
var
  Presets: array of tPreset;