SpaceCadetPinball icon indicating copy to clipboard operation
SpaceCadetPinball copied to clipboard

Music not working on Linux build

Open Alee14 opened this issue 3 years ago • 14 comments

Hello, so I tried turning on the music and nothing is playing. (Yes I have all the pinball assets on the same directory)

Alee14 avatar Oct 21 '21 20:10 Alee14

Hi.

There are two possible causes for this: • Something wrong with your midi synth setup • Something wrong with music file loading.

I don’t think my loading code is wrong, but just in case, share your game folder structure. Relative paths to music and sounds are hardcoded and might not match with what you have.

For the synth part: I am not a Linux user, so can’t really help much here. In my tests, it worked out of the box on Debian sid. SDL might output some errors about this into game console.

Try installing some synths: Libfluidsynth, Timidity. And sound fonts: Freepats. It is also possible that some configuration is required.

k4zmu2a avatar Oct 22 '21 05:10 k4zmu2a

Here's my game folder structure

drwx------ andrew andrew 4.0 KB Fri Apr  1 17:18:34 2005  en-US
.rw-r--r-- andrew andrew 3.9 KB Tue Jan 25 15:00:08 2005  FONT.DAT
.rw-r--r-- andrew andrew 907 KB Tue Jan 25 15:00:08 2005  PINBALL.DAT
.rw-r--r-- andrew andrew 106 KB Tue Jan 25 15:00:08 2005  PINBALL.MID
.rw-r--r-- andrew andrew  28 KB Tue Jan 25 15:00:08 2005  PINBALL2.MID
.rw-r--r-- andrew andrew 113 B  Sat Apr  2 00:19:58 2005  readme.txt
.rw-r--r-- andrew andrew  54 KB Tue Jan 25 15:00:09 2005  SOUND1.WAV
.rw-r--r-- andrew andrew 1.2 KB Tue Jan 25 15:00:09 2005  SOUND104.WAV
.rw-r--r-- andrew andrew 1.9 KB Tue Jan 25 15:00:09 2005  SOUND105.WAV
.rw-r--r-- andrew andrew 7.6 KB Tue Jan 25 15:00:09 2005  SOUND108.WAV
.rw-r--r-- andrew andrew 890 B  Tue Jan 25 15:00:09 2005  SOUND111.WAV
.rw-r--r-- andrew andrew 824 B  Tue Jan 25 15:00:09 2005  SOUND112.WAV
.rw-r--r-- andrew andrew 4.2 KB Tue Jan 25 15:00:09 2005  SOUND12.WAV
.rw-r--r-- andrew andrew 7.8 KB Tue Jan 25 15:00:09 2005  SOUND13.WAV
.rw-r--r-- andrew andrew 1.3 KB Tue Jan 25 15:00:09 2005  SOUND131.WAV
.rw-r--r-- andrew andrew  19 KB Tue Jan 25 15:00:09 2005  SOUND136.WAV
.rw-r--r-- andrew andrew 2.9 KB Tue Jan 25 15:00:09 2005  SOUND14.WAV
.rw-r--r-- andrew andrew 1.0 KB Tue Jan 25 15:00:09 2005  SOUND16.WAV
.rw-r--r-- andrew andrew 2.0 KB Tue Jan 25 15:00:09 2005  SOUND17.WAV
.rw-r--r-- andrew andrew 3.9 KB Tue Jan 25 15:00:09 2005  SOUND18.WAV
.rw-r--r-- andrew andrew  27 KB Tue Jan 25 15:00:09 2005  SOUND181.WAV
.rw-r--r-- andrew andrew 5.1 KB Tue Jan 25 15:00:09 2005  SOUND19.WAV
.rw-r--r-- andrew andrew 8.4 KB Tue Jan 25 15:00:09 2005  SOUND20.WAV
.rw-r--r-- andrew andrew 9.0 KB Tue Jan 25 15:00:09 2005  SOUND21.WAV
.rw-r--r-- andrew andrew 7.2 KB Tue Jan 25 15:00:09 2005  SOUND22.WAV
.rw-r--r-- andrew andrew  12 KB Tue Jan 25 15:00:09 2005  SOUND24.WAV
.rw-r--r-- andrew andrew  14 KB Tue Jan 25 15:00:09 2005  SOUND240.WAV
.rw-r--r-- andrew andrew  20 KB Tue Jan 25 15:00:09 2005  SOUND243.WAV
.rw-r--r-- andrew andrew  25 KB Tue Jan 25 15:00:09 2005  SOUND25.WAV
.rw-r--r-- andrew andrew 7.1 KB Tue Jan 25 15:00:09 2005  SOUND26.WAV
.rw-r--r-- andrew andrew  20 KB Tue Jan 25 15:00:09 2005  SOUND27.WAV
.rw-r--r-- andrew andrew 8.4 KB Tue Jan 25 15:00:09 2005  SOUND28.WAV
.rw-r--r-- andrew andrew  10 KB Tue Jan 25 15:00:09 2005  SOUND29.WAV
.rw-r--r-- andrew andrew  22 KB Tue Jan 25 15:00:09 2005  SOUND3.WAV
.rw-r--r-- andrew andrew  22 KB Tue Jan 25 15:00:09 2005  SOUND30.WAV
.rw-r--r-- andrew andrew 1.5 KB Tue Jan 25 15:00:09 2005  SOUND34.WAV
.rw-r--r-- andrew andrew  19 KB Tue Jan 25 15:00:09 2005  SOUND35.WAV
.rw-r--r-- andrew andrew  33 KB Tue Jan 25 15:00:09 2005  SOUND36.WAV
.rw-r--r-- andrew andrew  13 KB Tue Jan 25 15:00:09 2005  SOUND38.WAV
.rw-r--r-- andrew andrew  28 KB Tue Jan 25 15:00:09 2005  SOUND39.WAV
.rw-r--r-- andrew andrew  16 KB Tue Jan 25 15:00:09 2005  SOUND4.WAV
.rw-r--r-- andrew andrew  28 KB Tue Jan 25 15:00:09 2005  SOUND42.WAV
.rw-r--r-- andrew andrew  22 KB Tue Jan 25 15:00:09 2005  SOUND43.WAV
.rw-r--r-- andrew andrew 9.5 KB Tue Jan 25 15:00:09 2005  SOUND45.WAV
.rw-r--r-- andrew andrew 1.8 KB Tue Jan 25 15:00:09 2005  SOUND49.WAV
.rw-r--r-- andrew andrew 3.3 KB Tue Jan 25 15:00:09 2005  SOUND49D.WAV
.rw-r--r-- andrew andrew 3.1 KB Tue Jan 25 15:00:09 2005  SOUND5.WAV
.rw-r--r-- andrew andrew  12 KB Tue Jan 25 15:00:09 2005  SOUND50.WAV
.rw-r--r-- andrew andrew 8.7 KB Tue Jan 25 15:00:09 2005  SOUND528.WAV
.rwxr-xr-x andrew andrew 2.6 MB Wed Oct 20 00:32:49 2021  SpaceCadetPinball

