Frictional Games Forum (read-only)
Jerky sound with dmix custom configuration - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-57.html)
+--- Forum: Technical Support - Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-31.html)
+---- Forum: Linux - ATDD (https://www.frictionalgames.com/forum/forum-32.html)
+---- Thread: Jerky sound with dmix custom configuration (/thread-16140.html)



Jerky sound with dmix custom configuration - mkkot - 06-14-2012

Hello, I have an Audiotrak Prodigy HD2 sound card (it's for headphones maniacs, stereo-only). It's not very popular so I had to do few tricks to make it work under Linux, including a flash and custom dmix configuration, so it would play sound from multiple sources at the same time:
~/.asoundrc
Code:
# This config is (C) copyright Alexander Prokopyev (aulix.com), 2011
# modified by mkkot, 2012: ALC888 card removed

##### Hardware Aliases #####

pcm.music_card {
        type hw;
        card HD2; # Live
}
ctl.music_card {
        type hw;
        card HD2; # Live
}



######################### MUSIC ###########################
pcm.music_mixer {
        type dmix;
        ipc_key 1478;
        ipc_key_add_uid false; # let multiple users share
        ipc_perm 0777; # IPC permissions (octal, default 0600)
        slave {
                pcm music_card; # "hw:HD2,0"
                format S32_LE;
#               period_time 0;
#               period_size 1024;
#               buffer_size 4096;
               rate 44100;
        }
}
ctl.music_mixer ctl.music_card;

pcm.music_dm {
        type plug;
        slave.pcm "music_mixer";
}
ctl.music_dm ctl.music_card;

##### DEFAULT #######

pcm.!default pcm.music_dm;
ctl.!default ctl.music_dm;

Generally it works in dektop environment, with music players and most games, as long as application uses device "default".

However, Amnesia's game sound with this configuration is very jerky, no matter which device I select. When i remove .asoundrc content and select manually my soundcard via Launcher.bin64, it works. It doesn't work with "ALSA default" option. Any ideas? What kind of sound backend Your game uses? I would like to digg a bit to see what is the cause.


RE: Jerky sound with dmix custom configuration - Urkle - 06-14-2012

Amnesia simply uses openal. I would suggest checking to make sure you are using your system openal and not the amnesia shipped openal. If you are a compile-it-yourself type just download the latest version of the OpenAL-Soft implementation of openal.


RE: Jerky sound with dmix custom configuration - mkkot - 06-14-2012

Thanks for your answer. How can I check which version game uses? Is there some log file? I noticed even xdg-open is provided within game's directory which is a proof of lack of faith in libraries stability Wink