Skip to content

Fix ScdFile#GetAudio for OGG files#131

Merged
NotAdam merged 2 commits into
NotAdam:masterfrom
RajahOmen:master
Jul 20, 2026
Merged

Fix ScdFile#GetAudio for OGG files#131
NotAdam merged 2 commits into
NotAdam:masterfrom
RajahOmen:master

Conversation

@RajahOmen

Copy link
Copy Markdown
Contributor

Fix for #116, based on what I found to work when looking into it.

In addition to the test included in the PR, I ran the change against all .scd files in this rl2 pathlist via the following test code

    [RequiresGameInstallationFact]
    public void ScdFilesAreLoadedCorrectlyAll()
    {
        var gameData = RequiresGameInstallationFact.CreateGameData();
        var filePaths = File.ReadAllLines(@"C:\Users\USER\Documents\scdFiles.txt");
    
        Assert.All(
            filePaths.Select(p => {
                try
                {
                    return gameData.GetFile<ScdFile>(p);
                }
                catch
                {
                    return null;
                }
            }).Where(p => p is not null),
            file => {
                Assert.NotEmpty( file.Data );
                for (var i = 0; i < file.AudioDataCount; i++)
                {
                    Assert.NotNull(file.GetAudio(i));
                }
            }
        );
    }

@NotAdam
NotAdam merged commit 02934e4 into NotAdam:master Jul 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants