Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (1)
  • Deucе's avatar
    Fix ALSA output on Linux · 123f60d7
    Deucе authored
    It seems that the "real" ALSA will actually silently fail if you
    try to clear errors when no errors have occured.  The FreeBSD
    emulation of ALSA does not have this insane requirement, so this
    went unnoticed for the 1.1 release.
    
    I suspect that this actually fixes SF bug 24, because ALSA is
    preferred over pulseaudio.
    123f60d7
......@@ -936,17 +936,21 @@ do_xp_play_sample(const unsigned char *sampo, size_t sz, int *freed)
int ret;
int written=0;
alsa_api->snd_pcm_prepare(playback_handle);
while(written < sz) {
ret=alsa_api->snd_pcm_writei(playback_handle, samp+written, sz-written);
if(ret < 0) {
if(written==0) {
/* Go back and try OSS */
xptone_close_locked();
alsa_device_open_failed=TRUE;
xptone_open_locked();
while (written < sz) {
ret = alsa_api->snd_pcm_writei(playback_handle, samp + written, sz - written);
if (ret < 0) {
if (alsa_api->snd_pcm_prepare(playback_handle) == 0) {
ret = 0;
}
else {
if (written == 0) {
/* Go back and try OSS */
xptone_close_locked();
alsa_device_open_failed = TRUE;
xptone_open_locked();
}
break;
}
break;
}
written += ret;
}
......