bool OggResourceLoader::VLoadResource(char *rawBuffer, unsigned int rawSize, shared_ptr<ResHandle> handle){ shared_ptr<SoundResourceExtraData> extra = shared_ptr<SoundResourceExtraData>(new SoundResourceExtraData()); extra->m_SoundType = SOUND_TYPE_OGG; handle->SetExtra(shared_ptr<SoundResourceExtraData>(extra)); if (!ParseOgg(rawBuffer, rawSize, handle)){ return false; } return true; }
bool OggResourceLoader::LoadResource(char* rawBuffer, unsigned int rawSize, shared_ptr<ResHandle> handle) { // create the resources extra data shared_ptr<SoundResourceExtraData> extra = shared_ptr<SoundResourceExtraData>(CB_NEW SoundResourceExtraData); extra->m_SoundType = SoundType::SOUND_TYPE_OGG; handle->SetExtra(extra); // load the ogg into the handle if (!ParseOgg(rawBuffer, rawSize, handle)) { return false; } return true; }