本文整理汇总了C++中AUD_Reference::seek方法的典型用法代码示例。如果您正苦于以下问题:C++ AUD_Reference::seek方法的具体用法?C++ AUD_Reference::seek怎么用?C++ AUD_Reference::seek使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AUD_Reference
的用法示例。
在下文中一共展示了AUD_Reference::seek方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AUD_mixdown
const char* AUD_mixdown(AUD_Sound* sound, unsigned int start, unsigned int length, unsigned int buffersize, const char* filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate)
{
try
{
AUD_SequencerFactory* f = dynamic_cast<AUD_SequencerFactory*>(sound->get());
f->setSpecs(specs.specs);
AUD_Reference<AUD_IReader> reader = f->createQualityReader();
reader->seek(start);
AUD_Reference<AUD_IWriter> writer = AUD_FileWriter::createWriter(filename, specs, format, codec, bitrate);
AUD_FileWriter::writeReader(reader, writer, length, buffersize);
return NULL;
}
catch(AUD_Exception& e)
{
return e.str;
}
}
示例2: AUD_mixdown_per_channel
const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start, unsigned int length, unsigned int buffersize, const char* filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate)
{
try
{
AUD_SequencerFactory* f = dynamic_cast<AUD_SequencerFactory*>(sound->get());
f->setSpecs(specs.specs);
std::vector<AUD_Reference<AUD_IWriter> > writers;
int channels = specs.channels;
specs.channels = AUD_CHANNELS_MONO;
for(int i = 0; i < channels; i++)
{
std::stringstream stream;
std::string fn = filename;
size_t index = fn.find_last_of('.');
size_t index_slash = fn.find_last_of('/');
size_t index_backslash = fn.find_last_of('\\');
if((index == std::string::npos) ||
((index < index_slash) && (index_slash != std::string::npos)) ||
((index < index_backslash) && (index_backslash != std::string::npos)))
stream << filename << "_" << (i + 1);
else
stream << fn.substr(0, index) << "_" << (i + 1) << fn.substr(index);
writers.push_back(AUD_FileWriter::createWriter(stream.str(), specs, format, codec, bitrate));
}
AUD_Reference<AUD_IReader> reader = f->createQualityReader();
reader->seek(start);
AUD_FileWriter::writeReader(reader, writers, length, buffersize);
return NULL;
}
catch(AUD_Exception& e)
{
return e.str;
}
}