static int setformat(struct chan_usbradio_pvt *o, int mode);
-static struct ast_channel *usbradio_request(const char *type, int format,
- const struct ast_channel *requestor,
- void *data, int *cause);
+static struct ast_channel *usbradio_request(const char *type, format_t format,
+ const struct ast_channel *requestor,
+ void *data, int *cause);
static int usbradio_digit_begin(struct ast_channel *c, char digit);
static int usbradio_digit_end(struct ast_channel *c, char digit, unsigned int duration);
static int usbradio_text(struct ast_channel *c, const char *text);
{
o->lastrx = 0;
//printf("AST_CONTROL_RADIO_UNKEY\n");
- wf.subclass = AST_CONTROL_RADIO_UNKEY;
+ wf.subclass.integer = AST_CONTROL_RADIO_UNKEY;
ast_queue_frame(o->owner, &wf);
}
else if ((!o->lastrx) && (o->rxkeyed))
{
o->lastrx = 1;
//printf("AST_CONTROL_RADIO_KEY\n");
- wf.subclass = AST_CONTROL_RADIO_KEY;
+ wf.subclass.integer = AST_CONTROL_RADIO_KEY;
if(o->rxctcssdecode)
{
wf.data.ptr = o->rxctcssfreq;
return f;
/* ok we can build and deliver the frame to the caller */
f->frametype = AST_FRAME_VOICE;
- f->subclass = AST_FORMAT_SLINEAR;
+ f->subclass.codec = AST_FORMAT_SLINEAR;
f->samples = FRAME_SIZE;
f->datalen = FRAME_SIZE * 2;
f->data.ptr = o->usbradio_read_buf_8k + AST_FRIENDLY_OFFSET;
if ((f1->frametype == AST_FRAME_DTMF_END) ||
(f1->frametype == AST_FRAME_DTMF_BEGIN))
{
- if ((f1->subclass == 'm') || (f1->subclass == 'u'))
+ if ((f1->subclass.integer == 'm') || (f1->subclass.integer == 'u'))
{
f1->frametype = AST_FRAME_NULL;
- f1->subclass = 0;
+ f1->subclass.integer = 0;
return(f1);
}
if (f1->frametype == AST_FRAME_DTMF_END)
- ast_log(LOG_NOTICE,"Got DTMF char %c\n",f1->subclass);
+ ast_log(LOG_NOTICE, "Got DTMF char %c\n", f1->subclass.integer);
return(f1);
}
}
}
/*
*/
-static struct ast_channel *usbradio_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *usbradio_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause)
{
struct ast_channel *c;
struct chan_usbradio_pvt *o = find_desc(data);
return NULL;
}
if ((format & AST_FORMAT_SLINEAR) == 0) {
- ast_log(LOG_NOTICE, "Format 0x%x unsupported\n", format);
+ ast_log(LOG_NOTICE, "Format 0x%lx unsupported\n", format);
return NULL;
}
if (o->owner) {