本文整理汇总了C++中AudioChunk::frame方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioChunk::frame方法的具体用法?C++ AudioChunk::frame怎么用?C++ AudioChunk::frame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioChunk
的用法示例。
在下文中一共展示了AudioChunk::frame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pull
void Splicer::pull(AudioChunk &chunk)
{
Uint32 left = chunk.length(), chans = chunk.format().channels;
Sint32 *data[PG_MAX_CHANNELS];
for (Uint32 i = 0; i < chans; ++i) data[i] = chunk.start(i);
//Query exhausted each loop to refresh the value of "current".
while (!exhausted())
{
//Pull data from next stream
AudioChunk sub(chunk.audio, output, data, left,
chunk.frame(), chunk.a(), chunk.b());
current->pull(sub);
//Partial advance
if (current->exhausted())
{
Uint32 cut = sub.cutoff();
for (Uint32 i = 0; i < chans; ++i) data[i] += cut;
left -= cut;
current = NULL;
if (left) continue;
}
return;
}
//The Splicer is exhausted!
chunk.cutoff(data[0] - chunk.start(0));
}