mirror of
https://github.com/overte-org/overte.git
synced 2025-07-10 14:18:46 +02:00
34 lines
No EOL
893 B
C++
34 lines
No EOL
893 B
C++
//
|
|
// SoundCache.h
|
|
// libraries/audio/src
|
|
//
|
|
// Created by Stephen Birarda on 2014-11-13.
|
|
// Copyright 2014 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_SoundCache_h
|
|
#define hifi_SoundCache_h
|
|
|
|
#include <ResourceCache.h>
|
|
|
|
#include "Sound.h"
|
|
|
|
/// Scriptable interface for sound loading.
|
|
class SoundCache : public ResourceCache, public Dependency {
|
|
Q_OBJECT
|
|
SINGLETON_DEPENDENCY
|
|
|
|
public:
|
|
Q_INVOKABLE SharedSoundPointer getSound(const QUrl& url);
|
|
|
|
protected:
|
|
virtual QSharedPointer<Resource> createResource(const QUrl& url,
|
|
const QSharedPointer<Resource>& fallback, bool delayLoad, const void* extra);
|
|
private:
|
|
SoundCache(QObject* parent = NULL);
|
|
};
|
|
|
|
#endif // hifi_SoundCache_h
|