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

Public Types

enum  SndType
 
enum  Sound3DFlags
 
enum  AllocTrackEnum
 

Public Member Functions

 RSARSoundNode ()
 
override bool OnInitialize ()
 
IAudioStream[] CreateStreams ()
 
override int OnCalculateSize (bool force)
 
override void OnRebuild (VoidPtr address, int length, bool force)
 
override void Export (string outPath)
 
- Public Member Functions inherited from BrawlLib.SSBB.ResourceNodes.RSAREntryNode
override bool OnInitialize ()
 
- 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

Sound3DParam _sound3dParam
 
WaveSoundInfo _waveInfo
 
StrmSoundInfo _strmInfo
 
SeqSoundInfo _seqInfo
 
RSEQLabelNode _seqLabl
 
RSARFileNode _soundFileNode
 
RWSDDataNode _waveDataNode
 
int _fileId
 
int _playerId
 
byte _volume
 
byte _playerPriority
 
byte _soundType = 3
 
byte _remoteFilter
 
byte _panMode
 
byte _panCurve
 
byte _actorPlayerId
 
int _p1
 
int _p2
 
IAudioStream _stream
 
- Public Attributes inherited from BrawlLib.SSBB.ResourceNodes.RSAREntryNode
int _infoIndex
 
VoidPtr _rebuildBase
 
int _rebuildIndex
 
int _rebuildStringId
 
- 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 int StringId [get]
 
override ResourceType ResourceFileType [get]
 
RSARBankNode RBNKNode [get]
 
RSARFileNode SoundFileNode [get, set]
 
string SoundFile [get, set]
 
int PlayerId [get, set]
 
byte Volume [get, set]
 
byte PlayerPriority [get, set]
 
SndType SoundType [get, set]
 
byte RemoteFilter [get, set]
 
PanMode PanMode [get, set]
 
PanCurve PanCurve [get, set]
 
byte ActorPlayerId [get, set]
 
int UserParam1 [get, set]
 
int UserParam2 [get, set]
 
Sound3DFlags Flags [get, set]
 
DecayCurve DecayCurve [get, set]
 
byte DecayRatio [get, set]
 
byte DopplerFactor [get, set]
 
string SeqLabelEntry [get, set]
 
string BankFile [get, set]
 
AllocTrackEnum RSEQAllocTrack [get, set]
 
byte SeqChannelPriority [get, set]
 
byte SeqReleasePriorityFix [get, set]
 
uint StartPosition [get, set]
 
ushort AllocChannelCount [get, set]
 
AllocTrackEnum RSTMAllocTrack [get, set]
 
string SoundDataNode [get, set]
 
AllocTrackEnum RWSDAllocTrack [get, set]
 
byte ChannelPriority [get, set]
 
