本文整理汇总了C++中Sink::updated方法的典型用法代码示例。如果您正苦于以下问题:C++ Sink::updated方法的具体用法?C++ Sink::updated怎么用?C++ Sink::updated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sink
的用法示例。
在下文中一共展示了Sink::updated方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sink_cb
void Sink::sink_cb(pa_context *, const pa_sink_info *i, int eol, void *userdata)
{
cout << "Sink::sink_cb" << endl;
Sink *p = reinterpret_cast<Sink *>(userdata);
Device::Private *dd = p->Device::d;
if (eol) return;
if (!i) {
cout << "Sink callback failure" << endl;
return;
}
if ( dd->valid ) assert ( i->index == dd->index );
//p->mSinkInfo = *i;
cout << i->name << " " << i->description << endl;
dd->name = QString(i->name);
dd->description = QString(i->description);
dd->sampleSpec = i->sample_spec;
dd->channelMap = i->channel_map;
dd->owner = i->owner_module;
dd->volume = i->volume;
dd->muted = i->mute;
dd->monitor= i->monitor_source;
dd->monitorName = QString(i->monitor_source_name);
dd->latency = i->latency;
dd->driver = QString(i->driver);
dd->baseVolume = i->base_volume;
dd->card = i->card;
dd->configuredLatency = i->configured_latency;
dd->valid = true;
if(dd->proplist != 0)
pa_proplist_free(dd->proplist);
dd->proplist = pa_proplist_copy(i->proplist);
emit p->updated();
}