Class SoundReader
Imports Daggerfall sounds into Unity as AudioClip objects. Should only be attached to DaggerfallUnity (for which it is a required component).
Namespace: DaggerfallWorkshop
Assembly: Assembly-CSharp.dll
Syntax
[RequireComponent(typeof(DaggerfallUnity))]
public class SoundReader : MonoBehaviour
Properties
| Improve this Doc View SourceIsReady
Gets true if file reading is ready.
Declaration
public bool IsReady { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Methods
| Improve this Doc View SourceGetAudioClip(SoundClips)
Gets AudioClip based on Daggerfall SoundClip enum.
Declaration
public AudioClip GetAudioClip(SoundClips soundClip)
Parameters
| Type | Name | Description |
|---|---|---|
| SoundClips | soundClip | SoundClip enum. |
Returns
| Type | Description |
|---|---|
| AudioClip | AudioClip or null. |
GetAudioClip(Int32)
Gets AudioClip based on Daggerfall sound index.
Declaration
public AudioClip GetAudioClip(int soundIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | soundIndex | Sound index. |
Returns
| Type | Description |
|---|---|
| AudioClip | AudioClip or null. |
GetAudioClip(UInt32)
Gets AudioClip based on Daggerfall SoundID.
Declaration
public AudioClip GetAudioClip(uint soundID)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt32 | soundID | Sound ID. |
Returns
| Type | Description |
|---|---|
| AudioClip | AudioClip or null. |
GetSoundID(Int32)
Gets sound ID from index.
Declaration
public uint GetSoundID(int soundIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | soundIndex | Sound index. |
Returns
| Type | Description |
|---|---|
| UInt32 | Sound ID. |
GetSoundIndex(UInt32)
Gets sound index from ID.
Declaration
public int GetSoundIndex(uint soundID)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt32 | soundID | Sound ID. |
Returns
| Type | Description |
|---|---|
| Int32 | Sound index. |