Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music omits last pattern of song #457

Closed
sfiera opened this issue Jul 27, 2023 · 4 comments
Closed

Music omits last pattern of song #457

sfiera opened this issue Jul 27, 2023 · 4 comments

Comments

@sfiera
Copy link
Member

sfiera commented Jul 27, 2023

Apparently sections of the music are dropped, particularly at the beginning/end of the loop.
Not clear if the problem is in the libmodplug renderer or in the XAudio2 driver.

@sfiera
Copy link
Member Author

sfiera commented Aug 1, 2023

As a quick check I printed out the length of the converted audio but it seems to match between platforms:

music: doomtroopers-unite 26744832 2 44100
music: autoregret 14920704 2 44100
music: freds-theme 20281344 2 44100
music: eyes-of-fire 18984960 2 44100
music: doomtroopers-unite 26744832 2 44100
music: freds-theme 20281344 2 44100
music: yesterday 14405632 2 44100
music: doomtroopers-unite 26744832 2 44100

e.g. Yesterday should be (14405632 ÷ (44100 × 2 × 2)) = 81.66 seconds long on both platforms.

@sfiera
Copy link
Member Author

sfiera commented Aug 1, 2023

I don’t think this is Windows-specific. I hear a pause at the end of tracks on Mac too.

@sfiera sfiera changed the title Music plays improperly on Windows Music plays improperly Aug 1, 2023
@sfiera
Copy link
Member Author

sfiera commented Aug 1, 2023

There seems to be a problem with libmodplug where 6 bytes are required after the last pattern or else it will be dropped. Reported as Konstanty/libmodplug#95, but I for now I’ll just add padding to the Antares data.

@sfiera
Copy link
Member Author

sfiera commented Aug 1, 2023

With these changes the lengths I see are:

music: doomtroopers-unite 26744832 2 44100
music: autoregret 16275456 2 44100
music: freds-theme 21473280 2 44100
music: eyes-of-fire 21694464 2 44100
music: doomtroopers-unite 26744832 2 44100
music: freds-theme 21473280 2 44100
music: yesterday 15252480 2 44100
music: doomtroopers-unite 26744832 2 44100

@sfiera sfiera self-assigned this Aug 2, 2023
@sfiera sfiera changed the title Music plays improperly Music omits last pattern of song Aug 2, 2023
@sfiera sfiera closed this as completed Aug 2, 2023
@github-project-automation github-project-automation bot moved this from To do to Done in Windows Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant