DeaDBeeF-Player / deadbeef

DeaDBeeF Player
https://deadbeef.sourceforge.io/
Other
1.62k stars 177 forks source link

Game-music-emu plugin's fadeout feature doesn't work #2022

Closed LaserMoai closed 6 years ago

LaserMoai commented 6 years ago

The looping tracks don't fade out for me regardless of the format, even though the plugin's configuration window implies that they should. Audacious, for example, fades them out fine.

Deadbeef version: 0.7.2

Oleksiy-Yakovenko commented 6 years ago

does it happen with the 1.8beta?

LaserMoai commented 6 years ago

The current trunk seems to have fixed the issue, but only for vgm format.

Oleksiy-Yakovenko commented 6 years ago

OK, I'll check the issue out, but I'm pretty sure it was reported before, and it works by design. It depends on the track type. Fadeouts only happen for tracks with infinite length, or something like that.

Oleksiy-Yakovenko commented 6 years ago

Just tried some looping NSF files, they fade out just fine. Which files did you use, and what are the settings of the GME plugin?

LaserMoai commented 6 years ago

The current trunk fades out vanilla NSF, but it doesn't fade out NSFe and SPC, basically the non-VGM formats with timing.

Oleksiy-Yakovenko commented 6 years ago

Timed formats are not supposed to fade out -- they have the defined intro and outro. What is your use-case?

LaserMoai commented 6 years ago

Not in the case of looping tracks in these formats. They can't have an outro. As I have already said, Audacious fades them out fine.

Oleksiy-Yakovenko commented 6 years ago

Can you provide an example which have an intro, a looping part, and no outro?

Oleksiy-Yakovenko commented 6 years ago

To my best knowledge, deadbeef's GME plugin will only fade-out those chiptunes which don't have a predefined length. I.e. the ones like NSF, which play for the number of loops specified in the settings. The other ones which specify the length won't fade out.

Oleksiy-Yakovenko commented 6 years ago

I don't have a big collection of any other GME chiptunes.. Found a few SPC files, all of them just have their length predefined, with no looping info, so there doesn't seem to be a way to find whether they are looping or not.

Just to give you some context..

This is an NSF, its duration is unknown, so it will play for 3 minutes (default), then fade out:

image

And this is an SPC.. image

It says duration is 111000 ms (1:51). It doesn't say that the music needs to loop. There's no way to find out that is has a looping part. Obviously, I can make it fade -- but then other non-looping tunes would fade, even when they should not.

LaserMoai commented 6 years ago

I can't say I'm well-versed in technical details, but Audacious manages to determine that it shouldn't fade out the track "Cease Fire" here while still fading out the stage themes and other looping tracks.

Oleksiy-Yakovenko commented 6 years ago

ok, thanks for the example files, I'll keep looking

Oleksiy-Yakovenko commented 6 years ago

I just looked how foo_gep does it with SPC..

Basically, it simply adds +10 seconds to the length of all songs, and uses that for fading out. Even for the songs which don't need fading. Those songs would play a bit of additional silence, but then will stop sooner than 10 sec because of silence detection.

Oleksiy-Yakovenko commented 6 years ago

It's still a bit quirky and might need more testing, and most likely you'd need to re-import the files into deadbeef -- but otherwise should work.