Also I found an error while loading the game which was this SDL Error: Couldn't open /etc/timidity++/freepats.cfg

So it must of been that I didn't have timidity installed or configured

Alee14 avatar Oct 22 '21 15:10 Alee14

I also got the SDL Error about freepats.cfg missing, installing timidity and freepats made it go away.

On Ubuntu/Xubuntu/etc: sudo apt-get install timidity freepats

krishean avatar Oct 22 '21 21:10 krishean

Your file structure fits game expectations for 3DPB data. That leaves you with some kind of midi synth problem.

k4zmu2a avatar Oct 23 '21 04:10 k4zmu2a

@k4zmu2a could it be possible to convert MIDI to OGG and use *.ogg music? To get rid of MIDI which seems to not work in Linux.

rumly111 avatar Oct 26 '21 02:10 rumly111

MIDI music is working for me on both Xubuntu 18.04 and Xubuntu 20.04.

krishean avatar Oct 26 '21 05:10 krishean

MIDI playback is working for most Linux users. Linux is supposed to have good MIDI support. I am using SDL for music, so the problem is either in SDL itself or Linux.

I do not plan to convert music to anything, because I don’t distribute it. Converting it at runtime implies a working synth, which defeats the purpose.

k4zmu2a avatar Oct 26 '21 06:10 k4zmu2a

I recommend installing fluidsynth and setting SDL_SOUNDFONTS to a .sf2 soundfont file of your choice (I chose the Arachno Soundfont because it sounds like it did on Windows, except better and richer). This way you don't need timidity and freepats and it works like a charm.

Firlaev-Hans avatar Oct 29 '21 13:10 Firlaev-Hans

I recommend installing fluidsynth and setting SDL_SOUNDFONTS to a .sf2 soundfont file of your choice (I chose the Arachno Soundfont because it sounds like it did on Windows, except better and richer). This way you don't need timidity and freepats and it works like a charm.

I attempted this but it did not work.

fedora i use

I installed fluidsynth and because I use the fish shell you set variables with the set command.

set -Ux SDL_SOUNDFONTS soundfont.sf2

and try running the game and came with no results.

Greeg0 avatar Dec 11 '21 03:12 Greeg0

