Detailed Description

Represents a specific type of audio format, e.g. a synth file or ogg.

Inheritance diagram for PowerUI.AudioFormat:
PowerUI.OggFormat

Public Member Functions

virtual string[] GetNames ()
 The set of lowercase file types that this format will handle. More...
 
virtual bool InternallyCached (Location path, AudioPackage package)
 Some formats may cache their result internally. This checks and updates if it has. More...
 
virtual AudioFormat Instance ()
 Creates an instance of this format. More...
 
virtual bool LoadFromAsset (UnityEngine.Object asset, AudioPackage package)
 Attempt to load the audio from a Unity resource. More...
 
virtual bool LoadData (byte[] data, AudioPackage package)
 Loads the raw block of data into an object of this format. More...
 
virtual void SetPause (bool paused)
 Change the paused state of the audio. More...
 
virtual void Start (Dom.Node context)
 Called when this audio is expected to start. Note that context may be null. More...
 
virtual void Stop ()
 Called when this audio should stop. More...
 

Public Attributes

AudioClip Clip
 The clip to use during playback. More...
 

Package Attributes

AudioSource Source
 The current source it's being played on. More...
 

Properties

virtual bool Loaded [get]
 Is this audio loaded? More...
 
virtual float Duration [get]
 The length of the clip in seconds. More...
 
virtual float CurrentTime [get, set]
 Use this to seek. More...
 

Member Function Documentation

virtual string [] PowerUI.AudioFormat.GetNames ( )
inlinevirtual

The set of lowercase file types that this format will handle.

Reimplemented in PowerUI.OggFormat.

virtual AudioFormat PowerUI.AudioFormat.Instance ( )
inlinevirtual

Creates an instance of this format.

Reimplemented in PowerUI.OggFormat.

virtual bool PowerUI.AudioFormat.InternallyCached ( Location  path,
AudioPackage  package 
)
inlinevirtual

Some formats may cache their result internally. This checks and updates if it has.

virtual bool PowerUI.AudioFormat.LoadData ( byte[]  data,
AudioPackage  package 
)
inlinevirtual

Loads the raw block of data into an object of this format.

virtual bool PowerUI.AudioFormat.LoadFromAsset ( UnityEngine.Object  asset,
AudioPackage  package 
)
inlinevirtual

Attempt to load the audio from a Unity resource.

virtual void PowerUI.AudioFormat.SetPause ( bool  paused)
inlinevirtual

Change the paused state of the audio.

virtual void PowerUI.AudioFormat.Start ( Dom.Node  context)
inlinevirtual

Called when this audio is expected to start. Note that context may be null.

virtual void PowerUI.AudioFormat.Stop ( )
inlinevirtual

Called when this audio should stop.

Member Data Documentation

AudioClip PowerUI.AudioFormat.Clip

The clip to use during playback.

AudioSource PowerUI.AudioFormat.Source
package

The current source it's being played on.

Property Documentation

virtual float PowerUI.AudioFormat.CurrentTime
getset

Use this to seek.

virtual float PowerUI.AudioFormat.Duration
get

The length of the clip in seconds.

virtual bool PowerUI.AudioFormat.Loaded
get

Is this audio loaded?