本文整理汇总了C++中common::MemoryReadStream::readStream方法的典型用法代码示例。如果您正苦于以下问题:C++ MemoryReadStream::readStream方法的具体用法?C++ MemoryReadStream::readStream怎么用?C++ MemoryReadStream::readStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::MemoryReadStream
的用法示例。
在下文中一共展示了MemoryReadStream::readStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: srcStream
warning("Failed to find audio entry %i", number);
return NULL;
}
} else {
audioRes = _resMan->findResource(ResourceId(kResourceTypeAudio36, volume, number), false);
if (!audioRes) {
warning("Failed to find audio entry (%i, %i, %i, %i, %i)", volume, (number >> 24) & 0xff,
(number >> 16) & 0xff, (number >> 8) & 0xff, number & 0xff);
return NULL;
}
}
// Load the data into a MemoryReadStream. The AudioStream here cannot rely on
// memory from the resource manager.
Common::MemoryReadStream srcStream(audioRes->data, audioRes->size, DisposeAfterUse::NO);
Common::ScopedPtr<Common::SeekableReadStream> stream(srcStream.readStream(srcStream.size()));
byte audioFlags;
uint32 audioCompressionType = audioRes->getAudioCompressionType();
Audio::SeekableAudioStream *audioSeekStream = 0;
if (audioCompressionType) {
#if (defined(USE_MAD) || defined(USE_VORBIS) || defined(USE_FLAC))
switch (audioCompressionType) {
case MKTAG('M','P','3',' '):
#ifdef USE_MAD
audioSeekStream = Audio::makeMP3Stream(stream.release(), DisposeAfterUse::YES);
#endif
break;
case MKTAG('O','G','G',' '):
#ifdef USE_VORBIS