vgmrips / vgmplay-legacy

VGM file command-line player and Winamp plugin.
http://vgmrips.net
221 stars 52 forks source link

It's not currently possible to run vgmplay as background process #73

Closed it-s closed 4 years ago

it-s commented 4 years ago

Steps to reproduce: Under Linux terminal run: vgmplay tune.vgz &

Expeted: tune.vgz should be now playing in background Actual: vgmplay shows only pune.vgz info and then stops

VGM Player
----------

File Name:  tune.vgz

Track Title:    Title
Used chips: YMF278B  

Warning! OPL4 Sample ROM (yrw801.rom) not found!

[1]+  Stopped                 vgmplay ./tune.vgz
zvezdochiot commented 4 years ago

:question: Maybe?:

sh -c "vgmplay tune.vgz" &
it-s commented 4 years ago

Maybe?:

sh -c "vgmplay tune.vgz" &

Unfortunately no. Result is the same. Process stops right after is displays the tune details

it-s commented 4 years ago

Seemingly related issue happens if you try to run vgmplay as a child process: play.js:

const { spawn } = require('child_process');
const vgmplay = spawn("vgmplay", ["tune.vgz"]);
vgmplay.on('close', () => {
    process.exit(0);
});

node play.js Tune plays for 4 seconds, then stops and hangs silently.

superctr commented 4 years ago

What happens if you build vgmplay without dbus support?

ValleyBell commented 4 years ago

TBH this is not a use case I ever considered.

VGMPlay modifies a few terminal options in order to test for keys. This could also be a reason for it breaking.

Regarding it not playing any sound in the first post: There was a warning OPL4 Sample ROM (yrw801.rom) not found!. That usually indicates that most OPL4 samples will be missing and thus there will be no sound. The OPL4 chip is the only one where VGMPlay relies on an external ROM file. You should try VGMs that use other chips when doing your tests.

superctr commented 4 years ago

side note: Not all OPL4 VGMs use the yrw801.rom file. Only a few MSX rips do. Arcade VGMs and conversions (like mod2vgm) don't use the yrw801.rom.

it-s commented 4 years ago

What happens if you build vgmplay without dbus support?

Same. Setting USE_DBUS=0 makes no difference sadly.

TBH this is not a use case I ever considered.

VGMPlay modifies a few terminal options in order to test for keys. This could also be a reason for it breaking.

Regarding it not playing any sound in the first post: There was a warning OPL4 Sample ROM (yrw801.rom) not found!. That usually indicates that most OPL4 samples will be missing and thus there will be no sound. The OPL4 chip is the only one where VGMPlay relies on an external ROM file. You should try VGMs that use other chips when doing your tests.

OPL4 Sample ROM (yrw801.rom) not found! is not an issue here as the same file plays perfectly in foreground. I wanted to use playvgm as a background service for my raspberry pi retro player. Currently using adplug successfully to play adlib formats already. Anyway. I'll try to modify the player code and see if I can find the issue.

it-s commented 4 years ago

I ended up making a fork of the repo and implementing a very simple, barebones CMD player https://github.com/it-s/vgmplay All it does is just that - plays the music and then exits. Works just fine in background, which tells me that it's likely the UI of your player that makes the whole thing hang there.