Forums » Linux
Changes to the upcoming Linux v1.0.3
Hey guys. I updated my Vendetta sandbox compiler to gcc 3.4.2 to take advantage of unit-at-a-time and some other stuff. Let me know if this results in any problems for anybody.
I also created an ALSA driver (at long last!). Not only that, but both the ALSA driver and the OSS driver are now threaded (thanks to Ray) and can play music while loading. Let me know if you have any sound problems as a result.
Your config.ini will probably direct the game to use the OSS driver, and the in-game menu for switching sound drivers doesn't appear to work. So if you delete the AudioDriver= line in config.ini, it will auto-select ALSA (because I set the preference value higher for ALSA than for OSS; if it can't load libasound.so then it will use OSS as a fallback). The only way to get it back to OSS (right now) is to edit config.ini and change this line:
AudioDriver=Open Sound System driver
I also created an ALSA driver (at long last!). Not only that, but both the ALSA driver and the OSS driver are now threaded (thanks to Ray) and can play music while loading. Let me know if you have any sound problems as a result.
Your config.ini will probably direct the game to use the OSS driver, and the in-game menu for switching sound drivers doesn't appear to work. So if you delete the AudioDriver= line in config.ini, it will auto-select ALSA (because I set the preference value higher for ALSA than for OSS; if it can't load libasound.so then it will use OSS as a fallback). The only way to get it back to OSS (right now) is to edit config.ini and change this line:
AudioDriver=Open Sound System driver
Furthermore, it no longer uses mmap() so the sound latency might not be as good, but at least it doesn't cause any grief trying to set up permissions, etc.
Also, if you want to be able to use xmms and Vendetta at the same time, it is now possible (gasp!) Create an /etc/asound.conf with the following minimal stuff:
pcm.!default {
type plug
slave.pcm "swmixer"
}
pcm.swmixer {
type dmix
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 256
periods 16
buffer_size 4096
rate 44100
}
}
Your setting of period_size and buffer_size can affect the game's latency.
I'm considering also making a JACK driver for even better integration with low-latency audio stuff.
[edit: updated 'periods' and period_size for better latency characteristics. plays nicely with Vendetta & xmms for me...]
Also, if you want to be able to use xmms and Vendetta at the same time, it is now possible (gasp!) Create an /etc/asound.conf with the following minimal stuff:
pcm.!default {
type plug
slave.pcm "swmixer"
}
pcm.swmixer {
type dmix
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 256
periods 16
buffer_size 4096
rate 44100
}
}
Your setting of period_size and buffer_size can affect the game's latency.
I'm considering also making a JACK driver for even better integration with low-latency audio stuff.
[edit: updated 'periods' and period_size for better latency characteristics. plays nicely with Vendetta & xmms for me...]
This is what I have to use with my sis7012 otherwise I get a weird stuttering.
period_size 1024
buffer_size 16384
periods 16
Latency is quite bad but its bearable.
It doesn't stutter under high load anymore. Very nice. :)
Doesn't alsa have a jack plugin? Don't know if or how it works exactly though.
period_size 1024
buffer_size 16384
periods 16
Latency is quite bad but its bearable.
It doesn't stutter under high load anymore. Very nice. :)
Doesn't alsa have a jack plugin? Don't know if or how it works exactly though.
a1k0n, why not try for MMAP and if it fails for any reason then try falling back to normal writes?
if (snd_pcm_hw_params_test_access(pcm_handle, hwparams, SND_PCM_ACCESS_MMAP_NONINTERLEAVED)==0){
snd_pcm_hw_params_set_access(pcm_handle, hwparams,
SND_PCM_ACCESS_MMAP_NONINTERLEAVED)<0);
}else{
snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_NONINTERLEAVED)<0);
}
or whatever....
if (snd_pcm_hw_params_test_access(pcm_handle, hwparams, SND_PCM_ACCESS_MMAP_NONINTERLEAVED)==0){
snd_pcm_hw_params_set_access(pcm_handle, hwparams,
SND_PCM_ACCESS_MMAP_NONINTERLEAVED)<0);
}else{
snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_NONINTERLEAVED)<0);
}
or whatever....
Because we changed the underlying architecture. It doesn't do mmap now, period.
its one less memory block copy.... ;-)