![]() |
#11 | |
Rookie
Join Date: Apr 2020
Location: south spain
Posts: 14
![]() |
Quote:
./playwave.sh: 3: ./playwave.sh: text: not found |
|
![]() |
![]() |
![]() |
#12 | ||
Rookie
Join Date: Apr 2020
Location: south spain
Posts: 14
![]() |
I discovered something. Trying to compile again the game, suddenly the sound doesn't work again, even with the script, but there is no error calling to playwave.sh.
The problem seems to be with the 'Makefile' file, in "./lib/xtra/sound/". It seems that last time I've overwrite by mistake with other 'Makefile'. The script works (and the error 'sh: 1: ./playwave.sh: not found' happens again) with this 'Makefile': Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#13 | |
Swordsman
Join Date: Aug 2019
Posts: 411
![]() |
Quote:
For your question about why the modified Makefile worked and the original did not, the answer is likely that the original did not install the sound files (*.wav). If the game checks if the sound file exists before trying to run the playwave.sh script, then you wouldn't see the message about the script. The modified version installs the sound files. |
|
![]() |
![]() |
![]() |
#14 |
Knight
Join Date: Nov 2008
Posts: 882
![]() |
Thanks to backwardsEric for bringing actual knowledge to the table
![]() Unfortunately, fixing all the problems with the sound system (for every platform no less) would likely require rewriting it from scratch with proper code.
__________________
The Complainer worries about the lack of activity here these days. |
![]() |
![]() |
![]() |
#15 | |
Rookie
Join Date: Apr 2020
Location: south spain
Posts: 14
![]() |
I'm making an "easy to install" sound-pack for Frogcomposband. The sound scripts (thanks to Sideways and backwardsEric) works pretty well. By the way: running the game with gcu the 'aplay' command needs to be executed with '-q' option, otherwise you get the 'aplay' output messages on the game mainscreen, so, my gcusound.sh (in ./src) looks like this:
Quote:
The "sound engine" of the game seems to be very limited, but I'm trying to get the most out of it. The delay problem is not, in fact, such a problem: when you attack monsters, for example, each blow result (e.g.: You miss. You miss. You hit.) is printed synchronously (in ordinal/chronological order) with the sound, which is, for my taste at least, interesting, because this way you know at all times, by ear, when your character has impacted and when failed, and it is more difficult to miss relevant information. Now, according to sound.cfg and readme file, it's possible to assign more than one sound sample for each sound event (e.g.: hit = hit.wav hit1.wav hit2.wav), so I understand that the game triggers randomly one sound sample from the avaibles/defined samples when any of the defined events happens, but I'm not getting the expected result. I have assign different sounds for the same event, but the game plays only the first one defined for each event. That is to say: I've, for example, five different sounds for 'hit' event (hit.wav, hit1.wav, hit2.wav, hit3.wav, hit4.wav) defined on Makefile and sound.cfg files, I compile the game with no errors, but in game, when my character hits, only sounds hit.wav. Any clue about this? Thanks you very much in advance |
|
![]() |
![]() |
![]() |
#16 |
Swordsman
Join Date: Aug 2019
Posts: 411
![]() |
The GCU and X11 front ends aren't using sound.cfg; I didn't check the other front ends. They use the name associated with the sound ("hit" for instance) with ".wav" appended as the name of the file to load. Modifying the source code - probably something shared that each front end can call to do the initialization (parsing of sound.cfg) and to query for the sound file to play on a specific event - is the cleanest solution.
An alternative would be to hack it so for instance, hit.wav, is a placeholder (either a symbolic link to one of other "hit" sound files or a copy) and the script to play the sound randomly swaps in one of the other files (by changing the link or copying over) based on what's in sound.cfg before playing the sound. That would avoid having to change the .c files. It wouldn't work well in a multi-user environment (more than one game running using the same shared game configuration directory) without extra care taken when doing the file swaps. |
![]() |
![]() |
![]() |
#17 | |
Rookie
Join Date: Apr 2020
Location: south spain
Posts: 14
![]() |
Quote:
I have found "a solution" (more or less of the second type you have proposed, I think). I don't know how good (very "clean" of course not), but it seems to work. The script would be the following: #!/bin/sh if [ "$1" != "" ]; then RANDOM=$$ for i in 'seq 1' do R=$(($RANDOM%5)) done aplay -q $1.repo/$R.wav fi Then, what I have done is create a series of folders in './lib/xtra/sound/' called 'shutdown.wav.repo', 'opendoor.wav.repo', 'hit.wav.repo' etc., and within those folders, the audio files, renamed: '1.wav', '2.wav', '3.wav' etc. It works well. Surely from there you can improve the method, but, for now, there it is! XD |
|
![]() |
![]() |
![]() |
Tags |
frogcomposband, sound |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
FrogComposband 7.0.peppermint | Sideways | Variants | 151 | June 29, 2020 01:06 |
Regarding Devicemasters (Frogcomposband) | Nonary | Variants | 2 | March 16, 2020 08:29 |
Frogcomposband Help Needed. | Nonary | Variants | 11 | October 29, 2019 18:40 |
frogcomposband frogcomposband: Angband needs an 80x24 'curses' scre | poschengbandplayer | Variants | 2 | August 19, 2019 15:13 |
FrogComposband 7.0.strawberry | Sideways | Variants | 40 | April 18, 2018 07:27 |