- s = g_variant_get_string(g_hash_table_lookup(options, "samplerate"), NULL);
- if (sr_parse_sizestring(s, &samplerate) != SR_OK) {
- sr_err("Invalid samplerate '%s'.", s);
- return SR_ERR_ARG;
- }
-
in->sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, NULL, NULL, NULL);
in->priv = inc = g_malloc0(sizeof(struct context));
in->sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, NULL, NULL, NULL);
in->priv = inc = g_malloc0(sizeof(struct context));
for (i = 0; i < num_channels; i++) {
snprintf(name, 16, "%d", i);
for (i = 0; i < num_channels; i++) {
snprintf(name, 16, "%d", i);
static struct sr_option options[] = {
{ "numchannels", "Number of channels", "Number of channels", NULL, NULL },
{ "samplerate", "Sample rate", "Sample rate", NULL, NULL },
static struct sr_option options[] = {
{ "numchannels", "Number of channels", "Number of channels", NULL, NULL },
{ "samplerate", "Sample rate", "Sample rate", NULL, NULL },
};
static struct sr_option *get_options(void)
{
if (!options[0].def) {
options[0].def = g_variant_ref_sink(g_variant_new_int32(DEFAULT_NUM_CHANNELS));
};
static struct sr_option *get_options(void)
{
if (!options[0].def) {
options[0].def = g_variant_ref_sink(g_variant_new_int32(DEFAULT_NUM_CHANNELS));