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

Public Member Functions

override bool OnInitialize ()
 
override void Replace (string fileName)
 
override void Export (string outPath)
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode
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 ()
 

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)
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode
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
 
- Protected Member Functions inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
void ForceReplacedEvent ()
 
virtual void MergeInternal ()
 
- Properties inherited from BrawlLib.SSBB.ResourceNodes.RSARFileAudioNode
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]
 
- Events inherited from BrawlLib.SSBB.ResourceNodes.ResourceNode
SelectEventHandler SelectChild
 
EventHandler UpdateProps
 
MoveEventHandler MovedUp
 
ResourceEventHandler Disposing
 
ResourceChildEventHandler ChildAdded
 
ResourceChildInsertEventHandler ChildInserted
 

Member Function Documentation

◆ Export()

override void BrawlLib.SSBB.ResourceNodes.RWAVNode.Export ( string  outPath)
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

186 {
187 if (outPath.EndsWith(".wav"))
188 {
189 WAV.ToFile(CreateStreams()[0], outPath);
190 }
191 else
192 {
193 base.Export(outPath);
194 }
195 }
Definition: WAV.cs:212
static void ToFile(IAudioStream source, string path, int samplePosition=0, int maxSampleCount=int.MaxValue)
Definition: WAV.cs:218
virtual IAudioStream[] CreateStreams()
Definition: RWAVNode.cs:134

◆ OnInitialize()

override bool BrawlLib.SSBB.ResourceNodes.RWAVNode.OnInitialize ( )
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

145 {
146 if (_name == null)
147 {
148 _name = $"Audio[{Index}]";
149 }
150
151 Init(Header->Data->Data, Header->Data->_header._length, &Header->Info->_info);
152
153 SetSizeInternal(Header->_header._length);
154
155 return false;
156 }
void Init(VoidPtr strmAddr, int strmLen, WaveInfo *info)
Definition: RWAVNode.cs:77
void SetSizeInternal(int size)
Definition: ResourceNode.cs:799
string _name
Definition: ResourceNode.cs:139

◆ Replace()

override void BrawlLib.SSBB.ResourceNodes.RWAVNode.Replace ( string  fileName)
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

159 {
160 if (fileName.EndsWith(".wav"))
161 {
163 {
164 dlg.Type = 2;
165 dlg.AudioSource = fileName;
166 if (dlg.ShowDialog(null) == DialogResult.OK)
167 {
169 }
170 }
171 }
172 else
173 {
174 base.Replace(fileName);
175 }
176
177 //Init(Header->Data->Data, Header->Data->_header._length, &Header->Info->_info);
178
182 RSARNode?.SignalPropertyChange();
183 }
Definition: BrstmConverterDialog.cs:13
new DialogResult ShowDialog(IWin32Window owner)
Definition: BrstmConverterDialog.cs:696
FileMap AudioData
Definition: BrstmConverterDialog.cs:658
virtual void ReplaceRaw(VoidPtr address, int length)
Definition: ResourceNode.cs:847
virtual void SignalPropertyChange()
Definition: ResourceNode.cs:313
void UpdateCurrentControl()
Definition: ResourceNode.cs:482
ResourceNode Parent
Definition: ResourceNode.cs:245

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