History

Move scriptable caches into scripting interfaces

Removed non-working getResource() API functions.

David Rowe committed 8 years ago

Commit 16e06de1 parent fe5b13b18 files · +430 −290Browse files

Showing the changes to libraries/audio/src/SoundCacheScriptingInterface.cpp (1 of 18 files). Show all

Unified · Split

libraries/audio/src/SoundCacheScriptingInterface.cpp+21−0
@@ -0,0 +1,21 @@
1+//
2+// SoundCacheScriptingInterface.cpp
3+// libraries/audio/src
4+//
5+// Created by David Rowe on 25 Jul 2018.
6+// Copyright 2018 High Fidelity, Inc.
7+//
8+// Distributed under the Apache License, Version 2.0.
9+// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10+//
11+
12+#include "SoundCacheScriptingInterface.h"
13+
14+SoundCacheScriptingInterface::SoundCacheScriptingInterface(SoundCache* soundCache) :
15+ _soundCache(soundCache),
16+ ScriptableResourceCache::ScriptableResourceCache(soundCache)
17+{ }
18+
19+SharedSoundPointer SoundCacheScriptingInterface::getSound(const QUrl& url) {
20+ return _soundCache->getSound(url);
21+}