return SR_ERR_DATA;
}
-
if (fmt_code == WAVE_FORMAT_PCM) {
} else if (fmt_code == WAVE_FORMAT_IEEE_FLOAT) {
if (unitsize != 4) {
unsigned int offset, i;
offset = initial_offset;
- while(offset < MIN(MAX_DATA_CHUNK_OFFSET, buf->len)) {
+ while (offset < MIN(MAX_DATA_CHUNK_OFFSET, buf->len)) {
if (!memcmp(buf->str + offset, "data", 4))
/* Skip into the samples. */
return offset + 8;
struct context *inc;
struct sr_datafeed_packet packet;
struct sr_datafeed_meta meta;
- struct sr_channel *ch;
struct sr_config *src;
int offset, chunk_samples, total_samples, processed, max_chunk_samples;
int num_samples, i;
if (!inc->started) {
for (i = 0; i < inc->num_channels; i++) {
snprintf(channelname, 8, "CH%d", i + 1);
- ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE, channelname);
- in->sdi->channels = g_slist_append(in->sdi->channels, ch);
+ sr_channel_new(in->sdi, i, SR_CHANNEL_ANALOG, TRUE, channelname);
}
std_session_send_df_header(in->sdi, LOG_PREFIX);
.id = "wav",
.name = "WAV",
.desc = "WAV file",
+ .exts = (const char*[]){"wav", NULL},
.metadata = { SR_INPUT_META_HEADER | SR_INPUT_META_REQUIRED },
.format_match = format_match,
.init = init,
.receive = receive,
.end = end,
};
-