I recommend installing fluidsynth and setting SDL_SOUNDFONTS to a .sf2 soundfont file of your choice (I chose the Arachno Soundfont because it sounds like it did on Windows, except better and richer). This way you don't need timidity and freepats and it works like a charm.

I attempted this but it did not work.

fedora i use

I installed fluidsynth and because I use the fish shell you set variables with the set command.

set -Ux SDL_SOUNDFONTS soundfont.sf2

and try running the game and came with no results.

  1. Try setting the variable to the absolute path and not just the filename, e. g. /home/username/soundfont.sf2 instead of just soundfont.sf2
  2. Try setting the variable directly when running the game instead of using set: SDL_SOUNDFONTS=/path/to/soundfont.sf2 /path/to/SpaceCadetPinball

If you use set in fish I believe it will only apply to commands run from that exact terminal session, and definitely not to commands / apps that are not run from the terminal at all

Firlaev-Hans avatar Dec 11 '21 11:12 Firlaev-Hans

So I am using Arch Linux and I install timidity and freepats, then symlink /etc/timidity++/freepats/freepats.cfg to /etc/timidity++/freepats.cfg which makes the "Can't find /etc/timidity++/freepats.cfg" error go away. But now it does this:

ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM phoneline
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_a52.c:1001:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM phoneline
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_a52.c:1001:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM phoneline
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_a52.c:1001:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

PQCraft avatar Jan 17 '22 13:01 PQCraft

I am on Linux Mint 20, and music is working fine for me once I have properly configured MIDI. I do not believe this is an issue with SpaceCadetPinball. I think it is much more likely that you do not have MIDI properly configured (I know from experience that getting MIDI working on Linux can be difficult).

Here is what I have done:

  1. Install fluidsynth
  2. Download a nice soundfont. (For authentic sound, Musical Artifacts has the default Windows soundfont.)
  3. Start fluidsynth as a server, connected to ALSA. Here is the command I use: fluidsynth -l -s -i -aalsa -o audio.alsa.device=default /path/to/soundfont/your_soundfont.sf2
  4. Launch the SpaceCadetPinball binary. You should hear the music. If not, verify that music is turned on in the options.

If you want to verify that fluidsynth is running, you can use the command aconnect -o to see a listing of ALSA's active MIDI ports. fluidsynth will probably show up as device 0 listening on port 128

I added the fluidsynth command above to my startup applications so that I don't have to start the MIDI server manually before playing a game.

blendenzo avatar Feb 04 '22 14:02 blendenzo

I am using the flatpak on Fedora 36. Sound and music works but I got (once for now) the following error:

$ flatpak run com.github.k4zmu2a.spacecadetpinball 
Using SDL renderer: opengl
Loading game from: /app/bin/PINBALL.DAT
SDL Error: Couldn't open timidity.cfg

and it exited with return code 137 (128 + signal number for SIGKILL). I have plenty of RAM, so should not be that...

$ free
               total        used        free      shared  buff/cache   available
Mem:        15611084     3791512     5537980      139004     6281592    11336700
Swap:        8117244           0     8117244

NB: Happened once, playing 3-5 minutes total, this time after 20-30 seconds.

gunchev avatar Aug 23 '22 10:08 gunchev

That OOM crash might be caused by a memory leak. I am kind of confident about the game code memory management. If there is a leak, it is probably done by a lib.

Valgrind says that SDL_mixer midi loading code leaks memory. I tried reproducing it by mass calling in a loop, it didn’t seem to grow process memory at all. Even if it does leak, the sounds are only loaded once, it should not accumulate.

k4zmu2a avatar Aug 26 '22 04:08 k4zmu2a

Here's the real kicker, I recently built from master, and 2.0.1 sources, and it works in neither. I know my MIDI works great, because I can get it working with the original exe in Wine, I also get absolutely 0 related errors in terminal output, so I have absolutely no idea why it seems like it doesn't even try to start the midis.

I've tried this with both XP soucres and Full Tilt directly, going to far as to try and figure out what those bizarre mds files are, imported the midis from the Full Tilt Windows 3.1 sources into LMMS, to export them as oggs to send to someone else who didn't even realize this game had music, only to then realize, so does the source port, but it's not working.

I'm running Fedora, have everything requested installed, use qsynth as my fluidsynth configurator, and have absolutely 0 issues running MIDIs in basically all other scenarios except this one. The only error it gives off is

SDL Error: Unexpected controller element crc

That, which is usually followed by an absolutely god aweful screeching noise for about a second, then it behaves like normal, besides the music not even trying to play, that error being the very last thing the program outputs.

Edit: This is regardless of if I pass the SDL_SOUNDFONT arguement or not

Melechtna avatar Jan 09 '23 11:01 Melechtna