Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275198 - media-sound/timidity++-2.13.2-r10: distortion when buffer < 2048 frames
Summary: media-sound/timidity++-2.13.2-r10: distortion when buffer < 2048 frames
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-23 14:30 UTC by CLandel
Modified: 2009-07-24 08:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Remove polling patch. (timidity++-2.13.2-r11.ebuild,4.50 KB, text/plain)
2009-07-23 23:19 UTC, Samuli Suominen (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CLandel 2009-06-23 14:30:25 UTC
When I set the parameter for buffer to "-B2,9", everything works fine (but the latency isn't fit for realtime use). In this r10 version anything lower than that causes the output to distort so hard you can't recognize it.
I'm using the "FluidR3" soundfont.
I witnessed this with jack (jackd started from qjackctl) and direct hardware access via ALSA (using the file /etc/asound.conf).
[workaround: downgrade to the r7 version, e.g. block the r10 one in /etc/portage/packages.mask]

Reproducible: Always

Steps to Reproduce:
1. set the buffer with -B2,8 or below (using an aprotiate output, such as jack or an ALSA "hw" device)
2. try to play music (I connected my keyboard via qjackctl)
Actual Results:  
distortion

Expected Results:  
Fine working software music synthesis with low latency.

Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-Intel-R-_Pentium-R-_D_CPU_3.40GHz-with-glibc2.2.5
Timestamp of tree: Tue, 23 Jun 2009 10:15:02 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ "
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl acpi alsa amd64 ares avahi bash-completion berkdb bidi bzip2 caps cdda cdparanoia cdr cjk cli cracklib crypt css cups curl dbus dga djvu dri dts dvd dvdr dvdread enca encode exif expat fat ffmpeg firefox flac fontconfig fortran fuse gd gdbm geoip gif gnome gnutls gpm gs gsm gstreamer gtk hal hfs iconv id3tag idn imlib ipv6 isdnlog jack java jce joystick jpeg jpeg2k jpg kerberos ladspa lame lcms ldap libass libffi libsamplerate lm_sensors lzma lzo mad matroska midi mikmod mmx mp3 mpeg mtp mudflap multilib musepack nautilus ncurses nls nnt nptl nptlonly nsplugin nss ntfs offensive ogg openal opengl openmp pam pcre perl png portaudio ppds pppd pulseaudio python rar readline reflection samba sasl sdl session smp sndfile speex spl sse sse2 sse3 ssl ssse3 startup-notification svg symlink sysfs taglib tcpd theora threads tiff timidity tk truetype twolame unicode vcd vorbis wavpack wmf wxwindows x264 xattr xcb xml xorg xosd xpm xprint xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="intel nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2009-07-18 10:44:09 UTC
If you remove the ${FILESDIR}"/${P}-polling.patch from -r10, it works I assume?

Miguel, your patch is about to get removed as it appears to break timidity++.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2009-07-22 09:56:55 UTC
CLandel, you need to verify this before it can be done. -r7 is now removed from tree.
Comment 3 CLandel 2009-07-23 23:08:43 UTC
Sorry for being inactive for so long.
How do I compile this without the patch? emerge won't let me when I edit the ebuild. Now with the r7 version removed, we need a fix, or the r7 version back.
Has this behaviour been confirmed by anyone else?
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2009-07-23 23:19:10 UTC
Created attachment 198955 [details]
Remove polling patch.

Same as -r10 without -polling.patch.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2009-07-23 23:20:45 UTC
Or simply change these,

"${FILESDIR}"/${P}-protos.patch \
"${FILESDIR}"/${P}-polling.patch

To this,

"${FILESDIR}"/${P}-protos.patch

In -r10 ebuild and run `ebuild timidity++-2.13.2-r10.ebuild digest` or `emerge --digest timidity++` after it.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2009-07-23 23:22:11 UTC
(In reply to comment #3)
> Sorry for being inactive for so long.
> How do I compile this without the patch? emerge won't let me when I edit the
> ebuild. Now with the r7 version removed, we need a fix, or the r7 version back.
> Has this behaviour been confirmed by anyone else?
> 

I haven't heard anyone reporting this before. The polling patch makes it not wake CPU so often... and I'm suspecting it might not be correct. So it's up to you to verify.
Comment 7 CLandel 2009-07-23 23:44:18 UTC
I'm positive, the "polling" patch destroys the sound when the buffer is low.

I commented the relevant stuff (the line with the patch and the backslash) out, but I needed the "--digest" option for emerge so I could verify that it would work.

After emerging timidity++ with a hacked ebuild and --digest, it now works normally.

Of course, I'm leaving this now like that on my system until r11 is out because I need low latency.

Thank you for dealing with this.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2009-07-24 08:14:16 UTC
+  24 Jul 2009; Samuli Suominen <ssuominen@gentoo.org>
+  +timidity++-2.13.2-r11.ebuild, +files/conf.d.timidity.2,
+  +files/timidity.desktop.2:
+  LADSPA_PATH is now configurable from inside conf.d/timidity wrt #204713,
+  thanks to Adam Nielsen. Revert -polling.patch since it breaks realtime
+  playing with FluidR3 soundfont wrt #275198. Desktop entry now prefers GTK+
+  frontend if available wrt #207311.