27#define NRSC5_SCAN_BEGIN 87.9e6
28#define NRSC5_SCAN_END 107.9e6
29#define NRSC5_SCAN_SKIP 0.2e6
31#define NRSC5_MIME_PRIMARY_IMAGE 0xBE4B7536
32#define NRSC5_MIME_STATION_LOGO 0xD9C72536
33#define NRSC5_MIME_NAVTEQ 0x2D42AC3E
34#define NRSC5_MIME_HERE_TPEG 0x82F03DFC
35#define NRSC5_MIME_HERE_IMAGE 0xB7F03DFC
36#define NRSC5_MIME_HD_TMC 0xEECB55B6
37#define NRSC5_MIME_HDC 0x4DC66C5A
38#define NRSC5_MIME_TEXT 0xBB492AAC
39#define NRSC5_MIME_JPEG 0x1E653E9C
40#define NRSC5_MIME_PNG 0x4F328CA0
41#define NRSC5_MIME_TTN_TPEG_1 0xB39EBEB2
42#define NRSC5_MIME_TTN_TPEG_2 0x4EB03469
43#define NRSC5_MIME_TTN_TPEG_3 0x52103469
44#define NRSC5_MIME_TTN_STM_TRAFFIC 0xFF8422D7
45#define NRSC5_MIME_TTN_STM_WEATHER 0xEF042E96
46#define NRSC5_MIME_UNKNOWN_00000000 0x00000000
47#define NRSC5_MIME_UNKNOWN_1C7D0E29 0x1C7D0E29
48#define NRSC5_MIME_UNKNOWN_B81FFAA8 0xB81FFAA8
49#define NRSC5_MIME_UNKNOWN_FFFFFFFF 0xFFFFFFFF
51#define NRSC5_AUDIO_FRAME_SAMPLES 2048
53#define NRSC5_SAMPLE_RATE_CU8 1488375
54#define NRSC5_SAMPLE_RATE_CS16_FM 744187.5
55#define NRSC5_SAMPLE_RATE_CS16_AM 46511.71875
56#define NRSC5_SAMPLE_RATE_AUDIO 44100
58#define NRSC5_DEVICE_VERSION_LENGTH 4
62#define NRSC5_API __declspec(dllexport)
81 NRSC5_SIG_COMPONENT_AUDIO,
82 NRSC5_SIG_COMPONENT_DATA
87 NRSC5_AAS_TYPE_STREAM = 0,
88 NRSC5_AAS_TYPE_PACKET = 1,
89 NRSC5_AAS_TYPE_LOT = 3
130 NRSC5_SIG_SERVICE_AUDIO,
131 NRSC5_SIG_SERVICE_DATA
164 NRSC5_EVENT_LOST_DEVICE,
167 NRSC5_EVENT_LOST_SYNC,
178 NRSC5_EVENT_AUDIO_SERVICE,
179 NRSC5_EVENT_STATION_ID,
180 NRSC5_EVENT_STATION_NAME,
181 NRSC5_EVENT_STATION_SLOGAN,
182 NRSC5_EVENT_STATION_MESSAGE,
183 NRSC5_EVENT_STATION_LOCATION,
184 NRSC5_EVENT_AUDIO_SERVICE_DESCRIPTOR,
185 NRSC5_EVENT_DATA_SERVICE_DESCRIPTOR,
186 NRSC5_EVENT_EMERGENCY_ALERT,
187 NRSC5_EVENT_HERE_IMAGE,
188 NRSC5_EVENT_LOT_HEADER,
189 NRSC5_EVENT_LOT_FRAGMENT,
191 NRSC5_EVENT_EXCITER_INFO,
192 NRSC5_EVENT_IMPORTER_INFO,
193 NRSC5_EVENT_LEAP_SECOND_OFFSET,
194 NRSC5_EVENT_LOCAL_TIME,
200 NRSC5_ACCESS_RESTRICTED
205 NRSC5_PROGRAM_TYPE_UNDEFINED = 0,
206 NRSC5_PROGRAM_TYPE_NEWS = 1,
207 NRSC5_PROGRAM_TYPE_INFORMATION = 2,
208 NRSC5_PROGRAM_TYPE_SPORTS = 3,
209 NRSC5_PROGRAM_TYPE_TALK = 4,
210 NRSC5_PROGRAM_TYPE_ROCK = 5,
211 NRSC5_PROGRAM_TYPE_CLASSIC_ROCK = 6,
212 NRSC5_PROGRAM_TYPE_ADULT_HITS = 7,
213 NRSC5_PROGRAM_TYPE_SOFT_ROCK = 8,
214 NRSC5_PROGRAM_TYPE_TOP_40 = 9,
215 NRSC5_PROGRAM_TYPE_COUNTRY = 10,
216 NRSC5_PROGRAM_TYPE_OLDIES = 11,
217 NRSC5_PROGRAM_TYPE_SOFT = 12,
218 NRSC5_PROGRAM_TYPE_NOSTALGIA = 13,
219 NRSC5_PROGRAM_TYPE_JAZZ = 14,
220 NRSC5_PROGRAM_TYPE_CLASSICAL = 15,
221 NRSC5_PROGRAM_TYPE_RHYTHM_AND_BLUES = 16,
222 NRSC5_PROGRAM_TYPE_SOFT_RHYTHM_AND_BLUES = 17,
223 NRSC5_PROGRAM_TYPE_FOREIGN_LANGUAGE = 18,
224 NRSC5_PROGRAM_TYPE_RELIGIOUS_MUSIC = 19,
225 NRSC5_PROGRAM_TYPE_RELIGIOUS_TALK = 20,
226 NRSC5_PROGRAM_TYPE_PERSONALITY = 21,
227 NRSC5_PROGRAM_TYPE_PUBLIC = 22,
228 NRSC5_PROGRAM_TYPE_COLLEGE = 23,
229 NRSC5_PROGRAM_TYPE_SPANISH_TALK = 24,
230 NRSC5_PROGRAM_TYPE_SPANISH_MUSIC = 25,
231 NRSC5_PROGRAM_TYPE_HIP_HOP = 26,
232 NRSC5_PROGRAM_TYPE_WEATHER = 29,
233 NRSC5_PROGRAM_TYPE_EMERGENCY_TEST = 30,
234 NRSC5_PROGRAM_TYPE_EMERGENCY = 31,
235 NRSC5_PROGRAM_TYPE_TRAFFIC = 65,
236 NRSC5_PROGRAM_TYPE_SPECIAL_READING_SERVICES = 76
248 NRSC5_LOCATION_FORMAT_SAME,
249 NRSC5_LOCATION_FORMAT_FIPS,
250 NRSC5_LOCATION_FORMAT_ZIP
255 NRSC5_ALERT_CATEGORY_NON_SPECIFIC = 1,
256 NRSC5_ALERT_CATEGORY_GEOPHYSICAL = 2,
257 NRSC5_ALERT_CATEGORY_WEATHER = 3,
258 NRSC5_ALERT_CATEGORY_SAFETY = 4,
259 NRSC5_ALERT_CATEGORY_SECURITY = 5,
260 NRSC5_ALERT_CATEGORY_RESCUE = 6,
261 NRSC5_ALERT_CATEGORY_FIRE = 7,
262 NRSC5_ALERT_CATEGORY_HEALTH = 8,
263 NRSC5_ALERT_CATEGORY_ENVIRONMENTAL = 9,
264 NRSC5_ALERT_CATEGORY_TRANSPORTATION = 10,
265 NRSC5_ALERT_CATEGORY_UTILITIES = 11,
266 NRSC5_ALERT_CATEGORY_HAZMAT = 12,
267 NRSC5_ALERT_CATEGORY_TEST = 30
272 NRSC5_HERE_IMAGE_TRAFFIC = 8,
273 NRSC5_HERE_IMAGE_WEATHER = 13
301 NRSC5_SERVICE_DATA_TYPE_NON_SPECIFIC = 0,
302 NRSC5_SERVICE_DATA_TYPE_NEWS = 1,
303 NRSC5_SERVICE_DATA_TYPE_SPORTS = 3,
304 NRSC5_SERVICE_DATA_TYPE_WEATHER = 29,
305 NRSC5_SERVICE_DATA_TYPE_EMERGENCY = 31,
306 NRSC5_SERVICE_DATA_TYPE_TRAFFIC = 65,
307 NRSC5_SERVICE_DATA_TYPE_IMAGE_MAPS = 66,
308 NRSC5_SERVICE_DATA_TYPE_TEXT = 80,
309 NRSC5_SERVICE_DATA_TYPE_ADVERTISING = 256,
310 NRSC5_SERVICE_DATA_TYPE_FINANCIAL = 257,
311 NRSC5_SERVICE_DATA_TYPE_STOCK_TICKER = 258,
312 NRSC5_SERVICE_DATA_TYPE_NAVIGATION = 259,
313 NRSC5_SERVICE_DATA_TYPE_ELECTRONIC_PROGRAM_GUIDE = 260,
314 NRSC5_SERVICE_DATA_TYPE_AUDIO = 261,
315 NRSC5_SERVICE_DATA_TYPE_PRIVATE_DATA_NETWORK = 262,
316 NRSC5_SERVICE_DATA_TYPE_SERVICE_MAINTENANCE = 263,
317 NRSC5_SERVICE_DATA_TYPE_HD_RADIO_SYSTEM_SERVICES = 264,
318 NRSC5_SERVICE_DATA_TYPE_AUDIO_RELATED_DATA = 265,
319 NRSC5_SERVICE_DATA_TYPE_RESERVED_FOR_SPECIAL_TESTS = 511
359 NRSC5_PKT_FLAGS_NONE = 0,
360 NRSC5_PKT_FLAGS_CRC_ERROR = 1 << 0,
509 const char *country_code;
520 const uint8_t *alert_cnt;
521 int alert_cnt_length;
524 int alert_location_format;
525 int alert_num_locations;
526 const int *alert_locations;
529 const char *country_code;
559 const uint8_t *control_data;
560 int control_data_length;
565 const int *locations;
605 } leap_second_offset;
NRSC5_API int nrsc5_open_rtltcp(nrsc5_t **st, int socket)
NRSC5_API int nrsc5_set_frequency(nrsc5_t *st, float freq)
NRSC5_API int nrsc5_set_mode(nrsc5_t *st, int mode)
struct nrsc5_t nrsc5_t
Definition nrsc5.h:632
NRSC5_API int nrsc5_set_freq_correction(nrsc5_t *st, int ppm_error)
NRSC5_API int nrsc5_pipe_samples_cu8(nrsc5_t *st, const uint8_t *samples, unsigned int length)
NRSC5_API int nrsc5_open_pipe(nrsc5_t **st)
NRSC5_API int nrsc5_pipe_samples_cs16(nrsc5_t *st, const int16_t *samples, unsigned int length)
NRSC5_API void nrsc5_alert_category_name(unsigned int category, const char **name)
NRSC5_API void nrsc5_get_version(const char **version)
NRSC5_API void nrsc5_program_type_name(unsigned int type, const char **name)
NRSC5_API void nrsc5_service_data_type_name(unsigned int type, const char **name)
NRSC5_API void nrsc5_close(nrsc5_t *st)
NRSC5_API int nrsc5_set_gain(nrsc5_t *st, float gain)
NRSC5_API void nrsc5_set_auto_gain(nrsc5_t *st, int enabled)
NRSC5_API int nrsc5_set_bias_tee(nrsc5_t *st, int on)
NRSC5_API void nrsc5_stop(nrsc5_t *st)
NRSC5_API int nrsc5_open(nrsc5_t **st, int device_index)
NRSC5_API void nrsc5_get_frequency(nrsc5_t *st, float *freq)
#define NRSC5_DEVICE_VERSION_LENGTH
Definition nrsc5.h:58
NRSC5_API int nrsc5_open_file(nrsc5_t **st, FILE *fp)
NRSC5_API void nrsc5_start(nrsc5_t *st)
void(* nrsc5_callback_t)(const nrsc5_event_t *evt, void *opaque)
Definition nrsc5.h:625
NRSC5_API void nrsc5_get_gain(nrsc5_t *st, float *gain)
NRSC5_API int nrsc5_set_direct_sampling(nrsc5_t *st, int on)
NRSC5_API void nrsc5_set_callback(nrsc5_t *st, nrsc5_callback_t callback, void *opaque)
int pli
Definition nrsc5.h:415
unsigned int blend_control
Definition nrsc5.h:500
int is_final
Definition nrsc5.h:584
unsigned int bytes_so_far
Definition nrsc5.h:489
int current_offset
Definition nrsc5.h:603
float latitude2
Definition nrsc5.h:575
int dst_regional
Definition nrsc5.h:608
float latitude1
Definition nrsc5.h:573
int utc_offset
Definition nrsc5.h:607
int core_status
Definition nrsc5.h:589
unsigned int type
Definition nrsc5.h:498
int digital_audio_gain
Definition nrsc5.h:501
const char * manufacturer_id
Definition nrsc5.h:587
const char * name
Definition nrsc5.h:478
unsigned int codec_mode
Definition nrsc5.h:499
unsigned int lot
Definition nrsc5.h:475
struct tm * expiry_utc
Definition nrsc5.h:480
float gain_db
Definition nrsc5.h:582
unsigned int sound_exp
Definition nrsc5.h:550
unsigned int latency
Definition nrsc5.h:503
int n1
Definition nrsc5.h:570
float longitude2
Definition nrsc5.h:576
int manufacturer_status
Definition nrsc5.h:591
unsigned int size
Definition nrsc5.h:458
float freq_offset
Definition nrsc5.h:413
unsigned int event
Definition nrsc5.h:405
unsigned int seq
Definition nrsc5.h:486
int image_type
Definition nrsc5.h:568
uint16_t port
Definition nrsc5.h:456
unsigned int repeat
Definition nrsc5.h:487
int dst_local
Definition nrsc5.h:609
uint32_t mime_type
Definition nrsc5.h:555
nrsc5_sig_service_t * service
Definition nrsc5.h:461
struct tm * time_utc
Definition nrsc5.h:572
int psmi
Definition nrsc5.h:414
int aabi
Definition nrsc5.h:417
int pending_offset
Definition nrsc5.h:602
int importer_connected
Definition nrsc5.h:592
int seq
Definition nrsc5.h:569
int manufacturer_version[NRSC5_DEVICE_VERSION_LENGTH]
Definition nrsc5.h:590
float peak_dbfs
Definition nrsc5.h:583
unsigned int access
Definition nrsc5.h:497
int rdbi
Definition nrsc5.h:418
int hppi
Definition nrsc5.h:416
int is_duplicate
Definition nrsc5.h:490
int n2
Definition nrsc5.h:571
const uint8_t * data
Definition nrsc5.h:429
uint32_t mime
Definition nrsc5.h:449
unsigned int common_delay
Definition nrsc5.h:502
unsigned int pending_alfn
Definition nrsc5.h:604
float longitude1
Definition nrsc5.h:574
int core_version[NRSC5_DEVICE_VERSION_LENGTH]
Definition nrsc5.h:588
unsigned int program
Definition nrsc5.h:428
int dst_schedule
Definition nrsc5.h:610
nrsc5_sig_component_t * component
Definition nrsc5.h:462
uint32_t mime
Definition nrsc5.h:112
struct nrsc5_sig_component_t::@13::@15 data
uint16_t service_data_type
Definition nrsc5.h:110
uint8_t type
Definition nrsc5.h:101
struct nrsc5_sig_component_t::@13::@16 audio
uint8_t id
Definition nrsc5.h:102
struct nrsc5_sig_component_t * next
Definition nrsc5.h:100
uint16_t port
Definition nrsc5.h:108
uint8_t port
Definition nrsc5.h:117
nrsc5_sig_component_t * audio_component
Definition nrsc5.h:155
nrsc5_sig_component_t * components
Definition nrsc5.h:154
struct nrsc5_sig_service_t * next
Definition nrsc5.h:150
uint8_t type
Definition nrsc5.h:151
uint16_t number
Definition nrsc5.h:152
const char * name
Definition nrsc5.h:153
unsigned int program
Definition nrsc5.h:289
unsigned int sound_exp
Definition nrsc5.h:292
struct nrsc5_sis_asd_t * next
Definition nrsc5.h:288
unsigned int access
Definition nrsc5.h:290
unsigned int type
Definition nrsc5.h:291
struct nrsc5_sis_dsd_t * next
Definition nrsc5.h:331
unsigned int type
Definition nrsc5.h:333
uint32_t mime_type
Definition nrsc5.h:334
unsigned int access
Definition nrsc5.h:332