本文整理汇总了C++中Endpoint::audDevManager方法的典型用法代码示例。如果您正苦于以下问题:C++ Endpoint::audDevManager方法的具体用法?C++ Endpoint::audDevManager怎么用?C++ Endpoint::audDevManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Endpoint
的用法示例。
在下文中一共展示了Endpoint::audDevManager方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mainProg3
void mainProg3() throw(Error)
{
Endpoint ep;
// Create library
ep.libCreate();
// Init library
EpConfig ep_cfg;
ep.libInit( ep_cfg );
// Start library
ep.libStart();
std::cout << "*** PJSUA2 STARTED ***" << std::endl;
// Create player and recorder
{
AudioMediaPlayer amp;
amp.createPlayer("../../tests/pjsua/wavs/input.16.wav");
AudioMediaRecorder amr;
amr.createRecorder("recorder_test_output.wav");
amp.startTransmit(ep.audDevManager().getPlaybackDevMedia());
amp.startTransmit(amr);
pj_thread_sleep(5000);
}
ep.libDestroy();
}
示例2: throw
static void mainProg3(Endpoint &ep) throw(Error)
{
const char *paths[] = { "../../../../tests/pjsua/wavs/input.16.wav",
"../../tests/pjsua/wavs/input.16.wav",
"input.16.wav"};
unsigned i;
const char *filename = NULL;
// Init library
EpConfig ep_cfg;
ep.libInit( ep_cfg );
for (i=0; i<PJ_ARRAY_SIZE(paths); ++i) {
if (pj_file_exists(paths[i])) {
filename = paths[i];
break;
}
}
if (!filename) {
PJSUA2_RAISE_ERROR3(PJ_ENOTFOUND, "mainProg3()",
"Could not locate input.16.wav");
}
// Start library
ep.libStart();
std::cout << "*** PJSUA2 STARTED ***" << std::endl;
// Create player and recorder
{
AudioMediaPlayer amp;
amp.createPlayer(filename);
AudioMediaRecorder amr;
amr.createRecorder("recorder_test_output.wav");
amp.startTransmit(ep.audDevManager().getPlaybackDevMedia());
amp.startTransmit(amr);
pj_thread_sleep(5000);
}
}