Software No sound in HHexen and HHeretic


fettouhi

Active Member
Joined
Sep 20, 2008
Messages
665
Age
47
Location
Odense S, Denmark
I am having sound issues with the HHexen & HHeretic pnd's from the repo.openpandora.org site. The games run fine but there is no sound there is just some horrid noises randomly during gameplay. Can't figure out why because sound woeŕks fine in other applications like the super nintendo emu. This used to work just fine. Anybody else having this issue? BTW running the latest version of the Openpandora OS.
 
Code:
=======================================================================================
PND             : /media/mmcblk1p1/pandora/menu/hhexen.pickle.pnd
PND_FSTYPE      : ISO
APPDATADIR      : /media/mmcblk1p1/pandora/appdata/hexen
APPDD_FSTYPE    : vfat
PND_CPUSPEED    : <unset>
EXENAME         : runhexendd.sh
ARGUMENTS       : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -o ro "/dev/loop0" "/mnt/utmp/hexen"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/mmcblk1p1/pandora/appdata/hexen=rw+nolwh":"/mnt/pnd/hexen=rr" none "/mnt/utmp/hexen"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application ( runhexendd.sh  ) ----------
HHexen (Linux) v1.6.3
Detected byte order: LE
Adding external file: hexdd.wad
V_Init: allocate screens.
M_LoadDefaults: Load system defaults.
Loading default settings
W_Init: Init WADfiles.
Z_Init: Init zone memory allocation daemon.
0x800000 allocated for zone, ZoneBase: 0x403be008
MN_Init: Init menu system.
CT_Init: Init chat mode data.
S_InitScript
SN_InitSequenceScript: Registering sound sequences.
I_Init: Setting up machine state.
  S_Init... I_StartupSound (SDL_mixer):
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
Configured audio device with 512 samples/slice
Initializing CD Audio: failed.
ST_Init: Init startup screen.
Mix_LoadMUS failed: /etc/timidity.cfg: No such file or directory
Executable: v1.6.3 Nov 21 2012 (DVL/8PLYR).
R_Init: Init Hexen refresh daemonALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred

Hexen: Beyond Heretic
[SUCCESS]--- Starting the application ( runhexendd.sh  ) ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- Restoring nub mode ----------
[SUCCESS]--- Restoring nub mode ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
rmdir: failed to remove `/mnt/utmp/hexen': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 10

This is just a snippet because there are about 25000 lines of this output

ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
 
sounds strange, all sound effects are through SDL so nothing special.
The underun's are not completely unexpected and usually occur when the game is taking too long.
Does it occur for both the normal game? (in the log your loading the expansion).
 
sounds strange, all sound effects are through SDL so nothing special.
The underun's are not completely unexpected and usually occur when the game is taking too long.
Does it occur for both the normal game? (in the log your loading the expansion).

Yes, it happens both the normal Hexen game and the expansion plus also the in Heretic.
 
Still can't figure out what is causing this. It also happens with Hexen 2. I have been fooling around getting my bluetooth headset working with the openpandora. Using this guide here

https://pyra-handheld.com/boards/threads/pandora-audio-switch.77143/

but haven't been able to get it working. My headset can connect just fine. I just can't get the sound to switch over to the headset, it still uses the openpandora speakers.
 
Does anyone have any ideas on how I can debug this? So far I can't get the sound working in Hexen 1 & 2 plus Heretic. The pnd output from all 3 games is more less the same with the

Code:
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred

lines showing up in the thousands.
 
It means the software/games that was running did not feed ALSA buffer, making sound stuttering.

But if you have thousand of that, then that mean the games doesn't send anything to ALSA, so it's bigger issue. Is your firmware reasonably up-to-date?

*EDIT* Also, if you know how to modify run script, you can try to add:
Code:
export SDL_AUDIODRIVER=dsp
To try use OSS instead of ALSA.
 
Most PNDs start by running a run script, commonly in the root path of the pnd. You might commonly find the pnd still mounted after running it which is the simplest way of looking inside them on Pandora (under /mnt I think) or you can create an empty folder and then mount them inside that on any linux machine. Inside there there'll generally be a short shell script which sets up an environment then runs the executable. If you put an edited version of that file inside the pnd's appdata folder (in /pandora/appdata/[pnd id] on your sd card) it'll run that instead of the one inside the PND, so that's the easiest way of making this kind of manipulation I think. The pnd id is based on a term inside the PXML so might be slightly different to the name of the pnd file itself, but they're usually names based on the same thing so if you look at the folders inside the appdata folder it is normally pretty obvious which on you want.
 
Most PNDs start by running a run script, commonly in the root path of the pnd. You might commonly find the pnd still mounted after running it which is the simplest way of looking inside them on Pandora (under /mnt I think) or you can create an empty folder and then mount them inside that on any linux machine. Inside there there'll generally be a short shell script which sets up an environment then runs the executable. If you put an edited version of that file inside the pnd's appdata folder (in /pandora/appdata/[pnd id] on your sd card) it'll run that instead of the one inside the PND, so that's the easiest way of making this kind of manipulation I think. The pnd id is based on a term inside the PXML so might be slightly different to the name of the pnd file itself, but they're usually names based on the same thing so if you look at the folders inside the appdata folder it is normally pretty obvious which on you want.

Ah, I found the sh script mounted in the /mnt/utmp folders for herestic, hexen and hexen 2. I modified all 3 scripts by adding

Code:
export SDL_AUDIODRIVER=dsp

and copied them to the appdata folder for each respective game. Now all games have proper sound. This still doesn't explain why ALSA messes up with SDL. One other problem though with hexen 2 is that is crashes when trying to load the level. It did this also when the sound was messed up. I was hoping fixing the sound would fix the crashing of the game itself.
 
  • Like
Reactions: rSl
Here is the output when trying to Hexen 2 GL with sound fix above.

Code:
=======================================================================================
PND             : /media/mmcblk1p1/pandora/menu/hexen2.pickle.pnd
PND_FSTYPE      : Squashfs
APPDATADIR      : /media/mmcblk1p1/pandora/appdata/hexen2
APPDD_FSTYPE    : vfat
PND_CPUSPEED    : <unset>
EXENAME         : runscript_gl.sh
ARGUMENTS       : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/hexen2"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/mmcblk1p1/pandora/appdata/hexen2=rw+nolwh":"/mnt/pnd/hexen2=rr" none "/mnt/utmp/hexen2"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application ( runscript_gl.sh  ) ----------
cp: `default/..' and `.' are the same file
cat: build: No such file or directory
--------------------------------------------------------------
Setting PATH to /mnt/utmp/hexen2:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
Setting LD_LIBRARY_PATH to /mnt/utmp/hexen2/lib:/mnt/utmp/hexen2/lib:/usr/lib:/lib
System check
============
Freememory is 82
Cpu Speed is 800
Sys Speed is 332
Nubs as absolute, mouse

FATAL ERROR: Mod_LoadModel: models/stltng2.mdl not found

Hammer of Thyrion, release 1.5.9 (2018-07-31)
running on Hexen2 engine 1.29 (Linux)
More info / sending bug reports:  http://uhexen2.sourceforge.net
basedir is: /mnt/utmp/hexen2
userdir is: /home/af/.hexen2
Detected byte order: LE
Found SDL version 1.2.14
Host_Init
Server using protocol 19 (Raven/MP/1.12)
Added packfile /mnt/utmp/hexen2/data1/pak0.pak (696 files)
Added packfile /mnt/utmp/hexen2/data1/pak1.pak (523 files)
Playing the registered version.
UDP, Local address: 127.0.0.1
UDP Initialized
Exe: 00:43:36 Feb 16 2019
32.0 megabyte heap
Console initialized.
LIBGL: Initialising gl4es
LIBGL: Batch mode enabled
LIBGL: v0.9.3 built on Jan  2 2017 23:59:58
LIBGL: framebuffer output enabled
LIBGL:loaded: libGLES_CM.so
LIBGL:loaded: libEGL.so
LIBGL: Extension GL_OES_blend_subtract detected and used
LIBGL: Extension GL_OES_blend_func_separate detected and used
LIBGL: Extension GL_OES_blend_equation_separate detected and used
LIBGL: Extension GL_OES_point_sprite detected and used
LIBGL: Extension GL_OES_point_size_array detected
LIBGL: Extension GL_OES_framebuffer_object detected and used
LIBGL: Extension GL_OES_depth24 detected and used
LIBGL: Extension GL_OES_rgb8_rgba8 detected and used
LIBGL: Extension GL_EXT_multi_draw_arrays detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888 detected
LIBGL: Extension GL_OES_texture_cube_map detected and used
LIBGL: Max texture size: 2048
LIBGL: Texture Units: 4, Max lights: 8
LIBGL: Enable FastMath for cortex-a8
LIBGL: Current folder is:/mnt/utmp/hexen2
Using system GL library
WARNING: 640x480 not found in fullscreen modes
Using the largest reported dimension as default
Requested mode 0: 800x480x16
Video Mode Set : 800x480x0
R:5 G:6 B:5 A:8, Z:16, S:8
GL_VENDOR: ptitSeb
GL_RENDERER: GLES_CM wrapper
GL_VERSION: 1.5 gl4es wrapper
OpenGL max.texture size: 2048
ARB Multitexture extensions found
ignoring multitexture (cvar disabled)
Anisotropic filtering not found
GL_ARB_texture_non_power_of_two not found
gamma adjustment not available
Video initialized.

Sound Initialization
SDL audio spec  : 22050 Hz, 512 samples, 2 channels
SDL audio driver: dsp, 32768 bytes buffer
Audio: 16 bit, stereo, 22050 Hz, using SDLAudio
Could not initialize Timidity
CDAudio_Init: open of "/dev/cdrom" failed (2: No such file or directory)
MIDI_DRV: disabled at compile time.
SDL_Joystick: 1 devices are reported:
#0: "nub0"

======== Hexen II Initialized =========

execing hexen.rc
execing default.cfg
Unknown command "sys_delay"
Unknown command "r_transwater"
Unknown command "_windowed_mouse"
Unknown command "vid_stretch_by_2"
Unknown command "vid_config_y"
Unknown command "vid_config_x"
Unknown command "_vid_default_mode_win"
Unknown command "_vid_default_mode"
Unknown command "_vid_wait_override"
Unknown command "vid_nopageflip"
Unknown command "sys_quake2"
execing config.cfg
Unknown command "r_transwater"
couldn't exec autoexec.cfg
Shutting down SDL sound
[SUCCESS]--- Starting the application ( runscript_gl.sh  ) ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- Restoring nub mode ----------
[SUCCESS]--- Restoring nub mode ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
rmdir: failed to remove `/mnt/utmp/hexen2': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 5
 
I guess this
Code:
FATAL ERROR: Mod_LoadModel: models/stltng2.mdl not found
Is not good. Data issue?

Strange I am just the Hexen 2 pak files from Steam. That should work right?

EDIT: Got it working again. Just deleted the pak files etc. and made a fresh copy from Steam.
 
Last edited:
Seems like Daikatana is also affected but I can't get to sh script because it closes immediately:

Code:
=======================================================================================
PND             : /media/mmcblk1p1/pandora/menu/daikatana.pnd
PND_FSTYPE      : Squashfs
APPDATADIR      : /media/mmcblk1p1/pandora/appdata/daikatana
APPDD_FSTYPE    : vfat
PND_CPUSPEED    : <unset>
EXENAME         : runscript.sh
ARGUMENTS       : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/daikatana"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/mmcblk1p1/pandora/appdata/daikatana=rw+nolwh":"/mnt/pnd/daikatana=rr" none "/mnt/utmp/daikatana"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application ( runscript.sh  ) ----------
--------------------------------------------------------------
Setting PATH to /mnt/utmp/daikatana:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
Setting LD_LIBRARY_PATH to /mnt/utmp/daikatana/lib:/mnt/utmp/daikatana/lib:/usr/lib:/lib
System check
============
Freememory is 105
Cpu Speed is 800
Sys Speed is 332
Nubs as absolute, mouse

----- Filesystem Initialization -----
Current search path:
----------
/mnt/utmp/daikatana/home/./Daikatana/data
/mnt/utmp/daikatana/data
/mnt/utmp/daikatana/data/pak6.pak (64 files)
/mnt/utmp/daikatana/data/pak4.pak (792 files)
/mnt/utmp/daikatana/data/pak3.pak (782 files)
/mnt/utmp/daikatana/data/pak2.pak (83 files)
/mnt/utmp/daikatana/data/pak1.pak (11455 files)
-------------------------------------
13176 files in PAK files

Unknown command "vid_restart"
Unknown command "snd_restart"
execing daikatana.cfg
execing default_keys.cfg
Berkeley Sockets Initialized
Console initialized.
execing curcfg.cfg
execing current.cfg
dedicated is write protected.
Executed current.cfg.
------- Loading ref_gl.so -------
ref_gl version: GL EXT 0.01
LIBGL: Initialising gl4es
LIBGL: v0.9.4 built on Feb 14 2017 08:34:22
LIBGL: framebuffer output enabled
LIBGL:loaded: libGLES_CM.so
LIBGL:loaded: libEGL.so
LIBGL: Extension GL_OES_blend_subtract detected and used
LIBGL: Extension GL_OES_blend_func_separate detected and used
LIBGL: Extension GL_OES_blend_equation_separate detected and used
LIBGL: Extension GL_OES_point_sprite detected and used
LIBGL: Extension GL_OES_point_size_array detected
LIBGL: Extension GL_OES_framebuffer_object detected and used
LIBGL: Extension GL_OES_depth24 detected and used
LIBGL: Extension GL_OES_rgb8_rgba8 detected and used
LIBGL: Extension GL_EXT_multi_draw_arrays detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888 detected and used
LIBGL: Extension GL_OES_texture_cube_map detected and used
LIBGL: Max texture size: 2048
LIBGL: Texture Units: 4, Max lights: 8
LIBGL: Current folder is:/mnt/utmp/daikatana
glXGetProcAddress: glXGetSwapIntervalMESA not found.
glX stub: glAccum
glX stub: glAreTexturesResident
glX stub: glClearAccum
glXGetProcAddress: glClearIndex not found.
glXGetProcAddress: glEdgeFlagv not found.
glX stub: glFeedbackBuffer
glX stub: glGetClipPlane
glX stub: glGetPixelMapfv
glX stub: glGetPixelMapuiv
glX stub: glGetPixelMapusv
glX stub: glGetPolygonStipple
glXGetProcAddress: glGetLevelParameterfv not found.
glXGetProcAddress: glGetLevelParameteriv not found.
glXGetProcAddress: glIndexMask not found.
glX stub: glPassThrough
glX stub: glPixelMapfv
glX stub: glPixelMapuiv
glX stub: glPixelMapusv
glX stub: glPrioritizeTextures
glX stub: glSelectBuffer
Initializing OpenGL display
...setting mode 12: 800 480 FS
...Using stencil buffer
LIBGL: Enable LIBGL_VSYNC=1 if you want to use vsync.
LIBGL: Enable LIBGL_VSYNC=1 if you want to use vsync.
Using hardware gamma via X11/xRandR.
GL_VENDOR: ptitSeb
GL_RENDERER: GLES_CM wrapper
GL_VERSION: 1.5 gl4es wrapper
GL_MAX_TEXTURE_SIZE: 2048
...allowing CDS
...using new lightmap format
...using glDrawElements
...using glDrawRangeElements
...enabling GL_EXT_compiled_vertex_array
...using GL_EXT_point_parameters
...GL_EXT_shared_texture_palette not found
...using OpenGL multitexture
...GL_MAX_TEXTURE_UNITS: 4
...GL_ARB_texture_non_power_of_two not found
...GL_EXT_texture_filter_anisotropic not found
...using GL_ARB_texture_env_combine
...using GL_EXT_stencil_wrap
...GL_ATI_separate_stencil not found
...GL_EXT_stencil_two_side not found
LIBGL: Enable LIBGL_VSYNC=1 if you want to use vsync.
LIBGL: Enable LIBGL_VSYNC=1 if you want to use vsync.
------------------------------------
-> Loading Audio Engine DLL 'audio.so'
Error loading libdumb.so: libdumb.so: cannot open shared object file: No such file or directory
AudioEngine: OpenAL Sound Engine for Daikatana - version 2

------- sound initialization -------
  Using AudioEngine:
    'OpenAL Sound Engine for Daikatana'
QAL_Init(): available devices for OpenAL:
  ALSA Default
  omap3pandora,  (CARD=omap3pandora,DEV=0)
  omap3pandora,  (CARD=omap3pandora,DEV=1)
QAL_Init(): Try to initialize OpenAL with default device (can be changed with s_al_device CVar)
QAL_Init(): Initializing OpenAL successful!
OpenAL Infos:
  AL_VENDOR: OpenAL Community
  AL_VERSION: 1.1 ALSOFT 1.17.2
  AL_RENDERER: OpenAL Soft
  AL_EXTENSIONS: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_gain_clamp_ex AL_SOFT_loop_points AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length
  ALC_EXTENSIONS: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFTX_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_pause_device
  ALC_DEVICE_SPECIFIER: OpenAL Soft
------------------------------------

Joystick found ((null))

WARNING: Couldn't find language DLL: english.  Attempting to load default: english.
Shutting down OpenAL.
Freeing Audio Engine DLL...
Restored original Gamma
./runscript.sh: line 139:  2217 Trace/breakpoint trap   ./daikatana $noshouldermb $*
[SUCCESS]--- Starting the application ( runscript.sh  ) ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- Restoring nub mode ----------
[SUCCESS]--- Restoring nub mode ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
rmdir: failed to remove `/mnt/utmp/daikatana': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 3
 
Daikatana use OpenAL and not SDL for sound, so the same trick will not work there.
I don't see any error in log, exept a libdumb.so not found (strange, I think I remember putting it inside), and the language dll error, that should be ok, unless there is also a data issue there.

One more PND I should update...
 
I don't think is an data issue here. I copied the data folder over from my fresh GOG install again just to make sure and it still won't start. But again I can't figure out why I am having sound issues at all with these games. They used to work just fine. As I mentioned earlier I fumbled around getting my Bluetooth headset to work on my OpenPandora using this guide here:

https://pyra-handheld.com/boards/threads/pandora-audio-switch.77143/

The guide requires one to delete asound.conf from /etc/ folder maybe that is the crux of my issue?
 
Back
Top