BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Properties | List of all members
BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode Class Reference
Inheritance diagram for BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode:
BrawlLib.SSBB.ResourceNodes.RSARFileEntryNode BrawlLib.Internal.Audio.IAudioSource BrawlLib.SSBB.ResourceNodes.ResourceNode BrawlLib.SSBB.ResourceNodes.RWAVNode BrawlLib.SSBB.ResourceNodes.WAVESoundNode

Public Member Functions

override void Dispose ()
 
void Init (VoidPtr strmAddr, int strmLen, WaveInfo *info)
 
virtual IAudioStream[] CreateStreams ()
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
void OnRenamed ()
 
List< ResourceNodeGetChildrenRecursive ()
 Used primarily to get bone lists. Kept for all resource nodes for utility. More...
 
virtual void SignalPropertyChange ()
 
virtual void Dispose ()
 
void SelectChildAtIndex (int index)
 
void UpdateProperties ()
 
void UpdateCurrentControl ()
 
virtual bool MoveUp ()
 
virtual bool MoveDown ()
 
virtual void OnMoved ()
 
virtual void DoMoveDown ()
 
virtual void DoMoveDown (bool select)
 
virtual void DoMoveUp ()
 
virtual void DoMoveUp (bool select)
 
virtual bool AddUp ()
 
virtual bool AddDown ()
 
virtual bool ToParent ()
 
void Populate (int levels=-1)
 
virtual void OnPopulate ()
 
void Initialize (ResourceNode parent, FileMap source)
 
void Initialize (ResourceNode parent, VoidPtr address, int length)
 
void Initialize (ResourceNode parent, DataSource origSource)
 
virtual void Initialize (ResourceNode parent, DataSource origSource, DataSource uncompSource)
 
virtual bool OnInitialize ()
 
virtual void Restore ()
 
virtual void Remove ()
 
virtual void RemoveChild (ResourceNode child)
 
virtual void AddChild (ResourceNode child)
 
virtual void AddChild (ResourceNode child, bool change)
 
virtual void InsertChild (ResourceNode child, int index)
 
virtual void InsertChild (ResourceNode child, bool change, int index)
 
void SetSizeInternal (int size)
 
virtual void Replace (string fileName)
 
virtual void Replace (ResourceNode node)
 
virtual void Replace (string fileName, FileMapProtect prot, FileOptions options)
 
virtual void ReplaceRaw (VoidPtr address, int length)
 
virtual void ReplaceRaw (FileMap map)
 
virtual void Export (string outPath)
 
void Export (FileStream outStream)
 
virtual void ExportUncompressed (string outPath)
 
void ExportUncompressed (FileStream outStream)
 
virtual void Rebuild ()
 
virtual void Rebuild (bool force)
 
virtual void Rebuild (VoidPtr address, int length, bool force)
 
virtual void OnRebuild (VoidPtr address, int length, bool force)
 
virtual int CalculateSize (bool force)
 
virtual int OnCalculateSize (bool force)
 
void Merge ()
 
void Merge (bool forceBuild)
 
ResourceNode FindChildByType (string path, bool searchChildren, params ResourceType[] types)
 
ResourceNode FindChildByType (string path, bool searchChildren, StringComparison compare, params ResourceType[] types)
 
ResourceNode FindChild (string path)
 
ResourceNode FindChild (string path, bool searchChildren)
 
ResourceNode FindChild (string path, StringComparison compare)
 
ResourceNode FindChild (string path, bool searchChildren, StringComparison compare)
 
ResourceNode[] FindChildrenByClassType (string path, Type type)
 
ResourceNode[] FindChildrenByType (string path, ResourceType type)
 
ResourceNode[] FindChildrenByTypeInGroup (string path, ResourceType type, byte group)
 
ResourceNode[] FindChildrenByName (string name)
 
unsafe string FindName (string name)
 
ResourceNode FindEmbeddedIndex (int index)
 
virtual unsafe byte[] MD5 ()
 Find the MD5 checksum of this node's data. If this node doesn't have any data (BRESGroupNode, for example), this method will return null. More...
 
string MD5Str ()
 Get the result of the MD5() function as a string of hexadecimal digits. If MD5() returns null, this method will return an empty string. More...
 
ResourceNode PrevSibling ()
 
ResourceNode NextSibling ()
 
override string ToString ()
 
virtual void SortChildren ()
 
IAudioStream[] CreateStreams ()
 

Public Attributes

DataSource _audioSource
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
Form _mainForm
 
string _name
 
string _origPath
 
ResourceNode _parent
 
List< ResourceNode_children = new List<ResourceNode>()
 
int _calcSize
 
EventHandler UpdateControl
 
MoveEventHandler MovedDown
 
ResourceEventHandler Renamed
 
ResourceEventHandler PropertyChanged
 
ResourceEventHandler Replaced
 
ResourceEventHandler Restored
 
ResourceChildEventHandler ChildRemoved
 
bool _isPopulating
 
bool _replaced
 

Properties

override ResourceType ResourceFileType [get]
 
WaveInfo Info [get, set]
 
WaveEncoding Encoding [get]
 
int Channels [get]
 
bool IsLooped [get]
 
int SampleRate [get]
 
int LoopStartSample [get]
 
int NumSamples [get]
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
string FilePath [get]
 
