Global cache for records.
More...
|
static readonly System.Collections.Generic.Dictionary< string, AudioClip > | Clips = new System.Collections.Generic.Dictionary<string, AudioClip>() |
| summary>Dictionary with all cached audio data. More...
|
|
static readonly System.Collections.Generic.Dictionary< string, byte[]> | AudioDatas = new System.Collections.Generic.Dictionary<string, byte[]>() |
|
static string | PrefabPath |
| Fully qualified prefab path. More...
|
|
static string | GameObjectName |
| Name of the gameobject in the scene. More...
|
|
|
override void | OnApplicationQuit () |
|
virtual void | Awake () |
|
virtual void | OnDestroy () |
|
|
int | ClipCacheSize [get, set] |
| Size of the clip cache in Bytes. More...
|
|
int | DataCacheSize [get, set] |
|
static T | Instance [get, protected set] |
| Returns the singleton instance of this class. More...
|
|
bool | DontDestroy [get, set] |
| Don't destroy gameobject during scene switches. More...
|
|
Global cache for records.
◆ AddClip()
void Crosstales.DJ.GlobalCache.AddClip |
( |
string |
key, |
|
|
AudioClip |
data |
|
) |
| |
Adds an AudioClip for a given key.
- Parameters
-
key | Key for the AudioClip. |
data | AudioClip for the key. |
◆ AddData()
void Crosstales.DJ.GlobalCache.AddData |
( |
string |
key, |
|
|
byte[] |
data |
|
) |
| |
Adds audio data for a given key.
- Parameters
-
key | Key for the audio data. |
data | Audio data for the key. |
◆ ClearCache()
void Crosstales.DJ.GlobalCache.ClearCache |
( |
| ) |
|
Clears the complete cache.
◆ ClearClipCache()
void Crosstales.DJ.GlobalCache.ClearClipCache |
( |
| ) |
|
◆ ClearDataCache()
void Crosstales.DJ.GlobalCache.ClearDataCache |
( |
| ) |
|
Clears the audio data cache.
◆ GetClip()
AudioClip Crosstales.DJ.GlobalCache.GetClip |
( |
string |
key | ) |
|
Returns the AudioClip for a given key.
- Parameters
-
key | Key for the AudioClip. |
- Returns
- AudioClip for the given key.
◆ GetData()
byte [] Crosstales.DJ.GlobalCache.GetData |
( |
string |
key | ) |
|
Returns the audio data for a given key.
- Parameters
-
key | Key for the audio data. |
- Returns
- Audio data for the given key.
◆ RemoveClip()
void Crosstales.DJ.GlobalCache.RemoveClip |
( |
string |
key | ) |
|
Removes an AudioClip for a given key.
- Parameters
-
key | Key for the AudioClip. |
◆ RemoveData()
void Crosstales.DJ.GlobalCache.RemoveData |
( |
string |
key | ) |
|
Removes audio data for a given key.
- Parameters
-
key | Key for the audio data. |
◆ ResetObject()
static void Crosstales.DJ.GlobalCache.ResetObject |
( |
| ) |
|
|
static |
◆ Clips
readonly System.Collections.Generic.Dictionary<string, AudioClip> Crosstales.DJ.GlobalCache.Clips = new System.Collections.Generic.Dictionary<string, AudioClip>() |
|
static |
summary>Dictionary with all cached audio data.
◆ CurrentClipCacheSize
int Crosstales.DJ.GlobalCache.CurrentClipCacheSize => Clips.Sum(pair => pair.Value.samples * 2 * 4) |
Current size of the clip cache in Bytes.
◆ CurrentDataCacheSize
int Crosstales.DJ.GlobalCache.CurrentDataCacheSize => AudioDatas.Sum(pair => pair.Value.Length) |
Current size of the data cache in Bytes.
◆ ClipCacheSize
int Crosstales.DJ.GlobalCache.ClipCacheSize |
|
getset |
Size of the clip cache in Bytes.
summary>Size of the data cache in Bytes.
The documentation for this class was generated from the following file:
- C:/Users/slaub/Unity/assets/DJPro/DJPro/Assets/Plugins/crosstales/DJ/Scripts/GlobalCache.cs