byte ReleasePriorityFix [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.RSAREntryNode
override bool AllowDuplicateNames [get]
 
RSARNode RSARNode [get]
 
virtual int StringId [get]
 
int InfoIndex [get, set]
 
string DataOffset [get]
 
int SoundbankCalc [get, set]
 
string ExpandedInfoIndex [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 Enumeration Documentation

◆ AllocTrackEnum

406 {
407 None = 0x0,
408 Track1 = 0x1,
409 Track2 = 0x2,
410 Track3 = 0x4,
411 Track4 = 0x8,
412 Track5 = 0x10,
413 Track6 = 0x20,
414 Track7 = 0x40,
415 Track8 = 0x80,
416 Track9 = 0x100,
417 Track10 = 0x200,
418 Track11 = 0x400,
419 Track12 = 0x800,
420 Track13 = 0x1000,
421 Track14 = 0x2000,
422 Track15 = 0x4000,
423 Track16 = 0x8000
424 }

◆ SndType

71 {
72 //Invalid = 0,
73
74 SEQ = 1,
75 STRM = 2,
76 WAVE = 3
77 }

◆ Sound3DFlags

275 {
276 NotVolume = 1,
277 NotPan = 2,
278 NotSurroundPan = 4,
279 NotPriority = 8,
280 Filter = 16
281 }

Constructor & Destructor Documentation

◆ RSARSoundNode()

BrawlLib.SSBB.ResourceNodes.RSARSoundNode.RSARSoundNode ( )
inline
15 {
16 _volume = 50;
17 _soundType = (byte) SndType.WAVE;
18 _playerPriority = 64;
19 _panMode = (byte) PanMode.Dual;
20 _panCurve = (byte) PanCurve.Sqrt;
21
22 _sound3dParam._flags = (uint) (Sound3DFlags.NotVolume | Sound3DFlags.NotSurroundPan);
23 _sound3dParam._decayCurve = (byte) DecayCurve.Logarithmic;
25
28 }
byte _soundType
Definition: RSARSoundNode.cs:63
WaveSoundInfo _waveInfo
Definition: RSARSoundNode.cs:37
byte _panMode
Definition: RSARSoundNode.cs:65
byte _volume
Definition: RSARSoundNode.cs:61
PanCurve PanCurve
Definition: RSARSoundNode.cs:231
SndType
Definition: RSARSoundNode.cs:71
byte _playerPriority
Definition: RSARSoundNode.cs:62
Sound3DParam _sound3dParam
Definition: RSARSoundNode.cs:36
byte _panCurve
Definition: RSARSoundNode.cs:66
Sound3DFlags
Definition: RSARSoundNode.cs:275
DecayCurve DecayCurve
Definition: RSARSoundNode.cs:296
PanMode PanMode
Definition: RSARSoundNode.cs:220
buint _flags
Definition: RSAR.cs:608
byte _decayRatio
Definition: RSAR.cs:610
byte _channelPriority
Definition: RSAR.cs:649
buint _allocTrack
Definition: RSAR.cs:648

Member Function Documentation

◆ CreateStreams()

IAudioStream[] BrawlLib.SSBB.ResourceNodes.RSARSoundNode.CreateStreams ( )
inline

Implements BrawlLib.Internal.Audio.IAudioSource.

669 {
670 _stream = null;
671 if (_soundFileNode is RWSDNode)
672 {
673 RWSDDataNode d = _waveDataNode;
674 if (d != null && _soundFileNode.Children.Count > 1 &&
675 _soundFileNode.Children[1].Children.Count > d._part3._waveIndex && d._part3._waveIndex >= 0)
676 {
677 _stream = (_soundFileNode.Children[1].Children[d._part3._waveIndex] as RSARFileAudioNode)
678 .CreateStreams()[0];
679 }
680 }
681
682 return new IAudioStream[] {_stream};
683 }
IAudioStream _stream
Definition: RSARSoundNode.cs:666
RSARFileNode _soundFileNode
Definition: RSARSoundNode.cs:42
IAudioStream[] CreateStreams()
Definition: RSARSoundNode.cs:668
RWSDDataNode _waveDataNode
Definition: RSARSoundNode.cs:43
List< ResourceNode > Children
Definition: ResourceNode.cs:262
Definition: IAudioStream.cs:6

◆ Export()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

745 {
746 if (outPath.EndsWith(".wav"))
747 {
748 IAudioStream stream = CreateStreams()[0];
749 if (stream == null)
750 {
751 MessageBox.Show($"{_soundFileNode?.GetType().Name ?? ""} \"{Name}\" has no associated sound data and cannot be exported to WAV.");
752 return;
753 }
754
755 WAV.ToFile(stream, outPath);
756 }
757 else
758 {
759 base.Export(outPath);
760 }
761 }
Definition: WAV.cs:212
static void ToFile(IAudioStream source, string path, int samplePosition=0, int maxSampleCount=int.MaxValue)
Definition: WAV.cs:218

◆ OnCalculateSize()

override int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.OnCalculateSize ( bool  force)
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

686 {
687 int size = INFOSoundEntry.Size + Sound3DParam.Size;
688 switch (SoundType)
689 {
690 case SndType.SEQ:
691 size += SeqSoundInfo.Size;
692 break;
693 case SndType.STRM:
694 size += StrmSoundInfo.Size;
695 break;
696 case SndType.WAVE:
697 size += WaveSoundInfo.Size;
698 break;
699 }
700
701 return size;
702 }
SndType SoundType
Definition: RSARSoundNode.cs:198
const int Size
Definition: RSAR.cs:619
const int Size
Definition: RSAR.cs:606
const int Size
Definition: RSAR.cs:634
const int Size
Definition: RSAR.cs:645

◆ OnInitialize()

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

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

607 {
608 base.OnInitialize();
609
610 _fileId = Header->_fileId;
611 _playerId = Header->_playerId;
612 _volume = Header->_volume;
613 _playerPriority = Header->_playerPriority;
614 _soundType = Header->_soundType;
615 _remoteFilter = Header->_remoteFilter;
616 _panMode = Header->_panMode;
617 _panCurve = Header->_panCurve;
618 _actorPlayerId = Header->_actorPlayerId;
619 _p1 = Header->_userParam1;
620 _p2 = Header->_userParam2;
621
622 INFOHeader* info = RSARNode.Header->INFOBlock;
623 _sound3dParam = *Header->GetParam3dRef(&info->_collection);
624
625 VoidPtr addr = Header->GetSoundInfoRef(&info->_collection);
626 switch (Header->_soundInfoRef._dataType)
627 {
628 case 1:
629 _seqInfo = *(SeqSoundInfo*) addr;
630 break;
631 case 2:
632 _strmInfo = *(StrmSoundInfo*) addr;
633 break;
634 case 3:
635 _waveInfo = *(WaveSoundInfo*) addr;
636 break;
637 }
638
641
642 if (_soundFileNode is RSEQNode)
643 {
644 foreach (RSEQLabelNode r in _soundFileNode.Children)
645 {
646 if (_seqInfo._dataID == r.Id)
647 {
648 _seqLabl = r;
649 break;
650 }
651 }
652 }
653
654 if (_waveInfo._soundIndex >= 0 &&
655 _soundFileNode is RWSDNode &&
656 _soundFileNode.Children.Count > 0 &&
657 _soundFileNode.Children[0].Children.Count > _waveInfo._soundIndex)
658 {
659 _waveDataNode = _soundFileNode.Children[0].Children[_waveInfo._soundIndex] as RWSDDataNode;
660 _waveDataNode?._refs.Add(this);
661 }
662
663 return false;
664 }
RSARNode RSARNode
Definition: RSAREntryNode.cs:14
void AddSoundRef(RSARSoundNode n)
Definition: RSARFileNode.cs:78
BindingList< RSARFileNode > Files
Definition: RSARNode.cs:174
int _fileId
Definition: RSARSoundNode.cs:59
int _playerId
Definition: RSARSoundNode.cs:60
StrmSoundInfo _strmInfo
Definition: RSARSoundNode.cs:38
byte _remoteFilter
Definition: RSARSoundNode.cs:64
int _p2
Definition: RSARSoundNode.cs:68
int _p1
Definition: RSARSoundNode.cs:68
RSEQLabelNode _seqLabl
Definition: RSARSoundNode.cs:41
byte _actorPlayerId
Definition: RSARSoundNode.cs:67
SeqSoundInfo _seqInfo
Definition: RSARSoundNode.cs:39
List< RSARSoundNode > _refs
Definition: RWSDDataNode.cs:19
Definition: VoidPtr.cs:9
buint _dataID
Definition: RSAR.cs:621
bint _soundIndex
Definition: RSAR.cs:647

◆ OnRebuild()

override void BrawlLib.SSBB.ResourceNodes.RSARSoundNode.OnRebuild ( VoidPtr  address,
int  length,
bool  force 
)
inlinevirtual

Reimplemented from BrawlLib.SSBB.ResourceNodes.ResourceNode.

705 {
706 INFOSoundEntry* header = (INFOSoundEntry*) address;
707 VoidPtr addr = address + INFOSoundEntry.Size;
708 header->_stringId = _rebuildStringId;
709 header->_fileId = _fileId;
710 header->_playerId = _playerId;
711 header->_volume = _volume;
712 header->_playerPriority = _playerPriority;
713 header->_soundType = _soundType;
714 header->_remoteFilter = _remoteFilter;
715 header->_panMode = _panMode;
716 header->_panCurve = _panCurve;
717 header->_actorPlayerId = _actorPlayerId;
718 header->_soundInfoRef = (uint) (addr - _rebuildBase);
719 header->_userParam1 = _p1;
720 header->_userParam2 = _p2;
721 switch (SoundType)
722 {
723 case SndType.SEQ:
724 *(SeqSoundInfo*) addr = _seqInfo;
725 header->_soundInfoRef._dataType = 1;
726 addr += SeqSoundInfo.Size;
727 break;
728 case SndType.STRM:
729 *(StrmSoundInfo*) addr = _strmInfo;
730 header->_soundInfoRef._dataType = 2;
731 addr += StrmSoundInfo.Size;
732 break;
733 case SndType.WAVE:
734 *(WaveSoundInfo*) addr = _waveInfo;
735 header->_soundInfoRef._dataType = 3;
736 addr += WaveSoundInfo.Size;
737 break;
738 }
739
740 header->_param3dRefOffset = (uint) (addr - _rebuildBase);
741 *(Sound3DParam*) addr = _sound3dParam;
742 }
VoidPtr _rebuildBase
Definition: RSAREntryNode.cs:92
int _rebuildStringId
Definition: RSAREntryNode.cs:93

Member Data Documentation

◆ _actorPlayerId

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode._actorPlayerId

◆ _fileId

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode._fileId

◆ _p1

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode._p1

◆ _p2

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode._p2

◆ _panCurve

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode._panCurve

◆ _panMode

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode._panMode

◆ _playerId

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode._playerId

◆ _playerPriority

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode._playerPriority

◆ _remoteFilter

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode._remoteFilter

◆ _seqInfo

SeqSoundInfo BrawlLib.SSBB.ResourceNodes.RSARSoundNode._seqInfo

◆ _seqLabl

RSEQLabelNode BrawlLib.SSBB.ResourceNodes.RSARSoundNode._seqLabl

◆ _sound3dParam

Sound3DParam BrawlLib.SSBB.ResourceNodes.RSARSoundNode._sound3dParam

◆ _soundFileNode

RSARFileNode BrawlLib.SSBB.ResourceNodes.RSARSoundNode._soundFileNode

◆ _soundType

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode._soundType = 3

◆ _stream

IAudioStream BrawlLib.SSBB.ResourceNodes.RSARSoundNode._stream

◆ _strmInfo

StrmSoundInfo BrawlLib.SSBB.ResourceNodes.RSARSoundNode._strmInfo

◆ _volume

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode._volume

◆ _waveDataNode

RWSDDataNode BrawlLib.SSBB.ResourceNodes.RSARSoundNode._waveDataNode

◆ _waveInfo

WaveSoundInfo BrawlLib.SSBB.ResourceNodes.RSARSoundNode._waveInfo

Property Documentation

◆ ActorPlayerId

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.ActorPlayerId
getset
242 {
243 get => _actorPlayerId;
244 set
245 {
246 _actorPlayerId = value;
248 }
249 }
virtual void SignalPropertyChange()
Definition: ResourceNode.cs:313

◆ AllocChannelCount

ushort BrawlLib.SSBB.ResourceNodes.RSARSoundNode.AllocChannelCount
getset
472 {
474 set
475 {
476 _strmInfo._allocChannelCount = value;
478 }
479 }
bushort _allocChannelCount
Definition: RSAR.cs:637

◆ BankFile

string BrawlLib.SSBB.ResourceNodes.RSARSoundNode.BankFile
getset
372 {
373 get => RBNKNode == null ? "<null>" : RBNKNode.TreePath;
374 set
375 {
376 if (string.IsNullOrEmpty(value))
377 {
378 _seqInfo._bankId = -1;
379 }
380 else
381 {
382 RSARBankNode node = null;
383 int t = 0;
384 foreach (ResourceNode r in RSARNode._infoCache[1])
385 {
386 if (r.Name == value && r is RSARBankNode)
387 {
388 node = r as RSARBankNode;
389 break;
390 }
391
392 t++;
393 }
394
395 if (node != null)
396 {
397 _seqInfo._bankId = t;
399 }
400 }
401 }
402 }
List< RSAREntryNode >[] _infoCache
Definition: RSARNode.cs:169
RSARBankNode RBNKNode
Definition: RSARSoundNode.cs:47
virtual string TreePath
Definition: ResourceNode.cs:202

◆ ChannelPriority

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.ChannelPriority
getset
574 {
576 set
577 {
578 _waveInfo._channelPriority = value;
580 }
581 }

◆ Channels

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.Channels
get

◆ DecayCurve

DecayCurve BrawlLib.SSBB.ResourceNodes.RSARSoundNode.DecayCurve
getset
296 {
298 set
299 {
300 _sound3dParam._decayCurve = (byte) value;
302 }
303 }
byte _decayCurve
Definition: RSAR.cs:609

◆ DecayRatio

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.DecayRatio
getset
307 {
309 set
310 {
311 _sound3dParam._decayRatio = value;
313 }
314 }

◆ DopplerFactor

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.DopplerFactor
getset
318 {
320 set
321 {
322 _sound3dParam._dopplerFactor = value;
324 }
325 }
byte _dopplerFactor
Definition: RSAR.cs:611

◆ Encoding

WaveEncoding BrawlLib.SSBB.ResourceNodes.RSARSoundNode.Encoding
get

◆ Flags

Sound3DFlags BrawlLib.SSBB.ResourceNodes.RSARSoundNode.Flags
getset
285 {
286 get => (Sound3DFlags) (uint) _sound3dParam._flags;
287 set
288 {
289 _sound3dParam._flags = (uint) value;
291 }
292 }

◆ IsLooped

bool BrawlLib.SSBB.ResourceNodes.RSARSoundNode.IsLooped
get

◆ LoopStartSample

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.LoopStartSample
get

◆ NumSamples

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.NumSamples
get

◆ PanCurve

PanCurve BrawlLib.SSBB.ResourceNodes.RSARSoundNode.PanCurve
getset
231 {
232 get => (PanCurve) _panCurve;
233 set
234 {
235 _panCurve = (byte) value;
237 }
238 }

◆ PanMode

PanMode BrawlLib.SSBB.ResourceNodes.RSARSoundNode.PanMode
getset
220 {
221 get => (PanMode) _panMode;
222 set
223 {
224 _panMode = (byte) value;
226 }
227 }

◆ PlayerId

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.PlayerId
getset
165 {
166 get => _playerId;
167 set
168 {
169 _playerId = value;
171 }
172 }

◆ PlayerPriority

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.PlayerPriority
getset
187 {
188 get => _playerPriority;
189 set
190 {
191 _playerPriority = value;
193 }
194 }

◆ RBNKNode

RSARBankNode BrawlLib.SSBB.ResourceNodes.RSARSoundNode.RBNKNode
get
47 {
48 get
49 {
50 if (_seqInfo._bankId < RSARNode._infoCache[1].Count)
51 {
52 return RSARNode._infoCache[1][_seqInfo._bankId] as RSARBankNode;
53 }
54
55 return null;
56 }
57 }
bint _bankId
Definition: RSAR.cs:622

◆ ReleasePriorityFix

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.ReleasePriorityFix
getset
585 {
587 set
588 {
589 _waveInfo._releasePriorityFix = value;
591 }
592 }
byte _releasePriorityFix
Definition: RSAR.cs:650

◆ RemoteFilter

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.RemoteFilter
getset
209 {
210 get => _remoteFilter;
211 set
212 {
213 _remoteFilter = value;
215 }
216 }

◆ ResourceFileType

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

◆ RSEQAllocTrack

AllocTrackEnum BrawlLib.SSBB.ResourceNodes.RSARSoundNode.RSEQAllocTrack
getset
428 {
429 get => (AllocTrackEnum) (uint) _seqInfo._allocTrack;
430 set
431 {
432 _seqInfo._allocTrack = (uint) value;
434 }
435 }
AllocTrackEnum
Definition: RSARSoundNode.cs:406
buint _allocTrack
Definition: RSAR.cs:623

◆ RSTMAllocTrack

AllocTrackEnum BrawlLib.SSBB.ResourceNodes.RSARSoundNode.RSTMAllocTrack
getset
483 {
484 get => (AllocTrackEnum) (ushort) _strmInfo._allocTrackFlag;
485 set
486 {
487 _strmInfo._allocTrackFlag = (ushort) value;
489 }
490 }
bushort _allocTrackFlag
Definition: RSAR.cs:638

◆ RWSDAllocTrack

AllocTrackEnum BrawlLib.SSBB.ResourceNodes.RSARSoundNode.RWSDAllocTrack
getset
563 {
564 get => (AllocTrackEnum) (uint) _waveInfo._allocTrack;
565 set
566 {
567 _waveInfo._allocTrack = (uint) value;
569 }
570 }

◆ SampleRate

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.SampleRate
get

◆ SeqChannelPriority

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.SeqChannelPriority
getset
439 {
441 set
442 {
443 _seqInfo._channelPriority = value;
445 }
446 }
byte _channelPriority
Definition: RSAR.cs:624

◆ SeqLabelEntry

string BrawlLib.SSBB.ResourceNodes.RSARSoundNode.SeqLabelEntry
getset
331 {
332 get => _seqLabl == null
333 ? _soundFileNode is RSARExtFileNode && SoundType == SndType.SEQ ? "<null>" :
335 : _seqLabl._name;
336 set
337 {
338 if (string.IsNullOrEmpty(value))
339 {
340 _seqInfo._dataID = 0;
341 }
342 else
343 {
344 if (SoundFileNode is RSEQNode)
345 {
346 foreach (RSEQLabelNode r in SoundFileNode.Children)
347 {
348 if (r.Name == value)
349 {
350 _seqInfo._dataID = r.Id;
352 break;
353 }
354
355 if (SoundFileNode is RSARExtFileNode)
356 {
357 if (uint.TryParse(value, out uint id))
358 {
359 _seqInfo._dataID = id;
360 }
361 }
362 }
363 }
364 }
365 }
366 }
RSARFileNode SoundFileNode
Definition: RSARSoundNode.cs:81
string _name
Definition: ResourceNode.cs:139
override string ToString()
Definition: BigEndianTypes.cs:101

◆ SeqReleasePriorityFix

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.SeqReleasePriorityFix
getset
450 {
452 set
453 {
454 _seqInfo._releasePriorityFix = value;
456 }
457 }
byte _releasePriorityFix
Definition: RSAR.cs:625

◆ SoundDataNode

string BrawlLib.SSBB.ResourceNodes.RSARSoundNode.SoundDataNode
getset
496 {
497 get => _waveDataNode == null ? "<null>" : _waveDataNode._name;
498 set
499 {
500 if (string.IsNullOrEmpty(value))
501 {
502 _waveInfo._soundIndex = -1;
503 if (_waveDataNode != null)
504 {
505 _waveDataNode._refs.Remove(this);
506 _waveDataNode.GetName();
507 _waveDataNode = null;
508 }
509 }
510 else
511 {
512 if (SoundFileNode == null || SoundType != SndType.WAVE)
513 {
514 return;
515 }
516
517 RWSDDataNode node = null;
518 int t = 0;
519
520 if (value != null)
521 {
522 foreach (RWSDDataNode r in SoundFileNode.Children[0].Children)
523 {
524 if (r.Name == value)
525 {
526 node = r;
527 break;
528 }
529
530 t++;
531 }
532 }
533
534 if (node != null)
535 {
536 _waveInfo._soundIndex = t;
537
538 if (_waveDataNode != null)
539 {
540 _waveDataNode._refs.Remove(this);
541 _waveDataNode.GetName();
542 }
543
544 _waveDataNode = node;
545 _waveDataNode._refs.Add(this);
546 _waveDataNode.GetName();
547 }
548 else
549 {
550 _waveInfo._soundIndex = -1;
551 _waveDataNode = null;
552 }
553
555 }
556 }
557 }

◆ SoundFile

string BrawlLib.SSBB.ResourceNodes.RSARSoundNode.SoundFile
getset
111 {
112 get => _soundFileNode == null ? "<null>" : _soundFileNode._name;
113 set
114 {
115 if (string.IsNullOrEmpty(value))
116 {
117 SoundFileNode = null;
118 }
119 else
120 {
121 Type e;
122 switch (SoundType)
123 {
124 default: return;
125 case SndType.SEQ:
126 e = typeof(RSEQNode);
127 break;
128 case SndType.STRM:
129 e = typeof(RSTMNode);
130 break;
131 case SndType.WAVE:
132 e = typeof(RWSDNode);
133 break;
134 }
135
136 int t = 0;
137 RSARFileNode node = null;
138 Type ext = typeof(RSARExtFileNode);
139 foreach (RSARFileNode r in RSARNode.Files)
140 {
141 if (r.Name == value)
142 {
143 Type thisType = r.GetType();
144 if (thisType == e || thisType == ext)
145 {
146 node = r;
147 break;
148 }
149 }
150
151 ++t;
152 }
153
154 if (node != null)
155 {
156 SoundFileNode = node;
157 _fileId = t;
158 }
159 }
160 }
161 }

◆ SoundFileNode

RSARFileNode BrawlLib.SSBB.ResourceNodes.RSARSoundNode.SoundFileNode
getset
81 {
82 get => _soundFileNode;
83 set
84 {
85 if (_soundFileNode != value)
86 {
87 if (_waveDataNode != null)
88 {
89 _waveInfo._soundIndex = -1;
90 _waveDataNode._refs.Remove(this);
91 _waveDataNode.GetName();
92 _waveDataNode = null;
93 }
94
95 if (_seqLabl != null)
96 {
97 _seqInfo._dataID = 0;
98 _seqLabl = null;
99 }
100
101 _soundFileNode = value;
103 }
104 }
105 }

◆ SoundType

SndType BrawlLib.SSBB.ResourceNodes.RSARSoundNode.SoundType
getset
198 {
199 get => (SndType) _soundType;
200 set
201 {
202 _soundType = ((byte) value).Clamp(1, 3);
204 }
205 }

◆ StartPosition

uint BrawlLib.SSBB.ResourceNodes.RSARSoundNode.StartPosition
getset
461 {
463 set
464 {
465 _strmInfo._startPosition = value;
467 }
468 }
buint _startPosition
Definition: RSAR.cs:636

◆ StringId

override int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.StringId
get

◆ UserParam1

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.UserParam1
getset
253 {
254 get => _p1;
255 set
256 {
257 _p1 = value;
259 }
260 }

◆ UserParam2

int BrawlLib.SSBB.ResourceNodes.RSARSoundNode.UserParam2
getset
264 {
265 get => _p2;
266 set
267 {
268 _p2 = value;
270 }
271 }

◆ Volume

byte BrawlLib.SSBB.ResourceNodes.RSARSoundNode.Volume
getset
176 {
177 get => _volume;
178 set
179 {
180 _volume = value;
182 }
183 }

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