string FileName [get]
 
string DirectoryName [get]
 
ResourceNode RootNode [get]
 
DataSource OriginalSource [get]
 
DataSource UncompressedSource [get]
 
DataSource WorkingSource [get]
 
DataSource WorkingUncompressed [get]
 
virtual bool HasChildren [get]
 
virtual ResourceType ResourceFileType [get]
 
string NodeType [get]
 
virtual string TreePathAbsolute [get]
 
virtual string TreePath [get]
 
virtual int Level [get]
 
virtual int MaxNameLength [get]
 
virtual bool AllowDuplicateNames [get]
 
virtual bool AllowNullNames [get]
 
virtual string Name [get, set]
 
ResourceNode Parent [get, set]
 
List< ResourceNodeChildren [get]
 
int Index [get]
 
int HexIndex [get]
 
bool IsCompressed [get]
 
bool HasChanged [get, set]
 
bool IsBranch [get]
 
bool HasMerged [get]
 
virtual bool AllowSaving [get, set]
 
virtual bool IsDirty [get, set]
 
virtual uint UncompressedSize [get]
 
virtual Type[] AllowedChildTypes [get]
 
virtual string Compression [get, set]
 
virtual bool RetainChildrenOnReplace [get]
 
virtual bool supportsCompression [get]
 
static MD5CryptoServiceProvider MD5Provider [get]
 
- Properties inherited from BrawlLib.Internal.Audio.IAudioSource
bool IsLooped [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
static ResourceNode[] FindAllSubNodes (ResourceNode root)
 
static ResourceNode FindNode (ResourceNode root, string path, bool searchChildren, StringComparison compare)
 
- Protected Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
void ForceReplacedEvent ()
 
virtual void MergeInternal ()
 
- Events inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
SelectEventHandler SelectChild
 
EventHandler UpdateProps
 
MoveEventHandler MovedUp
 
ResourceEventHandler Disposing
 
ResourceChildEventHandler ChildAdded
 
ResourceChildInsertEventHandler ChildInserted
 

Member Function Documentation

◆ CreateStreams()

virtual IAudioStream[] BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.CreateStreams ( )
inlinevirtual

Implements BrawlLib.Internal.Audio.IAudioSource.

135 {
136 return new IAudioStream[] {_stream};
137 }
Definition: IAudioStream.cs:6

◆ Dispose()

override void BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.Dispose ( )
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

59 {
61
62 if (_stream != null)
63 {
64 _stream.Dispose();
65 _stream = null;
66 }
67
68 if (_streamBuffer != null)
69 {
70 _streamBuffer.Dispose();
71 _streamBuffer = null;
72 }
73
74 base.Dispose();
75 }
void Dispose()
Definition: UnsafeBuffer.cs:32
DataSource _audioSource
Definition: RWAVNode.cs:34
void Close()
Definition: ResourceNode.cs:87

◆ Init()

void BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.Init ( VoidPtr  strmAddr,
int  strmLen,
WaveInfo info 
)
inline
78 {
79 Info = *info;
80
81 _streamBuffer = new UnsafeBuffer(strmLen);
82 Memory.Move(_streamBuffer.Address, strmAddr, (uint) strmLen);
83 _audioSource = new DataSource(_streamBuffer.Address, _streamBuffer.Length);
84
85 if (info->_format._encoding == 2)
86 {
87 _stream = new ADPCMStream(info, _audioSource.Address);
88 }
89 else
90 {
91 _stream = new PCMStream(info, _audioSource.Address);
92 }
93 }
Definition: PCMStream.cs:11
Definition: Memory.cs:8
static void Move(VoidPtr dst, VoidPtr src, uint size)
Definition: Memory.cs:9
Definition: UnsafeBuffer.cs:7
VoidPtr Address
Definition: UnsafeBuffer.cs:9
int Length
Definition: UnsafeBuffer.cs:14
WaveInfo Info
Definition: RWAVNode.cs:18
VoidPtr Address
Definition: ResourceNode.cs:31
byte _encoding
Definition: RWAV.cs:185
AudioFormatInfo _format
Definition: RWAV.cs:88

Member Data Documentation

◆ _audioSource

DataSource BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode._audioSource

Property Documentation

◆ Channels

int BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.Channels
get

◆ Encoding

WaveEncoding BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.Encoding
get

◆ Info

WaveInfo BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.Info
getset
18 {
19 get => _info;
20 set
21 {
22 _info = value;
23 _encoding = _info._format._encoding;
24 _channels = _info._format._channels;
25 _looped = _info._format._looped != 0;
26 _sampleRate = _info._sampleRate;
27 _loopStart = _info.LoopSample;
28 _numSamples = _info.NumSamples;
29 }
30 }
byte _channels
Definition: RWAV.cs:187
int LoopSample
Definition: RWAV.cs:118
int NumSamples
Definition: RWAV.cs:112
bushort _sampleRate
Definition: RWAV.cs:90

◆ IsLooped

bool BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.IsLooped
get

◆ LoopStartSample

int BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.LoopStartSample
get

◆ NumSamples

int BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.NumSamples
get

◆ ResourceFileType

override ResourceType BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.ResourceFileType
get

◆ SampleRate

int BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode.SampleRate
get

The documentation for this class was generated from the following file: