本文整理汇总了C++中Voice::attach方法的典型用法代码示例。如果您正苦于以下问题:C++ Voice::attach方法的具体用法?C++ Voice::attach怎么用?C++ Voice::attach使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Voice
的用法示例。
在下文中一共展示了Voice::attach方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initial_config
void Prog::initial_config()
{
Voice *voice = new_voice();
if (!voice) {
abort_example("Could not create initial voice.\n");
}
voice->set_pos(300, 50);
Mixer *mixer = new_mixer();
mixer->set_pos(300, 150);
voice->attach(mixer);
SampleInstance *splinst = new_sample_instance();
splinst->set_pos(220, 300);
mixer->attach(splinst);
splinst->toggle_playing();
SampleInstance *splinst2 = new_sample_instance();
splinst2->set_pos(120, 240);
mixer->attach(splinst2);
splinst2->toggle_playing();
Mixer *mixer2 = new_mixer();
mixer2->set_pos(500, 250);
mixer->attach(mixer2);
Audiostream *stream;
if ((stream = new_audiostream())) {
stream->set_pos(450, 350);
mixer2->attach(stream);
}
}