Class SoundDataPart
This class represents a sound data asset part.
Namespace: Evergine.Framework.Assets.AssetParts
Assembly: Evergine.Framework.dll
Syntax
public class SoundDataPart : AssetPart
Constructors
SoundDataPart()
Initializes a new instance of the SoundDataPart class.
Declaration
public SoundDataPart()
SoundDataPart(Stream, int)
Initializes a new instance of the SoundDataPart class.
Declaration
public SoundDataPart(Stream stream, int size)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream from which to read the data. |
int | size | The size to read from the stream. |
Fields
Data
The sound data array. You must use the property DataLength to read the array.
Declaration
public byte[] Data
Field Value
Type | Description |
---|---|
byte[] |
DataLength
The length of the sound data.
Declaration
public int DataLength
Field Value
Type | Description |
---|---|
int |
Methods
Free()
Releases the resources used by this instance.
Declaration
public void Free()
Read(BinaryReader)
Reads this asset part.
Declaration
public static SoundDataPart Read(BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The binary reader. |
Returns
Type | Description |
---|---|
SoundDataPart | The loaded asset part. |
Write(BinaryWriter)
Writes the sub-asset.
Declaration
public override void Write(BinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
BinaryWriter | writer | The stream. |