Skip to content

Commit

Permalink
Song Scanning Refactor (YARC-Official#886)
Browse files Browse the repository at this point in the history
+ Improvements in `readonly` usage on entries
+ Optimizations with the cache file
+ Optimizations with memory usage during scan
  • Loading branch information
sonicfind authored Oct 22, 2024
1 parent a06b7dc commit 603dcfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Assets/Script/Audio/Bass/BassStemMixer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ protected override int Play_Internal(bool restartBuffer)
protected override void FadeIn_Internal(double maxVolume, double duration)
{
float scaled = (float) BassAudioManager.ExponentialVolume(maxVolume);
Bass.ChannelSlideAttribute(_mixerHandle, ChannelAttribute.Volume, scaled, (int) (duration * SongEntry.MILLISECOND_FACTOR));
Bass.ChannelSlideAttribute(_mixerHandle, ChannelAttribute.Volume, scaled, (int) (duration * SongMetadata.MILLISECOND_FACTOR));
}

protected override void FadeOut_Internal(double duration)
{
Bass.ChannelSlideAttribute(_mixerHandle, ChannelAttribute.Volume, 0, (int) (duration * SongEntry.MILLISECOND_FACTOR));
Bass.ChannelSlideAttribute(_mixerHandle, ChannelAttribute.Volume, 0, (int) (duration * SongMetadata.MILLISECOND_FACTOR));
}

protected override int Pause_Internal()
Expand Down
2 changes: 1 addition & 1 deletion YARG.Core
Submodule YARG.Core updated 66 files
+1 −1 TestConsole/CacheLoader.cs
+1 −2 YARG.Core.Benchmarks/Parsing/DotChartParsingBenchmarks.cs
+1 −3 YARG.Core.Benchmarks/Parsing/MidiParsingBenchmarks.cs
+2 −4 YARG.Core.UnitTests/Engine/DrumEngineTester.cs
+2 −2 YARG.Core.UnitTests/Parsing/ParseBehaviorTests.Midi.cs
+2 −2 YARG.Core/Chart/Loaders/MoonSong/MoonSongLoader.Lyrics.cs
+3 −6 YARG.Core/Chart/Loaders/MoonSong/MoonSongLoader.cs
+19 −59 YARG.Core/Chart/ParsingProperties.cs
+57 −1 YARG.Core/Extensions/StreamExtensions.cs
+3 −3 YARG.Core/IO/AbridgedFileInfo.cs
+36 −63 YARG.Core/IO/ConHandler/CONFile.cs
+2 −6 YARG.Core/IO/ConHandler/CONFileListing.cs
+310 −0 YARG.Core/IO/DTA/DTAEntry.cs
+5 −7 YARG.Core/IO/DTA/YARGDTAReader.cs
+2 −5 YARG.Core/IO/FixedArray.cs
+25 −24 YARG.Core/IO/Ini/SongIniHandler.cs
+9 −7 YARG.Core/IO/Midi/YARGMidiFile.cs
+2 −2 YARG.Core/IO/SngHandler/SngFile.cs
+16 −8 YARG.Core/IO/TextReader/YARGTextContainer.cs
+16 −1 YARG.Core/IO/YARGChartFileReader.cs
+0 −12 YARG.Core/MoonscraperChartParser/IO/Chart/ChartIOHelper.cs
+16 −20 YARG.Core/MoonscraperChartParser/IO/Chart/ChartReader.cs
+1 −6 YARG.Core/MoonscraperChartParser/IO/Midi/MidIOHelper.cs
+17 −28 YARG.Core/MoonscraperChartParser/IO/Midi/MidReader.cs
+4 −4 YARG.Core/MoonscraperChartParser/MoonSong.cs
+16 −0 YARG.Core/Song/Cache/CONModification.cs
+16 −17 YARG.Core/Song/Cache/CacheGroups/CacheGroup.cs
+52 −45 YARG.Core/Song/Cache/CacheGroups/ConGroup.cs
+13 −13 YARG.Core/Song/Cache/CacheGroups/IModificationGroup.cs
+34 −20 YARG.Core/Song/Cache/CacheGroups/IniGroup.cs
+0 −18 YARG.Core/Song/Cache/CacheGroups/LockedList.cs
+26 −106 YARG.Core/Song/Cache/CacheGroups/PackedCONGroup.cs
+7 −45 YARG.Core/Song/Cache/CacheGroups/UnpackedCONGroup.cs
+30 −55 YARG.Core/Song/Cache/CacheGroups/UpdateGroup.cs
+18 −31 YARG.Core/Song/Cache/CacheGroups/UpgradeGroup.cs
+57 −130 YARG.Core/Song/Cache/CacheHandler.Parallel.cs
+77 −103 YARG.Core/Song/Cache/CacheHandler.Sequential.cs
+829 −442 YARG.Core/Song/Cache/CacheHandler.cs
+0 −1 YARG.Core/Song/Cache/CacheNodes.cs
+1 −3 YARG.Core/Song/Cache/FileCollection.cs
+9 −8 YARG.Core/Song/Cache/SongCategories.cs
+0 −6 YARG.Core/Song/Entries/AvailableParts/AvailableParts.cs
+217 −144 YARG.Core/Song/Entries/Ini/SongEntry.IniBase.cs
+91 −67 YARG.Core/Song/Entries/Ini/SongEntry.Sng.cs
+93 −75 YARG.Core/Song/Entries/Ini/SongEntry.UnpackedIni.cs
+11 −13 YARG.Core/Song/Entries/RBCON/RBAudio.cs
+0 −5 YARG.Core/Song/Entries/RBCON/RBCONDifficulties.cs
+73 −2 YARG.Core/Song/Entries/RBCON/RBMetadata.cs
+6 −7 YARG.Core/Song/Entries/RBCON/RBProUpgrade.cs
+104 −96 YARG.Core/Song/Entries/RBCON/SongEntry.PackedRBCON.cs
+414 −722 YARG.Core/Song/Entries/RBCON/SongEntry.RBCON.cs
+78 −84 YARG.Core/Song/Entries/RBCON/SongEntry.UnpackedRBCON.cs
+0 −4 YARG.Core/Song/Entries/SongEntry.Loading.cs
+17 −7 YARG.Core/Song/Entries/SongEntry.Scanning.cs
+1 −4 YARG.Core/Song/Entries/SongEntry.Sorting.cs
+130 −430 YARG.Core/Song/Entries/SongEntry.cs
+9 −0 YARG.Core/Song/Entries/Types/HashWrapper.cs
+176 −3 YARG.Core/Song/Entries/Types/SongMetadata.cs
+11 −16 YARG.Core/Song/Preparsers/DrumPreparseHandler.cs
+8 −11 YARG.Core/Song/Preparsers/Midi/MidiEliteDrumsPreparser.cs
+7 −7 YARG.Core/Song/Preparsers/Midi/MidiFiveFretPreparser.cs
+1 −3 YARG.Core/Song/Preparsers/Midi/MidiInstrumentPreparser.cs
+7 −7 YARG.Core/Song/Preparsers/Midi/MidiProGuitarPreparser.cs
+4 −3 YARG.Core/Song/Preparsers/Midi/MidiProKeysPreparser.cs
+7 −7 YARG.Core/Song/Preparsers/Midi/MidiSixFretPreparser.cs
+1 −2 YARG.Core/Song/Preparsers/Midi/MidiVocalPreparser.cs

0 comments on commit 603dcfb

Please sign in to comment.