summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@debian.org>2008-10-19 12:47:50 +0100
committerSjoerd Simons <sjoerd@debian.org>2008-10-19 12:47:50 +0100
commit712f1fe2b986f25fd9753eeae261a1a217f383b0 (patch)
tree1c60a64a3c670bebf4d2506c9110f4a1447f6f6e
parent6ac0cf885610905ab26bc53e9fb876676faac9fc (diff)
Imported Upstream version 0.9.13
-rw-r--r--ABOUT-NLS1068
-rw-r--r--ChangeLog11390
-rw-r--r--Makefile.am17
-rw-r--r--Makefile.in79
-rw-r--r--README35
-rw-r--r--aclocal.m41779
-rwxr-xr-xbootstrap.sh26
-rwxr-xr-xconfig.guess36
-rw-r--r--config.h.in126
-rwxr-xr-x[-rw-r--r--]config.rpath666
-rwxr-xr-xconfig.sub48
-rwxr-xr-xconfigure15032
-rw-r--r--configure.ac293
-rw-r--r--doxygen/Makefile.am2
-rw-r--r--doxygen/Makefile.in62
-rw-r--r--doxygen/doxygen.conf.in929
-rw-r--r--ltmain.sh58
-rw-r--r--m4/acx_libwrap.m419
-rw-r--r--m4/acx_lirc.m46
-rw-r--r--m4/acx_pthread.m4 (renamed from acinclude.m4)52
-rw-r--r--m4/attributes.m4258
-rw-r--r--m4/check_define.m413
-rw-r--r--m4/iconv.m4180
-rw-r--r--m4/intltool.m4197
-rw-r--r--m4/lib-ld.m4110
-rw-r--r--m4/lib-link.m4709
-rw-r--r--m4/lib-prefix.m4185
-rw-r--r--m4/nls.m431
-rw-r--r--m4/tls.m417
-rw-r--r--man/Makefile.am122
-rw-r--r--man/Makefile.in245
-rw-r--r--man/default.pa.5.xml.in2
-rw-r--r--man/esdcompat.1.xml.in2
-rw-r--r--man/pabrowse.1.xml.in2
-rw-r--r--man/pacat.12
-rw-r--r--man/pacat.1.xml.in8
-rw-r--r--man/pacmd.1.xml.in2
-rw-r--r--man/pactl.1.xml.in2
-rw-r--r--man/padsp.1.xml.in2
-rw-r--r--man/paplay.1.xml.in2
-rw-r--r--man/pasuspender.1.xml.in2
-rw-r--r--man/pax11publish.1.xml.in2
-rw-r--r--man/pulse-client.conf.512
-rw-r--r--man/pulse-client.conf.5.xml.in21
-rw-r--r--man/pulse-daemon.conf.528
-rw-r--r--man/pulse-daemon.conf.5.xml.in67
-rw-r--r--man/pulseaudio.19
-rw-r--r--man/pulseaudio.1.xml.in17
-rwxr-xr-xman/xmltoman217
-rw-r--r--man/xmltoman.css2
-rw-r--r--man/xmltoman.dtd6
-rw-r--r--man/xmltoman.xsl16
-rw-r--r--po/ChangeLog100
-rw-r--r--po/LINGUAS4
-rw-r--r--po/Makefile.in.in217
-rw-r--r--po/POTFILES.in193
-rw-r--r--po/POTFILES.skip1
-rw-r--r--po/de.po1827
-rw-r--r--po/el.po1824
-rw-r--r--po/fr.po2178
-rw-r--r--po/sv.po1836
-rw-r--r--src/Makefile.am281
-rw-r--r--src/Makefile.in1495
-rw-r--r--src/daemon/caps.c83
-rw-r--r--src/daemon/caps.h7
-rw-r--r--src/daemon/cmdline.c57
-rw-r--r--src/daemon/cmdline.h2
-rw-r--r--src/daemon/cpulimit.c29
-rw-r--r--src/daemon/cpulimit.h2
-rw-r--r--src/daemon/daemon-conf.c275
-rw-r--r--src/daemon/daemon-conf.h27
-rw-r--r--src/daemon/daemon.conf.in21
-rwxr-xr-xsrc/daemon/default.pa.in48
-rw-r--r--src/daemon/dumpmodules.c21
-rw-r--r--src/daemon/dumpmodules.h2
-rwxr-xr-xsrc/daemon/esdcompat.in2
-rw-r--r--src/daemon/ltdl-bind-now.c48
-rw-r--r--src/daemon/ltdl-bind-now.h2
-rw-r--r--src/daemon/main.c519
-rw-r--r--src/daemon/org.pulseaudio.policy2
-rw-r--r--src/daemon/polkit.c33
-rw-r--r--src/daemon/polkit.h2
-rw-r--r--src/daemon/pulseaudio-module-xsmp.desktop10
-rw-r--r--src/daemon/pulseaudio.desktop10
-rwxr-xr-xsrc/daemon/start-pulseaudio-x11.in31
-rwxr-xr-xsrc/daemon/system.pa.in55
-rwxr-xr-xsrc/depmod.py3
-rw-r--r--src/map-file42
-rw-r--r--src/modules/alsa-util.c462
-rw-r--r--src/modules/alsa-util.h31
-rw-r--r--src/modules/bluetooth/ipc.c118
-rw-r--r--src/modules/bluetooth/ipc.h308
-rw-r--r--src/modules/bluetooth/module-bluetooth-device-symdef.h25
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c922
-rw-r--r--src/modules/bluetooth/module-bluetooth-discover-symdef.h25
-rw-r--r--src/modules/bluetooth/module-bluetooth-discover.c510
-rw-r--r--src/modules/bluetooth/module-bluetooth-proximity-symdef.h25
-rw-r--r--src/modules/bluetooth/module-bluetooth-proximity.c (renamed from src/modules/module-bt-proximity.c)7
-rw-r--r--src/modules/bluetooth/proximity-helper.c (renamed from src/modules/bt-proximity-helper.c)2
-rw-r--r--src/modules/bluetooth/rtp.h76
-rw-r--r--src/modules/bluetooth/sbc.c1411
-rw-r--r--src/modules/bluetooth/sbc.h97
-rw-r--r--src/modules/bluetooth/sbc_math.h72
-rw-r--r--src/modules/bluetooth/sbc_tables.h167
-rw-r--r--src/modules/dbus-util.c18
-rw-r--r--src/modules/dbus-util.h2
-rw-r--r--src/modules/gconf/gconf-helper.c2
-rw-r--r--src/modules/gconf/module-gconf.c26
-rw-r--r--src/modules/module-alsa-sink.c1246
-rw-r--r--src/modules/module-alsa-source.c1065
-rw-r--r--src/modules/module-always-sink-symdef.h25
-rw-r--r--src/modules/module-always-sink.c178
-rw-r--r--src/modules/module-bt-proximity-symdef.h25
-rw-r--r--src/modules/module-cli.c6
-rw-r--r--src/modules/module-combine.c620
-rw-r--r--src/modules/module-console-kit-symdef.h25
-rw-r--r--src/modules/module-console-kit.c359
-rw-r--r--src/modules/module-default-device-restore.c159
-rw-r--r--src/modules/module-defs.h.m41
-rw-r--r--src/modules/module-detect.c10
-rw-r--r--src/modules/module-device-restore-symdef.h25
-rw-r--r--src/modules/module-device-restore.c389
-rw-r--r--src/modules/module-esound-compat-spawnfd.c4
-rw-r--r--src/modules/module-esound-compat-spawnpid.c4
-rw-r--r--src/modules/module-esound-sink.c70
-rw-r--r--src/modules/module-hal-detect.c87
-rw-r--r--src/modules/module-jack-sink.c51
-rw-r--r--src/modules/module-jack-source.c39
-rw-r--r--src/modules/module-ladspa-sink.c354
-rw-r--r--src/modules/module-lirc.c10
-rw-r--r--src/modules/module-match.c19
-rw-r--r--src/modules/module-mmkbd-evdev.c10
-rw-r--r--src/modules/module-native-protocol-fd.c27
-rw-r--r--src/modules/module-null-sink.c161
-rw-r--r--src/modules/module-oss.c225
-rw-r--r--src/modules/module-pipe-sink.c114
-rw-r--r--src/modules/module-pipe-source.c36
-rw-r--r--src/modules/module-position-event-sounds-symdef.h25
-rw-r--r--src/modules/module-position-event-sounds.c165
-rw-r--r--src/modules/module-protocol-stub.c436
-rw-r--r--src/modules/module-remap-sink.c247
-rw-r--r--src/modules/module-rescue-streams.c16
-rw-r--r--src/modules/module-sine.c76
-rw-r--r--src/modules/module-solaris.c2
-rw-r--r--src/modules/module-stream-restore-symdef.h25
-rw-r--r--src/modules/module-stream-restore.c811
-rw-r--r--src/modules/module-suspend-on-idle.c38
-rw-r--r--src/modules/module-tunnel.c903
-rw-r--r--src/modules/module-volume-restore.c38
-rw-r--r--src/modules/module-x11-bell.c53
-rw-r--r--src/modules/module-x11-publish.c127
-rw-r--r--src/modules/module-x11-xsmp.c103
-rw-r--r--src/modules/module-zeroconf-discover.c27
-rw-r--r--src/modules/module-zeroconf-publish.c26
-rw-r--r--src/modules/oss-util.c12
-rw-r--r--src/modules/oss-util.h6
-rw-r--r--src/modules/rtp/module-rtp-recv.c177
-rw-r--r--src/modules/rtp/module-rtp-send.c55
-rw-r--r--src/modules/rtp/rtp.c65
-rw-r--r--src/modules/rtp/rtp.h4
-rw-r--r--src/modules/rtp/sap.c34
-rw-r--r--src/modules/rtp/sap.h6
-rw-r--r--src/modules/rtp/sdp.c16
-rw-r--r--src/modules/rtp/sdp.h2
-rw-r--r--src/pulse/browser.c15
-rw-r--r--src/pulse/browser.h2
-rw-r--r--src/pulse/cdecl.h20
-rw-r--r--src/pulse/channelmap.c198
-rw-r--r--src/pulse/channelmap.h71
-rw-r--r--src/pulse/client-conf-x11.c14
-rw-r--r--src/pulse/client-conf-x11.h2
-rw-r--r--src/pulse/client-conf.c34
-rw-r--r--src/pulse/client-conf.h3
-rw-r--r--src/pulse/client.conf.in7
-rw-r--r--src/pulse/context.c599
-rw-r--r--src/pulse/context.h45
-rw-r--r--src/pulse/def.h695
-rw-r--r--src/pulse/error.c48
-rw-r--r--src/pulse/error.h2
-rw-r--r--src/pulse/ext-stream-restore.c326
-rw-r--r--src/pulse/ext-stream-restore.h107
-rw-r--r--src/pulse/gccmacro.h (renamed from src/pulsecore/gccmacro.h)40
-rw-r--r--src/pulse/glib-mainloop.c16
-rw-r--r--src/pulse/glib-mainloop.h2
-rw-r--r--src/pulse/i18n.c38
-rw-r--r--src/pulse/i18n.h62
-rw-r--r--src/pulse/internal.h73
-rw-r--r--src/pulse/introspect.c145
-rw-r--r--src/pulse/introspect.h310
-rw-r--r--src/pulse/mainloop-api.c10
-rw-r--r--src/pulse/mainloop-api.h2
-rw-r--r--src/pulse/mainloop-signal.c32
-rw-r--r--src/pulse/mainloop-signal.h18
-rw-r--r--src/pulse/mainloop.c98
-rw-r--r--src/pulse/mainloop.h2
-rw-r--r--src/pulse/operation.c35
-rw-r--r--src/pulse/operation.h2
-rw-r--r--src/pulse/proplist.c324
-rw-r--r--src/pulse/proplist.h229
-rw-r--r--src/pulse/pulseaudio.h15
-rw-r--r--src/pulse/sample.c28
-rw-r--r--src/pulse/sample.h97
-rw-r--r--src/pulse/scache.c134
-rw-r--r--src/pulse/scache.h33
-rw-r--r--src/pulse/simple.c5
-rw-r--r--src/pulse/simple.h6
-rw-r--r--src/pulse/stream.c1268
-rw-r--r--src/pulse/stream.h207
-rw-r--r--src/pulse/subscribe.c11
-rw-r--r--src/pulse/subscribe.h2
-rw-r--r--src/pulse/thread-mainloop.c5
-rw-r--r--src/pulse/thread-mainloop.h2
-rw-r--r--src/pulse/timeval.c36
-rw-r--r--src/pulse/timeval.h18
-rw-r--r--src/pulse/utf8.c32
-rw-r--r--src/pulse/utf8.h3
-rw-r--r--src/pulse/util.c25
-rw-r--r--src/pulse/util.h3
-rw-r--r--src/pulse/version.h21
-rw-r--r--src/pulse/version.h.in15
-rw-r--r--src/pulse/volume.c219
-rw-r--r--src/pulse/volume.h77
-rw-r--r--src/pulse/xmalloc.c15
-rw-r--r--src/pulse/xmalloc.h34
-rw-r--r--src/pulsecore/asyncmsgq.c38
-rw-r--r--src/pulsecore/asyncmsgq.h18
-rw-r--r--src/pulsecore/asyncq.c148
-rw-r--r--src/pulsecore/asyncq.h23
-rw-r--r--src/pulsecore/atomic.h61
-rw-r--r--src/pulsecore/auth-cookie.c109
-rw-r--r--src/pulsecore/auth-cookie.h (renamed from src/pulsecore/core-def.h)18
-rw-r--r--src/pulsecore/authkey-prop.c108
-rw-r--r--src/pulsecore/authkey-prop.h45
-rw-r--r--src/pulsecore/authkey.c14
-rw-r--r--src/pulsecore/authkey.h2
-rw-r--r--src/pulsecore/autoload.c4
-rw-r--r--src/pulsecore/autoload.h2
-rw-r--r--src/pulsecore/avahi-wrap.c2
-rw-r--r--src/pulsecore/avahi-wrap.h2
-rw-r--r--src/pulsecore/cli-command.c167
-rw-r--r--src/pulsecore/cli-command.h5
-rw-r--r--src/pulsecore/cli-text.c240
-rw-r--r--src/pulsecore/cli-text.h2
-rw-r--r--src/pulsecore/cli.c22
-rw-r--r--src/pulsecore/cli.h8
-rw-r--r--src/pulsecore/client.c33
-rw-r--r--src/pulsecore/client.h10
-rw-r--r--src/pulsecore/conf-parser.c26
-rw-r--r--src/pulsecore/conf-parser.h5
-rw-r--r--src/pulsecore/core-error.c2
-rw-r--r--src/pulsecore/core-error.h2
-rw-r--r--src/pulsecore/core-scache.c123
-rw-r--r--src/pulsecore/core-scache.h19
-rw-r--r--src/pulsecore/core-subscribe.c14
-rw-r--r--src/pulsecore/core-subscribe.h2
-rw-r--r--src/pulsecore/core-util.c1216
-rw-r--r--src/pulsecore/core-util.h111
-rw-r--r--src/pulsecore/core.c67
-rw-r--r--src/pulsecore/core.h41
-rw-r--r--src/pulsecore/creds.h2
-rw-r--r--src/pulsecore/dllmain.c2
-rw-r--r--src/pulsecore/dynarray.c17
-rw-r--r--src/pulsecore/dynarray.h12
-rw-r--r--src/pulsecore/endianmacros.h13
-rw-r--r--src/pulsecore/envelope.c781
-rw-r--r--src/pulsecore/envelope.h53
-rw-r--r--src/pulsecore/esound.h2
-rw-r--r--src/pulsecore/fdsem.c142
-rw-r--r--src/pulsecore/fdsem.h10
-rw-r--r--src/pulsecore/ffmpeg/resample2.c4
-rw-r--r--src/pulsecore/flist.c97
-rw-r--r--src/pulsecore/flist.h9
-rw-r--r--src/pulsecore/hashmap.c181
-rw-r--r--src/pulsecore/hashmap.h29
-rw-r--r--src/pulsecore/hook-list.c41
-rw-r--r--src/pulsecore/hook-list.h23
-rw-r--r--src/pulsecore/idxset.c392
-rw-r--r--src/pulsecore/idxset.h36
-rw-r--r--src/pulsecore/inet_ntop.c2
-rw-r--r--src/pulsecore/inet_pton.c2
-rw-r--r--src/pulsecore/iochannel.c15
-rw-r--r--src/pulsecore/iochannel.h4
-rw-r--r--src/pulsecore/ioline.c54
-rw-r--r--src/pulsecore/ioline.h6
-rw-r--r--src/pulsecore/ipacl.c4
-rw-r--r--src/pulsecore/ipacl.h2
-rw-r--r--src/pulsecore/llist.h2
-rw-r--r--src/pulsecore/lock-autospawn.c330
-rw-r--r--src/pulsecore/lock-autospawn.h32
-rw-r--r--src/pulsecore/log.c80
-rw-r--r--src/pulsecore/log.h8
-rw-r--r--src/pulsecore/ltdl-helper.c10
-rw-r--r--src/pulsecore/ltdl-helper.h2
-rw-r--r--src/pulsecore/macro.h75
-rw-r--r--src/pulsecore/mcalign.c11
-rw-r--r--src/pulsecore/mcalign.h5
-rw-r--r--src/pulsecore/memblock.c168
-rw-r--r--src/pulsecore/memblock.h17
-rw-r--r--src/pulsecore/memblockq.c488
-rw-r--r--src/pulsecore/memblockq.h84
-rw-r--r--src/pulsecore/memchunk.c38
-rw-r--r--src/pulsecore/memchunk.h5
-rw-r--r--src/pulsecore/modargs.c25
-rw-r--r--src/pulsecore/modargs.h2
-rw-r--r--src/pulsecore/modinfo.c2
-rw-r--r--src/pulsecore/modinfo.h2
-rw-r--r--src/pulsecore/module.c113
-rw-r--r--src/pulsecore/module.h16
-rw-r--r--src/pulsecore/msgobject.c2
-rw-r--r--src/pulsecore/msgobject.h2
-rw-r--r--src/pulsecore/mutex-posix.c14
-rw-r--r--src/pulsecore/mutex-win32.c2
-rw-r--r--src/pulsecore/mutex.h3
-rw-r--r--src/pulsecore/namereg.c21
-rw-r--r--src/pulsecore/namereg.h7
-rw-r--r--src/pulsecore/native-common.h19
-rw-r--r--src/pulsecore/object.c2
-rw-r--r--src/pulsecore/object.h4
-rw-r--r--src/pulsecore/once.c2
-rw-r--r--src/pulsecore/once.h2
-rw-r--r--src/pulsecore/packet.c2
-rw-r--r--src/pulsecore/packet.h2
-rw-r--r--src/pulsecore/parseaddr.c23
-rw-r--r--src/pulsecore/parseaddr.h2
-rw-r--r--src/pulsecore/pdispatch.c4
-rw-r--r--src/pulsecore/pdispatch.h2
-rw-r--r--src/pulsecore/pid.c137
-rw-r--r--src/pulsecore/pid.h8
-rw-r--r--src/pulsecore/pipe.c2
-rw-r--r--src/pulsecore/pipe.h2
-rw-r--r--src/pulsecore/play-memblockq.c119
-rw-r--r--src/pulsecore/play-memblockq.h11
-rw-r--r--src/pulsecore/play-memchunk.c160
-rw-r--r--src/pulsecore/play-memchunk.h7
-rw-r--r--src/pulsecore/poll.c2
-rw-r--r--src/pulsecore/poll.h2
-rw-r--r--src/pulsecore/prioq.c256
-rw-r--r--src/pulsecore/prioq.h64
-rw-r--r--src/pulsecore/proplist-util.c118
-rw-r--r--src/pulsecore/proplist-util.h29
-rw-r--r--src/pulsecore/protocol-cli.c89
-rw-r--r--src/pulsecore/protocol-cli.h11
-rw-r--r--src/pulsecore/protocol-esound.c528
-rw-r--r--src/pulsecore/protocol-esound.h32
-rw-r--r--src/pulsecore/protocol-http.c100
-rw-r--r--src/pulsecore/protocol-http.h14
-rw-r--r--src/pulsecore/protocol-native.c2325
-rw-r--r--src/pulsecore/protocol-native.h63
-rw-r--r--src/pulsecore/protocol-simple.c402
-rw-r--r--src/pulsecore/protocol-simple.h30
-rw-r--r--src/pulsecore/pstream-util.c2
-rw-r--r--src/pulsecore/pstream-util.h2
-rw-r--r--src/pulsecore/pstream.c71
-rw-r--r--src/pulsecore/pstream.h15
-rw-r--r--src/pulsecore/queue.c13
-rw-r--r--src/pulsecore/queue.h17
-rw-r--r--src/pulsecore/random.c23
-rw-r--r--src/pulsecore/random.h2
-rw-r--r--src/pulsecore/refcnt.h5
-rw-r--r--src/pulsecore/resampler.c326
-rw-r--r--src/pulsecore/resampler.h17
-rw-r--r--src/pulsecore/rtclock.c23
-rw-r--r--src/pulsecore/rtclock.h5
-rw-r--r--src/pulsecore/rtpoll.c141
-rw-r--r--src/pulsecore/rtpoll.h8
-rw-r--r--src/pulsecore/rtsig.c4
-rw-r--r--src/pulsecore/rtsig.h2
-rw-r--r--src/pulsecore/sample-util.c594
-rw-r--r--src/pulsecore/sample-util.h23
-rw-r--r--src/pulsecore/sconv-s16be.c2
-rw-r--r--src/pulsecore/sconv-s16be.h2
-rw-r--r--src/pulsecore/sconv-s16le.c44
-rw-r--r--src/pulsecore/sconv-s16le.h2
-rw-r--r--src/pulsecore/sconv.c28
-rw-r--r--src/pulsecore/sconv.h2
-rw-r--r--src/pulsecore/semaphore-posix.c2
-rw-r--r--src/pulsecore/semaphore-win32.c2
-rw-r--r--src/pulsecore/semaphore.h2
-rw-r--r--src/pulsecore/shared.c (renamed from src/pulsecore/props.c)78
-rw-r--r--src/pulsecore/shared.h (renamed from src/pulsecore/props.h)43
-rw-r--r--src/pulsecore/shm.c44
-rw-r--r--src/pulsecore/shm.h10
-rw-r--r--src/pulsecore/sink-input.c949
-rw-r--r--src/pulsecore/sink-input.h166
-rw-r--r--src/pulsecore/sink.c1092
-rw-r--r--src/pulsecore/sink.h157
-rw-r--r--src/pulsecore/sioman.c2
-rw-r--r--src/pulsecore/sioman.h2
-rw-r--r--src/pulsecore/socket-client.c74
-rw-r--r--src/pulsecore/socket-client.h10
-rw-r--r--src/pulsecore/socket-server.c19
-rw-r--r--src/pulsecore/socket-server.h6
-rw-r--r--src/pulsecore/socket-util.c41
-rw-r--r--src/pulsecore/socket-util.h8
-rw-r--r--src/pulsecore/sound-file-stream.c201
-rw-r--r--src/pulsecore/sound-file-stream.h2
-rw-r--r--src/pulsecore/sound-file.c25
-rw-r--r--src/pulsecore/sound-file.h2
-rw-r--r--src/pulsecore/source-output.c427
-rw-r--r--src/pulsecore/source-output.h106
-rw-r--r--src/pulsecore/source.c711
-rw-r--r--src/pulsecore/source.h132
-rw-r--r--src/pulsecore/speex/arch.h241
-rw-r--r--src/pulsecore/speex/fixed_generic.h106
-rw-r--r--src/pulsecore/speex/resample.c1121
-rw-r--r--src/pulsecore/speex/speex_resampler.h328
-rw-r--r--src/pulsecore/speexwrap.h48
-rw-r--r--src/pulsecore/start-child.c62
-rw-r--r--src/pulsecore/start-child.h2
-rw-r--r--src/pulsecore/strbuf.c16
-rw-r--r--src/pulsecore/strbuf.h6
-rw-r--r--src/pulsecore/strlist.c2
-rw-r--r--src/pulsecore/strlist.h2
-rw-r--r--src/pulsecore/tagstruct.c112
-rw-r--r--src/pulsecore/tagstruct.h15
-rw-r--r--src/pulsecore/thread-mq.c37
-rw-r--r--src/pulsecore/thread-mq.h7
-rw-r--r--src/pulsecore/thread-posix.c11
-rw-r--r--src/pulsecore/thread-win32.c2
-rw-r--r--src/pulsecore/thread.h7
-rw-r--r--src/pulsecore/time-smoother.c265
-rw-r--r--src/pulsecore/time-smoother.h14
-rw-r--r--src/pulsecore/tokenizer.c6
-rw-r--r--src/pulsecore/tokenizer.h2
-rw-r--r--src/pulsecore/x11prop.c6
-rw-r--r--src/pulsecore/x11prop.h2
-rw-r--r--src/pulsecore/x11wrap.c64
-rw-r--r--src/pulsecore/x11wrap.h12
-rw-r--r--src/tests/asyncmsgq-test.c2
-rw-r--r--src/tests/asyncq-test.c6
-rw-r--r--src/tests/channelmap-test.c13
-rw-r--r--src/tests/close-test.c20
-rw-r--r--src/tests/cpulimit-test.c8
-rw-r--r--src/tests/envelope-test.c246
-rw-r--r--src/tests/flist-test.c2
-rw-r--r--src/tests/get-binary-name-test.c2
-rw-r--r--src/tests/hook-list-test.c14
-rw-r--r--src/tests/interpol-test.c30
-rw-r--r--src/tests/ipacl-test.c2
-rw-r--r--src/tests/lock-autospawn-test.c109
-rw-r--r--src/tests/mainloop-test.c6
-rw-r--r--src/tests/mcalign-test.c17
-rw-r--r--src/tests/memblock-test.c8
-rw-r--r--src/tests/memblockq-test.c73
-rw-r--r--src/tests/mix-test.c30
-rw-r--r--src/tests/pacat-simple.c8
-rw-r--r--src/tests/parec-simple.c11
-rw-r--r--src/tests/prioq-test.c44
-rw-r--r--src/tests/proplist-test.c60
-rw-r--r--src/tests/queue-test.c8
-rw-r--r--src/tests/remix-test.c4
-rw-r--r--src/tests/resampler-test.c24
-rw-r--r--src/tests/rtpoll-test.c4
-rw-r--r--src/tests/rtstutter.c117
-rw-r--r--src/tests/sig2str-test.c2
-rw-r--r--src/tests/smoother-test.c20
-rw-r--r--src/tests/stripnul.c70
-rw-r--r--src/tests/strlist-test.c5
-rw-r--r--src/tests/sync-playback.c9
-rw-r--r--src/tests/thread-mainloop-test.c6
-rw-r--r--src/tests/thread-test.c2
-rw-r--r--src/tests/utf8-test.c2
-rw-r--r--src/tests/voltest.c18
-rw-r--r--src/utils/pabrowse.c2
-rw-r--r--src/utils/pacat.c228
-rw-r--r--src/utils/pacmd.c39
-rw-r--r--src/utils/pactl.c259
-rwxr-xr-xsrc/utils/padsp2
-rw-r--r--src/utils/padsp.c62
-rw-r--r--src/utils/paplay.c59
-rw-r--r--src/utils/pasuspender.c46
-rw-r--r--src/utils/pax11publish.c37
-rw-r--r--todo12
473 files changed, 58714 insertions, 26585 deletions
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..83bc72e
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1068 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international! The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages. A few packages already provide translations for their
+messages.
+
+ If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site. But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+ Installers will find here some useful hints. These notes also
+explain how users should proceed for getting the programs to use the
+available translations. They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+ When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used. The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+ ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed. So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation. Future versions of GNU `gettext' will
+very likely convey even more functionality. So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+ So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language. Most such
+packages use GNU `gettext'. Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+ By default, this package will be installed to allow translation of
+messages. It will automatically detect whether the system already
+provides the GNU `gettext' functions. If not, the included GNU
+`gettext' library will be used. This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour. The commands:
+
+ ./configure --with-included-gettext
+ ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+ When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this. This might not be desirable. You should use
+the more recent version of the GNU `gettext' library. I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+ ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+ The configuration process will not test for the `catgets' function
+and therefore it will not be used. The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+ Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language. Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package. However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination. If you happen to have the `LC_ALL' or some other
+`LC_xxx' environment variables set, you should unset them before
+setting `LANG', otherwise the setting of `LANG' will not have the
+desired effect. Here `LL' is an ISO 639 two-letter language code, and
+`CC' is an ISO 3166 two-letter country code. For example, let's
+suppose that you speak German and live in Germany. At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+ You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries. For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
+country code serves to distinguish the dialects.
+
+ The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc. On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+ Not all programs have translations for all languages. By default, an
+English message is shown in place of a nonexistent translation. If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries. For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+ Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003). During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+ In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect. For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list. The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://translationproject.org/', in the "Teams" area.
+
+ If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended. For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+ subscribe
+
+ Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around. If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `coordinator@translationproject.org' to
+reach the coordinator for all translator teams.
+
+ The English team is special. It works at improving and uniformizing
+the terminology in use. Proven linguistic skills are praised more than
+programming skills, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of November
+2007. The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+ Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo
+ +----------------------------------------------------+
+ Compendium | [] [] [] [] |
+ a2ps | [] [] [] [] [] |
+ aegis | () |
+ ant-phone | () |
+ anubis | [] |
+ ap-utils | |
+ aspell | [] [] [] [] [] |
+ bash | [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | |
+ bison | [] [] |
+ bison-runtime | [] |
+ bluez-pin | [] [] [] [] [] |
+ cflow | [] |
+ clisp | [] [] [] |
+ console-tools | [] [] |
+ coreutils | [] [] [] [] |
+ cpio | |
+ cpplib | [] [] [] |
+ cryptonit | [] |
+ dialog | |
+ diffutils | [] [] [] [] [] [] |
+ doodle | [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] |
+ fetchmail | [] [] () [] [] |
+ findutils | [] |
+ findutils_stable | [] [] [] |
+ flex | [] [] [] |
+ fslint | |
+ gas | |
+ gawk | [] [] [] |
+ gcal | [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] |
+ gettext-tools | [] [] |
+ gip | [] |
+ gliv | [] [] |
+ glunarclock | [] |
+ gmult | [] [] |
+ gnubiff | () |
+ gnucash | [] [] () () [] |
+ gnuedu | |
+ gnulib | [] |
+ gnunet | |
+ gnunet-gtk | |
+ gnutls | [] |
+ gpe-aerial | [] [] |
+ gpe-beam | [] [] |
+ gpe-calendar | |
+ gpe-clock | [] [] |
+ gpe-conf | [] [] |
+ gpe-contacts | |
+ gpe-edit | [] |
+ gpe-filemanager | |
+ gpe-go | [] |
+ gpe-login | [] [] |
+ gpe-ownerinfo | [] [] |
+ gpe-package | |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] |
+ gpe-taskmanager | [] [] |
+ gpe-timesheet | [] |
+ gpe-today | [] [] |
+ gpe-todo | |
+ gphoto2 | [] [] [] [] |
+ gprof | [] [] |
+ gpsdrive | |
+ gramadoir | [] [] |
+ grep | [] [] |
+ gretl | () |
+ gsasl | |
+ gss | |
+ gst-plugins-bad | [] [] |
+ gst-plugins-base | [] [] |
+ gst-plugins-good | [] [] [] |
+ gst-plugins-ugly | [] [] |
+ gstreamer | [] [] [] [] [] [] [] |
+ gtick | () |
+ gtkam | [] [] [] [] |
+ gtkorphan | [] [] |
+ gtkspell | [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] |
+ herrie | [] |
+ hylafax | |
+ idutils | [] [] |
+ indent | [] [] [] [] |
+ iso_15924 | |
+ iso_3166 | [] [] [] [] [] [] [] [] [] [] [] |
+ iso_3166_2 | |
+ iso_4217 | [] [] [] |
+ iso_639 | [] [] [] [] |
+ jpilot | [] |
+ jtag | |
+ jwhois | |
+ kbd | [] [] [] [] |
+ keytouch | [] [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | [] |
+ latrine | () |
+ ld | [] |
+ leafpad | [] [] [] [] [] |
+ libc | [] [] [] [] |
+ libexif | [] |
+ libextractor | [] |
+ libgpewidget | [] [] [] |
+ libgpg-error | [] |
+ libgphoto2 | [] [] |
+ libgphoto2_port | [] [] |
+ libgsasl | |
+ libiconv | [] [] |
+ libidn | [] [] [] |
+ lifelines | [] () |
+ lilypond | [] |
+ lingoteach | |
+ lprng | |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] [] |
+ mailfromd | |
+ mailutils | [] |
+ make | [] [] |
+ man-db | [] [] [] |
+ minicom | [] [] [] |
+ nano | [] [] [] |
+ opcodes | [] |
+ parted | [] [] |
+ pilot-qof | |
+ popt | [] [] [] |
+ psmisc | [] |
+ pwdutils | |
+ qof | |
+ radius | [] |
+ recode | [] [] [] [] [] [] |
+ rpm | [] |
+ screem | |
+ scrollkeeper | [] [] [] [] [] [] [] [] |
+ sed | [] [] [] |
+ shared-mime-info | [] [] [] [] () [] [] [] |
+ sharutils | [] [] [] [] [] [] |
+ shishi | |
+ skencil | [] () |
+ solfege | |
+ soundtracker | [] [] |
+ sp | [] |
+ system-tools-ba... | [] [] [] [] [] [] [] [] [] |
+ tar | [] [] |
+ texinfo | [] [] [] |
+ tin | () () |
+ tuxpaint | [] [] [] [] [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] [] [] |
+ util-linux-ng | [] [] [] [] |
+ vorbis-tools | [] |
+ wastesedge | () |
+ wdiff | [] [] [] [] |
+ wget | [] [] [] |
+ xchat | [] [] [] [] [] [] [] |
+ xkeyboard-config | [] |
+ xpad | [] [] [] |
+ +----------------------------------------------------+
+ af am ar az be bg bs ca cs cy da de el en en_GB eo
+ 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18
+
+ es et eu fa fi fr ga gl gu he hi hr hu id is it
+ +--------------------------------------------------+
+ Compendium | [] [] [] [] [] |
+ a2ps | [] [] [] () |
+ aegis | |
+ ant-phone | [] |
+ anubis | [] |
+ ap-utils | [] [] |
+ aspell | [] [] [] |
+ bash | [] |
+ bfd | [] [] |
+ bibshelf | [] [] [] |
+ binutils | [] [] [] |
+ bison | [] [] [] [] [] [] |
+ bison-runtime | [] [] [] [] [] |
+ bluez-pin | [] [] [] [] [] |
+ cflow | [] |
+ clisp | [] [] |
+ console-tools | |
+ coreutils | [] [] [] [] [] [] |
+ cpio | [] [] [] |
+ cpplib | [] [] |
+ cryptonit | [] |
+ dialog | [] [] [] |
+ diffutils | [] [] [] [] [] [] [] [] [] |
+ doodle | [] [] |
+ e2fsprogs | [] [] [] |
+ enscript | [] [] [] |
+ fetchmail | [] |
+ findutils | [] [] [] |
+ findutils_stable | [] [] [] [] |
+ flex | [] [] [] |
+ fslint | |
+ gas | [] [] |
+ gawk | [] [] [] [] () |
+ gcal | [] [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] |
+ gettext-tools | [] [] [] [] |
+ gip | [] [] [] [] |
+ gliv | () |
+ glunarclock | [] [] [] |
+ gmult | [] [] [] |
+ gnubiff | () () |
+ gnucash | () () () |
+ gnuedu | [] |
+ gnulib | [] [] [] |
+ gnunet | |
+ gnunet-gtk | |
+ gnutls | |
+ gpe-aerial | [] [] |
+ gpe-beam | [] [] |
+ gpe-calendar | |
+ gpe-clock | [] [] [] [] |
+ gpe-conf | [] |
+ gpe-contacts | [] [] |
+ gpe-edit | [] [] [] [] |
+ gpe-filemanager | [] |
+ gpe-go | [] [] [] |
+ gpe-login | [] [] [] |
+ gpe-ownerinfo | [] [] [] [] [] |
+ gpe-package | [] |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] [] [] |
+ gpe-taskmanager | [] [] [] |
+ gpe-timesheet | [] [] [] [] |
+ gpe-today | [] [] [] [] |
+ gpe-todo | [] |
+ gphoto2 | [] [] [] [] [] |
+ gprof | [] [] [] [] [] |
+ gpsdrive | [] |
+ gramadoir | [] [] |
+ grep | [] [] [] |
+ gretl | [] [] [] () |
+ gsasl | [] [] |
+ gss | [] [] |
+ gst-plugins-bad | [] [] [] [] |
+ gst-plugins-base | [] [] [] [] |
+ gst-plugins-good | [] [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] |
+ gstreamer | [] [] [] |
+ gtick | [] [] [] |
+ gtkam | [] [] [] [] |
+ gtkorphan | [] [] |
+ gtkspell | [] [] [] [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ herrie | [] |
+ hylafax | |
+ idutils | [] [] [] [] [] |
+ indent | [] [] [] [] [] [] [] [] [] [] |
+ iso_15924 | [] |
+ iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ iso_3166_2 | [] |
+ iso_4217 | [] [] [] [] [] [] |
+ iso_639 | [] [] [] [] [] [] |
+ jpilot | [] [] |
+ jtag | [] |
+ jwhois | [] [] [] [] [] |
+ kbd | [] [] |
+ keytouch | [] [] [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | [] [] |
+ latrine | [] [] |
+ ld | [] [] [] [] |
+ leafpad | [] [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | [] |
+ libgpewidget | [] [] [] [] [] |
+ libgpg-error | [] |
+ libgphoto2 | [] [] [] |
+ libgphoto2_port | [] [] |
+ libgsasl | [] [] |
+ libiconv | [] [] [] |
+ libidn | [] [] |
+ lifelines | () |
+ lilypond | [] [] [] |
+ lingoteach | [] [] [] |
+ lprng | |
+ lynx | [] [] [] |
+ m4 | [] [] [] [] |
+ mailfromd | |
+ mailutils | [] [] |
+ make | [] [] [] [] [] [] [] [] |
+ man-db | [] |
+ minicom | [] [] [] [] |
+ nano | [] [] [] [] [] [] [] |
+ opcodes | [] [] [] [] |
+ parted | [] [] [] |
+ pilot-qof | |
+ popt | [] [] [] [] |
+ psmisc | [] [] |
+ pwdutils | |
+ qof | [] |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] [] |
+ rpm | [] [] |
+ screem | |
+ scrollkeeper | [] [] [] |
+ sed | [] [] [] [] [] |
+ shared-mime-info | [] [] [] [] [] [] |
+ sharutils | [] [] [] [] [] [] [] [] |
+ shishi | [] |
+ skencil | [] [] |
+ solfege | [] |
+ soundtracker | [] [] [] |
+ sp | [] |
+ system-tools-ba... | [] [] [] [] [] [] [] [] [] |
+ tar | [] [] [] [] [] |
+ texinfo | [] [] [] |
+ tin | [] () |
+ tuxpaint | [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | [] [] |
+ util-linux | [] [] [] [] [] [] [] |
+ util-linux-ng | [] [] [] [] [] [] [] |
+ vorbis-tools | |
+ wastesedge | () |
+ wdiff | [] [] [] [] [] [] [] [] |
+ wget | [] [] [] [] [] [] [] [] |
+ xchat | [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] |
+ xpad | [] [] [] |
+ +--------------------------------------------------+
+ es et eu fa fi fr ga gl gu he hi hr hu id is it
+ 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52
+
+ ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn
+ +--------------------------------------------------+
+ Compendium | [] |
+ a2ps | () [] [] |
+ aegis | () |
+ ant-phone | [] |
+ anubis | [] [] [] |
+ ap-utils | [] |
+ aspell | [] [] |
+ bash | [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | |
+ bison | [] [] [] |
+ bison-runtime | [] [] [] |
+ bluez-pin | [] [] [] |
+ cflow | |
+ clisp | [] |
+ console-tools | |
+ coreutils | [] |
+ cpio | [] |
+ cpplib | [] |
+ cryptonit | [] |
+ dialog | [] [] |
+ diffutils | [] [] [] |
+ doodle | |
+ e2fsprogs | [] |
+ enscript | [] |
+ fetchmail | [] [] |
+ findutils | [] |
+ findutils_stable | [] |
+ flex | [] [] |
+ fslint | |
+ gas | |
+ gawk | [] [] |
+ gcal | |
+ gcc | |
+ gettext-examples | [] [] [] |
+ gettext-runtime | [] [] [] |
+ gettext-tools | [] [] |
+ gip | [] [] |
+ gliv | [] |
+ glunarclock | [] [] |
+ gmult | [] [] [] |
+ gnubiff | |
+ gnucash | () () () |
+ gnuedu | |
+ gnulib | [] [] |
+ gnunet | |
+ gnunet-gtk | |
+ gnutls | [] |
+ gpe-aerial | [] |
+ gpe-beam | [] |
+ gpe-calendar | [] |
+ gpe-clock | [] [] [] |
+ gpe-conf | [] [] [] |
+ gpe-contacts | [] |
+ gpe-edit | [] [] [] |
+ gpe-filemanager | [] [] |
+ gpe-go | [] [] [] |
+ gpe-login | [] [] [] |
+ gpe-ownerinfo | [] [] |
+ gpe-package | [] [] |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] [] |
+ gpe-taskmanager | [] [] [] [] |
+ gpe-timesheet | [] |
+ gpe-today | [] [] |
+ gpe-todo | [] |
+ gphoto2 | [] [] |
+ gprof | [] |
+ gpsdrive | [] |
+ gramadoir | () |
+ grep | [] [] |
+ gretl | |
+ gsasl | [] |
+ gss | |
+ gst-plugins-bad | [] |
+ gst-plugins-base | [] |
+ gst-plugins-good | [] |
+ gst-plugins-ugly | [] |
+ gstreamer | [] |
+ gtick | [] |
+ gtkam | [] [] |
+ gtkorphan | [] |
+ gtkspell | [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] [] [] |
+ herrie | [] |
+ hylafax | |
+ idutils | [] |
+ indent | [] [] |
+ iso_15924 | [] |
+ iso_3166 | [] [] [] [] [] [] [] [] |
+ iso_3166_2 | [] |
+ iso_4217 | [] [] [] |
+ iso_639 | [] [] [] [] |
+ jpilot | () () |
+ jtag | |
+ jwhois | [] |
+ kbd | [] |
+ keytouch | [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | |
+ latrine | [] |
+ ld | |
+ leafpad | [] [] |
+ libc | [] [] [] |
+ libexif | |
+ libextractor | |
+ libgpewidget | [] |
+ libgpg-error | |
+ libgphoto2 | [] |
+ libgphoto2_port | [] |
+ libgsasl | [] |
+ libiconv | [] |
+ libidn | [] [] |
+ lifelines | [] |
+ lilypond | [] |
+ lingoteach | [] |
+ lprng | |
+ lynx | [] [] |
+ m4 | [] [] |
+ mailfromd | |
+ mailutils | |
+ make | [] [] [] |
+ man-db | |
+ minicom | [] |
+ nano | [] [] [] |
+ opcodes | [] |
+ parted | [] [] |
+ pilot-qof | |
+ popt | [] [] [] |
+ psmisc | [] [] [] |
+ pwdutils | |
+ qof | |
+ radius | |
+ recode | [] |
+ rpm | [] [] |
+ screem | [] |
+ scrollkeeper | [] [] [] [] |
+ sed | [] [] |
+ shared-mime-info | [] [] [] [] [] [] [] |
+ sharutils | [] [] |
+ shishi | |
+ skencil | |
+ solfege | () () |
+ soundtracker | |
+ sp | () |
+ system-tools-ba... | [] [] [] [] |
+ tar | [] [] [] |
+ texinfo | [] [] |
+ tin | |
+ tuxpaint | () [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] |
+ util-linux-ng | [] [] |
+ vorbis-tools | |
+ wastesedge | [] |
+ wdiff | [] [] |
+ wget | [] [] |
+ xchat | [] [] [] [] |
+ xkeyboard-config | [] [] [] |
+ xpad | [] [] [] |
+ +--------------------------------------------------+
+ ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn
+ 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6
+
+ or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+ +--------------------------------------------------+
+ Compendium | [] [] [] [] [] |
+ a2ps | () [] [] [] [] [] [] |
+ aegis | () () |
+ ant-phone | [] [] |
+ anubis | [] [] [] |
+ ap-utils | () |
+ aspell | [] [] [] |
+ bash | [] [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | [] [] |
+ bison | [] [] [] [] [] |
+ bison-runtime | [] [] [] [] [] |
+ bluez-pin | [] [] [] [] [] [] [] [] [] |
+ cflow | [] |
+ clisp | [] |
+ console-tools | [] |
+ coreutils | [] [] [] [] |
+ cpio | [] [] [] |
+ cpplib | [] |
+ cryptonit | [] [] |
+ dialog | [] |
+ diffutils | [] [] [] [] [] [] |
+ doodle | [] [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] [] |
+ fetchmail | [] [] [] |
+ findutils | [] [] [] |
+ findutils_stable | [] [] [] [] [] [] |
+ flex | [] [] [] [] [] |
+ fslint | [] |
+ gas | |
+ gawk | [] [] [] [] |
+ gcal | [] |
+ gcc | [] [] |
+ gettext-examples | [] [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] [] [] |
+ gettext-tools | [] [] [] [] [] [] [] |
+ gip | [] [] [] [] |
+ gliv | [] [] [] [] [] [] |
+ glunarclock | [] [] [] [] [] [] |
+ gmult | [] [] [] [] |
+ gnubiff | () [] |
+ gnucash | () [] |
+ gnuedu | |
+ gnulib | [] [] [] |
+ gnunet | |
+ gnunet-gtk | [] |
+ gnutls | [] [] |
+ gpe-aerial | [] [] [] [] [] [] [] |
+ gpe-beam | [] [] [] [] [] [] [] |
+ gpe-calendar | [] [] [] [] |
+ gpe-clock | [] [] [] [] [] [] [] [] |
+ gpe-conf | [] [] [] [] [] [] [] |
+ gpe-contacts | [] [] [] [] [] |
+ gpe-edit | [] [] [] [] [] [] [] [] [] |
+ gpe-filemanager | [] [] |
+ gpe-go | [] [] [] [] [] [] [] [] |
+ gpe-login | [] [] [] [] [] [] [] [] |
+ gpe-ownerinfo | [] [] [] [] [] [] [] [] |
+ gpe-package | [] [] |
+ gpe-sketchbook | [] [] [] [] [] [] [] [] |
+ gpe-su | [] [] [] [] [] [] [] [] |
+ gpe-taskmanager | [] [] [] [] [] [] [] [] |
+ gpe-timesheet | [] [] [] [] [] [] [] [] |
+ gpe-today | [] [] [] [] [] [] [] [] |
+ gpe-todo | [] [] [] [] |
+ gphoto2 | [] [] [] [] [] [] |
+ gprof | [] [] [] |
+ gpsdrive | [] [] |
+ gramadoir | [] [] |
+ grep | [] [] [] [] |
+ gretl | [] [] [] |
+ gsasl | [] [] [] |
+ gss | [] [] [] [] |
+ gst-plugins-bad | [] [] [] |
+ gst-plugins-base | [] [] |
+ gst-plugins-good | [] [] |
+ gst-plugins-ugly | [] [] [] |
+ gstreamer | [] [] [] [] |
+ gtick | [] |
+ gtkam | [] [] [] [] [] |
+ gtkorphan | [] |
+ gtkspell | [] [] [] [] [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] [] [] [] |
+ herrie | [] [] [] |
+ hylafax | |
+ idutils | [] [] [] [] [] |
+ indent | [] [] [] [] [] [] [] |
+ iso_15924 | |
+ iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ iso_3166_2 | |
+ iso_4217 | [] [] [] [] [] [] [] |
+ iso_639 | [] [] [] [] [] [] [] |
+ jpilot | |
+ jtag | [] |
+ jwhois | [] [] [] [] |
+ kbd | [] [] [] |
+ keytouch | [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | [] |
+ latrine | |
+ ld | [] |
+ leafpad | [] [] [] [] [] [] |
+ libc | [] [] [] [] |
+ libexif | [] [] |
+ libextractor | [] [] |
+ libgpewidget | [] [] [] [] [] [] [] [] |
+ libgpg-error | [] [] [] |
+ libgphoto2 | [] |
+ libgphoto2_port | [] [] [] |
+ libgsasl | [] [] [] [] |
+ libiconv | [] [] [] |
+ libidn | [] [] () |
+ lifelines | [] [] |
+ lilypond | |
+ lingoteach | [] |
+ lprng | [] |
+ lynx | [] [] [] |
+ m4 | [] [] [] [] [] |
+ mailfromd | [] |
+ mailutils | [] [] [] |
+ make | [] [] [] [] |
+ man-db | [] [] [] [] |
+ minicom | [] [] [] [] [] |
+ nano | [] [] [] [] |
+ opcodes | [] [] |
+ parted | [] |
+ pilot-qof | |
+ popt | [] [] [] [] |
+ psmisc | [] [] |
+ pwdutils | [] [] |
+ qof | [] [] |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] |
+ rpm | [] [] [] [] |
+ screem | |
+ scrollkeeper | [] [] [] [] [] [] [] |
+ sed | [] [] [] [] [] [] [] [] [] |
+ shared-mime-info | [] [] [] [] [] [] |
+ sharutils | [] [] [] [] |
+ shishi | [] |
+ skencil | [] [] [] |
+ solfege | [] |
+ soundtracker | [] [] |
+ sp | |
+ system-tools-ba... | [] [] [] [] [] [] [] [] [] |
+ tar | [] [] [] [] |
+ texinfo | [] [] [] [] |
+ tin | () |
+ tuxpaint | [] [] [] [] [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] [] [] |
+ util-linux-ng | [] [] [] [] |
+ vorbis-tools | [] |
+ wastesedge | |
+ wdiff | [] [] [] [] [] [] [] |
+ wget | [] [] [] [] |
+ xchat | [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] |
+ xpad | [] [] [] |
+ +--------------------------------------------------+
+ or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+ 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3
+
+ tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
+ +---------------------------------------------------+
+ Compendium | [] [] [] [] | 19
+ a2ps | [] [] [] | 19
+ aegis | [] | 1
+ ant-phone | [] [] | 6
+ anubis | [] [] [] | 11
+ ap-utils | () [] | 4
+ aspell | [] [] [] | 16
+ bash | [] | 6
+ bfd | | 2
+ bibshelf | [] | 7
+ binutils | [] [] [] [] | 9
+ bison | [] [] [] [] | 20
+ bison-runtime | [] [] [] [] | 18
+ bluez-pin | [] [] [] [] [] [] | 28
+ cflow | [] [] | 5
+ clisp | | 9
+ console-tools | [] [] | 5
+ coreutils | [] [] [] | 18
+ cpio | [] [] [] [] | 11
+ cpplib | [] [] [] [] [] | 12
+ cryptonit | [] | 6
+ dialog | [] [] [] | 9
+ diffutils | [] [] [] [] [] | 29
+ doodle | [] | 6
+ e2fsprogs | [] [] | 10
+ enscript | [] [] [] | 16
+ fetchmail | [] [] | 12
+ findutils | [] [] [] | 11
+ findutils_stable | [] [] [] [] | 18
+ flex | [] [] | 15
+ fslint | [] | 2
+ gas | [] | 3
+ gawk | [] [] [] | 16
+ gcal | [] | 5
+ gcc | [] [] [] | 7
+ gettext-examples | [] [] [] [] [] [] | 29
+ gettext-runtime | [] [] [] [] [] [] | 28
+ gettext-tools | [] [] [] [] [] | 20
+ gip | [] [] | 13
+ gliv | [] [] | 11
+ glunarclock | [] [] [] | 15
+ gmult | [] [] [] [] | 16
+ gnubiff | [] | 2
+ gnucash | () [] | 5
+ gnuedu | [] | 2
+ gnulib | [] | 10
+ gnunet | | 0
+ gnunet-gtk | [] [] | 3
+ gnutls | | 4
+ gpe-aerial | [] [] | 14
+ gpe-beam | [] [] | 14
+ gpe-calendar | [] [] | 7
+ gpe-clock | [] [] [] [] | 21
+ gpe-conf | [] [] [] | 16
+ gpe-contacts | [] [] | 10
+ gpe-edit | [] [] [] [] [] | 22
+ gpe-filemanager | [] [] | 7
+ gpe-go | [] [] [] [] | 19
+ gpe-login | [] [] [] [] [] | 21
+ gpe-ownerinfo | [] [] [] [] | 21
+ gpe-package | [] | 6
+ gpe-sketchbook | [] [] | 16
+ gpe-su | [] [] [] [] | 21
+ gpe-taskmanager | [] [] [] [] | 21
+ gpe-timesheet | [] [] [] [] | 18
+ gpe-today | [] [] [] [] [] | 21
+ gpe-todo | [] [] | 8
+ gphoto2 | [] [] [] [] | 21
+ gprof | [] [] | 13
+ gpsdrive | [] | 5
+ gramadoir | [] | 7
+ grep | [] | 12
+ gretl | | 6
+ gsasl | [] [] [] | 9
+ gss | [] | 7
+ gst-plugins-bad | [] [] [] | 13
+ gst-plugins-base | [] [] | 11
+ gst-plugins-good | [] [] [] [] [] | 16
+ gst-plugins-ugly | [] [] [] | 13
+ gstreamer | [] [] [] | 18
+ gtick | [] [] | 7
+ gtkam | [] | 16
+ gtkorphan | [] | 7
+ gtkspell | [] [] [] [] [] [] | 27
+ gutenprint | | 4
+ hello | [] [] [] [] [] | 38
+ herrie | [] [] | 8
+ hylafax | | 0
+ idutils | [] [] | 15
+ indent | [] [] [] [] [] | 28
+ iso_15924 | [] [] | 4
+ iso_3166 | [] [] [] [] [] [] [] [] [] | 54
+ iso_3166_2 | [] [] | 4
+ iso_4217 | [] [] [] [] [] | 24
+ iso_639 | [] [] [] [] [] | 26
+ jpilot | [] [] [] [] | 7
+ jtag | [] | 3
+ jwhois | [] [] [] | 13
+ kbd | [] [] [] | 13
+ keytouch | [] | 8
+ keytouch-editor | [] | 5
+ keytouch-keyboa... | [] | 5
+ latrine | [] [] | 5
+ ld | [] [] [] [] | 10
+ leafpad | [] [] [] [] [] | 24
+ libc | [] [] [] | 19
+ libexif | [] | 5
+ libextractor | [] | 5
+ libgpewidget | [] [] [] | 20
+ libgpg-error | [] | 6
+ libgphoto2 | [] [] | 9
+ libgphoto2_port | [] [] [] | 11
+ libgsasl | [] | 8
+ libiconv | [] [] | 11
+ libidn | [] [] | 11
+ lifelines | | 4
+ lilypond | [] | 6
+ lingoteach | [] | 6
+ lprng | [] | 2
+ lynx | [] [] [] | 15
+ m4 | [] [] [] | 18
+ mailfromd | [] [] | 3
+ mailutils | [] [] | 8
+ make | [] [] [] | 20
+ man-db | [] | 9
+ minicom | [] | 14
+ nano | [] [] [] | 20
+ opcodes | [] [] | 10
+ parted | [] [] [] | 11
+ pilot-qof | [] | 1
+ popt | [] [] [] [] | 18
+ psmisc | [] [] | 10
+ pwdutils | [] | 3
+ qof | [] | 4
+ radius | [] [] | 7
+ recode | [] [] [] | 25
+ rpm | [] [] [] [] | 13
+ screem | [] | 2
+ scrollkeeper | [] [] [] [] | 26
+ sed | [] [] [] [] | 23
+ shared-mime-info | [] [] [] | 29
+ sharutils | [] [] [] | 23
+ shishi | [] | 3
+ skencil | [] | 7
+ solfege | [] | 3
+ soundtracker | [] [] | 9
+ sp | [] | 3
+ system-tools-ba... | [] [] [] [] [] [] [] | 38
+ tar | [] [] [] | 17
+ texinfo | [] [] [] | 15
+ tin | | 1
+ tuxpaint | [] [] [] | 19
+ unicode-han-tra... | | 0
+ unicode-transla... | | 2
+ util-linux | [] [] [] | 20
+ util-linux-ng | [] [] [] | 20
+ vorbis-tools | [] [] | 4
+ wastesedge | | 1
+ wdiff | [] [] | 23
+ wget | [] [] [] | 20
+ xchat | [] [] [] [] | 29
+ xkeyboard-config | [] [] [] | 14
+ xpad | [] [] [] | 15
+ +---------------------------------------------------+
+ 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
+ 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036
+
+ Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect. This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+ For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer. There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+ If November 2007 seems to be old, you may fetch a more recent copy
+of this `ABOUT-NLS' file on most GNU archive sites. The most
+up-to-date matrix with full percentage details can be found at
+`http://translationproject.org/extra/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package. Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library. This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+ Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations. The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project. Therefore the information given above
+applies also for every other Free Software Project. Contact
+`coordinator@translationproject.org' to make the `.pot' files available
+to the translation teams.
+
diff --git a/ChangeLog b/ChangeLog
index 4268cd2..da0532a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7263 +1,4129 @@
-2008-03-30 01:43 lennart
-
- * src/Makefile.am: fix buildsystem to provide pa_log() in all
- binaries
-
-2008-03-30 01:42 lennart
-
- * src/pulsecore/macro.h: rework pa_assert_se() to make sure it
- never gets optmized away, even if NDEBUG is defined
-
-2008-03-30 00:39 lennart
-
- * src/daemon/caps.c, src/daemon/caps.h: make pa_drop_caps() abort
- on failure
-
-2008-03-30 00:38 lennart
-
- * src/pulsecore/hashmap.c: avoid name clash with libc's remove()
- function
-
-2008-03-29 23:09 lennart
-
- * src/tests/smoother-test.c: fix compiler warning
-
-2008-03-29 22:09 lennart
-
- * configure.ac: require autoconf 2.60 since we use AC_PROG_MKDIR_P
-
-2008-03-29 00:42 lennart
-
- * configure.ac: bump soname
-
-2008-03-29 00:31 lennart
-
- * src/pulsecore/protocol-native.c: merge r2187 from trunk
-
-2008-03-28 18:09 lennart
-
- * src/daemon/main.c: don't fail on init if the default device does
- not exist and .nofail is active
-
-2008-03-28 18:01 lennart
-
- * src/modules/module-tunnel.c: don't segfault when module-tunnel is
- used without a sink_name/source_name parameter. Closes #197
-
-2008-03-28 17:12 lennart
-
- * src/pulse/util.c: if we are run as root, always use 'root' as
- username, regardless of any env vars
-
-2008-03-28 17:03 lennart
-
- * src/daemon/main.c: actually set lennart to the user name, not the
- group name. Set lennart too.
-
-2008-03-28 00:51 lennart
-
- * src/utils/padsp.c: Fix ioctl() definition for solaris compat.
- Patch from yippi. Closes #253
-
-2008-03-28 00:47 lennart
-
- * src/utils/pactl.c: work around yet another solaris braindamage
-
-2008-03-27 23:47 lennart
-
- * src/daemon/default.pa.in: initialize gconf module before we
- publish our X11 credentials -- because gconf might cause network
- support enabled in the first place
-
-2008-03-27 23:41 lennart
-
- * src/modules/bt-proximity-helper.c: merge r2146 from trunk
-
-2008-03-27 23:41 lennart
-
- * src/daemon/default.pa.in: merge r2134 from trunk
-
-2008-03-27 23:40 lennart
-
- * src/pulsecore/protocol-esound.c: merge r2133 from trunk
-
-2008-03-27 23:39 lennart
-
- * src/daemon/daemon.conf.in, src/daemon/default.pa.in,
- src/pulsecore/cli-command.c: merge r2132 from trunk
-
-2008-03-27 23:38 lennart
-
- * configure.ac, src/daemon/polkit.c: merge r2131 from trunk
-
-2008-03-27 23:38 lennart
-
- * src/Makefile.am, src/daemon/PulseAudio.policy,
- src/daemon/org.pulseaudio.policy: merge r2130 from trunk
-
-2008-03-27 23:38 lennart
-
- * src/daemon/PulseAudio.policy: merge r2129 from trunk
-
-2008-03-27 23:37 lennart
-
- * src/daemon/cpulimit.c: merge r2128 from trunk
-
-2008-03-27 23:37 lennart
-
- * configure.ac, src/pulsecore/atomic.h: merge r2127 from trunk
-
-2008-03-27 23:36 lennart
-
- * src/utils/pactl.c: merge r2117 from trunk
-
-2008-03-27 23:36 lennart
-
- * src/daemon/PulseAudio.policy: merge r2116 from trunk
-
-2008-03-27 23:35 lennart
-
- * configure.ac, src/daemon/ltdl-bind-now.c: merge r2113,r2214,r2115
- from trunk
-
-2008-03-27 23:33 lennart
-
- * src/pulsecore/autoload.h: merge r2112 from trunk
-
-2008-03-27 23:33 lennart
-
- * src/daemon/main.c: merge r2111 from trunk
-
-2008-03-27 23:32 lennart
-
- * src/pulsecore/shm.c: merge r2110 from trunk
-
-2008-03-27 23:31 lennart
-
- * man/pasuspender.1.xml.in: merge r2109 from trunk
-
-2008-03-27 23:31 lennart
-
- * configure.ac: merge r2108 from trunk
-
-2008-03-27 23:31 lennart
-
- * src/daemon/main.c: merge r2107 from trunk
-
-2008-03-27 23:30 lennart
-
- * src/utils/padsp.c: merge r2106 from trunk
-
-2008-03-27 23:29 lennart
-
- * src/modules/alsa-util.c, src/modules/module-combine.c,
- src/modules/module-jack-sink.c, src/modules/module-jack-source.c,
- src/modules/module-zeroconf-discover.c, src/pulse/stream.c,
- src/pulsecore/core-scache.c, src/pulsecore/resampler.c,
- src/pulsecore/sink-input.c, src/pulsecore/sink.c,
- src/pulsecore/sound-file.c, src/pulsecore/source-output.c,
- src/pulsecore/source.c: merge r2105 from trunk
-
-2008-03-27 23:27 lennart
-
- * src/daemon/cmdline.c: merge r2104 from trunk
-
-2008-03-27 23:25 lennart
-
- * src/pulse/sample.h: merge r2098 from trunk
-
-2008-03-27 23:24 lennart
-
- * src/pulsecore/protocol-native.c: merge r2097 from trunk
-
-2008-03-27 23:23 lennart
-
- * src/modules/module-tunnel.c: merge r2096 from trunk
-
-2008-03-27 23:23 lennart
-
- * src/pulsecore/rtpoll.c, src/tests/rtpoll-test.c: merge r2095 from
- trunk
-
-2008-03-27 23:22 lennart
-
- * src/modules/module-ladspa-sink.c: merge r2092,r2093,r2094,r2152
- from trunk
-
-2008-03-27 23:18 lennart
-
- * src/modules/module-ladspa-sink.c: merge r2091 from trunk
-
-2008-03-27 23:18 lennart
-
- * src/pulsecore/gccmacro.h: merge r2090 from trunk
-
-2008-03-27 23:18 lennart
-
- * src/pulsecore/cli-command.c: merge r2084 from trunk
-
-2008-03-27 23:17 lennart
-
- * configure.ac, src/modules/module-protocol-stub.c: merge r2145
- from trunk
-
-2008-03-27 23:16 lennart
-
- * configure.ac, src/modules/module-protocol-stub.c: merge r2083
- from trunk
-
-2008-03-27 21:24 lennart
-
- * src/pulse/context.c: merge r2081 from trunk
-
-2008-03-27 21:24 lennart
-
- * src/pulsecore/endianmacros.h: merge r2079 from trunk
-
-2008-03-27 21:22 lennart
-
- * configure.ac, src/Makefile.am: merge r2077 from trunk
-
-2008-03-27 21:22 lennart
-
- * configure.ac, src/Makefile.am: merge r2076 from trunk
-
-2008-03-27 21:21 lennart
-
- * configure.ac: merge r2075 from trunk
-
-2008-03-27 21:21 lennart
-
- * src/Makefile.am, src/pulsecore/speex/arch.h,
- src/pulsecore/speex/resample.c: merge r2073 from trunk
-
-2008-03-27 21:20 lennart
-
- * src/pulse/stream.c: merge r2074 from trunk
-
-2008-03-27 21:20 lennart
-
- * src/pulsecore/core-util.c: merge r2078 from trunk
-
-2008-03-27 21:15 lennart
-
- * configure.ac: bump revision
-
-2008-03-27 21:14 lennart
-
- * .: create branch for 0.9.10
-
-2008-01-24 01:06 lennart
-
- * : bump revision
-
-2008-01-24 01:05 lennart
-
- * : fix CVE-2008-0008.patch
-
-2008-01-24 00:44 lennart
-
- * : prepare 0.9.9
-
-2007-11-21 23:59 lennart
-
- * : Tagging release 0.9.8
-
-2007-11-21 23:09 lennart
-
- * : bump version and soname
-
-2007-11-21 23:03 lennart
-
- * : update man pages a bit
-
-2007-11-21 22:55 lennart
-
- * : when speaking to a client with a version < 12, hide S32 sample
- specs, and make them appaear as FLOAT32
-
-2007-11-21 01:31 lennart
-
- * : increment api and protocol version
-
-2007-11-21 01:30 lennart
-
- * : - Check process name when dealing with PID files
- - Add new PA_STREAM_FIX_CHANNELS, FIX_RATE, FIX_FORMAT,
- DONT_MOVE, VARIABLE_RATES to pa_sream_flags_t adn implement it
- - Expose those flags in pacat
- - Add notifications about device suspend/resume to the protocol
- and expose them in libpulse
- - Allow changing of buffer_attr during playback
- - allow disabling for remixing globally
- - hookup polkit support
-
-2007-11-21 01:21 lennart
-
- * : minor typo fix
-
-2007-11-21 01:21 lennart
-
- * : add short version history of the PA protocol
-
-2007-11-21 01:20 lennart
-
- * : add a couple of new opcodes, and document the versions the
- opcodes where added
-
-2007-11-21 01:19 lennart
-
- * : add API to allow runtime reconfiguration of memblockqs
-
-2007-11-16 23:48 lennart
-
- * : detect whether PolicyKit support is available
-
-2007-11-16 23:47 lennart
-
- * : build PolicyKit support
-
-2007-11-16 23:46 lennart
-
- * : add interface to PolicyKit
-
-2007-11-14 16:11 lennart
-
- * : use a prio inheriting mutex for the threaded mainloop, to ease
- writing of RT clients
-
-2007-11-14 16:11 lennart
-
- * : use a free list for allocation pa_operation objects
-
-2007-11-14 16:10 lennart
-
- * : use a free list for allocating reply_info structs
-
-2007-11-14 16:09 lennart
-
- * : add missing pa_boolization
-
-2007-11-13 23:42 lennart
-
- * : Rework ALSA mixer channel detection code. This time we actually
- care about the channel names the ALSA mixer exports for us
-
-2007-11-13 23:41 lennart
-
- * : add array size to increase chance of detecting missing updates
-
-2007-11-13 19:56 lennart
-
- * : don't fail if the bt-proximity-helper is not built
-
-2007-11-13 19:39 lennart
-
- * : don't touch RLIMIT:MEMBLOCK by default. This should improve
- out-of-the-box comaptibility with JACK
-
-2007-11-13 19:21 lennart
-
- * : increase the pacmd timeout a bit
-
-2007-11-13 17:37 lennart
-
- * : Completely rework ALSA device selection code: choose the device
- to open depending on the requested number of channels and channel
- map. In most cases it will now suffice to set default-channels=6
- to enable 5.1 sound for all devices that support it
-
-2007-11-13 17:35 lennart
-
- * : fix loading of load-once modules if no other modules was loaded
- before
-
-2007-11-11 23:18 lennart
-
- * : add new fun module that automatically mutes your audio devices
- when you leave with your bluetooth phone, and unmutes when you
- come back
-
-2007-11-11 23:01 lennart
-
- * : Port module-gconf to make use of the new API
- pa_start_child_for_read()
-
-2007-11-11 23:00 lennart
-
- * : pull code for starting helper processes out of module-gconf,
- clean it up, and stick into a new API pa_start_child_for_read()
-
-2007-11-11 22:59 lennart
-
- * : add new function pa_strnull() to simplify passing null strings
- to non-linux printf()
-
-2007-11-11 02:30 lennart
-
- * : add a simple fully-automatic fully-linearupmixer/downmixer and
- enable it by default
-
-2007-11-09 18:25 lennart
-
- * : tag modules that may only be loaded once at most especially,
- and enforce that in the module loader
-
-2007-11-09 18:24 lennart
-
- * : minor typo
-
-2007-11-09 17:11 lennart
-
- * : optimize mixing code a bit. Add mixers for S32LE, S32BE, ULAW,
- ALAW and FLOAT32BE. Add volume adjusters for FLOAT32BE, ALAW,
- ULAW.
-
-2007-11-09 14:20 lennart
-
- * : replace a few CLAMPs by PA_CLAMP_UNLIKELY
-
-2007-11-09 14:19 lennart
-
- * : remove PA_CLAMP_LIKELY macro because it doesn't really make
- sense.
-
-2007-11-09 14:14 lennart
-
- * : .la files for modules can probably be removed safely on all
- archs now
-
-2007-11-09 02:45 lennart
-
- * : add support for 32bit integer samples
-
-2007-11-09 02:12 lennart
-
- * : fix CLAMP_LIKELY/UNLIKELY definition
-
-2007-11-09 01:30 lennart
-
- * : add missing #include
-
-2007-11-09 01:30 lennart
-
- * : add a few missing macro definitions
-
-2007-11-09 01:29 lennart
-
- * : add PA_CLAMP_LIKELY and PA_CLAMP_UNLIKELY macros
-
-2007-11-09 01:28 lennart
-
- * : add support for likely()/unlikely() type macros
-
-2007-11-08 22:42 lennart
-
- * : parse the pasuspend argument like any other boolean in
- PulseAudio
-
-2007-11-08 22:31 lennart
-
- * : strip most comments from the default configuration files, since
- the man page is now more elaborate and we don't want to maintain
- those docs redundantly at two places
-
-2007-11-08 22:30 lennart
-
- * : add remaing man pages
-
-2007-11-07 13:52 lennart
-
- * : warn if the sound server is not local
-
-2007-11-07 13:50 lennart
-
- * : add man pages for padsp, pabrowse, pasuspender
-
-2007-11-06 00:21 lennart
-
- * : complete pactl man page
-
-2007-11-05 23:56 lennart
-
- * : minor cleanups of --help texts
-
-2007-11-05 23:56 lennart
-
- * : add a couple of more man pages
-
-2007-11-05 15:10 lennart
-
- * : add a man page for the pulseaudio binary. More will follow.
-
-2007-11-04 16:51 lennart
-
- * : fix two alignment issues found by the debian buildd gcc on
- sparc
-
-2007-11-04 16:50 lennart
-
- * : pa_boolization
-
-2007-11-04 14:17 lennart
-
- * : add eventfd syscall nr for arm; patch from Sjoerd Simons;
- Closes #150
-
-2007-11-04 14:11 lennart
-
- * : Properly terminate pa_readlink() strings. Patch from Sjoerd
- Simons. Closes #149
-
-2007-11-04 13:51 lennart
-
- * : Add linker version script to hide non-ABI stable symbols in the
- client
- libraries. While this helps defining a more streamlined ABI, this
- also requires
- linking a lot of additional symbols into some PA client utilities
- which until
- now made use of the non-ABI stable symbols in libpulse. To
- minimize the effect
- on there size a bit, strip unused symbols by linking with
- -ffunction-sections
- -fdata-sections -Wl,--gc-sections
-
-2007-11-01 22:51 lennart
-
- * : comment the library versions a bit
-
-2007-11-01 22:50 lennart
-
- * : add missing pthread libs
-
-2007-11-01 11:23 lennart
-
- * : make disallow-module-loading config option work again (original
- patch from Diego Petteno)
-
-2007-11-01 02:58 lennart
-
- * : make rtprio and nice level actually configurable
-
-2007-11-01 02:55 lennart
-
- * : drop rt scheduling before we start our helper process
-
-2007-11-01 01:45 lennart
-
- * : add new option --realtime
-
-2007-11-01 01:42 lennart
-
- * : save and restore errno in sig handler
-
-2007-11-01 00:34 lennart
-
- * : add nice and rtprio resource limit support; make rtprio and
- nice level to use configurable; some minor updates
-
-2007-11-01 00:33 lennart
-
- * : pa_boolize the client config
-
-2007-11-01 00:32 lennart
-
- * : more pa_boolization
-
-2007-11-01 00:31 lennart
-
- * : make the bool config parser actually parse bools
-
-2007-11-01 00:06 lennart
-
- * : fix comment
-
-2007-11-01 00:06 lennart
-
- * : add new function pa_yes_no()
-
-2007-10-30 18:35 lennart
-
- * : save and restore errno in the sig handler
-
-2007-10-30 16:02 lennart
-
- * : bump sonames
-
-2007-10-30 15:23 lennart
-
- * : make sjoerd happy: include ChangeLog built from svn logs in
- tarball
-
-2007-10-30 15:08 lennart
-
- * : make make distcheck pass
-
-2007-10-30 14:17 lennart
-
- * : rename 'length' parameters in the API to 'bytes', to make their
- unit clear
-
-2007-10-30 14:05 lennart
-
- * : handle tcp4: prefix for server specs correctly. (Closes #136)
-
-2007-10-30 02:35 lennart
-
- * : rename stream names too, when the sink name changes
-
-2007-10-30 02:05 lennart
-
- * : ignore updates not relevant to us
-
-2007-10-30 01:50 lennart
-
- * : rework the tunnel naming scheme, and make it follow the
- description changes of the underlying devices; never check for
- tagstruct eof, to ease later extensions
-
-2007-10-30 00:49 lennart
-
- * : initialize userdata struct with 0
-
-2007-10-30 00:32 lennart
-
- * : remove libltdl from SVN
-
-2007-10-30 00:17 lennart
-
- * : deal properly with signals interrupting us when we wait for
- data from gconf helper
-
-2007-10-29 23:55 lennart
-
- * : keep track of configured tunnels and make sure to unload them
- when they disappear from zeroconf again
-
-2007-10-29 23:54 lennart
-
- * : don't announce monitor sources
-
-2007-10-29 22:14 lennart
-
- * : don't try to send pause request before our stream is properly
- set up
-
-2007-10-29 21:23 lennart
-
- * : ignore network sinks/sources
-
-2007-10-29 21:19 lennart
-
- * : make gcc shut up a bit more
-
-2007-10-29 20:32 lennart
-
- * : we don't want to include assert.h anymore
-
-2007-10-29 20:30 lennart
-
- * : reverse server order for PULSE_SERVER x11 property, to follow
- order in which modules are loaded
-
-2007-10-29 20:30 lennart
-
- * : add new API pa_strlist_reverse()
-
-2007-10-29 20:03 lennart
-
- * : add new module module-zeroconf-discover
-
-2007-10-29 20:03 lennart
-
- * : publish dns-sd subtypes to allow distinction of virtual,
- hardware and monitor sinks/source
-
-2007-10-29 20:01 lennart
-
- * : export pa_namereg_is_valid_name()
-
-2007-10-29 20:01 lennart
-
- * : fail on name clash
-
-2007-10-29 16:54 lennart
-
- * : bring back module-tunnel, yay!
-
-2007-10-29 16:39 lennart
-
- * : downgrade a few log messages
-
-2007-10-29 16:38 lennart
-
- * : properly deal with time pausing
-
-2007-10-29 15:33 lennart
-
- * : use real path of binary instead of /proc/self/exe to execute
- ourselves
-
-2007-10-29 15:32 lennart
-
- * : make use of new pa_readlink() where applicable
-
-2007-10-29 15:31 lennart
-
- * : add new pa_readlink() API
-
-2007-10-29 08:34 lennart
-
- * : make speex-float-3 the default resampler
-
-2007-10-28 19:24 lennart
-
- * : add missing dependency on socket-util
-
-2007-10-28 19:13 lennart
-
- * : merge 'lennart' branch back into trunk.
-
-2007-08-24 07:12 tanuk
-
- * : Corrected a bogus comment.
-
-2007-08-20 06:22 tanuk
-
- * : Modified the JACK sink heavily:
- * Made the sink realtime-safe.
- * To achieve the previous item, internal buffering was be added.
- New module
- argument: buffersize.
- * Removed the user's need to set the JACK transport to playing
- state before he
- could hear anything from PulseAudio.
- * In process of achieving the previous item, latency calculation
- got more
- inaccurate: the reported latency is now always a multiple of the
- JACK
- processing block size, and constant.
- * The JACK ports now have a running numbering in their names.
-
-2007-08-04 19:53 lennart
-
- * : compat with automake 1.10
-
-2007-08-04 19:53 lennart
-
- * : jack driver build fix which became apparent on fedora
-
-2007-07-10 15:21 ossman
-
- * : Make sure we link to the core to get all symbols.
-
-2007-07-10 15:20 ossman
-
- * : Solaris hides inet_ntop in nsl.
-
-2007-07-10 14:36 ossman
-
- * : Make -no-undefined actually work (and fix up error found by
- it).
-
-2007-07-10 14:36 ossman
-
- * : Move pthreads detection as it gets confused by things in LIBS.
-
-2007-06-13 07:21 ossman
-
- * : Make sure mixer ioctls work on /dev/dsp aswell.
-
-2007-06-11 11:22 ossman
-
- * : Support stat() and friends as some programs (audacity) likes to
- check if
- the device node is there first.
-
-2007-06-04 09:52 ossman
-
- * : Add support for the poorly documented SNDCTL_DSP_GETTRIGGER.
-
-2007-05-29 17:24 lennart
-
- * : Kill spaces on EOL
-
-2007-05-29 17:16 lennart
-
- * : add target "eolspace" to makefil to remove trailing newlines
- from all source files
-
-2007-05-29 07:47 ossman
-
- * : We now use gid unconditionally, so make sure it's defined.
-
-2007-05-28 15:52 lennart
-
- * : build fix for systems lacking capability suppoort. (Problem
- identified and original patch supplied by Diego Petteno
-
-2007-05-27 20:58 lennart
-
- * : Bump revision of libs and package
-
-2007-05-27 20:38 lennart
-
- * : Replace AO_xxx usage with pa_atomic_xxx and friends wherever it
- makes sense
-
-2007-05-27 16:59 lennart
-
- * : unfortunately we cannot detect if a foreign thread is still
- running. Thus sucks. But what can we do? U. Drepper thinks our
- use case is invalid.
-
-2007-05-27 16:37 lennart
-
- * : Minor optimization: read log level character code from array
-
-2007-05-26 23:39 lennart
-
- * : Add a new meta command ".ifexists" to the CLI language, to
- execute commands only if a specified file exists. Original patch
- from cjvdb. Closes #36
-
-2007-05-25 20:35 lennart
-
- * : when called with the setid bit change euid to uid sooner to
- make sure that we can access our own files even when we dropped
- most capabilities. (Closes #21)
-
-2007-05-25 20:24 lennart
-
- * : fix suid Makefile target
-
-2007-05-23 23:38 lennart
-
- * : only browse for ipv4 pa servers for now. Needs better fixing
- which however is not trivial and probably breaks the API
-
-2007-05-23 17:24 lennart
-
- * : Fix another DoS vulnerability that has been identified by Luigi
- Auriemma. (Finally closes #67)
-
-2007-05-23 17:12 lennart
-
- * : add a missing initialization that causes a crash when parsing
- invalid volume restoration tables (Problem identified by Luigi
- Auriemma, re #67)
-
-2007-05-23 16:59 lennart
-
- * : Fix a DoS with allocating overly large silence buffers.
- (Identified by Luigi Auriemma (re #67)
-
-2007-05-23 16:57 lennart
-
- * : don't allow excessively high sample rates
-
-2007-05-23 16:42 lennart
-
- * : Fix yet another DoS vulnerability, also identified Luigi
- Auriemma (re #67)
-
-2007-05-23 16:30 lennart
-
- * : fix minor typo
-
-2007-05-23 16:29 lennart
-
- * : Fix another DoS vulnerability, also identified Luigi Auriemma
- (closes #67)
-
-2007-05-23 16:24 lennart
-
- * : fix a DoS vulnerability (re #67), originally identified by
- Luigi Auriemma
-
-2007-05-23 15:30 lennart
-
- * : fix a few obvious copynpaste errors when handling volumes
-
-2007-05-23 12:32 lennart
-
- * : Treat empty :0.0 identically to unset :0.0 when trying to find
- a PA server. (Closes #87)
-
-2007-05-23 01:02 lennart
-
- * : Fix module-oss for devices that return EAGAIN when we don't
- expect it. (Closes #66)
-
-2007-05-22 23:39 lennart
-
- * : show socket directory when we fail to create it. (Closes #85)
-
-2007-05-22 23:38 lennart
-
- * : Fix build and only load OSS xor ALSA modules if both are
- available
-
-2007-05-22 23:37 lennart
-
- * : drop unused variable
-
-2007-05-22 23:08 lennart
-
- * : fix comment
-
-2007-03-07 09:27 ossman
-
- * : Add support for SNDCTL_DSP_SETTRIGGER. (closes #56)
-
-2007-03-06 15:47 ossman
-
- * : Fix some instances where we printed a string without first
- checking that
- the pointer was valid.
-
-2007-03-06 13:42 ossman
-
- * : Pulsecore should be linked into all modules.
-
-2007-03-06 13:31 ossman
-
- * : Don't fail if hal doesn't currently contain any devices.
- (closes #55)
-
-2007-03-02 09:20 ossman
-
- * : Handle suspended alsa devices. Based on patch by ranma. (closes
- #26)
-
-2007-03-01 17:15 ossman
-
- * : Revert stuff from commit 1431 that wasn't supposed to be there.
-
-2007-03-01 17:13 ossman
-
- * : Handle when ALSA tweaks our sample spec so much that the frame
- size changes.
- (closes #57).
-
-2007-03-01 17:11 ossman
-
- * : Add some debugging output from sample cache subsystem.
-
-2007-02-14 12:13 ossman
-
- * : Add a wrapper around close() to work around Windows' ass
- backwards way of
- handling sockets.
-
-2007-02-14 09:27 ossman
-
- * : Allow a formatted string in the validation warning.
-
-2007-02-14 09:26 ossman
-
- * : Prefix log lines with a character indicating level.
-
-2007-02-13 15:35 ossman
-
- * : Add copyright notices to all relevant files. (based on svn log)
-
-2007-02-12 09:39 ossman
-
- * : Make sure we get proper host identifiers.
-
-2007-02-12 09:37 ossman
-
- * : Allow specification of device number.
-
-2007-02-05 10:26 ossman
-
- * : Don't abort config loading when the user specific cannot be
- loaded.
-
-2007-01-19 08:00 ossman
-
- * : Make sure we report success for SNDCTL_DSP_SETDUPLEX.
-
- (Patch by ZlatkO)
-
-2007-01-04 14:20 ossman
-
- * : Report IO error on ioctl() when we're in a fatal error state.
-
-2007-01-04 14:17 ossman
-
- * : Free stream objects when they've been invalidated.
-
-2007-01-04 14:06 ossman
-
- * : Fix error messages for failure connecting streams.
-
-2007-01-04 13:43 ossman
-
- * : Huge trailing whitespace cleanup. Let's keep the tree pure from
- here on,
- mmmkay?
-
-2006-12-04 08:15 ossman
-
- * : Fix silly copy-and-paste error. (closes #45)
-
-2006-11-24 09:29 ossman
-
- * : Fix incorrect assert.
-
-2006-11-10 14:58 ossman
-
- * : Add atomic.h as a dependency at relevant places.
-
-2006-11-10 12:20 ossman
-
- * : Make sure we package version.h.in.
-
-2006-11-09 15:23 ossman
-
- * : Yet again try to fix the creation of necessary directories when
- srcdir !=
- builddir.
-
-2006-11-08 13:03 ossman
-
- * : Support reversed endian floats. (closes #28) (closes #35)
-
-2006-11-08 12:56 ossman
-
- * : Check correct variable for return value. Closes #37.
-
-2006-11-06 13:16 ossman
-
- * : Fix some missing line breaks.
-
-2006-11-06 13:06 ossman
-
- * : Revert r1404 and keep it on a development branch until it is
- fully tested.
-
-2006-11-06 10:17 ossman
-
- * : The OSS spec is unclear what should happen when a reset is
- requested. Let's
- have a nicer attitude and keep as much settings as possible.
-
-2006-11-06 10:14 ossman
-
- * : Handle when threaded mainloop is freed before it is started.
-
-2006-09-26 23:50 lennart
-
- * : rework memory block management to be thread-safe and mostly
- lock-free.
-
- pa_memblock is now an opaque structure. Access to its fields is
- now done
- through various accessor functions in a thread-safe manner.
-
- pa_memblock_acquire() and pa_memblock_release() are now used to
- access the
- attached audio data. Why? To allow safe manipulation of the
- memory pointer
- maintained by the memory block. Internally _acquire() and
- _release() maintain a
- reference counter. Please do not confuse this reference counter
- whith the one
- maintained by pa_memblock_ref()/_unref()!
-
- As a side effect this patch removes all direct usages of AO_t and
- replaces it
- with pa_atomic_xxx based code.
-
- This stuff needs some serious testing love. Especially if threads
- are actively
- used.
-
-2006-09-26 23:42 lennart
-
- * : upgrade refcnt.h to make use of our new pa_atomic_xxx() API
-
-2006-09-26 23:41 lennart
-
- * : add asynchronous inter-thread notification API
-
-2006-09-20 19:02 lennart
-
- * : enable module-hal-detect in the default configuration file only
- if HAL support is enabled (closes #30)
-
-2006-09-20 19:01 lennart
-
- * : rename default realtime group from "realtime" to "pulse-rt",
- since it is pulseaudio specific. you may still pass
- --with-realtime-group=realtime to configure to get the old
- behaviour
-
-2006-09-19 07:54 ossman
-
- * : Revert r1398 as it broke the srcdir != builddir patch. New fix
- that doesn't
- use the $(mkdir_p) define as it isn't present on many systems.
-
-2006-09-19 07:49 ossman
-
- * : No need to create these dirs as they're part of the source
- tree.
-
-2006-09-14 16:00 ossman
-
- * : Stop using x86-isms and use ISO C (oversized shifts are
- undefined).
-
-2006-09-14 14:56 ossman
-
- * : Fix debug output for SNDCTL_DSP_SETFRAGMENT.
-
-2006-09-11 07:56 ossman
-
- * : Fix up build structure for platform dependent modules. Also add
- implementation
- on Win32 for pa_once().
-
-2006-09-11 07:54 ossman
-
- * : Use platform independent sleep.
-
-2006-09-11 07:14 ossman
-
- * : Fix typo.
-
-2006-09-09 23:59 lennart
-
- * : ignore flist-test in the correct dir
-
-2006-09-09 23:58 lennart
-
- * : ignore flist-test
-
-2006-09-09 23:56 lennart
-
- * : update Makefile
-
-2006-09-09 23:55 lennart
-
- * : make pa_mutex_new() and pa_cond_new() succeed in all cases.
- Similar behaviour to pa_xmalloc().
-
-2006-09-09 23:54 lennart
-
- * : add pa_once testing code
-
-2006-09-09 23:54 lennart
-
- * : rework pa_once once again, because the once function needs to
- have terminated before pa_once returns, regardless whether the
- local call executes it or another thread does.
-
- With the previous code it might happen that an long-running
- initializing in a once function is not terminated yet when
- another thread thinks it already is.
-
-2006-09-09 22:59 lennart
-
- * : update for newer APIs: replace direct usage of libatomic_ops by
- usage of our own atomic.h; remove pa_once implementation; always
- use our pa_once implementation instead of the POSIX version
-
-2006-09-09 22:55 lennart
-
- * : implement trival pa_once API based on atomic operations
-
-2006-09-09 22:54 lennart
-
- * : add static initializer PA_ATOMIC_INIT()
-
-2006-09-09 21:09 lennart
-
- * : add a test program for the free list
-
-2006-09-09 21:05 lennart
-
- * : implement a simple lock-free free list
-
-2006-09-08 15:43 lennart
-
- * : add a tiny wrapper around libatomic_ops: pa_atomic_int_t and
- pa_atomit_ptr_t.
-
- Reasoning:
-
- This wrapper fixes a few API issues I found with atomic_ops:
-
- * AO_t is an int, which can be written to with "=".
- pa_tomic_int_t however is
- a struct which due to type-safety enforces proper access with
- pa_atomic_xx(). (Inspired by the way the Linux kernel handles
- this)
-
- * AO_load()'s parameter is lacking a "const"
-
- * Explicitly choosing the proper memory barrier for each call is
- very
- difficult and especially hard to debug because most CPUs support
- only two
- different barrier types which the eight types defined by
- atomic_ops are
- mapped to. Most other software (i.e. glib, Linux kernel) which
- provides
- atomic variable access usually do a full barrier in all cases and
- so should
- we. Eventually we might choose to add additional memory barrier
- calls, in
- which case we can add special versions of the current function
- with special
- suffixes.
-
- * The function names are unnecesarily long
-
- * Atomic pointer accesses are only supported with manual casts.
-
- The new pa_atomic_xxx interface borrows heavily from the GLib and
- Linux kernel
- atomicity API, though it is different from both of them.
-
- In addition this abstract API makes it easy to port PA to
- different atomicty
- APIs, if libatomic_ops should ever become out-of-fashion or if
- the system OS
- supports atomic primitives anyway.
-
-2006-09-07 20:17 lennart
-
- * : don't maintain a list of allocated mempool slots, we don't use
- it anyway
-
-2006-09-07 19:08 lennart
-
- * : make pa_stream thread-safe: use new refcounting system, protect
- access using mutexes
-
-2006-09-07 13:31 lennart
-
- * : add missing channel names (fixes a segfault when parsing
- invalid channel maps)
-
-2006-09-07 13:29 lennart
-
- * : fix alsa-sink example
-
-2006-09-06 22:19 lennart
-
- * : don't hit an assert in the client if posix shm is not available
-
-2006-09-06 22:19 lennart
-
- * : fix indentation
-
-2006-09-06 21:37 lennart
-
- * : fix a bogus debug line
-
-2006-09-06 19:47 lennart
-
- * : implement a few more ioctl()s, including a subset of
- SNDCTL_DSP_GETOPTR. Just enough to make JavaSound work.
-
-2006-09-04 22:38 lennart
-
- * : remove yet another occurence of pthread_yield() by
- pa_thread_yield()
-
-2006-09-04 22:15 lennart
-
- * : add accessor functions for the userdata attached to a pa_thread
- object
-
-2006-09-04 22:04 lennart
-
- * : fix pa_thread_is_running() for foreign threads; fix a memory
- leak for foreign threads
-
-2006-09-04 21:29 lennart
-
- * : port the threaded mainloop to our new abstract mutex/thread API
-
-2006-09-04 21:28 lennart
-
- * : make pa_thread_self() return a sensible pointer on foreign
- threads
-
-2006-09-02 15:18 lennart
-
- * : add missing g_type_init()
-
-2006-09-02 14:59 lennart
-
- * : rework handling of srcdir != builddir (patch from Flameeyes)
-
-2006-09-02 14:57 lennart
-
- * : include PTRHEAD_LIBS in pkg-config file (patch from Flameeyes)
-
-2006-09-02 14:56 lennart
-
- * : update acx_pthread.m4
-
-2006-09-02 12:51 lennart
-
- * : allow building when srcdir != builddir (patch from Flameeyes)
-
-2006-09-02 12:45 lennart
-
- * : fix a few autoconf warnings (patch by Flameeyes)
-
-2006-09-02 12:28 lennart
-
- * : fix esdcompat for non-gnu systems
-
-2006-09-02 12:28 lennart
-
- * : make esdcompat executable
-
-2006-09-02 12:03 lennart
-
- * : Merge FreeBSD compatibility patch (from Flameeyes)
-
-2006-09-01 19:06 ossman
-
- * : Fix call to pa_mutex_new().
-
-2006-09-01 18:39 ossman
-
- * : Add pthread_once() equivalent support.
-
-2006-09-01 18:16 ossman
-
- * : Thread implementation for Win32.
-
-2006-09-01 00:24 lennart
-
- * : fix a race condition with stream connection vs. latency
- measuremtn (found by theBear)
-
-2006-08-31 16:39 ossman
-
- * : Make sure libatomic_ops.a isn't included in win32 builds as
- libtool doesn't
- like static libs in dlls. Everything is in the headers anyway, so
- we do not
- need it.
-
-2006-08-31 16:13 ossman
-
- * : Also wrap yield functionality so that it can be platform
- independent.
-
-2006-08-31 15:31 lennart
-
- * : work around bug in firefox which apparently misuses access() as
- NULL pointer test. Original patch by "alon". (Closes #27)
-
-2006-08-31 15:20 lennart
-
- * : define AO_REQUIRE_CAS in the Makefile instead of each source
- file, effectively reversing r1348
-
-2006-08-31 15:17 lennart
-
- * : update todo
-
-2006-08-30 17:12 lennart
-
- * : fix handling of "running" variable
-
-2006-08-30 17:01 ossman
-
- * : Add AO_REQUIRE_CAS as we do.
-
-2006-08-30 16:55 ossman
-
- * : Make sure the libatomic_ops lib is included.
-
-2006-08-30 14:44 ossman
-
- * : Remove check for libatomic_ops library as some systems have no
- (zero, nada)
- symbols in it.
-
-2006-08-30 13:02 ossman
-
- * : We need to have a callback when changing volume or we might
- deadlock.
-
-2006-08-29 19:51 lennart
-
- * : add a threading primitive API
-
-2006-08-29 02:01 lennart
-
- * : make pa_mempool_stat thread-safe/lock-free
-
-2006-08-29 01:16 lennart
-
- * : modify memory block reference counting to use the new reference
- counting API
-
-2006-08-29 01:15 lennart
-
- * : add lock-free reference counting macros, based on libatomic-ops
-
-2006-08-29 01:15 lennart
-
- * : add libatomic-ops to hard dependencies
-
-2006-08-28 19:16 lennart
-
- * : fix an misdesigned assert()
-
-2006-08-28 06:25 ossman
-
- * : Add PulseAudio logo to tree.
-
-2006-08-28 05:15 ossman
-
- * : update todo
-
-2006-08-27 13:04 lennart
-
- * : increase operation timeout
-
-2006-08-26 19:22 lennart
-
- * : bump version and sonames
-
-2006-08-26 19:00 lennart
-
- * : fix module-combine when used on top of a tunnel sink
-
-2006-08-25 22:52 lennart
-
- * : update module-tunnel to latest protocol
-
-2006-08-25 12:12 lennart
-
- * : activate HAL in the default config
-
-2006-08-24 08:57 ossman
-
- * : Add missing header.
-
-2006-08-23 22:28 lennart
-
- * : fix handling of "mtu" module argument (patch by "theBear")
-
-2006-08-23 07:58 ossman
-
- * : fix typo
-
-2006-08-23 07:57 ossman
-
- * : Make the recording a bit more chunky so that we can fit in the
- pool and have
- efficient blocks.
-
-2006-08-22 16:25 ossman
-
- * : Remove silence generation in solaris module.
-
-2006-08-22 16:15 ossman
-
- * : Remove silence generation in waveout module.
-
-2006-08-22 15:36 ossman
-
- * : Proceed with connect even when no cookie is loaded. Allows you
- to connect
- to server which do not require a cookie under all circumstances.
-
-2006-08-22 15:24 ossman
-
- * : Fix memory leak in waveout module.
-
-2006-08-22 15:20 ossman
-
- * : Log when there is a problem opening the waveOut/waveIn device.
-
-2006-08-22 12:51 ossman
-
- * : Fall back to creating a "normal" memory pool if unable to get a
- shared one.
-
-2006-08-22 12:46 ossman
-
- * : Improve error messages a bit.
-
-2006-08-22 12:45 ossman
-
- * : Fix up portability of memory pool handling a bit.
-
-2006-08-22 12:29 lennart
-
- * : update todo
-
-2006-08-22 12:04 lennart
-
- * : fix typo
-
-2006-08-22 11:41 ossman
-
- * : Fix detection of shared memory support and proper fallback.
-
-2006-08-22 11:39 ossman
-
- * : Fix typo.
-
-2006-08-22 11:38 ossman
-
- * : Add missing header.
-
-2006-08-22 11:37 ossman
-
- * : Fix call to pa_memblock_new().
-
-2006-08-22 07:41 ossman
-
- * : Fix detection of page size for non-POSIX systems.
-
-2006-08-22 07:25 ossman
-
- * : Fix missing header for timeval helpers.
-
-2006-08-22 07:23 ossman
-
- * : Fix calls to pa_memblock_new().
-
-2006-08-22 07:21 ossman
-
- * : Add header for pa_cstrerror().
-
-2006-08-22 07:18 ossman
-
- * : Fix call to pa_pstream_send_tagstruct().
-
-2006-08-22 07:12 ossman
-
- * : Add an ifdef for when we do not have creds.
-
-2006-08-21 22:37 lennart
-
- * : fix pactl output (sink drivers and names where switched)
-
-2006-08-19 23:09 lennart
-
- * : update todo
-
-2006-08-19 23:08 lennart
-
- * : restore the sink/source for a client in addition to the
- playback volume. This changes the file format of the table file.
- To avoid parse errors ~/.pulse/volume.table has been renamed to
- ~/.pulse/volume-restore.table
-
-2006-08-19 23:06 lennart
-
- * : If a client leaves the sink/source for a stream unspecified by
- passing NULL as
- sink/source name sink/source we should pass NULL to
- pa_sink_input_new()/pa_source_output_new() as too. This allows
- hooks to change the sink/source device only if it is left
- unspecified by the client
-
-2006-08-19 23:04 lennart
-
- * : fix a bad memory access
-
-2006-08-19 18:58 lennart
-
- * : update todo
-
-2006-08-19 18:57 lennart
-
- * : when transferring large memory chunks of a pa_pstream, split
- them up
-
-2006-08-19 18:28 lennart
-
- * : update todo
-
-2006-08-19 17:34 lennart
-
- * : update todo
-
-2006-08-19 17:30 lennart
-
- * : check for posix_memalign and friends
-
-2006-08-19 17:27 lennart
-
- * : if MAP_ANONYMOUS is not supported use posix_memalign if
- possible to allocate the memory pool
-
-2006-08-19 16:26 lennart
-
- * : update todo
-
-2006-08-19 16:25 lennart
-
- * : print per-type memory block statistics on "stat"
-
-2006-08-19 16:25 lennart
-
- * : generate per-type memory block statistics
-
-2006-08-19 02:24 lennart
-
- * : update todo
-
-2006-08-19 02:23 lennart
-
- * : rework the resample to allocate temporary memory with
- pa_memblock_new() instead of pa_xrealloc()
-
-2006-08-19 02:23 lennart
-
- * : fix a memory leak
-
-2006-08-19 01:23 lennart
-
- * : update todo
-
-2006-08-19 01:21 lennart
-
- * : add --disable-shm command line option to the daemon
-
-2006-08-19 01:20 lennart
-
- * : add "disable-shm=" to default daemon configuration file
-
-2006-08-19 01:20 lennart
-
- * : add new "disable-shm" server config option
-
-2006-08-19 01:18 lennart
-
- * : add default "disable-shm" option to client.conf
-
-2006-08-19 01:18 lennart
-
- * : add new "disable-shm" option to client.conf
-
-2006-08-19 01:16 lennart
-
- * : allow importing of external shm data blocks unconditionally,
- even when local SHM support is disabled
-
-2006-08-19 01:15 lennart
-
- * : deal properly with pa_mempool_new() failing
-
-2006-08-19 01:15 lennart
-
- * : fix allocation of anonymous memory
-
-2006-08-19 01:14 lennart
-
- * : fix a memory leak
-
-2006-08-18 23:45 lennart
-
- * : update todo
-
-2006-08-18 23:45 lennart
-
- * : enable SHM support on the client side only if both the client
- and the server run as the same user and the server supports it
-
-2006-08-18 23:44 lennart
-
- * : activate SHM support on the server side only when new client
- supports it and when client and server have the same UID.
-
-2006-08-18 23:43 lennart
-
- * : one s/0/NULL/
-
-2006-08-18 23:42 lennart
-
- * : remove export/import objects when SHM is disable for a
- pa_pstream object
-
-2006-08-18 23:40 lennart
-
- * : add new function pa_mempool_is_shared() to test whether a
- memory pool is suitable for SHM data transfers
-
-2006-08-18 21:39 lennart
-
- * : hide memblock-test
-
-2006-08-18 21:38 lennart
-
- * : remove all occurences of
-
- pa_logXXX(__FILE__":
-
- and replace them by
-
- pa_logXXX("
-
-2006-08-18 21:26 lennart
-
- * : rework logging subsystem, to implicitly include __FILE__ in
- pa_log() calls. In addition we now record the line numbers and
- function names of pa_log calls. However, those are only shown If
- $PULSE_LOG_META is set.
-
-2006-08-18 19:57 lennart
-
- * : update todo
-
-2006-08-18 19:57 lennart
-
- * : look for shm_open in -lrt
-
-2006-08-18 19:56 lennart
-
- * : add new test memblock-test for testing SHM import/export
-
-2006-08-18 19:56 lennart
-
- * : update tests for new memory manager
-
-2006-08-18 19:55 lennart
-
- * : Rework memory management to allow shared memory data transfer.
- The central idea
- is to allocate all audio memory blocks from a per-process memory
- pool which is
- available as read-only SHM segment to other local processes.
- Then, instead of
- writing the actual audio data to the socket just write references
- to this
- shared memory pool.
-
- To work optimally all memory blocks should now be of type
- PA_MEMBLOCK_POOL or
- PA_MEMBLOCK_POOL_EXTERNAL. The function pa_memblock_new() now
- generates memory
- blocks of this type by default.
-
-2006-08-18 19:46 lennart
-
- * : add abstracted shared memory API
-
-2006-08-18 19:45 lennart
-
- * : fix a bad type cast
-
-2006-08-18 19:43 lennart
-
- * : cleanup hashmap.[ch] a little: use hash/compare func prototypes
- defined in idxset.h, add pa_hashmpa_{get,steal}_first
-
-2006-08-18 19:42 lennart
-
- * : cleanup idxset.[ch] a little: define proper types for the
- hash/compare funcs, do ptr->int/int->ptr conversions with clean
- macros
-
-2006-08-17 20:03 lennart
-
- * : fix a PA_LLIST_HEAD_INIT invocation
-
-2006-08-17 20:03 lennart
-
- * : add missing #include
-
-2006-08-17 20:02 lennart
-
- * : modify pa_bytes_snprint() to return the string we just wrote
- to. This should be binary compat with older versions which
- returned void
-
-2006-08-17 20:01 lennart
-
- * : make PA_LLIST_HEAD_INIT thread safe
-
-2006-08-15 18:15 lennart
-
- * : use the description field of sinks/sources to name the zeroconf
- services, instead of the logical name
-
-2006-08-14 08:38 ossman
-
- * : update todo
-
-2006-08-13 20:45 lennart
-
- * : update todo
-
-2006-08-13 20:45 lennart
-
- * : extend module-rescue-streams to move also source outputs when a
- source dies
-
-2006-08-13 20:44 lennart
-
- * : fix a segfault when registering a service with avahi fails
-
-2006-08-13 20:44 lennart
-
- * : create rtp source output on correct source
-
-2006-08-13 20:43 lennart
-
- * : minor optimization
-
-2006-08-13 19:55 lennart
-
- * : implement hook_source_ouput_new. For this I modified the
- pa_source_output_new constructor to take a struct similar to what
- I already did for pa_sink_input_new()
-
-2006-08-13 19:53 lennart
-
- * : split a validity check into two
-
-2006-08-13 19:53 lennart
-
- * : implement hook_source_disconnect
-
-2006-08-13 19:52 lennart
-
- * : define new hooks: hook_source_output_new,
- hook_source_disconnect
-
-2006-08-13 17:39 lennart
-
- * : update todo
-
-2006-08-13 17:35 lennart
-
- * : Load module-rescue-streams by default
-
-2006-08-13 17:34 lennart
-
- * : implement new module "module-rescue-streams" which moves sink
- inputs away when their sink is removed.
-
-2006-08-13 17:33 lennart
-
- * : properly implement a pa_sink_disconnect() hook
-
-2006-08-13 17:32 lennart
-
- * : Clean up module description a little
-
-2006-08-13 17:31 lennart
-
- * : ignore if we recieved a memory block for an invalid stream,
- since this might happen unwillingly due to the asychnronous
- nature of the protocol
-
-2006-08-13 17:30 lennart
-
- * : remove pa_sink_input::variable_rate field since it has been
- folded into pa_sink_input::flags
-
-2006-08-13 16:22 lennart
-
- * : hide hook-list-test
-
-2006-08-13 16:21 lennart
-
- * : modify module-volume-restore to change the initial volume of a
- sink input from a hook instead of an asyncronous subscription
- event.
-
-2006-08-13 16:19 lennart
-
- * : allow hooking into the process of creating playback streams. To
- implement this I modified the pa_sink_input_new() signature to
- take a pa_sink_input_new_data structure instead of direct
- arguments.
-
-2006-08-13 16:14 lennart
-
- * : fix bad printf()
-
-2006-08-13 16:13 lennart
-
- * : rework hook list stuff once again: change the callback
- prototype to recieve three data pointers: one to the data for the
- hook, once for the slot and once for the call
-
-2006-08-13 01:43 lennart
-
- * : rework hook list stuff again, and replace macros with real
- functins. We loose type safety but things are much cleaner now
-
-2006-08-12 23:55 lennart
-
- * : update hook list test
-
-2006-08-12 23:55 lennart
-
- * : reall add type safe hook list
-
-2006-08-12 23:35 lennart
-
- * : implement typeafe hook chain
-
-2006-08-12 17:59 lennart
-
- * : extend maximum sink/source name length, because HAL UDIs can
- get ridiculously long
-
-2006-08-12 17:07 lennart
-
- * : update todo
-
-2006-08-12 17:06 lennart
-
- * : test if sink->monitor_source is set before making use of it
-
-2006-08-12 17:06 lennart
-
- * : make use of pa_sink_used_by()/pa_source_used_by() wherever
- applicable
-
-2006-08-12 16:50 lennart
-
- * : add pa_sink_used_by()/pa_source_used_by()
-
-2006-08-12 16:40 lennart
-
- * : categorize todo file
-
-2006-08-12 16:33 lennart
-
- * : name the sink/source after the device file, just like we
- already do for the non-mmaped driver
-
-2006-08-12 16:26 lennart
-
- * : generate default sink/source names from the device files they
- belong to
-
-2006-08-12 16:02 lennart
-
- * : update todo
-
-2006-08-12 16:02 lennart
-
- * : handle hot-remeving of OSS devices properly
-
-2006-08-12 16:01 lennart
-
- * : print the device capabilities after opening the device
-
-2006-08-12 15:09 lennart
-
- * : when the requested sample format is not available for OSS
- devices, print a nice warning and take what we can get instead
-
-2006-08-12 15:08 lennart
-
- * : there's no need to queue subscription events if noone is
- listening, hence don't do it!
-
-2006-08-12 13:18 lennart
-
- * : * only load an OSS driver for the first device of a sound card,
- similar to what is done for ALSA.
- * fix a mem leak
-
-2006-08-12 13:17 lennart
-
- * : fix a segfault in module-oss
-
-2006-08-12 12:07 lennart
-
- * : fix pa_gettimeofday() return value testing
-
-2006-08-12 12:03 lennart
-
- * : update todo
-
-2006-08-12 02:20 lennart
-
- * : update todo
-
-2006-08-12 02:19 lennart
-
- * : clean up event generation a little: suppress unnecessary events
- and generate new ones on owner change
-
-2006-08-12 02:18 lennart
-
- * : rework subscription code: try to drop redundant queued events
-
-2006-08-12 02:16 lennart
-
- * : fix a compiler warning
-
-2006-08-12 02:16 lennart
-
- * : add new macro PA_LLIST_INSERT_AFTER
-
-2006-08-12 01:17 shahms
-
- * : increase module argument buffer size to prevent truncating
- names
-
-2006-08-12 00:26 lennart
-
- * : update todo
-
-2006-08-12 00:25 lennart
-
- * : allow setting the null sink description by a module parameter
-
-2006-08-11 23:58 lennart
-
- * : don't set the sink/source descriptions manually, use the new
- functions pa_{sink,source}_set_description() instead
-
-2006-08-11 23:31 lennart
-
- * : comment which values in
- pa_{sink,source,sink_input,source_output} structures may be NULL
-
-2006-08-11 17:53 lennart
-
- * : * introduce new functions pa_sink_set_description() and
- pa_source_set_description() for changing the description of a
- sink/source
- * allow sinks without monitor sources attached
-
-2006-08-11 17:15 lennart
-
- * : update todo
-
-2006-08-11 17:14 lennart
-
- * : shorten sink/source device descriptions a little
-
-2006-08-11 17:12 lennart
-
- * : use the HAL UDI for naming input/output devices
-
-2006-08-11 16:58 lennart
-
- * : do not export name validity checking routes and apply them only
- to sink/source names, not sample names
-
-2006-08-11 16:56 lennart
-
- * : fix bad memory access and a leak when detructing ALSA fd lists
-
-2006-08-11 16:38 lennart
-
- * : rework name register a litle to only allow "valid" names.
-
-2006-08-11 16:38 lennart
-
- * : Build HAL support only when either OSS or ALSA is available
-
-2006-08-11 16:29 lennart
-
- * : remove OSS specific code from module-hal-detect if HAVE_OSS is
- not set. Same for ALSA
-
-2006-08-11 15:08 lennart
-
- * : ALSA: handle write()/read() errors properly by unloading the
- driver module. This should fix problems when removing USB audio
- device while pulseaudio is running.
-
-2006-08-11 15:06 lennart
-
- * : change order of the ALSA event dispatch code to make sure that
- the code survives if the event dispatcher frees the ALSA client
-
-2006-08-11 15:05 lennart
-
- * : use the copied udi string as hash key for the device table,
- because the temporary one is freed when the function exits
-
-2006-08-08 19:26 shahms
-
- * : add HAL support for OSS devices and capability changes
-
-2006-08-07 20:29 shahms
-
- * : clean up hal patch to use pa_xnew and timeval compatibility
- wrappers
-
-2006-08-07 16:50 lennart
-
- * : try to reduce volume updates in the ALSA sinks/sources: only
- touch the shadowed hw volme if necessary
-
-2006-08-06 19:14 lennart
-
- * : * add SVN $Id$ tags
- * add a const
-
-2006-08-06 16:16 lennart
-
- * : merge HAL support from Shams E. King
-
-2006-08-03 22:34 lennart
-
- * : update todo
-
-2006-08-03 22:33 lennart
-
- * : implement "pactl move-source-output"
-
-2006-08-03 22:33 lennart
-
- * : implement pa_context_move_source_output_by_{name,index}()
-
-2006-08-03 22:32 lennart
-
- * : wrap pa_source_output_move_to() in the native protocol
-
-2006-08-03 22:31 lennart
-
- * : add new CLI command move-source-output as wrapper around
- pa_source_output_move_to()
-
-2006-08-03 22:30 lennart
-
- * : Implement pa_source_input_move_to() for moving record streams
- between sources
-
-2006-08-03 22:29 lennart
-
- * : - don't call pa_sink_notify in pa_sink_input_new() because the
- virtual methods are not yet initialized at this time
- - some minor cleanups
-
-2006-08-01 21:04 lennart
-
- * : bump API and protocol version. Return PA_ERR_NOTSUPPORTED if
- pa_context_move_sink_input_by_*()is called for servers that don't
- support it
-
-2006-07-31 21:55 lennart
-
- * : add new "move-sink-input" command to pactl
-
-2006-07-31 21:55 lennart
-
- * : wrap PA_COMMAND_MOVE_SINK_INPUT for libpulse
-
-2006-07-31 21:54 lennart
-
- * : add new native protocol function for moving sink inputs between
- sinks
-
-2006-07-31 21:54 lennart
-
- * : add new commands opcode for moving sink inputs and source
- outputs
-
-2006-07-31 21:53 lennart
-
- * : deal properly with recursive module unloading
-
-2006-07-31 21:53 lennart
-
- * : fix bad memory access if a non-existing entry shall be removed
- from a pa_idxset by index
-
-2006-07-29 17:42 lennart
-
- * : fix module-gconf initialization
-
-2006-07-29 17:20 lennart
-
- * : don't hit an assetr if there are operations outstanding when
- the pa_context is destroyed
-
-2006-07-29 15:34 lennart
-
- * : fix two typos (pierre, have you been sleeping? next time please
- the comments wrong but the code right, not the other way round!
- ;-))
-
-2006-07-29 15:07 lennart
-
- * : add new CLI function "move-sink-input" as wrapper around
- pa_sink_input_move_to()
-
-2006-07-29 15:06 lennart
-
- * : * implement "hot" moving of playback streams between sinks
- (pa_sink_input_move_to()).
- * optimize the adjusting of the volume in pa_sink_input_peek() a
- little
-
-2006-07-29 15:04 lennart
-
- * : free the memblockq if we decide not to play it
-
-2006-07-29 15:03 lennart
-
- * : if the memblockq is empty, return -1 in all cases
-
-2006-07-29 15:02 lennart
-
- * : fix calculation of pa_usec_to_bytes, to make sure that it never
- returns fractions of a frame size
-
-2006-07-29 15:02 lennart
-
- * : handle EOF correctly if it is read before the stream was
- created
-
-2006-07-28 23:29 lennart
-
- * : for the playing field of pa_timing_info use
- pa_sink_input::state == PA_SINK_INPUT_RUNNING. This means that
- this variable will now refer to the current state and not to the
- expected future state, which is probably more what clients
- expect.
-
-2006-07-28 23:27 lennart
-
- * : fold the seperate variable pa_sink_input::playing into
- pa_sink_input::state as state PA_SINK_INPUT_DRAINED. The
- following mappings hold:
-
- old PA_SINK_RUNNING + playing set = new PA_SINK_RUNNING
- old PA_SINK_RUNNING + playing not set = new PA_SINK_DRAINED
-
-2006-07-28 22:52 lennart
-
- * : introduce pa_play_memblockq() which creates a playback stream
- and passes the data from the memblockq to it. after that is done,
- frees the memblockq
-
-2006-07-27 18:40 lennart
-
- * : update todo
-
-2006-07-27 18:35 lennart
-
- * : load module-gconf in default install
-
-2006-07-27 18:02 lennart
-
- * : introduce three virtual sink/source names: @DEFAULT_SINK@,
- @DEFAULT_SOURCE@, @DEFAULT_MONITOR@. Especially the latter is
- useful for connecting to the monitor source of the default sink.
-
-2006-07-27 16:51 lennart
-
- * : if possible do not unload already loaded modules when the gconf
- settings change. instead try to reuse already loaded modules as
- much as possible
-
-2006-07-27 16:50 lennart
-
- * : because gconf doesn't provide real transactions we emulate our
- own with a "locked" gconf key
-
-2006-07-27 16:49 lennart
-
- * : remove superfluous code
-
-2006-07-26 22:39 lennart
-
- * : remove two superfluous lines
-
-2006-07-26 22:39 lennart
-
- * : mainloop fixes: when disabling time events when dispatching
- them, make sure to adjust the cache time event and enabled time
- event counters
-
-2006-07-26 18:28 lennart
-
- * : add some protection that the gconf helper process will be
- killed when the daemon process dies. make sure the gconf helper
- process doesn't keep open file descriptors belonging to the
- daemon; if gconf helper path
-
-2006-07-26 17:46 lennart
-
- * : add missing configure.ac checks for module-gconf
-
-2006-07-26 17:36 lennart
-
- * : add new module "module-gconf" which reads configuration
- information from gconf. this will be used in my upcoming paconf
- module
-
-2006-07-25 20:51 lennart
-
- * : add new command line option --no-cpu-limit. This is useful when
- running PulseAudio in valgrind's massif or callgrind tools
-
-2006-07-25 20:39 lennart
-
- * : Results of profiling PulseAudio with valgrind's callgrind
- module: rework the default event loop implementation to use
- PA_LLIST_xxx instead of pa_idxset; don't generate weakeup events
- if we aren't in STATE_POLLING; minimize dispatching of io events;
- cache next time event instead of traversing the list of time
- events on every event loop iteration; other optimizations
-
-2006-07-25 20:10 lennart
-
- * : split a few asserts
-
-2006-07-25 20:10 lennart
-
- * : split a few assert()s
-
-2006-07-25 20:09 lennart
-
- * : add a few more g_assert()s and change all assert()s to
- g_assert()s
-
-2006-07-24 20:03 lennart
-
- * : add autogen.sh for jhbuild (for you, elmarco!)
-
-2006-07-24 17:48 lennart
-
- * : bump version and sonames
-
-2006-07-23 22:36 lennart
-
- * : add massif target to Makefile
-
-2006-07-23 22:35 lennart
-
- * : as a result of memory profiling with valgrind/massif: decrease
- default hash table size from 1024 to 127. the hashtables are
- sparsely filled most of the time, so there is no point in
- allocating to much memory by default.
-
-2006-07-23 19:23 lennart
-
- * : update todo
-
-2006-07-22 00:54 lennart
-
- * : fix horribly broken glib timeout event handling
-
-2006-07-21 21:19 ossman
-
- * : Use proper @libdir@ in pc.in files to handle x86_64 machines.
-
-2006-07-21 19:59 lennart
-
- * : raise the default value for RLIMIT_NOFILE to 200 since 25 is
- apparently too small if every single GNOME apps thinks it needs
- to create its own server connection!
-
-2006-07-20 23:21 ossman
-
- * : Get ACL:s to work on Win32.
-
-2006-07-20 23:12 lennart
-
- * : remove access group setting from default client.conf
-
-2006-07-20 23:04 lennart
-
- * : fix a few @@ replacments
-
-2006-07-20 22:58 lennart
-
- * : even more FreeBSD portability (thanks Flameeyes, again!)
-
-2006-07-20 22:46 lennart
-
- * : add missing #ifdef HAVE_CREDS (thanks, Flameeyes)
-
-2006-07-20 22:44 lennart
-
- * : some more FreeBSD compat from Flameeyes
-
-2006-07-20 21:48 lennart
-
- * : bump release and sonames
-
-2006-07-20 21:28 lennart
-
- * : remove configurable client access group, since can never work
- on Linux anway, since SCM_CREDENTAILS doesn't allow sending
- supplementary GIDs
-
-2006-07-20 18:43 lennart
-
- * : update todo
-
-2006-07-20 18:43 lennart
-
- * : implement "auth-ip-acl=" in the native and esound protocols
-
-2006-07-20 16:56 lennart
-
- * : actually ship src/pulsecore/creds.h in the tarballs
-
-2006-07-20 16:48 lennart
-
- * : add IP address ACL subsystem
-
-2006-07-20 13:28 ossman
-
- * : Fix incorrect call to nonexistant pa_log_warning().
-
-2006-07-20 13:24 ossman
-
- * : Only warn when running as root and not --system.
-
-2006-07-20 13:24 ossman
-
- * : Centralise check if we're running as root.
-
-2006-07-20 13:19 ossman
-
- * : Move check for SUID into the caps functions.
-
-2006-07-20 13:16 ossman
-
- * : Handle user switch in a more platform independent manner.
-
-2006-07-20 13:07 ossman
-
- * : Make sure parse_rlimit is only used when rlimits are supported.
-
-2006-07-20 01:25 lennart
-
- * : add support to set resource limits for the daemon and set some
- of them to some sane values
-
-2006-07-20 00:52 lennart
-
- * : undo r1111 in some way: include sys/socket.h and sys/un.h but
- wrap it in #ifdef
- HAVE_xxx_H. This should be safe because config.h should be the
- first included
- header in all .c files and creds.h is never included by any
- external tools
-
-2006-07-20 00:28 ossman
-
- * : Add missing header.
-
-2006-07-20 00:21 ossman
-
- * : Make -1 mean "current group/user" so that some platform
- dependent calls
- can be centralised.
-
-2006-07-20 00:13 ossman
-
- * : Protect platform dependent headers with ifdefs.
-
-2006-07-20 00:12 ossman
-
- * : Remove unneeded headers.
-
-2006-07-19 23:16 lennart
-
- * : add a few comments
-
-2006-07-19 21:48 lennart
-
- * : * add new function pa_check_in_group()
- * abstract credential APis a little bit by introducing HAVE_CREDS
- and a structure pa_creds
- * rework credential authentication
- * fix module-volume-restore and friends for usage in system-wide
- instance
- * remove loopback= argument from moulde-*-protocol-tcp since it
- is a superset of listen= and usually a bad idea anyway since the
- user shouldn't load the TCP module at all if he doesn't want
- remote access
- * rename a few variables in the jack modules to make sure they
- don't conflict with symbols defined in the system headers
- * add server address for system-wide daemons to the default
- server list for the the client libs
- * update todo
-
-2006-07-19 18:14 lennart
-
- * : use access group dedclared in ~/.pulse/client.conf instead of
- PA_ACCESS_GROUP
-
-2006-07-19 18:11 lennart
-
- * : update @@ tokens according to recent Makefile.am change
-
-2006-07-19 18:08 lennart
-
- * : fix sed scripts according to #define renames
-
-2006-07-19 17:44 lennart
-
- * : * add new --system command line parameter to the daemon for
- running PulseAudio as system-wide instance
- * add PA_ prefixes to all global #defines
- * modify auth-by-creds: define a new group "pulse-access" which
- is used for authentication
- * add proper privilige dropping when running in --system mode
- * create runtime directory once on startup and not by each module
- seperately
-
-2006-07-18 19:53 lennart
-
- * : remove glib 1.2 adapter. It started to bitrot and wasn't used
- by anything anyway.
-
-2006-07-18 19:50 lennart
-
- * : add two more \since
-
-2006-07-18 19:19 lennart
-
- * : fix module-detect on FreeBSD (patch from Diego "Flameeyes"
- Pettenó)
-
-2006-07-18 18:52 lennart
-
- * : turn the glib adapter into a single GSource instead of creating
- a bunch of seperate GSources for each event
-
-2006-07-18 18:51 lennart
-
- * : define proper typdefs for callback prototypes
-
-2006-07-17 21:20 lennart
-
- * : change licensing blurb form "Library GPL" to "Lesser GPL" on
- request of Loic Minier. Effectively this means using the same
- license blurb like in all other source files.
-
-2006-07-17 11:42 ossman
-
- * : Forgot to protect one access to with_creds with an ifdef.
-
-2006-07-17 11:26 ossman
-
- * : Restore SIGPIPE warning when the platform doesn't have
- MSG_NOSIGNAL.
-
-2006-07-16 23:20 lennart
-
- * : make pulseaudio compile again on FreeBSD (patch from Diego
- "Flameeyes" Petteno)
-
-2006-07-16 17:42 lennart
-
- * : todo
-
-2006-07-16 17:38 lennart
-
- * : show summary after "configure" has run (closes: #22)
-
-2006-07-16 17:29 lennart
-
- * : show value of PA_SINK_HARDWARE/PA_SOURCE_HARDWARE in pactl
-
-2006-07-16 17:28 lennart
-
- * : set is_hardware flag for a few hw plugins
-
-2006-07-16 17:28 lennart
-
- * : add new PA_SOURCE_HARDWARE/PA_SINK_HARDWARE flag
-
-2006-07-16 17:26 lennart
-
- * : add a new boolean variable is_hardware to pa_sink/pa_source to
- denote wether the specific device is a hardware device or
- virtual/software
-
-2006-07-15 12:40 lennart
-
- * : update todo
-
-2006-07-14 23:59 lennart
-
- * : improve latency calculation of NULL sink
-
-2006-07-14 23:08 lennart
-
- * : update todo
-
-2006-07-14 23:06 lennart
-
- * : remove checking for SIGPIPE blocking from client code. Because
- we use
- send(,,MSG_NOSIGNAL) for most socket writes now the reason for
- SIGPIPE blocking
- is no longer give. We keep this check for the server side
- however, because
- pipes create SIGPIPE too but cannot be used with MSG_NOSIGNAL.
- Some modules use
- pipes for internal and external communication.
-
-2006-07-14 23:00 lennart
-
- * : don't send SCM_CREDENTIALS on every sendmsg(), instead do it
- only on handshake
-
-2006-07-14 23:00 lennart
-
- * : don't set MSG_NOSIGNAL for recvmsg(), since it doesn't make
- sense there
-
-2006-07-14 22:42 lennart
-
- * : try to use send(,,MSG_NOSIGNAL) instead of write() wherever
- possible (which
- will allow us to drop the SIGPIPE check). Cache the results of
- the last
- write()/send() to make sure that we do not issue more than
- necessary system
- calls.
-
-2006-07-14 10:20 lennart
-
- * : remove vi'ism
-
-2006-07-14 10:19 lennart
-
- * : update todo
-
-2006-07-14 10:08 ossman
-
- * : Make sure the win32 default conf gets shipped.
-
-2006-07-14 00:19 lennart
-
- * : add new test get-binary-name-test for testing
- pa_get_binary_name()
-
-2006-07-14 00:18 lennart
-
- * : Don't call pa_path_get_filename() anymore since it is
- implicitly called by pa_get_binary_name() anyway
-
-2006-07-14 00:17 lennart
-
- * : * fall back to prctl(PR_GET_NAME) in pa_get_binary_name() if
- readlink() fails
- * call pa_path_get_filename() in all cases before returning in
- pa_get_binary_name(). We already did so on Win32, but didn't on
- Linux.
-
-2006-07-13 23:12 lennart
-
- * : support time events with NULL timevals which are OK in avahi,
- but not in PA. This makes padevchooser actually work on top of
- the new avahi browsing stuff
-
-2006-07-13 23:10 lennart
-
- * : update todo
-
-2006-07-13 18:23 lennart
-
- * : remove avahi/howl item from todo list
-
-2006-07-13 17:44 lennart
-
- * : remove howl-wrap.[ch]
-
-2006-07-13 17:44 lennart
-
- * : remove HOWL snippet from configure script
-
-2006-07-13 17:35 lennart
-
- * : * add proper error handling to pabrowse.c
- * properly destroy pa_browser object on exit
-
-2006-07-13 17:34 lennart
-
- * : add browser.h to doxygen docs
-
-2006-07-13 17:33 lennart
-
- * : * port libpulse-browse to use the native avahi API instead of
- the HOWL cruft
- * add new function pa_browser_set_error_callback()
- * add doxygen docs to browser.h
-
-2006-07-13 15:54 lennart
-
- * : update module-zeroconf-publish to make use of the native AVAHI
- API, instead of HOWL
-
-2006-07-13 15:52 lennart
-
- * : make sure gccmacro.h and cdecl.h may be included at the same
- time as those headers from the avahi project
-
-2006-07-13 15:51 lennart
-
- * : check for avahi in configure.ac
-
-2006-07-10 17:56 lennart
-
- * : mark HAL for shams king
-
-2006-07-08 13:25 lennart
-
- * : * remove doc/ directory
- * move doc/todo to root dir
-
-2006-07-08 11:29 ossman
-
- * : Remove some unused m4 files.
-
-2006-07-08 10:51 ossman
-
- * : Fix typo.
-
-2006-07-08 10:40 lennart
-
- * : unhide a few files
-
-2006-07-07 16:05 lennart
-
- * : remove all docs from tarball since they are now available on
- pulseaudio.org
-
-2006-07-07 14:36 lennart
-
- * : s/avahi/pulseuaiod/
-
-2006-07-07 12:59 lennart
-
- * : replace remaining ML refs to polyp
-
-2006-07-07 12:53 lennart
-
- * : fix mailman URL
-
-2006-07-07 12:45 lennart
-
- * : update readme for 0.9.2
-
-2006-06-30 08:16 ossman
-
- * : Make sure we print the file name we actually use.
-
-2006-06-21 16:36 lennart
-
- * : increase the maxium number of concurrent esd and native
- connections
-
-2006-06-21 14:05 lennart
-
- * : include config.h in browser.c (closes #20)
-
-2006-06-21 00:18 lennart
-
- * : only interpolate when the last timing info told us the stream
- is indeed playing
-
-2006-06-20 22:27 lennart
-
- * : bump version number
-
-2006-06-20 21:23 lennart
-
- * : fix segfault when module-alsa-source fails to load
-
-2006-06-20 16:43 ossman
-
- * : Fix handling of the io flags in duplex mode.
-
-2006-06-20 15:45 ossman
-
- * : Warn when applications use SNDCTL_DSP_GET[IO]PTR even when they
- shouldn't.
-
-2006-06-20 15:36 ossman
-
- * : Make fix_metrics() exit early so that it doesn't spam the
- output needlessly.
-
-2006-06-20 14:26 ossman
-
- * : Make sure we do not use pthread_yield() on platforms that do
- not have them.
-
-2006-06-20 14:22 ossman
-
- * : Check for pthread_yield() as not all platforms have that.
-
-2006-06-20 13:49 ossman
-
- * : Make interpol-test build on Win32 and non-pthread systems.
-
-2006-06-20 13:02 ossman
-
- * : Fix the final few occurences of polyp.
-
-2006-06-19 23:56 lennart
-
- * : s/POLYP/PULSE/g
-
-2006-06-19 23:52 lennart
-
- * : update docs
-
-2006-06-19 23:51 lennart
-
- * : * more s/pulseaudio/PulseAudio/ replacements
- * name the per-user dir ~/.pulse (instead of .pulseaudio), just
- like /etc/pulse/
-
-2006-06-19 23:06 lennart
-
- * : update references to the pkg-config files in the docs
-
-2006-06-19 23:00 lennart
-
- * : name the pkg-config files after the library names
-
-2006-06-19 22:11 lennart
-
- * : replace a few remaining uppercase "Polypaudio" occurences with
- "PulseAudio"
-
-2006-06-19 22:03 lennart
-
- * : hide pulseadudio binary from SVN
-
-2006-06-19 21:55 lennart
-
- * : rename polypaudio.h to pulseaudio.h
-
-2006-06-19 21:53 lennart
-
- * : big s/polyp/pulse/g
-
-2006-06-19 21:00 lennart
-
- * : unhide padsp
-
-2006-06-19 20:58 lennart
-
- * : hide interpol-test
-
-2006-06-19 16:39 ossman
-
- * : Handle clients that just want to set fragment size (and not
- count).
-
-2006-06-19 12:37 lennart
-
- * : * rework latency interpolation to make it smoother
- * increase latency update interval to 100ms
-
-2006-06-19 12:20 lennart
-
- * : minor cleanups
-
-2006-06-19 11:27 lennart
-
- * : add new test "interpol-test"
-
-2006-06-18 11:10 lennart
-
- * : * add new argument 'exit_on_eof' to module-cli and make use of
- it if "-C" is passed to the daemon
-
-2006-06-17 23:37 lennart
-
- * : * implement volume adjusting and mixing for S16RE
- * some optimizations
-
-2006-06-17 23:36 lennart
-
- * : * make hw param settings easier to debug by splitting up long
- if
- * actually set the sample rate
- * disable resampling done by ALSA
-
-2006-06-16 21:11 ossman
-
- * : /dev/dsp should default to U8, not mulaw.
-
-2006-06-16 21:08 ossman
-
- * : Creating a stream might take some time, so check that it's in
- the right state
- before transferring data.
-
-2006-06-16 21:07 ossman
-
- * : Record support.
-
-2006-06-16 19:33 lennart
-
- * : if S16NE is not supported, fall back to S16RE. If FLOAT32NE is
- not supported, fall back to FLOAT32NE. If still nothing is
- supported, try everything else in order
-
-2006-06-15 17:34 lennart
-
- * : update todo
-
-2006-06-15 14:47 ossman
-
- * : Make debug output in padsp a bit less verbose. Specifying -d
- twice will give
- original output.
-
-2006-06-13 15:54 ossman
-
- * : Make a copy of the va_list as vsnprintf() is free to change it.
-
-2006-06-13 13:21 ossman
-
- * : Catch the access() system call as some applications do this to
- test if they
- can open /dev/dsp.
-
-2006-06-13 10:53 ossman
-
- * : Make sure our inet_ntop() implementation gets linked into the
- new users.
-
-2006-06-13 09:33 ossman
-
- * : Tweak the printing of client connections a bit so that it's
- more apparent
- what and who it is that's connecting.
-
-2006-06-13 09:33 ossman
-
- * : Handle pretty printing of IPv6 socket names.
-
-2006-06-12 14:18 ossman
-
- * : Use AM_ICONV to determine what needs to be done for iconv
- support. (closes #19)
-
-2006-06-12 13:56 ossman
-
- * : Fix AC_CHECK_DEFINE so that we can look in different files for
- the same
- define.
-
-2006-06-12 12:52 ossman
-
- * : Also look in winsock2.h for INADDR_NONE. (solves #18)
-
-2006-06-12 12:19 ossman
-
- * : Properly escape the m4 macros and make the code a bit more
- readable.
-
-2006-06-11 01:34 ossman
-
- * : Add all the preopen libs to the polypaudio binary's dependency
- list as they
- aren't automatically detected. (Closes #17)
-
-2006-06-03 01:15 lennart
-
- * : rework ioline EOF handling to actually work properly
-
-2006-06-03 00:59 lennart
-
- * : fix pa_xstrndup() implementation to not access potentially
- uninitialized memory
-
-2006-06-02 22:56 lennart
-
- * : actually build cpulimit support if SIGXCPU is available
-
-2006-06-02 21:06 lennart
-
- * : fix ugly access-after-free bug when doing asyncronous NS
- lookups
-
-2006-06-02 19:49 lennart
-
- * : update docs for 0.9.1
-
-2006-06-02 19:28 lennart
-
- * : bump version and soname
-
-2006-06-02 15:30 lennart
-
- * : Add new configure options to disable/enable specific modules at
- configure time. Original patch by ed@catmur.co.uk. (Closes #16)
-
-2006-06-01 13:49 ossman
-
- * : update todo
-
-2006-06-01 13:49 ossman
-
- * : Try the ltdl mangled name ourselves so that .la files for
- modules are optional.
-
-2006-05-31 19:17 lennart
-
- * : remove superfluous prefixes from service names
-
-2006-05-31 15:07 lennart
-
- * : update TODO
-
-2006-05-31 00:05 lennart
-
- * : decrease maximum allowed sample frequency for ALSA devices to
- 5%, since 48000 would otherwise match with 44100
-
-2006-05-30 22:57 lennart
-
- * : downgrade a log message
-
-2006-05-30 22:48 lennart
-
- * : * alsa-sink: if "PCM" is not found as mixer track name,
- fallback to "Master"
- * alsa-source: if "Capture" is not found as mixer track name,
- fallback to "Mic"
-
-2006-05-30 22:05 lennart
-
- * : * if an ALSA device doesn't support the channel count
- requested, use what ALSA suggests instead
- * if an ALSA device doesn't support the sampling freq requested,
- use what ALSA suggests and resample if this deviates more than
- 10% from what we requested
- * fix segfault freeing an unitialized mixer_fdl field
-
-2006-05-30 15:28 lennart
-
- * : update todo
-
-2006-05-30 12:23 lennart
-
- * : load alsa modules with device string hw:0 instead of hw:0,0
-
-2006-05-30 00:25 lennart
-
- * : fix amd64 portability issues
-
-2006-05-29 14:06 lennart
-
- * : merge patch from Igor Zubkov, fixing linking of the HOWL
- modules
-
-2006-05-29 13:01 lennart
-
- * : update svn:ignore to reflect the esdcompat name change
-
-2006-05-29 12:59 lennart
-
- * : drop the .sh suffix from esdcompat
-
-2006-05-26 18:00 lennart
-
- * : update README for 0.9.0
-
-2006-05-26 17:59 lennart
-
- * : disable padsp for the polypaudio daemon itself by defining the
- __padsp_disabled__ symbol
-
-2006-05-26 12:24 ossman
-
- * : update todo
-
-2006-05-26 12:18 ossman
-
- * : Fix the fix_metrics() function so that we don't get a tiny
- buffer by default.
-
-2006-05-26 09:21 ossman
-
- * : Fix typos.
-
-2006-05-26 07:24 ossman
-
- * : Returned buffer attr is const.
-
-2006-05-26 07:24 ossman
-
- * : Explicitly check version number when determining which fields
- are in a stream
- create response.
-
-2006-05-25 23:40 lennart
-
- * : update todo
-
-2006-05-25 23:20 lennart
-
- * : * add new API function pa_stream_get_buffer_attr().
- * modify pacat.c to make use of that new API
- * extend protocol to allow transfer of the necessary information
- * update protocol version accordingly
-
-2006-05-25 17:27 ossman
-
- * : Wrong prefix used in the padsp script.
-
-2006-05-25 17:26 ossman
-
- * : We only need the so for libpolypdsp.
-
-2006-05-25 17:18 lennart
-
- * : really fix a superfluous warning when building padsp.c
-
-2006-05-25 17:16 lennart
-
- * : * split pa_cstrerror() into its own file
- polypcore/core-error.[ch]
- * fix building of padsp
- * remove a warning when compiling padsp.c
-
-2006-05-25 16:05 lennart
-
- * : move modules to ${libdir}/polypaudio-${PA_MAJORMINOR}/modules/
-
-2006-05-25 15:44 ossman
-
- * : Fix padsp script so that it accepts parameters, setting
- relevant environment
- variables as needed.
-
-2006-05-25 13:56 ossman
-
- * : Use only the basename of libpolypdsp.so so that it will work on
- multi-arch
- systems.
-
-2006-05-25 13:31 ossman
-
- * : Move libpolypdsp in the makefile to avoid the libtool bug where
- it must come
- after any things it depends on.
-
-2006-05-25 13:29 lennart
-
- * : add item about moving pa_cstrerror() to TODO
-
-2006-05-25 01:26 lennart
-
- * : update todo
-
-2006-05-25 01:19 lennart
-
- * : read stream and client name from $PADSP_STREAM_NAME resp.
- $PADSP_CLIENT_NAME, if available
-
-2006-05-25 01:14 lennart
-
- * : add support to disable emulation of
- /dev/dsp,/dev/mixer,/dev/sndstat selectively by either passing an
- environment variable or by defining a symbol __padsp_disable__ in
- the process
-
-2006-05-25 00:40 lennart
-
- * : fix evil, evil typo that cause all gtk2 based apps to crash
-
-2006-05-25 00:25 lennart
-
- * : * issue volume updates syncrhonously
- * correct channel order of OSS volumes (swap left,right)
-
-2006-05-25 00:12 lennart
-
- * : update TODO
-
-2006-05-24 15:38 ossman
-
- * : padsp needs dlsym & co so make sure we get that lib included.
-
-2006-05-24 13:23 ossman
-
- * : Fix warnings.
-
-2006-05-24 13:22 ossman
-
- * : Remove the exceedingly anal warnings. It's impossible to write
- a non-trivial
- C program and not trigger these.
-
-2006-05-24 08:14 ossman
-
- * : Fix stray \
-
-2006-05-24 02:13 lennart
-
- * : implement a /dev/mixer interface
-
-2006-05-24 00:42 lennart
-
- * : fix playback of small sound files
-
-2006-05-23 23:57 lennart
-
- * : implement emulation of /dev/sndstat
-
-2006-05-23 23:06 lennart
-
- * : - use pthread_atfork() to disable open sound streams in the
- child after a fork.
- Obviusly sound won't work in child process but at least we don't
- leak fds
- from the parent. Now any operation on the device fd in the child
- will result
- in an EBADF error, which seems somewhat clean to me.
-
- - flush our unix socket properly on RESET ioctl
-
-2006-05-23 16:37 lennart
-
- * : pass the binary name as client name to polypaudio
-
-2006-05-23 15:24 ossman
-
- * : Cast size_t to long to be more compatible with 64-bit systems.
-
-2006-05-23 14:42 lennart
-
- * : add new padsp utility: a $LD_PRELOAD wrapper for using the OSS
- API with polypaudio
-
-2006-05-23 14:39 lennart
-
- * : change return type of pa_cstrerror() to "const char*"
-
-2006-05-23 07:33 ossman
-
- * : Fix some warnings.
-
-2006-05-22 16:47 ossman
-
- * : Fix TLS on Win32 to something a bit more safe and portable
- (compiler-wise).
-
-2006-05-22 15:56 lennart
-
- * : add missing #include
-
-2006-05-22 15:20 ossman
-
- * : Wrap strerror() in a function that makes it thread safe and
- converts the
- output to UTF-8.
-
-2006-05-22 15:19 ossman
-
- * : update todo
-
-2006-05-21 14:06 lennart
-
- * : add missing #include
-
-2006-05-21 14:06 lennart
-
- * : add new function pa_usec_to_bytes() as inverse of
- pa_bytes_to_usec()
-
-2006-05-20 19:27 lennart
-
- * : doc update
-
-2006-05-20 15:00 lennart
-
- * : fix long-standing buf that could cause polypaudio to eat 100%
- CPU: fix handling of event bits for pa_iochannel
-
-2006-05-20 14:59 lennart
-
- * : rename pa_simple_get_playback_latency() to
- pa_simple_get_latency() and allow its usage on capture streams
-
-2006-05-19 17:40 lennart
-
- * : generate PA_MAJORMINOR properly - only from major and minor,
- not from micro
-
-2006-05-19 11:32 ossman
-
- * : Fix some missing headers.
-
-2006-05-19 07:38 ossman
-
- * : Fix which headers get installed for libpolyp.
-
-2006-05-19 07:29 ossman
-
- * : Sort source files.
-
-2006-05-18 10:36 ossman
-
- * : update todo
-
-2006-05-18 10:36 ossman
-
- * : Convert log text to current locale before passing it on to
- stderr or syslog.
-
-2006-05-18 08:21 ossman
-
- * : Make paplay convert names to UTF-8 before sending to the
- server.
-
-2006-05-18 08:19 ossman
-
- * : And functions for convertion to and from current locale and
- UTF-8.
-
-2006-05-18 07:07 ossman
-
- * : Missing include of util.h.
-
-2006-05-18 07:04 ossman
-
- * : Don't include util.h from core-util.h as it is not needed by
- many users.
-
-2006-05-18 06:53 ossman
-
- * : PATH_MAX needs limits.h.
-
-2006-05-18 06:46 ossman
-
- * : update todo
-
-2006-05-18 06:45 ossman
-
- * : Move timeval calculation functions into their own file.
-
-2006-05-17 21:39 lennart
-
- * : update README for 0.9.0
-
-2006-05-17 21:07 lennart
-
- * : modify lirc module to use pa_sink_mute() for muting and
- unmuting
-
-2006-05-17 20:44 lennart
-
- * : fix include line for "core-util.h"
-
-2006-05-17 20:44 lennart
-
- * : add C++ macros to utf8.h
-
-2006-05-17 20:43 lennart
-
- * : add C++ macros to xmalloc.h
-
-2006-05-17 20:43 lennart
-
- * : * add doxygen docs to header file
- * add C++ macros to header file
-
-2006-05-17 20:42 lennart
-
- * : add util.h to doxygen
-
-2006-05-17 20:42 lennart
-
- * : include util.h in polypaudio.h
-
-2006-05-17 20:09 lennart
-
- * : split polypcore/util.[ch] into polypcore/core-util.[ch] and
- polyp/util.[ch]
-
-2006-05-17 19:26 lennart
-
- * : replace memory allocation function calls with pa_xXXXX()
-
-2006-05-17 19:26 lennart
-
- * : include more files in polypaudio.h
-
-2006-05-17 19:07 lennart
-
- * : add doxygen docs for utf8.h
-
-2006-05-17 19:07 lennart
-
- * : * make pa_xfree() a real function
- * update doxygen docs for xmalloc.h
-
-2006-05-17 19:06 lennart
-
- * : add utf8.h and xmalloc.h to doxygen docs
-
-2006-05-17 18:52 lennart
-
- * : add new channel map argument to pa_simple_new()
-
-2006-05-17 18:51 lennart
-
- * : fix svn tag
-
-2006-05-17 17:30 ossman
-
- * : Move utf8 to the public part (libpolyp).
-
-2006-05-17 16:34 ossman
-
- * : Move xmalloc to the public side (libpolyp).
-
-2006-05-17 15:38 lennart
-
- * : more sensible default.pa file
-
-2006-05-17 15:21 lennart
-
- * : add proper locking when accessing the file match.table
-
-2006-05-17 15:21 lennart
-
- * : add proper locking when accessing the file volume.table
-
-2006-05-17 15:19 lennart
-
- * : add documentation for module-volume-restore
-
-2006-05-17 15:19 lennart
-
- * : update todo
-
-2006-05-17 14:58 lennart
-
- * : update todo
-
-2006-05-17 14:55 lennart
-
- * : * support native ULAW/ALAW file streams
- * fix shutdown of file streams
-
-2006-05-17 14:55 lennart
-
- * : support loading ULAW/ALAW files into ULAW/ALAW memchunks
-
-2006-05-17 14:54 lennart
-
- * : * use S16NE for SF_FORMAT_PCM_S8 formats, too
-
-2006-05-17 14:06 lennart
-
- * : when playing an ULAW or ALAW audio file, do not convert to
- S16NE unconditionally, instead use sf_read_raw() to read raw
- audio data
-
-2006-05-17 13:15 lennart
-
- * : increase PA_CHANNELS_MAX to 32
-
-2006-05-17 13:09 lennart
-
- * : use PA_CHANNEL_MAP_OSS in module-oss, module-oss-mmap
-
-2006-05-17 13:06 lennart
-
- * : add new channel mapping standard PA_CHANNEL_MAP_OSS
-
-2006-05-17 11:23 ossman
-
- * : update todo
-
-2006-05-17 11:10 ossman
-
- * : Update documentation to contain the UTF-8 requirement.
-
-2006-05-17 11:07 ossman
-
- * : Documentation for the threaded main loop API.
-
-2006-05-17 06:58 ossman
-
- * : Set default channel map system for waveout module.
-
-2006-05-17 06:58 ossman
-
- * : Add Microsoft's WAVEFORMWATEEXTENSIBLE channel mapping.
-
-2006-05-17 06:31 ossman
-
- * : Use default channel map for Solaris module. There doesn't seem
- to be a standard
- for > 2 channels, so we'll have to rely on the user.
-
-2006-05-16 23:47 lennart
-
- * : * modify pa_channel_map_init_auto() to take an extra argument
- specifying the standard to use (ALSA, AIFF, ...)
- * add some more validity checks to
- pa_source_new(),pa_sink_new(),pa_sink_input_new(),pa_source_output_new()
-
-2006-05-16 19:15 lennart
-
- * : change version number from "0.9" to "0.9.0" to make version
- comparisons easier
-
-2006-05-16 18:28 lennart
-
- * : bump version number to 0.9
-
-2006-05-16 17:54 lennart
-
- * : * add new configure option --with-module-dir=
- * drop version suffix from soname of libpolyp and friends
- * add version suffix by default to $(modlibexecdir)
-
-2006-05-16 15:30 lennart
-
- * : update todo
-
-2006-05-16 15:29 lennart
-
- * : * remove .a files from the modules directory after installation
- * rename $(modlibdir) to $(modlibexecdir) in accordance with
- secion 11.2 of the automake docs ("The two parts of install")
-
-2006-05-16 01:43 lennart
-
- * : tell svn to ignore the utf8-test binary
-
-2006-05-16 01:40 lennart
-
- * : instead of kicking clients with invalid UTF8 stream names,
- filter invalid characters and use that instead
-
-2006-05-16 00:46 lennart
-
- * : add new test programme utf8-test.c
-
-2006-05-16 00:45 lennart
-
- * : add svn:keywords property
-
-2006-05-16 00:45 lennart
-
- * : add double include protection
-
-2006-05-16 00:44 lennart
-
- * : * remove "const" from return type of pa_utf8_filter() since it
- desn't make any sense
- * fix pa_utf8_filter() to not skip the next character too if it
- found an invalid one
-
-2006-05-16 00:06 lennart
-
- * : use the new latency update callback to be notified when latency
- data becomes
- available again after PA_ERR_NODATA is returned by
- pa_stream_get_latency()
-
-2006-05-16 00:04 lennart
-
- * : downgrade a log message
-
-2006-05-16 00:04 lennart
-
- * : * fix segfault in pa_utf8_validate()
- * remove some compiler warnings
- * use our own pa_xmalloc() implementation instead of libc's
- malloc()
-
-2006-05-15 20:17 lennart
-
- * : add notification callback which is called when new latency data
- becomes available
-
-2006-05-15 13:04 ossman
-
- * : Add function to filter a string of any invalid UTF-8 sequences.
- User must
- free() the result.
-
-2006-05-15 12:45 lennart
-
- * : undo r868
-
-2006-05-15 12:44 ossman
-
- * : Clean up the UTF-8 validation code.
-
-2006-05-15 12:33 lennart
-
- * : remove regex.h from include, since it is actually not used
-
-2006-05-15 06:41 ossman
-
- * : module-volume-restore uses regexp() so make sure it's only
- built on systems
- that have it.
-
-2006-05-15 06:36 ossman
-
- * : Include utf8.h for the validation function.
-
-2006-05-14 16:19 lennart
-
- * : update TODO
-
-2006-05-14 16:18 lennart
-
- * : add utf8 validity checking to esound protocol
-
-2006-05-14 16:17 lennart
-
- * : remove superfluous log line
-
-2006-05-14 16:17 lennart
-
- * : take the filename specified on the command line as default
- stream name
-
-2006-05-14 16:02 lennart
-
- * : check for valid utf8 strings
-
-2006-05-14 16:02 lennart
-
- * : add utf8 validity checking API
-
-2006-05-14 14:07 lennart
-
- * : update todo
-
-2006-05-14 00:41 lennart
-
- * : add new module module-volume-restore which saves and restores
- volume of playback streams
-
-2006-05-14 00:41 lennart
-
- * : * add new parameter to pa_open_config_file() to specify open
- mode
- * modify pa_sink_input_new() to take initial volume settings as
- argument
- * call pa_sink_input_set_volume() when changing stream volume in
- protocol-esound.c to make sure that subscribe events are issued
- properly
-
-2006-05-14 00:36 lennart
-
- * : modify argument order of pa_client_new() to actually match how
- it is usually called
-
-2006-05-13 21:40 lennart
-
- * : fix esound sample cache names
-
-2006-05-13 21:20 lennart
-
- * : * set default fragment metrics depending on the sample specs of
- the device in OSS and ALSA
- * fix fragment size calculation in module-alsa-sink
-
-2006-05-13 21:19 lennart
-
- * : first set buffer size, and afterwards period size
-
-2006-05-13 21:18 lennart
-
- * : don't hit an assert when trying to resample data for 6channel
- audio
-
-2006-05-13 20:47 lennart
-
- * : fix fragment size calculation for module-alsa-source
-
-2006-05-13 20:29 lennart
-
- * : use default alsa channel map for alsa devices
-
-2006-05-13 19:55 lennart
-
- * : remove superfluous log message
-
-2006-05-11 22:37 lennart
-
- * : fix hangup detection for recording streams
-
-2006-05-11 21:38 lennart
-
- * : fix iochannel for hangup signals
-
-2006-05-11 14:57 ossman
-
- * : Windows support for the threaded API.
-
-2006-05-11 13:17 lennart
-
- * : update doxygen docs
-
-2006-05-11 13:17 lennart
-
- * : don't signal the accept_cond automatically when waiting for a
- signal event
-
-2006-05-11 13:01 lennart
-
- * : split of signal releasing into its own function and name it
- pa_threaded_mainloop_accept()
-
-2006-05-11 12:59 lennart
-
- * : add thread-mainloop.h to doxygen docs
-
-2006-05-11 11:30 ossman
-
- * : Remove some debug code that wasn't supposed to be committed.
-
-2006-05-11 11:30 ossman
-
- * : pa_write() should use a const pointer.
-
-2006-05-11 11:08 ossman
-
- * : Handle pipes on platforms where they are non-existant of
- broken.
- We do this by creating a TCP socket pair instead of a normal
- pipe. Since
- Windows isn't UNIX-y enough to support read()/write() on sockets,
- we also
- need a wrapper to handle read() vs recv() and write() vs send().
-
-2006-05-11 11:04 ossman
-
- * : Include log header to get rid of warnings.
-
-2006-05-11 11:03 ossman
-
- * : ANSI codes aren't supported on Windows terminals.
-
-2006-05-11 11:02 ossman
-
- * : Do WSAStartup() in the DLL entry routine instead of at context
- creation.
-
-2006-05-09 15:16 lennart
-
- * : fix handling of timing status requests
-
-2006-05-09 15:15 lennart
-
- * : update todo
-
-2006-05-09 08:39 ossman
-
- * : Add stubs for the threaded main loop so that we can compile it
- on
- non-supported platforms (still can't run it though).
-
-2006-05-09 08:38 ossman
-
- * : Use pa_msleep() to get platform independence.
-
-2006-05-06 20:58 lennart
-
- * : rework the simple API to make use of the new threaded mainloop
- implementation
-
-2006-05-06 20:58 lennart
-
- * : * optionally, make pa_threaded_mainloop_signal() wait until the
- main thread took over control
- * more header file comments
-
-2006-05-06 20:56 lennart
-
- * : add support for reading audio data from a file instead of plain
- STDIN in pacat-simple.c
-
-2006-05-06 20:55 lennart
-
- * : remove bogus check that disallowed latency interpolation and
- stuff for record streams
-
-2006-05-06 16:38 lennart
-
- * : allow signalling from event loop thread
-
-2006-05-03 08:56 ossman
-
- * : update todo
-
-2006-05-02 11:27 ossman
-
- * : Fix control flow in pa_oss_open(). Also fall back to half
- duplex when device doesn't
- support full.
-
-2006-05-02 09:50 ossman
-
- * : We need to read the cookie in binary mode for things to work
- correctly.
-
-2006-05-02 08:41 ossman
-
- * : Windows doesn't have POSIX thread. ifdef out things for now.
-
-2006-04-30 23:34 lennart
-
- * : add new threaded main loop implementation (with test/example)
-
-2006-04-30 23:33 lennart
-
- * : * make sure the wakeup fd is polled on wven when no other fd is
- registered for polling
- * initialize mainloop return value to -1
- * some optimizations
-
-2006-04-28 11:33 lennart
-
- * : fix date
-
-2006-04-28 07:29 ossman
-
- * : When a control is removed, all bits are set so we need to test
- for that first.
-
-2006-04-28 07:28 ossman
-
- * : Zero the fd list since we do a memcmp on it later.
-
-2006-04-27 22:59 lennart
-
- * : ouch!
-
- fix brown paperbag bug which was triggered when runnign
- "pavumeter" and
- specifying a sink on the command line.
-
-2006-04-27 05:43 ossman
-
- * : Clarify how the automatic channel map is generated.
-
-2006-04-27 05:41 ossman
-
- * : Channel map argument support for solaris.
-
-2006-04-27 05:39 ossman
-
- * : Channel map argument support for waveout.
-
-2006-04-27 05:26 ossman
-
- * : update todo
-
-2006-04-26 21:31 lennart
-
- * : doc update for 0.8.1
-
-2006-04-26 19:24 lennart
-
- * : bump version number
-
-2006-04-26 16:50 lennart
-
- * : fail if the channel map doesn't match the sample specs
-
-2006-04-26 16:28 lennart
-
- * : allow the user to specify an alternative channel map in paplay
- too
-
-2006-04-26 16:27 lennart
-
- * : fix volume range printed on --help
-
-2006-04-26 16:27 lennart
-
- * : if a sample is not yet loaded, don't print rubbish about its
- channel map
-
-2006-04-26 16:27 lennart
-
- * : it was a bad idea to require that a channel map doesn't contain
- the same position twice
-
-2006-04-26 16:07 lennart
-
- * : allow specifying the channel map to use on the command line
-
-2006-04-26 16:07 lennart
-
- * : * make a validity check of parsed channel maps before rteurning
- theme
- * don't overwrite the return buffer unless the parsed channel map
- is known to be valid
-
-2006-04-26 15:40 lennart
-
- * : support new channel_map argument in sink/source modules
-
-2006-04-26 15:37 lennart
-
- * : add support for parsing channel maps as module arguments
-
-2006-04-26 15:37 lennart
-
- * : don't allow channel positions to be specified twice in the same
- channelmap
-
-2006-04-26 14:34 lennart
-
- * : add new test 'channelmap-test'
-
-2006-04-26 14:33 lennart
-
- * : * add new function pa_channel_map_parse()
- * increase PA_CHANNEL_MAP_SNPRINT_MAX
- * add "top" channel positions
-
-2006-04-26 09:38 ossman
-
- * : update todo
-
-2006-04-25 07:55 ossman
-
- * : update todo
-
-2006-04-25 07:54 ossman
-
- * : Fall back to software volume if hardware mixer cannot control
- all channels.
-
-2006-04-25 07:13 ossman
-
- * : glibc <= 2.2 has a broken unistd.h, lacking setresuid().
-
-2006-04-24 19:29 lennart
-
- * : * rework reference counting in the client libraries: now
- refcounting goes
- strictly "one-way" - the "bigger" object refcounts the "smaller"
- one, never the
- other way round.
-
- * when registering for a reply packet in pdispatch, specify a
- function that is
- called when the pdispatch object is destroyed but the reply
- hasn't yet been
- recieved.
-
- * move prototype of pa_free_cb from stream.h to def.h
-
-2006-04-24 15:07 ossman
-
- * : chown() and chmod() aren't available on Windows.
-
-2006-04-24 13:59 ossman
-
- * : Undo invalid automake version requirement.
-
-2006-04-23 21:25 lennart
-
- * : fix a segfault when uploading samples with esound
-
-2006-04-23 21:01 lennart
-
- * : * add validity checking for sample_spec, channel_map and
- cvolume structures
- * return PA_ERR_TOOLARGE when the user tries to upload a
- over-sized sample
- * notify the user if uploading a simple faield due to some reason
-
-2006-04-23 20:59 lennart
-
- * : small optimization
-
-2006-04-23 20:59 lennart
-
- * : fix sample uploading
-
-2006-04-23 20:59 lennart
-
- * : enforce maximum sample size in sample cache
-
-2006-04-23 20:58 lennart
-
- * : * fix ref counting of pa_stream: strictly refcount from context
- to stream and never vice versa to make sure that we never loose
- memory
- * don't hit an assert() in case of a timeout events
-
-2006-04-23 20:56 lennart
-
- * : introduce a new error PA_ERR_TOOLARGE
-
-2006-04-23 19:49 lennart
-
- * : * when playing back a sample from the sample cache, just take a
- pa_volume_t and not a pa_cvolume_t as argument for the volume.
- Usually it is not known to the player of theses samples how many
- channels it has, hence it doesn't make any sense to allow him to
- pass a by-channel volume structure here.
- * fix volume calculation when playing samples from the sample
- cache
-
-2006-04-23 19:46 lennart
-
- * : fix multiplication of software pa_cvolumes
-
-2006-04-23 19:42 lennart
-
- * : allow recieving of invalid channel maps, volumes and sample
- specs. This makes handling of uninitialized data better, e.g.
- when sending info about lazy-load sample chache entries, where
- the channel mapping and sample spec is still unknown.
-
-2006-04-23 14:29 lennart
-
- * : * Merge build system patch from Igor Zubkov
- * Build libparseaddr.so before libsocket-client.so
-
-2006-04-22 21:53 lennart
-
- * : remove superfluous "set -ex" line
-
-2006-04-22 21:53 lennart
-
- * : require automake 1.9 in configure.ac
-
-2006-04-22 21:51 lennart
-
- * : modify x11 modules to not cache the Display variable since
- pa_x11wrap_get_display() is now used as notification that the x11
- output buffer needs flushing
-
-2006-04-22 21:50 lennart
-
- * : when loading sound files, initialize channel map data properly
-
-2006-04-22 21:49 lennart
-
- * : fix x11 handling
-
-2006-04-22 21:04 lennart
-
- * : fix sample cache
-
-2006-04-22 20:06 lennart
-
- * : * for unix sockets: remove the right parent directory on
- shutdown
- * other cleanups
-
-2006-04-22 20:05 lennart
-
- * : add new function pa_parent_dir()
-
-2006-04-22 20:04 lennart
-
- * : first unlink the socket, the close it
-
-2006-04-22 20:04 lennart
-
- * : try to remove the directory where the PID file resides in after
- removing the PID file
-
-2006-04-22 14:31 lennart
-
- * : chown() and chmod() /tmp/.esd/ before checking if everything is
- ok with it
-
-2006-04-20 12:53 lennart
-
- * : replace copy by symlink when installing homepage
-
-2006-04-20 12:45 lennart
-
- * : minor improvements to the LICENSE text
-
-2006-04-20 12:40 lennart
-
- * : ship GPL and LGPL files with the tarball
-
-2006-04-20 12:40 lennart
-
- * : add new explaining LICENSE file
-
-2006-04-20 12:33 lennart
-
- * : * rename "LICENSE" to "LGPL"
- * add GPL text
- * update LGPL text in regards to FSF addresses
-
-2006-04-20 07:44 ossman
-
- * : update todo
-
-2006-04-19 15:37 ossman
-
- * : Tweaks for the solaris module. The sound system requires
- complete frames
- to be written. Also, the sample counter can magically go
- backwards sometimes,
- causing havoc with our buffer handling.
-
-2006-04-19 14:30 ossman
-
- * : Sun's documentation about SIGPOLL on EOF:s is wrong, so use a
- timer based
- solution instead.
-
-2006-04-19 11:56 ossman
-
- * : Minor fixes for the way Windows handles sockets.
-
-2006-04-19 11:55 ossman
-
- * : WaveOut needs to have rather large chunks. This is about as low
- as we can
- go without getting underflows.
-
-2006-04-19 11:54 ossman
-
- * : Win32 needs to have the socket subsystem initialised.
-
-2006-04-19 11:53 ossman
-
- * : Having constant deferred events isn't allowed and causes
- problems. Use timers
- instead.
-
-2006-04-19 07:31 ossman
-
- * : Reverse order of IPv6/IPv4 binding to handle systems without
- IPV6_V6ONLY.
-
- System that always do IPV6_V6ONLY will now still bind to both
- sockets, just
- in another order.
-
- System that never do IPV6_V6ONLY will now fail to bind IPv4
- instead of IPv6.
- But since they force IPv6 sockets to accept IPv4 connections,
- everything is
- peachy anyway.
-
-2006-04-18 19:44 lennart
-
- * : make proper use of the muting facility of sinks in
- module-mmkbd-evdev
-
-2006-04-18 19:31 lennart
-
- * : fix a couple of issues I found when compiling polypaudio with
- gcc 2.95
-
-2006-04-18 19:12 lennart
-
- * : fix CFLAGS for jack modules
-
-2006-04-18 18:44 lennart
-
- * : fix "make distccheck" properly
-
-2006-04-18 18:18 lennart
-
- * : fix make distcheck
-
-2006-04-18 17:52 lennart
-
- * : Documentation updates
-
-2006-04-18 17:43 lennart
-
- * : add JACK module documentation
-
-2006-04-18 17:20 lennart
-
- * : fix connecting of jack source in jack daemon
-
-2006-04-18 17:19 lennart
-
- * : build jack source
-
-2006-04-18 16:33 lennart
-
- * : fix code for pre-C99
-
-2006-04-18 15:40 lennart
-
- * : * fix pa_random_seet() function prototype
- * drop pa_ prefix from pa_random_proper(), because it is a static
- function
-
-2006-04-18 15:16 ossman
-
- * : Make the probe for RNG sources at runtime since the configure
- script isn't
- compatible with cross-compiling.
-
-2006-04-18 14:11 ossman
-
- * : Clarify that JACK libs are optional.
-
-2006-04-18 14:09 ossman
-
- * : More fixes caused by Sun's complete inability to follow any
- standard
- whatsoever.
-
-2006-04-18 13:37 ossman
-
- * : update todo
-
-2006-04-18 13:36 ossman
-
- * : We need to emulate sendmsg/recvmsg to support rtp on Windows.
- Will do
- this some time in the future.
-
-2006-04-18 13:36 ossman
-
- * : Avoid including non-portable header sys/poll.h.
-
-2006-04-18 13:22 lennart
-
- * : add a jack source module
-
-2006-04-18 13:20 lennart
-
- * : * allow the user to set the jack client name
- * take the number of channels for the sink from the number of
- physical ports in the jack server
- * name the polypaudio ports in the jack server after their
- channel position in polypaudio
-
-2006-04-18 12:46 ossman
-
- * : C99 requires explicit marking of integer literals' size.
-
-2006-04-17 00:11 lennart
-
- * : add new JACK sink
-
-2006-04-16 17:25 lennart
-
- * : * add pa_mainloop_wakeup() calls for deferred events
- * place pa_mainloop_wakeup() calls a little bit more carfully, to
- minimize needless wakeups.
-
-2006-04-16 16:46 lennart
-
- * : add new API to replace the poll() function used by the main
- loop implementation
-
-2006-04-16 16:45 lennart
-
- * : properly initialize session counter
-
-2006-04-16 13:34 lennart
-
- * : add documentation for the new RTP modules
-
-2006-04-16 12:44 lennart
-
- * : limit number of concurrent RTP streams
-
-2006-04-16 12:44 lennart
-
- * : fix typo in module description
-
-2006-04-16 11:13 lennart
-
- * : change default mcast address once again, to make sure our
- traffic doesn't leave the network by default
-
-2006-04-16 10:59 lennart
-
- * : ignore symdef file of module-rtp-send
-
-2006-04-16 10:56 lennart
-
- * : rename module-rtp-monitor to module-rtp-send
-
-2006-04-16 10:53 lennart
-
- * : * make sure RTP ports are chosen to be even
-
-2006-04-16 09:23 ossman
-
- * : Fix ALSA fd handling to be compatible with blocking deferred
- events.
-
-2006-04-16 09:22 ossman
-
- * : Clarify behaviour of deferred events.
-
-2006-04-16 09:15 lennart
-
- * : * deal properly with underruns, overflows and packet losses
- * change default mcast address
- * detect RTP loops
-
-2006-04-16 09:14 lennart
-
- * : * increase default MTU
- * change default mcast address to 224.0.1.3
- * randomize RTP ports by default
-
-2006-04-16 09:13 lennart
-
- * : replace homegrown endswith() with pa_endswith() from util.h
-
-2006-04-16 09:13 lennart
-
- * : initialize random seed globaly from $RANDOM_DEVICE
-
-2006-04-16 09:12 lennart
-
- * : * add new check for $RANDOM_DEVICE
- * move AC_SYS_LARGEFILE to avoid autoconf warning
-
-2006-04-16 00:18 lennart
-
- * : todo update
-
-2006-04-16 00:16 lennart
-
- * : * add RTP/SAP/SDP reciever module
- * use server cookie as RTP SSRC
- * enable SVN keywords
- * add new option "loop" for RTP sender module
-
-2006-04-15 15:26 lennart
-
- * : * change default multicast address
- * fix timestamp calculation
-
-2006-04-15 15:25 lennart
-
- * : correct some types
-
-2006-04-14 23:49 lennart
-
- * : * ignore some more files
- * make necessary changes to Makefile to compile RTP module
-
-2006-04-14 23:47 lennart
-
- * : add an RTP sender module
-
-2006-04-14 23:46 lennart
-
- * : minor beautification
-
-2006-04-13 19:31 lennart
-
- * : minor doc updates
-
-2006-04-13 19:07 lennart
-
- * : * add a link to Cendio to the README
-
-2006-04-13 18:56 lennart
-
- * : remove yet another item from the todo list! This means we are
- now read for 0.8!
-
-2006-04-13 18:55 lennart
-
- * : unbreak module-tunnel
-
-2006-04-13 18:28 lennart
-
- * : remove yet another item from the todo list
-
-2006-04-13 18:27 lennart
-
- * : include in-flux resampled chunk in latency calculations of
- playback streams
-
-2006-04-13 18:20 lennart
-
- * : fix latency calculations of module-combine
-
-2006-04-13 17:53 lennart
-
- * : hmm, nothing important
-
-2006-04-13 17:33 lennart
-
- * : add code to allow polypaudio dump preloaded modules using
- "--dump-modules"
-
-2006-04-13 17:32 lennart
-
- * : make --enable-force-preopen the default for SVN builds
-
-2006-04-13 17:32 lennart
-
- * : add new configure option to enable preloading even on
- architectures that support dlopen(). Useful for debugging
-
-2006-04-13 15:10 lennart
-
- * : update documentation for release 0.8
-
-2006-04-13 13:46 lennart
-
- * : doc updates
-
-2006-04-13 13:45 lennart
-
- * : more documentation updates
-
-2006-04-13 00:56 lennart
-
- * : Documentation updates
-
-2006-04-12 23:58 lennart
-
- * : remove yet another item from the todo
-
-2006-04-12 23:57 lennart
-
- * : include local record memblockq in latency calculations
-
-2006-04-12 23:55 lennart
-
- * : when storing recording data in file, create file with proper
- access rights
-
-2006-04-12 23:19 lennart
-
- * : yet anotrher fix for slow links
-
-2006-04-12 23:12 lennart
-
- * : small fix to deal properly with slow links
-
-2006-04-12 22:45 lennart
-
- * : * dispatch defer events in pa_mainloop_dispatch() and not
- already in pa_mainloop_prepare()
- * fix the "timeout" parameter of pa_mainloop_prepare()
- * remove pa_mainloop_deferred_pending() and update the simple API
- accordingly
-
-2006-04-12 18:33 lennart
-
- * : * fix latency calculation where a full playback buffer was
- erroneously taken as empty buffer and vice versa.
-
-2006-04-12 17:26 lennart
-
- * : remove a bunch of log messages
-
-2006-04-12 17:18 lennart
-
- * : beefup pacat a little:
- * when -v is passed, show current playback time and latency
- * modify SIGUSR1 behaviour to show only playback time and latency
-
-2006-04-12 17:17 lennart
-
- * : * rename "latency correction" to "write index correction"
- * add read index invalidation code
- * rename "ipol_event" stuff to "auto_timing_update"
- * remove buffer_usec field from pa_timing_info, since it can be
- easily calculated from write_index and read_index anyway
- * add read_index_corrupt field to "pa_timing_info", similar to
- the already existing write_index_corrupt field
- * restart automatic timing update event every time a query is
- issued, not just when the last event elapsed
- * proper invalidation code for pa_stream_flush()
- * do tarsnport/sink/source latency correction for playback time
- only when device is not corked
-
-2006-04-12 17:12 lennart
-
- * : protocol change: don't send stream buffer size in latency
- update. This data is redundant, since it can be calculated from
- write_index - read_index anyway
-
-2006-04-12 17:10 lennart
-
- * : proper validity checking for pa_context_is_pending()
-
-2006-04-12 17:09 lennart
-
- * : when flushin a memblockq, set the write index to the read index
-
-2006-04-12 17:09 lennart
-
- * : todo update
-
-2006-04-10 21:15 lennart
-
- * : unbreak fresh SVN builds
-
-2006-04-10 20:43 lennart
-
- * : return the error code and not just -1 when
- pa_context_is_pending() fails
-
-2006-04-10 20:38 lennart
-
- * : validity checks for pa_context_is_pending()
-
-2006-04-10 19:44 lennart
-
- * : update todo
-
-2006-04-10 19:43 lennart
-
- * : * Beef up latency calculation in module-oss-mmap
- * Add recording latency code for module-oss-mmap
- * other cleanups
-
-2006-04-10 19:42 lennart
-
- * : minor cleanups for OSS module
-
-2006-04-10 19:42 lennart
-
- * : when using record mode, allow file to save data to to be passed
- on the command line
-
-2006-04-10 17:42 lennart
-
- * : todo update
-
-2006-04-10 17:39 lennart
-
- * : * implement PA_STREAM_AUTO_TIMING_UPDATE
- * accept PA_STREAM_NOT_MONOTONOUS properly
-
-2006-04-10 17:38 lennart
-
- * : add new PA_STREAM_AUTO_TIMING_UPDATE
-
-2006-04-10 17:22 lennart
-
- * : Lennart is blind
-
-2006-04-10 17:17 lennart
-
- * : update TODO
-
-2006-04-10 16:40 lennart
-
- * : unbreak last commit from ossman
-
-2006-04-09 19:32 ossman
-
- * : Use the modern Ki/Mi/Gi prefixes to clarify that 1024 is the
- base.
-
-2006-04-09 19:31 ossman
-
- * : Big documentation update. Describe the client API in a more
- tutorial like
- manner.
-
-2006-04-08 00:19 lennart
-
- * : clip volume at PA_VOLUME_NORM for alsa devices
-
-2006-04-08 00:19 lennart
-
- * : add proper volume clipping support for OSS devices
-
-2006-04-08 00:09 lennart
-
- * : when doing software volume adjustments, don't use the volume
- value as linear factor, but pass it through
- pa_sw_volume_to_linear() first.
-
-2006-04-07 23:08 lennart
-
- * : remove another item from the todo list
-
-2006-04-07 23:05 lennart
-
- * : * show flags value when dumping sink/source info in pactl.
- * show volume for sources, too
- * show value of "mute" field for sinks/sources
-
-2006-04-07 23:02 lennart
-
- * : add new introspection data field for sinks/sources: a flags
- field which specifies whether the sink/source supports hw volume
- control and latency querying
-
-2006-04-07 22:46 lennart
-
- * : todo update
-
-2006-04-07 22:45 lennart
-
- * : minor cleanups
-
-2006-04-07 22:28 lennart
-
- * : remove item from TODO list, since it requires the
- SNDCTL_DSP_GETERROR ioctl() which isn't supported by the Linux
- kernel
-
-2006-04-07 21:57 lennart
-
- * : todo update
-
-2006-04-07 21:55 lennart
-
- * : * enable write_index correction and timing interpolation only
- for playback (and record) streams
-
-2006-04-07 21:10 lennart
-
- * : fix pkg-config files
-
-2006-04-07 06:29 ossman
-
- * : Some memcpy arithmetic that wasn't removed when doing the
- redesign to update
- the data pointer instead.
-
-2006-04-07 01:32 lennart
-
- * : remove yet another item from the todo list
-
-2006-04-07 01:31 lennart
-
- * : hdie some more
-
-2006-04-07 01:29 lennart
-
- * : * update docs for reworked latency API
- * rename pa_latency_info to pa_timing_info, since that describes
- better what it is. Most people will only use pa_stream_get_time()
- anyway
-
-2006-04-07 00:25 lennart
-
- * : update simple API for new latency API
-
-2006-04-07 00:25 lennart
-
- * : update pacat.c for new latency API
-
-2006-04-07 00:24 lennart
-
- * : rework latency querying API (this needs more testing)
-
-2006-04-07 00:23 lennart
-
- * : remove queue length field from latency request (server side)
-
-2006-04-06 23:52 lennart
-
- * : * really pass the ipv6 socket server to protocol_new in case of
- ipv6.
- * create the pa_modargs object properly when using TCP
- * other cleanups
-
-2006-04-06 23:31 lennart
-
- * : change pa_gettimeofday() to return a pointer to the struct
- timeval*, instead of an int
-
-2006-04-06 23:28 lennart
-
- * : s/index/idx/, to avoid gcc warning
-
-2006-04-06 23:28 lennart
-
- * : * set IPV6_V6ONLY for IPv6 sockets, to avoid warning when both
- ipv6 and the ipv4 sockets try to bind to the same port
- * enable SO_REUSEADDR only on platforms that support it
-
-2006-04-06 20:17 lennart
-
- * : remove some GCC warnings introduced by improperly casting to
- (char*) instead of (const char*)
-
-2006-03-31 08:54 ossman
-
- * : Fix some warnings caused by size_t having varying size.
-
-2006-03-31 08:34 ossman
-
- * : Large file support. Polypaudio probably doesn't need it, but it
- causes warnings
- when linking libpolyp with applications that do. So this is just
- to make life
- easier for other applications.
-
-2006-03-17 08:16 ossman
-
- * : update todo
-
-2006-03-11 21:26 ossman
-
- * : We no longer guarantee that an operation object is returned.
- Need to tweak
- some parts to handle this.
-
-2006-03-11 21:25 ossman
-
- * : Remember to store the struct with module info.
-
-2006-03-08 13:00 ossman
-
- * : We filled the volume with the wrong channel count (we used the
- input, not
- the output) causing static. Also swapped the comments since they
- were
- misplaced.
-
-2006-03-07 18:29 ossman
-
- * : The extra stream ref actually did some good. Re-add it, but
- with some more
- symmetry, assertions and comments.
-
-2006-03-07 16:04 ossman
-
- * : We've already set an initial reference count of 1 so don't
- count it up again.
-
-2006-03-07 16:02 ossman
-
- * : Trying to listen on an IPv6 socket by default and only do IPv4
- if that fails
- (which it doesn't most of the time) is terribly confusing. What
- the user
- most likely wants is for it to listen to both IPv4 and IPv6 and
- gracefully
- continue if only of them succeed.
-
-2006-03-05 21:00 ossman
-
- * : update todo
-
-2006-03-05 20:59 ossman
-
- * : Fetch sound card name into sink/source description.
-
-2006-03-05 20:18 ossman
-
- * : update todo
-
-2006-03-05 20:18 ossman
-
- * : Volume support in tunnel module.
-
-2006-03-05 18:37 ossman
-
- * : It's safer to set buffer size than to try setting number of
- periods.
-
-2006-03-05 18:35 ossman
-
- * : Return the proper error code so that we get a correct error
- message.
-
-2006-03-05 15:42 ossman
-
- * : Tried to get the volume information even upon init failure.
-
-2006-03-04 21:30 ossman
-
- * : Update module-tunnel to the new protocol.
-
-2006-03-04 17:31 ossman
-
- * : Fix warning caused by missing return in main().
-
-2006-03-04 13:56 ossman
-
- * : update todo
-
-2006-03-04 13:55 ossman
-
- * : Alignment safe protocol handling in esound module.
-
-2006-03-02 21:56 ossman
-
- * : Negotiate protocol version between server and client. Will
- allow smoother
- protocol modifications in the future.
-
-2006-03-02 16:40 ossman
-
- * : The tag argument is no longer unused.
-
-2006-03-02 16:37 ossman
-
- * : Fix warnings on 64-bit systems.
-
-2006-03-02 16:32 ossman
-
- * : Handle the new latency protocol. This is just a quick fix and
- does not
- handle the new memblockq system.
-
-2006-03-02 14:46 ossman
-
- * : typo fix
-
-2006-03-02 14:22 lennart
-
- * : protocol changes for new latency API (partial!)
-
-2006-02-27 09:22 ossman
-
- * : update todo
-
-2006-02-27 09:21 ossman
-
- * : update todo
-
-2006-02-27 09:20 ossman
-
- * : We have both sink and source in this module.
-
-2006-02-27 09:18 ossman
-
- * : Catch volume update events.
-
-2006-02-27 09:09 ossman
-
- * : 64-bit fixes.
-
-2006-02-27 08:58 ossman
-
- * : Fix some signed/unsigned warnings.
-
-2006-02-27 08:57 ossman
-
- * : Function prototype didn't match actual definition.
-
-2006-02-26 21:55 ossman
-
- * : update todo
-
-2006-02-26 21:50 ossman
-
- * : Get notifications about mixer changes from ALSA.
-
-2006-02-26 19:09 ossman
-
- * : Handle ALSA file descriptors more correctly. This means a bit
- more overhead,
- but following their API properly should avoid problems in the
- future.
-
-2006-02-26 17:58 ossman
-
- * : Fix correct default device.
-
-2006-02-26 17:57 ossman
-
- * : Hardware volume support in ALSA modules.
-
-2006-02-24 17:27 lennart
-
- * : move scatter/gather todo item to post-0.8, since it's impact on
- perfomance might not even be worth the effort.
-
-2006-02-24 17:15 lennart
-
- * : todo update
-
-2006-02-24 17:14 lennart
-
- * : * Add new "auth-group=" parameter to protocol-native-unix
- * Rename "public=" argument of protocol-{esound,native} to
- "auth-anonymous"
-
-2006-02-24 16:29 ossman
-
- * : Do an explicit cast to shut up gcc.
-
-2006-02-24 16:28 ossman
-
- * : This wasn't supposed to be checked in.
-
-2006-02-24 16:28 ossman
-
- * : Wrong variable used for port.
-
-2006-02-24 16:27 ossman
-
- * : Tweak the handling of missing credential support so that we
- minimise non-POSIX
- headers in our headers.
-
-2006-02-24 15:12 lennart
-
- * : add support for authentication using SCM_CREDENTIALS
-
-2006-02-24 10:18 ossman
-
- * : Call correct function.
-
-2006-02-24 10:18 ossman
-
- * : Make local function static.
-
-2006-02-24 10:17 ossman
-
- * : Hardware sink mute support.
-
-2006-02-24 09:12 ossman
-
- * : IGAIN is a better choice than IMIX for source volume.
-
-2006-02-24 01:07 lennart
-
- * : todo update
-
-2006-02-24 00:49 lennart
-
- * : todo update
-
-2006-02-24 00:49 lennart
-
- * : add a few more validity checks to protocol-esound
-
-2006-02-23 12:06 ossman
-
- * : Some new additions were mislabeled as '\since 0.9'.
-
-2006-02-23 12:04 ossman
-
- * : Mute switch for sinks and sources. This is independent of the
- volume
- setting (similar to ALSA).
-
-2006-02-23 12:00 ossman
-
- * : update todo
-
-2006-02-23 09:45 ossman
-
- * : update todo
-
-2006-02-23 09:44 ossman
-
- * : Hardware source volume support.
-
-2006-02-23 09:37 ossman
-
- * : inet_pton expects in[6]_addr structures, nothing else.
-
-2006-02-23 09:30 ossman
-
- * : Add inet_pton emulation for platforms that lack it. Only
- support IPv4 at
- this point.
-
-2006-02-23 09:28 ossman
-
- * : Update hardware volume to a correct initial value.
-
-2006-02-23 09:08 ossman
-
- * : Wrong function name.
-
-2006-02-23 09:07 ossman
-
- * : Make sure hardware volume gets a correct initial value.
-
-2006-02-23 08:59 ossman
-
- * : Hardware source volume support in OSS.
-
-2006-02-23 02:29 lennart
-
- * : update todo
-
-2006-02-23 02:29 lennart
-
- * : really ignore pabrowse
-
-2006-02-23 02:28 lennart
-
- * : ignore pabrowse
-
-2006-02-23 02:27 lennart
-
- * : change pa_log() and friends to not require a trailing \n on all
- logged strings
-
-2006-02-23 01:24 lennart
-
- * : simplify tagstruct creation
-
-2006-02-23 01:17 lennart
-
- * : fix source volume adjustment: copy memchunk before changing the
- volume of it
-
-2006-02-22 21:02 lennart
-
- * : enforce maximum memblockq length for clients
-
-2006-02-22 20:45 lennart
-
- * : update todo
-
-2006-02-22 20:44 lennart
-
- * : add listen= parameter to tcp protocol modules
-
-2006-02-22 20:14 lennart
-
- * : todo update
-
-2006-02-22 20:14 lennart
-
- * : pkg-config update
-
-2006-02-22 20:11 lennart
-
- * : revive howl support
-
-2006-02-22 19:00 lennart
-
- * : unbreak Makefile.am
-
-2006-02-22 18:59 lennart
-
- * : todo test
-
-2006-02-22 18:54 lennart
-
- * : rework parameter validity checking in protocol-native server
- side
-
-2006-02-22 18:43 lennart
-
- * : todo update
-
-2006-02-22 15:36 ossman
-
- * : Wrong userdata used to init operation.
-
-2006-02-22 14:11 ossman
-
- * : Support for setting volume on sources.
-
-2006-02-22 09:39 ossman
-
- * : Remove polyplib-error and polyplib-mainloop for requirements.
-
-2006-02-22 00:06 lennart
-
- * : todo update - outline what i consider pre-0.8 and post-0.8
- issues
-
-2006-02-21 23:56 lennart
-
- * : add hw info to description for oss-mmap, too
-
-2006-02-21 23:40 lennart
-
- * : include hw description gathered from /dev/sndstat in
- sink/source description string
-
-2006-02-21 23:34 lennart
-
- * : add new utility function pa_endswith()
-
-2006-02-21 23:34 lennart
-
- * : remove left-over log line in protocol-esound.c
-
-2006-02-21 20:28 lennart
-
- * : todo update
-
-2006-02-21 16:35 ossman
-
- * : update todo
-
-2006-02-21 16:35 ossman
-
- * : Hardware volume support on Windows.
-
-2006-02-21 01:22 lennart
-
- * : fix pacat
-
-2006-02-21 01:09 lennart
-
- * : todo update
-
-2006-02-21 01:08 lennart
-
- * : * Don't build seperate ipv4/ipv6 versions of the protocol
- plugins
- * Instead try IPv6 and if that fails fall back to IPv4
-
-2006-02-21 00:37 lennart
-
- * : todo update
-
-2006-02-21 00:37 lennart
-
- * : * Get rid of libpolyp-mainloop
- * Remove pkg-config file of polyplib-error
-
-2006-02-21 00:16 lennart
-
- * : todo update
-
-2006-02-21 00:14 lennart
-
- * : add hw volume control for module-oss-mmap
-
-2006-02-20 23:59 lennart
-
- * : todo update
-
-2006-02-20 23:58 lennart
-
- * : disable SIGPIPE before calling pa_core_new(), this way the
- warning message is not printed
-
-2006-02-20 23:50 lennart
-
- * : build defer() function in src/polyp/mainloop-signal.c only on
- win32
-
-2006-02-20 23:47 lennart
-
- * : fix snd_pcm_hw_params_set_rate_near() usage
-
-2006-02-20 23:40 lennart
-
- * : build dllmain.c only on win32 (makes gcc shut up a little more)
-
-2006-02-20 23:32 lennart
-
- * : todo update
-
-2006-02-20 23:32 lennart
-
- * : improve error checking in simple API
-
-2006-02-20 23:31 lennart
-
- * : add validity check for the "server" parameter of
- pa_context_connect()
-
-2006-02-20 23:30 lennart
-
- * : fix yet another pa_context_connect() occurance with regards to
- the flags parameter
-
-2006-02-20 23:30 lennart
-
- * : remove a superfluous log line
-
-2006-02-20 23:29 lennart
-
- * : change calls of pa_context_connect() to pass flags arugment
- correctly
-
-2006-02-20 22:41 lennart
-
- * : fix moddir
-
-2006-02-20 22:41 lennart
-
- * : * modify pa_context_exit_daemon() to return a pa_operation
- object
- * add callback prototypes to all introspection functions in
- client lib
- * add proper validity checking and error handling to all
- functions in the client lib
- * other minor cleanups
- * todo update
-
-2006-02-20 17:09 lennart
-
- * : * a lot of doxygen updates
- * s/pa_operation_callback/pa_operation_callback_t/g
- * add more typedefs for function prototypes
- * add API to query the channel map used by a pa_stream
-
-2006-02-20 16:34 lennart
-
- * : todo update
-
-2006-02-20 16:31 lennart
-
- * : add doxygen docs for channel map
-
-2006-02-20 16:24 ossman
-
- * : Add aligment fix in esound to todo.
-
-2006-02-20 16:23 lennart
-
- * : minor doxygen fixes
-
-2006-02-20 16:21 ossman
-
- * : Fix some warnings by making sure we have the right signedness
- on things.
-
-2006-02-20 16:13 ossman
-
- * : Hardware volume support for Solaris.
-
-2006-02-20 16:10 lennart
-
- * : replace "spawn" parameter of pa_context_new() with a proper
- flags parameter
-
-2006-02-20 16:09 lennart
-
- * : explcitily cast strings to make gcc shut up
-
-2006-02-20 16:01 lennart
-
- * : * Make typdefs for the pa_context callback prototypes
- * s/pa_context_notify_cb/pa_context_notify_cb_t/g
-
-2006-02-20 15:55 lennart
-
- * : remove cdecl.h from doxygen docs
-
-2006-02-20 13:59 ossman
-
- * : Fixes for the Solaris detection.
-
-2006-02-20 12:49 ossman
-
- * : Add mute switch to todo.
-
-2006-02-20 12:47 ossman
-
- * : Detect support for Windows' waveout.
-
-2006-02-20 12:42 ossman
-
- * : Detect support for Solaris (/dev/audio).
-
-2006-02-20 10:40 ossman
-
- * : Remove a debug fprintf that was left in.
-
-2006-02-20 10:38 ossman
-
- * : util.c uses some socket functions so we need winsock on
- Windows.
-
-2006-02-20 04:06 lennart
-
- * : update TODO
-
-2006-02-20 04:05 lennart
-
- * : make doxygen ignore PA_CDECL_BEGIN/PA_CDECL_END
-
-2006-02-20 04:05 lennart
-
- * : 1) Add flexible seeking support (including absolute) for memory
- block queues and playback streams
- 2) Add support to synchronize multiple playback streams
- 3) add two tests for 1) and 2)
- 4) s/PA_ERROR/PA_ERR/
- 5) s/PA_ERROR_OK/PA_OK/
- 6) update simple API to deal properly with new peek/drop
- recording API
- 7) add beginnings of proper validity checking on API calls in
- client libs (needs to be extended)
- 8) report playback buffer overflows/underflows to the client
- 9) move client side recording mcalign stuff into the memblockq
- 10) create typedefs for a bunch of API callback prototypes
- 11) simplify handling of HUP poll() events
-
- Yes, i know, it's usually better to commit a lot of small patches
- instead of a
- single big one. In this case however, this would have
- contradicted the other
- rule: never commit broken or incomplete stuff.
-
- *** This stuff needs a lot of additional testing! ***
-
-2006-02-18 14:58 lennart
-
- * : update todo
-
-2006-02-17 17:00 ossman
-
- * : Properly clear members during init.
-
-2006-02-17 16:48 ossman
-
- * : That's a delta parameter, not a size parameter.
-
-2006-02-17 15:42 ossman
-
- * : Have a memblock queue on the client side during recording. This
- makes the
- record callback optional in stead of mandatory.
-
- For applications that wish to retain the old behaviour, simply
- call
- pa_stream_peek() followed by pa_stream_drop() in the callback.
-
-2006-02-17 13:20 ossman
-
- * : Ignore generated win32 binaries.
-
-2006-02-17 13:18 ossman
-
- * : Module needs stuff in libpolypcore.
-
-2006-02-17 13:18 ossman
-
- * : Fix path to poll.h.
-
-2006-02-17 13:11 ossman
-
- * : Fix typo in #ifndef.
-
-2006-02-17 13:08 ossman
-
- * : Integrate error routines into libpolyp. Not much point in
- having this as a
- separate library.
-
-2006-02-17 12:34 ossman
-
- * : Make sure that all polypcore headers are installed.
-
-2006-02-17 12:10 ossman
-
- * : Cleaned up the includes after the restructuring. Indicate which
- headers are
- public and which are internal through <> vs "".
-
-2006-02-17 09:12 ossman
-
- * : Move the util libs to the modules section since they're in that
- directory.
-
-2006-02-17 00:11 lennart
-
- * : fix doxygen
-
-2006-02-16 23:48 lennart
-
- * : include header files in simple.h with <> instead of ""
-
-2006-02-16 23:13 lennart
-
- * : * rename polypcore/subscribe.[ch] to
- polypcore/core-subscribe.[ch] to avoid confusion with
- polyp/subscribe.[ch]
- * same for scache.[ch]
-
-2006-02-16 23:12 lennart
-
- * : shorten include list of utils a little
-
-2006-02-16 23:11 lennart
-
- * : * drop polylib prefix from #define
- * include error.h from polypaudio.h
-
-2006-02-16 23:10 lennart
-
- * : fix compilation of simple API
-
-2006-02-16 22:43 lennart
-
- * : drop polyplib- prefix from client library files
-
-2006-02-16 22:34 lennart
-
- * : make channel naming somewhat RFC2551 compliant
-
-2006-02-16 22:11 lennart
-
- * : add a bunch of simple Makefile in the subdirs, just to make
- compilation with emacs easier
-
- they are not intended to be distributed or anything.
-
-2006-02-16 22:08 lennart
-
- * : move alsa-util.[ch], oss-util.[ch] and howl-wrap.[ch] to the
- modules directory since they are just helper source used
- exclusively by the modules
-
-2006-02-16 21:37 lennart
-
- * : * svn:ignore some files
- * move configuration files to the directories they belong to
- * built esd-compat.sh in the src/ dir
-
-2006-02-16 19:19 ossman
-
- * : Reorganised the source tree. We now have src/ with a couple of
- subdirs:
-
- * daemon/ - Contains the files specific to the polypaudio daemon.
- * modules/ - All loadable modules.
- * polyp/ - Files that are part of the public, application
- interface or
- are only used in libpolyp.
- * polypcore/ - All other shared files.
- * tests/ - Test programs.
- * utils/ - Utility programs.
-
-2006-02-16 01:17 lennart
-
- * : add simple hardware auto detection module
-
-2006-02-16 01:16 lennart
-
- * : Add HAVE_ALSA and HAVE_OSS defines
-
-2006-02-16 01:16 lennart
-
- * : allow polypaudio to startup without any enabled module
-
-2006-02-16 01:15 lennart
-
- * : print ALSA error messages on failure
-
-2006-02-16 01:14 lennart
-
- * : fix warning text
-
-2006-02-15 23:44 lennart
-
- * : todo update
-
-2006-02-14 13:41 ossman
-
- * : Fix api. Setting volume is done through a pa_cvolume struct,
- not a pa_volume_t
- scalar.
-
-2006-02-13 13:37 ossman
-
- * : Add function to "wake up", i.e. interrupt, a running poll().
- This is needed
- when having the poll() in a separate thread.
-
-2006-02-13 13:28 ossman
-
- * : Split mainloop_iterate() into three, distinct parts. Allows for
- more flexible
- use, like having the poll() run in a separate thread.
-
-2006-02-10 12:05 ossman
-
- * : Fix some new alignment bugs in the tagstruct handling.
-
-2006-02-10 08:44 ossman
-
- * : Install the new headers for channels and volume.
-
-2006-02-03 14:39 ossman
-
- * : Let's have just one endian conversion macro suite.
-
-2006-02-03 14:36 ossman
-
- * : Fix endian conversion macros and reformat them to be a bit more
- readable.
-
-2006-02-03 13:33 ossman
-
- * : Use defines and not hard coded values for volume levels. Caused
- incorrect
- volume levels for all esound clients that changed the volume.
-
-2006-02-03 12:23 ossman
-
- * : Volume adjustment must be done _after_ dropping the chunk since
- drop will
- reject a modified chunk.
-
-2006-02-03 09:14 ossman
-
- * : Reverting an incorrect checkin.
-
-2006-01-30 12:58 ossman
-
- * : Fixes for the new infrastructure so that the waveout module
- compiles.
-
-2006-01-30 12:21 ossman
-
- * : Fixes for the new infrastructure so that the solaris module
- compiles.
-
-2006-01-30 11:49 ossman
-
- * : Breaks missing from conversion to a switch statement.
-
-2006-01-30 11:38 ossman
-
- * : Print an error message before aborting.
-
-2006-01-28 01:07 lennart
-
- * : * add variadic function pa_tagstruct_get() and
- pa_tagstruct_put() for parsing/constructing tagstruct records
- * convert some of the tagstruct uses to this new API
-
-2006-01-27 16:30 lennart
-
- * : add support more for up to 16 auxiliary channel positions
-
-2006-01-27 16:25 lennart
-
- * : Mega patch:
-
- * implement inner loops using liboil
- * drop "typeid" stuff
- * add support for channel maps
- * add support for seperate volumes per channel
- * add support for hardware mixer settings (only module-oss
- implements this for now)
- * fix a lot of types for _t suffix
-
-2006-01-27 14:52 ossman
-
- * : Remove the version number from the module directory. Makes life
- easier
- for any external projects that need to use that directory.
-
-2006-01-25 17:27 ossman
-
- * : We get the -lcap through LIBS, so no need for CAP_LIBS.
-
-2006-01-25 17:25 ossman
-
- * : Use AC_SEARCH_LIBS instead of AC_CHECK_LIBS since it is a lot
- smarter and
- doesn't add unnecessary libs.
-
-2006-01-20 10:16 ossman
-
- * : Fix so that peer name can be determined on Windows. We do not
- support console
- on Windows at this time so we do not have to worry about that
- right now.
-
-2006-01-19 10:26 ossman
-
- * : Open the device in non-blocking mode.
-
-2006-01-19 10:24 ossman
-
- * : Ugly hack to get around Solaris particularly brain dead sound
- system.
- The system has a buffer size of 0.5 MB which cannot be changed.
- We emulate
- a smaller buffer through some SIGPOLL trickery.
-
-2006-01-16 13:35 ossman
-
- * : We need a logical, not an arithmetic shift here. So use
- unsigned types when
- doing the shifting.
-
-2006-01-12 17:12 ossman
-
- * : Under win32 we freed the wrong pointer causing a segmentation
- fault.
-
-2006-01-12 16:11 ossman
-
- * : Some crappy hardware generate noise on the output when reading
- input. To
- avoid triggering this needlesly we tweak the algorithm a bit to
- avoid reading
- when nothing is connected to the source.
-
-2006-01-12 16:09 ossman
-
- * : Some drivers (via82xx) doesn't start recording until we read
- something.
- This is ugly, but unfortunately required.
-
-2006-01-12 16:08 ossman
-
- * : Used 0 as an invalid fd. Changed to -1.
-
-2006-01-12 16:04 ossman
-
- * : If the card couldn't do duplex when required we would
- incorrectly return
- success from this function with a closed fd.
-
-2006-01-11 14:36 ossman
-
- * : Many (FSF and Sun at least) have interpreted the C99 standard
- in a way
- that int64_t and similar types are only defined on 64 bit
- platforms. Using
- -std=gnu99 lifts this rather silly restriction.
-
- The HAVE_NETLINK define is not generated anywhere in our
- configure. So it
- was rather pointless to use it for any test.
-
-2006-01-11 14:13 ossman
-
- * : Remove the old compiler flag test now that we have a new shiny
- one.
-
-2006-01-11 14:12 ossman
-
- * : Our makefiles work just fine on older automakes (1.7 tested).
- Let's keep
- this out until we run into something that doesn't work.
-
-2006-01-11 01:17 lennart
-
- * : * remove a lot of compiler warnings introduced by using some
- new GCC flags
- * add typedefs for public structs and enums and drop the
- struct/enum prefixs from all uses where it makes sense
-
-2006-01-10 18:04 lennart
-
- * : build system updates, including support for some newer GCC
- options
-
-2006-01-10 17:51 lennart
-
- * : Merge Pierre's changes
-
-2006-01-09 12:38 lennart
-
- * : improve sync clock change
-
-2006-01-09 12:37 lennart
-
- * : fix synchronized clock change
-
-2005-09-16 00:11 lennart
-
- * : fix alsa memory leak
-
-2005-09-16 00:11 lennart
-
- * : chance ALSA sink to use "default" as default alsa device
-
-2005-09-16 00:09 lennart
-
- * : initialize running_as_daemon
-
-2005-09-16 00:08 lennart
-
- * : increase number of allowed connections
-
-2005-09-16 00:08 lennart
-
- * : add new field running_as_daemon to pa_core
-
-2005-09-16 00:04 lennart
-
- * : add pa_sound_file_too_big_to_cache()
-
-2005-09-16 00:03 lennart
-
- * : handle float values in sound files sensibly
-
-2005-09-16 00:02 lennart
-
- * : print a nice message when libltdl is missing
-
-2005-09-16 00:01 lennart
-
- * :
-
-2005-09-16 00:00 lennart
-
- * : build fix
-
-2005-09-16 00:00 lennart
-
- * : bail out if no sink is defined
-
-2005-09-15 23:50 lennart
-
- * : alter alsa periods number
-
-2005-09-15 23:50 lennart
-
- * : handle EOF in ioline.c
-
-2005-09-15 23:48 lennart
-
- * : remove esound protocol directory on unload of
- module-protocol-esound
-
-2005-09-15 23:47 lennart
-
- * : fix start_timeout()
-
-2005-09-15 23:46 lennart
-
- * : add libsamplerate/libsndfile CFLAGS
-
-2005-01-12 20:22 lennart
-
- * : * fix LIRC configuration
-
-2005-01-12 18:51 lennart
-
- * : * extend HTTP module
-
-2005-01-12 17:37 lennart
-
- * : * make pa_sample_spec_snprint return point to written string
- * first try of a http module
-
-2005-01-11 20:47 lennart
-
- * : * new environment variable $POLYP_LOG
- * fix connection establishing algorithm
- * add timeout for establishing connections
- * add fqdn to the server directive to connect to in browse API
- * quieten ESOUND protocol
-
-2005-01-09 01:11 lennart
-
- * : * add new module module-mmkbd-evdev
- * fix stupid error message in main.c
-
-2005-01-08 22:32 lennart
-
- * : * todo update
- * lirc warning fix
- * c++ compat
-
-2005-01-08 21:43 lennart
-
- * : * increase timeout in pacmd
-
-2005-01-08 21:40 lennart
-
- * : * make lirc program name configurable
-
-2005-01-08 21:36 lennart
-
- * : * add new module for LIRC volume control
-
-2005-01-08 01:19 lennart
-
- * : change doxygen build stuff for better compat with moderm
- automakes
-
-2005-01-08 01:16 lennart
-
- * : update todo list
-
-2005-01-08 01:15 lennart
-
- * : * add support for asynchronous name resolution
- * remove directories listing from doxygen
-
-2005-01-06 01:07 lennart
-
- * : minor fixes
-
-2004-12-18 20:45 lennart
-
- * : fix conditional X11 compilation
-
-2004-12-16 20:08 lennart
-
- * : gcc 2.95 compat
-
-2004-12-15 01:17 lennart
-
- * : * fix error message when starting polypaudio while it is
- already running
-
-2004-12-15 01:04 lennart
-
- * : cleanup zeroconf service names
-
-2004-12-15 01:02 lennart
-
- * : * Publish server info in mDNS in addition to sinks/sources
- * Split off address parser
- * Add port= argument to module-zeroconf-publish
-
-2004-12-14 14:20 lennart
-
- * : do mor daemonizing work
-
-2004-12-14 14:09 lennart
-
- * : * fix daemonizing
-
-2004-12-14 13:17 lennart
-
- * : * prepare polyplib-browse for installation
-
-2004-12-12 22:58 lennart
-
- * : * fix include file names in installed header files
- * add browsing API
- * add new tool pabrowse
- * add typeid subsystem
- * bump API version
- * split off random.c
- * add an identification cookie
-
-2004-12-12 15:56 lennart
-
- * : * complete zeroconf publisher
- * make cli.c shut up unless run with -v
-
-2004-12-11 16:48 lennart
-
- * : * fix alsa initialisation
- * add some missing zeroconf files
- * make module-match shut up a bit
-
-2004-12-11 00:10 lennart
-
- * : * add first part of zeroconf publisher
- * bump version to 0.7.1.
- * improve logging subsystem (introducing log levels)
- * remove verbose flag on cli
- * add new API pa_sample_format_to_string()
- * replace strtol() by usages of pa_atou() and pa_atoi()
-
-2004-11-27 18:50 lennart
-
- * : * really fix integer only resampler
-
-2004-11-27 14:00 lennart
-
- * : * fix autospawn lock file creation
-
-2004-11-26 00:07 lennart
-
- * : * use setresuid() instead of setruid() if available
- * if fix for the non-fp resampler
-
-2004-11-23 13:34 lennart
-
- * : * install fix
- * use syslog as standard log target when run from esdcompat.sh
-
-2004-11-23 13:00 lennart
-
- * : * some fixes for MacOS X by Conrad Parker
- * Minor build fixes
-
-2004-11-21 22:25 lennart
-
- * : prepare for release
-
-2004-11-21 22:07 lennart
-
- * : Documentation updates
-
-2004-11-21 21:31 lennart
-
- * : Comment some more files
-
-2004-11-21 19:47 lennart
-
- * : * make --help fit in 80 columns terminal
-
-2004-11-21 19:40 lennart
-
- * : * update todo
-
-2004-11-21 19:39 lennart
-
- * : calculate buffer sizes from sample spec
-
-2004-11-21 18:41 lennart
-
- * : * create parec as link to pacat
-
-2004-11-21 18:15 lennart
-
- * : * new tool pacmd
- * fix pacat/paplay/pactl for new API version
- * fix memory leak in pa_ioline
-
-2004-11-21 17:06 lennart
-
- * : bump version number
-
-2004-11-21 17:02 lennart
-
- * : * add some missing "static"s
- * include libltdl in distribution
-
-2004-11-21 16:27 lennart
-
- * : fixes for bugs found when compiling with gcc 2.95
-
-2004-11-21 15:22 lennart
-
- * : * fix the trivial resampler
-
-2004-11-21 13:18 lennart
-
- * : * PID and lock file fixes
-
-2004-11-21 02:43 lennart
-
- * : some commenting
-
-2004-11-21 00:04 lennart
-
- * : * some minor pid file fixes
-
-2004-11-20 23:48 lennart
-
- * : * remove autospawn lock file usage
- * fix some compiler warnings
- * implement PID file support
-
-2004-11-20 22:17 lennart
-
- * : option to use ALSA default fragment number and size
-
-2004-11-20 16:23 lennart
-
- * : * add µlaw/alaw support
- * abstracted resampler API
- * add integer-only resampler ("trivial")
- * show used resampler wherever useful
- * add mixing/volume adjusting for float32ne and u8
-
-2004-11-18 20:50 lennart
-
- * : * some iochannel fixes
- * introduce reference counting in ioline
- * fix memory leak in socket-client.c
- * fix double-free error in protocol-esound.c
-
-2004-11-18 00:28 lennart
-
- * : limit the number of concurrent connections for all four
- protocols
- kick a client if it doesn't authenticate within 5s on ESD and
- native protocol
-
-2004-11-17 23:11 lennart
-
- * : minor fixes for latency interpolation
-
-2004-11-17 03:10 lennart
-
- * : todo update
-
-2004-11-17 01:22 lennart
-
- * : fix module-tunnel.c
-
-2004-11-17 01:22 lennart
-
- * : update todo list
-
-2004-11-17 01:04 lennart
-
- * : * fix a long standing bug in ioline.c (large prints failed)
- * fix a bug regarding ipv6 binding
-
-2004-11-17 00:05 lennart
-
- * : * some commenting work
- * add new field "read_only" to memory blocks
- * add new API function pa_context_get_server()
- * filter capture data through mcalign on client
- * make module-tunnel use pa_socket_client_new_string() instead of
- using pa_resolve_server() directly.
- * remove pa_resolve_server()
- * remove debug.h and replace it by a macro definition on the gcc
- command line
- * some strbuf cleanups
- * small fixes in pa_stream for cleanup when server dies
- * new CLI command "load-sample-dir-lazy"
- * send FQDN as part of server info
- * rework mcalign, this time with memory block merging
- * fix iochannel cleanup when connection dies
- * check getaddrinfo() results
-
-2004-11-14 14:59 lennart
-
- * : todo update
-
-2004-11-14 14:58 lennart
-
- * : Make the whole stuff LGPL only
-
-2004-11-14 02:36 lennart
-
- * : * implement module-esound-sink
-
-2004-11-14 00:04 lennart
-
- * : * remove as superfluous assert() in polyplib-stream which broke
- the gstreamer plugin
- * fix module-tunnel meta info
-
-2004-11-12 00:42 lennart
-
- * : remove a debug message
-
-2004-11-11 21:18 lennart
-
- * : add username to runtime directory name in /tmp/
- rework autospawning code and x11 credential publishing
- add support for IPv6
- reenable LOWDELAY for tcp sockets
-
-2004-11-09 23:19 lennart
-
- * : split out x11prop.[ch]
- add client support for auth daemon info in X display
-
-2004-11-09 01:04 lennart
-
- * : use fqdn in module-x11-publish as well
-
-2004-11-09 00:14 lennart
-
- * : export FQDN instead of hostname
-
-2004-11-08 23:53 lennart
-
- * : build pax11publish only when X11 is available
-
-2004-11-08 23:48 lennart
-
- * : implemented pax11publish.c
-
-2004-11-07 20:48 lennart
-
- * : * Look for M4 in configure.ac
- * Share auth cookies in module-tunnel.c, module-x11-publish.c and
- native-protocol.c
- * disable TCP_NODELAY
- * publish auth cookie in module-x11-publish
-
-2004-11-04 21:27 lennart
-
- * : some commenting
- change alogrithm for checking for configuration files
-
-2004-11-04 20:01 lennart
-
- * : compilation fix
-
-2004-11-04 18:57 lennart
-
- * : add some more comments
-
-2004-11-04 18:56 lennart
-
- * : fix client libaryr in case no latency interpolation is required
-
-2004-11-01 23:37 lennart
-
- * : Apply Joe Marcus Clarke's FreeBSD patches
-
-2004-10-30 01:55 lennart
-
- * : some updates for pa_hashmap
- add property infrastructure
- add module module-x11-publish
- allow ldpreloading of all modules
- abstract x11wrap from module-x11-bell
-
-2004-10-29 13:50 lennart
-
- * : use setreuid() instead of setuid()/seteuid() when dropping root
- chdir to / on daemon startup
- (both are suggestions by alan cox)
-
-2004-10-28 14:41 lennart
-
- * : require newer libsndfile
- update todo file
-
-2004-10-27 22:43 lennart
-
- * : prepare next release 0.6
-
-2004-10-27 16:23 lennart
-
- * : make autoload list use idxset
-
-2004-10-27 14:46 lennart
-
- * : minor updates
-
-2004-10-27 14:45 lennart
-
- * : update todo
-
-2004-10-27 14:42 lennart
-
- * : add null sink
-
-2004-10-27 14:14 lennart
-
- * : latency calculation fix
-
-2004-10-27 01:09 lennart
-
- * : two latency interpolation fixes
-
-2004-10-27 00:10 lennart
-
- * : support for latency interpolation
-
-2004-10-24 00:48 lennart
-
- * : add user volume API
-
-2004-10-12 21:52 lennart
-
- * : gcc 2.95 fix
- default.pa fix
-
-2004-10-11 16:21 lennart
-
- * : enlarge default buffers
-
-2004-10-01 12:48 lennart
-
- * : todo update
-
-2004-09-29 22:04 lennart
-
- * : add sample spec parameters to pacat
-
-2004-09-29 20:13 lennart
-
- * : Add support for libwrap
-
-2004-09-29 19:13 lennart
-
- * : really fix API version API
-
-2004-09-29 17:38 lennart
-
- * : renamed module-tunnel to module-tunnel-sink
- new module module-tunnel-source
- fix recording
-
-2004-09-28 23:52 lennart
-
- * : fix module-tunnel for to aborting when connection fails
-
-2004-09-28 23:49 lennart
-
- * : add latency measurement support to tunnel module
-
-2004-09-28 22:47 lennart
-
- * : Add module-tunnel
- add proper locking when autospawning a daemon
-
-2004-09-27 21:05 lennart
-
- * : try to use file sample type for cache entries and play-file
- playback
- allow paplay to use STDIN
- add new module: module-match
-
-2004-09-27 17:21 lennart
-
- * : really fix cpu usage when using esddsp with polypaudio
-
-2004-09-27 15:40 lennart
-
- * : add POSIX locking to authkey.c
- fix esound protocol cpu consumption when finishing a stream
-
-2004-09-26 22:27 lennart
-
- * : add new tool paplay
-
-2004-09-26 17:02 lennart
-
- * : bum version number
- add new macro PA_API_VERSION for preprocessor level conditional
- compiling
- add new native APIs:
- - counter
- - cork & flush for record streams
- - add flags parameters to pa_stream_connect_xx()
- - new prebuf command
- - time api, and total latency calculator
- - return sample spec
- ability to cork source output streams
- dump server status on SIGHUP to syslog
- show sink input/source outputs status in cli-text.c
- don't flush esound output buffer when client disconnects
- move version api to polyplib-version.h
-
-2004-09-23 23:26 lennart
-
- * : bump version number and update documentation
-
-2004-09-23 22:42 lennart
-
- * : allow high priority scheduling only for users in group
- "realtime"
-
-2004-09-23 20:42 lennart
-
- * : ignore default.in
-
-2004-09-23 20:41 lennart
-
- * : place full binary path in default.pa's shebang line
-
-2004-09-23 16:33 lennart
-
- * : Fix a bug in the build system reported by Iain Fothergill
-
-2004-09-23 15:57 lennart
-
- * : OSX protability patches from Conrad Parker
-
-2004-09-23 15:47 lennart
-
- * : add support for capabilities
-
-2004-09-21 20:46 lennart
-
- * : improve esound module
-
-2004-09-21 19:40 lennart
-
- * : support for esd arguments: -spawnpid and -spawnfd
-
-2004-09-21 19:00 lennart
-
- * : add noop implementation of standby/resume ESOUND commands
-
-2004-09-21 18:43 lennart
-
- * : show which command is unknown in esound protocol
- fix esdcompat.sh
-
-2004-09-20 22:22 lennart
-
- * : add link to mailing list
-
-2004-09-20 21:03 lennart
-
- * : build updates
-
-2004-09-20 20:52 lennart
-
- * : documentation update
-
-2004-09-20 19:37 lennart
-
- * : fix xmms spawn bug
-
-2004-09-20 17:19 lennart
-
- * : update module descriptions
-
-2004-09-19 23:12 lennart
-
- * : remove obnoxious assert from module-combine
- tagstruct: add support for NULL strings
- improve pactl
- correct pa_bytes_snprint()
- pa_sample_spec_snprint(): don't fail on invalid sample spec
- rename PA_SAMPLE_SNPRINT_MAX_LENGTH to PA_SAMPLE_SPEC_SNPRINT_MAX
-
-2004-09-19 00:03 lennart
-
- * : add new function pa_mainloop_deferred_pending()
-
-2004-09-18 23:40 lennart
-
- * : add pacat command line parsing
-
-2004-09-18 12:38 lennart
-
- * : work around gcc 2.95 limitation
-
-2004-09-18 12:28 lennart
-
- * : work around gcc 2.95 limitation
-
-2004-09-17 23:45 lennart
-
- * : minor stuff
-
-2004-09-17 21:17 lennart
-
- * : change sysconf path
-
-2004-09-17 21:10 lennart
-
- * : add resample_method option module-combine
-
-2004-09-17 20:43 lennart
-
- * : add --resample-method argument
-
-2004-09-17 20:08 lennart
-
- * : rename some more
-
-2004-09-17 20:06 lennart
-
- * : rename some stuff
-
-2004-09-17 19:52 lennart
-
- * : make daemon.conf/client.conf autogenerated
-
-2004-09-17 19:45 lennart
-
- * : new configuration subsystem
-
-2004-09-16 23:43 lennart
-
- * : update according to autoscan
-
-2004-09-16 23:34 lennart
-
- * : gcc 2.95 compatibility, take 2
-
-2004-09-16 22:44 lennart
-
- * : fix two gcc 2.95 incompatibilities
-
-2004-09-16 22:07 lennart
-
- * : add support for subscribing to autoload table changes
- fix module-combine so that the sample rate of at least one
- streams is not changed from the original
-
-2004-09-16 00:05 lennart
-
- * : add input latency measurement
- add GETOSPACE support to module-oss
-
-2004-09-15 19:16 lennart
-
- * : work around C99/GCC incompatibility
- native protocol:
- add "local" field to pa_context
- add volume paramter to pa_stream_connect_playback
- add support for renaming streams/clients
- support lazy samples
- add functions to kill clients/source inputs/sink outputs
- add functions for loading/unloading modules
- add autoload management API
-
-2004-09-15 14:05 lennart
-
- * : remove auto-load-sample stuff
- introduce "lazy samples"
-
-2004-09-15 13:03 lennart
-
- * : correct autospawning
-
-2004-09-14 23:08 lennart
-
- * : make module-combine autoloadable
- clean up cli language
- introduce lazy sample cache
-
-2004-09-14 20:53 lennart
-
- * : add refernce counting for sinks, sources, sink-inputs and
- source-outputs
-
-2004-09-14 17:52 lennart
-
- * : add module-combine
- remove option "stay-root"
- clean up pa_conf
-
-2004-09-13 23:28 lennart
-
- * : new configuration subsystem
-
-2004-09-13 13:26 lennart
-
- * : correct latency calculation
-
-2004-09-13 00:28 lennart
-
- * : fix parsing of POLYP_SERVER environment variable
-
-2004-09-12 23:40 lennart
-
- * : fix public= on native and esound protocol
-
-2004-09-12 23:29 lennart
-
- * : build system update
-
-2004-09-12 19:37 lennart
-
- * : update simple API
-
-2004-09-12 13:14 lennart
-
- * : extend pa_usec_t to 64 bit
-
-2004-09-11 23:17 lennart
-
- * : add modinfo support
-
-2004-09-11 00:03 lennart
-
- * : add version number to library names
-
-2004-09-10 22:35 lennart
-
- * : add support for module search path as command line argument
- protocol-native: move first data request into ack of stream
- creation
- improve mainloop API: return the number of dispatched sources on
- iterate()
- fix a resampling bug
- introduce network latency measurement
-
- WARNING: all these changes together may break some applications
-
-2004-09-08 00:08 lennart
-
- * : add FAQ to homepage
-
-2004-09-07 23:01 lennart
-
- * : date fix
-
-2004-09-07 22:40 lennart
-
- * : documentation update
-
-2004-09-07 17:06 lennart
-
- * : implemented new CLI command: dump
- add prefork() and postfork() arguments to
- pa_context_connect_spawn()
-
-2004-09-07 14:58 lennart
-
- * : change the way the default sink/source is selected
-
-2004-09-06 21:55 lennart
-
- * : add support for setting/getting default sink/source via native
- protocol
-
-2004-09-06 18:55 lennart
-
- * : correct a recording bug in native protocol
-
-2004-09-06 17:47 lennart
-
- * : add module-pipe-source
-
-2004-09-05 00:03 lennart
-
- * : implement proper logging
-
-2004-09-04 00:27 lennart
-
- * : add support for automatic termination of the daemon after the
- last client quit
- remove all gcc warnings
- add boolean types for tagstruct and modargs
-
-2004-09-03 22:44 lennart
-
- * : add option to disallow module loading after startup
-
-2004-09-03 20:14 lennart
-
- * : add CPU load limiter
-
-2004-09-01 22:46 lennart
-
- * : add total sample cache size to statistics
- add size to sample cache entry info
-
-2004-09-01 22:36 lennart
-
- * : make use F_CLOEXEC wherever useful
-
-2004-09-01 21:12 lennart
-
- * : daemon auto spawn
-
-2004-09-01 17:36 lennart
-
- * : add esd compatible startup script
- add default configuration script
-
-2004-09-01 15:55 lennart
-
- * : add sound file streaming
-
-2004-09-01 15:00 lennart
-
- * : introduce sink input and source output limits
-
-2004-09-01 13:04 lennart
-
- * : add PA_MININFTY
-
-2004-09-01 12:51 lennart
-
- * : cleanup comment
-
-2004-09-01 12:49 lennart
-
- * : add \since to dB functions
-
-2004-09-01 12:48 lennart
-
- * : add support for dB volumes
-
-2004-09-01 12:21 lennart
-
- * : implement missing scache_get_id_by_name
- add some more consts to idxset
- add module-sine, a sine generating sink_input module
-
-2004-09-01 00:46 lennart
-
- * : remove most -W compiler warnings
-
-2004-09-01 00:23 lennart
-
- * : add support for SCHED_FIFO
-
-2004-08-27 19:06 lennart
-
- * : fix module path
-
-2004-08-27 18:55 lennart
-
- * : fix homepage script
-
-2004-08-27 18:52 lennart
-
- * : minor fixes
-
-2004-08-27 18:41 lennart
-
- * : readme update (licensing)
-
-2004-08-27 18:38 lennart
-
- * : add LGPL/GPL to dist package
-
-2004-08-27 18:38 lennart
-
- * : relicense client library to LGPL
-
-2004-08-27 17:03 lennart
-
- * : document every polyplib function
-
-2004-08-27 16:24 lennart
-
- * : minor cleanups
-
-2004-08-27 01:29 lennart
-
- * : latency work
- major main loop bugfix
-
-2004-08-23 18:48 lennart
-
- * : minor documentation update
-
-2004-08-22 21:13 lennart
-
- * : new features:
- future cancellation
- corking
- flushing
- for playback streams in native protocol
-
-2004-08-20 20:30 lennart
-
- * : add pkg config file glib12-mainloop
-
-2004-08-20 20:20 lennart
-
- * : add support for glib12
-
-2004-08-20 13:18 lennart
-
- * : documentation update
-
-2004-08-20 13:06 lennart
-
- * : documentation update
-
-2004-08-20 11:08 lennart
-
- * : doxygen fix
-
-2004-08-20 11:05 lennart
-
- * : readme update
-
-2004-08-20 11:04 lennart
-
- * : Doxygen stuff
-
-2004-08-20 10:54 lennart
-
- * : build fixes
-
-2004-08-19 23:14 lennart
-
- * : move sample cache to namereg
- documentation
-
-2004-08-19 06:24 lennart
-
- * : minor stuff
-
-2004-08-18 01:00 lennart
-
- * : add version routines to polyplib
-
-2004-08-17 19:47 lennart
-
- * : add missing copyright headers
-
-2004-08-17 19:37 lennart
-
- * : remove global memblock statistic variables in favor of
- memblock_stat objects
-
-2004-08-17 18:53 lennart
-
- * : fix x11 build
- disable prebuf on drain
-
-2004-08-17 17:57 lennart
-
- * : todo update
-
-2004-08-17 17:56 lennart
-
- * : autoconf beefup
- build fixes
-
-2004-08-17 17:17 lennart
-
- * : Documentation work
- add pkg-config support for GLIB main loop
-
-2004-08-17 13:30 lennart
-
- * : remove native-common-internal
-
-2004-08-17 13:28 lennart
-
- * : create native-common-internal.h
-
-2004-08-17 13:00 lennart
-
- * : update todo file
-
-2004-08-17 13:00 lennart
-
- * : make clitext to cli-text renaming complete
-
-2004-08-17 12:49 lennart
-
- * : rename clitext to cli-text
-
-2004-08-16 20:16 lennart
-
- * : fix sink iunput and source output stuff
-
-2004-08-16 19:55 lennart
-
- * : add sink input/source output support to the native protocol
-
-2004-08-15 13:15 lennart
-
- * : add support for volume manipulation
-
-2004-08-15 00:02 lennart
-
- * : proper ref counting for more objects
- some documentation update
-
-2004-08-14 20:25 lennart
-
- * : implement proper refcounting in polyplib
- split polyplib to multiple modules
- add some prelimenary documentation
- add doxygen support
-
-2004-08-13 16:05 lennart
-
- * : rename polyplib-sample to polyplib-scache
-
-2004-08-13 13:27 lennart
-
- * : add polyplib-sample.c
-
-2004-08-13 13:26 lennart
-
- * : add polyplib-sample
-
-2004-08-13 13:24 lennart
-
- * : add internal header file for polyplib
-
-2004-08-13 13:22 lennart
-
- * : split polyplib.h
-
-2004-08-13 13:14 lennart
-
- * : some preliminary cleanup
-
-2004-08-12 23:27 lennart
-
- * : todo fix
-
-2004-08-12 23:25 lennart
-
- * : add more subscription events
- add support for clients/modules in native protocol
-
-2004-08-11 15:11 lennart
-
- * : info and subscription work
-
-2004-08-11 00:12 lennart
-
- * : todo update
-
-2004-08-11 00:11 lennart
-
- * : add subscription subsystem
-
-2004-08-10 15:11 lennart
-
- * : compile fix
-
-2004-08-10 13:00 lennart
-
- * : glib mainloop fix
- implement server status command
- support for sink_list/source_list in polyplib
-
-2004-08-07 10:52 lennart
-
- * : better mainloop test build system
-
-2004-08-07 10:43 lennart
-
- * : rename mainloop testing tool
-
-2004-08-07 10:42 lennart
-
- * : cleanup priority management in main loop
-
-2004-08-06 23:07 lennart
-
- * : add mainloop test utility
- fix glib mainloop support
-
-2004-08-05 19:53 lennart
-
- * : add initial glib mainloop adapter
- clean up mainloop API
-
-2004-08-04 16:42 lennart
-
- * : forgot some files
-
-2004-08-04 16:39 lennart
-
- * : introduce pa_xmalloc() and friends
- implement module auto loading
-
-2004-08-03 19:26 lennart
-
- * : sample cache work
-
-2004-08-02 19:45 lennart
-
- * : add support for querying sample ist with esound protocol
-
-2004-08-02 16:24 lennart
-
- * : add new module "module-x11-bell"
- fix scache memory leak
-
-2004-07-20 01:08 lennart
-
- * : add a todo item
-
-2004-07-20 01:07 lennart
-
- * : sample cache work
-
-2004-07-18 14:19 lennart
-
- * : minor fixes
-
-2004-07-17 16:00 lennart
-
- * : readme update
-
-2004-07-17 15:48 lennart
-
- * : two simple fixes
-
-2004-07-17 15:44 lennart
-
- * : some makefile fixes
-
-2004-07-17 15:22 lennart
-
- * : make distcheck clean
-
-2004-07-17 15:00 lennart
-
- * : make polypaudio run when installed
- update docs
-
-2004-07-17 14:14 lennart
-
- * : fix Makefile.am and configure.ac to match directory renaming
-
-2004-07-17 14:12 lennart
-
- * : rename src to polyp
-
-2004-07-17 14:09 lennart
-
- * : rename configuration file
- make sure the todo file is packaged
-
-2004-07-17 14:08 lennart
-
- * : move todo file
-
-2004-07-17 14:08 lennart
-
- * : ignore README
-
-2004-07-17 14:06 lennart
-
- * : add documentation
-
-2004-07-16 20:58 lennart
-
- * : add pkgconfig stuff
-
-2004-07-16 20:02 lennart
-
- * : add missing liecenses
-
-2004-07-16 19:56 lennart
-
- * : include copyright and svn tag in *.[ch]
-
-2004-07-16 19:16 lennart
-
- * : include config.h in every file
-
-2004-07-16 19:08 lennart
-
- * : fix distcheck
-
-2004-07-16 18:58 lennart
-
- * : adjust file references due to renaming
-
-2004-07-16 18:40 lennart
-
- * : rename a bunch of files
-
-2004-07-16 17:56 lennart
-
- * : make a symbol in module-ptorocol-stub static
-
-2004-07-16 17:51 lennart
-
- * : make oss sample spec configurable
-
-2004-07-16 17:03 lennart
-
- * : implement alsa source
- split off alsa-util.c
-
-2004-07-16 14:43 lennart
-
- * : split PA_SAMPLE_FLOAT32 into PA_SAMPLE_FLOAT{LE,BE}
- add more configuration arguments to alsa sink
-
-2004-07-16 00:27 lennart
-
- * : add alsa sink
-
-2004-07-15 21:51 lennart
-
- * : optimize esound latency for xmms
-
-2004-07-15 21:18 lennart
-
- * : implement get_latency native command
-
-2004-07-15 20:51 lennart
-
- * : add pactl tool
-
-2004-07-15 20:12 lennart
-
- * : remove global exported variables:
- pa_memblock statistics
- pa_default_sample_spec
-
-2004-07-15 19:00 lennart
-
- * : implement daemonizing
-
-2004-07-15 17:33 lennart
-
- * : fix modargs memory leak
-
-2004-07-15 00:16 lennart
-
- * : implement client side TCP support
-
-2004-07-14 22:48 lennart
-
- * : update todo
- fix polypaudio.run
-
-2004-07-14 21:52 lennart
-
- * : complete implementation of the command line
-
-2004-07-12 21:28 lennart
-
- * : add preliminary command line parsing
-
-2004-07-11 23:21 lennart
-
- * : make module-oss-* use modargs
-
-2004-07-11 22:20 lennart
-
- * : make the protocol plugins make use of modargs
-
-2004-07-11 16:59 lennart
-
- * : rename hashset to hashmap
- add module arguments parse in modargs.c
- make module-pipe-sink use it
-
-2004-07-11 01:09 lennart
-
- * : add dependency script
- fix some dependencies
- split off socket-util.c and clitext.c
-
-2004-07-10 20:56 lennart
-
- * : add description field for sinks/sources
- add owner field to all entities
- add client file to source outputs and sink inputs
-
-2004-07-10 19:23 lennart
-
- * : make memblockq merge chunks
-
-2004-07-10 19:06 lennart
-
- * : forgot to add parec-simple
-
-2004-07-10 19:04 lennart
-
- * : implement parec-simple and matching simple recording API
- add support for killing source outputs in native protocol
- fix channel management in client library
-
-2004-07-10 16:50 lennart
-
- * : implement recording in native API
- fix a memory leak in memblock.c
-
-2004-07-09 23:26 lennart
-
- * : fix recording for simpel and esound protocols
-
-2004-07-07 22:02 lennart
-
- * : add output stream draining
-
-2004-07-07 00:22 lennart
-
- * : draining ind native protocol
- fixes in callback code on object destruction
- simple protocol
-
-2004-07-06 00:08 lennart
-
- * : auth support in esound and native
- AUTH and SET_NAME operatins in native
- simple library
-
-2004-07-04 17:40 lennart
-
- * : add kill_* and default_* commands to CLI
- make module-cli unload itself on EOF
- clean up stdio usage
- add sink pointer to monitor sources
-
-2004-07-03 23:35 lennart
-
- * : add pa_ prefix to all identifiers.
- fix downsampling/resampling
- add support for U8 samples
-
-2004-07-03 00:32 lennart
-
- * : fix minor typo
-
-2004-07-03 00:20 lennart
-
- * : add libsamplerate dependency
-
-2004-07-03 00:19 lennart
-
- * : forgot to add memchunk.[ch]
-
-2004-07-03 00:19 lennart
-
- * : add resampling
-
-2004-07-02 18:47 lennart
-
- * : add resampler
-
-2004-06-30 00:00 lennart
-
- * : latency
- esound volume changing
-
-2004-06-29 20:37 lennart
-
- * : volume work
-
-2004-06-29 18:50 lennart
-
- * : extended esound protocol
-
-2004-06-29 16:48 lennart
-
- * : esound protocol
-
-2004-06-27 22:42 lennart
-
- * : add name registrar
-
-2004-06-27 20:00 lennart
-
- * : make native playback work
-
-2004-06-27 17:50 lennart
-
- * : many fixes
-
-2004-06-24 23:27 lennart
-
- * : some fixes
-
-2004-06-23 23:43 lennart
-
- * : make rename of oss.[ch] to oss-util.[ch] complete
-
-2004-06-23 23:40 lennart
-
- * : rename oss.[ch] to oss-util.[ch]
-
-2004-06-23 23:38 lennart
-
- * : minor compile work
-
-2004-06-23 23:18 lennart
-
- * : ignore some more stuff
-
-2004-06-23 23:17 lennart
-
- * : main part of the native protocol
-
-2004-06-20 01:12 lennart
-
- * : partial implementation of native protocol
-
-2004-06-19 19:28 lennart
-
- * : mofiy keyword expansion
-
-2004-06-19 19:27 lennart
-
- * : cli protocol
-
-2004-06-19 18:51 lennart
-
- * : rename module-simple-protocol to module-protocol-stub
-
-2004-06-19 18:51 lennart
-
- * : minor work
-
-2004-06-19 18:41 lennart
-
- * : add simple ptorocol with unix
-
-2004-06-19 01:01 lennart
-
- * : some more work on the cli
-
-2004-06-18 17:12 lennart
-
- * : some more work
-
-2004-06-18 00:22 lennart
-
- * : basic cli interface
-
-2004-06-16 00:05 lennart
-
- * : configure fix
-
-2004-06-16 00:05 lennart
-
- * : got mmap oss output working
-
-2004-06-15 17:19 lennart
-
- * : fix mixing
-
-2004-06-15 17:05 lennart
-
- * : cleanup
-
-2004-06-15 15:18 lennart
-
- * : more work
-
-2004-06-15 15:17 lennart
-
- * : minor work
-
-2004-06-15 00:29 lennart
-
- * : oss output works
-
-2004-06-14 22:47 lennart
-
- * : rename some more
-
-2004-06-14 22:47 lennart
-
- * : commit some work and rename
-
-2004-06-14 20:34 lennart
-
- * : remove oss.c
-
-2004-06-14 20:30 lennart
-
- * : more cleanups
-
-2004-06-14 18:38 lennart
-
- * : a bunch of fixes
-
-2004-06-11 21:30 lennart
-
- * : remove moddep files (since they are obsolete)
-
-2004-06-11 21:30 lennart
-
- * : make the whole stuff run and clean it self up again
-
-2004-06-11 17:18 lennart
-
- * : module dependencie foo
-
-2004-06-11 12:01 lennart
-
- * : ignore fix
-
-2004-06-11 00:33 lennart
-
- * : autoconf
-
-2004-06-10 23:22 lennart
-
- * : make it compile
-
-2004-06-08 23:54 lennart
-
- * : initial commit
-
-2004-06-08 21:50 lennart
-
- * : Create trunk directory
+2008-10-06 Lennart Poettering
+ fa93cb7: make distcheck pass
+ e26ffc9: Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
+ be667af: Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
+ 0274651: bump version and sonames
+ f64d6af: Merge commit 'vudentz/master'
+ aa43739: make sure we send a started messages when we are uncorking
+
+2008-10-05 Lennart Poettering
+ 5996f59: update module-tunnel for recent protocol changes
+ f728e9c: disable valgrind macro usage for now since valgrind generates a lot of spurious warnings as it seems
+ 6d52a41: add missing include
+
+2008-10-04 Lennart Poettering
+ a9c1bb3: substract the unused record buffer size from the overall size before calculating the space still left for recording
+ 83b1d7a: get rid of pa_alsa_volume_divide() since we have pa_sw_volume_divide() now
+ da4ad5e: implement pa_sw_volume_divide() and pa_sw_cvolume_divide()
+ 87c8132: increase suspend timeout to 5s so that it is always longer then the default tsched buffer size of 2s
+ 530b95f: don't call snd_pcm_drain() when we suspend because that might take awfully long with our long buffer sizes these days
+ 88130eb: add missing inclusion
+ 82c46f2: do not cleanup staticly allocated memory unless we are in valgrind mode
+ 3c19352: show valgrind status on startup
+ 9b00664: instead of checking for directly use new function pa_in_valgrind()
+ 8222f12: add new API function pa_in_valgrind() to check for
+
+2008-10-03 Luiz Augusto von Dentz
+ fef63d7: Fix loading module-bluetooth-device with an invalid parameter.
+ 0c998b0: Replace handlers of deprecated Connected signals with new PropertyChanged.
+
+2008-10-01 Luiz Augusto von Dentz
+ b205fcc: Cleanup module-bluetooth-discover.
+ 20f68bc: Fix Connected signal handler.
+ 04677cb: Fix match rule problems.
+ 0be845f: Remove PropertyChanged signal handler.
+ 3b427b7: Add signal handlers for Connected signals.
+ 443ea47: Add match rules for org.bluez.Headset and org.bluez.AudioSink.
+
+2008-10-03 Lennart Poettering
+ 7a1a147: rename pa_cvolume_snprint_dB to pa_sw_cvolume_snprint_dB since it is
+ c0815de: allow - in sample names
+ 28af994: increase PA_CVOLUME_SNPRINT_MAX to a proper value and document that it is not considered part of the ABI
+ bde142c: when checking the validity of a cvolume check whether all values are not -1
+ c0a9e8b: add missing calls to map file
+ ebb2ecb: add new API call pa_cvolume_compatible()
+ 619ed8a: add new API call pa_cvolume_snprint_dB()
+ be77bcd: add new API call pa_cvolume_init()
+ db975c7: extend documentation for pa_channel_map_init()
+ 2367212: make a few casts explicit to remove compiler warnings
+ 7c2cb77: a bit of late pa_bool_t'ization
+ d56f375: treat a channel map only then as compatible with a sample spec if it is valid
+ 8919898: add new API function pa_sample_spec_init()
+ 8a50105: if a volume or channel map is invalid show so when printing it
+ 33b186e: user lrint() and friends in inner loops instead of normal C casts to speed up a few things
+ 1bb5e58: use PA_FLOAT32_SWAP where useful
+ 7d442e3: optimize mixing routines a bit by pulling the multiplication with the global volume out of the inner loop by applying it first to the per-stream volumes
+
+2008-10-02 Lennart Poettering
+ a0f4ffd: make sure we call pa_sink_process_rewind() if a rewind was requested under all circumstances
+ ea82dec: when we mix into a 16bit accumulator make sure we clamp before we scale with a volume to avoid range faults when multiplying
+ 08cf9db: properly parse response to pa_stream_set_buffer_attr() calls. closes #370
+ 54afcf2: inform dsp_empty_socket() *after* we emptied the dsp socket, that it is now empty
+ 9f5d052: make simple protocol not crash when allocating a memory block
+
+2008-10-01 Lennart Poettering
+ cf3f80e: when killing gconf helper, loop over EINTR
+ ea15ca9: PA_WARN_REFERENCE works only for ELF targets
+ 3853070: don't hit an assert if a kernel driver reports invalid dB information, instead just warn the user
+ 5d18b62: remove useless log message
+ 4b67ea1: remove useless log message, re #367
+ 99acad7: fix support for ALSA devices which lack dB information
+ c4bdc2f: it's --daemonize, not --daemon
+ 9e79c87: Merge commit 'coling/master'
+ 644f39d: a few FreeBSD fixes, from alexis
+ f04cfcd: replace module-volume-restore by module-stream-restore in system mode, too
+ 6d74504: it might be a bit too early to initialize bluetooth by default for now, since it's still very rough around the edges
+ 0c3eb9f: fix typo in default.conf, closes bug #354
+ 00b70a8: follow PropertyChanged signals from BlueZ
+ d299ac5: Some man page updates, add missing documentation, other fixes.
+ 79ad4e6: Make the shared memory segment size configurable
+
+2008-09-26 Nix
+ a84b72b: esound auth-ip-acl fix
+
+2008-09-23 Stelian Ionescu
+ 564ef2b: have make_random_dir respect $TMPDIR
+
+2008-09-29 Lennart Poettering
+ f5c301d: make module-bluetooth-discover actually load modules and smaller other fixes
+ 3f4bc03: all kinds of minor type, memory leak, initializatio fixes
+ a35f84a: instead of failing when the requested sampling rate is not available find the next one that is higher
+ aa1974b: Use the same module parameter names for module-bluetooth-device as for most other modules
+ 7923731: use TRUE for pa_bool_t arguments
+ 60e9744: remove a few compiler warnings in BlueZ code
+
+2008-09-27 Lennart Poettering
+ 87971c8: fix compilation errors in priority queue code
+
+2008-09-26 Lennart Poettering
+ 9adf7c5: ignore bt proximity helper
+ 3ad8c04: add a generic priority queue implementation
+ 3e16d2f: make pa_idxset_trivial_compare_func() do a full compare instea of just equakity check
+ 183f2e0: some minor fixes and cleanups in the bt code
+
+2008-09-12 Lennart Poettering
+ 6188737: make sure ~/.pulse exists before we create the runtime dir link beneath it
+
+2008-09-11 Lennart Poettering
+ d68c2c9: replace Makefile stub copies by symlinks
+ 8257214: enable bluetooth by default
+ c0a1706: downgrade a D-Bus log message to debug
+ db955e8: add trivial redirecting makefile to bt dir
+
+2008-08-31 João Paulo Rechi Vita
+ 4ae124b: Move bluetooth proximity module to src/modules/bluetooth/
+
+2008-08-30 João Paulo Rechi Vita
+ 8b02c2f: Change all int vars that doesn't allow negative values to uint
+
+2008-08-29 João Paulo Rechi Vita
+ 78a3c72: Move bluetooth discover and device modules to src/modules/bluetooth
+ 76bae38: Cleanup some code
+ 6093e32: Remove some warnings
+ 02a9273: Free mempool
+
+2008-08-28 Russ Dill
+ 447e027: Fix "file not found" error on load of module-bt-device for Ubuntu Intrepid Ibex
+
+2008-08-26 João Paulo Rechi Vita
+ 8769bf4: Merge A2DP and SCO thread functions
+
+2008-08-25 João Paulo Rechi Vita
+ 199bdf2: Add some more device properties to the sink properties list
+ e2f3a86: Remove check for SIOCOUTQ and add proper includes
+ dc4f796: Use union instead of different pointer types to the same memory area to make the code C99 compliant
+
+2008-08-21 João Paulo Rechi Vita
+ d1cc632: Move render and write to the fd to a separate function
+ 88a21e9: Change MIN/MAX to PA_MIN/PA_MAX
+ 27bc1ea: Remove unnecessary initialization of getcaps_req->flags
+ 027940b: Remove u->channels and u->rates, since it's redundant info
+ 0e81757: Fix some memory leaking
+ e752cac: Change sbc_initialized to pa_bool_t
+
+2008-08-20 João Paulo Rechi Vita
+ 708905c: pa__done for module-bt-device
+
+2008-08-19 João Paulo Rechi Vita
+ 61013fb: Fix some debug messages and other cosmetic changes
+ e570767: Refactor a2dp thread execution flow and improve time estimation
+
+2008-08-17 João Paulo Rechi Vita
+ 2f455bf: A2DP poorly working
+ c89301d: Fix sample size
+ e545479: Fix block_size calculation
+
+2008-08-16 João Paulo Rechi Vita
+ b5c4d2e: Configure bt connection for a2dp
+ 85a931f: Get rid of hw_constraint function. It's code now lives inside bt_setconf().
+ 77138dd: Change default sink name to bluetooth_sink
+
+2008-08-15 João Paulo Rechi Vita
+ 6c10b10: Try to improve time estimation
+ 123ba4f: Fix handling of PA_SINK_MESSAGE_GET_LATENCY
+ 0d37b91: Remove PA_SINK_NETWORK flag and move the passage of streamfd to the rt thread just before the thread creation
+
+2008-08-14 João Paulo Rechi Vita
+ 435eb07: Change pa_sink_render to pa_sink_render_into_full and remove some unnecessary checks on the rt thread
+ 2e51b93: Make stream socket non-blocking
+ 71f1d68: Fix block size for SCO
+ fcd7dc1: Add include for core-util.h
+ eb1e308: Initialize rtpoll_item
+
+2008-08-13 João Paulo Rechi Vita
+ 0519e5d: Add include for sample.h
+ d48961f: Change close() to pa_close()
+ b4ded21: Change strerror() to pa_cstrerror()
+ 16d5aab: Get rid of SINK_MESSAGE_PASS_SOCKET, since we don't really need it
+ aa310a4: Changes for pa_modargs_get_value_u32 for integer arguments and correct some error messages
+ 0396a60: Copy arguments values instead of just getting a pointer for them
+
+2008-08-11 João Paulo Rechi Vita
+ f992296: Hand the stream socket to the rt thread
+ 255f9b0: Initial code for rt thread
+ b8b761a: Fix PA_USEC_PER_SEC missing
+ a3f0756: BlueZ connection configuration done
+ e7b0839: Adds SBC Codec to pa tree
+
+2008-07-31 João Paulo Rechi Vita
+ c62c2ff: Add module-bt-device and dependencies to automake
+ ee68292: Initial file for module-bt-device
+ d8a0ec5: Add code from bluez/audio/ipc.[ch]
+ ffe76a2: Add sender=org.bluez to dbus add match
+
+2008-07-24 João Paulo Rechi Vita
+ fe8bd53: Remove modargs, since module-bt-discover doesn't have any argument
+
+2008-07-23 João Paulo Rechi Vita
+ 1e03c32: Refactor all linked lists to use pulsecore/llist.h
+
+2008-07-22 João Paulo Rechi Vita
+ d893a1f: Remove block delimiters from single line if blocks
+ cadc666: Remove some unused vars and labels
+ a69c020: Change booleans to pa_bool_t
+ d90bb18: We don't need call_dbus_method anymore
+ 9907b46: Don't need to explicity check if hcid is running anymore
+ 2b68562: Improve dbus communication
+
+2008-07-21 João Paulo Rechi Vita
+ e5d25e0: Changing all private functions to static
+ 3909d9b: Remove VERBOSE definition
+ c9f5659: Adding dynamic bluetooth audio devices detection
+
+2008-07-18 João Paulo Rechi Vita
+ 314dade: Fix the symdef include
+
+2008-07-17 João Paulo Rechi Vita
+ 6fccd58: Fix comparison of strings of different case
+ 9d18b90: Adding module-bt-discover to Makefile.am
+ 8b511f5: Adding module-bt-discover
+
+2008-09-10 Omair Majid
+ 2ab4bb7: fix pa_stream_set_name
+
+2008-09-09 Arthur Taylor
+ f6670a1: stream_started_callback userdata bug
+
+2008-09-10 Lennart Poettering
+ 636b520: fix S32 validity check
+
+2008-09-09 Lennart Poettering
+ 5538c18: add src/pulsecore/lock-autospawn.c to POTFILES.in
+ 8f604bf: bump revisions
+ 17436b2: make sure peaks resampler also works for very short input buffers
+ 0deb6a4: minor improvements in debug handling
+ 4050447: unbreak pa_idxset_rrobin
+ 3a46bbe: When returning from a suspend, pass exactly the same flags as originally when
+ 25b200c: fix minor typo
+ f4c2f00: Work around presumable ALSA bug that treats the dir argument to
+
+2008-09-08 Lennart Poettering
+ c7a7765: Merge branch 'master' into master-tx
+ 821dc17: move autospawn lock to pulsecore/ since we don't need it in the client anymore
+
+2008-09-06 Colin Guthrie
+ cd704f8: Linking fix for rtclock on libpulsedsp
+
+2008-09-06 Robert-André Mauchin
+ 6b034f5: Updated LINGUAS: el, fr, sv added.
+ a571242: Added French translation.
+
+2008-09-05 Daniel Nylander
+ 77f57f3: Added Swedish translation.
+
+2008-09-05 Lennart Poettering
+ f216402: Add new option to disable remixing from/to LFE and set it to on by default
+ 33d349d: include build and runtime host information in debug output
+ fb837f0: rework autospawning to allow to multiple parallel autospawning contexts
+ 994ff98: connect to localhost via IP address instead of host name, to avoid needless NSS lookup
+ 89ed507: if we are exiting due to cpu overload, say so via syslog, too
+ f52fb64: if we are exiting due to idleness, say so
+ a609e4a: check for errors returned by pa_context_connect()
+ 3f6f13f: use pa_channel_map_compatible() where applicable
+ b56f344: a few minor clean-ups
+ 3429072: introduce upper channel map definition limit PA_CHANNEL_MAP_DEF_MAX
+ ece297f: update map file
+ cb0c97d: add new API function pa_channel_map_compatible()
+ 5a9a602: update map-file script to ignore gcc malloc attributes
+ 4562849: update documentation and help texts for s32le/s32be sample types
+ 12c5c62: Downgrade hrtimer warning to notice level
+
+2008-09-03 Lennart Poettering
+ 11cc072: Merge commit 'origin/master-tx'
+ bf403fe: introduce macros for all flags so that clients can check for them with #ifdef
+ cbd8e60: use PA_STREAM_EARLY_REQUESTS for OSS streams
+
+2008-09-01 Marc-André Lureau
+ 79009d2: command_get_info() segv in some conditions
+
+2008-09-03 Lennart Poettering
+ c402de7: reindent comments a bit
+ 40b66a0: Implement "early requests" mode.
+ 99d5ec6: Rework pa_machine_id() a bit
+ 5f93113: fix misuse of return value
+
+2008-09-01 Lennart Poettering
+ 2c2b271: use gcc malloc attribute macros for internal functions, too
+ 5467cc3: drop -Winline from build cflags
+ 4348faf: don't include leagacy definition PA_STREAM_NOT_MONOTONOUS in docs
+ f6e187f: prefix internally used inline function with _
+ 70b820d: add gcc malloc related function attributes where appropriate
+ e015879: add malloc related gcc attribute macros
+ 82ea8dd: avoid rounding errors on requested buffering metrics
+ 002e7a7: output relative timestamps in addition to absolute timestamps when logging
+ a1c857a: include more build info in debug output
+
+2008-08-31 Lennart Poettering
+ 1c4ad4b: rework device opening code: work around broken SND_PCM_NO_AUTO_xxx support in ALSA <= 1.0.17a
+
+2008-08-31 Fabian Affolter
+ 1d319b0: Some string in German translation done
+
+2008-08-30 Lennart Poettering
+ 34bcba6: remove a few more gcc warnings
+
+2008-08-29 Lennart Poettering
+ 13018d6: fix a few compiler warnings on older gcc
+ 506eacc: reword amd64 message
+ 1acf394: change default log level for the library to PA_LOG_ERROR to avoid spamming to stderr more often
+ 086fa95: downgrade a few messages
+ a45440d: the native atomic ops implementation for amd64 seems to work fine
+ ca38446: Change return value of cmpxchg atomic op to pa_bool_t
+ bdcb3a4: optionally add timestampts to every line logged
+ 54da71e: reduce needlessly large gdbm cache a bit
+ 450fe17: fix up latency before calling into stream code, to make sure we don't ask for too much data to early
+ 63505be: add missing config.h inclusion
+ 6723699: rework pa_ulog2 and base it on __builtin_clz if available, make pa_make_power_of_two based on it
+
+2008-08-29 Marc-André Lureau
+ d10e5e5: Add CFLAGS information on start-up
+
+2008-08-29 Fabian Affolter
+ f2c790d: Initial German translation
+
+2008-08-28 Lennart Poettering
+ bb8263b: add byte-to-usec and usec-to-byte converters that round up, not down
+ f79c665: document in which direction we round
+
+2008-08-27 Dimitris Glezos
+ 6685a14: Started Greek translation
+
+2008-08-26 Ed Catmur
+ 3d07cc8: alsa_error_handler should note source of errors
+
+2008-08-26 Lennart Poettering
+ 8df5b2d: increase pa_xmalloc() limit to 96 MB, closes #344
+ fd3c6b0: fix typo
+ f9713d1: Fix error code in pa_stream_get_timing_info()
+ 0a1f654: call close() in a loop to catch EINTR
+
+2008-08-22 Colin Guthrie
+ 2a78f86: Fix more linking issues in x11-publish and stream-restore
+ 4282b72: Merge branch 'master' of git://git.0pointer.de/pulseaudio
+
+2008-08-20 Lennart Poettering
+ dc9b8dc: add a few missing casts
+ a3e57da: add doxygen documentation for ext-stream-restore.h
+
+2008-08-19 Lennart Poettering
+ 6baec25: use final glibc eventfd() instead of our homegrown syscall invocations
+ 8e71787: rework cpu limit logic to use monotonic instead of wall clock time
+ 961aa18: simplify pa_start_child_for_read by using pa_close_all()/pa_reset_sigs()/pa_unblock_sigs()
+ b7026bf: add a few more gcc warning flags and fix quite a few problems found by doing so
+ 047eb52: run autoupdate
+ 2ca0533: update gitignore
+ 70f4a85: require ac 2.62 in bootstrap.sh
+
+2008-08-18 Lennart Poettering
+ 3d2d6ca: Merge commit 'flameeyes/autoconf-2.62'
+ 46f0f9e: a few modernizations
+ e65c514: don't unref pa_native_options object twice
+ 5cc2187: add some code to make invalid valgrind warnings go away
+ c6b1888: bump release
+ b8ba2de: restore volume/device for streams only when it wasn't set before
+ ec62596: allow clients to not specify the volume for their streams
+ c35d1bb: rework validity checking of sink/source/... names
+ d315dcf: save a bit of memory
+ 67858c6: fix type error
+
+2008-08-17 Russ Dill
+ 74719c2: Fix up overzealous HAVE_LT_DLMUTEX_REGISTER block
+
+2008-08-15 Lennart Poettering
+ 8d596a9: Make Multicast TTL for RTP configurable, patch from 'dfort'
+ f84536b: apply newly configured rules properly
+ 63402b3: apply volumes properly more than once in a row
+ 512c24c: apply the correct rules to sink inputs
+ f68a6e5: don't restore devices for direct-on-input streams
+ 5a0e014: disable hotplug sounds by default
+
+2008-08-13 Lennart Poettering
+ 916899a: pass force_refresh=FALSE to all volume/mute read invocations
+ abd85af: drop 0db reset functions since they are not necessary anymore
+ 8a10eba: extend hardware dB scale in software to full range if necessary, instead of reverting back to software-only volume control
+ 3ec4a5d: rework volume/mute APIs: split out pa_xx_set_soft_volume() and add force_refresh argument to read functions
+ 29daef7: add new function pa_alsa_volume_divide()
+ 8ab85fd: reword some log messages
+ e4adcf7: add new API function pa_cvolume_max()
+ a176f68: reset lock_fd_mutex after destruction
+ 3c88af7: fix protocol destruction
+
+2008-08-11 Lennart Poettering
+ 7c5a959: initialize IP ACLs properly
+ 8ca254c: fix two uninitialized memory accesses
+ c4dff4d: otpimize mixing code a bit by moving a few checks out of the inner loops
+ 5b2a837: optimize volume changing a bit by only using a single counter for the inner loops instead of two
+ b604290: adhere to struct gcc aliasing rules
+
+2008-08-09 Lennart Poettering
+ b218404: fix bad memory access
+ 72f520f: make gcc shut up
+ afbfd5d: adhere to C strict aliasing rules
+ 432b4e5: don't use PA_GCC_UNUSED anymore
+ 9996213: free regex_t after use
+ 15cebba: rework autospawning code to survive multiple pa_contexts in a single process
+ b4a5669: print reason when we fail to kill a running daemon
+ ee4c350: set errno properly in all functions from pid.c
+ d8119af: set errno properly in all functions from core-util.c
+ 9cf1a4e: add locale support to pa_parse_boolean()
+ c4d32ec: set errno properly in all cases
+
+2008-08-08 Lennart Poettering
+ 6df029a: make sure we don't crash if pa_thread_join() is called more than once on the same pa_thread object
+
+2008-08-08 Diego 'Flameeyes' Pettenò
+ 016fcd9: Reduce rules for man pages generation to pattern rules.
+ 89f492a: Replace some manual build tests with AC_CACHE_CHECK and AC_COMPILE_IFELSE.
+ daf3e8b: Create a new macro for checking compiler support for TLS.
+ 81969a7: Replace the CFLAGS-checking code with a common macro from xine-lib.
+ a6e4507: Use AC_PROG_CC_C99 to discover C99-compliant compiler.
+ f46ae10: Create an m4 directory for common macros and use it.
+ 66512f3: Remove gettext macros from configure.ac, intltool is used.
+
+2008-08-07 Diego 'Flameeyes' Pettenò
+ 07395ce: Bump autoconf requirement to 2.62 (latest released version).
+
+2008-08-08 Diego 'Flameeyes' Pettenò
+ 29fca62: Fix man pages generation when building out of tree.
+ 8a3d666: Fix building again libtool/ltdl 2.2.4.
+
+2008-08-07 Lennart Poettering
+ 40ff5fa: add compatibility with older PA socket paths
+ 75b28e9: remove some leftover debug string
+ ecb2bc4: Modify pa_state_path() to take an additional argument for prepending the machine id to the file name.
+ bd05b36: Rework state/runtime directory logic
+ 4e6fb67: don't spam to stderr in API functions
+ 0075649: print machine id during startup
+ 73e2577: add new function pa_machine_id()
+ b84f738: translate error strings
+
+2008-08-06 Lennart Poettering
+ b983c0b: include host name in default sink/default source file
+ bb7f80d: fix a few things in the translations
+ 4a44084: add basic german translation
+ 31bfd6a: fix channel position string
+ ff6bb7a: add a few configuration sanity checks for system mode
+ a4762ab: add disallow-exit to default configuration file
+ 756fac8: add new switch --disallow-exit
+ f1d2bf8: add i18n support
+ c4a953d: remove authkey-prop from tree
+ b4e8cac: don't include authkey-prop.h anymore
+ 9fde00e: fix a few potential bad memory accesses
+
+2008-08-05 Lennart Poettering
+ 34dd4a2: fix shutdown when --disallow-module-loading=1 is passed
+ ca12753: add a function to dump the stream database for debugging purposes
+ 8a156d1: don't enforce valid callbacks for extension module APIs
+ 98b8163: allow extension messages to actually carry information
+ e0dd72a: fix error path (spotted by Coling Guthrie)
+ f57b915: fix a few more copy/paste errors
+
+2008-08-04 Lennart Poettering
+ 78236af: fix copy/paste error
+ 163f107: fix documentation to follow what actually happens
+ 64a2367: inherit proplist on sample playback from client
+ 03cd37e: remove port definitions from header file since they are not actually used yet
+ 7de3ab5: add missing C++ checks in header
+ 9f5c1c6: pa_bool_t is not exported
+ dd07276: ignore PA_GCC_DEPRECATED and PA_GCC_PRINTF_ATTR when generating map file
+ 51d181c: update list of exported symbols
+
+2008-08-03 Colin Guthrie
+ 580c434: Fix linking
+
+2008-08-04 Lennart Poettering
+ 0cc674d: wrap protocol extension of module-stream-restore
+ 88c3db6: add protocol extension to module-stream-restore
+ 6cc3a61: store channel map in database and remap volumes if necessary
+ eec623a: add hooks for connection creation/deletion, for that export pa_native_connection
+ c01f0bc: split out save trigger function
+ 32cf9db: store channel map in database and remap volumes if ncessary
+ 5880516: add new API function pa_cvolume_remap()
+ cd5afb8: don't hit an assert if when process_rewind() is called with nbytes=0
+
+2008-08-03 Colin Guthrie
+ bf17dbb: Merge branch 'master' of git://git.0pointer.de/pulseaudio
+ ec78981: Fix linking
+ 5744237: Merge branch 'master' of git://git.0pointer.de/pulseaudio
+
+2008-08-03 Lennart Poettering
+ 5f69b5d: load module-device-restore and module-stream-restore by default, don't load module-volume-restore anymore
+ ad76ca0: add new module module-stream-restore
+ ec19f2b: a bit of refactoring
+ d7b138d: fix uninitialized memory access
+ a6c11be: define CANONICAL_HOST as macro for the GNU canonical host
+ 04ffac5: add extension system for native protocol
+ 9bfd67f: store load_once flag for module
+ 114f290: add a new error code PA_ERR_NOEXTENSION
+ 23bde22: start idle timer even when no module is ever loaded
+ f417bb4: some pa_bool_t'ization
+ 065e764: make all protocol objects global singletons
+ aaaafb0: use pa_channel_map_init_extend() instead of pa_channel_map_init_auto() to make things more robust
+ 1ae1dfc: simplify a bit
+ 0a2fced: add new api function pa_cli_get_module()
+ 5042284: introduce pa_cli_eof_cb_t
+ 084f429: rename pa_hook_free() to pa_hook_done() since the hook struct is allocated on the stack not via malloc
+ 34c4354: use @ as seperator between shared name variable and instance
+ 5916b5b: make sure we don't leak userdata struct
+ 32f63f2: allow running of PA with a valgring that doesn't know cap_set_caps
+ 06712c2: add new auth cookie singleton
+
+2008-08-03 Sjoerd Simons
+ 98fbd24: fix iteration over random devices
+
+2008-08-01 Lennart Poettering
+ d36c5c9: rename props.[ch] to shared.[ch]
+ edc56a7: rename pa_property_xxx to pa_shared_xxx to avoid confusion with property lists
+ a5a7b79: fix build without ALSA
+
+2008-07-31 Lennart Poettering
+ d757dc7: Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
+ 5150738: a bit of pa_bool_t'ization
+ 4f3193d: allow global tsched setting for all modules loaded by module-hal
+ 4ccbc4d: reword comment on dbus a bit
+ 026a6bd: Work around D-Bus bug that involves dbus_shutdown() to call exit() when it shouldn't. Patch from Coling Guthrie
+
+2008-07-31 Stanley Cai
+ 80428d8: A fix on src/Makefile.am
+
+2008-07-30 Colin Guthrie
+ b30a5d6: Merge branch 'master' of git://git.0pointer.de/pulseaudio
+
+2008-07-30 Lennart Poettering
+ 0b428e7: don't allow --start in system mode
+ 656d243: use the right LIBICONV macro, spotted by woglinde, closes #324
+ c39a0bf: bump needed automake version
+ 881046b: install a default system.pa
+
+2008-07-26 Petteri Räty
+ 90569d3: Make the alsa error message give out the needed version.
+
+2008-07-30 Lennart Poettering
+ 3c6da6e: don't pass rediculously high values to umask()
+ b7b4b5e: remove debug message
+
+2008-07-29 Lennart Poettering
+ bb00934: hide doxygen docs from git
+ 68ae1d4: fix two thinkos in signal reset/close_all code
+
+2008-07-24 Lennart Poettering
+ e3fb086: make module-hal and module-ck live together in peace
+ 49f09d6: fix destruction of dbus modules: make sure we don't leave filter function registered after unreffing the dbus connection
+ 23a3c55: hide start-pulseaudio-x11
+ 888256b: reset dbus error struct before retrying parsing messages
+
+2008-07-23 Lennart Poettering
+ e7b9da3: add missing pieces for new startup logic
+ c95d0d7: bump api verson
+ 32e93d5: follow consolekit's recent D-Bus API change, original patch from William Jon McCan
+ c415479: allow module-x11-xsmp to be loaded more than once
+ 1f10ca4: don't break if we fail to resume access to an audio device
+ 7140bdd: bump alsa dep to 1.0.17
+ 1401d36: make missing gdbm fatal (spotted by Betelgeuse)
+
+2008-07-22 Lennart Poettering
+ 5edbb57: don't drop caps if we are started as normal root user
+ 3888bfc: enable exit-on-idle by default
+
+2008-07-21 Lennart Poettering
+ c1f9f95: prepare doxygen docs for 0.9.11
+ d0530b0: fix gconf autoconf check
+
+2008-07-21 Colin Guthrie
+ 0e1936f: Merge branch 'master' of git://git.0pointer.de/pulseaudio
+
+2008-07-16 Lennart Poettering
+ 46a35c6: forward process_msg calls to the generic source handler, not the generic sink handler
+ ff3f435: try to bypass alsa softvol, since it is broken when used with snd_pcm_rewind()
+
+2008-07-03 Colin Guthrie
+ 0786de2: Fix documentation of constant: PA_VOLUME_MUTED (not PA_VOLUME_MUTE)
+
+2008-07-04 Lennart Poettering
+ 297267b: Merge branches 'master' and 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
+
+2008-06-28 Lennart Poettering
+ 1568fcc: get rid of our internal copy of the speex resampler. Instead, link against a system-installes libspeexdsp
+ 98c26b1: add proper update_max_request handler to native protocol streams
+ e6ffec5: make sure we call pa_sink_process_rewind() under all circumstances if a rewind was requested before we call pa_sink_render()
+
+2008-06-27 Lennart Poettering
+ c7ebe2b: ignore ~ files
+ c0e3c25: add additional file when updating speex resampler
+ 32fce4d: update speex resampler
+ 2490f69: update ffmpeg resampler from upstream SVN
+ 0fb402c: simplify handling of rewrite requests
+ 89620d3: handle rewind requests
+ f0e5cd1: handle rewind requests
+ 913bbd4: save a bit of memory
+ 36021b1: modernize idxset a bit, reduce memory consumption, get rid of pa_idxset_foreach()
+ 113c62b: halve memory consumption of mempool flist, since we know we cannot have more than n_blocks entries in it
+ c26be0d: modernize hashmap implementation a bit, reduce memory consumption a bit
+ 6dca92b: rework the flist implementation to halve memory consumption by merging the state field and the pointer in the flist cells
+ a087014: some modernizations
+ 232c955: rename pa_queu_is_empty() to pa_queue_isempty() to follow idxset/hashmap nomenclatura
+ 3db7dcb: save some memory by increasing the dynamic array at a slower rate
+ c0f97aa: some modernizations
+ 12278f4: fix typo in man page, closes rhbz #447355
+ 0540032: fix underrun detection for prebuf=0 streams
+ 7755f75: use (uint32_t) -1 to signify default buffer_attr values instead of 0, to allow prebuf=0
+ 2b764d4: fix crash when using sync'ed streams
+ 06ab488: cork/uncork before we ask for the rewrite, to make sure the rewrite actually gets trhough
+
+2008-06-26 Lennart Poettering
+ 9f0afb3: always forward rewind requests to the sink, and don't abort on nbytes=0
+ d08cac0: some svn->git updates in the Makefile
+ ee79b05: rework logic to request automatic timing updates a bit
+ 4b8c4ef: reorder a few things to get rid of an uneeded comparison
+ 97084e8: add a FIXME
+ 7d3d3fc: move initialization order of validity bools around a bit
+ 36d6c71: unify smoother pause/resume handling in a single function check_smoother_status()
+ dcbb7f2: convert to double only once, and make sure we can deal with negative results of -y
+ eab1cb8: make sure to call process_rewind() under all circumstances before we do the next loop iteration
+ 1e36b57: use the newer name for monotonic/monotonous
+ 2c5a33d: remove redundant check
+ 85b83e8: properly initialize pa_stream::corked based on the flags
+ 1514d13: split pa_memblockq_flush() into two flush commands, one which fixes up the read ptr, and one which fixes up the write ptr
+ 5fccac9: comment two functions in memblockq.c
+ ec10f5f: use the bight lighter _silence() instead of _flush() when destructing our little q
+ dd8b909: fix up if the smoother shall be resumed 'before' it was actually paused
+ b4302ca: fix up monotonicity of input to _get() instead of hitting an assert
+ 63b68f4: call the enum PA_STREAM_NOT_MONOTONIC and make PA_STREAM_NOT_MONOTONOUS an alias for that
+ df2650e: fix return value of pa_namereg_make_valid_name()
+
+2008-06-25 Lennart Poettering
+ c5cbeb5: choose more sensible default buffer sizes for old clients
+
+2008-06-25 Colin Guthrie
+ 517727e: Add xmltoman to the distribution. This saves pulling in an external dependancy
+
+2008-06-24 Colin Guthrie
+ 5099ab7: Export the cleanup_name() function and rename it to pa_namereg_make_valid_name().
+
+2008-06-24 Lennart Poettering
+ ac03254: Merge branch 'master' of git://git.debian.org/git/pkg-pulseaudio/pulseaudio-upstream
+ 398514f: call update_source_requested_latency callback for source outputs only when it is set to non-NULL
+
+2008-06-23 Lennart Poettering
+ c22d8b9: don't refer to nonexisting pa_stream_read() function
+ 57aee6d: include proplist.h in pulseaudio.h
+
+2008-06-23 CJ van den Berg
+ 1562671: Merge dead branch 'glitch-free'
+ 126e4cf: Merge dead branch 'lennart'
+ 0be9bc2: Merge dead branch 'lockfree'
+ 63c1eb1: Merge dead branch 'ossman'
+ a87ba42: Merge dead branch 'liboil-test'
+ 1a3984c: Merge dead branch 'prepare-0.9.10'
+
+2008-06-22 Lennart Poettering
+ 8885ddf: support file-based capabilities instead of SUID root for giving PA rights to acquire RT/HP scheduling: setcap cap_sys_nice=ep /usr/bin/pulseaudio
+
+2008-06-21 Lennart Poettering
+ ab93f2a: fix deadlock when resuming oss sinks
+ 2199b8e: Properly check for home directory
+ d0e26a5: Don't fail when we cannot determine the lock file path
+ d1362b5: call the right function in the right context
+ d9f8b6a: since the sink is unlinked before the sink input we need to make sure we don't call any function for unlinked sinks from any sink input callback
+ 947d8b4: execute detach callback before we change the state to UNLINKED
+ 37bc240: allow sinks to be created with max_request initialized to 0, so that the data can be filled in later when attaching to some piggybacked sink
+
+2008-06-20 Lennart Poettering
+ d3c1c92: Request a rewrite immediately after we have been linked, so that playback starts immediately
+ add6c03: Rework module-combine to work with glitch-free core; add new max_request field to pa_sink
+ 1420e1d: fix interpretation of remix parameter
+ 6c980c2: add new abstract device class
+ 2b112fe: add new function pa_smoother_reset()
+
+2008-06-19 Lennart Poettering
+ 11e55fe: add new remix= parameter to remap sink
+
+2008-06-18 Lennart Poettering
+ fd5a1b1: remove trailing spaces
+ c2fa11e: make user of pa_channel_map_init_extend() wherever it makes sense
+ 132e73b: add new API pa_channel_map_init_extend() to synthesize a channel map if noone is known
+ b95cf52: ignore tarballs
+ 822366a: remove remaining $
+ 8ae83d6: get rid of svn $ keywords
+ 6c4edd1: add missing gitignore files
+ b5a0802: add another .gitignore file, this time for pulse/
+ 3bf61ba: Add a .gitignore file for the src/ directory.
+ 63daee5: Add a small README with the new git URLs and stuff
+
+2008-06-17 Lennart Poettering
+ 9020543: if building a man page fails remove the output to make sure that calling make repeatedly will actually work
+ ac58f8d: fix man page xml
+ ba64de8: reset prebuf if it is too large
+ 038a033: limit the prebuf value by tlength
+ b28c6e9: bring module-tunnel back to life
+ 8ba8265: server side of new shm negotiation scheme; fix a bad memory access
+ 0d0911f: rework shm usage negotiation; merge a few pa_bool_t in a single bit field to save a bit of memory; drop redundant implementation of pa_init_proplist()
+ 36c5259: minor modernizations
+ 53987e6: make use of the pa_init_proplist() version in proplist-util.[ch]
+ 0e32db2: move pa_init_proplist() to proplist-util.[ch]
+
+2008-06-16 Lennart Poettering
+ ce001aa: add missing const to a few functions
+ fa53443: add pa_memblockq_get_base()
+ 7dffccd: add Nokia copyright
+ 71aca29: check for packet size on server info data
+ 1fe2f2c: use new pa_sink_set_latency_range() in null sink
+ f2efe93: a few modernizations
+ f4e2750: add new function pa_iochannel_socket_is_local()
+ 3b691c2: make use of the new pa_socket_address_is_local() function
+ 30a8800: add new functions pa_socket_is_local() and pa_socket_address_is_local()
+ 2af2433: add missing inclusion
+
+2008-06-14 Lennart Poettering
+ 4cf508e: minor modernizations, increase unload timeout to 60s
+ ce53497: avoid division by zero when informing user about unloaded lazy samples in the sample cache
+
+2008-06-13 Lennart Poettering
+ bf51a4a: update todo
+ b27cc1d: fix a bad memory access pulsecore/client.c
+ 7bae1ba: rearrange things
+ e9c13e2: consider passing the same argument twice to a module an error, also consider a variable name without following = an error
+ 8dd59a6: sometimes a simple memset() is much faster
+ 5c149e2: fix a minor memory leak when unloading m-c-k
+
+2008-06-12 Lennart Poettering
+ d39d6c9: drop hal inclusion from module-console-kit.c
+
+2008-06-12 Colin Guthrie
+ 39f59cd: Trivial typo fix in debug log message.
+
+2008-06-11 Lennart Poettering
+ 92e4fb3: merge Colin Guthrie's module-always-sink module, and add priorization to the hook subsystem while doing so.
+ 1337afd: enable auto-spawning by default
+ b3444d6: enable ConsoleKit support and positioned event sounds by default
+ ac0f527: add new switch --start to the PA binary which allows starting PA if it is not running yet. In contrast to normal startup an already running PA will not be considered an error. Also, take the autospawn lock so we can guarantee that after this call returns PA is ralive and running
+ c33db3c: don't exit when the XSM signals us a session exit. instead just unload all X11 modules
+ a180edd: move pa_core_check_quit() a bit later
+ 46d17f0: reformat things
+ f7ff9e2: install auto unload time event only when we have at least one auto unload module
+ 2cc95df: add new module-console-kit which tracks ck sessions to avoid termination when there is still some session using the PA instance
+ 62dde3f: add new module module-position-event-sounds for positioning event sounds in space
+ 67fde59: replace pa_atof() by pa_atod() because floats are lame
+ ca36968: update well-known property list
+
+2008-06-09 Colin Guthrie
+ 71fefa7: Do not invalidate the cookie if no file was specified.
+
+2008-06-03 Colin Guthrie
+ 3e4afae: Rejig r2495 slightly and directly compile the necessary source files as libpulsecore.so is not available when libpulsedsp.so is built
+ 3166ce8: Also link libpulsecore.la to some libraries (needed for logging). Discovered while compiling with --as-needed
+ 78ae612: Perfer client.conf over X11 property variables.
+
+2008-06-03 Lennart Poettering
+ 9a501ef: fix a compiler warning on ARM due to missing cast, patch from Jyri Sarha
+
+2008-05-29 Lennart Poettering
+ c98516b: update props
+ 8431fb1: allow on-the-fly deleting of hashmap entries wile we iterate through them
+
+2008-05-27 Lennart Poettering
+ c4f60d5: never hand out more data from a sink input than requested. Otherwise the resampler might run for too long and we get a heavy delay/underrun
+ 7297bd9: always expect name field in upload datagram
+ 307645e: fix esound proto to not crash
+ 21dedcb: readd name field to upload datagram
+ d332439: fix a minor memory leak
+
+2008-05-21 Lennart Poettering
+ 28405e3: big mumbo jumo of interleaved patches.
+ 6be0c75: move device volume file to state dir
+ 9f86d0f: move default device from runtime to state dir
+ 32c53f3: move volume restore table from runtime to state dir, fix another compiler warning
+ 2ed84ed: define PA_SYSTEM_CONFIG_PATH and PA_SYSTEM_STATE_PATH for C
+ 29c7ded: deal with failing pa_runtime_path()
+ dd662d5: properly handle if pa_runtime_path() fails
+ 341042b: make state and config path for system instance configurable
+ 8125a75: fix a compiler warning
+ 9303cdd: add O_NOCTTY
+ a9c80b4: add new functions pa_state_path()/pa_get_state_dir(), change return value of pa_startswith()/pa_endswith() pa_bool, add pa_in_system_mode() and pa_streq(); alow pa_unlock_lockfile() without file name spec
+
+2008-05-18 Lennart Poettering
+ d65b901: fix daemon shutdown with active monitor streams
+ 174d830: ignore close-test binary
+ b467791: add a small test program for pa_close_all()
+ ef4c6bf: remove a misplaced assert
+ 7df3c4f: make sure we don't hit an assert when autospawning
+ 3c7a795: fix pa_close_all() to make it actually work as advertised
+ 0a2b6dd: fix a misplaced assert
+
+2008-05-17 Lennart Poettering
+ 940f898: fix return value of noop pa_limit_caps()
+ 3bbc376: add another assert to catch sleep time miscalculations easier
+ 7d0b595: use pa_source_set_latency_range()/pa_sink_set_latency_range() in the ALSA drivers; fix sleep time calculation
+ de8a386: use pa_source_set_latency_range()/pa_sink_set_latency_range() in the ALSA drivers; fix sleep time calculation
+ 58487ee: use pa_sink_set_latency_range() where applicable
+ 7e5e015: link latency of monitor source to sink
+ 9b44665: add new function pa_source_set_latency_range(), fix type of requested_latency
+ 2e71f4d: only unref memblock if there is one
+ 971342d: dump latency metrics for recording streams, too
+ 6285a46: fix peak detection pseudo resampler
+ e35bae8: fix pa_stream flag checking
+ 856a2f9: type fixes for constants
+ b2f8aec: type fixes for constants
+ b709ab5: fix a minor compiler warning
+ 85d9abe: declare the explicit type for our PA_xSEC_PER_ySEC constants
+
+2008-05-15 Lennart Poettering
+ b8849f5: bump so revisions
+ a1639e1: also update PROTOCOL
+ 045c1d6: merge glitch-free branch back into trunk
+ 3aadad1: update protocol spec
+ 43dfc2a: follow recent alsa sink changes in the alsa source
+ 734f071: decrease default tsched buffer to 2s to reduce overall memory consumption
+ 813d40c: fix up requested latency when we move a record stream
+ e3c5a77: fix moving of record streams
+ 99a4516: don't access stream before it is valid
+ 74f8a67: fix suspend for alsa sink
+ f021538: export a couple of more functions from libpulse
+ e0dc1e4: Print message when stream started playback, use terminal sequence to clear line when printing that message
+ 86ea73a: reduce malloc() usage when logging, to minimize the hit of logging in RT threads. Not complete yet, i18n still uses malloc
+ b57c520: add pa_vsnprintf()
+ 1a2e5a8: add adaptive resampler to the RTP receiver, other modernizations
+ cfc4842: export a few more properties for RTP streams
+ f96a8ad: increase default mempool size, make mempool_slot an abstract struct because the only fields it defined where actually unused
+ 70c5967: increase shm size limit, modernizations
+ 2bc77ff: reduce number of allocated memblocks when receiving RTP data by reusing blocks
+ d10ee7d: more pa_bool_t'ization
+ c801d08: use pa_bool_t
+ 076ffa3: add 'stream' as media role
+ 1b7157a: add PA_REFCNT_INIT_ZERO
+ 6895280: add pa_ulog2()
+ 103ceaa: add pa_memblockq_get_nblocks()
+
+2008-05-14 Lennart Poettering
+ df73688: modernizations
+ 37813d9: modernizations
+ 787b869: initialize volume properly, set more properties, modernizations
+ 2eca8c9: don't spam us with wakeup msgs in non-tsched mode
+ 9c48ed1: update pipe source for glitch-free, too
+ 8baa1a4: fix pipe sink for glitch-free
+ dd29f67: fix braindead mistake
+ 94c269e: some fixes to make the esound protocol work on glitch-free again
+ 8df6529: some fixes to make the simple protocol work on glitch-free again
+ c5faeb1: store peer name in native-protocol.peer property
+ aae8beb: if zero is passed to pa_memblock_new() allocate largest memory block possible from mempool
+
+2008-05-09 Lennart Poettering
+ f124445: fix module-sine for glitch-free
+ df92b23: - Fix moving of sink inputs between sinks
+ 580d563: modify test to generate data events out-of-order
+ 0ea0e06: make sure the smoother code can deal with incoming data that is out-of-order; start smoothing only when we have at least a configurable number of entries in our history
+ e97a347: bah, english sucks
+
+2008-05-08 Lennart Poettering
+ 1f196e7: fix some comments
+
+2008-05-07 Lennart Poettering
+ 7b5c6a3: fix recording
+ 21fa1cf: double default asyncq size
+ 876d5b4: fix a race condition when tearing down the ladspa/remap sink
+ 6f4d44b: apparently alsa expects us to free the memory for card names
+ d21f458: fix a memory leak
+ 9354da4: make memchunk/memblockq streams work with glitch-free
+ dafcf20: beefup proplist handling for sound events
+ 8afbdc3: update to new rewinding logic
+ 9d7fde5: rework the rewinding logic once again, fixing
+ 6c28f1d: decrease verbosity a bit
+ 44241ac: define callback function types; allow pa_signal_done() to be called even without prior pa_signal_init()
+
+2008-05-06 Lennart Poettering
+ 91fbb69: explain why changing rlimits at this time is safe
+ dee3555: rename 'routing' to 'filter'
+ 4fa6cb4: add a few more asserts, don't allow pa_limit_caps() to fail
+
+2008-05-03 Lennart Poettering
+ 71d14d4: fix remapping sink for glitch-free
+ a1c10b5: update LADSPA module for glitch-free moed
+ 59835d9: explain why a rewind was requested
+ 82caf5a: when rewinding after the end of an underrun, make sure to rewind as much as we can, so that we deal properly with changed latencies of the sink
+ 3167e0f: follow _unlink() changes from sink-input
+ d2da344: send PA_SINK_MESSAGE_REMOVE_INPUT only when an asyncmsgq is available, reset resampler only when we really need to
+ d2be471: make sure to call sink->update_requested_latency() always when we change latency, same for source
+ 59a7467: don't require a module name when resolving a dl symbol
+
+2008-05-02 Tanu Kaskinen
+ ff09fa3: Fix typo: "now"->"not".
+ 43a30a2: Fix setrlimit() return value comparsion.
+
+2008-05-02 Lennart Poettering
+ bb4f83b: only send PA_SINK_MESSAGE_SET_STATE if there's still an asyncmsqg around to do so
+ bfb2691: a few modernizations
+ 06b9140: reorderer a few things
+ 792ef5c: fix a compiler warning
+ 775bc6c: some modernizations
+ 7d6269e: add multiarch paths to default LADSPA search path
+ 49b1b15: don't enable prebuffering if we just call is_readable()
+
+2008-05-01 Lennart Poettering
+ 52e3628: Yes, yet another evil all-in-one commit of intervowen changes. I suck.
+ f94fae3: move unlinking code to operation_unlink()
+ f3cc178: some minor updates
+ 11559a6: parse boolean parameters as boolean instead of int wherever applicable. add new function pa_cli_command_execute_file_stream()
+ 414f1d9: install gccmacro.h properly, drop unused core-def.h file
+ d7cc1f5: change pa_rtpoll_set_timer_absolute() to take a pa_usec_t instead of struct timeval
+ 5816871: save and restore errno in log functions
+ b93ea18: minor reformat
+ 4f99c43: check for $PULSE_INTERNAL before enabling padsp
+ 18ad6f8: don't allow overwriting of callback pointers when we're already dead
+ b70edf7: port pa_sample_clamp() to liboil
+ 9dd8f6c: add new function pa_sample_clamp()
+ 264385a: strip CRLF line breaks from read CLI commands. This should fix the cli interface for people accessing it via telnet.
+ f49df7a: * Increase history set to 64 to simplify reduction of indexes
+ 563f4b6: make check for $DISPLAY=="" more readable, pa_bool_tization
+ 06a05bc: a bit of pa_bool_t'ization
+ b12b8ee: save errno before calling free()
+
+2008-04-23 Lennart Poettering
+ caf742a: define minimal and maximal wakeup/sleep times; check for underrun condition only once during buffer fillup
+ 5353cf4: fix size of requested_latency
+ 067a68a: fix build for auxiliary modules
+ c8fc223: add stripnul to build
+ 76031df: Big pile of interdependant changes:
+ a197644: add new tool 'stripnul' which can be used to drop leading zeros from a file which is useful to do byte-by-byte comparison of what goes in and comes out of PA
+ f2dffb7: pa_bool_t'ization
+ 0b183fb: respect the resampler's maximum block size to avoid that we get kicked out of the memory pool due to resampling. actually drop data from the delay queue after we used it
+ 998ed8e: add missing header definitions for last commit
+ 3f57d3a: add new function pa_alsa_build_pollfd() to alsa-util to unify a bit more common code from the sink and the source
+ ed0af46: unify code that fixes up buffering metrics
+ af03dd4: drop a misplaced newline
+ 3c8e83f: do not fix automatic buffer attrs anymore, the new protocol version doesn't need this anymore and it creates more problems than it solves. Also drop the initial timing info query. Correct programs shouldn't depend on it anyway
+
+2008-04-22 Lennart Poettering
+ 5e6aacd: * don't increase tsched_watermark on underrun without limits
+ 6b4b95b: show configure latency metrics
+ 1adbe82: some beautification updates, show msec instead of usec everywhere
+ cdb077b: if no timer was armed, we don't need to disarm it
+ 4a1971a: if no latency was configure for a sink/source, fill in the max latency automatically
+ 69f6bdf: add new function pa_alsa_recover_from_poll() to merge common core from module-alsa-sink and module-alsa-source
+ 9a486ef: implement --process-time
+ 0d01c43: make sure the client buffer has space for 2*minreq+tlength. Explain why
+ e16a198: - Change meaning of special values of latency request: 0 -> "minimal latency, please"; (pa_usec_t)-1 -> "don't care"
+ 88227c4: properly initialize memblock->is_silence for imported memory blocks; make is_silence and read_only a bit field
+
+2008-04-20 Lennart Poettering
+ 5e7e827: improve dB volume calculation
+ ba6c0e1: fix C++ compat
+ 8181db1: initialize properties for ALSA sinks/sources more elaborately, re #277
+ c2c833c: use the sink description instead of the name to choose the description for the monitor source
+ 64e048c: drop a redundant pa_init_proplist(), properly set MEDIA_NAME property on stream, not on context
+ 5971345: rename sink_input->rewind to process_rewind() and set_max_rewind to update_max_rewind()
+ 62e7bc1: Big pile of dependant changes:
+ 7556ef5: maintain a global silence memblock cache
+ a0671aa: fix for new location of gccmacro.h
+ d1d7a07: we have not periodic timers anymore
+ 33a35b6: update to recent changes of proplist api
+ 33cb589: split user supplied data in multiple memory blocks if necessary to fit in one mempool tile. If the caller supplied a free_cb and we use shm it's better to copy the data immediately to the shm region instead of keeping it around as user memblock
+ ed36f31: increase the default pool size to 16MB because we now need to keep a lot more memory around due to glitch-free.
+ 03df088: add lower boundary for artifical latencies
+ af25697: follow pa_pstream_use_shm->pa_pstream_enable_shm rename
+ 687aa29: add new pa_pstream_get_shm() API, rename pa_pstream_use_shm() to pa_pstream_enable_shm(); pa_bool_t-ization
+ bee409a: remove debug messages
+ 1ddb95a: add new silence memblock caching subsystem
+ 4b1d684: add new API function pa_memchunk_memcpy()
+ 144b237: print a message on xrun
+
+2008-04-17 Lennart Poettering
+ 22ceb15: add new rtstutter tool which can be used generate artifical scheduling latencies in the OS to trigger buffer underrun events in your software. it's an awesome debug tool for glitch-free; also move test programs from automake's check_ back to noinst_ to make sure it is built everytime Lennart presses F9 in his emacs
+ c9d0159: define PA_xxxSEC_PER_yyySEC for usec, too
+
+2008-04-14 Lennart Poettering
+ 1f0a52d: the pointer to rewind() may actually be NULL
+ 68e4a93: properly ask the sink to rewind on new sink inputs and when they disappear
+ 6946d2a: make sure to clear all queued RT signals before arm a new timer
+ 04178d4: add _cb suffix to _max_rewind function like with all other functions, too
+
+2008-04-13 Sjoerd Simons
+ 91f092e: Let bootstrap.sh require version 1.10 of the various autofoo bits. Otherwise things will break during compilation
+
+2008-04-11 Lennart Poettering
+ 14fd32e: add missing 'break's in switch
+ 55f273e: s/pulsecore\/gccmacro.h/pulse\/gccmacro.h/
+ 07f5c1d: register sink/source name as first step when creating a new sink/source so that we can hand the valid name string to the hook functions; se tup props for monitor sources correctly; fix implicit flag setting logic
+ aad9d39: dump all info we know about sinks/sources/... in pactl
+ dbe3633: properly initialize ->memblockq
+ cdb273d: add new pa_get_state_dir() function, move pa_strnull() here
+ dcf7173: fix help string for volume commands
+ fe3c42d: fix packet formatting for a few commands
+ 2c6176f: mark shm marker struct as packed, to guarantee identical sizes between archs
+ 29cbd88: add new PA_GCC_PACKED macro
+ 096e7f0: make shm magic marker compat with multiarch systems where 64bit and 32bit processes might share SHM areas
+ c9db6d2: don't fail if a signalled writability of STDOUT is no longer true when we try it because some other thread already wrote something
+ 413656b: update list-xxx commands a bit
+ 28ab2a0: don't print 'signal' each time a rtpoll poll() call is canceled
+ 50d585e: fix linker warning macro code, move pa_strnull() to core-util.h, move PA_LIKELY definitions here from gccmacro.h
+ d0ebb71: don't use fqdn if we don't have to
+ 78368db: redirect alsa errors to normal PA log system; export buffer settings in device props
+ 1c5f665: make use of new alsa SND_PCM_NO_AUTO_xxx flags; redirect alsa errors to normal PA log system
+ 0f28de6: mark autoload functions as deprecated
+ d7e260b: remove misplaced PA_GCC_PURE
+ e832b0c: add C++ safety to header file
+ 7dad635: fix bit depth guarantee for pa_usec_t
+ 919bd98: add new API function pa_timeval_add()
+ 566322a: remove gcc macros from cdecl.h because we have them in gccmacro.h now
+ 007f82d: fix bad memory access when initializing client proplist
+ d491adf: add gccmacro.h to doxygen docs
+ e084e4b: add new module module-device-restore
+ c61c3b6: increase version of required ALSA to 1.0.16. check for gdbm
+ 6cddf61: add new API pa_rtclock_from_wallclock()
+ e1c1a78: fix proplist serialization
+ bb9792a: move gccmacro from pulsecore/ to pulse/
+
+2008-04-09 Lennart Poettering
+ 5d7128a: add new describe-module CLI command
+ 39afb14: add new pa_proplist_setf() API function
+ d69aeeb: implement server side of new sink/source reconfiguration commands
+ fc9d827: remove doxygen \since tag for API changes older than 0.9; properly implement new latency query APIs
+ cc1e265: init min/max latency properly; fix avail_min updating
+ f3109be: show configured latency and its ranges
+ da37a7e: export both min and max latency that is configured for a sink; add API for querying the requested latency of a sink/source from the main thread
+ ad18107: add new latency argument
+ 0f9e977: bump protocol version
+ 3138928: include proplist.h in doxygen docs
+
+2008-04-07 Lennart Poettering
+ b3b8a63: call snd_pcm_hwsync() expclicitly before we access any of the status fields, since this seems to be necessary. try to find the right mixer device via the card index
+ c84a64c: fix bug where we silently dropped data that didn't fit into one mempool tile
+ 98b0152: add utility functions to dump alsa PCM state
+
+2008-04-04 Lennart Poettering
+ b9c10f2: propery calculate min_avail in frames instead of bytes. don't use device_id= parameter in alsa modules if parameter wasn't specified
+ 064aa12: drop support for periodic timers, cleanup code a bit
+ 122861f: mark libpulse-browse as obsolete
+
+2008-04-03 Lennart Poettering
+ cdfcf66: - deprecate autoload stuff
+
+2008-03-31 Lennart Poettering
+ ecf6439: catch up with trunk HEAD (i.e. 2118:2213)
+ 0e983e5: fix caps stuff for crazy people who disable caps
+ 316e39d: update copyright year
+ fa0b9b0: merge r2136 from prepare-0.9.10
+ a9971d2: merge r2195 from prepare-0.9.10
+ b39da92: merge r2194 from prepare-0.9.10
+ 1af0d94: merge r2193 from prepare-0.9.10
+ 9f71611: merge r2192 from prepare-0.9.10
+ 70a459b: merge r2191 from prepare-0.9.10
+ 690807e: merge r2189 from prepare-0.9.10
+ 5181f79: merge r2190 from prepare-0.9.10
+ a826937: merge r2187 from prepare-0.9.10
+ 79938c9: merge r2186 from prepare-0.9.10
+ 6734fba: merge r2185 from prepare-0.9.10
+ 78bdb97: merge r2184 from prepare-0.9.10
+ e382f22: merge r2183 from prepare-0.9.10
+ 1be481f: merge r2182 from prepare-0.9.10
+
+2008-03-31 Diego Petteno
+ 25f9507: fix the help for --disable-per-user-esound-socket so that it actually
+
+2008-03-30 Lennart Poettering
+ 3e314b7: fix buildsystem to provide pa_log() in all binaries
+ cf37df4: rework pa_assert_se() to make sure it never gets optmized away, even if NDEBUG is defined
+ 68b131d: make pa_drop_caps() abort on failure
+ dbf9037: avoid name clash with libc's remove() function
+
+2008-03-29 Lennart Poettering
+ 829197d: fix compiler warning
+ ed5528f: require autoconf 2.60 since we use AC_PROG_MKDIR_P
+ 1c82694: bump soname
+ a3b8311: merge r2187 from trunk
+
+2008-03-28 Lennart Poettering
+ 0a108ec: don't fail on init if the default device does not exist and .nofail is active
+ fad6b41: don't segfault when module-tunnel is used without a sink_name/source_name parameter. Closes #197
+ 13b9951: if we are run as root, always use 'root' as username, regardless of any env vars
+ 8e60b01: actually set lennart to the user name, not the group name. Set lennart too.
+ 2599213: Fix ioctl() definition for solaris compat. Patch from yippi. Closes #253
+ b0dc80d: work around yet another solaris braindamage
+
+2008-03-27 Lennart Poettering
+ bc5e3f1: properly notify clients about suspended state when moving source output streams. Closes #244. Patch from slicer
+ 8298b6b: merge r2179 from prepare-0.9.10
+ 4ddc327: initialize gconf module before we publish our X11 credentials -- because gconf might cause network support enabled in the first place
+ e21a69e: merge r2146 from trunk
+ 2b593d2: merge r2134 from trunk
+ e5e9ed6: merge r2133 from trunk
+ ac82029: merge r2132 from trunk
+ 95422a8: merge r2131 from trunk
+ edd1a50: merge r2130 from trunk
+ 02840a3: merge r2129 from trunk
+ a1ec3d7: merge r2128 from trunk
+ 46cd225: merge r2127 from trunk
+ daaf70b: merge r2117 from trunk
+ 28b7ddc: merge r2116 from trunk
+ cca3f49: merge r2113,r2214,r2115 from trunk
+ 184dda8: merge r2112 from trunk
+ 1eb7239: merge r2111 from trunk
+ 5045d26: merge r2110 from trunk
+ 39de4dd: merge r2109 from trunk
+ bc58240: merge r2108 from trunk
+ ec39786: merge r2107 from trunk
+ e704fd3: merge r2106 from trunk
+ b79c6b6: merge r2105 from trunk
+ b0a2049: merge r2104 from trunk
+ a451de1: merge r2098 from trunk
+ 2735309: merge r2097 from trunk
+ 640033a: merge r2096 from trunk
+ 9dfbfce: merge r2095 from trunk
+ cc59e76: merge r2092,r2093,r2094,r2152 from trunk
+ 1908e82: remove a redundant if check
+ db208e3: merge r2091 from trunk
+ 9f0045a: merge r2090 from trunk
+ f10b531: merge r2084 from trunk
+ 66d9e87: merge r2145 from trunk
+ d055127: merge r2083 from trunk
+ 6c106c9: copy originial l2ping license from bluez into bt helper
+ 14ed19c: Enable per-user esound sockets by default. Esound CVS already enables this by default, and all sane distributions ship a patched esd anyway. And those which do not should get a life and start patching esd
+ cefa0eb: merge r2081 from trunk
+ 0e23606: merge r2079 from trunk
+ a86a48c: merge r2077 from trunk
+ 5e13249: merge r2076 from trunk
+ aceb800: merge r2075 from trunk
+ e721ecd: merge r2073 from trunk
+ 8d5ee50: merge r2074 from trunk
+ c59a90c: merge r2078 from trunk
+ 05a7f5d: bump revision
+ e6bb276: create branch for 0.9.10
+ 5addad2: make loading of a few more modules non-fatal
+ dcdf419: Double maximum sample size for some overly huge samples some distros ship
+ a25a459: Attempt to resolve the multilib conflicts by getting all the config files
+ 7ad0b64: modernize polkit code a bit, use new functions from pk 0.7 instead of our home-grown ones
+ 8a14304: rename polkit policy file to org.pulseaudio.policy to follow upstream guidelines
+ be9b32e: add vendor data to pk policy file
+ c5f78bf: Abort instead of cleanly exiting, so we can obtain a core dump and find out
+
+2008-03-26 Lennart Poettering
+ 7262e2f: add proper arm atomic ops support, patch from Jyri Sarha
+
+2008-03-15 Lennart Poettering
+ 106ddb9: remaining bits and pieces
+ b5c5064: commit glitch-free work
+ d6bd152: commit glitch-free work
+ ebecf3d: commit glitch-free work
+ 12c01e9: commit glitch-free work
+ 347cfc3: commit glitch-free work
+ 8d9bdac: really create glitch-free branch
+ dd81a90: create glitch-free branch
+
+2008-03-14 Lennart Poettering
+ 6ad7621: work around solaris printf %s and NULL string brain damage
+ 70d0083: change policy file to not show polkit auth dlg by default
+
+2008-03-09 Diego Petteno
+ 666b952: And one more.
+ 30e2a77: Test for _struct_ lt_user_dlloader, otherwise it won't be found.
+
+2008-03-08 Diego Petteno
+ 9ad7bb6: Build and run using libltdl from libtool 2.2. The user module loader support has changed drastically.
+
+2008-02-15 Tanu Kaskinen
+ 46d804d: Clarify the explanation of the in_action field in pa_autoload_entry.
+
+2008-02-15 Lennart Poettering
+ dc3682d: only call pa_ltdl_done() if we called pa_ltdl_init() before
+ 2b8bc5c: allow compilation on systems that lack POSIX shared memory. Patch from matthijs, closes #200
+ 5552139: explicitly recommend the usage of -- in the pasuspender command line, Closes #203
+ a1b2a83: look for timer_create in librt, Closes #210, patch supplied by matthijs
+ 0a807b3: print pa version id each time we start up, so that it is easier to identify the version people are reporting bugs again
+ 75e1ebd: Improve compatibility with applications which like to pass invalid strings to the libc functions we overwrite, by handing directly to the original function. Patch by Colin Guthrie and Gustavo De Nardin, Closes #227
+
+2008-02-13 Lennart Poettering
+ 86b9ef8: deal with a possibly failing pa_channel_map_init_auto() correctly
+
+2008-01-24 Diego Petteno
+ a3e820f: Mark long_options constant.
+ c8a9c9b: Use check_PROGRAMS rather than noinst_PROGRAMS for test programs.
+ be4c0f2: Apply the fix for CVE-2008-0008 from 0.9.9 release on trunk.
+
+2008-01-24 Lennart Poettering
+ 90a7f3b: bump revision
+ 4d4dafb: fix CVE-2008-0008.patch
+ 9423e67: prepare 0.9.9
+
+2008-01-06 Lennart Poettering
+ d36a1b8: use __BYTE_ORDER macro for detecting byte order, as suggested on http://unixpapa.com/incnote/byteorder.html
+
+2008-01-04 Sjoerd Simons
+ c5678ae: Don't send opcodes introduced in protocol versions 12 to clients using protocol
+ 02f49a2: Implement opcodes in the tunnel modules that were added in version 12 of
+ 9774cc7: Add forgotted #ifdef __linux__ and only use SIGRTMIN if it is defined. Fixes
+
+2008-01-03 Tanu Kaskinen
+ 1e74aa9: Add a missing pa_xfree.
+ 4e77176: The previous commit introduced a new bug: giving too many values in the "control" argument wasn't detected any more. Fixed.
+ 39ba68b: Fix the parsing of trailing default values in the "control" module argument.
+
+2008-01-02 Tanu Kaskinen
+ dccf411: Downgraded the priority of a message, because it's really quite uninteresting.
+
+2007-12-29 Lennart Poettering
+ 9d00b9d: convert argument to boolean value before passing it on to __builtin_expect in PA_LIKELY
+ 2cb1b2c: add new function pa_proplist_contains()
+
+2007-12-23 Lennart Poettering
+ 2a44213: add API for resetting allocated resamplers
+ 7f65e79: wrap speex_resampler_reset_mem()
+ 81e85ce: hide proplist-test
+ 63c616e: add new property list implementation
+
+2007-12-14 Tanu Kaskinen
+ 8ed2a8c: Increase the maximum line length of default.pa from 256 to 1024. Load commands of modules that need multiple channel maps may grow rather long.
+
+2007-12-06 Diego Petteno
+ b94a6bc: Add a configure switch to enable the per-user ESounD socket path, but default to vanilla ESounD's path. This way distributions and users can configure PulseAudio according to their ESounD library.
+
+2007-11-24 Lennart Poettering
+ 95a98fe: Add new subsystem for applying envelopes (such as volume ramps) to audio signals
+ 2d34bca: rearrange #includes
+ 0312890: add new pa_mutex_try_lock() API
+ 7a42425: add new endianess macros for FLOAT32
+ ca0c5af: make sure to create ~/.pulse before using any configuration file from it
+
+2007-11-23 Diego Petteno
+ 04d7a7e: Check for mkdir -p or equivalent, and use that rather than simple mkdir to create the modules, modules/gconf and modules/rtp directories.
+ 19ee3b6: Enable D-Bus if Bluez or HAL are enabled; use DBUS_LIBS/DBUS_CFLAGS when building libdbus-util.la.
+ ec91380: Fix detection of polkit_context_is_caller_authorized() function, also reported by Nix. Also fix detection of policydir for prefixes different from /usr.~
+
+2007-11-22 Lennart Poettering
+ 9d2255d: fix uploading of samples into PA. Problem discovered by Colin Guthrie
+ 3e4f820: update speex resampler with newer snapshot from Speex SVN
+
+2007-11-21 Lennart Poettering
+ d41744a: Tagging release 0.9.8
+ 23e3d7c: bump version and soname
+ 6b932f0: update man pages a bit
+ 40db06d: when speaking to a client with a version < 12, hide S32 sample specs, and make them appaear as FLOAT32
+ 0f5fa47: increment api and protocol version
+ 14a9b80: - Check process name when dealing with PID files
+ 4ac6b53: minor typo fix
+ 5a4959e: add short version history of the PA protocol
+ 63fa021: add a couple of new opcodes, and document the versions the opcodes where added
+ d1d0778: add API to allow runtime reconfiguration of memblockqs
+
+2007-11-16 Lennart Poettering
+ 07832d0: detect whether PolicyKit support is available
+ cf0d43e: build PolicyKit support
+ 8bdad29: add interface to PolicyKit
+
+2007-11-14 Lennart Poettering
+ 413a8f8: use a prio inheriting mutex for the threaded mainloop, to ease writing of RT clients
+ 461e369: use a free list for allocation pa_operation objects
+ 1765b13: use a free list for allocating reply_info structs
+ 9b75b9d: add missing pa_boolization
+
+2007-11-13 Lennart Poettering
+ 7462ab1: Rework ALSA mixer channel detection code. This time we actually care about the channel names the ALSA mixer exports for us
+ 4c47617: add array size to increase chance of detecting missing updates
+ 4a39c2e: don't fail if the bt-proximity-helper is not built
+ 15f56de: don't touch RLIMIT:MEMBLOCK by default. This should improve out-of-the-box comaptibility with JACK
+ 7b321ed: increase the pacmd timeout a bit
+ d17bb53: Completely rework ALSA device selection code: choose the device to open depending on the requested number of channels and channel map. In most cases it will now suffice to set default-channels=6 to enable 5.1 sound for all devices that support it
+ f752882: fix loading of load-once modules if no other modules was loaded before
+
+2007-11-11 Lennart Poettering
+ 5054f36: add new fun module that automatically mutes your audio devices when you leave with your bluetooth phone, and unmutes when you come back
+ e8092be: Port module-gconf to make use of the new API pa_start_child_for_read()
+ daf3a3e: pull code for starting helper processes out of module-gconf, clean it up, and stick into a new API pa_start_child_for_read()
+ e043eaa: add new function pa_strnull() to simplify passing null strings to non-linux printf()
+ f873a2a: add a simple fully-automatic fully-linearupmixer/downmixer and enable it by default
+
+2007-11-09 Lennart Poettering
+ e313fe1: tag modules that may only be loaded once at most especially, and enforce that in the module loader
+ d8e0c1c: minor typo
+ b0a68fd: optimize mixing code a bit. Add mixers for S32LE, S32BE, ULAW, ALAW and FLOAT32BE. Add volume adjusters for FLOAT32BE, ALAW, ULAW.
+ c1985c2: replace a few CLAMPs by PA_CLAMP_UNLIKELY
+ 0149031: remove PA_CLAMP_LIKELY macro because it doesn't really make sense.
+ 7bd3c03: .la files for modules can probably be removed safely on all archs now
+ 7e0f547: add support for 32bit integer samples
+ 3c17c7d: fix CLAMP_LIKELY/UNLIKELY definition
+ ecf349d: add missing #include
+ 42ef051: add a few missing macro definitions
+ cb66762: add PA_CLAMP_LIKELY and PA_CLAMP_UNLIKELY macros
+ c8cdb06: add support for likely()/unlikely() type macros
+
+2007-11-08 Lennart Poettering
+ 14b974a: parse the pasuspend argument like any other boolean in PulseAudio
+ a2121d5: strip most comments from the default configuration files, since the man page is now more elaborate and we don't want to maintain those docs redundantly at two places
+ 4459912: add remaing man pages
+
+2007-11-07 Lennart Poettering
+ 1ef4baf: warn if the sound server is not local
+ 1821f1f: add man pages for padsp, pabrowse, pasuspender
+
+2007-11-06 Lennart Poettering
+ 5dbab0b: complete pactl man page
+
+2007-11-05 Lennart Poettering
+ 0eb011b: minor cleanups of --help texts
+ 7fdc1ee: add a couple of more man pages
+ bff4ca4: add a man page for the pulseaudio binary. More will follow.
+
+2007-11-04 Lennart Poettering
+ 961ce33: fix two alignment issues found by the debian buildd gcc on sparc
+ faf1fd7: pa_boolization
+ 0184d70: add eventfd syscall nr for arm; patch from Sjoerd Simons; Closes #150
+ 9ac9328: Properly terminate pa_readlink() strings. Patch from Sjoerd Simons. Closes #149
+ 95af1e6: Add linker version script to hide non-ABI stable symbols in the client
+
+2007-11-01 Lennart Poettering
+ bc161b4: comment the library versions a bit
+ cb0d7ff: add missing pthread libs
+ 81233c1: make disallow-module-loading config option work again (original patch from Diego Petteno)
+ 7bfd1b2: make rtprio and nice level actually configurable
+ 641d1fa: drop rt scheduling before we start our helper process
+ 41ea3b2: add new option --realtime
+ 005ed41: save and restore errno in sig handler
+ 44d7c9a: add nice and rtprio resource limit support; make rtprio and nice level to use configurable; some minor updates
+ e706f7b: pa_boolize the client config
+ 65a6bff: more pa_boolization
+ b343497: make the bool config parser actually parse bools
+ cecd8d4: fix comment
+ 38a1525: add new function pa_yes_no()
+
+2007-10-30 Lennart Poettering
+ 5058a1e: save and restore errno in the sig handler
+ 111b759: bump sonames
+ 0f0e729: make sjoerd happy: include ChangeLog built from svn logs in tarball
+ 099e690: make make distcheck pass
+ b03b574: rename 'length' parameters in the API to 'bytes', to make their unit clear
+ b84489d: handle tcp4: prefix for server specs correctly. (Closes #136)
+ 72817f9: rename stream names too, when the sink name changes
+ 201dff7: ignore updates not relevant to us
+ 1e0454e: rework the tunnel naming scheme, and make it follow the description changes of the underlying devices; never check for tagstruct eof, to ease later extensions
+ bb2e1af: initialize userdata struct with 0
+ 0991a1b: remove libltdl from SVN
+ 2d265a9: deal properly with signals interrupting us when we wait for data from gconf helper
+
+2007-10-29 Lennart Poettering
+ f1be931: keep track of configured tunnels and make sure to unload them when they disappear from zeroconf again
+ e406bba: don't announce monitor sources
+ 5ef242c: don't try to send pause request before our stream is properly set up
+ 33c238b: ignore network sinks/sources
+ 625a872: make gcc shut up a bit more
+ 1dae2e6: we don't want to include assert.h anymore
+ 43b5c65: reverse server order for PULSE_SERVER x11 property, to follow order in which modules are loaded
+ cc88385: add new API pa_strlist_reverse()
+ 87be856: add new module module-zeroconf-discover
+ 9f44659: publish dns-sd subtypes to allow distinction of virtual, hardware and monitor sinks/source
+ 9ca7ed1: export pa_namereg_is_valid_name()
+ 0ce32bd: fail on name clash
+ ac83631: bring back module-tunnel, yay!
+ 9ccbd86: downgrade a few log messages
+ 6e1f7bd: properly deal with time pausing
+ a46804a: use real path of binary instead of /proc/self/exe to execute ourselves
+ 27d6b7b: make use of new pa_readlink() where applicable
+ ca98c54: add new pa_readlink() API
+ 1c06907: make speex-float-3 the default resampler
+
+2007-10-28 Lennart Poettering
+ c6a7f06: add missing dependency on socket-util
+ a67c21f: merge 'lennart' branch back into trunk.
+ 575541d: Merge r1502 from trunk: Move pthreads detection as it gets confused by things in LIBS.
+ f096ca4: Merge r1504 from trunk: Solaris hides inet_ntop in nsl
+ c6071b0: Merge r1505 from trunk: Make sure we link to the core to get all symbols.
+ 9eb840c: Merge r1503 from trunk: Make -no-undefined actually work (and fix up error found by it).
+ d8976a2: Merge r1473 from trunk (mixer ioctls on /dev/dsp)
+ b718d18: fix error handling
+ daa2863: don't use errno on EOF
+
+2007-10-27 Lennart Poettering
+ 94cf167: port module-esound-sink to new core
+ 66dc0b4: don't use SIGRTMAX, for compatibility with valgrind which apparently uses this signal
+ 98d363c: minor cleanup
+ 87faa54: minor fix to make gcc shut up
+ 56804de: minor fixups, to make the test more deterministic
+ 581e7f1: add ability to "pause" the input time temporarily. don't accidently overwrite variables we still need.
+ 55e4a3e: modernize pa_iochannel a bit, add pa_iochannel_get_send_fd()
+ c4d9a2b: add missing pa_smoother destructor
+ b4bb747: add pa_rtclock_usec() API
+ ca744a4: add pa_timeval_load() API
+
+2007-10-26 Lennart Poettering
+ ce5250e: hide smoother test
+
+2007-10-25 Tanu Kaskinen
+ 7ccf40e: Add "support" for plugins that have control output ports, i.e. don't crash on them anymore (the plugins correctly assume that every port is connected to a buffer, so we connect them to a dummy buffer that isn't used anywhere).
+ 81ed6e6: A couple of comment typo fixes.
+
+2007-10-24 Lennart Poettering
+ 0d84e4c: fix alsa mmap initialization bogosity, discovered by Jyri Sarha
+
+2007-10-23 Lennart Poettering
+ dc987e9: add better time interpolator: use linear regression to determine gradient from
+ 9464b9b: add definition of PA_USEC_PER_MSEC
+ 65b570c: properly copy error string
+
+2007-10-22 Lennart Poettering
+ 498a156: also port over JACK source to new core
+ 02adb5f: enable jack sink in Makefile
+ 468c13e: Port JACK sink module over from old core
+ 4029504: minor fixup
+ 925eadd: add interleaving/deinterleaving APIs
+
+2007-10-17 Lennart Poettering
+ 1900817: Properly handle if ALSA sends us an POLLERR event, this should allow us to survive a system suspend cycle better
+
+2007-10-15 Lennart Poettering
+ 2385efe: fix url
+
+2007-10-07 Lennart Poettering
+ b0bce20: add missing poll.h inclusion
+ 215cac8: add missing poll.h inclusion
+ a687c31: add missing poll.h inclusion
+ 3736246: s/timespec/timeval
+ 2198c2e: fix build
+ efc81a8: add new API function pa_timeval_store()
+ d74fa66: Fix build; change return value of pa_rtclock_hrtimer() to pa_bool
+
+2007-10-04 Lennart Poettering
+ 87cc073: fix poll.h check, bad boy ossman broke
+
+2007-10-03 Pierre Ossman
+ cb40087: Don't call pa_rtsig_configure() when we lack the necessary defines.
+ 60a935b: module_ladspa used libltdl so make sure it links against it.
+ 586ef22: Platform dependent semaphore implementation for Windows.
+ cef6563: Assorted minor Windows compatibility fixes for recent code updates.
+ ce74146: Add stubs when RT signals aren't available.
+ 8dcc1fa: Adapt rtpoll and friends to Windows by replacing timespec with timeval and
+ ef8812e: Replace all references to sys/poll.h with poll.h as that's what POSIX defines.
+
+2007-10-01 Lennart Poettering
+ 7c1768d: update native protocol to make use of pa_memblockq_pop_missing
+ 2e780e8: Move request size handling into pa_memblockq, function pa_memblockq_pop_missing()
+ d6a2203: Fix race condition between IO thread creation and pa_sink_put(). Move activation of rtpoll fds when we change the state INIT->IDLE.
+ 9d34a1e: fix trivial typo
+ abd692e: fix silence initializer for alaw and ulaw
+
+2007-09-30 Tanu Kaskinen
+ dbcd086: Fixed PA_GCC_CONST definition.
+
+2007-09-28 Pierre Ossman
+ bdf9746: Update module-solaris to new structure.
+ 6d8aea7: Incorrectly used str2sig() instead of sig2str().
+
+2007-09-28 Lennart Poettering
+ 67b899a: treat timer_enabled like a real, grown-up boolean variable
+ 33f2f49: rework module-combine once again. We now run the data generation always in a seperate thread. This should help use to avoid all the awful race conditions we had in previously
+ 229afb5: Move the poll() call outside the #ifdef checking for ppoll, since we want the poll in all cases. Prior to this change the check for negative return values of poll/ppoll was never actually executed when ppoll() was available
+ f8c1786: use the full range of RTSIGS for our stuff
+ 3cdff5f: Allocate rtsigs from back to front, to avoid clashes with other libraries makeing use of rtsigs
+ df33b4c: only do IO if we are RUNNING or IDLE, but not when we are in INIT
+ 584ca61: don't free silence memblocks that don't exist
+ 107f12a: speed up semaphore allocation with an flist
+
+2007-09-26 Lennart Poettering
+ 008c709: Use Linux eventfd() if kernel supports it
+ e99bc33: fix build with compilers that lack __thread
+
+2007-09-25 Lennart Poettering
+ a9e667b: make sure when can shutdown PA cleanly without segfault
+ 5fe1589: work around newest open() magic in fedora glibc
+ 1687226: fix make dist
+
+2007-09-24 Lennart Poettering
+ 86ec421: fix suspending in module-combine.c
+ 609ad12: * decouple suspending of monitor sources and their sinks
+ 0e3e9e2: only post data into the monitor source when it is not suspended
+ f0f9df9: * add new state changed hook for streams
+ ac86fa1: fix IDLE vs. RUNNING state handling of sinks/sources when changing cork status for streams
+ 3c75d35: rework zeroconf service publishing, to use synchronous hooks instead of asynchronous subscription events. Don't push autoload entries anymore.
+ e37fa01: add hooks for name/description changes of sinks/source and streams
+ ef020c6: fix stream corking: ignore pa_sink_input() when we are in corked state
+ 55651ec: don't count streams using the monitor source in pa_sink_used_by(), because this would disallow suspending a sink ehn an rtp stream is connected
+ ba322a4: drop the PA_SOURCE_CAN_SUSPEND and PA_SINK_CAN_SUSPEND flags, since they were a bad idea in the first place. All sinks/sources are now *required* to handle suspending in one way or another. Luckily all current sink/source implementations handle it fine anyway.
+
+2007-09-23 Lennart Poettering
+ 77ed60c: instead of using the mixer ioctl()s on the dsp fd, open a seperate fd for the mixer. This allows us the keep the mixer fd open while closing the dsp device while suspending.
+ fc00eaf: use O_NOFOLLOW when creating lock files, too
+ 2860685: use O_NOFOLLOW when creating PID file, to avoid symlink vulnerability
+
+2007-09-23 Tanu Kaskinen
+ de079ac: Added an assertion for the case when the sink programmer hasn't installed the thread_mq properly.
+ 7bcbf16: Comment typo fix.
+
+2007-09-22 Tanu Kaskinen
+ ecad937: Fix the assignment of control values by using the right variable for indexing.
+ 1c44be2: Correct the parameter positions with the pa_cvolume_set() call.
+
+2007-09-22 Lennart Poettering
+ e04a857: minor optimization
+ 6cfb096: include the name of the master sink in the name for piggy-backed virtual sinks
+ c6b43bf: prefix by order macros with PA_
+ 6683400: rework a couple of sample type converters, to actually work
+ 78a9ad3: - rework volume adjustment code to not require fp
+ d7a0876: fix selection of working format
+ 9db4267: make use of byte swap builtins of gcc if they are available
+ f26de80: add test program for the resampler
+
+2007-09-21 Lennart Poettering
+ c34a263: allow _unlink() functions to be called as many times as people want, even before _put() was called
+ 1fc168b: clamp sample data to -1 .. 1, before passing it to the plugin; if a control port data specification is left empty, initialize with the default value of the plugin
+ 29d25ec: add CLAMP macro
+
+2007-09-20 Lennart Poettering
+ e205bb2: don't segfault when the master changes
+ 3b2835d: properly detach/attach when moving sink inputs
+ f3f44da: rework module-combine again
+ c40c168: maintain the attach status in a boolean variable 'attach' accessible from the IO thread for sink_inputs/source_outputs
+
+2007-09-19 Lennart Poettering
+ 75647bc: render new data always in the master sink's thread, fixing missing locking
+ a8a9ee4: make sure we initialize thread private data before we move our ghost sink to the rt thread, not after
+ 42b71ff: fix trivial typo
+ d716e3c: fix check for lrintf, make resample2.c again identical to upstream ffmpeg
+ 75f799a: make O_CLOEXEC, O_NONBLOCK and socket low latency fd ops more uniform: always return void, name them similarly, only pass a single fd
+ 0fcad97: copy free_cb into a temporary variable first, to avoid compiler warning
+
+2007-09-18 Lennart Poettering
+ ac66b6a: fall back to plughw:, if hw: doesn't work, in the alsa source, too
+ 781cf49: properly release memblock always abd as soon as possible
+ 1fd9afd: make use of pa_bool_t on a few places where applicable; really start work_cb
+ b3093d8: lower SO_PRIORITY priority to 6, since this is the best we get without being root
+ ef8df41: make rtp send socket low delay
+ f44ddd1: add new pa_socket_udp_low_delay() API
+ 6b2fd23: add two missing header file inclusions
+ eb23601: bug fixes for module-rtp-recv
+ 8fdf054: make sure we don't call pa_source_post() for a monitor source after it was unlinked
+ ca71764: If PTHREAD_PRIO_INHERIT mutexes are not available fall back to normal mutexes
+ a558e93: port module-rtp-send.c to lock-free core
+ 08d4b23: actually close the alsa device before we try to reopen it as plughw
+
+2007-09-18 Pierre Ossman
+ 4ed41f3: strtof() is a rather recent addition to C. Fall back to strtod() if it isn't
+ aff22cf: NSIG seems to be more common than _NSIG.
+ 03d9863: Emulate lrintf with simple truncation if it isn't available.
+ 31dfb31: Make sure the header file is only included on linux (as this is a linux-only
+ df1d347: NSIG is not defined by neither C99 nor POSIX so we can't rely on it.
+
+2007-09-17 Lennart Poettering
+ 4cde507: add LADSPA sink than can be piggy-backed ontop of another sink
+ 7b4f981: print a message when we fall back on plughw
+ 8ff7d56: add a locale-independant pa_atof() implementation
+ 4cdf2ce: hide sig2str-test
+ 1ae473b: fall back to plughw: if hw: doesn't work
+ 26a1ae7: Rename pa_strsignal() to pa_sig2str(), since we return the symbolical signal name, not a human readable string. This follows the Solaris API of sig2str() a bit. Also, add all remaining signals to the list of signal names.
+ d3b8985: drop a couple of WARNING prefixes in log messages, since we have pa_log_warn anyway for marking warnings especially
+ 19eb7eb: once.c is no longer POSIX specific. Since it is now considerably more advanced than it used to be, use it on windows, too
+ 7f9fea7: on Linu disable lazy binding altogether
+ a1526f1: add missing initialization
+ 061e806: Add a special ltdl .so loader that avoids lazy frelocations during runtime
+ 2741685: use priority inheritance on mutexes where applicable
+
+2007-09-16 Lennart Poettering
+ 61b90a0: add proper boolean type pa_bool_t
+ 116ddaa: use gcc const and pure function attributes wherever applicable
+ 35483ee: add a new module module-remap-sink which can be used to remap the channel maps of an already existant sink. one use case is to create a virtual sink that redirects stereo data to the rear speakers of a surround card.
+ 1d1eda6: add a "length" argument to the seek functions, as an optimization to request a certain block size if any data needs to be generated. this is merely a hint.
+ 5df7a85: split memblocks into multiples of the mempool tile size
+ ac1ee4e: add new API pa_mempool_block_size_max() to query the maximum tile size
+ fce8507: * add a new resampler "copy" which is does not change sample rates but copies data unmodified from input to output.
+ d079b48: properly define MAX/MIN macros
+ 87795b0: add missing header file changes for frame alignment apis
+ e17fbf0: be a little bit more elaborate on the reason why we drop to software volume control if hw is not featureful enough for us
+ 0469c84: add frame alignment APIs; don't require memory to be writable when silencing it (required of the mmap modes drivers where the hw data needs to be silenced, although it is not writable to others)
+
+2007-09-15 Lennart Poettering
+ 298d239: trivial typo
+ 8389264: count corked streams per sink/source and make pa_sink_used_by() return only the number of streams that are not corked. Introduce pa_sink_linked_by() returning the number of streams connected at all. This will allow suspending of sinks/sources when all streams connected to a sink are corked.
+
+2007-09-14 Lennart Poettering
+ 5ae4eed: Move attaching/detaching from a pa_rtpoll into pa_sink proper, remove it from module-combine
+ 3396b65: simplify rt loops a bit by moving more code into pa_rtpoll. It is now possible to attach "work" functions to a pa_rtpoll_item, which will be called in each loop iteration. This allows us to hide the message processing in the RT loops and to drop the seperate sink_input->process hooks. Basically, only the driver-specific code remains in the RT loops.
+ f0b9dce: explicitly destory TLS data before destroying TLS
+ bf274cb: add two new macros PA_ONCE_BEGIN and PA_ONCE_END which allow usage of pa_once without declaring a function to be called
+ 04ed0f9: call dbus_shutdown() before exiting, to make valgrind output more useful
+ 8775309: fix two typos in reference count handling
+ 9be0d70: make newer gcc shut up
+
+2007-09-12 Lennart Poettering
+ ef83a19: extend rtpoll API to allow registration of arbitray functions to be executed in the event loop. Add priority system for specifying the order of these functions.
+ cf3e9da: add missing config.h inclusion
+ 03f311a: reindent, and s/assert/pa_assert/g
+ 4137865: change pa_modargs_get_channel_map() to take an extra argument for specifying the name of the modargs attribute to parse
+ d9c4c95: add new pa_pipe_close() API to close two fds at the same time
+ 7f92542: consolidate close() calls to pa_close(), and make sure on every occasion that we handle failures of close() sensibly
+
+2007-09-11 Lennart Poettering
+ 54506ab: on systems where we know that POSIX shm is mapped to /dev/shm, add the ability to cleanup stale SHM segments. (Right now only Linux)
+ d5bedbc: remaining s/assert/pa_assert/ and refcnt.h modernizations
+ 2988c3d: Rework core-error.c on top of PA_STATIC_TLS_DECLARE, the windows specific parts need to be moved to thread-win32.c
+ abb18d9: explcitly initialize tls memory to NULL
+ 9c523e0: more modernizations, s/assert/pa_assert/g
+ 27f13b3: finish modernizations in pulse/, s/assert/pa_assert/g
+ 038e560: More s/assert/pa_assert/ modernizations
+ 391d09c: add 'wait' parameter to pa_rtpoll_run(), if zero pa_rtpoll_runn will only update the struct pollfd but not wait for an event
+ 597a1c4: port client libs to refcnt.h
+ 55d9fcb: add globally defined PA_PATH_SEP macro, replacing private per-file macros
+ 6ac66e4: add missing config.h includes
+ e2e2ce7: Instead of including config.h from header files, check whether PACKAGE is defined and if not, fail (thus using PACKAGE as a check for inclusion of config.h)
+ 848a4d7: more s/assert/pa_assert/ modernizations
+
+2007-09-10 Lennart Poettering
+ 9b0ab39: unify static TLS support, make use of gcc __thread attribute if available
+ 3d122d0: s/assert/pa_assert/ modernizations
+ de21b54: add new API pa_threaded_mainloop_in_thread(), update test case for it
+ a6f8b81: simple modernizations: s/assert/pa_assert
+ 6629886: make sure we send each memblock only once when recording, not twice
+ d5caa02: minor cleanup
+ a77158e: make the memchunk writeable before silencing it
+ 841fcb4: beef up comment
+ 98f9bd6: make sure that the device volume is properly read before we call pa_sink_put() and thus make the pa_sink available
+ 69ece66: add pulseaudio logo with text
+ 44e514c: update todo file a little
+ 6c1682c: hide a couple of files
+ 27c3bd4: document that the native amd64 atomic ops implementation is incomplete
+ 06db921: don't call pa_source_process_msg() for PA_SOURCE_MESSAGE_GET_LATENCY, since it makes querying the latency always fail
+
+2007-09-10 Pierre Ossman
+ d9b3c0e: posix_madvise and posix_fadvise aren't present on all systems.
+ 9630e8d: Remove mkdir_p again...
+ 028632f: TIOCINQ isn't present on all systems.
+ e176601: Monotonic clock is optional so treat is as such.
+ 717b164: POSIX realtime clock functions are in time.h so make sure to include it.
+
+2007-09-09 Tanu Kaskinen
+ dfdf1d7: Changed PA_SAMPLE_S16_NE to PA_SAMPLE_S16NE in the example code in the Simple API Doxygen documentation.
+
+2007-09-06 Lennart Poettering
+ b41dbfd: fix an assert when runnig module-oss in record only-mode. optimize allocation of memblocks on playback
+ d60940d: install libpulsecore again, since libtool otherwise links it statically into every single module
+ e4eefb8: fix copynpaste error
+ 45ba711: downgrade realtime group membership warning to 'info' at be a little bit more elaborate
+ 3b2cf1a: update default config:
+ b1fd53b: explicitly test for the availability of dbus_watch_get_unix_fd() before using it. The previous version-based check didn't work anyway since the constants checked for weren't set.
+
+2007-09-04 Lennart Poettering
+ a0d19c0: update libltdl copy
+ a4757a1: add native amd64 atomic int implementation
+ 984ef82: detect whether gcc atomic builtins are available
+ 4c31ff9: fix a couple of compiler warnings
+ 2dbe137: if available, use native gcc atomicity builtins
+ 31c04a9: create config.rpath to fix build on fedora
+ ac5f978: add a few missing files for make dist
+ 738f7d7: drop initial libtool_lock() call since this is a debian-specific borkage
+ d1927c7: initialize libltdl for multi-thread support
+ 65ac0ea: When in PA_STREAM_AUTO_TIMING_UPDATE mode, delay completion of initialization until we have the first timing data
+
+2007-09-03 Lennart Poettering
+ c029038: actually add source code of module-default-device-restore
+ 11bf380: add a new module module-default-device-restore which automatically saves and restores the selected default device. Enable it by default.
+ 1d3e70c: header file cleanup
+ 104feb0: only list supported resampling methods when --dump-resample-methods is executed
+ c9a0df3: add new API function pa_resample_method_supported() which tests whether a resampling method is supported. Fix building with libsamplerate enabled
+ 5bc1221: actually define HAVE_LIBSAMPLERATE with AC_DEFINE
+
+2007-09-02 Lennart Poettering
+ b2c4779: make libpulse-core a noinst lib, because it does not have yet a stable API and won't get one anytime. Also, don't install its header files
+ b6bfaa9: add missing configure.ac part of the libsamplerate patch from r1753, re #125
+ 2e8244b: Allow compilation without libsamplerate; based on patch from Marc-Andre Lureau; re #125
+ cc8c499: fix dbus version check for dbus_watch_get_unix_fd()
+ 011dfa5: make argument to pa_memchunk_will_need() const
+ 68981e5: fix build for dbus < 1.1.1, re #126, patch from Marc-Andre Lureau
+ ca059ab: Don't set RLIMIT_MEMBLOCK to 0 on startup. Retain 4 pages
+ 3e188b1: make use of pa_memchunk_will_need() before handing sample cache audio to the RT threads
+ 7dbabc4: add new pa_memchunk_will_need() API, similar to pa_memblock_will_need()
+ f36ca79: add new API pa_memblock_will_need() and make use of PA_PAGE_SIZE macro
+ 2f7b6fe: add new pa_will_need() API for paging in memory
+ 8cf822a: make use of new PA_PAGE_SIZE macro
+ b54e71a: make use of new memory page alignment macros, reindent
+ fe1f55b: add a couple of macros for memory page alignment
+
+2007-08-31 Lennart Poettering
+ 1df817c: add pa_channel_position_to_pretty_string() to header
+ 718b1d2: add pa_channel_position_to_pretty_string() for usage in pavucontrol/pavumeter
+ 02811bf: make sure that we make include paths absolute before calling chdir()
+ a132226: minor reformatting
+ 6eb2f88: add two new functions pa_make_path_absolute()/pa_getcwd()
+ c627871: replace a pa_assert() by an pa_assert_se()
+ f59dd18: - fix suspend handling
+
+2007-08-30 Lennart Poettering
+ 241ad04: port module-combine to new core
+ 4d623f0: Lots of assorted minor cleanups and fixes:
+ b552541: reorder initialization of pa_core variables
+ ca72adf: modernize and make use of a static flist for allocating idxset entries
+ 821eb8e: move queue processing code into pa_thread_mq
+ 687f1f1: add new function pa_memblock_ref_is_one()
+ c2e4328: fix pa_memchunk_make_writable(), make memchunk functions return the memchunk they modify
+ bfe69ce: add an assert()
+ 6817987: add pa_timespec_reset()
+ 747b01b: make passing a code pointer to pa_asyncmsgq_get() optional
+ ee97c42: add new PA_SINK_CAN_SUSPEND/PA_SOURCE_CAN_SUSPEND flag
+
+2007-08-26 Lennart Poettering
+ d88514c: drop check for gid < 500, since this isn't really a security improvement, re: #111
+
+2007-08-25 Lennart Poettering
+ 0362350: Add option --dump-resample-methods to list available resampler implementations
+ 782d5a5: make floating point speex resampler the default
+ 89fcd51: enable -ffast-math for gcc
+ f82067f: lower suspend timeout to 1s
+ f4e2d23: include ffmpeg resampler in build
+ 9439e81: make ffmpeg resampler actually work
+
+2007-08-24 Tanu Kaskinen
+ 6687dd0: Corrected a bogus comment.
+
+2007-08-24 Lennart Poettering
+ f0dbbe9: add makefiles to speex/ and ffmpeg/ to easy compilation from emacs
+ 640ae04: Copy resampler from ffmpeg into our sources
+
+2007-08-23 Lennart Poettering
+ f754a24: make speex resampler the default
+ ed4dc16: big resampler rework: support integer-only resampling, support speex resampler
+ 4eb9bb0: fix a bad memory access when destructing pa_memimports
+ c1cdcfd: a couple of modernizations; parse RE sample types properly
+ c72d4c6: add a small speex wrapper so that we can include both the fp and the fixed-point resampler in the same binary
+ fdead57: build speex resampler tiwce, once for fixed point, one for floating point
+ 5ff891c: add a copy of the speex resampler to our sources
+
+2007-08-22 Lennart Poettering
+ b3b382d: fix minor typo
+ 9d38159: port remaining sinks to pa_rtpoll
+ 1bfa180: minor cleanups
+ 0ff2afd: support absolute, relative and periodic timers in pa_rtpoll
+ 53b872c: port alsa driver to make use of new pa_rtpoll object
+ 79d3ddd: reverse hrtimer check, add missing #include
+ b937009: add convenience functions to hook up pa_fdsem and pa_asyncmsgq to an pa_rtpoll; add pa_rtpoll_item_get_userdata(), on EINTR/EAGAIN, reset revents; automatically destory left over items
+ 7490977: add missing include
+ 0449966: make pa_make_power_of_two() and pa_is_power_of_two() inline functions
+ 190648a: add missing #include
+ 0da65cf: add message about hrtimers, and initialize pa_core::high_priority
+ 0af0fb8: hide rtpoll-test from svn
+ 7fca890: check pa_core::high_priority before becoming rt thread
+ b302946: add new option to pa_core stating whether we are running as high prio process
+ 3546198: add check for ppoll()
+ 8568f70: add rtpoll, rtclock, rtsig to Makefile
+ dc9d803: add test program for pa_rtpoll
+ 78c362c: add new realtime event loop abstraction which precise time keeping by using hrtimers on Linux, if they are available
+ 8972d06: add facility for managing realtime signals
+ ef2bc41: add monotonic clock abstraction pa_rtclock
+ 6bfeef1: rename a few things in a macro to make name collisions less likely
+ 531cc3c: make use of new public function pa_is_power_of_two()
+ b7b119a: add pa_is_power_of_two() and pa_make_power_of_two() functions
+ a0ad42a: add macro for creating static TLS objects
+ b0b06b0: add more PA_PTR_TO_XXX macros
+ fa7fc31: modernizations
+
+2007-08-20 Tanu Kaskinen
+ eaafb79: Modified the JACK sink heavily:
+
+2007-08-16 Lennart Poettering
+ 2d292be: use realtime scheduling for ALSA and OSS driver threads
+ 876e682: never stay root after startup, even if we don't have capabilites
+ 5e93816: seperately get high nice level and acquire realtime sched
+ d5cbf4f: Keep CAP_SYS_NICE not only in PERMITTED but also in EFFECTIVE capset
+ 843dcce: only suspend device when server is local
+ 39d1e65: truncate service names if necessary, include user name in service string
+ 03b0b1d: add pa_truncate_utf8() function for truncating a string and guaranteeing it stays valid UTF8 afterwards
+
+2007-08-15 Lennart Poettering
+ 81cdb37: add fedora-snapshot target
+ c0d6684: fix an awful race condition when handling data requests
+ 1ff4786: don't fail if no pa is srunning
+ a96c5f8: add new tool pasuspender which temporarily suspends all sinks and resumes them later again
+ 33c6f9d: set CLOEXEC on more fds
+ 5679de5: add new commands suspend-source, suspend-sink
+ d2d0978: add protocol support for muting sink inputs and suspending sinks/sources
+ 0640615: bump protocol revision and soname of libpulse
+ b20d204: use pa_source_suspend_all/pa_sink_suspend_all for suspending all sinks/sources
+ a74e804: fix muting for sink inputs
+ 3d92990: actually mute sinks when asked for i, add new function pa_sink_suspend_all
+ 6f714d9: actually mute sinks when asked for i, add new function pa_sink_suspend_all
+
+2007-08-13 Lennart Poettering
+ 44f91cf: load module-x11-xsmp from a /etc/xdg/autostart file, to make sure it is loaded when we have XSMP
+ 80f5abf: add load-module and unload-module commands to pactl
+ 8a663d4: a couple of build fixes
+
+2007-08-12 Lennart Poettering
+ 1d5e9f0: deactivate module-x11-xsmp by default, due to a deadlock when pa is being started from gnome-session
+ e381dd9: 64 bit fixes and minor gcc shut ups
+ 5e96d5d: yet another new glibc build fix
+ 3cbcb98: build fix for newer glibc
+ e6714e1: make make distcheck pass
+ db7fdf6: make make dist work
+ 55f3d34: ship full libltdl tree in SVN to make sure we can build this crack on fedora
+ b16d8e2: bump soname and stuff for fedora pre-release
+
+2007-08-11 Lennart Poettering
+ 1cecd46: Resurrect ability to move streams between sinks
+ 79a586d: add comments describing the context these functions are called from
+ 3d81dde: modernize pa_play_memblockq() and add a new function pa_memblockq_sink_input_new() which allows creation of memblockq streams without activating them immediately
+ 14d93fc: minor cleanup
+ 45e4954: fix latency reporting for oss and alsa modules
+ 06f2799: minor modernizations
+ 57734ec: hook into move operations for resuming/suspending devices appropriately
+ 44b82a1: Add 'via DMA' to sink/source description if device is accessed with mmap()
+ e71a347: restore the ability move record streams between sources
+ 50e014e: use single array for storing pa_core hook lists, add sink state changed hook, drop NO_HOOKS flags for sink inputs/source outputs, listen for resume events in module-suspend-on-idle.c
+ a3cd800: port oss driver to make use of the default fragment sizes as defined in pa_core: store in the sink/source description whether mmap is used; if mmap() fails, fall back to UNIX read/write mode instead of bailing out immediately
+ b71dde0: make sure that the device access event sound is only generated once
+ 447c4a5: deal with messages properly which are recieved after destruction of a stream
+ 107b23d: fix module-hal when no api= argument is specified
+ c1c59b4: add proper refcounting to pa_asyncmsgq objects, to allow destruction from the dispatched callbacks
+ f7b707b: allow destruction of pa_fdsem object that are still in 'poll' state
+ e1100b5: modify alsa drivers to make use of new global fragment setting variables
+ 793f750: fix default device naming and fix api selection code
+ a7a5f43: modernization
+ e2a10de: allow setting the default sample and fragment settings from the config file
+ b44ce9e: add default fragment settings variables to pa_core
+ 59c9ed5: move pstream item allocation to pa_flist
+
+2007-08-10 Lennart Poettering
+ d2fed9d: make revoke/release thread safe in the native protocol
+ ff4814c: add callbacks for the revoke/release stuff, so that we can make this thing thread-safe
+ 4e145b6: if no thread-mq is attached to the current thread, return an error, don't hit an assert
+ 3eae903: make use of pa_thread_mq everywhere
+ b3f1a13: minor update
+ f7171e8: Wrap two pa_asyncmsq in a new pa_thread_mq object for bidirectional, lock-free communication between a main loop and a thread
+ aff77c1: update thread test to use pa_once instead of pa_once_t
+ 27f75a5: Rename pa_once_t to pa_once
+ d4cb042: move pa_queue to an implementation based on pa_flist
+ ac49cc2: do not acces playback pa_messagq from main thread
+ 72840ab: minor cleanliness fixes
+ 357c0e4: fix closing of fds in gconf module
+ ffa1708: * drop redundant pa_core argument from module initialization functions
+ e621071: fix minor memory leakage
+ 10b135a: avoid duplicate loading of modules
+ 1e5ca51: handle ACLAdded messages for previously unknown devices identically to a really new device
+ 3b078b2: Avoid a race condition when one PA instance gets HAL's ACLAdded message before the previous owner instance has given up access to the device, and thus the device is blocked
+
+2007-08-09 Lennart Poettering
+ d9e44c5: Add X11 XSMP module for hooking into the X11 session manager, for being notified about X11 disconnects before they actually happen, so that we are not killed by the bloody xlibs
+ 5831677: modernize
+ 3dfdb21: don't assume that sink/source is already unregistered from namereg when disconnect hook is called
+ 1c7b842: play ACL event sound only when gained access, not when losing it
+ b751f3a: s/login.wav/startup3.wav
+ 02bf2f2: update default configuration
+ 0f15574: protect memimpors with a recursive mutex to avoid deadlock when shutting down
+ e76efa9: forgot to actually add the new suspend-on-idle module source code
+ bb46da3: add new module-suspend-on-idle module which suspends sinks/sources which are idle for more than 5s (or any other configurable time). Power saving, here we come\!
+ 9c89f37: if we get access to a device we don't know yet, add it to our tree instead of ignoring it
+ 30ccf9a: add a couple of additional hooks for modules to use
+ ed01e1a: don't hit an assert when we cannot resume a device
+ eaddc01: by default, store esd socket in /tmp/.esd-`id -u`/socket, instead of /tmp/.esd/socket, to allow multiple simultaneous esd instances. this is only compatible with a patched esd, which however ubuntu and fedora ship now. other distros need to patch their esd as well, or may pass socket=/tmp/.esd/socket to module-protocol-esound-unix
+ 33cd5e2: listen for HAL ACL events; play an event sound on hw coldplug, hotplug and ACL access
+ 0c29a2f: add new function pa_scache_play_item_by_name
+ 23ba125: fix bug in handling of defer events
+
+2007-08-08 Lennart Poettering
+ a69f470: modernize module-hal-detect.c and check for ALSA pcm_class != modem
+ 26a0246: modernize dbus-util.c
+ e4e9a06: be more verbose when device does not support sampling parameters
+ fedca91: Remove warning when client is too slow to handle our data
+ df9522c: properly reinitialize pollfd array after resume
+ 54b9f55: properly reinitialize pollfd array after resume
+ 981d5fa: don't print error on socket read/write failure
+
+2007-08-07 Lennart Poettering
+ 366d1d3: reinitialize sw params after resume
+ 0a6f9af: add global suspend command to cli
+
+2007-08-06 Lennart Poettering
+ 1f9ce59: port esound protocol to new lock-free core
+ 243f2fc: minor fixes and cleanups
+ 74b3b6d: fix playback status querying
+ 455ff8d: fix a memory leak
+ 62790cc: fix playback over native protocol
+ c306b83: initialize 'length' properly
+
+2007-08-05 Lennart Poettering
+ 6775386: make sure to handle disconnecting our own connection properly
+ 41d67c4: minor optimization for cacheing in of samples by using posix_fadvise
+ 872951c: use posix_fadvise to avoid page faults when reading audio files from disk
+ 9d1eb1b: play memchunks completely
+ bd0782e: initialize method pointers properly
+ 241a9e1: follow rename of pstream_close() to pstream_unlink()
+ 55e0866: typesafe casts
+ 23d01bb: Modernize pstream.[ch], reintroduce defer event to make things actually work
+ 36dd781: modernize play-memchunk and port it to the new core
+ 34e4165: minor cleanups
+
+2007-08-04 Lennart Poettering
+ 81760ad: merge compat changes from trunk
+ 5ecaf31: compat with automake 1.10
+ 7455571: jack driver build fix which became apparent on fedora
+
+2007-08-03 Lennart Poettering
+ 95fab18: Don't stop hardware on buffer underruns. Instead continue playing to guarantee that our time function stays as linear as possible.
+ a6c44c0: Remove unnecessary snd_pcm_hwsync()
+ 9a4e84a: On recommendation of Takashi Iwai prefer Master volume control over PCM and don't control Mic control
+
+2007-07-31 Lennart Poettering
+ d3eca28: rename pa_source_output_new_data::corked to start_corked to match pa_sink_input_new_data::start_corked
+ 0defdfb: A lot of updates, all necessary to get the native protocol ported:
+
+2007-07-28 Lennart Poettering
+ a82505e: port module-alsa-source to new lock-free core
+ 13a4327: minor cleanups
+ 6afbbba: fix suspending logic
+ 81aa8ea: drop data from inputs only when in running state
+ 1615450: It is now allowed to call pa_sink_get_volume() from thread context
+ 8aee345: Fix suspending/resuming
+ 5fbb8e1: add PA_SINK_OPENED/PA_SOURCE_OPENED macros for easier checking for _IDLE or _RUNNING states
+ 10cb048: restore proper mixer volume control
+ 9dac60c: reload OSS volume after unsuspend
+ dd40020: bring back alsa fd list managemet, since we need it for proper mixer change notification
+ 787f935: port module-alsa-sink to new lock-free core. also add mmmap'ing support while doing so.
+ c7df4ba: minor modernizations
+
+2007-07-26 Lennart Poettering
+ 8e4660a: Disable memory mapping if we open the device in O_WRONLY. Unfortunately we cannot do mmap() in Linux without opening the device for reading as well.
+ c936e53: Fix channel remapping in resample; other modernizations
+ 4cc0d0a: remove some log messages
+ 86abfbf: remove debug messages; don't queue request messages like nothing when send file is finished
+ bbb347f: properly free memblocks when skipping over them
+ 042cb09: make valgrind shut up regarding non-freed ident strings. other modernizations
+ bc17b8e: reverse order flist destruction and mempool allocation warning
+ 222a6d2: Increase ref counter of sink input as long as it is included in the sink idxset
+ d80fd10: properly deref sink_input/source_output objects when removing them from a sink/source
+ 58af737: Add fdsem to makefile
+ 8cdde28: reverse order of printf and push to make output more readable
+ bc36932: port asyncq to make use of new fdsem object
+ 6ad165c: add abstracted file descriptor based semaphore object that is lock-free in the best cases
+
+2007-07-25 Lennart Poettering
+ 8836396: Store strings directly in strlst elements, other modernizations
+ 98d36ef: fix some alignment issues and modernize file a little bit
+ 929526d: Convert most snprintf() calls to pa_snprintf()
+ 8e83838: Modernize things a little bith more
+ 2a43bbf: Modernize things a little
+ 2380ad9: add our own implementation for pa_snprintf() because NUL termination is apparently not guaranteed on windows and a couple of other libcs
+ 9e9dc0b: Simplify implementation of pa_assert_se()
+ 068f5d5: drop chunk argument from various drop() functions, since it doesn't make any sense if we want to guarantee always monotonously increasing read pointers; a couple of other fixes
+ 9cc20b4: update static free list usage in asyncmsgq
+ e339d4b: update static free list usage in hashmap
+ f42e443: destruct freelists properly, by using gcc destructors. we do this only to make valgrind shut up, not because it would have any real value during runtime
+ 279b1b3: wrap destructor gcc attribute in macro
+ a094923: change order of munmap and freeing of memblocks
+
+2007-07-14 Lennart Poettering
+ c76d035: Fix a couple of typos in the resampler code
+
+2007-07-13 Lennart Poettering
+ 2a19c46: Fix typo in pa_memblock_release() call; s/assert/pa_assert/
+ 65d54d6: s/assert/pa_assert/g; make use of static flist for memblock allocation where applicable; properly initialize length value in pa_memexport_put()
+ 0e84f04: Minor clarification
+ f2c98d7: Make use of static flist for hashmap entry alllocation
+ 69bfa35: Actually make the static flist static
+ 3b912ac: Port module-sine to the new lock-free core
+ 8442926: Reenable a couple of more modules
+ 59faa5d: Remove a superfluous pa_memblock_release(); properly handle buf4 allocation
+ 63c231e: Fix concurrency bug when turning memblock into a local memblock
+ 481b425: Fix off-by-one in mixing code
+ ca5874d: Replace a couple of assert()s by pa_assert()s
+ ac1387d: Remove module-oss-mmap, since it is now merged into module-oss
+ a42c19e: Merge module-oss-mmap into module-oss and make suspending working properly
+ 295e1c8: Make pa_sink_render_* and pa_source_post work only when in RUNNING state, to fix handling of monitor sources when their sink is suspended
+
+2007-07-12 Lennart Poettering
+ 0a095f6: Properly initialize all revents on EINTR
+ 1a84664: Make sure pollfd[POLLFD_ASYNCQ].revents is properly initialized on signal
+ 683fc4c: fix segfault when recording with module-oss.c
+
+2007-07-10 Pierre Ossman
+ b0f692c: Make sure we link to the core to get all symbols.
+ a228a51: Solaris hides inet_ntop in nsl.
+ 689fd70: Make -no-undefined actually work (and fix up error found by it).
+ 405d675: Move pthreads detection as it gets confused by things in LIBS.
+
+2007-06-25 Lennart Poettering
+ eec2fbe: Port module-oss to the new lock-free core
+ 6312938: remove pa_memblockq_is_writable() (because it is stupid and not used anywhere anyway, and replace all assert()s with pa_assert()s
+ a482b9f: make sure we don't free the same connection twice
+
+2007-06-24 Lennart Poettering
+ 6776678: Limit silence buffer size for pa_sink_render()
+ de02c74: Track the 'missing' variable safely between the threads
+ d873731: rework the logic of pa_asyncq
+ 77ebe70: Make sure the returned pa_msgobject object has a valid refcnt before returning it
+ 099f3f2: Include assert.h, since we use assert() for our pa_assert() macro
+ a9fcd59: Fix length calculation in pa_silence_memblock_new() and make use of pa_assert() everywhere instead of assert()
+ fdd3ac9: Make use of dbus_watch_get_unix_fd() instead of dbus_watch_get_fd() because of deprecation of the latter
+
+2007-06-23 Lennart Poettering
+ bb3ad9d: Update OSS driver for new lock-free core
+ 013a55a: remove underrun condition in pa_sinks. Instead return silence in pa_sink_render() when necessary. This is required to guarantee that the time functions in connected sink inputs stays linear
+ 780f736: don't handle underrun special
+ f061636: drop silence generation from sink drivers
+ fff9081: fix a typo and some minor optimizations
+ 1c9bd20: minor cleanups and optimizations
+ e24c8de: Fix minor typo
+
+2007-06-14 Lennart Poettering
+ deb523e: Port module-pipe-source to the new threaded design
+ 94f6ab5: Fix another ugly typo, which made source outputs unusable
+ e279778: use pa_memblockq_push_align() instead of pa_memblockq_push() to deal with unaligned data coming from clients
+ 1d7096b: Show memchunk length in debug output
+ 1c62ce6: Fix a nasty typo in pa_asyncq_pop
+ 572c77f: Remove anotify.[ch], since it is now entirely replaced by pa_asyncmsgq
+ 5e72ac3: rework sink input/source output state machine
+ 260dd1e: Make debug message more useful
+ 1b99fd2: Move a few things between the threads
+ 111dcd5: trivial cleanups
+
+2007-06-13 Lennart Poettering
+ be4a882: A lot of more work to get the lock-free stuff in place
+
+2007-06-13 Pierre Ossman
+ 0694d2a: Make sure mixer ioctls work on /dev/dsp aswell.
+
+2007-06-11 Lennart Poettering
+ 6911568: make untabify
+ 590ae20: Add new untabify makefile target
+ a4fed0f: make eolspace
+ 00da37f: Merge HUGE set of changes temporarily into a branch, to allow me to move them from one machine to another (lock-free and stuff)
+ 6aeec56: add a new private branch
+
+2007-06-11 Pierre Ossman
+ 14cbbe1: Support stat() and friends as some programs (audacity) likes to check if
+
+2007-06-04 Pierre Ossman
+ 13a4c52: Add support for the poorly documented SNDCTL_DSP_GETTRIGGER.
+
+2007-05-29 Lennart Poettering
+ 1e12e0e: Kill spaces on EOL
+ e4d63d0: add target "eolspace" to makefil to remove trailing newlines from all source files
+
+2007-05-29 Pierre Ossman
+ 5530d32: We now use gid unconditionally, so make sure it's defined.
+
+2007-05-28 Lennart Poettering
+ 67cb775: build fix for systems lacking capability suppoort. (Problem identified and original patch supplied by Diego Petteno
+
+2007-05-27 Lennart Poettering
+ 707def1: Bump revision of libs and package
+ 918cacb: Replace AO_xxx usage with pa_atomic_xxx and friends wherever it makes sense
+ 6a2dffd: unfortunately we cannot detect if a foreign thread is still running. Thus sucks. But what can we do? U. Drepper thinks our use case is invalid.
+ 872018e: Minor optimization: read log level character code from array
+
+2007-05-26 Lennart Poettering
+ d949983: Add a new meta command ".ifexists" to the CLI language, to execute commands only if a specified file exists. Original patch from cjvdb. Closes #36
+
+2007-05-25 Lennart Poettering
+ 4d88fcd: when called with the setid bit change euid to uid sooner to make sure that we can access our own files even when we dropped most capabilities. (Closes #21)
+ 65e8761: fix suid Makefile target
+
+2007-05-23 Lennart Poettering
+ 0032642: only browse for ipv4 pa servers for now. Needs better fixing which however is not trivial and probably breaks the API
+ 79c94db: Fix another DoS vulnerability that has been identified by Luigi Auriemma. (Finally closes #67)
+ 30c52e5: add a missing initialization that causes a crash when parsing invalid volume restoration tables (Problem identified by Luigi Auriemma, re #67)
+ 33304ba: Fix a DoS with allocating overly large silence buffers. (Identified by Luigi Auriemma (re #67)
+ 4a05bc9: don't allow excessively high sample rates
+ cf925b1: Fix yet another DoS vulnerability, also identified Luigi Auriemma (re #67)
+ c3b5de7: fix minor typo
+ f903395: Fix another DoS vulnerability, also identified Luigi Auriemma (closes #67)
+ 407a1b6: fix a DoS vulnerability (re #67), originally identified by Luigi Auriemma
+ 8e738ed: fix a few obvious copynpaste errors when handling volumes
+ 0e53f93: Treat empty :0.0 identically to unset :0.0 when trying to find a PA server. (Closes #87)
+ 312c326: Fix module-oss for devices that return EAGAIN when we don't expect it. (Closes #66)
+
+2007-05-22 Lennart Poettering
+ 01ddb54: show socket directory when we fail to create it. (Closes #85)
+ 960b5cb: Fix build and only load OSS xor ALSA modules if both are available
+ e41b91e: drop unused variable
+ 16dd5f7: fix comment
+
+2007-03-07 Pierre Ossman
+ 9ee3981: Add support for SNDCTL_DSP_SETTRIGGER. (closes #56)
+
+2007-03-06 Pierre Ossman
+ f6023cb: Fix some instances where we printed a string without first checking that
+ e042a90: Pulsecore should be linked into all modules.
+ 0b14c02: Don't fail if hal doesn't currently contain any devices. (closes #55)
+
+2007-03-02 Pierre Ossman
+ 2b82336: Handle suspended alsa devices. Based on patch by ranma. (closes #26)
+
+2007-03-01 Pierre Ossman
+ 19b17ff: Revert stuff from commit 1431 that wasn't supposed to be there.
+ bb81243: Handle when ALSA tweaks our sample spec so much that the frame size changes.
+ 6ba21d4: Add some debugging output from sample cache subsystem.
+
+2007-02-14 Pierre Ossman
+ df47c7b: Add a wrapper around close() to work around Windows' ass backwards way of
+ 8bf7943: Allow a formatted string in the validation warning.
+ 3016c75: Prefix log lines with a character indicating level.
+
+2007-02-13 Pierre Ossman
+ 06211b7: Add copyright notices to all relevant files. (based on svn log)
+
+2007-02-12 Pierre Ossman
+ 1d0e8e4: Make sure we get proper host identifiers.
+ de7a883: Allow specification of device number.
+
+2007-02-05 Pierre Ossman
+ f65ab1b: Don't abort config loading when the user specific cannot be loaded.
+
+2007-01-19 Pierre Ossman
+ 4171f25: Make sure we report success for SNDCTL_DSP_SETDUPLEX.
+
+2007-01-04 Pierre Ossman
+ 4c0a481: Report IO error on ioctl() when we're in a fatal error state.
+ c992ed9: Free stream objects when they've been invalidated.
+ 19bd914: Fix error messages for failure connecting streams.
+ 521daf6: Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
+
+2006-12-04 Pierre Ossman
+ 1a460ee: Fix silly copy-and-paste error. (closes #45)
+
+2006-11-24 Pierre Ossman
+ 68bcbd2: Fix incorrect assert.
+
+2006-11-10 Pierre Ossman
+ 7933cba: Add atomic.h as a dependency at relevant places.
+ 86f4c21: Make sure we package version.h.in.
+
+2006-11-09 Pierre Ossman
+ 0a37ec2: Yet again try to fix the creation of necessary directories when srcdir !=
+
+2006-11-08 Pierre Ossman
+ 0ef2d7e: Support reversed endian floats. (closes #28) (closes #35)
+ 55c25c6: Check correct variable for return value. Closes #37.
+
+2006-11-06 Pierre Ossman
+ d4ca81f: Fix some missing line breaks.
+ 8dc6214: Revert r1404 and keep it on a development branch until it is fully tested.
+ d664492: Create branch for lock free memblock implementation.
+ 6ca8193: The OSS spec is unclear what should happen when a reset is requested. Let's
+ 9776596: Handle when threaded mainloop is freed before it is started.
+
+2006-09-26 Lennart Poettering
+ d210ebb: rework memory block management to be thread-safe and mostly lock-free.
+ 5ad143b: upgrade refcnt.h to make use of our new pa_atomic_xxx() API
+ 736de36: add asynchronous inter-thread notification API
+
+2006-09-20 Lennart Poettering
+ f1021b9: enable module-hal-detect in the default configuration file only if HAL support is enabled (closes #30)
+ bf83a96: rename default realtime group from "realtime" to "pulse-rt", since it is pulseaudio specific. you may still pass --with-realtime-group=realtime to configure to get the old behaviour
+
+2006-09-19 Pierre Ossman
+ 71a6ceb: Revert r1398 as it broke the srcdir != builddir patch. New fix that doesn't
+ 534eeb1: No need to create these dirs as they're part of the source tree.
+
+2006-09-14 Pierre Ossman
+ 29ab939: Stop using x86-isms and use ISO C (oversized shifts are undefined).
+ 5f828c2: Fix debug output for SNDCTL_DSP_SETFRAGMENT.
+
+2006-09-11 Pierre Ossman
+ 7726459: Fix up build structure for platform dependent modules. Also add implementation
+ a85b3e2: Use platform independent sleep.
+ 7c6088d: Fix typo.
+
+2006-09-09 Lennart Poettering
+ fc08db2: ignore flist-test in the correct dir
+ 6b1794d: ignore flist-test
+ 9358d28: update Makefile
+ 0e96d8b: make pa_mutex_new() and pa_cond_new() succeed in all cases. Similar behaviour to pa_xmalloc().
+ 3ae98db: add pa_once testing code
+ d0dcde0: rework pa_once once again, because the once function needs to have terminated before pa_once returns, regardless whether the local call executes it or another thread does.
+ 6d53202: update for newer APIs: replace direct usage of libatomic_ops by usage of our own atomic.h; remove pa_once implementation; always use our pa_once implementation instead of the POSIX version
+ 3426a39: implement trival pa_once API based on atomic operations
+ c89cb6a: add static initializer PA_ATOMIC_INIT()
+ b93fedd: add a test program for the free list
+ ee40a34: implement a simple lock-free free list
+
+2006-09-08 Lennart Poettering
+ bfaa358: add a tiny wrapper around libatomic_ops: pa_atomic_int_t and pa_atomit_ptr_t.
+
+2006-09-07 Lennart Poettering
+ 791bbd8: don't maintain a list of allocated mempool slots, we don't use it anyway
+ 1728e3a: make pa_stream thread-safe: use new refcounting system, protect access using mutexes
+ 0669c99: add missing channel names (fixes a segfault when parsing invalid channel maps)
+ 40f18d9: fix alsa-sink example
+
+2006-09-06 Lennart Poettering
+ 40ecf86: don't hit an assert in the client if posix shm is not available
+ ead67cd: fix indentation
+ 66ec460: fix a bogus debug line
+ 6569199: implement a few more ioctl()s, including a subset of SNDCTL_DSP_GETOPTR. Just enough to make JavaSound work.
+
+2006-09-04 Lennart Poettering
+ e00ba02: remove yet another occurence of pthread_yield() by pa_thread_yield()
+ 6bbfb43: add accessor functions for the userdata attached to a pa_thread object
+ 3be920d: fix pa_thread_is_running() for foreign threads; fix a memory leak for foreign threads
+ 813e95f: port the threaded mainloop to our new abstract mutex/thread API
+ 8e7c2a3: make pa_thread_self() return a sensible pointer on foreign threads
+
+2006-09-02 Lennart Poettering
+ 6db6c83: add missing g_type_init()
+ 2536ba9: rework handling of srcdir != builddir (patch from Flameeyes)
+ e504e80: include PTRHEAD_LIBS in pkg-config file (patch from Flameeyes)
+ b01fabf: update acx_pthread.m4
+ 6528b6b: allow building when srcdir != builddir (patch from Flameeyes)
+ a00c3cb: fix a few autoconf warnings (patch by Flameeyes)
+ 11b6c45: fix esdcompat for non-gnu systems
+ 161c2c0: make esdcompat executable
+ 5fa9cdb: Merge FreeBSD compatibility patch (from Flameeyes)
+
+2006-09-01 Pierre Ossman
+ 647ef18: Fix call to pa_mutex_new().
+ f84c65e: Add pthread_once() equivalent support.
+ 3571bf1: Thread implementation for Win32.
+
+2006-09-01 Lennart Poettering
+ 97202d1: fix a race condition with stream connection vs. latency measuremtn (found by theBear)
+
+2006-08-31 Pierre Ossman
+ 6e3de3d: Make sure libatomic_ops.a isn't included in win32 builds as libtool doesn't
+ 6e9706b: Also wrap yield functionality so that it can be platform independent.
+
+2006-08-31 Lennart Poettering
+ 0f6098b: work around bug in firefox which apparently misuses access() as NULL pointer test. Original patch by "alon". (Closes #27)
+ aee4a37: define AO_REQUIRE_CAS in the Makefile instead of each source file, effectively reversing r1348
+ 7ce39d3: update todo
+
+2006-08-30 Lennart Poettering
+ 2f6cc4f: fix handling of "running" variable
+
+2006-08-30 Pierre Ossman
+ ad0535b: Add AO_REQUIRE_CAS as we do.
+ a6b99d5: Make sure the libatomic_ops lib is included.
+ c4e47c6: Remove check for libatomic_ops library as some systems have no (zero, nada)
+ 078420a: We need to have a callback when changing volume or we might deadlock.
+
+2006-08-29 Lennart Poettering
+ b2c341f: add a threading primitive API
+ 5264d23: make pa_mempool_stat thread-safe/lock-free
+ 327e0cd: modify memory block reference counting to use the new reference counting API
+ 9948cb0: add lock-free reference counting macros, based on libatomic-ops
+ 91d8025: add libatomic-ops to hard dependencies
+
+2006-08-28 Lennart Poettering
+ a633944: fix an misdesigned assert()
+
+2006-08-28 Pierre Ossman
+ 5ecbd9e: Add PulseAudio logo to tree.
+ cd47673: update todo
+
+2006-08-27 Lennart Poettering
+ 1ed3347: increase operation timeout
+
+2006-08-26 Lennart Poettering
+ bc87a58: bump version and sonames
+ b8ea488: fix module-combine when used on top of a tunnel sink
+
+2006-08-25 Lennart Poettering
+ 93e005a: update module-tunnel to latest protocol
+ 8ead68f: activate HAL in the default config
+
+2006-08-24 Pierre Ossman
+ aec3888: Add missing header.
+
+2006-08-23 Lennart Poettering
+ 8f5b86b: fix handling of "mtu" module argument (patch by "theBear")
+
+2006-08-23 Pierre Ossman
+ 2575b44: fix typo
+ 79c4a68: Make the recording a bit more chunky so that we can fit in the pool and have
+
+2006-08-22 Pierre Ossman
+ b27ffbe: Remove silence generation in solaris module.
+ d194604: Remove silence generation in waveout module.
+ 095f357: Proceed with connect even when no cookie is loaded. Allows you to connect
+ 306aea7: Fix memory leak in waveout module.
+ 0249651: Log when there is a problem opening the waveOut/waveIn device.
+ 7bf2540: Fall back to creating a "normal" memory pool if unable to get a shared one.
+ 26bfce6: Improve error messages a bit.
+ cf7b401: Fix up portability of memory pool handling a bit.
+ 10bbc4b: Fix detection of shared memory support and proper fallback.
+ 568c8ea: Fix typo.
+ eeabf63: Add missing header.
+ b5ef414: Fix call to pa_memblock_new().
+ d964459: Fix detection of page size for non-POSIX systems.
+ 7bc7110: Fix missing header for timeval helpers.
+ 1c320fe: Fix calls to pa_memblock_new().
+ 6e3d8af: Add header for pa_cstrerror().
+ 8a16c73: Fix call to pa_pstream_send_tagstruct().
+ 25c0640: Add an ifdef for when we do not have creds.
+
+2006-08-22 Lennart Poettering
+ fef4a20: update todo
+ 22d8e0e: fix typo
+
+2006-08-21 Lennart Poettering
+ 26201b2: fix pactl output (sink drivers and names where switched)
+
+2006-08-19 Lennart Poettering
+ 3d32b96: update todo
+ 3dbc4ae: restore the sink/source for a client in addition to the playback volume. This changes the file format of the table file. To avoid parse errors ~/.pulse/volume.table has been renamed to ~/.pulse/volume-restore.table
+ bffde5d: If a client leaves the sink/source for a stream unspecified by passing NULL as
+ bf62e77: fix a bad memory access
+ ce11b1f: update todo
+ c0b3e8b: when transferring large memory chunks of a pa_pstream, split them up
+ 79b2628: update todo
+ 84d1d3e: update todo
+ b642325: check for posix_memalign and friends
+ 3e0f00f: if MAP_ANONYMOUS is not supported use posix_memalign if possible to allocate the memory pool
+ d50c56a: update todo
+ c6ca9a8: print per-type memory block statistics on "stat"
+ 57f0b08: generate per-type memory block statistics
+ 16ff83f: update todo
+ af87c7d: rework the resample to allocate temporary memory with pa_memblock_new() instead of pa_xrealloc()
+ 521d15b: fix a memory leak
+ 1b7fff3: update todo
+ 47c7a14: add --disable-shm command line option to the daemon
+ a8519d5: add "disable-shm=" to default daemon configuration file
+ dbc658d: add new "disable-shm" server config option
+ c9b6d55: add default "disable-shm" option to client.conf
+ d785b8f: add new "disable-shm" option to client.conf
+ 206ac6f: allow importing of external shm data blocks unconditionally, even when local SHM support is disabled
+ 046bdd9: deal properly with pa_mempool_new() failing
+ 8c9bdb8: fix allocation of anonymous memory
+ c2db5f8: fix a memory leak
+
+2006-08-18 Lennart Poettering
+ c979b87: update todo
+ 40875d6: enable SHM support on the client side only if both the client and the server run as the same user and the server supports it
+ e33abc3: activate SHM support on the server side only when new client supports it and when client and server have the same UID.
+ c313b23: one s/0/NULL/
+ 7ac7909: remove export/import objects when SHM is disable for a pa_pstream object
+ fd3fe96: add new function pa_mempool_is_shared() to test whether a memory pool is suitable for SHM data transfers
+ 7e01b1c: hide memblock-test
+ e385d93: remove all occurences of
+ 1bc62d5: rework logging subsystem, to implicitly include __FILE__ in pa_log() calls. In addition we now record the line numbers and function names of pa_log calls. However, those are only shown If $PULSE_LOG_META is set.
+ 666eca3: update todo
+ 8ebef4d: look for shm_open in -lrt
+ 35caf0c: add new test memblock-test for testing SHM import/export
+ c3fc2ea: update tests for new memory manager
+ 0e436a6: Rework memory management to allow shared memory data transfer. The central idea
+ ff48681: add abstracted shared memory API
+ 20d0823: fix a bad type cast
+ dfa17b9: cleanup hashmap.[ch] a little: use hash/compare func prototypes defined in idxset.h, add pa_hashmpa_{get,steal}_first
+ 8be0cf6: cleanup idxset.[ch] a little: define proper types for the hash/compare funcs, do ptr->int/int->ptr conversions with clean macros
+
+2006-08-17 Lennart Poettering
+ c3df1ce: fix a PA_LLIST_HEAD_INIT invocation
+ a847f74: add missing #include
+ d890660: modify pa_bytes_snprint() to return the string we just wrote to. This should be binary compat with older versions which returned void
+ 99db067: make PA_LLIST_HEAD_INIT thread safe
+
+2006-08-15 Lennart Poettering
+ 1c3bfc4: use the description field of sinks/sources to name the zeroconf services, instead of the logical name
+
+2006-08-14 Pierre Ossman
+ 6c39af7: update todo
+
+2006-08-13 Lennart Poettering
+ 5d8d916: update todo
+ 2bf4653: extend module-rescue-streams to move also source outputs when a source dies
+ 3334814: fix a segfault when registering a service with avahi fails
+ cdb173f: create rtp source output on correct source
+ d182a0b: minor optimization
+ a75e1ed: implement hook_source_ouput_new. For this I modified the pa_source_output_new constructor to take a struct similar to what I already did for pa_sink_input_new()
+ e0f7e86: split a validity check into two
+ 79cb80c: implement hook_source_disconnect
+ 8f91b1f: define new hooks: hook_source_output_new, hook_source_disconnect
+ a09a49e: update todo
+ a7b9a7d: Load module-rescue-streams by default
+ dd87061: implement new module "module-rescue-streams" which moves sink inputs away when their sink is removed.
+ 8180832: properly implement a pa_sink_disconnect() hook
+ 87e64d5: Clean up module description a little
+ abbabd8: ignore if we recieved a memory block for an invalid stream, since this might happen unwillingly due to the asychnronous nature of the protocol
+ 72cf211: remove pa_sink_input::variable_rate field since it has been folded into pa_sink_input::flags
+ 3beef50: hide hook-list-test
+ b37ad1f: modify module-volume-restore to change the initial volume of a sink input from a hook instead of an asyncronous subscription event.
+ a621d90: allow hooking into the process of creating playback streams. To implement this I modified the pa_sink_input_new() signature to take a pa_sink_input_new_data structure instead of direct arguments.
+ b5cbea9: fix bad printf()
+ db3f561: rework hook list stuff once again: change the callback prototype to recieve three data pointers: one to the data for the hook, once for the slot and once for the call
+ 281125c: rework hook list stuff again, and replace macros with real functins. We loose type safety but things are much cleaner now
+
+2006-08-12 Lennart Poettering
+ 2622b0c: update hook list test
+ 82a913d: reall add type safe hook list
+ 80d73dd: implement typeafe hook chain
+ 7f70ca3: extend maximum sink/source name length, because HAL UDIs can get ridiculously long
+ 17964dd: update todo
+ 02e083c: test if sink->monitor_source is set before making use of it
+ dbe6bdd: make use of pa_sink_used_by()/pa_source_used_by() wherever applicable
+ b5207fc: add pa_sink_used_by()/pa_source_used_by()
+ b45c392: categorize todo file
+ 28f86ea: name the sink/source after the device file, just like we already do for the non-mmaped driver
+ bf79e97: generate default sink/source names from the device files they belong to
+ 0050176: update todo
+ 4c9c426: handle hot-remeving of OSS devices properly
+ 3cfed30: print the device capabilities after opening the device
+ fbeeb8b: when the requested sample format is not available for OSS devices, print a nice warning and take what we can get instead
+ 0547b0f: there's no need to queue subscription events if noone is listening, hence don't do it!
+ c86890d: * only load an OSS driver for the first device of a sound card, similar to what is done for ALSA.
+ 7fa0744: fix a segfault in module-oss
+ 2d70271: fix pa_gettimeofday() return value testing
+ adfa76c: update todo
+ 365ceec: update todo
+ 3aba099: clean up event generation a little: suppress unnecessary events and generate new ones on owner change
+ 47d009a: rework subscription code: try to drop redundant queued events
+ f8e5f47: fix a compiler warning
+ e9d9356: add new macro PA_LLIST_INSERT_AFTER
+ 1e12c75: update todo
+ 8da9b94: allow setting the null sink description by a module parameter
+
+2006-08-12 Shahms E. King
+ bb96156: increase module argument buffer size to prevent truncating names
+
+2006-08-11 Lennart Poettering
+ bfa6604: don't set the sink/source descriptions manually, use the new functions pa_{sink,source}_set_description() instead
+ af1b031: comment which values in pa_{sink,source,sink_input,source_output} structures may be NULL
+ c90dd53: * introduce new functions pa_sink_set_description() and pa_source_set_description() for changing the description of a sink/source
+ 0aebc03: update todo
+ bfff23d: shorten sink/source device descriptions a little
+ 1d7b8e1: use the HAL UDI for naming input/output devices
+ 539612a: do not export name validity checking routes and apply them only to sink/source names, not sample names
+ e1316f5: fix bad memory access and a leak when detructing ALSA fd lists
+ 576c4dd: rework name register a litle to only allow "valid" names.
+ bf854c4: Build HAL support only when either OSS or ALSA is available
+ dcd3acc: remove OSS specific code from module-hal-detect if HAVE_OSS is not set. Same for ALSA
+ 7a4e1c9: ALSA: handle write()/read() errors properly by unloading the driver module. This should fix problems when removing USB audio device while pulseaudio is running.
+ b0b968d: change order of the ALSA event dispatch code to make sure that the code survives if the event dispatcher frees the ALSA client
+ 59f1a67: use the copied udi string as hash key for the device table, because the temporary one is freed when the function exits
+
+2006-08-08 Shahms E. King
+ 7ee7a23: add HAL support for OSS devices and capability changes
+
+2006-08-07 Shahms E. King
+ b382df5: clean up hal patch to use pa_xnew and timeval compatibility wrappers
+
+2006-08-07 Lennart Poettering
+ 5d8ccfd: try to reduce volume updates in the ALSA sinks/sources: only touch the shadowed hw volme if necessary
+
+2006-08-06 Lennart Poettering
+ d953870: * add SVN $Id$ tags
+ 050b739: merge HAL support from Shams E. King
+
+2006-08-03 Lennart Poettering
+ f74e5ef: update todo
+ ad95c96: implement "pactl move-source-output"
+ e52436b: implement pa_context_move_source_output_by_{name,index}()
+ 5fdc39d: wrap pa_source_output_move_to() in the native protocol
+ 1c45061: add new CLI command move-source-output as wrapper around pa_source_output_move_to()
+ 2d00de5: Implement pa_source_input_move_to() for moving record streams between sources
+ ddc69fc: - don't call pa_sink_notify in pa_sink_input_new() because the virtual methods are not yet initialized at this time
+
+2006-08-01 Lennart Poettering
+ 7f93d08: bump API and protocol version. Return PA_ERR_NOTSUPPORTED if pa_context_move_sink_input_by_*()is called for servers that don't support it
+
+2006-07-31 Lennart Poettering
+ bc30e2d: add new "move-sink-input" command to pactl
+ bb9b087: wrap PA_COMMAND_MOVE_SINK_INPUT for libpulse
+ 785477b: add new native protocol function for moving sink inputs between sinks
+ 304fcbb: add new commands opcode for moving sink inputs and source outputs
+ ccf67d2: deal properly with recursive module unloading
+ e2e94ca: fix bad memory access if a non-existing entry shall be removed from a pa_idxset by index
+
+2006-07-29 Lennart Poettering
+ d7ee1bc: fix module-gconf initialization
+ 646deea: don't hit an assetr if there are operations outstanding when the pa_context is destroyed
+ a7cf5e0: fix two typos (pierre, have you been sleeping? next time please the comments wrong but the code right, not the other way round! ;-))
+ a1e8b09: add new CLI function "move-sink-input" as wrapper around pa_sink_input_move_to()
+ 5e92950: * implement "hot" moving of playback streams between sinks (pa_sink_input_move_to()).
+ 4dd3b31: free the memblockq if we decide not to play it
+ f15b4c7: if the memblockq is empty, return -1 in all cases
+ 9310a2e: fix calculation of pa_usec_to_bytes, to make sure that it never returns fractions of a frame size
+ b325e07: handle EOF correctly if it is read before the stream was created
+
+2006-07-28 Lennart Poettering
+ d1db037: for the playing field of pa_timing_info use pa_sink_input::state == PA_SINK_INPUT_RUNNING. This means that this variable will now refer to the current state and not to the expected future state, which is probably more what clients expect.
+ f1c4611: fold the seperate variable pa_sink_input::playing into pa_sink_input::state as state PA_SINK_INPUT_DRAINED. The following mappings hold:
+ 12aa842: introduce pa_play_memblockq() which creates a playback stream and passes the data from the memblockq to it. after that is done, frees the memblockq
+
+2006-07-27 Lennart Poettering
+ ecd4655: update todo
+ c21f88c: load module-gconf in default install
+ 0dea223: introduce three virtual sink/source names: @DEFAULT_SINK@, @DEFAULT_SOURCE@, @DEFAULT_MONITOR@. Especially the latter is useful for connecting to the monitor source of the default sink.
+ fec7e9b: if possible do not unload already loaded modules when the gconf settings change. instead try to reuse already loaded modules as much as possible
+ 87d4f0b: because gconf doesn't provide real transactions we emulate our own with a "locked" gconf key
+ 6afb61e: remove superfluous code
+
+2006-07-26 Lennart Poettering
+ 358e577: remove two superfluous lines
+ 0d7be31: mainloop fixes: when disabling time events when dispatching them, make sure to adjust the cache time event and enabled time event counters
+ b2ad9a9: add some protection that the gconf helper process will be killed when the daemon process dies. make sure the gconf helper process doesn't keep open file descriptors belonging to the daemon; if gconf helper path
+ f5d29ac: add missing configure.ac checks for module-gconf
+ cc1d821: add new module "module-gconf" which reads configuration information from gconf. this will be used in my upcoming paconf module
+
+2006-07-25 Lennart Poettering
+ 61ce8bb: add new command line option --no-cpu-limit. This is useful when running PulseAudio in valgrind's massif or callgrind tools
+ 563fab9: Results of profiling PulseAudio with valgrind's callgrind module: rework the default event loop implementation to use PA_LLIST_xxx instead of pa_idxset; don't generate weakeup events if we aren't in STATE_POLLING; minimize dispatching of io events; cache next time event instead of traversing the list of time events on every event loop iteration; other optimizations
+ 216bdd4: split a few asserts
+ 32444f0: split a few assert()s
+ c41d749: add a few more g_assert()s and change all assert()s to g_assert()s
+
+2006-07-24 Lennart Poettering
+ 675bf2f: add autogen.sh for jhbuild (for you, elmarco!)
+ 0f8f5bc: bump version and sonames
+
+2006-07-23 Lennart Poettering
+ 3aac893: add massif target to Makefile
+ c85351b: as a result of memory profiling with valgrind/massif: decrease default hash table size from 1024 to 127. the hashtables are sparsely filled most of the time, so there is no point in allocating to much memory by default.
+ 95eee87: update todo
+
+2006-07-22 Lennart Poettering
+ 07a1c45: fix horribly broken glib timeout event handling
+
+2006-07-21 Pierre Ossman
+ b345af2: Use proper @libdir@ in pc.in files to handle x86_64 machines.
+
+2006-07-21 Lennart Poettering
+ a84a2f9: raise the default value for RLIMIT_NOFILE to 200 since 25 is apparently too small if every single GNOME apps thinks it needs to create its own server connection!
+
+2006-07-20 Pierre Ossman
+ 09e01af: Get ACL:s to work on Win32.
+ 4a59581: Fix incorrect call to nonexistant pa_log_warning().
+ 0762af2: Only warn when running as root and not --system.
+ f3d4924: Centralise check if we're running as root.
+ 57d8a31: Move check for SUID into the caps functions.
+ 8d2dc9c: Handle user switch in a more platform independent manner.
+ b12f29d: Make sure parse_rlimit is only used when rlimits are supported.
+ 246e30a: Add missing header.
+ a3e7595: Make -1 mean "current group/user" so that some platform dependent calls
+ 7ba93eb: Protect platform dependent headers with ifdefs.
+ 2ad6938: Remove unneeded headers.
+
+2006-07-20 Lennart Poettering
+ 40b4089: remove access group setting from default client.conf
+ 55e97b8: fix a few @@ replacments
+ 6ad1f33: even more FreeBSD portability (thanks Flameeyes, again!)
+ 90b521d: add missing #ifdef HAVE_CREDS (thanks, Flameeyes)
+ 2683f25: some more FreeBSD compat from Flameeyes
+ b3d3d16: bump release and sonames
+ da1ec27: remove configurable client access group, since can never work on Linux anway, since SCM_CREDENTAILS doesn't allow sending supplementary GIDs
+ dd5fd8d: update todo
+ 44beeaa: implement "auth-ip-acl=" in the native and esound protocols
+ db75f68: actually ship src/pulsecore/creds.h in the tarballs
+ 30ada90: add IP address ACL subsystem
+ 2409f1a: add support to set resource limits for the daemon and set some of them to some sane values
+ 0ff247d: undo r1111 in some way: include sys/socket.h and sys/un.h but wrap it in #ifdef
+
+2006-07-19 Lennart Poettering
+ 703bb49: add a few comments
+ a382492: * add new function pa_check_in_group()
+ 340803b: use access group dedclared in ~/.pulse/client.conf instead of PA_ACCESS_GROUP
+ 2b31a90: update @@ tokens according to recent Makefile.am change
+ 45a9a8b: fix sed scripts according to #define renames
+ 9c87a65: * add new --system command line parameter to the daemon for running PulseAudio as system-wide instance
+
+2006-07-18 Lennart Poettering
+ 9db7068: remove glib 1.2 adapter. It started to bitrot and wasn't used by anything anyway.
+ d7cdaf2: add two more \since
+ f4ec7d4: fix module-detect on FreeBSD (patch from Diego "Flameeyes" Pettenó)
+ 2c2abbb: turn the glib adapter into a single GSource instead of creating a bunch of seperate GSources for each event
+ ddd5acf: define proper typdefs for callback prototypes
+
+2006-07-17 Lennart Poettering
+ 64d87ac: change licensing blurb form "Library GPL" to "Lesser GPL" on request of Loic Minier. Effectively this means using the same license blurb like in all other source files.
+
+2006-07-17 Pierre Ossman
+ f5afb7b: Forgot to protect one access to with_creds with an ifdef.
+ 4b352e5: Restore SIGPIPE warning when the platform doesn't have MSG_NOSIGNAL.
+
+2006-07-16 Lennart Poettering
+ ba31adc: make pulseaudio compile again on FreeBSD (patch from Diego "Flameeyes" Petteno)
+ e45b1dc: todo
+ 9ced7f6: show summary after "configure" has run (closes: #22)
+ 3b2843d: show value of PA_SINK_HARDWARE/PA_SOURCE_HARDWARE in pactl
+ b91dd23: set is_hardware flag for a few hw plugins
+ 494fa68: add new PA_SOURCE_HARDWARE/PA_SINK_HARDWARE flag
+ 6e38949: add a new boolean variable is_hardware to pa_sink/pa_source to denote wether the specific device is a hardware device or virtual/software
+
+2006-07-15 Lennart Poettering
+ a537b01: update todo
+
+2006-07-14 Lennart Poettering
+ 55a8db8: improve latency calculation of NULL sink
+ d43bcb3: update todo
+ b8f9ae0: remove checking for SIGPIPE blocking from client code. Because we use
+ fc544a6: don't send SCM_CREDENTIALS on every sendmsg(), instead do it only on handshake
+ 3eeecdc: don't set MSG_NOSIGNAL for recvmsg(), since it doesn't make sense there
+ 860be2e: try to use send(,,MSG_NOSIGNAL) instead of write() wherever possible (which
+ 350a253: remove vi'ism
+ dfd864a: update todo
+ 883ce83: add new test get-binary-name-test for testing pa_get_binary_name()
+ a87c43d: Don't call pa_path_get_filename() anymore since it is implicitly called by pa_get_binary_name() anyway
+ 881d4dd: * fall back to prctl(PR_GET_NAME) in pa_get_binary_name() if readlink() fails
+
+2006-07-14 Pierre Ossman
+ 82e680c: Make sure the win32 default conf gets shipped.
+
+2006-07-13 Lennart Poettering
+ 5529604: support time events with NULL timevals which are OK in avahi, but not in PA. This makes padevchooser actually work on top of the new avahi browsing stuff
+ 7484b62: update todo
+ ceb1b6f: remove avahi/howl item from todo list
+ 3f0f4f5: remove howl-wrap.[ch]
+ 6f24a9d: remove HOWL snippet from configure script
+ 1fd18d6: * add proper error handling to pabrowse.c
+ d989c69: add browser.h to doxygen docs
+ 76f93a0: * port libpulse-browse to use the native avahi API instead of the HOWL cruft
+ 3a81620: update module-zeroconf-publish to make use of the native AVAHI API, instead of HOWL
+ 10f7a64: make sure gccmacro.h and cdecl.h may be included at the same time as those headers from the avahi project
+ 8162164: check for avahi in configure.ac
+
+2006-07-10 Lennart Poettering
+ 3428f03: mark HAL for shams king
+
+2006-07-08 Lennart Poettering
+ 9c96bdc: * remove doc/ directory
+ f87f3c8: unhide a few files
+
+2006-07-08 Pierre Ossman
+ e12ead7: Remove some unused m4 files.
+ eb4abb2: Fix typo.
+
+2006-07-07 Lennart Poettering
+ e16cdb5: remove all docs from tarball since they are now available on pulseaudio.org
+ 9a778bd: s/avahi/pulseuaiod/
+ 7fe5e5f: replace remaining ML refs to polyp
+ 81eb4a2: fix mailman URL
+ 9e45991: update readme for 0.9.2
+
+2006-06-30 Pierre Ossman
+ 8b0d134: Make sure we print the file name we actually use.
+
+2006-06-21 Lennart Poettering
+ 18b8b84: increase the maxium number of concurrent esd and native connections
+ 045b05c: include config.h in browser.c (closes #20)
+ 1710041: only interpolate when the last timing info told us the stream is indeed playing
+
+2006-06-20 Lennart Poettering
+ 74e958c: bump version number
+ 84907e6: fix segfault when module-alsa-source fails to load
+
+2006-06-20 Pierre Ossman
+ 320bedb: Fix handling of the io flags in duplex mode.
+ 1040b69: Warn when applications use SNDCTL_DSP_GET[IO]PTR even when they shouldn't.
+ 07edf59: Make fix_metrics() exit early so that it doesn't spam the output needlessly.
+ 1342999: Make sure we do not use pthread_yield() on platforms that do not have them.
+ 3b28358: Check for pthread_yield() as not all platforms have that.
+ 6ca46f4: Make interpol-test build on Win32 and non-pthread systems.
+ 3ff68bd: Fix the final few occurences of polyp.
+
+2006-06-19 Lennart Poettering
+ 230f97a: s/POLYP/PULSE/g
+ 6654e98: update docs
+ 3cf1621: * more s/pulseaudio/PulseAudio/ replacements
+ fe1dadb: update references to the pkg-config files in the docs
+ 0d97ac6: name the pkg-config files after the library names
+ 10b5e99: replace a few remaining uppercase "Polypaudio" occurences with "PulseAudio"
+ 955e33d: hide pulseadudio binary from SVN
+ 25f7969: rename polypaudio.h to pulseaudio.h
+ f44ba09: big s/polyp/pulse/g
+ dd21f11: unhide padsp
+ f6d1154: hide interpol-test
+ 40494c3: * rework latency interpolation to make it smoother
+ 6eabab6: minor cleanups
+ 9f59b4e: add new test "interpol-test"
+
+2006-06-19 Pierre Ossman
+ c6d4cc0: Handle clients that just want to set fragment size (and not count).
+
+2006-06-18 Lennart Poettering
+ bd432f0: * add new argument 'exit_on_eof' to module-cli and make use of it if "-C" is passed to the daemon
+
+2006-06-17 Lennart Poettering
+ 5e1127a: * implement volume adjusting and mixing for S16RE
+ e26bd47: * make hw param settings easier to debug by splitting up long if
+
+2006-06-16 Pierre Ossman
+ 8485a47: /dev/dsp should default to U8, not mulaw.
+ e66b0e6: Creating a stream might take some time, so check that it's in the right state
+ 6684264: Record support.
+
+2006-06-16 Lennart Poettering
+ a529b28: if S16NE is not supported, fall back to S16RE. If FLOAT32NE is not supported, fall back to FLOAT32NE. If still nothing is supported, try everything else in order
+
+2006-06-15 Lennart Poettering
+ 8e37d68: update todo
+
+2006-06-15 Pierre Ossman
+ 3fa491d: Make debug output in padsp a bit less verbose. Specifying -d twice will give
+
+2006-06-13 Pierre Ossman
+ dd0f80e: Make a copy of the va_list as vsnprintf() is free to change it.
+ 0f13c43: Catch the access() system call as some applications do this to test if they
+ b5a8815: Make sure our inet_ntop() implementation gets linked into the new users.
+ 9288479: Tweak the printing of client connections a bit so that it's more apparent
+ 7582f74: Handle pretty printing of IPv6 socket names.
+
+2006-06-12 Pierre Ossman
+ 519aa9b: Use AM_ICONV to determine what needs to be done for iconv support. (closes #19)
+ c32176b: Fix AC_CHECK_DEFINE so that we can look in different files for the same
+ 7c770e2: Also look in winsock2.h for INADDR_NONE. (solves #18)
+ 15a0b28: Properly escape the m4 macros and make the code a bit more readable.
+
+2006-06-11 Pierre Ossman
+ 75ac45b: Add all the preopen libs to the polypaudio binary's dependency list as they
+
+2006-06-03 Lennart Poettering
+ d8dafa0: rework ioline EOF handling to actually work properly
+ 2fa08ba: fix pa_xstrndup() implementation to not access potentially uninitialized memory
+
+2006-06-02 Lennart Poettering
+ 16a275a: actually build cpulimit support if SIGXCPU is available
+ 441362a: fix ugly access-after-free bug when doing asyncronous NS lookups
+ 8b0e6f6: update docs for 0.9.1
+ e092336: bump version and soname
+ 7b961bd: Add new configure options to disable/enable specific modules at configure time. Original patch by ed@catmur.co.uk. (Closes #16)
+
+2006-06-01 Pierre Ossman
+ 02bfa3c: update todo
+ 7a52eab: Try the ltdl mangled name ourselves so that .la files for modules are optional.
+
+2006-05-31 Lennart Poettering
+ 8ca9568: remove superfluous prefixes from service names
+ ac7213d: update TODO
+ 79b6c31: decrease maximum allowed sample frequency for ALSA devices to 5%, since 48000 would otherwise match with 44100
+
+2006-05-30 Lennart Poettering
+ 9f2026d: downgrade a log message
+ 64fa5b8: * alsa-sink: if "PCM" is not found as mixer track name, fallback to "Master"
+ bb820db: * if an ALSA device doesn't support the channel count requested, use what ALSA suggests instead
+ 821a49b: update todo
+ 73eedcb: load alsa modules with device string hw:0 instead of hw:0,0
+ 6140619: fix amd64 portability issues
+
+2006-05-29 Lennart Poettering
+ 21cb51b: merge patch from Igor Zubkov, fixing linking of the HOWL modules
+ ce04f0b: update svn:ignore to reflect the esdcompat name change
+ 632f5b4: drop the .sh suffix from esdcompat
+
+2006-05-26 Lennart Poettering
+ 3a868be: update README for 0.9.0
+ f5a8885: disable padsp for the polypaudio daemon itself by defining the __padsp_disabled__ symbol
+
+2006-05-26 Pierre Ossman
+ c8e9fa3: update todo
+ 12dc4c2: Fix the fix_metrics() function so that we don't get a tiny buffer by default.
+ 7d90e3a: Fix typos.
+ 6aeaaf9: Returned buffer attr is const.
+ d142408: Explicitly check version number when determining which fields are in a stream
+
+2006-05-25 Lennart Poettering
+ 099304a: update todo
+ 7d97534: * add new API function pa_stream_get_buffer_attr().
+ f3b7259: really fix a superfluous warning when building padsp.c
+ 4413b89: * split pa_cstrerror() into its own file polypcore/core-error.[ch]
+ f8aa55c: move modules to ${libdir}/polypaudio-${PA_MAJORMINOR}/modules/
+ fc8a2c4: add item about moving pa_cstrerror() to TODO
+ e07b262: update todo
+ ae80ab3: read stream and client name from $PADSP_STREAM_NAME resp. $PADSP_CLIENT_NAME, if available
+ 2bbd7ba: add support to disable emulation of /dev/dsp,/dev/mixer,/dev/sndstat selectively by either passing an environment variable or by defining a symbol __padsp_disable__ in the process
+ 2bb05ea: fix evil, evil typo that cause all gtk2 based apps to crash
+ 59d00e2: * issue volume updates syncrhonously
+ 0fb63e7: update TODO
+
+2006-05-25 Pierre Ossman
+ b754d50: Wrong prefix used in the padsp script.
+ d39740f: We only need the so for libpolypdsp.
+ ea7995b: Fix padsp script so that it accepts parameters, setting relevant environment
+ 0387b30: Use only the basename of libpolypdsp.so so that it will work on multi-arch
+ 1799b7a: Move libpolypdsp in the makefile to avoid the libtool bug where it must come
+
+2006-05-24 Pierre Ossman
+ 6a7172e: padsp needs dlsym & co so make sure we get that lib included.
+ 3fa19ab: Fix warnings.
+ 2843b1a: Remove the exceedingly anal warnings. It's impossible to write a non-trivial
+ c4328cd: Fix stray \
+
+2006-05-24 Lennart Poettering
+ ca08e57: implement a /dev/mixer interface
+ 440b901: fix playback of small sound files
+
+2006-05-23 Lennart Poettering
+ 46fee46: implement emulation of /dev/sndstat
+ 23b123d: - use pthread_atfork() to disable open sound streams in the child after a fork.
+ e99afda: pass the binary name as client name to polypaudio
+ 1031549: add new padsp utility: a $LD_PRELOAD wrapper for using the OSS API with polypaudio
+ 8f111b0: change return type of pa_cstrerror() to "const char*"
+
+2006-05-23 Pierre Ossman
+ 7906985: Cast size_t to long to be more compatible with 64-bit systems.
+ 1b72d02: Fix some warnings.
+
+2006-05-22 Pierre Ossman
+ d71dc9b: Fix TLS on Win32 to something a bit more safe and portable (compiler-wise).
+ 4e3dc7c: Wrap strerror() in a function that makes it thread safe and converts the
+ bf09399: update todo
+
+2006-05-22 Lennart Poettering
+ 97ec77c: add missing #include
+
+2006-05-21 Lennart Poettering
+ cc84fc9: add missing #include
+ 651e575: add new function pa_usec_to_bytes() as inverse of pa_bytes_to_usec()
+
+2006-05-20 Lennart Poettering
+ bc87137: doc update
+ 13329d3: fix long-standing buf that could cause polypaudio to eat 100% CPU: fix handling of event bits for pa_iochannel
+ cc61b57: rename pa_simple_get_playback_latency() to pa_simple_get_latency() and allow its usage on capture streams
+
+2006-05-19 Lennart Poettering
+ acc6552: generate PA_MAJORMINOR properly - only from major and minor, not from micro
+
+2006-05-19 Pierre Ossman
+ a3fe39a: Fix some missing headers.
+ a034b61: Fix which headers get installed for libpolyp.
+ c811351: Sort source files.
+
+2006-05-18 Pierre Ossman
+ 1dfe8f8: update todo
+ 1379831: Convert log text to current locale before passing it on to stderr or syslog.
+ 8359188: Make paplay convert names to UTF-8 before sending to the server.
+ 4981092: And functions for convertion to and from current locale and UTF-8.
+ 40d9f5d: Missing include of util.h.
+ 24a7819: Don't include util.h from core-util.h as it is not needed by many users.
+ 3ee2051: PATH_MAX needs limits.h.
+ 9ec9d28: update todo
+ 0796ead: Move timeval calculation functions into their own file.
+
+2006-05-17 Lennart Poettering
+ 5f458db: update README for 0.9.0
+ 38cb138: modify lirc module to use pa_sink_mute() for muting and unmuting
+ 53a285e: fix include line for "core-util.h"
+ 40feedb: add C++ macros to utf8.h
+ ee4d6b0: add C++ macros to xmalloc.h
+ dc9151d: * add doxygen docs to header file
+ 6766a3b: add util.h to doxygen
+ 813868e: include util.h in polypaudio.h
+ c47e937: split polypcore/util.[ch] into polypcore/core-util.[ch] and polyp/util.[ch]
+ fbdb063: replace memory allocation function calls with pa_xXXXX()
+ 43813dc: include more files in polypaudio.h
+ 41baddd: add doxygen docs for utf8.h
+ 56d8e56: * make pa_xfree() a real function
+ 6e9f2d7: add utf8.h and xmalloc.h to doxygen docs
+ ee35a06: add new channel map argument to pa_simple_new()
+ 5f6d8c9: fix svn tag
+ cdd3588: more sensible default.pa file
+ 1cfb01a: add proper locking when accessing the file match.table
+ e0bf4a3: add proper locking when accessing the file volume.table
+ 1267285: add documentation for module-volume-restore
+ 6d281a5: update todo
+ db242e1: update todo
+ fa53ed7: * support native ULAW/ALAW file streams
+ b47b257: support loading ULAW/ALAW files into ULAW/ALAW memchunks
+ e669553: * use S16NE for SF_FORMAT_PCM_S8 formats, too
+ 31a9d4f: when playing an ULAW or ALAW audio file, do not convert to S16NE unconditionally, instead use sf_read_raw() to read raw audio data
+ 106fb20: increase PA_CHANNELS_MAX to 32
+ 270a409: use PA_CHANNEL_MAP_OSS in module-oss, module-oss-mmap
+ ed3606c: add new channel mapping standard PA_CHANNEL_MAP_OSS
+
+2006-05-17 Pierre Ossman
+ 7ca25e5: Move utf8 to the public part (libpolyp).
+ d9cc2cf: Move xmalloc to the public side (libpolyp).
+ e767fda: update todo
+ 6ab4213: Update documentation to contain the UTF-8 requirement.
+ d4d1e5e: Documentation for the threaded main loop API.
+ 71f681a: Set default channel map system for waveout module.
+ c752e11: Add Microsoft's WAVEFORMWATEEXTENSIBLE channel mapping.
+ 05c1468: Use default channel map for Solaris module. There doesn't seem to be a standard
+
+2006-05-16 Lennart Poettering
+ 4b6ab29: * modify pa_channel_map_init_auto() to take an extra argument specifying the standard to use (ALSA, AIFF, ...)
+ c63cc7b: change version number from "0.9" to "0.9.0" to make version comparisons easier
+ c2c8539: bump version number to 0.9
+ 5521559: * add new configure option --with-module-dir=
+ 9298990: update todo
+ c12206b: * remove .a files from the modules directory after installation
+ f272e59: tell svn to ignore the utf8-test binary
+ 56b685a: instead of kicking clients with invalid UTF8 stream names, filter invalid characters and use that instead
+ 5359593: add new test programme utf8-test.c
+ bf58753: add svn:keywords property
+ 78b23cc: add double include protection
+ e8cc63d: * remove "const" from return type of pa_utf8_filter() since it desn't make any sense
+ 23e7454: use the new latency update callback to be notified when latency data becomes
+ 724cd9d: downgrade a log message
+ 713637c: * fix segfault in pa_utf8_validate()
+
+2006-05-15 Lennart Poettering
+ 19167a1: add notification callback which is called when new latency data becomes available
+ 7a92f36: undo r868
+ 147da3e: remove regex.h from include, since it is actually not used
+
+2006-05-15 Pierre Ossman
+ 9c8661c: Add function to filter a string of any invalid UTF-8 sequences. User must
+ e91740f: Clean up the UTF-8 validation code.
+ 9c38744: module-volume-restore uses regexp() so make sure it's only built on systems
+ f468308: Include utf8.h for the validation function.
+
+2006-05-14 Lennart Poettering
+ 3f42878: update TODO
+ 45bbb34: add utf8 validity checking to esound protocol
+ d419d87: remove superfluous log line
+ cfb082a: take the filename specified on the command line as default stream name
+ a414cc2: check for valid utf8 strings
+ bf52fb9: add utf8 validity checking API
+ b10f2dc: update todo
+ b3e1655: add new module module-volume-restore which saves and restores volume of playback streams
+ be05b18: * add new parameter to pa_open_config_file() to specify open mode
+ e46f8f8: modify argument order of pa_client_new() to actually match how it is usually called
+
+2006-05-13 Lennart Poettering
+ 682dfd7: fix esound sample cache names
+ 0f22d63: * set default fragment metrics depending on the sample specs of the device in OSS and ALSA
+ 0231e6e: first set buffer size, and afterwards period size
+ c3b9c3d: don't hit an assert when trying to resample data for 6channel audio
+ 7abf17e: fix fragment size calculation for module-alsa-source
+ b681202: use default alsa channel map for alsa devices
+ afdec05: remove superfluous log message
+
+2006-05-11 Lennart Poettering
+ 11782f0: fix hangup detection for recording streams
+ eecc04c: fix iochannel for hangup signals
+ f931486: update doxygen docs
+ 68b98f7: don't signal the accept_cond automatically when waiting for a signal event
+ e929aab: split of signal releasing into its own function and name it pa_threaded_mainloop_accept()
+ dbf62d4: add thread-mainloop.h to doxygen docs
+
+2006-05-11 Pierre Ossman
+ af54f9f: Windows support for the threaded API.
+ 3890f03: Remove some debug code that wasn't supposed to be committed.
+ 5328afe: pa_write() should use a const pointer.
+ 48d66cd: Handle pipes on platforms where they are non-existant of broken.
+ 12d4b5d: Include log header to get rid of warnings.
+ 18c5340: ANSI codes aren't supported on Windows terminals.
+ 6d2a936: Do WSAStartup() in the DLL entry routine instead of at context creation.
+
+2006-05-09 Lennart Poettering
+ 2687017: fix handling of timing status requests
+ 9efc206: update todo
+
+2006-05-09 Pierre Ossman
+ 4e71f20: Add stubs for the threaded main loop so that we can compile it on
+ 06e1867: Use pa_msleep() to get platform independence.
+
+2006-05-06 Lennart Poettering
+ df3306c: rework the simple API to make use of the new threaded mainloop implementation
+ 4b4c8fd: * optionally, make pa_threaded_mainloop_signal() wait until the main thread took over control
+ 5f9bbf0: add support for reading audio data from a file instead of plain STDIN in pacat-simple.c
+ bb6c45d: remove bogus check that disallowed latency interpolation and stuff for record streams
+ 3f92e3e: allow signalling from event loop thread
+
+2006-05-03 Pierre Ossman
+ 4cff5d3: update todo
+
+2006-05-02 Pierre Ossman
+ c2c9f25: Fix control flow in pa_oss_open(). Also fall back to half duplex when device doesn't
+ 27cee2e: We need to read the cookie in binary mode for things to work correctly.
+ 1438bd4: Windows doesn't have POSIX thread. ifdef out things for now.
+
+2006-04-30 Lennart Poettering
+ 9e60bad: add new threaded main loop implementation (with test/example)
+ f2fbceb: * make sure the wakeup fd is polled on wven when no other fd is registered for polling
+
+2006-04-28 Lennart Poettering
+ 19c9dbf: fix date
+
+2006-04-28 Pierre Ossman
+ 6060bff: When a control is removed, all bits are set so we need to test for that first.
+ 53930f4: Zero the fd list since we do a memcmp on it later.
+
+2006-04-27 Lennart Poettering
+ cd93661: ouch!
+
+2006-04-27 Pierre Ossman
+ 22c679e: Clarify how the automatic channel map is generated.
+ 99612dd: Channel map argument support for solaris.
+ 0b95438: Channel map argument support for waveout.
+ 2c08180: update todo
+
+2006-04-26 Lennart Poettering
+ c29b3f1: doc update for 0.8.1
+ dff0822: bump version number
+ 9564cef: fail if the channel map doesn't match the sample specs
+ c27b140: allow the user to specify an alternative channel map in paplay too
+ d78e466: fix volume range printed on --help
+ 7b83904: if a sample is not yet loaded, don't print rubbish about its channel map
+ d4bad65: it was a bad idea to require that a channel map doesn't contain the same position twice
+ c3cc141: allow specifying the channel map to use on the command line
+ c478b0f: * make a validity check of parsed channel maps before rteurning theme
+ 185a57c: support new channel_map argument in sink/source modules
+ fbb0d14: add support for parsing channel maps as module arguments
+ 292b237: don't allow channel positions to be specified twice in the same channelmap
+ 5f7cc0c: add new test 'channelmap-test'
+ 195e969: * add new function pa_channel_map_parse()
+
+2006-04-26 Pierre Ossman
+ 31ad62f: update todo
+
+2006-04-25 Pierre Ossman
+ 129853f: update todo
+ 69096f2: Fall back to software volume if hardware mixer cannot control all channels.
+ f426b58: glibc <= 2.2 has a broken unistd.h, lacking setresuid().
+
+2006-04-24 Lennart Poettering
+ 820c118: * rework reference counting in the client libraries: now refcounting goes
+
+2006-04-24 Pierre Ossman
+ d266213: chown() and chmod() aren't available on Windows.
+ fade8b0: Undo invalid automake version requirement.
+
+2006-04-23 Lennart Poettering
+ b92344f: fix a segfault when uploading samples with esound
+ 3590ee7: * add validity checking for sample_spec, channel_map and cvolume structures
+ 286310a: small optimization
+ 9b52ac4: fix sample uploading
+ e1ac42d: enforce maximum sample size in sample cache
+ cdba052: * fix ref counting of pa_stream: strictly refcount from context to stream and never vice versa to make sure that we never loose memory
+ 193fb12: introduce a new error PA_ERR_TOOLARGE
+ 335e234: * when playing back a sample from the sample cache, just take a pa_volume_t and not a pa_cvolume_t as argument for the volume. Usually it is not known to the player of theses samples how many channels it has, hence it doesn't make any sense to allow him to pass a by-channel volume structure here.
+ 4e61ebb: fix multiplication of software pa_cvolumes
+ b4ac6d0: allow recieving of invalid channel maps, volumes and sample specs. This makes handling of uninitialized data better, e.g. when sending info about lazy-load sample chache entries, where the channel mapping and sample spec is still unknown.
+ 8345063: * Merge build system patch from Igor Zubkov
+
+2006-04-22 Lennart Poettering
+ 2bb8283: remove superfluous "set -ex" line
+ 985da9b: require automake 1.9 in configure.ac
+ f6fc410: modify x11 modules to not cache the Display variable since pa_x11wrap_get_display() is now used as notification that the x11 output buffer needs flushing
+ ec65ca6: when loading sound files, initialize channel map data properly
+ 5e50f84: fix x11 handling
+ 55e19cb: fix sample cache
+ 0e02e84: * for unix sockets: remove the right parent directory on shutdown
+ a4fedcf: add new function pa_parent_dir()
+ 513df3b: first unlink the socket, the close it
+ b0059c6: try to remove the directory where the PID file resides in after removing the PID file
+ 0cc2e04: chown() and chmod() /tmp/.esd/ before checking if everything is ok with it
+
+2006-04-20 Lennart Poettering
+ a7c5ed1: replace copy by symlink when installing homepage
+ 5f804cb: minor improvements to the LICENSE text
+ 9c06f5a: ship GPL and LGPL files with the tarball
+ 81381c4: add new explaining LICENSE file
+ 2decb6a: * rename "LICENSE" to "LGPL"
+
+2006-04-20 Pierre Ossman
+ 1b46097: update todo
+
+2006-04-19 Pierre Ossman
+ e4b53b2: Tweaks for the solaris module. The sound system requires complete frames
+ 989fa58: Sun's documentation about SIGPOLL on EOF:s is wrong, so use a timer based
+ 1d51247: Minor fixes for the way Windows handles sockets.
+ e1513ce: WaveOut needs to have rather large chunks. This is about as low as we can
+ 5342f3a: Win32 needs to have the socket subsystem initialised.
+ 6ae8511: Having constant deferred events isn't allowed and causes problems. Use timers
+ 4bb5822: Reverse order of IPv6/IPv4 binding to handle systems without IPV6_V6ONLY.
+
+2006-04-18 Lennart Poettering
+ 494f602: make proper use of the muting facility of sinks in module-mmkbd-evdev
+ 746adcf: fix a couple of issues I found when compiling polypaudio with gcc 2.95
+ 60008cb: fix CFLAGS for jack modules
+ 9ad753e: fix "make distccheck" properly
+ 65fd9b3: fix make distcheck
+ e454bb1: Documentation updates
+ c35052a: add JACK module documentation
+ a5100be: fix connecting of jack source in jack daemon
+ a809129: build jack source
+ 768a6f2: fix code for pre-C99
+ f8dbc2f: * fix pa_random_seet() function prototype
+ abea726: add a jack source module
+ cf85794: * allow the user to set the jack client name
+
+2006-04-18 Pierre Ossman
+ c22a0c1: Make the probe for RNG sources at runtime since the configure script isn't
+ e4b2a47: Clarify that JACK libs are optional.
+ 074b7c1: More fixes caused by Sun's complete inability to follow any standard
+ 18055e4: update todo
+ 2d6ab01: We need to emulate sendmsg/recvmsg to support rtp on Windows. Will do
+ c3087d0: Avoid including non-portable header sys/poll.h.
+ 8b99a06: C99 requires explicit marking of integer literals' size.
+
+2006-04-17 Lennart Poettering
+ 4482e68: add new JACK sink
+
+2006-04-16 Lennart Poettering
+ 40f171f: * add pa_mainloop_wakeup() calls for deferred events
+ 76296ca: add new API to replace the poll() function used by the main loop implementation
+ a8bb073: properly initialize session counter
+ 7871f41: add documentation for the new RTP modules
+ 2f3fa42: limit number of concurrent RTP streams
+ 08397d9: fix typo in module description
+ e1887b5: change default mcast address once again, to make sure our traffic doesn't leave the network by default
+ 68a6d61: ignore symdef file of module-rtp-send
+ b04a4e6: rename module-rtp-monitor to module-rtp-send
+ 3b803e7: * make sure RTP ports are chosen to be even
+ c999fe4: * deal properly with underruns, overflows and packet losses
+ 67b105b: * increase default MTU
+ 998affc: replace homegrown endswith() with pa_endswith() from util.h
+ 0990d8c: initialize random seed globaly from $RANDOM_DEVICE
+ d50255a: * add new check for $RANDOM_DEVICE
+ a176d77: todo update
+ f1ddf05: * add RTP/SAP/SDP reciever module
+
+2006-04-16 Pierre Ossman
+ e75cc68: Fix ALSA fd handling to be compatible with blocking deferred events.
+ e8d9a5d: Clarify behaviour of deferred events.
+
+2006-04-15 Lennart Poettering
+ 1fec416: * change default multicast address
+ 71227de: correct some types
+
+2006-04-14 Lennart Poettering
+ e0e2b8f: * ignore some more files
+ 9522b44: add an RTP sender module
+ 86ad601: minor beautification
+
+2006-04-13 Lennart Poettering
+ 9539dc4: minor doc updates
+ c383a4c: * add a link to Cendio to the README
+ d981ace: remove yet another item from the todo list! This means we are now read for 0.8!
+ 7e8d46e: unbreak module-tunnel
+ d153fda: remove yet another item from the todo list
+ 010c049: include in-flux resampled chunk in latency calculations of playback streams
+ c25c549: fix latency calculations of module-combine
+ 9854cfc: hmm, nothing important
+ fe64b89: add code to allow polypaudio dump preloaded modules using "--dump-modules"
+ d4b22f3: make --enable-force-preopen the default for SVN builds
+ 1f7a008: add new configure option to enable preloading even on architectures that support dlopen(). Useful for debugging
+ df108af: update documentation for release 0.8
+ 5639b7e: doc updates
+ 20f4ae6: more documentation updates
+ ceb09d8: Documentation updates
+
+2006-04-12 Lennart Poettering
+ b33ae79: remove yet another item from the todo
+ 7fa8323: include local record memblockq in latency calculations
+ 06bd27b: when storing recording data in file, create file with proper access rights
+ 4a8d318: yet anotrher fix for slow links
+ 0af582a: small fix to deal properly with slow links
+ bf88854: * dispatch defer events in pa_mainloop_dispatch() and not already in pa_mainloop_prepare()
+ 853caf1: * fix latency calculation where a full playback buffer was erroneously taken as empty buffer and vice versa.
+ 0fa56f9: remove a bunch of log messages
+ d427942: beefup pacat a little:
+ 49b3150: * rename "latency correction" to "write index correction"
+ 77c2a1f: protocol change: don't send stream buffer size in latency update. This data is redundant, since it can be calculated from write_index - read_index anyway
+ b5d177d: proper validity checking for pa_context_is_pending()
+ a0c7ca0: when flushin a memblockq, set the write index to the read index
+ 64d0d9b: todo update
+
+2006-04-10 Lennart Poettering
+ 268c857: unbreak fresh SVN builds
+ b2668ca: return the error code and not just -1 when pa_context_is_pending() fails
+ a81209f: validity checks for pa_context_is_pending()
+ 09589a7: update todo
+ 021744d: * Beef up latency calculation in module-oss-mmap
+ 8f2d9ae: minor cleanups for OSS module
+ 9332708: when using record mode, allow file to save data to to be passed on the command line
+ 6a3b8ae: todo update
+ 137f0a7: * implement PA_STREAM_AUTO_TIMING_UPDATE
+ 190a869: add new PA_STREAM_AUTO_TIMING_UPDATE
+ 4496954: Lennart is blind
+ 35ea8ac: update TODO
+ f4119ad: unbreak last commit from ossman
+
+2006-04-09 Pierre Ossman
+ 0d200ee: Use the modern Ki/Mi/Gi prefixes to clarify that 1024 is the base.
+ a6ce5c4: Big documentation update. Describe the client API in a more tutorial like
+
+2006-04-08 Lennart Poettering
+ a742536: clip volume at PA_VOLUME_NORM for alsa devices
+ 025228f: add proper volume clipping support for OSS devices
+ b4a5474: when doing software volume adjustments, don't use the volume value as linear factor, but pass it through pa_sw_volume_to_linear() first.
+
+2006-04-07 Lennart Poettering
+ 107525c: remove another item from the todo list
+ a546c76: * show flags value when dumping sink/source info in pactl.
+ f6d95b7: add new introspection data field for sinks/sources: a flags field which specifies whether the sink/source supports hw volume control and latency querying
+ 272ab20: todo update
+ 4af16e4: minor cleanups
+ 7261494: remove item from TODO list, since it requires the SNDCTL_DSP_GETERROR ioctl() which isn't supported by the Linux kernel
+ 2f918f0: todo update
+ fdb48b4: * enable write_index correction and timing interpolation only for playback (and record) streams
+ 22558b5: fix pkg-config files
+ e5a5b56: remove yet another item from the todo list
+ a9f4896: hdie some more
+ b8a729a: * update docs for reworked latency API
+ c0592bb: update simple API for new latency API
+ 53a0056: update pacat.c for new latency API
+ 920f045: rework latency querying API (this needs more testing)
+ cc302f2: remove queue length field from latency request (server side)
+
+2006-04-07 Pierre Ossman
+ add110b: Some memcpy arithmetic that wasn't removed when doing the redesign to update
+
+2006-04-06 Lennart Poettering
+ dd9605b: * really pass the ipv6 socket server to protocol_new in case of ipv6.
+ 1be0017: change pa_gettimeofday() to return a pointer to the struct timeval*, instead of an int
+ e872c75: s/index/idx/, to avoid gcc warning
+ 73035a8: * set IPV6_V6ONLY for IPv6 sockets, to avoid warning when both ipv6 and the ipv4 sockets try to bind to the same port
+ ac3d11f: remove some GCC warnings introduced by improperly casting to (char*) instead of (const char*)
+
+2006-03-31 Pierre Ossman
+ acb96c9: Fix some warnings caused by size_t having varying size.
+ 3285403: Large file support. Polypaudio probably doesn't need it, but it causes warnings
+
+2006-03-17 Pierre Ossman
+ 8d4af80: update todo
+
+2006-03-11 Pierre Ossman
+ dc5b2c5: We no longer guarantee that an operation object is returned. Need to tweak
+ da90b05: Remember to store the struct with module info.
+
+2006-03-08 Pierre Ossman
+ 3ef4970: We filled the volume with the wrong channel count (we used the input, not
+
+2006-03-07 Pierre Ossman
+ 528d150: The extra stream ref actually did some good. Re-add it, but with some more
+ b67963c: We've already set an initial reference count of 1 so don't count it up again.
+ 6457137: Trying to listen on an IPv6 socket by default and only do IPv4 if that fails
+
+2006-03-05 Pierre Ossman
+ 90d6a91: update todo
+ 53c266f: Fetch sound card name into sink/source description.
+ 06eaebf: update todo
+ 7387342: Volume support in tunnel module.
+ 4e56725: It's safer to set buffer size than to try setting number of periods.
+ f22d8ab: Return the proper error code so that we get a correct error message.
+ 7b6a9c3: Tried to get the volume information even upon init failure.
+
+2006-03-04 Pierre Ossman
+ dcd202f: Update module-tunnel to the new protocol.
+ 45baa69: Fix warning caused by missing return in main().
+ ad7640b: update todo
+ 4e52294: Alignment safe protocol handling in esound module.
+
+2006-03-02 Pierre Ossman
+ bc97b29: Negotiate protocol version between server and client. Will allow smoother
+ fbaaf5a: The tag argument is no longer unused.
+ 50268e0: Fix warnings on 64-bit systems.
+ 6cc11fb: Handle the new latency protocol. This is just a quick fix and does not
+ 7f04568: typo fix
+
+2006-03-02 Lennart Poettering
+ 8cf9b97: protocol changes for new latency API (partial!)
+
+2006-02-27 Pierre Ossman
+ 76f56ab: update todo
+ 5b9849e: update todo
+ 4756d18: We have both sink and source in this module.
+ e8b3819: Catch volume update events.
+ 1bb14c3: 64-bit fixes.
+ f59bc1f: Fix some signed/unsigned warnings.
+ e37f008: Function prototype didn't match actual definition.
+
+2006-02-26 Pierre Ossman
+ 0c65922: update todo
+ 1e68539: Get notifications about mixer changes from ALSA.
+ ae07d5a: Handle ALSA file descriptors more correctly. This means a bit more overhead,
+ c119996: Fix correct default device.
+ b125e1c: Hardware volume support in ALSA modules.
+
+2006-02-24 Lennart Poettering
+ c5ec39d: move scatter/gather todo item to post-0.8, since it's impact on perfomance might not even be worth the effort.
+ 0d8da54: todo update
+ 4358977: * Add new "auth-group=" parameter to protocol-native-unix
+ 3f264b2: add support for authentication using SCM_CREDENTIALS
+ b967aeb: todo update
+ 903b8c0: todo update
+ c2304d6: add a few more validity checks to protocol-esound
+
+2006-02-24 Pierre Ossman
+ 25bcc10: Do an explicit cast to shut up gcc.
+ c3a2670: This wasn't supposed to be checked in.
+ b418809: Wrong variable used for port.
+ 9f1b793: Tweak the handling of missing credential support so that we minimise non-POSIX
+ a1f5573: Call correct function.
+ c205ea6: Make local function static.
+ 9366ab9: Hardware sink mute support.
+ 3374df5: IGAIN is a better choice than IMIX for source volume.
+
+2006-02-23 Pierre Ossman
+ 65736a2: Some new additions were mislabeled as '\since 0.9'.
+ 04c8926: Mute switch for sinks and sources. This is independent of the volume
+ bd4ae44: update todo
+ 607b279: update todo
+ 79e8009: Hardware source volume support.
+ 4e8faa6: inet_pton expects in[6]_addr structures, nothing else.
+ adad7dc: Add inet_pton emulation for platforms that lack it. Only support IPv4 at
+ 7050dbf: Update hardware volume to a correct initial value.
+ f8aca21: Wrong function name.
+ 12e35c5: Make sure hardware volume gets a correct initial value.
+ ce9b035: Hardware source volume support in OSS.
+
+2006-02-23 Lennart Poettering
+ c2290c5: update todo
+ a4ab652: really ignore pabrowse
+ 2756117: ignore pabrowse
+ 4a64b0d: change pa_log() and friends to not require a trailing \n on all logged strings
+ cb59817: simplify tagstruct creation
+ 5771335: fix source volume adjustment: copy memchunk before changing the volume of it
+
+2006-02-22 Lennart Poettering
+ 708c650: enforce maximum memblockq length for clients
+ bad8fd7: update todo
+ ecd346f: add listen= parameter to tcp protocol modules
+ 8df72bc: todo update
+ 5c7ab77: pkg-config update
+ 7f68c91: revive howl support
+ 361f167: unbreak Makefile.am
+ 63165d8: todo test
+ a99e46d: rework parameter validity checking in protocol-native server side
+ f62b66a: todo update
+ bf013f8: todo update - outline what i consider pre-0.8 and post-0.8 issues
+
+2006-02-22 Pierre Ossman
+ 71fd26f: Wrong userdata used to init operation.
+ cc2178e: Support for setting volume on sources.
+ 6cd2250: Remove polyplib-error and polyplib-mainloop for requirements.
+
+2006-02-21 Lennart Poettering
+ 8d88264: add hw info to description for oss-mmap, too
+ 5014db9: include hw description gathered from /dev/sndstat in sink/source description string
+ 6169bd8: add new utility function pa_endswith()
+ 13b4213: remove left-over log line in protocol-esound.c
+ 9d3dcef: todo update
+ a10257d: fix pacat
+ 36c8861: todo update
+ 8c80dd6: * Don't build seperate ipv4/ipv6 versions of the protocol plugins
+ c07928a: todo update
+ 4f511bb: * Get rid of libpolyp-mainloop
+ f1a0ee7: todo update
+ 893204f: add hw volume control for module-oss-mmap
+
+2006-02-21 Pierre Ossman
+ 48b2e1a: update todo
+ 7e51237: Hardware volume support on Windows.
+
+2006-02-20 Lennart Poettering
+ 86124ab: todo update
+ cae2d80: disable SIGPIPE before calling pa_core_new(), this way the warning message is not printed
+ 1506c15: build defer() function in src/polyp/mainloop-signal.c only on win32
+ 9bcb413: fix snd_pcm_hw_params_set_rate_near() usage
+ 56ce62a: build dllmain.c only on win32 (makes gcc shut up a little more)
+ f5e8953: todo update
+ d48912b: improve error checking in simple API
+ 2bdc07e: add validity check for the "server" parameter of pa_context_connect()
+ 0858ef9: fix yet another pa_context_connect() occurance with regards to the flags parameter
+ a8e85ba: remove a superfluous log line
+ 31a027b: change calls of pa_context_connect() to pass flags arugment correctly
+ b008941: fix moddir
+ 71b3bff: * modify pa_context_exit_daemon() to return a pa_operation object
+ 98cb6aa: * a lot of doxygen updates
+ 71e063a: todo update
+ ddd51e2: add doxygen docs for channel map
+ 3bc0902: minor doxygen fixes
+ 6d09602: replace "spawn" parameter of pa_context_new() with a proper flags parameter
+ e078f08: explcitily cast strings to make gcc shut up
+ 4566d56: * Make typdefs for the pa_context callback prototypes
+ b36ed4d: remove cdecl.h from doxygen docs
+ 081fb74: update TODO
+ 16285f9: make doxygen ignore PA_CDECL_BEGIN/PA_CDECL_END
+ 3044490: 1) Add flexible seeking support (including absolute) for memory block queues and playback streams
+
+2006-02-20 Pierre Ossman
+ 7905e81: Add aligment fix in esound to todo.
+ 5d253cd: Fix some warnings by making sure we have the right signedness on things.
+ 502d3f5: Hardware volume support for Solaris.
+ f2292ae: Fixes for the Solaris detection.
+ 5cc0d0e: Add mute switch to todo.
+ 6c2d414: Detect support for Windows' waveout.
+ d1bc972: Detect support for Solaris (/dev/audio).
+ 0eed96d: Remove a debug fprintf that was left in.
+ e9658bb: util.c uses some socket functions so we need winsock on Windows.
+
+2006-02-18 Lennart Poettering
+ 0876b1b: update todo
+
+2006-02-17 Pierre Ossman
+ b26df7e: Properly clear members during init.
+ d142c12: That's a delta parameter, not a size parameter.
+ 45700da: Have a memblock queue on the client side during recording. This makes the
+ 6f9a367: Ignore generated win32 binaries.
+ 162a95d: Module needs stuff in libpolypcore.
+ 2686857: Fix path to poll.h.
+ c4cf7ad: Fix typo in #ifndef.
+ da665d5: Integrate error routines into libpolyp. Not much point in having this as a
+ 1eae42f: Make sure that all polypcore headers are installed.
+ 5eda18b: Cleaned up the includes after the restructuring. Indicate which headers are
+ c278bc6: Move the util libs to the modules section since they're in that directory.
+
+2006-02-17 Lennart Poettering
+ b951308: fix doxygen
+
+2006-02-16 Lennart Poettering
+ 2e0dcc4: include header files in simple.h with <> instead of ""
+ 5ccf414: * rename polypcore/subscribe.[ch] to polypcore/core-subscribe.[ch] to avoid confusion with polyp/subscribe.[ch]
+ b4cb249: shorten include list of utils a little
+ 19b5b71: * drop polylib prefix from #define
+ 45b1eee: fix compilation of simple API
+ 22c8ceb: drop polyplib- prefix from client library files
+ f49b09d: make channel naming somewhat RFC2551 compliant
+ 4ad2926: add a bunch of simple Makefile in the subdirs, just to make compilation with emacs easier
+ c75972f: move alsa-util.[ch], oss-util.[ch] and howl-wrap.[ch] to the modules directory since they are just helper source used exclusively by the modules
+ b56b9e5: * svn:ignore some files
+ 5b881e6: add simple hardware auto detection module
+ 6ad876e: Add HAVE_ALSA and HAVE_OSS defines
+ 61fbafc: allow polypaudio to startup without any enabled module
+ a9950d4: print ALSA error messages on failure
+ cc3fe43: fix warning text
+
+2006-02-16 Pierre Ossman
+ e205b25: Reorganised the source tree. We now have src/ with a couple of subdirs:
+
+2006-02-15 Lennart Poettering
+ 22e1f40: todo update
+
+2006-02-14 Pierre Ossman
+ 0f0fc32: Fix api. Setting volume is done through a pa_cvolume struct, not a pa_volume_t
+
+2006-02-13 Pierre Ossman
+ f77d5e1: Add function to "wake up", i.e. interrupt, a running poll(). This is needed
+ bbaf154: Split mainloop_iterate() into three, distinct parts. Allows for more flexible
+
+2006-02-10 Pierre Ossman
+ 4ab432a: Fix some new alignment bugs in the tagstruct handling.
+ 8d91ffe: Install the new headers for channels and volume.
+
+2006-02-03 Pierre Ossman
+ d9bfd5b: Let's have just one endian conversion macro suite.
+ 5c01c10: Fix endian conversion macros and reformat them to be a bit more readable.
+ d431e00: Use defines and not hard coded values for volume levels. Caused incorrect
+ bbc6dd6: Volume adjustment must be done _after_ dropping the chunk since drop will
+ c34f35a: Reverting an incorrect checkin.
+
+2006-01-30 Pierre Ossman
+ dd7b380: Fixes for the new infrastructure so that the waveout module compiles.
+ 7da06d3: Fixes for the new infrastructure so that the solaris module compiles.
+ 22db575: Breaks missing from conversion to a switch statement.
+ f8808a2: Print an error message before aborting.
+
+2006-01-28 Lennart Poettering
+ db6dc13: * add variadic function pa_tagstruct_get() and pa_tagstruct_put() for parsing/constructing tagstruct records
+
+2006-01-27 Lennart Poettering
+ 8580967: add support more for up to 16 auxiliary channel positions
+ dd10c98: Mega patch:
+
+2006-01-27 Pierre Ossman
+ 759721c: Remove the version number from the module directory. Makes life easier
+
+2006-01-25 Pierre Ossman
+ 917d876: We get the -lcap through LIBS, so no need for CAP_LIBS.
+ 104797b: Use AC_SEARCH_LIBS instead of AC_CHECK_LIBS since it is a lot smarter and
+
+2006-01-20 Pierre Ossman
+ 30bb5ce: Fix so that peer name can be determined on Windows. We do not support console
+
+2006-01-19 Pierre Ossman
+ 60dbf8b: Open the device in non-blocking mode.
+ 0ca9a0e: Ugly hack to get around Solaris particularly brain dead sound system.
+
+2006-01-16 Pierre Ossman
+ 719c377: We need a logical, not an arithmetic shift here. So use unsigned types when
+
+2006-01-12 Pierre Ossman
+ 262c60f: Under win32 we freed the wrong pointer causing a segmentation fault.
+ cb2a7ed: Some crappy hardware generate noise on the output when reading input. To
+ 289c914: Some drivers (via82xx) doesn't start recording until we read something.
+ fc93e4b: Used 0 as an invalid fd. Changed to -1.
+ f61be8b: If the card couldn't do duplex when required we would incorrectly return
+
+2006-01-11 Pierre Ossman
+ 72316cc: Many (FSF and Sun at least) have interpreted the C99 standard in a way
+ 2623edc: Remove the old compiler flag test now that we have a new shiny one.
+ 70ac72e: Our makefiles work just fine on older automakes (1.7 tested). Let's keep
+
+2006-01-11 Lennart Poettering
+ 1f09613: * remove a lot of compiler warnings introduced by using some new GCC flags
+
+2006-01-10 Lennart Poettering
+ 6c512fb: build system updates, including support for some newer GCC options
+ f7a99e9: Merge Pierre's changes
+
+2006-01-10 Pierre Ossman
+ 34e81ff: Handle Windows paths when normalizing authkey path.
+ 29118f5: Make sure the caps header check can also be disabled.
+ 1015ea4: Store previous reported time in order to assure a monotonic clock.
+ d429222: Accidental use of a swapped int.
+ 11c6cac: buf is needed on Windows aswell.
+ abdf9b1: Add needed error code.
+ 0a9abdd: Unfortunately Windows has two different values for EBADF depending on
+ ba06340: Add some required headers.
+ 357ab88: Make sure socklen_t is defined.
+ 5e5808a: Static libs bork the creation of dlls and AC_CHECK_LIB isn't very bright,
+ ff4cc62: Move library checks to a separate section and make sure it's before
+ f5a2cf1: getopt_long resides in libiberty on many platforms.
+
+2006-01-09 Pierre Ossman
+ 76bc56c: Put inet_ntop() emulation in a seperate file.
+ d3cb144: Update comment for pa_lock_fd() to reflect that locks are mandatory
+ 160d886: Merge with trunk.
+ 8258146: Generalise lstat fallback.
+ 5fcbf04: Condense winsock includes and defines into one header.
+ 9818d67: Make the tagstruct handling safe on machines with alignment restrictions.
+ 8a32357: Make sure the data gets endianness conversion.
+
+2006-01-09 Lennart Poettering
+ 80ae72c: improve sync clock change
+ 794033a: fix synchronized clock change
+
+2006-01-05 Pierre Ossman
+ 067c00f: Reversing incorrect commit.
+ 72795fc: Use autoconf detected define for getgroups() type.
+ d5ce3ec: Ignore windows exe:s.
+ 1b472f7: Solaris support.
+ 6781628: The Windows sound interface module.
+ 19d9fcb: Port to Windows. This is mostly glue layers for the poor POSIX support
+ 2f74bb9: Protect pthread.h with an ifdef.
+ bdc02f7: Protect sys/resource.h with an ifdef.
+ 67833c2: Protect sched.h with ifdef.
+ 57dccd2: Replace paths with defines.
+ 2c4d42e: ctime_r() is not available everywhere.
+ e72bbdb: c was used before it was assigned.
+ 010476f: Protect getuid() with an ifdef.
+ 5ac2cb9: No regexp funtions are used in this file.
+ ecaf8d8: PATH_MAX is defined in limits.h.
+ 983fdb3: Stub uses socket defines so include the header.
+ 7aba34b: config.h should always be included so that necessary fixes can take effect.
+ 2cf165d: ifdef-protect setpgid and setsid.
+ 08bbfd2: Make it possible to disable caps support since it breaks fully static
+ be2ba90: Add option to select which modules get linked in during static builds.
+ 9550c8e: No need for conditional generation of symdef files.
+ 971e370: Add possibility for linking semi-static executables (libtools definition
+ e2495c7: We need explicit actions here.
+ 268aebb: Protect sys/wait.h with an ifdef.
+ 8f3c364: Make sure all socket headers are protected by ifdefs.
+ e28ce8c: Use pa_get_path_filename() instead of duplicating code.
+ 29a5b85: Emulate poll() through select() where needed.
+ d3bc7b2: Fix test for mkfifo(). HAVE_MKFIFO is only generated as a config.h define by
+ 5cd8703: Remove ftruncate test since we're not doing anything with the result.
+ a24102c: Fix indentation.
+ e9be6fa: Handle platforms that do not support the UNIX user/group database.
+ 59aa6ca: There was a race condition here that caused latency calculation to fail
+ ec87cb1: Fall back to signal() when sigaction isn't supported.
+ 3ed983c: SIGQUIT is an optional signal.
+ b8859b4: Compiler warning about uninitialized variable.
+ 3728854: Make sure the array is never too small.
+ b69d881: Fix printf string.
+ 7192238: Old kernel headers didn't define the input_id structure. Therefore we cannot
+ c5bee95: Fix correct type.
+ 4deeaef: Don't include sys/socket.h in the header when we do not need to.
+ 14474ae: Esound latency should not include buffer length. This added an extra second
+ f0e8c65: Two variables with the same name causing corrupt strings.
+ 4384d31: Fix warning.
+ ff49e63: inet_ntop can't be found on all platforms. Do a stupid emulation when
+ 456e256: Fix some compiler warnings about unused variables.
+ cd3691d: PIPE_BUF has nothing to do with the esound buffers.
+ 13496bb: Handle when the platform doesn't have UNIX sockets.
+ 3a3b4af: AF_UNIX and PF_UNIX is more portable than the _LOCAL equivalent.
+ dbad54a: Remove any warnings about incorrect type to setsockopt() (char* vs void*).
+ 7dcf4e4: The standard declares some signals as optional. Make sure we handle
+ eacffc3: To access the new pa_gettimeofday() we need to include util.h.
+ 8c5a75d: Syslog is not present on all platforms.
+ 3996c5f: SIXCPU isn't present on all platforms. Replace cpulimit with dummy functions
+ 2ce05b2: Glob is not present on all systems.
+ 70223ba: Fallbacks for systems that do not have getaddrinfo(). Does not handle
+ 3f2ac7e: We have a generic function for extracting the filename, let's use it.
+ f6b0f87: Remove unnecessary dependency on timeval definition.
+ 687e2d7: Abstract the gettimeofday call into a utility function to ease porting.
+ 70710e1: Check for OSS by looking for its header. Win32 isn't the only platform
+ 11a4c67: Remove unused automake conditional.
+ e8c71ed: Since README is generated conditionally we must make sure there are no
+ 1f11ee3: Big cleanup of the build structure.
+ 22f6694: Creating branch for patches from Pierre Ossman
+
+2005-09-16 Lennart Poettering
+ 656cf87: fix alsa memory leak
+ 9177ef4: chance ALSA sink to use "default" as default alsa device
+ 3a61b36: initialize running_as_daemon
+ d50bfd8: increase number of allowed connections
+ e4395c2: add new field running_as_daemon to pa_core
+ 48b2a87: add pa_sound_file_too_big_to_cache()
+ 668f3cd: handle float values in sound files sensibly
+ 652e000: print a nice message when libltdl is missing
+ e0d0f1b: git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@352 fefdeb5f-60dc-0310-8127-8f9354f1896f
+ 6d9dffe: build fix
+ c57cad9: bail out if no sink is defined
+
+2005-09-15 Lennart Poettering
+ b993e33: alter alsa periods number
+ db4b25d: handle EOF in ioline.c
+ fda09b9: remove esound protocol directory on unload of module-protocol-esound
+ f1da8ad: fix start_timeout()
+ b5f5707: add libsamplerate/libsndfile CFLAGS
+ e1f008f: commit liboil porting changes
+ 0c9873e: create a copy for liboil porting
+
+2005-01-12 Lennart Poettering
+ 4daa0c1: * fix LIRC configuration
+ f586ce0: * extend HTTP module
+ 4590f09: * make pa_sample_spec_snprint return point to written string
+
+2005-01-11 Lennart Poettering
+ 32bf3a1: * new environment variable $POLYP_LOG
+
+2005-01-09 Lennart Poettering
+ 5ab3064: * add new module module-mmkbd-evdev
+
+2005-01-08 Lennart Poettering
+ 474b568: * todo update
+ 6911d7e: * increase timeout in pacmd
+ c29c95d: * make lirc program name configurable
+ fb4cba4: * add new module for LIRC volume control
+ 1e78a1d: change doxygen build stuff for better compat with moderm automakes
+ 9a59d01: update todo list
+ 9b0ec37: * add support for asynchronous name resolution
+
+2005-01-06 Lennart Poettering
+ fb11e45: minor fixes
+
+2004-12-18 Lennart Poettering
+ 8199925: fix conditional X11 compilation
+
+2004-12-16 Lennart Poettering
+ 47ab6bd: gcc 2.95 compat
+
+2004-12-15 Lennart Poettering
+ b1369d2: * fix error message when starting polypaudio while it is already running
+ 400dacd: cleanup zeroconf service names
+ 99e0779: * Publish server info in mDNS in addition to sinks/sources
+
+2004-12-14 Lennart Poettering
+ bc5b917: do mor daemonizing work
+ a370e6e: * fix daemonizing
+ fa48de8: * prepare polyplib-browse for installation
+
+2004-12-12 Lennart Poettering
+ e02be6c: * fix include file names in installed header files
+ 9a01cf4: * complete zeroconf publisher
+
+2004-12-11 Lennart Poettering
+ 2d97e75: * fix alsa initialisation
+ 73eabec: * add first part of zeroconf publisher
+
+2004-11-27 Lennart Poettering
+ 5be9641: * really fix integer only resampler
+ 7f3c92b: * fix autospawn lock file creation
+
+2004-11-26 Lennart Poettering
+ 9a9309f: * use setresuid() instead of setruid() if available
+
+2004-11-23 Lennart Poettering
+ 7586478: * install fix
+ 29ec9d3: * some fixes for MacOS X by Conrad Parker
+
+2004-11-21 Lennart Poettering
+ c827fca: prepare for release
+ 9f23c8f: Documentation updates
+ 4763ca1: Comment some more files
+ 2fb83d1: * make --help fit in 80 columns terminal
+ 82a3626: * update todo
+ d45abba: calculate buffer sizes from sample spec
+ 4583c22: * create parec as link to pacat
+ 28d9744: * new tool pacmd
+ c90409e: bump version number
+ b03f390: * add some missing "static"s
+ 966c78c: fixes for bugs found when compiling with gcc 2.95
+ 92f73a7: * fix the trivial resampler
+ f2b11db: * PID and lock file fixes
+ fa751e5: some commenting
+ 6985eda: * some minor pid file fixes
+
+2004-11-20 Lennart Poettering
+ 3c77c6e: * remove autospawn lock file usage
+ acc8b78: option to use ALSA default fragment number and size
+ 5f647c8: * add µlaw/alaw support
+
+2004-11-18 Lennart Poettering
+ 8641af3: * some iochannel fixes
+ eef235d: limit the number of concurrent connections for all four protocols
+
+2004-11-17 Lennart Poettering
+ c57d5de: minor fixes for latency interpolation
+ cd3a98a: todo update
+ a58f248: fix module-tunnel.c
+ ddf9970: update todo list
+ 5ea2783: * fix a long standing bug in ioline.c (large prints failed)
+ 0a2bbc5: * some commenting work
+
+2004-11-14 Lennart Poettering
+ f5f6605: todo update
+ fa499da: Make the whole stuff LGPL only
+ be6a1c2: * implement module-esound-sink
+ d7d8529: * remove as superfluous assert() in polyplib-stream which broke the gstreamer plugin
+
+2004-11-12 Lennart Poettering
+ 6de0cda: remove a debug message
+
+2004-11-11 Lennart Poettering
+ c005bd4: add username to runtime directory name in /tmp/
+
+2004-11-09 Lennart Poettering
+ dbaa83c: split out x11prop.[ch]
+ 3fcd7a4: use fqdn in module-x11-publish as well
+ 3916a66: export FQDN instead of hostname
+
+2004-11-08 Lennart Poettering
+ 89e39f1: build pax11publish only when X11 is available
+ 4bb1483: implemented pax11publish.c
+
+2004-11-07 Lennart Poettering
+ b55923a: * Look for M4 in configure.ac
+
+2004-11-04 Lennart Poettering
+ 5844a33: some commenting
+ 2aad9e3: compilation fix
+ 344ced4: add some more comments
+ 1f6a90c: fix client libaryr in case no latency interpolation is required
+
+2004-11-01 Lennart Poettering
+ cd3ba7d: Apply Joe Marcus Clarke's FreeBSD patches
+
+2004-10-30 Lennart Poettering
+ 899788b: some updates for pa_hashmap
+
+2004-10-29 Lennart Poettering
+ 4e5c44d: use setreuid() instead of setuid()/seteuid() when dropping root
+
+2004-10-28 Lennart Poettering
+ e34c65d: require newer libsndfile
+
+2004-10-27 Lennart Poettering
+ c82105d: prepare next release 0.6
+ 1bcec3e: make autoload list use idxset
+ f252edb: minor updates
+ 929104a: update todo
+ 19f2acb: add null sink
+ 49e16ff: latency calculation fix
+ ee452b0: two latency interpolation fixes
+ 148202d: support for latency interpolation
+
+2004-10-24 Lennart Poettering
+ da45617: add user volume API
+
+2004-10-12 Lennart Poettering
+ a6471e2: gcc 2.95 fix
+
+2004-10-11 Lennart Poettering
+ 6ede161: enlarge default buffers
+
+2004-10-01 Lennart Poettering
+ fde3d13: todo update
+
+2004-09-29 Lennart Poettering
+ 68d50dc: add sample spec parameters to pacat
+ 66999e5: Add support for libwrap
+ d092401: really fix API version API
+ 6dfab4e: renamed module-tunnel to module-tunnel-sink
+
+2004-09-28 Lennart Poettering
+ d8f700e: fix module-tunnel for to aborting when connection fails
+ 33c85ae: add latency measurement support to tunnel module
+ 6f59ae1: Add module-tunnel
+
+2004-09-27 Lennart Poettering
+ 450ad85: try to use file sample type for cache entries and play-file playback
+ f014d46: really fix cpu usage when using esddsp with polypaudio
+ 35148d8: add POSIX locking to authkey.c
+
+2004-09-26 Lennart Poettering
+ 949014e: add new tool paplay
+ 5bac3c3: bum version number
+
+2004-09-23 Lennart Poettering
+ 405fac5: bump version number and update documentation
+ ed36241: allow high priority scheduling only for users in group "realtime"
+ 8176b3a: ignore default.in
+ 6d20544: place full binary path in default.pa's shebang line
+ dfcd161: Fix a bug in the build system reported by Iain Fothergill
+ 9e3890a: OSX protability patches from Conrad Parker
+ 03ee5e2: add support for capabilities
+
+2004-09-21 Lennart Poettering
+ 370ff1d: improve esound module
+ 12949d0: support for esd arguments: -spawnpid and -spawnfd
+ 3e1bdac: add noop implementation of standby/resume ESOUND commands
+ df953a1: show which command is unknown in esound protocol
+
+2004-09-20 Lennart Poettering
+ 7668418: add link to mailing list
+ 4d9af54: build updates
+ 2d87bd2: documentation update
+ bb31eda: fix xmms spawn bug
+ 42bba49: update module descriptions
+
+2004-09-19 Lennart Poettering
+ b118982: remove obnoxious assert from module-combine
+ 70a3053: add new function pa_mainloop_deferred_pending()
+
+2004-09-18 Lennart Poettering
+ 29653ab: add pacat command line parsing
+ 73125ad: work around gcc 2.95 limitation
+ 4e31feb: work around gcc 2.95 limitation
+
+2004-09-17 Lennart Poettering
+ 9ad4aa3: minor stuff
+ 0b9bc03: change sysconf path
+ 61ec86c: add resample_method option module-combine
+ 0895356: add --resample-method argument
+ 95612b6: rename some more
+ f077958: rename some stuff
+ 24f3781: make daemon.conf/client.conf autogenerated
+ 63b35d0: new configuration subsystem
+
+2004-09-16 Lennart Poettering
+ 07d563d: update according to autoscan
+ 078f2aa: gcc 2.95 compatibility, take 2
+ 19294e4: fix two gcc 2.95 incompatibilities
+ daf3938: add support for subscribing to autoload table changes
+ f9e2058: add input latency measurement
+
+2004-09-15 Lennart Poettering
+ f5d47a2: work around C99/GCC incompatibility
+ 9ca72dc: remove auto-load-sample stuff
+ 8c110d9: correct autospawning
+
+2004-09-14 Lennart Poettering
+ 935826f: make module-combine autoloadable
+ 6e01979: add refernce counting for sinks, sources, sink-inputs and source-outputs
+ 8c6593d: add module-combine
+
+2004-09-13 Lennart Poettering
+ 829656c: new configuration subsystem
+ fbefe67: correct latency calculation
+ 1231598: fix parsing of POLYP_SERVER environment variable
+
+2004-09-12 Lennart Poettering
+ b1ab686: fix public= on native and esound protocol
+ b681622: build system update
+ b772564: update simple API
+ f05a4ac: extend pa_usec_t to 64 bit
+
+2004-09-11 Lennart Poettering
+ a9ca9c4: add modinfo support
+ 11f0aae: add version number to library names
+
+2004-09-10 Lennart Poettering
+ 2512346: add support for module search path as command line argument
+
+2004-09-08 Lennart Poettering
+ 0c99fb3: add FAQ to homepage
+
+2004-09-07 Lennart Poettering
+ 5fc0cf2: date fix
+ 13248fd: documentation update
+ 7000717: implemented new CLI command: dump
+ 93c8fe6: change the way the default sink/source is selected
+
+2004-09-06 Lennart Poettering
+ 0fa499d: add support for setting/getting default sink/source via native protocol
+ 3536be4: correct a recording bug in native protocol
+ 566e469: add module-pipe-source
+
+2004-09-05 Lennart Poettering
+ 6c4fd62: implement proper logging
+
+2004-09-04 Lennart Poettering
+ 57e473b: add support for automatic termination of the daemon after the last client quit
+
+2004-09-03 Lennart Poettering
+ fb962b6: add option to disallow module loading after startup
+ 4a9239f: add CPU load limiter
+
+2004-09-01 Lennart Poettering
+ c73a298: add total sample cache size to statistics
+ 5f52999: make use F_CLOEXEC wherever useful
+ 3487387: daemon auto spawn
+ ee91cb6: add esd compatible startup script
+ dfd440b: add sound file streaming
+ 50f592b: introduce sink input and source output limits
+ 0205fc5: add PA_MININFTY
+ 63c76bd: cleanup comment
+ 9939fba: add \since to dB functions
+ 9c4fd2a: add support for dB volumes
+ fa19d6a: implement missing scache_get_id_by_name
+ 36550f4: remove most -W compiler warnings
+ 34fe8bd: add support for SCHED_FIFO
+
+2004-08-27 Lennart Poettering
+ 9618aea: fix module path
+ 8c887ab: fix homepage script
+ 5020326: minor fixes
+ b014340: readme update (licensing)
+ 4efa9d1: add LGPL/GPL to dist package
+ 41d8c13: relicense client library to LGPL
+ 8cb1cab: document every polyplib function
+ 761a895: minor cleanups
+ 92bf0a3: latency work
+
+2004-08-23 Lennart Poettering
+ b6b428e: minor documentation update
+
+2004-08-22 Lennart Poettering
+ 41295bb: new features:
+
+2004-08-20 Lennart Poettering
+ ea4805a: add pkg config file glib12-mainloop
+ 5e8bb14: add support for glib12
+ 669452e: documentation update
+ 8c756d5: documentation update
+ 9b5ba2b: doxygen fix
+ 0b9f91d: readme update
+ 8f90450: Doxygen stuff
+ 6bc5340: build fixes
+
+2004-08-19 Lennart Poettering
+ f9b58fb: move sample cache to namereg
+ e0fe68a: minor stuff
+
+2004-08-18 Lennart Poettering
+ befd734: add version routines to polyplib
+
+2004-08-17 Lennart Poettering
+ ac59518: add missing copyright headers
+ e75b657: remove global memblock statistic variables in favor of memblock_stat objects
+ 81822a7: fix x11 build
+ 2d6d3e5: todo update
+ 711de8d: autoconf beefup
+ ca2265f: Documentation work
+ f693aa4: remove native-common-internal
+ bee750b: create native-common-internal.h
+ aff43dd: update todo file
+ a0d54dd: make clitext to cli-text renaming complete
+ e4be616: rename clitext to cli-text
+
+2004-08-16 Lennart Poettering
+ 126fede: fix sink iunput and source output stuff
+ 369a908: add sink input/source output support to the native protocol
+
+2004-08-15 Lennart Poettering
+ efc3491: add support for volume manipulation
+ c175451: proper ref counting for more objects
+
+2004-08-14 Lennart Poettering
+ 22cb23e: implement proper refcounting in polyplib
+
+2004-08-13 Lennart Poettering
+ 1c2ec47: rename polyplib-sample to polyplib-scache
+ 50b9fc2: add polyplib-sample.c
+ 56bcba9: add polyplib-sample
+ 821afd6: add internal header file for polyplib
+ 79a4e75: split polyplib.h
+ 7b52d5d: some preliminary cleanup
+
+2004-08-12 Lennart Poettering
+ cd5809c: todo fix
+ 886041a: add more subscription events
+
+2004-08-11 Lennart Poettering
+ cbfaf40: info and subscription work
+ b297d0b: todo update
+ 3d374e9: add subscription subsystem
+
+2004-08-10 Lennart Poettering
+ fc618e9: compile fix
+ 37d930a: glib mainloop fix
+
+2004-08-07 Lennart Poettering
+ e9bed20: better mainloop test build system
+ 209c9dd: rename mainloop testing tool
+ 6f0936f: cleanup priority management in main loop
+
+2004-08-06 Lennart Poettering
+ 68eb5dd: add mainloop test utility
+
+2004-08-05 Lennart Poettering
+ 964bdfd: add initial glib mainloop adapter
+
+2004-08-04 Lennart Poettering
+ 839f99f: forgot some files
+ 46091a9: introduce pa_xmalloc() and friends
+
+2004-08-03 Lennart Poettering
+ 24291af: sample cache work
+
+2004-08-02 Lennart Poettering
+ e10b918: add support for querying sample ist with esound protocol
+ 8705af7: add new module "module-x11-bell"
+
+2004-07-20 Lennart Poettering
+ 5a694fd: add a todo item
+ bb0b105: sample cache work
+
+2004-07-18 Lennart Poettering
+ 527faf0: minor fixes
+
+2004-07-17 Lennart Poettering
+ 8540718: readme update
+ 765d2f7: two simple fixes
+ d6d50b0: some makefile fixes
+ 78a799e: make distcheck clean
+ 141ab85: make polypaudio run when installed
+ 6601d95: fix Makefile.am and configure.ac to match directory renaming
+ 41f6aea: rename src to polyp
+ 563201e: rename configuration file
+ 86f5b30: move todo file
+ 539eb02: ignore README
+ 7b8c329: add documentation
+
+2004-07-16 Lennart Poettering
+ 3e379ca: add pkgconfig stuff
+ cf965cb: add missing liecenses
+ e0d510d: include copyright and svn tag in *.[ch]
+ b5384e0: include config.h in every file
+ dc812da: fix distcheck
+ 005cb3e: adjust file references due to renaming
+ 2a6ee77: rename a bunch of files
+ 00b53f3: make a symbol in module-ptorocol-stub static
+ 554b01b: make oss sample spec configurable
+ 74bbf31: implement alsa source
+ f2e08d5: split PA_SAMPLE_FLOAT32 into PA_SAMPLE_FLOAT{LE,BE}
+ b8eb0c0: add alsa sink
+
+2004-07-15 Lennart Poettering
+ b240564: optimize esound latency for xmms
+ 710233b: implement get_latency native command
+ d8f1300: add pactl tool
+ c36dadd: remove global exported variables:
+ 1a6fea2: implement daemonizing
+ ed9bd5f: fix modargs memory leak
+ 1416fef: implement client side TCP support
+
+2004-07-14 Lennart Poettering
+ e83b710: update todo
+ e61e924: complete implementation of the command line
+
+2004-07-12 Lennart Poettering
+ b69178b: add preliminary command line parsing
+
+2004-07-11 Lennart Poettering
+ d4e0d51: make module-oss-* use modargs
+ 216591d: make the protocol plugins make use of modargs
+ a96ed34: rename hashset to hashmap
+ ccfd554: add dependency script
+
+2004-07-10 Lennart Poettering
+ c7bd759: add description field for sinks/sources
+ 0253896: make memblockq merge chunks
+ 5ee3a59: forgot to add parec-simple
+ 5ea96e3: implement parec-simple and matching simple recording API
+ 70bb816: implement recording in native API
+
+2004-07-09 Lennart Poettering
+ cffc776: fix recording for simpel and esound protocols
+
+2004-07-07 Lennart Poettering
+ 863fb90: add output stream draining
+ e8d1185: draining ind native protocol
+
+2004-07-06 Lennart Poettering
+ f8cbde5: auth support in esound and native
+
+2004-07-04 Lennart Poettering
+ 722c2c8: add kill_* and default_* commands to CLI
+
+2004-07-03 Lennart Poettering
+ e61c2dd: add pa_ prefix to all identifiers.
+ a8a5ab1: fix minor typo
+ 3ac2437: add libsamplerate dependency
+ 253c540: forgot to add memchunk.[ch]
+ 741aa44: add resampling
+
+2004-07-02 Lennart Poettering
+ 13b35a2: add resampler
+
+2004-06-30 Lennart Poettering
+ 961fb44: latency
+
+2004-06-29 Lennart Poettering
+ d571be6: volume work
+ e31bac0: extended esound protocol
+ ef422fa: esound protocol
+
+2004-06-27 Lennart Poettering
+ a74cd2a: add name registrar
+ 0103786: make native playback work
+ 57dc427: many fixes
+
+2004-06-24 Lennart Poettering
+ 1ad4ff1: some fixes
+
+2004-06-23 Lennart Poettering
+ a1b59db: make rename of oss.[ch] to oss-util.[ch] complete
+ c050d72: rename oss.[ch] to oss-util.[ch]
+ b9e0fa8: minor compile work
+ 3b50a7c: ignore some more stuff
+ acb25b3: main part of the native protocol
+
+2004-06-20 Lennart Poettering
+ eecf602: partial implementation of native protocol
+
+2004-06-19 Lennart Poettering
+ a84f38e: mofiy keyword expansion
+ 81447ed: cli protocol
+ 6eddcc2: rename module-simple-protocol to module-protocol-stub
+ 787bf6c: minor work
+ b4e3f5c: add simple ptorocol with unix
+ 56f8c95: some more work on the cli
+
+2004-06-18 Lennart Poettering
+ 382e7ae: some more work
+ 993d1bc: basic cli interface
+
+2004-06-16 Lennart Poettering
+ eb946db: configure fix
+ 4b86ff0: got mmap oss output working
+
+2004-06-15 Lennart Poettering
+ a8f7881: fix mixing
+ b24546b: cleanup
+ 78f386a: more work
+ 98f41f1: minor work
+ 1a50607: oss output works
+
+2004-06-14 Lennart Poettering
+ bfcde99: rename some more
+ f78e9b6: commit some work and rename
+ 0575fc6: remove oss.c
+ 5ce2048: more cleanups
+ c8cf0c1: a bunch of fixes
+
+2004-06-11 Lennart Poettering
+ edfad83: remove moddep files (since they are obsolete)
+ 7dfeb1f: make the whole stuff run and clean it self up again
+ aae40dc: module dependencie foo
+ 8584356: ignore fix
+ 9e3ad23: autoconf
+
+2004-06-10 Lennart Poettering
+ a5daff7: make it compile
diff --git a/Makefile.am b/Makefile.am
index ef5542b..facce0d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,3 @@
-# $Id: Makefile.am 2023 2007-11-05 15:10:13Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
@@ -17,8 +15,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
+ACLOCAL_AMFLAGS = -I m4
+
EXTRA_DIST = bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
-SUBDIRS=src doxygen man
+SUBDIRS=src doxygen man po
MAINTAINERCLEANFILES =
noinst_DATA =
@@ -52,13 +52,16 @@ untabify:
find \( -name '*.c' -o -name '*.h' \) -exec perl -i -pe 's/\t/ /g;' \{\} \;
fedora-snapshot: dist
- cp $(distdir).tar.gz $$HOME/cvs.fedora/pulseaudio/devel/$(distdir).svn`date +%Y%m%d`.tar.gz
+ cp $(distdir).tar.gz $$HOME/cvs.fedora/pulseaudio/devel/$(distdir).git`date +%Y%m%d`.tar.gz
dist-hook:
- if test -d .svn ; then \
- svn update ; \
+ if test -d .git ; then \
+ git pull ; \
chmod u+w ${distdir}/ChangeLog || true ; \
- svn2cl -o ${distdir}/ChangeLog ; \
+ git-changelog.perl > ${distdir}/ChangeLog ; \
fi
.PHONY: homepage distcleancheck doxygen
+
+DISTCLEANFILES = \
+ po/.intltool-merge-cache
diff --git a/Makefile.in b/Makefile.in
index e2c5083..8b39eaf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,8 +14,6 @@
@SET_MAKE@
-# $Id: Makefile.am 2023 2007-11-05 15:10:13Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
@@ -64,10 +62,16 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/libpulse-mainloop-glib.pc.in \
$(srcdir)/libpulse-simple.pc.in $(srcdir)/libpulse.pc.in \
$(top_srcdir)/configure $(top_srcdir)/src/pulse/version.h.in \
- compile config.guess config.rpath config.sub depcomp \
+ ABOUT-NLS compile config.guess config.rpath config.sub depcomp \
install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_libwrap.m4 \
+ $(top_srcdir)/m4/acx_lirc.m4 $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/attributes.m4 \
+ $(top_srcdir)/m4/check_define.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/tls.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@@ -112,6 +116,8 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
@@ -125,6 +131,8 @@ AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
BLUEZ_LIBS = @BLUEZ_LIBS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -135,11 +143,13 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -150,8 +160,11 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB20_CFLAGS = @GLIB20_CFLAGS@
GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAL_CFLAGS = @HAL_CFLAGS@
HAL_LIBS = @HAL_LIBS@
@@ -174,6 +187,31 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
JACK_CFLAGS = @JACK_CFLAGS@
JACK_LIBS = @JACK_LIBS@
LDFLAGS = @LDFLAGS@
@@ -194,6 +232,8 @@ LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@
LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@
LIBSNDFILE_CFLAGS = @LIBSNDFILE_CFLAGS@
LIBSNDFILE_LIBS = @LIBSNDFILE_LIBS@
+LIBSPEEX_CFLAGS = @LIBSPEEX_CFLAGS@
+LIBSPEEX_LIBS = @LIBSPEEX_LIBS@
LIBTOOL = @LIBTOOL@
LIBWRAP_LIBS = @LIBWRAP_LIBS@
LIRC_CFLAGS = @LIRC_CFLAGS@
@@ -205,6 +245,11 @@ LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -220,12 +265,18 @@ PA_API_VERSION = @PA_API_VERSION@
PA_MAJORMINOR = @PA_MAJORMINOR@
PA_PROTOCOL_VERSION = @PA_PROTOCOL_VERSION@
PA_REALTIME_GROUP = @PA_REALTIME_GROUP@
+PA_SYSTEM_CONFIG_PATH = @PA_SYSTEM_CONFIG_PATH@
PA_SYSTEM_GROUP = @PA_SYSTEM_GROUP@
PA_SYSTEM_RUNTIME_PATH = @PA_SYSTEM_RUNTIME_PATH@
+PA_SYSTEM_STATE_PATH = @PA_SYSTEM_STATE_PATH@
PA_SYSTEM_USER = @PA_SYSTEM_USER@
PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
POLKIT_CFLAGS = @POLKIT_CFLAGS@
POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PREOPEN_MODS = @PREOPEN_MODS@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
@@ -235,7 +286,9 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
@@ -267,7 +320,6 @@ docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_pkg_config = @have_pkg_config@
-have_xmltoman = @have_xmltoman@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -290,21 +342,27 @@ policydir = @policydir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pulselocaledir = @pulselocaledir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
-SUBDIRS = src doxygen man
+SUBDIRS = src doxygen man po
MAINTAINERCLEANFILES =
noinst_DATA =
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpulse.pc libpulse-simple.pc $(am__append_1) \
$(am__append_2)
+DISTCLEANFILES = \
+ po/.intltool-merge-cache
+
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -705,6 +763,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -805,13 +864,13 @@ untabify:
find \( -name '*.c' -o -name '*.h' \) -exec perl -i -pe 's/\t/ /g;' \{\} \;
fedora-snapshot: dist
- cp $(distdir).tar.gz $$HOME/cvs.fedora/pulseaudio/devel/$(distdir).svn`date +%Y%m%d`.tar.gz
+ cp $(distdir).tar.gz $$HOME/cvs.fedora/pulseaudio/devel/$(distdir).git`date +%Y%m%d`.tar.gz
dist-hook:
- if test -d .svn ; then \
- svn update ; \
+ if test -d .git ; then \
+ git pull ; \
chmod u+w ${distdir}/ChangeLog || true ; \
- svn2cl -o ${distdir}/ChangeLog ; \
+ git-changelog.perl > ${distdir}/ChangeLog ; \
fi
.PHONY: homepage distcleancheck doxygen
diff --git a/README b/README
index 005ddf4..6ca8d29 100644
--- a/README
+++ b/README
@@ -1 +1,34 @@
-For more information see http://pulseaudio.org/
+PULSEAUDIO SOUND SERVER
+
+WEB SITE:
+ http://pulseaudio.org/
+
+GIT:
+ git://git.0pointer.de/pulseaudio.git
+
+GITWEB:
+ http://git.0pointer.de/?p=pulseaudio.git;a=summary
+
+MAILING LIST:
+ https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
+
+GIT COMMITS MAILING LIST:
+ https://tango.0pointer.de/mailman/listinfo/pulseaudio-commits
+
+TRAC TICKET CHANGES MAILING LIST:
+ https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets
+
+IRC:
+ #pulseaudio on irc.freenode.org
+
+CIA:
+ http://cia.navi.cx/stats/project/polypaudio
+
+FRESHMEAT:
+ http://freshmeat.net/projects/pulseaudio/
+
+OHLOH:
+ http://www.ohloh.net/projects/4038
+
+AUTHORS:
+ Several
diff --git a/aclocal.m4 b/aclocal.m4
index 67e4c42..85fd9db 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,1203 +13,448 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.61],,
-[m4_warning([this file was generated for autoconf 2.61.
+m4_if(AC_AUTOCONF_VERSION, [2.63],,
+[m4_warning([this file was generated for autoconf 2.63.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# iconv.m4 serial AM6 (gettext-0.17)
-dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
-[
- dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
+#
+# Modified to never use included libintl.
+# Owen Taylor <otaylor@redhat.com>, 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor <otaylor@redhat.com>, 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+#
+# Modified to require ngettext
+# Matthias Clasen <mclasen@redhat.com> 08/06/2004
+#
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
- dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([iconv])
-])
+dnl
+dnl We go to great lengths to make sure that aclocal won't
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
-AC_DEFUN([AM_ICONV_LINK],
-[
- dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
- dnl those with the standalone portable GNU libiconv installed).
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-
- dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
- dnl accordingly.
- AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-
- dnl Add $INCICONV to CPPFLAGS before performing the following checks,
- dnl because if the user has installed libiconv and not disabled its use
- dnl via --without-libiconv-prefix, he wants to use it. The first
- dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
- am_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
- AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
- am_cv_func_iconv="no, consider installing GNU libiconv"
- am_cv_lib_iconv=no
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- am_cv_func_iconv=yes)
- if test "$am_cv_func_iconv" != yes; then
- am_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- am_cv_lib_iconv=yes
- am_cv_func_iconv=yes)
- LIBS="$am_save_LIBS"
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+ [AC_CHECK_HEADERS([locale.h])
+ if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
fi
- ])
- if test "$am_cv_func_iconv" = yes; then
- AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
- dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
- am_save_LIBS="$LIBS"
- if test $am_cv_lib_iconv = yes; then
- LIBS="$LIBS $LIBICONV"
- fi
- AC_TRY_RUN([
-#include <iconv.h>
-#include <string.h>
-int main ()
-{
- /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
- returns. */
- {
- iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
- if (cd_utf8_to_88591 != (iconv_t)(-1))
- {
- static const char input[] = "\342\202\254"; /* EURO SIGN */
- char buf[10];
- const char *inptr = input;
- size_t inbytesleft = strlen (input);
- char *outptr = buf;
- size_t outbytesleft = sizeof (buf);
- size_t res = iconv (cd_utf8_to_88591,
- (char **) &inptr, &inbytesleft,
- &outptr, &outbytesleft);
- if (res == 0)
- return 1;
- }
- }
-#if 0 /* This bug could be worked around by the caller. */
- /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
- {
- iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
- if (cd_88591_to_utf8 != (iconv_t)(-1))
- {
- static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
- char buf[50];
- const char *inptr = input;
- size_t inbytesleft = strlen (input);
- char *outptr = buf;
- size_t outbytesleft = sizeof (buf);
- size_t res = iconv (cd_88591_to_utf8,
- (char **) &inptr, &inbytesleft,
- &outptr, &outbytesleft);
- if ((int)res > 0)
- return 1;
- }
- }
-#endif
- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
- provided. */
- if (/* Try standardized names. */
- iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
- /* Try IRIX, OSF/1 names. */
- && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
- /* Try AIX names. */
- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
- /* Try HP-UX names. */
- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
- return 1;
- return 0;
-}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
- [case "$host_os" in
- aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
- *) am_cv_func_iconv_works="guessing yes" ;;
- esac])
- LIBS="$am_save_LIBS"
- ])
- case "$am_cv_func_iconv_works" in
- *no) am_func_iconv=no am_cv_lib_iconv=no ;;
- *) am_func_iconv=yes ;;
- esac
- else
- am_func_iconv=no am_cv_lib_iconv=no
- fi
- if test "$am_func_iconv" = yes; then
- AC_DEFINE(HAVE_ICONV, 1,
- [Define if you have the iconv() function and it works.])
- fi
- if test "$am_cv_lib_iconv" = yes; then
- AC_MSG_CHECKING([how to link with libiconv])
- AC_MSG_RESULT([$LIBICONV])
- else
- dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
- dnl either.
- CPPFLAGS="$am_save_CPPFLAGS"
- LIBICONV=
- LTLIBICONV=
- fi
- AC_SUBST(LIBICONV)
- AC_SUBST(LTLIBICONV)
-])
-
-AC_DEFUN([AM_ICONV],
-[
- AM_ICONV_LINK
- if test "$am_cv_func_iconv" = yes; then
- AC_MSG_CHECKING([for iconv declaration])
- AC_CACHE_VAL(am_cv_proto_iconv, [
- AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
- am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
- am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- AC_MSG_RESULT([$]{ac_t:-
- }[$]am_cv_proto_iconv)
- AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
- [Define as const if the declaration of iconv() needs const.])
- fi
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
+ fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
*)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
fi
done
IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
+AC_SUBST($1)dnl
])
-# lib-link.m4 serial 13 (gettext-0.17)
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+ dnl NLS is obligatory
+ [USE_NLS=yes
+ AC_SUBST(USE_NLS)
-dnl From Bruno Haible.
+ gt_cv_have_gettext=no
-AC_PREREQ(2.54)
+ CATOBJEXT=NONE
+ XGETTEXT=:
+ INTLLIBS=
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- AC_SUBST([LIB]NAME[_PREFIX])
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
+ AC_CHECK_HEADER(libintl.h,
+ [gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- LIB[]NAME[]_PREFIX=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- AC_SUBST([LIB]NAME[_PREFIX])
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl acl_libext,
-dnl acl_shlibext,
-dnl acl_hardcode_libdir_flag_spec,
-dnl acl_hardcode_libdir_separator,
-dnl acl_hardcode_direct,
-dnl acl_hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- acl_libext="$acl_cv_libext"
- acl_shlibext="$acl_cv_shlibext"
- acl_libname_spec="$acl_cv_libname_spec"
- acl_library_names_spec="$acl_cv_library_names_spec"
- acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- acl_hardcode_direct="$acl_cv_hardcode_direct"
- acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
-dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl Autoconf >= 2.61 supports dots in --with options.
- define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
-[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
+ #
+ # First check in libc
+ #
+ AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+ [AC_TRY_LINK([
+#include <libintl.h>
+],
+ [return !ngettext ("","", 1)],
+ gt_cv_func_ngettext_libc=yes,
+ gt_cv_func_ngettext_libc=no)
])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/$acl_libdirstem"
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+ [AC_TRY_LINK([
+#include <libintl.h>
+],
+ [return !dgettext ("","")],
+ gt_cv_func_dgettext_libc=yes,
+ gt_cv_func_dgettext_libc=no)
+ ])
fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- LIB[]NAME[]_PREFIX=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ fi
+
+ #
+ # If we don't have everything we want, check in libintl
+ #
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
+ || test "$gt_cv_func_ngettext_libc" != "yes" \
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CHECK_LIB(intl, ngettext,
+ [AC_CHECK_LIB(intl, dgettext,
+ gt_cv_func_dgettext_libintl=yes)])])
+
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+ AC_MSG_CHECKING([if -liconv is needed to use gettext])
+ AC_MSG_RESULT([])
+ AC_CHECK_LIB(intl, ngettext,
+ [AC_CHECK_LIB(intl, dcgettext,
+ [gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv],
+ :,-liconv)],
+ :,-liconv)
fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
- if test -n "$acl_shlibext"; then
- shrext=".$acl_shlibext" # typically: shrext=.so
+
+ #
+ # If we found libintl, then check in it for bind_textdomain_codeset();
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
+ # and both have dgettext and ngettext
+ #
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS -lintl $libintl_extra_libs"
+ unset ac_cv_func_bind_textdomain_codeset
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ LIBS="$glib_save_LIBS"
+
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+ gt_cv_func_dgettext_libc=no
else
- shrext=
- fi
- if test $use_additional = yes; then
- dir="$additional_libdir"
- dnl The same code as in the loop below:
- dnl First look for a shared library.
- if test -n "$acl_shlibext"; then
- if test -f "$dir/$libname$shrext"; then
- found_dir="$dir"
- found_so="$dir/$libname$shrext"
- else
- if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
- ver=`(cd "$dir" && \
- for f in "$libname$shrext".*; do echo "$f"; done \
- | sed -e "s,^$libname$shrext\\\\.,," \
- | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
- | sed 1q ) 2>/dev/null`
- if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
- found_dir="$dir"
- found_so="$dir/$libname$shrext.$ver"
- fi
- else
- eval library_names=\"$acl_library_names_spec\"
- for f in $library_names; do
- if test -f "$dir/$f"; then
- found_dir="$dir"
- found_so="$dir/$f"
- break
- fi
- done
- fi
- fi
- fi
- dnl Then look for a static library.
- if test "X$found_dir" = "X"; then
- if test -f "$dir/$libname.$acl_libext"; then
- found_dir="$dir"
- found_a="$dir/$libname.$acl_libext"
- fi
- fi
- if test "X$found_dir" != "X"; then
- if test -f "$dir/$libname.la"; then
- found_la="$dir/$libname.la"
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- dnl First look for a shared library.
- if test -n "$acl_shlibext"; then
- if test -f "$dir/$libname$shrext"; then
- found_dir="$dir"
- found_so="$dir/$libname$shrext"
- else
- if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
- ver=`(cd "$dir" && \
- for f in "$libname$shrext".*; do echo "$f"; done \
- | sed -e "s,^$libname$shrext\\\\.,," \
- | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
- | sed 1q ) 2>/dev/null`
- if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
- found_dir="$dir"
- found_so="$dir/$libname$shrext.$ver"
- fi
- else
- eval library_names=\"$acl_library_names_spec\"
- for f in $library_names; do
- if test -f "$dir/$f"; then
- found_dir="$dir"
- found_so="$dir/$f"
- break
- fi
- done
- fi
- fi
- fi
- dnl Then look for a static library.
- if test "X$found_dir" = "X"; then
- if test -f "$dir/$libname.$acl_libext"; then
- found_dir="$dir"
- found_a="$dir/$libname.$acl_libext"
- fi
- fi
- if test "X$found_dir" != "X"; then
- if test -f "$dir/$libname.la"; then
- found_la="$dir/$libname.la"
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$acl_hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$acl_hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ && test "$gt_cv_func_ngettext_libc" = "yes"; then
+ gt_cv_func_dgettext_libintl=no
fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */$acl_libdirstem | */$acl_libdirstem/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
- LIB[]NAME[]_PREFIX="$basedir"
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
fi
fi
fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$acl_hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
- done
- dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ gt_cv_have_gettext=yes
fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-dnl For those cases where a variable contains several -L and -l options
-dnl referring to unknown libraries and directories, this macro determines the
-dnl necessary additional linker options for the runtime path.
-dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
-dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
-dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
-dnl otherwise linking without libtool is assumed.
-AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-[
- AC_REQUIRE([AC_LIB_RPATH])
- AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- $1=
- if test "$enable_rpath" != no; then
- if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode directories into the resulting
- dnl binary.
- rpathdirs=
- next=
- for opt in $2; do
- if test -n "$next"; then
- dir="$next"
- dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem"; then
- rpathdirs="$rpathdirs $dir"
- fi
- next=
- else
- case $opt in
- -L) next=yes ;;
- -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
- dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem"; then
- rpathdirs="$rpathdirs $dir"
- fi
- next= ;;
- *) next= ;;
- esac
- fi
- done
- if test "X$rpathdirs" != "X"; then
- if test -n ""$3""; then
- dnl libtool is used for linking. Use -R options.
- for dir in $rpathdirs; do
- $1="${$1}${$1:+ }-R$dir"
- done
- else
- dnl The linker is used for linking directly.
- if test -n "$acl_hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user
- dnl must pass all path elements in one option.
- alldirs=
- for dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
- done
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- $1="$flag"
- else
- dnl The -rpath options are cumulative.
- for dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$dir"
- eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- $1="${$1}${$1:+ }$flag"
- done
- fi
- fi
+
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ INTLLIBS="-lintl $libintl_extra_libs"
+ fi
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT,1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS $INTLLIBS"
+ AC_CHECK_FUNCS(dcgettext)
+ MSGFMT_OPTS=
+ AC_MSG_CHECKING([if msgfmt accepts -c])
+ GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo@bar.xx>\n"
+"Language-Team: C <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+ AC_SUBST(MSGFMT_OPTS)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [case $host in
+ *-*-solaris*)
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
+ dnl GNU format message catalog is always supported,
+ dnl since both are added to the libc all together.
+ dnl Hence, we'd like to go with DATADIRNAME=share and
+ dnl and CATOBJEXT=.gmo in this case.
+ AC_CHECK_FUNC(bind_textdomain_codeset,
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+ ;;
+ esac])
+ LIBS="$glib_save_LIBS"
+ INSTOBJEXT=.mo
+ else
+ gt_cv_have_gettext=no
+ fi
fi
+ ])
+
+ if test "$gt_cv_have_gettext" = "yes" ; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [always defined to indicate that i18n is enabled])
fi
- fi
- AC_SUBST([$1])
-])
-# lib-prefix.m4 serial 5 (gettext-0.15)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is not GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
else
- additional_includedir="$withval/include"
- additional_libdir="$withval/$acl_libdirstem"
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
fi
fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
+ # We need to process the po/ directory.
+ POSUB=po
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
-dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
-dnl the basename of the libdir, either "lib" or "lib64".
-AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
-[
- dnl There is no formal standard regarding lib and lib64. The current
- dnl practice is that on a system supporting 32-bit and 64-bit instruction
- dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
- dnl libraries go under $prefix/lib. We determine the compiler's default
- dnl mode by looking at the compiler's library search path. If at least
- dnl of its elements ends in /lib64 or points to a directory whose absolute
- dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
- dnl default, namely "lib".
- acl_libdirstem=lib
- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) acl_libdirstem=lib64 ;;
- esac ;;
- esac
- fi
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
done
- IFS="$acl_save_IFS"
- fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(PO_IN_DATADIR_TRUE)
+ AC_SUBST(PO_IN_DATADIR_FALSE)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+
+ GLIB_LC_MESSAGES
+ GLIB_WITH_NLS
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+glib_save_datarootdir="$datarootdir"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+datarootdir=`eval echo "${datarootdir}"`
+if test "x$CATOBJEXT" = "x.mo" ; then
+ localedir=`eval echo "${libdir}/locale"`
+else
+ localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+datarootdir="$glib_save_datarootdir"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+ [Define the location where the catalogs will be installed])
])
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_in,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
+# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
+#
+# Create a temporary file with TEST-FILE as its contents and pass the
+# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
+# 0 and perform ACTION-IF-FAIL for any other exit status.
+AC_DEFUN([GLIB_RUN_PROG],
+[cat >conftest.foo <<_ACEOF
+$2
+_ACEOF
+if AC_RUN_LOG([$1 conftest.foo]); then
+ m4_ifval([$3], [$3], [:])
+m4_ifvaln([$4], [else $4])dnl
+echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
+sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
+fi])
+
+
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 51 AC_PROG_LIBTOOL
+# serial 52 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -1297,7 +542,6 @@ AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
dnl
-
AC_LIBTOOL_SYS_MAX_CMD_LEN
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
AC_LIBTOOL_OBJDIR
@@ -1399,6 +643,8 @@ file_magic*)
;;
esac
+_LT_REQUIRED_DARWIN_CHECKS
+
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
enable_win32_dll=yes, enable_win32_dll=no)
@@ -1478,9 +724,80 @@ ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$rm -r conftest*
])# _LT_LINKER_BOILERPLATE
+# _LT_REQUIRED_DARWIN_CHECKS
+# --------------------------
+# Check for some things on darwin
+AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm -rf libconftest.dylib*
+ fi
+ rm conftest.c
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[0123]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*)
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil="~$DSYMUTIL \$lib || :"
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
# _LT_AC_SYS_LIBPATH_AIX
# ----------------------
@@ -1806,7 +1123,11 @@ sparc*-*solaris*)
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
esac
;;
esac
@@ -1899,7 +1220,7 @@ AC_CACHE_CHECK([$1], [$2],
$2=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
])
@@ -2170,7 +1491,7 @@ else
AC_CHECK_FUNC([shl_load],
[lt_cv_dlopen="shl_load"],
[AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
[AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
@@ -2178,7 +1499,7 @@ else
[AC_CHECK_LIB([svld], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
])
])
])
@@ -2495,7 +1816,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[[4-9]]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -3018,6 +2339,13 @@ esac
AC_MSG_RESULT([$dynamic_linker])
test "$dynamic_linker" = no && can_build_shared=no
+AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
+[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
+[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
@@ -3517,7 +2845,7 @@ lt_cv_deplibs_check_method='unknown'
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix4* | aix5*)
+aix[[4-9]]*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3953,7 +3281,7 @@ aix3*)
fi
;;
-aix4* | aix5*)
+aix[[4-9]]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
@@ -4010,6 +3338,7 @@ _LT_AC_TAGVAR(postdep_objects, $1)=
_LT_AC_TAGVAR(predeps, $1)=
_LT_AC_TAGVAR(postdeps, $1)=
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
# Source file extension for C++ test sources.
ac_ext=cpp
@@ -4119,7 +3448,7 @@ case $host_os in
# FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
- aix4* | aix5*)
+ aix[[4-9]]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -4132,7 +3461,7 @@ case $host_os in
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
*-brtl*)
@@ -4278,51 +3607,23 @@ case $host_os in
fi
;;
darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes ; then
- lt_int_apple_cc_single_mod=no
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ if test "$GXX" = yes ; then
output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
+ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- fi
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
case $cc_basename in
xlc*)
@@ -4573,7 +3874,7 @@ case $host_os in
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
;;
- pgCC*)
+ pgCC* | pgcpp*)
# Portland Group C++ compiler
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
@@ -5008,7 +4309,8 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
# compiler output when linking a shared library.
# Parse the compiler output and extract the necessary
# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
dnl we can't use the lt_simple_compile_test_code here,
dnl because it contains code intended for an executable,
dnl not a library. It's possible we should let each
@@ -5133,6 +4435,11 @@ fi
$rm -f confest.$objext
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
# PORTME: override above test on systems where it is broken
ifelse([$1],[CXX],
[case $host_os in
@@ -5189,7 +4496,6 @@ solaris*)
;;
esac
])
-
case " $_LT_AC_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
esac
@@ -5274,7 +4580,7 @@ aix3*)
postinstall_cmds='$RANLIB $lib'
fi
;;
-aix4* | aix5*)
+aix[[4-9]]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
@@ -5451,6 +4757,7 @@ if test -f "$ltmain"; then
_LT_AC_TAGVAR(predeps, $1) \
_LT_AC_TAGVAR(postdeps, $1) \
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
_LT_AC_TAGVAR(archive_cmds, $1) \
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
_LT_AC_TAGVAR(postinstall_cmds, $1) \
@@ -5513,7 +4820,7 @@ ifelse([$1], [],
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -5750,6 +5057,10 @@ predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
# shared library.
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
@@ -6099,7 +5410,7 @@ EOF
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&5
fi
- rm -f conftest* conftst*
+ rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
@@ -6156,7 +5467,8 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
# PIC is the default on this platform
@@ -6193,7 +5505,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
esac
else
case $host_os in
- aix4* | aix5*)
+ aix[[4-9]]*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
@@ -6289,7 +5601,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
- pgCC*)
+ pgCC* | pgcpp*)
# Portland Group C++ compiler.
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
@@ -6440,7 +5752,8 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
@@ -6510,7 +5823,8 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
hpux9* | hpux10* | hpux11*)
@@ -6647,7 +5961,7 @@ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
#
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
- _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
"" | " "*) ;;
@@ -6671,7 +5985,7 @@ esac
#
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
$lt_tmp_static_flag,
[],
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
@@ -6687,7 +6001,7 @@ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
- aix4* | aix5*)
+ aix[[4-9]]*)
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
@@ -6706,6 +6020,7 @@ ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
esac
+ _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
],[
runpath_var=
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
@@ -6736,12 +6051,14 @@ ifelse([$1],[CXX],[
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
- _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+ _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
# the symbol is explicitly referenced. Since portable code cannot
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
_LT_CC_BASENAME([$compiler])
@@ -6791,7 +6108,7 @@ ifelse([$1],[CXX],[
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[[3-9]]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -7010,7 +6327,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ aix[[4-9]]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -7030,7 +6347,7 @@ _LT_EOF
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@@ -7190,11 +6507,10 @@ _LT_EOF
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
else
case $cc_basename in
xlc*)
@@ -7776,7 +7092,7 @@ AC_MSG_RESULT([$SED])
])
-# serial 8 AC_LIB_LTDL
+# serial 9 AC_LIB_LTDL
# AC_WITH_LTDL
# ------------
@@ -7890,7 +7206,7 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
# we want this `case' here to explicitly catch those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
- aix[[45]]*)
+ aix[[4-9]]*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
darwin*)
@@ -9231,4 +8547,15 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
-m4_include([acinclude.m4])
+m4_include([m4/acx_libwrap.m4])
+m4_include([m4/acx_lirc.m4])
+m4_include([m4/acx_pthread.m4])
+m4_include([m4/attributes.m4])
+m4_include([m4/check_define.m4])
+m4_include([m4/iconv.m4])
+m4_include([m4/intltool.m4])
+m4_include([m4/lib-ld.m4])
+m4_include([m4/lib-link.m4])
+m4_include([m4/lib-prefix.m4])
+m4_include([m4/nls.m4])
+m4_include([m4/tls.m4])
diff --git a/bootstrap.sh b/bootstrap.sh
index f9e031f..5dfcdf2 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-# $Id: bootstrap.sh 1971 2007-10-28 19:13:50Z lennart $
# This file is part of PulseAudio.
#
@@ -17,19 +16,19 @@
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-VERSION=1.9
+VERSION=1.10
run_versioned() {
local P
local V
V=$(echo "$2" | sed -e 's,\.,,g')
-
+
if [ -e "`which $1$V 2> /dev/null`" ] ; then
- P="$1$V"
+ P="$1$V"
else
if [ -e "`which $1-$2 2> /dev/null`" ] ; then
- P="$1-$2"
+ P="$1-$2"
else
P="$1"
fi
@@ -44,21 +43,28 @@ set -ex
if [ "x$1" = "xam" ] ; then
run_versioned automake "$VERSION" -a -c --foreign
./config.status
-else
+else
rm -rf autom4te.cache
rm -f config.cache
+ rm -f Makefile.am~ configure.ac~
+ # Evil, evil, evil, evil hack
+ sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force
+ test -f Makefile.am~ && mv Makefile.am~ Makefile.am
+ test -f configure.ac~ && mv configure.ac~ configure.ac
+
touch config.rpath
test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
+ intltoolize --copy --force --automake
"$LIBTOOLIZE" -c --force --ltdl
- run_versioned aclocal "$VERSION"
- run_versioned autoconf 2.59 -Wall
- run_versioned autoheader 2.59
+ run_versioned aclocal "$VERSION" -I m4
+ run_versioned autoconf 2.62 -Wall
+ run_versioned autoheader 2.62
run_versioned automake "$VERSION" --copy --foreign --add-missing
if test "x$NOCONFIGURE" = "x"; then
- CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
+ CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
make clean
fi
fi
diff --git a/config.guess b/config.guess
index 951383e..f32079a 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
-timestamp='2007-05-17'
+timestamp='2008-01-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -56,8 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -330,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
@@ -532,7 +532,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[45])
+ *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -793,12 +793,15 @@ EOF
exit ;;
*:Interix*:[3456]*)
case ${UNAME_MACHINE} in
- x86)
+ x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -833,7 +836,14 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -954,8 +964,8 @@ EOF
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@@ -1474,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/config.h.in b/config.h.in
index c1670da..9441d36 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
/* Have ARMv6 instructions. */
#undef ATOMIC_ARM_INLINE_ASM
@@ -9,10 +12,34 @@
/* Enable memory barriers */
#undef ATOMIC_ARM_MEMORY_BARRIER_ENABLED
+/* Canonical host string. */
+#undef CANONICAL_HOST
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* always defined to indicate that i18n is enabled */
+#undef ENABLE_NLS
+
/* Define to the type of elements in the array set by `getgroups'. Usually
this is either `int' or `gid_t'. */
#undef GETGROUPS_T
+/* Gettext package */
+#undef GETTEXT_PACKAGE
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
/* Have ALSA? */
#undef HAVE_ALSA
@@ -25,6 +52,9 @@
/* Define to 1 if you have the <atomic_ops.h> header file. */
#undef HAVE_ATOMIC_OPS_H
+/* Define to 1 if you have the `bind_textdomain_codeset' function. */
+#undef HAVE_BIND_TEXTDOMAIN_CODESET
+
/* Define to 1 if you have the <byteswap.h> header file. */
#undef HAVE_BYTESWAP_H
@@ -46,12 +76,22 @@
/* Define to 1 if you have the `dbus_watch_get_unix_fd' function. */
#undef HAVE_DBUS_WATCH_GET_UNIX_FD
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the declaration of `environ', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ENVIRON
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
+/* Define to 1 if you have the <gdbm.h> header file. */
+#undef HAVE_GDBM_H
+
/* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO
@@ -67,6 +107,9 @@
/* Define to 1 if you have the `getpwuid_r' function. */
#undef HAVE_GETPWUID_R
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
@@ -91,9 +134,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
/* Have libasyncns? */
#undef HAVE_LIBASYNCNS
+/* Define to 1 if you have the `gdbm' library (-lgdbm). */
+#undef HAVE_LIBGDBM
+
/* Define to 1 if you have the `iberty' library (-liberty). */
#undef HAVE_LIBIBERTY
@@ -109,6 +158,9 @@
/* Define to 1 if you have the <linux/sockios.h> header file. */
#undef HAVE_LINUX_SOCKIOS_H
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
/* Define to 1 if you have the `lrintf' function. */
#undef HAVE_LRINTF
@@ -283,6 +335,9 @@
/* Define to 1 if you have the <sys/dl.h> header file. */
#undef HAVE_SYS_DL_H
+/* Define to 1 if you have the <sys/eventfd.h> header file. */
+#undef HAVE_SYS_EVENTFD_H
+
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
@@ -322,15 +377,15 @@
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
-/* Have __thread(). */
-#undef HAVE_TLS_BUILTIN
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `usleep' function. */
#undef HAVE_USLEEP
+/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
+#undef HAVE_VALGRIND_MEMCHECK_H
+
/* Define to 1 if you have the `vfork' function. */
#undef HAVE_VFORK
@@ -388,6 +443,9 @@
/* Access group */
#undef PA_ACCESS_GROUP
+/* The CFLAGS used during compilation */
+#undef PA_CFLAGS
+
/* Realtime group */
#undef PA_REALTIME_GROUP
@@ -413,18 +471,59 @@
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define this if the compiler supports __thread for Thread-Local Storage */
+#undef SUPPORT_TLS___THREAD
+
/* Define this if you want per-user esound socket directories */
#undef USE_PER_USER_ESOUND_SOCKET
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
/* Version number of package */
#undef VERSION
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
@@ -432,14 +531,19 @@
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
/* Needed to get declarations for msg_control and msg_controllen on Solaris */
#undef _XOPEN_SOURCE
diff --git a/config.rpath b/config.rpath
index e69de29..c547c68 100644..100755
--- a/config.rpath
+++ b/config.rpath
@@ -0,0 +1,666 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2007 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case $cc_basename in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | pw32* | os2*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we cannot use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | k*bsd*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case $cc_basename in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix4* | aix5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ library_names_spec='$libname.a'
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd1*)
+ ;;
+ freebsd* | dragonfly*)
+ case "$host_os" in
+ freebsd[123]*)
+ library_names_spec='$libname$shrext$versuffix' ;;
+ *)
+ library_names_spec='$libname$shrext' ;;
+ esac
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ nto-qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/config.sub b/config.sub
index c060f44..6759825 100755
--- a/config.sub
+++ b/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
-timestamp='2007-04-29'
+timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -72,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -369,10 +369,14 @@ case $basic_machine in
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
+ | xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -443,6 +447,14 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
@@ -475,8 +487,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16c)
- basic_machine=cr16c-unknown
+ cr16)
+ basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -668,6 +680,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -813,6 +833,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
pbd)
basic_machine=sparc-tti
;;
@@ -1021,6 +1049,10 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
diff --git a/configure b/configure
index 05be55a..3ff0a8d 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for pulseaudio 0.9.10.
+# Generated by GNU Autoconf 2.63 for pulseaudio 0.9.13.
#
# Report bugs to <mzchyfrnhqvb (at) 0pointer (dot) net>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -17,7 +17,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -39,17 +39,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
# Support unset when possible.
@@ -65,8 +93,6 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -89,7 +115,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
{ (exit 1); exit 1; }
fi
@@ -102,17 +128,10 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -134,7 +153,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -160,7 +179,7 @@ else
as_have_required=no
fi
- if test $as_have_required = yes && (eval ":
+ if test $as_have_required = yes && (eval ":
(as_func_return () {
(exit \$1)
}
@@ -242,7 +261,7 @@ IFS=$as_save_IFS
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -263,7 +282,7 @@ _ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -343,10 +362,10 @@ fi
if test "x$CONFIG_SHELL" != x; then
for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi
@@ -415,9 +434,10 @@ fi
test \$exitcode = 0") || {
echo No shell found that supports shell functions.
- echo Please tell autoconf@gnu.org about your system,
- echo including any error possibly output before this
- echo message
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
}
@@ -453,7 +473,7 @@ test \$exitcode = 0") || {
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
@@ -481,7 +501,6 @@ case `echo -n x` in
*)
ECHO_N='-n';;
esac
-
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -494,19 +513,22 @@ if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
@@ -531,10 +553,10 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
case $1 in
- -*)set "./$1";;
+ -*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
???[sx]*):;;*)false;;esac;fi
@@ -728,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='pulseaudio'
PACKAGE_TARNAME='pulseaudio'
-PACKAGE_VERSION='0.9.10'
-PACKAGE_STRING='pulseaudio 0.9.10'
+PACKAGE_VERSION='0.9.13'
+PACKAGE_STRING='pulseaudio 0.9.13'
PACKAGE_BUGREPORT='mzchyfrnhqvb (at) 0pointer (dot) net'
ac_unique_file="src/daemon/main.c"
@@ -769,248 +791,342 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-am__isrc
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-PA_MAJORMINOR
-PACKAGE_URL
-PA_API_VERSION
-PA_PROTOCOL_VERSION
-LIBPULSE_VERSION_INFO
-LIBPULSE_SIMPLE_VERSION_INFO
-LIBPULSE_BROWSE_VERSION_INFO
-LIBPULSE_MAINLOOP_GLIB_VERSION_INFO
-LIBPULSECORE_VERSION_INFO
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-CPP
-GREP
-EGREP
-M4
-INSTALL_LTDL_TRUE
-INSTALL_LTDL_FALSE
-CONVENIENCE_LTDL_TRUE
-CONVENIENCE_LTDL_FALSE
-SED
-LN_S
-ECHO
-AR
-RANLIB
-DLLTOOL
-AS
-OBJDUMP
-CXX
-CXXFLAGS
-ac_ct_CXX
-CXXDEPMODE
-am__fastdepCXX_TRUE
-am__fastdepCXX_FALSE
-CXXCPP
-F77
-FFLAGS
-ac_ct_F77
-LIBTOOL
-LTDLINCL
-LIBLTDL
-subdirs
-OS_IS_WIN32_TRUE
-OS_IS_WIN32_FALSE
-HAVE_REGEX_TRUE
-HAVE_REGEX_FALSE
-HAVE_AF_UNIX_TRUE
-HAVE_AF_UNIX_FALSE
-HAVE_EVDEV_TRUE
-HAVE_EVDEV_FALSE
-HAVE_SIGXCPU_TRUE
-HAVE_SIGXCPU_FALSE
-acx_pthread_config
-PTHREAD_CC
-PTHREAD_LIBS
-PTHREAD_CFLAGS
-HAVE_MKFIFO_TRUE
-HAVE_MKFIFO_FALSE
-LIBICONV
-LTLIBICONV
-XMKMF
-X_CFLAGS
-X_PRE_LIBS
-X_LIBS
-X_EXTRA_LIBS
-HAVE_X11
-HAVE_X11_TRUE
-HAVE_X11_FALSE
-have_pkg_config
-PKG_CONFIG
-LIBSNDFILE_CFLAGS
-LIBSNDFILE_LIBS
-LIBSAMPLERATE_CFLAGS
-LIBSAMPLERATE_LIBS
-HAVE_LIBSAMPLERATE
-HAVE_LIBSAMPLERATE_TRUE
-HAVE_LIBSAMPLERATE_FALSE
-HAVE_OSS
-HAVE_OSS_TRUE
-HAVE_OSS_FALSE
-ASOUNDLIB_CFLAGS
-ASOUNDLIB_LIBS
-HAVE_ALSA
-HAVE_ALSA_TRUE
-HAVE_ALSA_FALSE
-HAVE_SOLARIS
-HAVE_SOLARIS_TRUE
-HAVE_SOLARIS_FALSE
-GLIB20_CFLAGS
-GLIB20_LIBS
-HAVE_GLIB20
-HAVE_GLIB20_TRUE
-HAVE_GLIB20_FALSE
-GCONF_CFLAGS
-GCONF_LIBS
-HAVE_GCONF
-HAVE_GCONF_TRUE
-HAVE_GCONF_FALSE
-AVAHI_CFLAGS
-AVAHI_LIBS
-HAVE_AVAHI
-HAVE_AVAHI_TRUE
-HAVE_AVAHI_FALSE
-LIBOIL_CFLAGS
-LIBOIL_LIBS
-JACK_CFLAGS
-JACK_LIBS
-HAVE_JACK
-HAVE_JACK_TRUE
-HAVE_JACK_FALSE
-LIBASYNCNS_CFLAGS
-LIBASYNCNS_LIBS
-HAVE_LIBASYNCNS
-HAVE_LIBASYNCNS_TRUE
-HAVE_LIBASYNCNS_FALSE
-LIBWRAP_LIBS
-LIRC_CFLAGS
-LIRC_LIBS
-HAVE_LIRC_TRUE
-HAVE_LIRC_FALSE
-HAL_CFLAGS
-HAL_LIBS
-HAVE_HAL
-HAVE_HAL_TRUE
-HAVE_HAL_FALSE
-BLUEZ_CFLAGS
-BLUEZ_LIBS
-HAVE_BLUEZ
-HAVE_BLUEZ_TRUE
-HAVE_BLUEZ_FALSE
-DBUS_CFLAGS
-DBUS_LIBS
-HAVE_DBUS
-HAVE_DBUS_TRUE
-HAVE_DBUS_FALSE
-POLKIT_CFLAGS
-POLKIT_LIBS
-policydir
-HAVE_POLKIT
-HAVE_POLKIT_TRUE
-HAVE_POLKIT_FALSE
-have_xmltoman
-USE_XMLTOMAN_TRUE
-USE_XMLTOMAN_FALSE
-BUILD_MANPAGES_TRUE
-BUILD_MANPAGES_FALSE
-PA_SYSTEM_USER
-PA_SYSTEM_GROUP
-PA_REALTIME_GROUP
-PA_ACCESS_GROUP
-PA_SYSTEM_RUNTIME_PATH
-STATIC_BINS_TRUE
-STATIC_BINS_FALSE
-PREOPEN_MODS_TRUE
-PREOPEN_MODS_FALSE
-PREOPEN_MODS
-modlibexecdir
-FORCE_PREOPEN_TRUE
-FORCE_PREOPEN_FALSE
+enable_option_checking=no
+ac_subst_vars='LTLIBOBJS
LIBOBJS
-LTLIBOBJS'
+FORCE_PREOPEN_FALSE
+FORCE_PREOPEN_TRUE
+modlibexecdir
+PREOPEN_MODS
+PREOPEN_MODS_FALSE
+PREOPEN_MODS_TRUE
+STATIC_BINS_FALSE
+STATIC_BINS_TRUE
+PA_SYSTEM_STATE_PATH
+PA_SYSTEM_CONFIG_PATH
+PA_SYSTEM_RUNTIME_PATH
+PA_ACCESS_GROUP
+PA_REALTIME_GROUP
+PA_SYSTEM_GROUP
+PA_SYSTEM_USER
+BUILD_MANPAGES_FALSE
+BUILD_MANPAGES_TRUE
+HAVE_POLKIT_FALSE
+HAVE_POLKIT_TRUE
+HAVE_POLKIT
+policydir
+POLKIT_LIBS
+POLKIT_CFLAGS
+HAVE_DBUS_FALSE
+HAVE_DBUS_TRUE
+HAVE_DBUS
+DBUS_LIBS
+DBUS_CFLAGS
+HAVE_BLUEZ_FALSE
+HAVE_BLUEZ_TRUE
+HAVE_BLUEZ
+BLUEZ_LIBS
+BLUEZ_CFLAGS
+HAVE_HAL_FALSE
+HAVE_HAL_TRUE
+HAVE_HAL
+HAL_LIBS
+HAL_CFLAGS
+HAVE_LIRC_FALSE
+HAVE_LIRC_TRUE
+LIRC_LIBS
+LIRC_CFLAGS
+LIBWRAP_LIBS
+HAVE_LIBASYNCNS_FALSE
+HAVE_LIBASYNCNS_TRUE
+HAVE_LIBASYNCNS
+LIBASYNCNS_LIBS
+LIBASYNCNS_CFLAGS
+HAVE_JACK_FALSE
+HAVE_JACK_TRUE
+HAVE_JACK
+JACK_LIBS
+JACK_CFLAGS
+LIBOIL_LIBS
+LIBOIL_CFLAGS
+HAVE_AVAHI_FALSE
+HAVE_AVAHI_TRUE
+HAVE_AVAHI
+AVAHI_LIBS
+AVAHI_CFLAGS
+HAVE_GCONF_FALSE
+HAVE_GCONF_TRUE
+HAVE_GCONF
+GCONF_LIBS
+GCONF_CFLAGS
+HAVE_GLIB20_FALSE
+HAVE_GLIB20_TRUE
+HAVE_GLIB20
+GLIB20_LIBS
+GLIB20_CFLAGS
+HAVE_SOLARIS_FALSE
+HAVE_SOLARIS_TRUE
+HAVE_SOLARIS
+HAVE_ALSA_FALSE
+HAVE_ALSA_TRUE
+HAVE_ALSA
+ASOUNDLIB_LIBS
+ASOUNDLIB_CFLAGS
+HAVE_OSS_FALSE
+HAVE_OSS_TRUE
+HAVE_OSS
+HAVE_LIBSAMPLERATE_FALSE
+HAVE_LIBSAMPLERATE_TRUE
+HAVE_LIBSAMPLERATE
+LIBSAMPLERATE_LIBS
+LIBSAMPLERATE_CFLAGS
+LIBSPEEX_LIBS
+LIBSPEEX_CFLAGS
+LIBSNDFILE_LIBS
+LIBSNDFILE_CFLAGS
+PKG_CONFIG
+have_pkg_config
+HAVE_X11_FALSE
+HAVE_X11_TRUE
+HAVE_X11
+X_EXTRA_LIBS
+X_LIBS
+X_PRE_LIBS
+X_CFLAGS
+XMKMF
+pulselocaledir
+MKINSTALLDIRS
+POSUB
+POFILES
+PO_IN_DATADIR_FALSE
+PO_IN_DATADIR_TRUE
+INTLLIBS
+INSTOBJEXT
+GMOFILES
+CATOBJEXT
+CATALOGS
+MSGFMT_OPTS
+GETTEXT_PACKAGE
+DATADIRNAME
+ALL_LINGUAS
+INTLTOOL_PERL
+GMSGFMT
+MSGFMT
+MSGMERGE
+XGETTEXT
+INTLTOOL_POLICY_RULE
+INTLTOOL_SERVICE_RULE
+INTLTOOL_THEME_RULE
+INTLTOOL_SCHEMAS_RULE
+INTLTOOL_CAVES_RULE
+INTLTOOL_XML_NOMERGE_RULE
+INTLTOOL_XML_RULE
+INTLTOOL_KBD_RULE
+INTLTOOL_XAM_RULE
+INTLTOOL_UI_RULE
+INTLTOOL_SOUNDLIST_RULE
+INTLTOOL_SHEET_RULE
+INTLTOOL_SERVER_RULE
+INTLTOOL_PONG_RULE
+INTLTOOL_OAF_RULE
+INTLTOOL_PROP_RULE
+INTLTOOL_KEYS_RULE
+INTLTOOL_DIRECTORY_RULE
+INTLTOOL_DESKTOP_RULE
+INTLTOOL_EXTRACT
+INTLTOOL_MERGE
+INTLTOOL_UPDATE
+USE_NLS
+LTLIBICONV
+LIBICONV
+ALLOCA
+HAVE_MKFIFO_FALSE
+HAVE_MKFIFO_TRUE
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CC
+acx_pthread_config
+HAVE_SIGXCPU_FALSE
+HAVE_SIGXCPU_TRUE
+HAVE_EVDEV_FALSE
+HAVE_EVDEV_TRUE
+HAVE_AF_UNIX_FALSE
+HAVE_AF_UNIX_TRUE
+HAVE_REGEX_FALSE
+HAVE_REGEX_TRUE
+OS_IS_WIN32_FALSE
+OS_IS_WIN32_TRUE
+subdirs
+LIBLTDL
+LTDLINCL
+LIBTOOL
+ac_ct_F77
+FFLAGS
+F77
+CXXCPP
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+OBJDUMP
+AS
+DLLTOOL
+NMEDIT
+DSYMUTIL
+RANLIB
+AR
+ECHO
+LN_S
+SED
+CONVENIENCE_LTDL_FALSE
+CONVENIENCE_LTDL_TRUE
+INSTALL_LTDL_FALSE
+INSTALL_LTDL_TRUE
+M4
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBPULSECORE_VERSION_INFO
+LIBPULSE_MAINLOOP_GLIB_VERSION_INFO
+LIBPULSE_BROWSE_VERSION_INFO
+LIBPULSE_SIMPLE_VERSION_INFO
+LIBPULSE_VERSION_INFO
+PA_PROTOCOL_VERSION
+PA_API_VERSION
+PACKAGE_URL
+PA_MAJORMINOR
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+enable_atomic_arm_linux_helpers
+enable_atomic_arm_memory_barrier
+enable_ltdl_install
+enable_shared
+enable_static
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+with_pic
+with_tags
+enable_largefile
+enable_rpath
+with_libiconv_prefix
+enable_nls
+with_x
+with_caps
+enable_samplerate
+enable_oss
+enable_alsa
+enable_solaris
+enable_glib2
+enable_gconf
+enable_avahi
+enable_jack
+enable_asyncns
+enable_tcpwrap
+enable_lirc
+enable_hal
+enable_bluez
+enable_dbus
+enable_polkit
+enable_manpages
+with_system_user
+with_system_group
+with_realtime_group
+with_access_group
+enable_per_user_esound_socket
+enable_static_bins
+with_preopen_mods
+with_module_dir
+enable_force_preopen
+'
ac_precious_vars='build_alias
host_alias
target_alias
@@ -1030,6 +1146,8 @@ XMKMF
PKG_CONFIG
LIBSNDFILE_CFLAGS
LIBSNDFILE_LIBS
+LIBSPEEX_CFLAGS
+LIBSPEEX_LIBS
LIBSAMPLERATE_CFLAGS
LIBSAMPLERATE_LIBS
ASOUNDLIB_CFLAGS
@@ -1059,6 +1177,8 @@ ac_subdirs_all='libltdl'
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -1157,13 +1277,21 @@ do
datarootdir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=no ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
-docdir | --docdir | --docdi | --doc | --do)
ac_prev=docdir ;;
@@ -1176,13 +1304,21 @@ do
dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=\$ac_optarg ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1373,22 +1509,38 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=\$ac_optarg ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=no ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -1408,7 +1560,7 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; }
;;
@@ -1417,16 +1569,16 @@ Try \`$0 --help' for more information." >&2
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
@@ -1435,22 +1587,38 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2
{ (exit 1); exit 1; }; }
fi
-# Be sure to have absolute directory names.
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
do
eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
case $ac_val in
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; }
done
@@ -1465,7 +1633,7 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
@@ -1481,10 +1649,10 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { echo "$as_me: error: Working directory cannot be determined" >&2
+ { $as_echo "$as_me: error: working directory cannot be determined" >&2
{ (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
{ (exit 1); exit 1; }; }
@@ -1492,12 +1660,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1524,12 +1692,12 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
{ (exit 1); exit 1; }; }
pwd)`
# When building in place, set srcdir=.
@@ -1556,7 +1724,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures pulseaudio 0.9.10 to adapt to many kinds of systems.
+\`configure' configures pulseaudio 0.9.13 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1578,9 +1746,9 @@ Configuration:
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1590,25 +1758,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/pulseaudio]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/pulseaudio]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -1630,11 +1798,12 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pulseaudio 0.9.10:";;
+ short | recursive ) echo "Configuration of pulseaudio 0.9.13:";;
esac
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
@@ -1651,6 +1820,7 @@ Optional Features:
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-largefile omit support for large files
--disable-rpath do not hardcode runtime library paths
+ --disable-nls do not use Native Language Support
--disable-samplerate Disable optional libsamplerate support
--disable-oss Disable optional OSS support
--disable-alsa Disable optional ALSA support
@@ -1667,10 +1837,8 @@ Optional Features:
--disable-dbus Disable optional D-Bus support
--disable-polkit Disable optional PolicyKit support
--disable-manpages Disable building and installation of man pages
- --disable-xmltoman Enable rebuilding of man pages with xmltoman
--disable-per-user-esound-socket
- Use per-user esound socket directory, like
- /tmp/.esd-UID/socket.
+ Use global esound socket directory /tmp/.esd/socket.
--enable-static-bins Statically link executables.
--enable-force-preopen Preopen modules, even when dlopen() is supported.
@@ -1723,6 +1891,10 @@ Some influential environment variables:
C compiler flags for LIBSNDFILE, overriding pkg-config
LIBSNDFILE_LIBS
linker flags for LIBSNDFILE, overriding pkg-config
+ LIBSPEEX_CFLAGS
+ C compiler flags for LIBSPEEX, overriding pkg-config
+ LIBSPEEX_LIBS
+ linker flags for LIBSPEEX, overriding pkg-config
LIBSAMPLERATE_CFLAGS
C compiler flags for LIBSAMPLERATE, overriding pkg-config
LIBSAMPLERATE_LIBS
@@ -1771,15 +1943,17 @@ fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1815,7 +1989,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1824,11 +1998,11 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pulseaudio configure 0.9.10
-generated by GNU Autoconf 2.61
+pulseaudio configure 0.9.13
+generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1838,8 +2012,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by pulseaudio $as_me 0.9.10, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+It was created by pulseaudio $as_me 0.9.13, which was
+generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -1875,7 +2049,7 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
+ $as_echo "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -1910,7 +2084,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
@@ -1962,11 +2136,12 @@ _ASBOX
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) $as_unset $ac_var ;;
esac ;;
esac
@@ -1996,9 +2171,9 @@ _ASBOX
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
@@ -2013,9 +2188,9 @@ _ASBOX
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
@@ -2031,8 +2206,8 @@ _ASBOX
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2074,21 +2249,24 @@ _ACEOF
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- set x "$CONFIG_SITE"
+ ac_site_file1=$CONFIG_SITE
elif test "x$prefix" != xNONE; then
- set x "$prefix/share/config.site" "$prefix/etc/config.site"
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
else
- set x "$ac_default_prefix/share/config.site" \
- "$ac_default_prefix/etc/config.site"
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
fi
-shift
-for ac_site_file
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
+ test "x$ac_site_file" = xNONE && continue
if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
@@ -2098,16 +2276,16 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -2121,29 +2299,38 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -2153,10 +2340,12 @@ echo "$as_me: current value: $ac_new_val" >&2;}
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2192,6 +2381,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_config_headers="$ac_config_headers config.h"
am__api_version='1.10'
@@ -2213,8 +2403,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2240,11 +2430,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -2273,17 +2464,29 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
done
;;
esac
+
done
IFS=$as_save_IFS
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
@@ -2296,8 +2499,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -2307,8 +2510,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
# Just in case
sleep 1
echo timestamp > conftest.file
@@ -2331,9 +2534,9 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+ { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2344,26 +2547,23 @@ then
# Ok.
:
else
- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+ { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
+$as_echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
{ (exit 1); exit 1; }; }
fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
+# Double any \ or $.
# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -2374,15 +2574,15 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
if test "${ac_cv_path_mkdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
@@ -2417,8 +2617,8 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-echo "${ECHO_T}$MKDIR_P" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
mkdir_p="$MKDIR_P"
case $mkdir_p in
@@ -2430,10 +2630,10 @@ for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -2446,7 +2646,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2457,22 +2657,23 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
test -n "$AWK" && break
done
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
@@ -2489,12 +2690,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
SET_MAKE=
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -2513,8 +2714,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -2531,7 +2732,7 @@ fi
# Define the identity of the package.
PACKAGE='pulseaudio'
- VERSION='0.9.10'
+ VERSION='0.9.13'
cat >>confdefs.h <<_ACEOF
@@ -2569,10 +2770,10 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
@@ -2585,7 +2786,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2596,11 +2797,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2609,10 +2810,10 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
@@ -2625,7 +2826,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2636,11 +2837,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -2648,12 +2849,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -2683,19 +2880,19 @@ PA_MAJORMINOR="0.9"
PACKAGE_URL=http://pulseaudio.org/
-PA_API_VERSION=11
+PA_API_VERSION=12
-PA_PROTOCOL_VERSION=12
+PA_PROTOCOL_VERSION=14
# The stable ABI for client applications, for the version info x:y:z
# always will hold y=z
-LIBPULSE_VERSION_INFO=4:1:4
+LIBPULSE_VERSION_INFO=7:0:7
# A simplified, synchronous, ABI-stable interface for client
# applications, for the version info x:y:z always will hold y=z
-LIBPULSE_SIMPLE_VERSION_INFO=0:1:0
+LIBPULSE_SIMPLE_VERSION_INFO=0:2:0
# The ABI-stable network browsing interface for client applications,
@@ -2705,45 +2902,45 @@ LIBPULSE_BROWSE_VERSION_INFO=1:1:1
# The ABI-stable GLib adapter for client applications, for the version
# info x:y:z always will hold y=z
-LIBPULSE_MAINLOOP_GLIB_VERSION_INFO=0:3:0
+LIBPULSE_MAINLOOP_GLIB_VERSION_INFO=0:4:0
# An internally used, ABI-unstable library that contains the
# PulseAudio core, SONAMEs are bumped on every release, version info
# suffix will always be 0:0
-LIBPULSECORE_VERSION_INFO=5:1:0
+LIBPULSECORE_VERSION_INFO=8:0:0
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
{ (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
{ (exit 1); exit 1; }; }
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
{ (exit 1); exit 1; }; };;
esac
build=$ac_cv_build
@@ -2760,27 +2957,27 @@ IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
{ (exit 1); exit 1; }; };;
esac
host=$ac_cv_host
@@ -2798,9 +2995,14 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+cat >>confdefs.h <<_ACEOF
+#define CANONICAL_HOST "$host"
+_ACEOF
+
+
if type -p stow > /dev/null && test -d /usr/local/stow ; then
- { echo "$as_me:$LINENO: *** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***" >&5
-echo "$as_me: *** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***" >&6;}
+ { $as_echo "$as_me:$LINENO: *** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***" >&5
+$as_echo "$as_me: *** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***" >&6;}
ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
fi
@@ -2830,11 +3032,11 @@ esac
# mkdir -p
-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
if test "${ac_cv_path_mkdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
@@ -2869,8 +3071,8 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-echo "${ECHO_T}$MKDIR_P" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
# CC
@@ -2883,10 +3085,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2899,7 +3101,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2910,11 +3112,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2923,10 +3125,10 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2939,7 +3141,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2950,11 +3152,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -2962,12 +3164,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2980,10 +3178,10 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2996,7 +3194,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3007,11 +3205,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -3020,10 +3218,10 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3041,7 +3239,7 @@ do
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3064,11 +3262,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -3079,10 +3277,10 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3095,7 +3293,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3106,11 +3304,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -3123,10 +3321,10 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -3139,7 +3337,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3150,11 +3348,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -3166,12 +3364,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -3181,44 +3375,50 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
@@ -3237,27 +3437,22 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort. b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions. Remove them first so a
-# subsequent execution test works.
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
ac_rmfiles=
for ac_file in $ac_files
do
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
* ) ac_rmfiles="$ac_rmfiles $ac_file";;
esac
done
@@ -3268,10 +3463,11 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
@@ -3282,7 +3478,7 @@ for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
@@ -3309,25 +3505,27 @@ else
ac_file=''
fi
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
+$as_echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
fi
ac_exeext=$ac_cv_exeext
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
@@ -3336,49 +3534,53 @@ if test "$cross_compiling" != yes; then
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
+$as_echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
fi
fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
@@ -3387,31 +3589,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3434,40 +3638,43 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3493,20 +3700,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
@@ -3516,15 +3724,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
@@ -3551,20 +3763,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
CFLAGS=""
@@ -3589,20 +3802,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_c_werror_flag=$ac_save_c_werror_flag
@@ -3628,20 +3842,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -3656,8 +3871,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -3673,10 +3888,10 @@ else
CFLAGS=
fi
fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
@@ -3747,20 +3962,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_c89=$ac_arg
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -3776,15 +3992,15 @@ fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
- { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
xno)
- { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
@@ -3805,8 +4021,8 @@ am__doit:
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
_am_result=none
@@ -3833,8 +4049,8 @@ if test "$am__include" = "#"; then
fi
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
rm -f confinc confmf
# Check whether --enable-dependency-tracking was given.
@@ -3858,10 +4074,10 @@ fi
depcc="$CC" am_compiler_list=
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
@@ -3949,8 +4165,8 @@ else
fi
fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
@@ -3964,17 +4180,219 @@ else
fi
+ { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c99=$ac_arg
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+
+
+
if test "x$CC" != xcc; then
- { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
-echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
else
- { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
-echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
fi
-set dummy $CC; ac_cc=`echo $2 |
+set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4000,19 +4418,21 @@ if { (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
test -f conftest2.$ac_objext && { (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
@@ -4023,10 +4443,11 @@ then
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
rm -f conftest2.*
@@ -4034,19 +4455,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
test -f conftest2.$ac_objext && { (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); };
then
# cc works too.
@@ -4064,11 +4487,11 @@ rm -f core conftest*
fi
if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
cat >>confdefs.h <<\_ACEOF
#define NO_MINUS_C_MINUS_O 1
@@ -4096,15 +4519,15 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -4136,20 +4559,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -4173,13 +4597,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -4187,7 +4612,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -4212,8 +4637,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -4241,20 +4666,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -4278,13 +4704,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -4292,7 +4719,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -4308,11 +4735,13 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
ac_ext=c
@@ -4322,42 +4751,37 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
+ if test -z "$GREP"; then
ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
- # Check for GNU ac_path_GREP and select it if it is found.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ $as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- echo 'GREP' >> "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac_count=`expr $ac_count + 1`
@@ -4372,74 +4796,60 @@ case `"$ac_path_GREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-
- $ac_path_GREP_found && break 3
+ $ac_path_GREP_found && break 3
+ done
done
done
-
-done
IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ if test -z "$ac_cv_path_GREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
{ (exit 1); exit 1; }; }
-fi
-
+ fi
else
ac_cv_path_GREP=$GREP
fi
-
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
- # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+ if test -z "$EGREP"; then
ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
- # Check for GNU ac_path_EGREP and select it if it is found.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ $as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- echo 'EGREP' >> "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac_count=`expr $ac_count + 1`
@@ -4454,41 +4864,32 @@ case `"$ac_path_EGREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-
- $ac_path_EGREP_found && break 3
+ $ac_path_EGREP_found && break 3
+ done
done
done
-
-done
IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ if test -z "$ac_cv_path_EGREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
{ (exit 1); exit 1; }; }
-fi
-
+ fi
else
ac_cv_path_EGREP=$EGREP
fi
-
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
if test $ac_cv_c_compiler_gnu = yes; then
- { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
-echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
if test "${ac_cv_prog_gcc_traditional+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_pattern="Autoconf.*'x'"
cat >conftest.$ac_ext <<_ACEOF
@@ -4527,28 +4928,507 @@ rm -f conftest*
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
-echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
fi
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ if test "${ac_cv_header_minix_config_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
+$as_echo_n "checking for minix/config.h... " >&6; }
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+$as_echo "$ac_cv_header_minix_config_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+$as_echo_n "checking minix/config.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <minix/config.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
+$as_echo_n "checking minix/config.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <minix/config.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------------------- ##
+## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
+## --------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
+$as_echo_n "checking for minix/config.h... " >&6; }
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_minix_config_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+$as_echo "$ac_cv_header_minix_config_h" >&6; }
+
+fi
+if test "x$ac_cv_header_minix_config_h" = x""yes; then
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
cat >>confdefs.h <<\_ACEOF
+#define _POSIX_SOURCE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_1_SOURCE 2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _MINIX 1
+_ACEOF
+
+ fi
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_safe_to_define___extensions__=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_safe_to_define___extensions__=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ cat >>confdefs.h <<\_ACEOF
+#define __EXTENSIONS__ 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _ALL_SOURCE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
#define _GNU_SOURCE 1
_ACEOF
+ cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _TANDEM_SOURCE 1
+_ACEOF
+
# M4
# Extract the first word of "m4 gm4", so it can be a program name with args.
set dummy m4 gm4; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_M4+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $M4 in
[\\/]* | ?:[\\/]*)
@@ -4563,7 +5443,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_M4="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4576,53 +5456,85 @@ esac
fi
M4=$ac_cv_path_M4
if test -n "$M4"; then
- { echo "$as_me:$LINENO: result: $M4" >&5
-echo "${ECHO_T}$M4" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $M4" >&5
+$as_echo "$M4" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$M4" = xno ; then
- { { echo "$as_me:$LINENO: error: m4 missing" >&5
-echo "$as_me: error: m4 missing" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: m4 missing" >&5
+$as_echo "$as_me: error: m4 missing" >&2;}
{ (exit 1); exit 1; }; }
fi
-# GCC flags
+DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wno-long-long -Wvla -Wno-overlength-strings -Wconversion -Wundef -Wformat -Wlogical-op -Wpacked -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -ffast-math"
-test_gcc_flag() {
- cat >conftest.$ac_ext <<_ACEOF
-int main(int argc, char*argv) {}
+for flag in $DESIRED_FLAGS ; do
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports $flag flag" >&5
+$as_echo_n "checking if $CC supports $flag flag... " >&6; }
+if { as_var=`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+
+ if { as_var=`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $flag"
+ cat >conftest.$ac_ext <<_ACEOF
+int a;
_ACEOF
- $CC -c conftest.c $CFLAGS -o conftest.o > /dev/null 2> /dev/null
- ret=$?
- rm -f conftest.o
- return $ret
-}
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`='yes'"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-# If using GCC specify some additional parameters
-if test "x$GCC" = "xyes" ; then
+ eval "`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`='no'"
+fi
- # We use gnu99 instead of c99 because many have interpreted the standard
- # in a way that int64_t isn't defined on non-64 bit platforms.
- DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
- for flag in $DESIRED_FLAGS ; do
- { echo "$as_me:$LINENO: checking whether $CC accepts $flag" >&5
-echo $ECHO_N "checking whether $CC accepts $flag... $ECHO_C" >&6; }
- if test_gcc_flag $flag ; then
- CFLAGS="$CFLAGS $flag"
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- fi
- done
fi
+
+
+
+fi
+ac_res=`eval 'as_val=${'\`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh\`'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+ if eval test x$`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh` = xyes; then
+ CFLAGS="$CFLAGS $flag"
+fi
+
+
+done
+
# Native atomic operation support
# Check whether --enable-atomic-arm-linux-helpers was given.
if test "${enable_atomic_arm_linux_helpers+set}" = set; then
@@ -4630,8 +5542,8 @@ if test "${enable_atomic_arm_linux_helpers+set}" = set; then
case "${enableval}" in
yes) atomic_arm_linux_helpers=yes ;;
no) atomic_arm_linux_helpers=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-atomic-arm-linux-helpers" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-atomic-arm-linux-helpers" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-atomic-arm-linux-helpers" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-atomic-arm-linux-helpers" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -4650,25 +5562,25 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
;;
no) ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-atomic-arm-linux-helpers" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-atomic-arm-linux-helpers" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-atomic-arm-linux-helpers" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-atomic-arm-linux-helpers" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
fi
-{ echo "$as_me:$LINENO: checking target operating system" >&5
-echo $ECHO_N "checking target operating system... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking target operating system" >&5
+$as_echo_n "checking target operating system... " >&6; }
case $host in
*-*-linux*)
- { echo "$as_me:$LINENO: result: linux" >&5
-echo "${ECHO_T}linux" >&6; }
+ { $as_echo "$as_me:$LINENO: result: linux" >&5
+$as_echo "linux" >&6; }
pulse_target_os=linux
;;
*)
- { echo "$as_me:$LINENO: result: unknown" >&5
-echo "${ECHO_T}unknown" >&6; }
+ { $as_echo "$as_me:$LINENO: result: unknown" >&5
+$as_echo "unknown" >&6; }
pulse_target_os=unknown
;;
esac
@@ -4676,41 +5588,86 @@ esac
# If everything else fails use libatomic_ops
need_libatomic_ops=yes
-{ echo "$as_me:$LINENO: checking whether $CC knows __sync_bool_compare_and_swap()" >&5
-echo $ECHO_N "checking whether $CC knows __sync_bool_compare_and_swap()... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-int main() { int a = 4; __sync_bool_compare_and_swap(&a, 4, 5); }
+{ $as_echo "$as_me:$LINENO: checking whether $CC knows __sync_bool_compare_and_swap()" >&5
+$as_echo_n "checking whether $CC knows __sync_bool_compare_and_swap()... " >&6; }
+if test "${pulseaudio_cv_sync_bool_compare_and_swap+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
-$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
-ret=$?
-rm -f conftest.o conftest
-if test $ret -eq 0 ; then
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int a = 4; __sync_bool_compare_and_swap(&a, 4, 5);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ pulseaudio_cv_sync_bool_compare_and_swap=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pulseaudio_cv_sync_bool_compare_and_swap=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $pulseaudio_cv_sync_bool_compare_and_swap" >&5
+$as_echo "$pulseaudio_cv_sync_bool_compare_and_swap" >&6; }
+
+if test "$pulseaudio_cv_sync_bool_compare_and_swap" = "yes" ; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_ATOMIC_BUILTINS 1
_ACEOF
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
need_libatomic_ops=no
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
# HW specific atomic ops stuff
- { echo "$as_me:$LINENO: checking architecture for native atomic operations" >&5
-echo $ECHO_N "checking architecture for native atomic operations... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking architecture for native atomic operations" >&5
+$as_echo_n "checking architecture for native atomic operations... " >&6; }
case $host_cpu in
arm*)
- { echo "$as_me:$LINENO: result: arm" >&5
-echo "${ECHO_T}arm" >&6; }
- { echo "$as_me:$LINENO: checking whether we can use Linux kernel helpers" >&5
-echo $ECHO_N "checking whether we can use Linux kernel helpers... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: result: arm" >&5
+$as_echo "arm" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether we can use Linux kernel helpers" >&5
+$as_echo_n "checking whether we can use Linux kernel helpers... " >&6; }
# The Linux kernel helper functions have been there since 2.6.16. However
# compile time checking for kernel version in cross compile environment
# (which is usually the case for arm cpu) is tricky (or impossible).
if test "x$pulse_target_os" = "xlinux" && test "x$atomic_arm_linux_helpers" != "xno"; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
cat >>confdefs.h <<_ACEOF
#define ATOMIC_ARM_LINUX_HELPERS 1
@@ -4718,91 +5675,215 @@ _ACEOF
need_libatomic_ops=no
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- { echo "$as_me:$LINENO: checking compiler support for arm inline asm atomic operations" >&5
-echo $ECHO_N "checking compiler support for arm inline asm atomic operations... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
-int main()
- {
- volatile int a=0;
- int o=0, n=1, r;
- asm volatile ("ldrex %0, [%1]\n"
- "subs %0, %0, %2\n"
- "strexeq %0, %3, [%1]\n"
- : "=&r" (r)
- : "r" (&a), "Ir" (o), "r" (n)
- : "cc");
- return (a==1 ? 0 : -1);
- }
-_ACEOF
- $CC conftest.c $CFLAGS -o conftest > /dev/null 2>&1
- ret=$?
- rm -f conftest.o conftest
- if test $ret -eq 0 ; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ { $as_echo "$as_me:$LINENO: checking compiler support for arm inline asm atomic operations" >&5
+$as_echo_n "checking compiler support for arm inline asm atomic operations... " >&6; }
+if test "${pulseaudio_cv_support_arm_atomic_ops+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+volatile int a=0;
+ int o=0, n=1, r;
+ asm volatile ("ldrex %0, %1\n"
+ "subs %0, %0, %2\n"
+ "strexeq %0, %3, %1\n"
+ : "=&r" (r)
+ : "r" (&a), "Ir" (o), "r" (n)
+ : "cc");
+ return (a==1 ? 0 : -1);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ pulseaudio_cv_support_arm_atomic_ops=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pulseaudio_cv_support_arm_atomic_ops=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $pulseaudio_cv_support_arm_atomic_ops" >&5
+$as_echo "$pulseaudio_cv_support_arm_atomic_ops" >&6; }
+ if test "$pulseaudio_cv_support_arm_atomic_ops" = "yes"; then
+
cat >>confdefs.h <<\_ACEOF
#define ATOMIC_ARM_INLINE_ASM 1
_ACEOF
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
need_libatomic_ops=no
- else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- fi
+
+fi
+
fi
;;
*)
- { echo "$as_me:$LINENO: result: unknown" >&5
-echo "${ECHO_T}unknown" >&6; }
+ { $as_echo "$as_me:$LINENO: result: unknown" >&5
+$as_echo "unknown" >&6; }
;;
esac
fi
-{ echo "$as_me:$LINENO: checking whether $CC knows __thread" >&5
-echo $ECHO_N "checking whether $CC knows __thread... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-static __thread int a = 6; int main() { a = 5; }
+
+ { $as_echo "$as_me:$LINENO: checking whether $CC knows __thread for Thread-Local Storage" >&5
+$as_echo_n "checking whether $CC knows __thread for Thread-Local Storage... " >&6; }
+if test "${cc_cv_tls___thread+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
-$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
-ret=$?
-rm -f conftest.o conftest
-if test $ret -eq 0 ; then
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+static __thread int a = 6;
+int
+main ()
+{
+a = 5;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cc_cv_tls___thread=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cc_cv_tls___thread=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $cc_cv_tls___thread" >&5
+$as_echo "$cc_cv_tls___thread" >&6; }
+
+ if test "x$cc_cv_tls___thread" = "xyes"; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_TLS_BUILTIN 1
+#define SUPPORT_TLS___THREAD 1
_ACEOF
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+
fi
-{ echo "$as_me:$LINENO: checking whether $CC knows _Bool" >&5
-echo $ECHO_N "checking whether $CC knows _Bool... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-int main() { _Bool b; }
+
+
+{ $as_echo "$as_me:$LINENO: checking whether $CC knows _Bool" >&5
+$as_echo_n "checking whether $CC knows _Bool... " >&6; }
+if test "${pulseaudio_cv__Bool+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+_Bool b;
+ ;
+ return 0;
+}
_ACEOF
-$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
-ret=$?
-rm -f conftest.o conftest
-if test $ret -eq 0 ; then
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ pulseaudio_cv__Bool=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pulseaudio_cv__Bool=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $pulseaudio_cv__Bool" >&5
+$as_echo "$pulseaudio_cv__Bool" >&6; }
+
+if test "$pulseaudio_cv__Bool" = "yes"; then
+
cat >>confdefs.h <<\_ACEOF
#define HAVE_STD_BOOL 1
_ACEOF
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+
fi
+
#### libtool stuff ####
# Check whether --enable-ltdl-install was given.
@@ -4828,10 +5909,10 @@ else
fi
- { echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
-echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
+$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lltdl $LIBS"
@@ -4863,38 +5944,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_ltdl_lt_dlinit=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ltdl_lt_dlinit=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
-echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6; }
-if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then
test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no
else
if test x"$enable_ltdl_install" = xno; then
- { echo "$as_me:$LINENO: WARNING: libltdl not installed, but installation disabled" >&5
-echo "$as_me: WARNING: libltdl not installed, but installation disabled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libltdl not installed, but installation disabled" >&5
+$as_echo "$as_me: WARNING: libltdl not installed, but installation disabled" >&2;}
else
enable_ltdl_install=yes
fi
@@ -4989,10 +6074,10 @@ else
fi
-{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
if test "${lt_cv_path_SED+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Loop through the user's path and test for sed and gsed.
# Then use that list of sed's as ones to test for truncation.
@@ -5045,8 +6130,8 @@ fi
SED=$lt_cv_path_SED
-{ echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $SED" >&5
+$as_echo "$SED" >&6; }
# Check whether --with-gnu-ld was given.
@@ -5059,8 +6144,8 @@ fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -5089,14 +6174,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
;;
esac
elif test "$with_gnu_ld" = yes; then
- { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
else
- { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
fi
if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -5126,19 +6211,19 @@ fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
- { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
@@ -5150,20 +6235,20 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
-{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_ld_reload_flag='-r'
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
reload_flag=$lt_cv_ld_reload_flag
case $reload_flag in
"" | " "*) ;;
@@ -5180,10 +6265,10 @@ case $host_os in
;;
esac
-{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+$as_echo_n "checking for BSD-compatible nm... " >&6; }
if test "${lt_cv_path_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$NM"; then
# Let the user override the test.
@@ -5229,25 +6314,25 @@ else
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
NM="$lt_cv_path_NM"
-{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
fi
-{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
-echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
if test "${lt_cv_deplibs_check_method+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -5264,7 +6349,7 @@ lt_cv_deplibs_check_method='unknown'
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix4* | aix5*)
+aix[4-9]*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5430,8 +6515,8 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -5464,7 +6549,7 @@ ia64-*-hpux*)
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
@@ -5479,11 +6564,11 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5482 "configure"' > conftest.$ac_ext
+ echo '#line 6567 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
@@ -5521,7 +6606,7 @@ s390*-*linux*|sparc*-*linux*)
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.o` in
*32-bit*)
@@ -5572,10 +6657,10 @@ s390*-*linux*|sparc*-*linux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
- { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -5604,26 +6689,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_cv_cc_needs_belf=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
lt_cv_cc_needs_belf=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
ac_ext=c
@@ -5633,8 +6722,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
@@ -5646,13 +6735,17 @@ sparc*-*solaris*)
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
esac
;;
esac
@@ -5664,10 +6757,10 @@ sparc*-*solaris*)
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
@@ -5680,7 +6773,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5691,11 +6784,11 @@ fi
fi
DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
- { echo "$as_me:$LINENO: result: $DLLTOOL" >&5
-echo "${ECHO_T}$DLLTOOL" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -5704,10 +6797,10 @@ if test -z "$ac_cv_prog_DLLTOOL"; then
ac_ct_DLLTOOL=$DLLTOOL
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_DLLTOOL"; then
ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
@@ -5720,7 +6813,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5731,11 +6824,11 @@ fi
fi
ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
if test -n "$ac_ct_DLLTOOL"; then
- { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
-echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_DLLTOOL" = x; then
@@ -5743,12 +6836,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DLLTOOL=$ac_ct_DLLTOOL
@@ -5760,10 +6849,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$AS"; then
ac_cv_prog_AS="$AS" # Let the user override the test.
@@ -5776,7 +6865,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AS="${ac_tool_prefix}as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5787,11 +6876,11 @@ fi
fi
AS=$ac_cv_prog_AS
if test -n "$AS"; then
- { echo "$as_me:$LINENO: result: $AS" >&5
-echo "${ECHO_T}$AS" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $AS" >&5
+$as_echo "$AS" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -5800,10 +6889,10 @@ if test -z "$ac_cv_prog_AS"; then
ac_ct_AS=$AS
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AS"; then
ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
@@ -5816,7 +6905,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_AS="as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5827,11 +6916,11 @@ fi
fi
ac_ct_AS=$ac_cv_prog_ac_ct_AS
if test -n "$ac_ct_AS"; then
- { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
-echo "${ECHO_T}$ac_ct_AS" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_AS" = x; then
@@ -5839,12 +6928,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AS=$ac_ct_AS
@@ -5856,10 +6941,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OBJDUMP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
@@ -5872,7 +6957,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5883,11 +6968,11 @@ fi
fi
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
- { echo "$as_me:$LINENO: result: $OBJDUMP" >&5
-echo "${ECHO_T}$OBJDUMP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -5896,10 +6981,10 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
ac_ct_OBJDUMP=$OBJDUMP
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OBJDUMP"; then
ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
@@ -5912,7 +6997,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5923,11 +7008,11 @@ fi
fi
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
-echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_OBJDUMP" = x; then
@@ -5935,12 +7020,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OBJDUMP=$ac_ct_OBJDUMP
@@ -5956,266 +7037,24 @@ esac
need_locks="$enable_libtool_lock"
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
for ac_header in dlfcn.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -6231,32 +7070,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -6270,51 +7110,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -6323,21 +7164,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -6358,10 +7202,10 @@ if test -z "$CXX"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
@@ -6374,7 +7218,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6385,11 +7229,11 @@ fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
- { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -6402,10 +7246,10 @@ if test -z "$CXX"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
@@ -6418,7 +7262,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6429,11 +7273,11 @@ fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -6445,12 +7289,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CXX=$ac_ct_CXX
@@ -6460,43 +7300,47 @@ fi
fi
fi
# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
+$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -6522,20 +7366,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
@@ -6545,15 +7390,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
-GXX=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
if test "${ac_cv_prog_cxx_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
ac_cxx_werror_flag=yes
@@ -6580,20 +7429,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cxx_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
CXXFLAGS=""
@@ -6618,20 +7468,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
@@ -6657,20 +7508,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cxx_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -6685,8 +7537,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
@@ -6710,10 +7562,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
depcc="$CXX" am_compiler_list=
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
@@ -6801,8 +7653,8 @@ else
fi
fi
-{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
if
@@ -6826,11 +7678,11 @@ ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
if test "${ac_cv_prog_CXXCPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
for CXXCPP in "$CXX -E" "/lib/cpp"
@@ -6862,20 +7714,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -6899,13 +7752,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
@@ -6913,7 +7767,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -6938,8 +7792,8 @@ fi
else
ac_cv_prog_CXXCPP=$CXXCPP
fi
-{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
@@ -6967,20 +7821,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -7004,13 +7859,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
@@ -7018,7 +7874,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -7034,11 +7890,13 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
ac_ext=cpp
@@ -7059,10 +7917,10 @@ if test -n "$ac_tool_prefix"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$F77"; then
ac_cv_prog_F77="$F77" # Let the user override the test.
@@ -7075,7 +7933,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7086,11 +7944,11 @@ fi
fi
F77=$ac_cv_prog_F77
if test -n "$F77"; then
- { echo "$as_me:$LINENO: result: $F77" >&5
-echo "${ECHO_T}$F77" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $F77" >&5
+$as_echo "$F77" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -7103,10 +7961,10 @@ if test -z "$F77"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_F77"; then
ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
@@ -7119,7 +7977,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_F77="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7130,11 +7988,11 @@ fi
fi
ac_ct_F77=$ac_cv_prog_ac_ct_F77
if test -n "$ac_ct_F77"; then
- { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
-echo "${ECHO_T}$ac_ct_F77" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+$as_echo "$ac_ct_F77" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -7146,12 +8004,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
F77=$ac_ct_F77
@@ -7160,37 +8014,41 @@ fi
# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
+$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
rm -f a.out
@@ -7198,10 +8056,10 @@ rm -f a.out
# input file. (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
-{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
if test "${ac_cv_f77_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
program main
@@ -7217,20 +8075,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_f77_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
@@ -7240,16 +8099,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
ac_ext=$ac_save_ext
ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
-{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+$as_echo_n "checking whether $F77 accepts -g... " >&6; }
if test "${ac_cv_prog_f77_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
FFLAGS=-g
cat >conftest.$ac_ext <<_ACEOF
@@ -7263,20 +8122,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_f77_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_f77_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_f77_g=no
@@ -7285,8 +8145,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+$as_echo "$ac_cv_prog_f77_g" >&6; }
if test "$ac_test_FFLAGS" = set; then
FFLAGS=$ac_save_FFLAGS
elif test $ac_cv_prog_f77_g = yes; then
@@ -7303,7 +8163,11 @@ else
fi
fi
-G77=`test $ac_compiler_gnu = yes && echo yes`
+if test $ac_compiler_gnu = yes; then
+ G77=yes
+else
+ G77=
+fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7313,12 +8177,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
# find the maximum length of command line arguments
-{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
i=0
teststring="ABCD"
@@ -7427,11 +8290,11 @@ else
fi
if test -n $lt_cv_sys_max_cmd_len ; then
- { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
else
- { echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6; }
+ { $as_echo "$as_me:$LINENO: result: none" >&5
+$as_echo "none" >&6; }
fi
@@ -7439,10 +8302,10 @@ fi
# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# These are sane defaults that work on at least a few old systems.
@@ -7547,14 +8410,14 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Now try to grab the symbols.
nlist=conftest.nm
if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
(eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -7609,7 +8472,7 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -7628,7 +8491,7 @@ EOF
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
- rm -f conftest* conftst*
+ rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
@@ -7644,17 +8507,17 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6; }
+ { $as_echo "$as_me:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
else
- { echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6; }
+ { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
fi
-{ echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
if test "${lt_cv_objdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
@@ -7666,8 +8529,8 @@ else
fi
rmdir .libs 2>/dev/null
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
objdir=$lt_cv_objdir
@@ -7718,10 +8581,10 @@ with_gnu_ld="$lt_cv_prog_gnu_ld"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -7734,7 +8597,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7745,11 +8608,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -7758,10 +8621,10 @@ if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -7774,7 +8637,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7785,11 +8648,11 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_AR" = x; then
@@ -7797,12 +8660,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
@@ -7814,10 +8673,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -7830,7 +8689,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7841,11 +8700,11 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -7854,10 +8713,10 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -7870,7 +8729,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7881,11 +8740,11 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -7893,12 +8752,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -7910,10 +8765,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
@@ -7926,7 +8781,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7937,11 +8792,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -7950,10 +8805,10 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
@@ -7966,7 +8821,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7977,11 +8832,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -7989,12 +8844,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -8057,10 +8908,10 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
@@ -8110,19 +8961,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- { echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
@@ -8172,11 +9023,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
else
@@ -8188,6 +9039,314 @@ fi
;;
esac
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+
+ { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm -rf libconftest.dylib*
+ fi
+ rm conftest.c
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ lt_cv_ld_exported_symbols_list=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ lt_cv_ld_exported_symbols_list=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[0123])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*)
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil="~$DSYMUTIL \$lib || :"
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+
enable_dlopen=yes
enable_win32_dll=yes
@@ -8253,7 +9412,7 @@ ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$rm -r conftest*
@@ -8263,10 +9422,10 @@ if test "$GCC" = yes; then
lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
@@ -8281,11 +9440,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8284: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9443: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8288: \$? = $ac_status" >&5
+ echo "$as_me:9447: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8298,8 +9457,8 @@ else
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -8313,8 +9472,8 @@ lt_prog_compiler_wl=
lt_prog_compiler_pic=
lt_prog_compiler_static=
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
@@ -8545,20 +9704,20 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_pic_works=no
+ lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
@@ -8571,27 +9730,27 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8574: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9733: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8578: \$? = $ac_status" >&5
+ echo "$as_me:9737: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works=yes
+ lt_cv_prog_compiler_pic_works=yes
fi
fi
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-if test x"$lt_prog_compiler_pic_works" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -8616,12 +9775,12 @@ esac
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_static_works=no
+ lt_cv_prog_compiler_static_works=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -8634,30 +9793,30 @@ else
$echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works=yes
+ lt_cv_prog_compiler_static_works=yes
fi
else
- lt_prog_compiler_static_works=yes
+ lt_cv_prog_compiler_static_works=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-if test x"$lt_prog_compiler_static_works" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
:
else
lt_prog_compiler_static=
fi
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test "${lt_cv_prog_compiler_c_o+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o=no
$rm -r conftest 2>/dev/null
@@ -8675,11 +9834,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8678: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9837: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8682: \$? = $ac_status" >&5
+ echo "$as_me:9841: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8701,34 +9860,34 @@ else
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag=
@@ -8759,12 +9918,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
- exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
# the symbol is explicitly referenced. Since portable code cannot
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
for cc_temp in $compiler""; do
@@ -8823,7 +9983,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
@@ -9042,7 +10202,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -9062,7 +10222,7 @@ _LT_EOF
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@@ -9157,18 +10317,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -9183,12 +10346,13 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -9223,18 +10387,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -9249,12 +10416,13 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -9334,11 +10502,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
link_all_deplibs=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
- archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
else
case $cc_basename in
xlc*)
@@ -9707,8 +10874,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
fi
-{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
test "$ld_shlibs" = no && can_build_shared=no
#
@@ -9728,15 +10895,15 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
$rm conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -9754,7 +10921,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc=no
@@ -9766,16 +10933,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
cat conftest.err 1>&5
fi
$rm conftest*
- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
;;
esac
fi
;;
esac
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -9858,7 +11025,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -10378,17 +11545,32 @@ uts4*)
dynamic_linker=no
;;
esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \
test -n "$runpath_var" || \
@@ -10412,8 +11594,8 @@ else
# directories.
hardcode_action=unsupported
fi
-{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
if test "$hardcode_action" = relink; then
# Fast installation is not supported
@@ -10426,13 +11608,13 @@ fi
striplib=
old_striplib=
-{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
@@ -10440,16 +11622,16 @@ else
if test -n "$STRIP" ; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
;;
*)
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
;;
esac
fi
@@ -10481,10 +11663,10 @@ else
darwin*)
# if libdl is installed we need to link against it
- { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
@@ -10516,33 +11698,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dl_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
@@ -10555,10 +11741,10 @@ fi
;;
*)
- { echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
+$as_echo_n "checking for shl_load... " >&6; }
if test "${ac_cv_func_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -10611,38 +11797,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_shl_load=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_shl_load=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
-if test $ac_cv_func_shl_load = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+$as_echo "$ac_cv_func_shl_load" >&6; }
+if test "x$ac_cv_func_shl_load" = x""yes; then
lt_cv_dlopen="shl_load"
else
- { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
@@ -10674,39 +11864,43 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dld_shl_load=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dld_shl_load=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
-if test $ac_cv_lib_dld_shl_load = yes; then
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else
- { echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
+$as_echo_n "checking for dlopen... " >&6; }
if test "${ac_cv_func_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -10759,38 +11953,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_dlopen=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
-if test $ac_cv_func_dlopen = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+$as_echo "$ac_cv_func_dlopen" >&6; }
+if test "x$ac_cv_func_dlopen" = x""yes; then
lt_cv_dlopen="dlopen"
else
- { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
@@ -10822,39 +12020,43 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dl_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
- { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
if test "${ac_cv_lib_svld_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
@@ -10886,39 +12088,43 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_svld_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_svld_dlopen=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
-if test $ac_cv_lib_svld_dlopen = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
- { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
if test "${ac_cv_lib_dld_dld_link+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
@@ -10950,34 +12156,38 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dld_dld_link=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dld_dld_link=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
-if test $ac_cv_lib_dld_dld_link = yes; then
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
fi
@@ -11015,10 +12225,10 @@ fi
save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
- { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
if test "${lt_cv_dlopen_self+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self=cross
@@ -11026,7 +12236,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11029 "configure"
+#line 12239 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11092,7 +12302,7 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -11110,15 +12320,15 @@ rm -fr conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
if test "x$lt_cv_dlopen_self" = xyes; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
if test "${lt_cv_dlopen_self_static+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self_static=cross
@@ -11126,7 +12336,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11129 "configure"
+#line 12339 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11192,7 +12402,7 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -11210,8 +12420,8 @@ rm -fr conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
CPPFLAGS="$save_CPPFLAGS"
@@ -11233,13 +12443,13 @@ fi
# Report which library types will actually be built
-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -11253,21 +12463,21 @@ aix3*)
fi
;;
-aix4* | aix5*)
+aix[4-9]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
;;
esac
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
-{ echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
@@ -11309,6 +12519,7 @@ if test -f "$ltmain"; then
predeps \
postdeps \
compiler_lib_search_path \
+ compiler_lib_search_dirs \
archive_cmds \
archive_expsym_cmds \
postinstall_cmds \
@@ -11359,8 +12570,8 @@ if test -f "$ltmain"; then
cfgfile="${ofile}T"
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
$rm -f "$cfgfile"
- { echo "$as_me:$LINENO: creating $ofile" >&5
-echo "$as_me: creating $ofile" >&6;}
+ { $as_echo "$as_me:$LINENO: creating $ofile" >&5
+$as_echo "$as_me: creating $ofile" >&6;}
cat <<__EOF__ >> "$cfgfile"
#! $SHELL
@@ -11369,7 +12580,7 @@ echo "$as_me: creating $ofile" >&6;}
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -11605,6 +12816,10 @@ predeps=$lt_predeps
# shared library.
postdeps=$lt_postdeps
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path
@@ -11768,18 +12983,18 @@ fi
if test -f "$ltmain" && test -n "$tagnames"; then
if test ! -f "${ofile}"; then
- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+$as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
fi
if test -z "$LTCC"; then
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
if test -z "$LTCC"; then
- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+$as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
else
- { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+$as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
fi
fi
if test -z "$LTCFLAGS"; then
@@ -11796,16 +13011,16 @@ echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
# Check whether tagname contains only valid characters
case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
"") ;;
- *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
-echo "$as_me: error: invalid tag name: $tagname" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+$as_echo "$as_me: error: invalid tag name: $tagname" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
then
- { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+$as_echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -11853,6 +13068,7 @@ postdep_objects_CXX=
predeps_CXX=
postdeps_CXX=
compiler_lib_search_path_CXX=
+compiler_lib_search_dirs_CXX=
# Source file extension for C++ test sources.
ac_ext=cpp
@@ -11890,7 +13106,7 @@ ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$rm -r conftest*
# Allow CC to be a program name with arguments.
@@ -11947,8 +13163,8 @@ fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -11977,14 +13193,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
;;
esac
elif test "$with_gnu_ld" = yes; then
- { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
else
- { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
fi
if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -12014,19 +13230,19 @@ fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
- { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
@@ -12038,8 +13254,8 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -12089,15 +13305,15 @@ else
fi
# PORTME: fill in a description of your system's C++ link characteristics
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
ld_shlibs_CXX=yes
case $host_os in
aix3*)
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -12110,7 +13326,7 @@ case $host_os in
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
*-brtl*)
@@ -12207,18 +13423,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -12233,12 +13452,13 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -12274,18 +13494,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -12300,12 +13523,13 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -12368,51 +13592,23 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
archive_cmds_need_lc_CXX=no
hardcode_direct_CXX=no
hardcode_automatic_CXX=yes
hardcode_shlibpath_var_CXX=unsupported
whole_archive_flag_spec_CXX=''
link_all_deplibs_CXX=yes
-
- if test "$GXX" = yes ; then
- lt_int_apple_cc_single_mod=no
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ if test "$GXX" = yes ; then
output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- fi
- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
case $cc_basename in
xlc*)
@@ -12663,7 +13859,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
;;
- pgCC*)
+ pgCC* | pgcpp*)
# Portland Group C++ compiler
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
@@ -13063,14 +14259,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs_CXX=no
;;
esac
-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
test "$ld_shlibs_CXX" = no && can_build_shared=no
GCC_CXX="$GXX"
LD_CXX="$LD"
-
cat > conftest.$ac_ext <<EOF
class Foo
{
@@ -13084,7 +14279,7 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Parse the compiler output and extract the necessary
# objects, libraries and library flags.
@@ -13172,6 +14367,11 @@ fi
$rm -f confest.$objext
+compiler_lib_search_dirs_CXX=
+if test -n "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
# PORTME: override above test on systems where it is broken
case $host_os in
interix[3-9]*)
@@ -13227,7 +14427,6 @@ solaris*)
;;
esac
-
case " $postdeps_CXX " in
*" -lc "*) archive_cmds_need_lc_CXX=no ;;
esac
@@ -13236,8 +14435,8 @@ lt_prog_compiler_wl_CXX=
lt_prog_compiler_pic_CXX=
lt_prog_compiler_static_CXX=
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
# C++ specific cases for pic, static, wl, etc.
if test "$GXX" = yes; then
@@ -13303,7 +14502,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
else
case $host_os in
- aix4* | aix5*)
+ aix[4-9]*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
@@ -13399,7 +14598,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-static'
;;
- pgCC*)
+ pgCC* | pgcpp*)
# Portland Group C++ compiler.
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_pic_CXX='-fpic'
@@ -13520,20 +14719,20 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic_CXX"; then
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_pic_works_CXX=no
+ lt_cv_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
@@ -13546,27 +14745,27 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13549: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14748: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13553: \$? = $ac_status" >&5
+ echo "$as_me:14752: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works_CXX=yes
+ lt_cv_prog_compiler_pic_works_CXX=yes
fi
fi
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
case $lt_prog_compiler_pic_CXX in
"" | " "*) ;;
*) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
@@ -13591,12 +14790,12 @@ esac
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_static_works_CXX=no
+ lt_cv_prog_compiler_static_works_CXX=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -13609,30 +14808,30 @@ else
$echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works_CXX=yes
+ lt_cv_prog_compiler_static_works_CXX=yes
fi
else
- lt_prog_compiler_static_works_CXX=yes
+ lt_cv_prog_compiler_static_works_CXX=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
:
else
lt_prog_compiler_static_CXX=
fi
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_CXX=no
$rm -r conftest 2>/dev/null
@@ -13650,11 +14849,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13653: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14852: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13657: \$? = $ac_status" >&5
+ echo "$as_me:14856: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13676,38 +14875,38 @@ else
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
- aix4* | aix5*)
+ aix[4-9]*)
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
@@ -13726,9 +14925,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
esac
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
test "$ld_shlibs_CXX" = no && can_build_shared=no
#
@@ -13748,15 +14948,15 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
$rm conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -13774,7 +14974,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc_CXX=no
@@ -13786,16 +14986,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
cat conftest.err 1>&5
fi
$rm conftest*
- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
;;
esac
fi
;;
esac
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -13827,7 +15027,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -14346,17 +15546,32 @@ uts4*)
dynamic_linker=no
;;
esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_CXX=
if test -n "$hardcode_libdir_flag_spec_CXX" || \
test -n "$runpath_var_CXX" || \
@@ -14380,8 +15595,8 @@ else
# directories.
hardcode_action_CXX=unsupported
fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
if test "$hardcode_action_CXX" = relink; then
# Fast installation is not supported
@@ -14433,6 +15648,7 @@ if test -f "$ltmain"; then
predeps_CXX \
postdeps_CXX \
compiler_lib_search_path_CXX \
+ compiler_lib_search_dirs_CXX \
archive_cmds_CXX \
archive_expsym_cmds_CXX \
postinstall_cmds_CXX \
@@ -14681,6 +15897,10 @@ predeps=$lt_predeps_CXX
# shared library.
postdeps=$lt_postdeps_CXX
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
@@ -14895,7 +16115,7 @@ ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$rm -r conftest*
# Allow CC to be a program name with arguments.
@@ -14914,13 +16134,13 @@ done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -14933,21 +16153,21 @@ aix3*)
postinstall_cmds='$RANLIB $lib'
fi
;;
-aix4* | aix5*)
+aix[4-9]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
;;
esac
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
-{ echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
GCC_F77="$G77"
LD_F77="$LD"
@@ -14956,8 +16176,8 @@ lt_prog_compiler_wl_F77=
lt_prog_compiler_pic_F77=
lt_prog_compiler_static_F77=
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
if test "$GCC" = yes; then
lt_prog_compiler_wl_F77='-Wl,'
@@ -15188,20 +16408,20 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+$as_echo "$lt_prog_compiler_pic_F77" >&6; }
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic_F77"; then
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_pic_works_F77=no
+ lt_cv_prog_compiler_pic_works_F77=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_F77"
@@ -15214,27 +16434,27 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15217: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16437: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15221: \$? = $ac_status" >&5
+ echo "$as_me:16441: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works_F77=yes
+ lt_cv_prog_compiler_pic_works_F77=yes
fi
fi
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; }
-if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
case $lt_prog_compiler_pic_F77 in
"" | " "*) ;;
*) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
@@ -15259,12 +16479,12 @@ esac
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_static_works_F77=no
+ lt_cv_prog_compiler_static_works_F77=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -15277,30 +16497,30 @@ else
$echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works_F77=yes
+ lt_cv_prog_compiler_static_works_F77=yes
fi
else
- lt_prog_compiler_static_works_F77=yes
+ lt_cv_prog_compiler_static_works_F77=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; }
-if test x"$lt_prog_compiler_static_works_F77" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
:
else
lt_prog_compiler_static_F77=
fi
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_F77=no
$rm -r conftest 2>/dev/null
@@ -15318,11 +16538,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15321: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16541: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15325: \$? = $ac_status" >&5
+ echo "$as_me:16545: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15344,34 +16564,34 @@ else
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag_F77=
@@ -15402,12 +16622,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
- exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+ exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
# the symbol is explicitly referenced. Since portable code cannot
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
for cc_temp in $compiler""; do
@@ -15466,7 +16687,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs_F77=no
@@ -15685,7 +16906,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -15705,7 +16926,7 @@ _LT_EOF
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@@ -15790,18 +17011,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_f77_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -15816,12 +17040,13 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -15846,18 +17071,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_f77_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -15872,12 +17100,13 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -15957,11 +17186,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
link_all_deplibs_F77=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
- archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
else
case $cc_basename in
xlc*)
@@ -16330,8 +17558,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
fi
-{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
-echo "${ECHO_T}$ld_shlibs_F77" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+$as_echo "$ld_shlibs_F77" >&6; }
test "$ld_shlibs_F77" = no && can_build_shared=no
#
@@ -16351,15 +17579,15 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
$rm conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -16377,7 +17605,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc_F77=no
@@ -16389,16 +17617,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
cat conftest.err 1>&5
fi
$rm conftest*
- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+$as_echo "$archive_cmds_need_lc_F77" >&6; }
;;
esac
fi
;;
esac
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -16430,7 +17658,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -16949,17 +18177,32 @@ uts4*)
dynamic_linker=no
;;
esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_F77=
if test -n "$hardcode_libdir_flag_spec_F77" || \
test -n "$runpath_var_F77" || \
@@ -16983,8 +18226,8 @@ else
# directories.
hardcode_action_F77=unsupported
fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
-echo "${ECHO_T}$hardcode_action_F77" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+$as_echo "$hardcode_action_F77" >&6; }
if test "$hardcode_action_F77" = relink; then
# Fast installation is not supported
@@ -17036,6 +18279,7 @@ if test -f "$ltmain"; then
predeps_F77 \
postdeps_F77 \
compiler_lib_search_path_F77 \
+ compiler_lib_search_dirs_F77 \
archive_cmds_F77 \
archive_expsym_cmds_F77 \
postinstall_cmds_F77 \
@@ -17284,6 +18528,10 @@ predeps=$lt_predeps_F77
# shared library.
postdeps=$lt_postdeps_F77
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_F77
@@ -17458,7 +18706,7 @@ ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$rm -r conftest*
# Allow CC to be a program name with arguments.
@@ -17489,10 +18737,10 @@ if test "$GCC" = yes; then
lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
@@ -17507,11 +18755,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17510: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18758: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17514: \$? = $ac_status" >&5
+ echo "$as_me:18762: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17524,8 +18772,8 @@ else
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
@@ -17539,8 +18787,8 @@ lt_prog_compiler_wl_GCJ=
lt_prog_compiler_pic_GCJ=
lt_prog_compiler_static_GCJ=
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
if test "$GCC" = yes; then
lt_prog_compiler_wl_GCJ='-Wl,'
@@ -17571,7 +18819,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+
;;
darwin* | rhapsody*)
@@ -17641,7 +18889,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+
;;
hpux9* | hpux10* | hpux11*)
@@ -17771,20 +19019,20 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+$as_echo "$lt_prog_compiler_pic_GCJ" >&6; }
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic_GCJ"; then
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_pic_works_GCJ=no
+ lt_cv_prog_compiler_pic_works_GCJ=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
@@ -17797,27 +19045,27 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17800: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19048: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17804: \$? = $ac_status" >&5
+ echo "$as_me:19052: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works_GCJ=yes
+ lt_cv_prog_compiler_pic_works_GCJ=yes
fi
fi
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; }
-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then
case $lt_prog_compiler_pic_GCJ in
"" | " "*) ;;
*) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
@@ -17842,12 +19090,12 @@ esac
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_static_works_GCJ=no
+ lt_cv_prog_compiler_static_works_GCJ=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -17860,30 +19108,30 @@ else
$echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works_GCJ=yes
+ lt_cv_prog_compiler_static_works_GCJ=yes
fi
else
- lt_prog_compiler_static_works_GCJ=yes
+ lt_cv_prog_compiler_static_works_GCJ=yes
fi
fi
- $rm conftest*
+ $rm -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; }
-if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then
:
else
lt_prog_compiler_static_GCJ=
fi
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_GCJ=no
$rm -r conftest 2>/dev/null
@@ -17901,11 +19149,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17904: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19152: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17908: \$? = $ac_status" >&5
+ echo "$as_me:19156: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17927,34 +19175,34 @@ else
$rm conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; }
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag_GCJ=
@@ -17985,12 +19233,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
- exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+ exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
# the symbol is explicitly referenced. Since portable code cannot
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
for cc_temp in $compiler""; do
@@ -18049,7 +19298,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs_GCJ=no
@@ -18268,7 +19517,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -18288,7 +19537,7 @@ _LT_EOF
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@@ -18383,18 +19632,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -18409,12 +19661,13 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -18449,18 +19702,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -18475,12 +19731,13 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -18560,11 +19817,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
link_all_deplibs_GCJ=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
- archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
else
case $cc_basename in
xlc*)
@@ -18933,8 +20189,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
fi
-{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
-echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+$as_echo "$ld_shlibs_GCJ" >&6; }
test "$ld_shlibs_GCJ" = no && can_build_shared=no
#
@@ -18954,15 +20210,15 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
$rm conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -18980,7 +20236,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc_GCJ=no
@@ -18992,16 +20248,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
cat conftest.err 1>&5
fi
$rm conftest*
- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+$as_echo "$archive_cmds_need_lc_GCJ" >&6; }
;;
esac
fi
;;
esac
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -19033,7 +20289,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -19552,17 +20808,32 @@ uts4*)
dynamic_linker=no
;;
esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_GCJ=
if test -n "$hardcode_libdir_flag_spec_GCJ" || \
test -n "$runpath_var_GCJ" || \
@@ -19586,8 +20857,8 @@ else
# directories.
hardcode_action_GCJ=unsupported
fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
-echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+$as_echo "$hardcode_action_GCJ" >&6; }
if test "$hardcode_action_GCJ" = relink; then
# Fast installation is not supported
@@ -19639,6 +20910,7 @@ if test -f "$ltmain"; then
predeps_GCJ \
postdeps_GCJ \
compiler_lib_search_path_GCJ \
+ compiler_lib_search_dirs_GCJ \
archive_cmds_GCJ \
archive_expsym_cmds_GCJ \
postinstall_cmds_GCJ \
@@ -19887,6 +21159,10 @@ predeps=$lt_predeps_GCJ
# shared library.
postdeps=$lt_postdeps_GCJ
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
@@ -20060,7 +21336,7 @@ ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$rm -r conftest*
# Allow CC to be a program name with arguments.
@@ -20120,6 +21396,7 @@ if test -f "$ltmain"; then
predeps_RC \
postdeps_RC \
compiler_lib_search_path_RC \
+ compiler_lib_search_dirs_RC \
archive_cmds_RC \
archive_expsym_cmds_RC \
postinstall_cmds_RC \
@@ -20368,6 +21645,10 @@ predeps=$lt_predeps_RC
# shared library.
postdeps=$lt_postdeps_RC
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_compiler_lib_search_path_RC
@@ -20500,8 +21781,8 @@ CC="$lt_save_CC"
;;
*)
- { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
-echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+$as_echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
@@ -20520,8 +21801,8 @@ echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
chmod +x "$ofile"
else
rm -f "${ofile}T"
- { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
-echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+$as_echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -20557,6 +21838,8 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
subdirs="$subdirs libltdl"
@@ -20565,11 +21848,11 @@ LIBS="$LIBS $LIBLTDL"
for ac_func in lt_dlmutex_register
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -20622,47 +21905,55 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
LIBS=$old_LIBS
-{ echo "$as_me:$LINENO: checking for struct lt_user_dlloader" >&5
-echo $ECHO_N "checking for struct lt_user_dlloader... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for struct lt_user_dlloader" >&5
+$as_echo_n "checking for struct lt_user_dlloader... " >&6; }
if test "${ac_cv_type_struct_lt_user_dlloader+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_struct_lt_user_dlloader=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -20670,14 +21961,46 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ltdl.h>
-typedef struct lt_user_dlloader ac__type_new_;
int
main ()
{
-if ((ac__type_new_ *) 0)
- return 0;
-if (sizeof (ac__type_new_))
+if (sizeof (struct lt_user_dlloader))
+ return 0;
+ ;
return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ltdl.h>
+
+int
+main ()
+{
+if (sizeof ((struct lt_user_dlloader)))
+ return 0;
;
return 0;
}
@@ -20688,30 +22011,39 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_type_struct_lt_user_dlloader=yes
+ :
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_struct_lt_user_dlloader=no
+ ac_cv_type_struct_lt_user_dlloader=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_lt_user_dlloader" >&5
-echo "${ECHO_T}$ac_cv_type_struct_lt_user_dlloader" >&6; }
-if test $ac_cv_type_struct_lt_user_dlloader = yes; then
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_lt_user_dlloader" >&5
+$as_echo "$ac_cv_type_struct_lt_user_dlloader" >&6; }
+if test "x$ac_cv_type_struct_lt_user_dlloader" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_LT_USER_DLLOADER 1
@@ -20719,12 +22051,13 @@ _ACEOF
fi
-{ echo "$as_me:$LINENO: checking for lt_dladvise" >&5
-echo $ECHO_N "checking for lt_dladvise... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for lt_dladvise" >&5
+$as_echo_n "checking for lt_dladvise... " >&6; }
if test "${ac_cv_type_lt_dladvise+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_lt_dladvise=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -20732,14 +22065,46 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ltdl.h>
-typedef lt_dladvise ac__type_new_;
int
main ()
{
-if ((ac__type_new_ *) 0)
- return 0;
-if (sizeof (ac__type_new_))
+if (sizeof (lt_dladvise))
+ return 0;
+ ;
return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ltdl.h>
+
+int
+main ()
+{
+if (sizeof ((lt_dladvise)))
+ return 0;
;
return 0;
}
@@ -20750,30 +22115,39 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_type_lt_dladvise=yes
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_lt_dladvise=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_lt_dladvise=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_lt_dladvise" >&5
-echo "${ECHO_T}$ac_cv_type_lt_dladvise" >&6; }
-if test $ac_cv_type_lt_dladvise = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_lt_dladvise" >&5
+$as_echo "$ac_cv_type_lt_dladvise" >&6; }
+if test "x$ac_cv_type_lt_dladvise" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LT_DLADVISE 1
@@ -20784,12 +22158,12 @@ fi
if test "x$enable_ltdl_install" = "xno" && test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then
- { { echo "$as_me:$LINENO: error:
+ { { $as_echo "$as_me:$LINENO: error:
*** Cannot find the libltdl development files.
*** Maybe you need to install the libltdl-dev package.
" >&5
-echo "$as_me: error:
+$as_echo "$as_me: error:
*** Cannot find the libltdl development files.
*** Maybe you need to install the libltdl-dev package.
@@ -20828,10 +22202,10 @@ fi
#### Checks for header files. ####
# ISO
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -20858,20 +22232,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
@@ -20963,37 +22338,40 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -21028,20 +22406,21 @@ for ac_header in arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
sys/mman.h sys/resource.h sys/select.h sys/socket.h sys/wait.h \
syslog.h sys/dl.h dlfcn.h linux/sockios.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21057,32 +22436,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21096,51 +22476,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -21149,21 +22530,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -21173,11 +22557,11 @@ done
for ac_header in netinet/ip.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -21202,20 +22586,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
@@ -21223,12 +22608,15 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -21238,20 +22626,21 @@ done
for ac_header in regex.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21267,32 +22656,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21306,51 +22696,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -21359,21 +22750,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
HAVE_REGEX=1
else
@@ -21385,20 +22779,21 @@ done
for ac_header in sys/un.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21414,32 +22809,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21453,51 +22849,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -21506,21 +22903,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
HAVE_AF_UNIX=1
else
@@ -21551,20 +22951,21 @@ fi
for ac_header in linux/input.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21580,32 +22981,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21619,51 +23021,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -21672,21 +23075,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
HAVE_EVDEV=1
else
@@ -21708,20 +23114,21 @@ fi
for ac_header in sys/prctl.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21737,32 +23144,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21776,51 +23184,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -21829,21 +23238,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -21855,20 +23267,21 @@ done
for ac_header in sys/filio.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21884,32 +23297,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21923,51 +23337,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -21976,21 +23391,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -22004,20 +23422,21 @@ done
for ac_header in windows.h winsock2.h ws2tcpip.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22033,32 +23452,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22072,51 +23492,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -22125,21 +23546,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -22151,20 +23575,21 @@ done
for ac_header in sys/ioctl.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22180,32 +23605,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22219,51 +23645,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -22272,21 +23699,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -22296,20 +23726,21 @@ done
for ac_header in byteswap.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22325,32 +23756,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22364,51 +23796,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -22417,21 +23850,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -22441,20 +23877,21 @@ done
for ac_header in sys/syscall.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22470,32 +23907,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22509,51 +23947,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -22562,21 +24001,175 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/eventfd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------------------- ##
+## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
+## --------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -22586,10 +24179,10 @@ done
#### Typdefs, structures, etc. ####
-{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -22661,20 +24254,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_c_const=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_const=no
@@ -22682,38 +24276,88 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
cat >>confdefs.h <<\_ACEOF
-#define const
+#define const /**/
_ACEOF
fi
-{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
+
+ { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are some -arch flags. Note that *ppc* also matches
+ # ppc64. This check is also rather less than ideal.
+ case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
+ *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
+ esac
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/param.h>
+ #include <sys/param.h>
int
main ()
{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
- && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
- bogus endian macros
-#endif
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
;
return 0;
@@ -22725,33 +24369,34 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
# It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/param.h>
+ #include <sys/param.h>
int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
+ not big endian
+ #endif
;
return 0;
@@ -22763,20 +24408,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_c_bigendian=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_bigendian=no
@@ -22784,29 +24430,69 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- # It does not; compile a test program.
-if test "$cross_compiling" = yes; then
- # try to guess the endianness by grepping values into an object file
- ac_cv_c_bigendian=unknown
- cat >conftest.$ac_ext <<_ACEOF
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+#include <limits.h>
+
int
main ()
{
- _ascii (); _ebcdic ();
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
;
return 0;
}
@@ -22817,30 +24503,101 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
ac_cv_c_bigendian=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_bigendian=no
fi
-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then
+ # Try to guess by grepping values from an object file.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -22859,14 +24616,14 @@ int
main ()
{
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
- u.l = 1;
- return u.c[sizeof (long int) - 1] == 1;
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
;
return 0;
@@ -22878,76 +24635,115 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_bigendian=no
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_c_bigendian=yes
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+ fi
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
-case $ac_cv_c_bigendian in
- yes)
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+;; #(
+ no)
+ ;; #(
+ universal)
cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
+#define AC_APPLE_UNIVERSAL_BUILD 1
_ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+
+ ;; #(
+ *)
+ { { $as_echo "$as_me:$LINENO: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+$as_echo "$as_me: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
{ (exit 1); exit 1; }; } ;;
-esac
+ esac
-{ echo "$as_me:$LINENO: checking for pid_t" >&5
-echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
+$as_echo_n "checking for pid_t... " >&6; }
if test "${ac_cv_type_pid_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_pid_t=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-typedef pid_t ac__type_new_;
int
main ()
{
-if ((ac__type_new_ *) 0)
- return 0;
-if (sizeof (ac__type_new_))
+if (sizeof (pid_t))
+ return 0;
+ ;
return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((pid_t)))
+ return 0;
;
return 0;
}
@@ -22958,30 +24754,39 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_type_pid_t=yes
+ :
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_pid_t=no
+ ac_cv_type_pid_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
-if test $ac_cv_type_pid_t = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+$as_echo "$ac_cv_type_pid_t" >&6; }
+if test "x$ac_cv_type_pid_t" = x""yes; then
:
else
@@ -22991,26 +24796,58 @@ _ACEOF
fi
-{ echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_size_t=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-typedef size_t ac__type_new_;
int
main ()
{
-if ((ac__type_new_ *) 0)
- return 0;
-if (sizeof (ac__type_new_))
+if (sizeof (size_t))
+ return 0;
+ ;
return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((size_t)))
+ return 0;
;
return 0;
}
@@ -23021,30 +24858,39 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_type_size_t=yes
+ :
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_size_t=no
+ ac_cv_type_size_t=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
-if test $ac_cv_type_size_t = yes; then
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+$as_echo "$ac_cv_type_size_t" >&6; }
+if test "x$ac_cv_type_size_t" = x""yes; then
:
else
@@ -23054,26 +24900,58 @@ _ACEOF
fi
-{ echo "$as_me:$LINENO: checking for ssize_t" >&5
-echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
if test "${ac_cv_type_ssize_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_ssize_t=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-typedef ssize_t ac__type_new_;
int
main ()
{
-if ((ac__type_new_ *) 0)
- return 0;
-if (sizeof (ac__type_new_))
+if (sizeof (ssize_t))
+ return 0;
+ ;
return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((ssize_t)))
+ return 0;
;
return 0;
}
@@ -23084,30 +24962,39 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_type_ssize_t=yes
+ :
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_ssize_t=no
+ ac_cv_type_ssize_t=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
-echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
-if test $ac_cv_type_ssize_t = yes; then
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+$as_echo "$ac_cv_type_ssize_t" >&6; }
+if test "x$ac_cv_type_ssize_t" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_SSIZE_T 1
@@ -23122,26 +25009,58 @@ _ACEOF
fi
-{ echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
+$as_echo_n "checking for off_t... " >&6; }
if test "${ac_cv_type_off_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_off_t=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-typedef off_t ac__type_new_;
int
main ()
{
-if ((ac__type_new_ *) 0)
- return 0;
-if (sizeof (ac__type_new_))
+if (sizeof (off_t))
+ return 0;
+ ;
return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((off_t)))
+ return 0;
;
return 0;
}
@@ -23152,30 +25071,39 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_type_off_t=yes
+ :
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_off_t=no
+ ac_cv_type_off_t=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
-if test $ac_cv_type_off_t = yes; then
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+$as_echo "$ac_cv_type_off_t" >&6; }
+if test "x$ac_cv_type_off_t" = x""yes; then
:
else
@@ -23185,10 +25113,10 @@ _ACEOF
fi
-{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
if test "${ac_cv_type_signal+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -23213,20 +25141,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_type_signal=int
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_signal=void
@@ -23234,18 +25163,18 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-echo "${ECHO_T}$ac_cv_type_signal" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
_ACEOF
-{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
if test "${ac_cv_type_uid_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -23265,8 +25194,8 @@ fi
rm -f conftest*
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then
cat >>confdefs.h <<\_ACEOF
@@ -23280,12 +25209,81 @@ _ACEOF
fi
+{ $as_echo "$as_me:$LINENO: checking whether environ is declared" >&5
+$as_echo_n "checking whether environ is declared... " >&6; }
+if test "${ac_cv_have_decl_environ+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef environ
+ (void) environ;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_environ=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_environ=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_environ" >&5
+$as_echo "$ac_cv_have_decl_environ" >&6; }
+if test "x$ac_cv_have_decl_environ" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ENVIRON 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ENVIRON 0
+_ACEOF
+
+
+fi
+
-{ echo "$as_me:$LINENO: checking for SIGXCPU in signal.h" >&5
-echo $ECHO_N "checking for SIGXCPU in signal.h... $ECHO_C" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking for SIGXCPU in signal.h" >&5
+$as_echo_n "checking for SIGXCPU in signal.h... " >&6; }
if test "${ac_cv_defined_SIGXCPU_signal_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -23314,20 +25312,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_defined_SIGXCPU_signal_h=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_defined_SIGXCPU_signal_h=no
@@ -23335,8 +25334,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_defined_SIGXCPU_signal_h" >&5
-echo "${ECHO_T}$ac_cv_defined_SIGXCPU_signal_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_defined_SIGXCPU_signal_h" >&5
+$as_echo "$ac_cv_defined_SIGXCPU_signal_h" >&6; }
if test $ac_cv_defined_SIGXCPU_signal_h != "no"; then
HAVE_SIGXCPU=1
@@ -23361,10 +25360,10 @@ fi
# Solaris lacks this
-{ echo "$as_me:$LINENO: checking for INADDR_NONE in netinet/in.h" >&5
-echo $ECHO_N "checking for INADDR_NONE in netinet/in.h... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for INADDR_NONE in netinet/in.h" >&5
+$as_echo_n "checking for INADDR_NONE in netinet/in.h... " >&6; }
if test "${ac_cv_defined_INADDR_NONE_netinet_in_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -23393,20 +25392,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_defined_INADDR_NONE_netinet_in_h=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_defined_INADDR_NONE_netinet_in_h=no
@@ -23414,16 +25414,16 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_defined_INADDR_NONE_netinet_in_h" >&5
-echo "${ECHO_T}$ac_cv_defined_INADDR_NONE_netinet_in_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_defined_INADDR_NONE_netinet_in_h" >&5
+$as_echo "$ac_cv_defined_INADDR_NONE_netinet_in_h" >&6; }
if test $ac_cv_defined_INADDR_NONE_netinet_in_h != "no"; then
:
else
-{ echo "$as_me:$LINENO: checking for INADDR_NONE in winsock2.h" >&5
-echo $ECHO_N "checking for INADDR_NONE in winsock2.h... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for INADDR_NONE in winsock2.h" >&5
+$as_echo_n "checking for INADDR_NONE in winsock2.h... " >&6; }
if test "${ac_cv_defined_INADDR_NONE_winsock2_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -23452,20 +25452,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_defined_INADDR_NONE_winsock2_h=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_defined_INADDR_NONE_winsock2_h=no
@@ -23473,8 +25474,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_defined_INADDR_NONE_winsock2_h" >&5
-echo "${ECHO_T}$ac_cv_defined_INADDR_NONE_winsock2_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_defined_INADDR_NONE_winsock2_h" >&5
+$as_echo "$ac_cv_defined_INADDR_NONE_winsock2_h" >&6; }
if test $ac_cv_defined_INADDR_NONE_winsock2_h != "no"; then
:
else
@@ -23513,8 +25514,8 @@ if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
- { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -23543,30 +25544,34 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
acx_pthread_ok=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-echo "${ECHO_T}$acx_pthread_ok" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
@@ -23627,23 +25632,23 @@ for flag in $acx_pthread_flags; do
case $flag in
none)
- { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
-echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
;;
-*)
- { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
-echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
# Extract the first word of "pthread-config", so it can be a program name with args.
set dummy pthread-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$acx_pthread_config"; then
ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
@@ -23656,7 +25661,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_acx_pthread_config="yes"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -23668,11 +25673,11 @@ fi
fi
acx_pthread_config=$ac_cv_prog_acx_pthread_config
if test -n "$acx_pthread_config"; then
- { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
-echo "${ECHO_T}$acx_pthread_config" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
+$as_echo "$acx_pthread_config" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -23682,8 +25687,8 @@ fi
;;
*)
- { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
-echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
PTHREAD_LIBS="-l$flag"
;;
esac
@@ -23725,34 +25730,38 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
acx_pthread_ok=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
- { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-echo "${ECHO_T}$acx_pthread_ok" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
if test "x$acx_pthread_ok" = xyes; then
break;
fi
@@ -23770,8 +25779,8 @@ if test "x$acx_pthread_ok" = xyes; then
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
-echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
cat >conftest.$ac_ext <<_ACEOF
@@ -23795,31 +25804,35 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
attr_name=$attr; break
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
done
- { echo "$as_me:$LINENO: result: $attr_name" >&5
-echo "${ECHO_T}$attr_name" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
cat >>confdefs.h <<_ACEOF
@@ -23828,15 +25841,15 @@ _ACEOF
fi
- { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
-echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
- { echo "$as_me:$LINENO: result: ${flag}" >&5
-echo "${ECHO_T}${flag}" >&6; }
+ { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
@@ -23849,10 +25862,10 @@ echo "${ECHO_T}${flag}" >&6; }
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$PTHREAD_CC"; then
ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
@@ -23865,7 +25878,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_PTHREAD_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -23876,11 +25889,11 @@ fi
fi
PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
if test -n "$PTHREAD_CC"; then
- { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
-echo "${ECHO_T}$PTHREAD_CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -23897,18 +25910,18 @@ test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
# configurations, when -shared is specified, GCC "forgets" to
# internally use various flags which are still necessary.
- { echo "$as_me:$LINENO: checking whether to check for GCC pthread/shared inconsistencies" >&5
-echo $ECHO_N "checking whether to check for GCC pthread/shared inconsistencies... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether to check for GCC pthread/shared inconsistencies" >&5
+$as_echo_n "checking whether to check for GCC pthread/shared inconsistencies... " >&6; }
check_inconsistencies=yes
case "${host_cpu}-${host_os}" in
*-darwin*) check_inconsistencies=no ;;
esac
if test x"$GCC" != xyes -o "x$check_inconsistencies" != xyes ; then
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
else
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
# In order not to create several levels of indentation, we test
# the value of "$ok" until we find out the cure or run out of
@@ -23933,8 +25946,8 @@ echo "${ECHO_T}yes" >&6; }
LIBS="$PTHREAD_LIBS $LIBS"
CC="$PTHREAD_CC"
- { echo "$as_me:$LINENO: checking whether -pthread is sufficient with -shared" >&5
-echo $ECHO_N "checking whether -pthread is sufficient with -shared... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether -pthread is sufficient with -shared" >&5
+$as_echo_n "checking whether -pthread is sufficient with -shared... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -23958,35 +25971,39 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ok=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test "x$ok" = xyes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
#
@@ -23994,8 +26011,8 @@ echo "${ECHO_T}no" >&6; }
# about -lpthread
#
if test x"$ok" = xno; then
- { echo "$as_me:$LINENO: checking whether -lpthread fixes that" >&5
-echo $ECHO_N "checking whether -lpthread fixes that... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether -lpthread fixes that" >&5
+$as_echo_n "checking whether -lpthread fixes that... " >&6; }
LIBS="-lpthread $PTHREAD_LIBS $save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -24020,44 +26037,48 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ok=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test "x$ok" = xyes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
fi
#
# FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc
#
if test x"$ok" = xno; then
- { echo "$as_me:$LINENO: checking whether -lc_r fixes that" >&5
-echo $ECHO_N "checking whether -lc_r fixes that... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether -lc_r fixes that" >&5
+$as_echo_n "checking whether -lc_r fixes that... " >&6; }
LIBS="-lc_r $PTHREAD_LIBS $save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -24082,42 +26103,46 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ok=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test "x$ok" = xyes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
PTHREAD_LIBS="-lc_r $PTHREAD_LIBS"
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
fi
if test x"$ok" = xno; then
# OK, we have run out of ideas
- { echo "$as_me:$LINENO: WARNING: Impossible to determine how to use pthreads with shared libraries" >&5
-echo "$as_me: WARNING: Impossible to determine how to use pthreads with shared libraries" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: Impossible to determine how to use pthreads with shared libraries" >&5
+$as_echo "$as_me: WARNING: Impossible to determine how to use pthreads with shared libraries" >&2;}
# so it's not safe to assume that we may use pthreads
acx_pthread_ok=no
@@ -24158,10 +26183,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
#### Check for libs ####
# ISO
-{ echo "$as_me:$LINENO: checking for library containing pow" >&5
-echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for library containing pow" >&5
+$as_echo_n "checking for library containing pow... " >&6; }
if test "${ac_cv_search_pow+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
@@ -24199,26 +26224,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_search_pow=$ac_res
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_pow+set}" = set; then
@@ -24233,8 +26262,8 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
-echo "${ECHO_T}$ac_cv_search_pow" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
+$as_echo "$ac_cv_search_pow" >&6; }
ac_res=$ac_cv_search_pow
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -24243,10 +26272,10 @@ fi
# POSIX
-{ echo "$as_me:$LINENO: checking for library containing sched_setscheduler" >&5
-echo $ECHO_N "checking for library containing sched_setscheduler... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for library containing sched_setscheduler" >&5
+$as_echo_n "checking for library containing sched_setscheduler... " >&6; }
if test "${ac_cv_search_sched_setscheduler+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
@@ -24284,26 +26313,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_search_sched_setscheduler=$ac_res
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_sched_setscheduler+set}" = set; then
@@ -24318,18 +26351,18 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_sched_setscheduler" >&5
-echo "${ECHO_T}$ac_cv_search_sched_setscheduler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sched_setscheduler" >&5
+$as_echo "$ac_cv_search_sched_setscheduler" >&6; }
ac_res=$ac_cv_search_sched_setscheduler
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ echo "$as_me:$LINENO: checking for library containing dlopen" >&5
-echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
if test "${ac_cv_search_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
@@ -24367,26 +26400,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_search_dlopen=$ac_res
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_dlopen+set}" = set; then
@@ -24401,18 +26438,18 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
-echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ echo "$as_me:$LINENO: checking for library containing shm_open" >&5
-echo $ECHO_N "checking for library containing shm_open... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for library containing shm_open" >&5
+$as_echo_n "checking for library containing shm_open... " >&6; }
if test "${ac_cv_search_shm_open+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
@@ -24450,26 +26487,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_search_shm_open=$ac_res
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_shm_open+set}" = set; then
@@ -24484,18 +26525,18 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_shm_open" >&5
-echo "${ECHO_T}$ac_cv_search_shm_open" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_shm_open" >&5
+$as_echo "$ac_cv_search_shm_open" >&6; }
ac_res=$ac_cv_search_shm_open
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ echo "$as_me:$LINENO: checking for library containing inet_ntop" >&5
-echo $ECHO_N "checking for library containing inet_ntop... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for library containing inet_ntop" >&5
+$as_echo_n "checking for library containing inet_ntop... " >&6; }
if test "${ac_cv_search_inet_ntop+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
@@ -24533,26 +26574,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_search_inet_ntop=$ac_res
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_inet_ntop+set}" = set; then
@@ -24567,18 +26612,18 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_inet_ntop" >&5
-echo "${ECHO_T}$ac_cv_search_inet_ntop" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_inet_ntop" >&5
+$as_echo "$ac_cv_search_inet_ntop" >&6; }
ac_res=$ac_cv_search_inet_ntop
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ echo "$as_me:$LINENO: checking for library containing timer_create" >&5
-echo $ECHO_N "checking for library containing timer_create... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for library containing timer_create" >&5
+$as_echo_n "checking for library containing timer_create... " >&6; }
if test "${ac_cv_search_timer_create+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
@@ -24616,26 +26661,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_search_timer_create=$ac_res
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_timer_create+set}" = set; then
@@ -24650,8 +26699,8 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_timer_create" >&5
-echo "${ECHO_T}$ac_cv_search_timer_create" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_timer_create" >&5
+$as_echo "$ac_cv_search_timer_create" >&6; }
ac_res=$ac_cv_search_timer_create
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -24660,10 +26709,10 @@ fi
# BSD
-{ echo "$as_me:$LINENO: checking for library containing connect" >&5
-echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for library containing connect" >&5
+$as_echo_n "checking for library containing connect... " >&6; }
if test "${ac_cv_search_connect+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
@@ -24701,26 +26750,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_search_connect=$ac_res
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_connect+set}" = set; then
@@ -24735,8 +26788,8 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5
-echo "${ECHO_T}$ac_cv_search_connect" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5
+$as_echo "$ac_cv_search_connect" >&6; }
ac_res=$ac_cv_search_connect
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -24751,11 +26804,11 @@ fi
for ac_func in getopt_long
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -24808,43 +26861,50 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
else
-{ echo "$as_me:$LINENO: checking for getopt_long in -liberty" >&5
-echo $ECHO_N "checking for getopt_long in -liberty... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for getopt_long in -liberty" >&5
+$as_echo_n "checking for getopt_long in -liberty... " >&6; }
if test "${ac_cv_lib_iberty_getopt_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-liberty $LIBS"
@@ -24876,33 +26936,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_iberty_getopt_long=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_iberty_getopt_long=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_iberty_getopt_long" >&5
-echo "${ECHO_T}$ac_cv_lib_iberty_getopt_long" >&6; }
-if test $ac_cv_lib_iberty_getopt_long = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iberty_getopt_long" >&5
+$as_echo "$ac_cv_lib_iberty_getopt_long" >&6; }
+if test "x$ac_cv_lib_iberty_getopt_long" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBIBERTY 1
_ACEOF
@@ -24915,6 +26979,237 @@ fi
done
+
+{ $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
+$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
+if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgdbm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gdbm_open ();
+int
+main ()
+{
+return gdbm_open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_gdbm_gdbm_open=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_gdbm_gdbm_open=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
+$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
+if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGDBM 1
+_ACEOF
+
+ LIBS="-lgdbm $LIBS"
+
+fi
+
+
+for ac_header in gdbm.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------------------- ##
+## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
+## --------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ { { $as_echo "$as_me:$LINENO: error: gdbm.h not found" >&5
+$as_echo "$as_me: error: gdbm.h not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+done
+
+
#### Check for functions ####
# ISO
@@ -24922,11 +27217,11 @@ done
for ac_func in lrintf strtof
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -24979,35 +27274,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -25018,20 +27320,21 @@ done
for ac_header in vfork.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -25047,32 +27350,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -25086,51 +27390,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -25139,21 +27444,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -25164,11 +27472,11 @@ done
for ac_func in fork vfork
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -25221,45 +27529,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
if test "x$ac_cv_func_fork" = xyes; then
- { echo "$as_me:$LINENO: checking for working fork" >&5
-echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
if test "${ac_cv_func_fork_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_fork_works=cross
@@ -25288,36 +27603,39 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_fork_works=yes
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_fork_works=no
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
-echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
else
ac_cv_func_fork_works=$ac_cv_func_fork
@@ -25332,15 +27650,15 @@ if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_fork_works=yes
;;
esac
- { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
- { echo "$as_me:$LINENO: checking for working vfork" >&5
-echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
if test "${ac_cv_func_vfork_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_vfork_works=cross
@@ -25447,42 +27765,45 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_vfork_works=yes
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_vfork_works=no
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
-echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
- { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
@@ -25506,10 +27827,10 @@ _ACEOF
fi
-{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
-echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
+$as_echo_n "checking type of array argument to getgroups... " >&6; }
if test "${ac_cv_type_getgroups+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
ac_cv_type_getgroups=cross
@@ -25550,29 +27871,32 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_getgroups=gid_t
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_type_getgroups=int
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
@@ -25597,18 +27921,18 @@ rm -f conftest*
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
-echo "${ECHO_T}$ac_cv_type_getgroups" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
+$as_echo "$ac_cv_type_getgroups" >&6; }
cat >>confdefs.h <<_ACEOF
#define GETGROUPS_T $ac_cv_type_getgroups
_ACEOF
-{ echo "$as_me:$LINENO: checking for getgroups" >&5
-echo $ECHO_N "checking for getgroups... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for getgroups" >&5
+$as_echo_n "checking for getgroups... " >&6; }
if test "${ac_cv_func_getgroups+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -25661,41 +27985,45 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_getgroups=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_getgroups=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_getgroups" >&5
-echo "${ECHO_T}$ac_cv_func_getgroups" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getgroups" >&5
+$as_echo "$ac_cv_func_getgroups" >&6; }
# If we don't yet have getgroups, see if it's in -lbsd.
# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
ac_save_LIBS=$LIBS
if test $ac_cv_func_getgroups = no; then
- { echo "$as_me:$LINENO: checking for getgroups in -lbsd" >&5
-echo $ECHO_N "checking for getgroups in -lbsd... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for getgroups in -lbsd" >&5
+$as_echo_n "checking for getgroups in -lbsd... " >&6; }
if test "${ac_cv_lib_bsd_getgroups+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
@@ -25727,33 +28055,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_bsd_getgroups=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_bsd_getgroups=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_getgroups" >&5
-echo "${ECHO_T}$ac_cv_lib_bsd_getgroups" >&6; }
-if test $ac_cv_lib_bsd_getgroups = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_getgroups" >&5
+$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
+if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then
GETGROUPS_LIB=-lbsd
fi
@@ -25762,10 +28094,10 @@ fi
# Run the program to test the functionality of the system-supplied
# getgroups function only if there is such a function.
if test $ac_cv_func_getgroups = yes; then
- { echo "$as_me:$LINENO: checking for working getgroups" >&5
-echo $ECHO_N "checking for working getgroups... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for working getgroups" >&5
+$as_echo_n "checking for working getgroups... " >&6; }
if test "${ac_cv_func_getgroups_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_getgroups_works=no
@@ -25792,37 +28124,40 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_getgroups_works=yes
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_getgroups_works=no
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_getgroups_works" >&5
-echo "${ECHO_T}$ac_cv_func_getgroups_works" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getgroups_works" >&5
+$as_echo "$ac_cv_func_getgroups_works" >&6; }
if test $ac_cv_func_getgroups_works = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -25837,20 +28172,21 @@ LIBS=$ac_save_LIBS
for ac_header in sys/select.h sys/socket.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -25866,32 +28202,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -25905,51 +28242,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -25958,31 +28296,34 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
-{ echo "$as_me:$LINENO: checking types of arguments for select" >&5
-echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking types of arguments for select" >&5
+$as_echo_n "checking types of arguments for select... " >&6; }
if test "${ac_cv_func_select_args+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
@@ -26017,20 +28358,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -26044,8 +28386,8 @@ done
: ${ac_cv_func_select_args='int,int *,struct timeval *'}
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
-echo "${ECHO_T}$ac_cv_func_select_args" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
+$as_echo "$ac_cv_func_select_args" >&6; }
ac_save_IFS=$IFS; IFS=','
set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
IFS=$ac_save_IFS
@@ -26094,11 +28436,11 @@ for ac_func in chmod chown clock_gettime getaddrinfo getgrgid_r \
pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \
sigaction sleep sysconf
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -26151,35 +28493,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -26188,11 +28537,11 @@ done
for ac_func in mkfifo
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -26245,35 +28594,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
HAVE_MKFIFO=1
else
@@ -26295,11 +28651,11 @@ fi
for ac_func in readlink
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -26352,35 +28708,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -26392,11 +28755,11 @@ done
for ac_func in ctime_r usleep
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -26449,35 +28812,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -26488,11 +28858,11 @@ done
for ac_func in strerror_r
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -26545,35 +28915,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -26584,11 +28961,11 @@ done
for ac_func in lstat
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -26641,35 +29018,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -26690,11 +29074,11 @@ done
for ac_func in setresuid setresgid setreuid setregid seteuid setegid ppoll strsignal sig2str strtof_l
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -26747,69 +29131,507 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
-{ echo "$as_me:$LINENO: checking for PTHREAD_PRIO_INHERIT" >&5
-echo $ECHO_N "checking for PTHREAD_PRIO_INHERIT... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_working_alloca_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-#include <pthread.h>
-int main() { int i = PTHREAD_PRIO_INHERIT; }
+ ac_cv_working_alloca_h=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
_ACEOF
-$PTHREAD_CC conftest.c $PTHREAD_CFLAGS $CFLAGS $PTHREAD_LIBS -o conftest > /dev/null 2> /dev/null
-ret=$?
-rm -f conftest.o conftest
-if test $ret -eq 0 ; then
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_alloca_works=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_alloca_works=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTHREAD_PRIO_INHERIT 1
+#define HAVE_ALLOCA 1
+_ACEOF
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_stack_direction=1
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for PTHREAD_PRIO_INHERIT" >&5
+$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if test "${pulseaudio_cv_PTHREAD_PRIO_INHERIT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ save_CC=$CC; CC=$PTHREAD_CC
+ save_CFLAGS=$CFLAGS; CFLAGS=$PTHREAD_CFLAGS
+ save_LIBS=$LIBS; LIBS=$PTHREAD_LIBS
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <pthread.h>
+
+int
+main ()
+{
+int i = PTHREAD_PRIO_INHERIT;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ pulseaudio_cv_PTHREAD_PRIO_INHERIT=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pulseaudio_cv_PTHREAD_PRIO_INHERIT=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CC=$save_CC
+ CFLAGS=$save_CFLAGS
+ LIBS=$save_LIBS
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $pulseaudio_cv_PTHREAD_PRIO_INHERIT" >&5
+$as_echo "$pulseaudio_cv_PTHREAD_PRIO_INHERIT" >&6; }
+
+if test "$pulseaudio_cv_PTHREAD_PRIO_INHERIT" = "yes"; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD_PRIO_INHERIT 1
+_ACEOF
+
+
+fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PA_CFLAGS "$CFLAGS"
+_ACEOF
+
#### Large File-Support (LFS) ####
@@ -26820,10 +29642,10 @@ fi
if test "$enable_largefile" != no; then
- { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
-echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if test "${ac_cv_sys_largefile_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
@@ -26860,20 +29682,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
break
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -26887,20 +29710,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_largefile_CC=' -n32'; break
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -26913,16 +29737,16 @@ rm -f core conftest.err conftest.$ac_objext
rm -f conftest.$ac_ext
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
-echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
- { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
while :; do
cat >conftest.$ac_ext <<_ACEOF
@@ -26954,20 +29778,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_file_offset_bits=no; break
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -27004,20 +29829,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_file_offset_bits=64; break
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -27028,8 +29854,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
break
done
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
-echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
no | unknown) ;;
*)
@@ -27038,12 +29864,12 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
;;
esac
-rm -f conftest*
+rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
- { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
-echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if test "${ac_cv_sys_large_files+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
while :; do
cat >conftest.$ac_ext <<_ACEOF
@@ -27075,20 +29901,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_large_files=no; break
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -27125,20 +29952,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_large_files=1; break
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -27149,8 +29977,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
break
done
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
-echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
@@ -27159,7 +29987,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
;;
esac
-rm -f conftest*
+rm -rf conftest*
fi
fi
@@ -27168,11 +29996,11 @@ fi
for ac_func in open64
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -27225,35 +30053,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -27302,8 +30137,8 @@ fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -27332,14 +30167,14 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
;;
esac
elif test "$with_gnu_ld" = yes; then
- { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
else
- { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
fi
if test "${acl_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
@@ -27366,19 +30201,19 @@ fi
LD="$acl_cv_path_LD"
if test -n "$LD"; then
- { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${acl_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
case `$LD -v 2>&1 </dev/null` in
@@ -27388,17 +30223,17 @@ case `$LD -v 2>&1 </dev/null` in
acl_cv_prog_gnu_ld=no ;;
esac
fi
-{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$acl_cv_prog_gnu_ld
- { echo "$as_me:$LINENO: checking for shared library run path origin" >&5
-echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
if test "${acl_cv_rpath+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
@@ -27408,8 +30243,8 @@ else
acl_cv_rpath=done
fi
-{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
-echo "${ECHO_T}$acl_cv_rpath" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
wl="$acl_cv_wl"
acl_libext="$acl_cv_libext"
acl_shlibext="$acl_cv_shlibext"
@@ -27916,10 +30751,10 @@ fi
done
- { echo "$as_me:$LINENO: checking for iconv" >&5
-echo $ECHO_N "checking for iconv... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
if test "${am_cv_func_iconv+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
am_cv_func_iconv="no, consider installing GNU libiconv"
@@ -27948,26 +30783,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
am_cv_func_iconv=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test "$am_cv_func_iconv" != yes; then
@@ -27997,40 +30836,44 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS="$am_save_LIBS"
fi
fi
-{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
-echo "${ECHO_T}$am_cv_func_iconv" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
if test "$am_cv_func_iconv" = yes; then
- { echo "$as_me:$LINENO: checking for working iconv" >&5
-echo $ECHO_N "checking for working iconv... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
if test "${am_cv_func_iconv_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
am_save_LIBS="$LIBS"
@@ -28113,29 +30956,32 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_func_iconv_works=yes
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
am_cv_func_iconv_works=no
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
@@ -28143,8 +30989,8 @@ fi
LIBS="$am_save_LIBS"
fi
-{ echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5
-echo "${ECHO_T}$am_cv_func_iconv_works" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
*) am_func_iconv=yes ;;
@@ -28160,10 +31006,10 @@ _ACEOF
fi
if test "$am_cv_lib_iconv" = yes; then
- { echo "$as_me:$LINENO: checking how to link with libiconv" >&5
-echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; }
- { echo "$as_me:$LINENO: result: $LIBICONV" >&5
-echo "${ECHO_T}$LIBICONV" >&6; }
+ { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
else
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
@@ -28173,10 +31019,10 @@ echo "${ECHO_T}$LIBICONV" >&6; }
if test "$am_cv_func_iconv" = yes; then
- { echo "$as_me:$LINENO: checking for iconv declaration" >&5
-echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
if test "${am_cv_proto_iconv+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -28212,20 +31058,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
am_cv_proto_iconv_arg1=""
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
am_cv_proto_iconv_arg1="const"
@@ -28236,9 +31083,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- { echo "$as_me:$LINENO: result: ${ac_t:-
+ { $as_echo "$as_me:$LINENO: result: ${ac_t:-
}$am_cv_proto_iconv" >&5
-echo "${ECHO_T}${ac_t:-
+$as_echo "${ac_t:-
}$am_cv_proto_iconv" >&6; }
cat >>confdefs.h <<_ACEOF
@@ -28248,6 +31095,2216 @@ _ACEOF
fi
+
+ { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+case "$am__api_version" in
+ 1.01234)
+ { { $as_echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
+$as_echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ *)
+ ;;
+esac
+
+if test -n "0.35.0"; then
+ { $as_echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5
+$as_echo_n "checking for intltool >= 0.35.0... " >&6; }
+
+ INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+ INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+ INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
+$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
+ test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+ { { $as_echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.35.0 or later." >&5
+$as_echo "$as_me: error: Your intltool is too old. You need intltool 0.35.0 or later." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Extract the first word of "intltool-update", so it can be a program name with args.
+set dummy intltool-update; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_UPDATE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
+if test -n "$INTLTOOL_UPDATE"; then
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_UPDATE" >&5
+$as_echo "$INTLTOOL_UPDATE" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-merge", so it can be a program name with args.
+set dummy intltool-merge; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_MERGE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
+if test -n "$INTLTOOL_MERGE"; then
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_MERGE" >&5
+$as_echo "$INTLTOOL_MERGE" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-extract", so it can be a program name with args.
+set dummy intltool-extract; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_EXTRACT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
+if test -n "$INTLTOOL_EXTRACT"; then
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_EXTRACT" >&5
+$as_echo "$INTLTOOL_EXTRACT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+ { { $as_echo "$as_me:$LINENO: error: The intltool scripts were not found. Please install intltool." >&5
+$as_echo "$as_me: error: The intltool scripts were not found. Please install intltool." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
+ INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
+ INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check the gettext tools to make sure they are GNU
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $XGETTEXT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+XGETTEXT=$ac_cv_path_XGETTEXT
+if test -n "$XGETTEXT"; then
+ { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $MSGMERGE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MSGMERGE=$ac_cv_path_MSGMERGE
+if test -n "$MSGMERGE"; then
+ { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $MSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MSGFMT=$ac_cv_path_MSGFMT
+if test -n "$MSGFMT"; then
+ { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+ { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+ { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
+if test -n "$INTLTOOL_PERL"; then
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
+$as_echo "$INTLTOOL_PERL" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_PERL"; then
+ { { $as_echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
+$as_echo "$as_me: error: perl not found; required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
+ { { $as_echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
+$as_echo "$as_me: error: perl 5.x required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test "x" != "xno-xml"; then
+ { $as_echo "$as_me:$LINENO: checking for XML::Parser" >&5
+$as_echo_n "checking for XML::Parser... " >&6; }
+ if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+ { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
+ else
+ { { $as_echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
+$as_echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ DATADIRNAME=share
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ case $host in
+ *-*-solaris*)
+ { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char bind_textdomain_codeset (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef bind_textdomain_codeset
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bind_textdomain_codeset ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+choke me
+#endif
+
+int
+main ()
+{
+return bind_textdomain_codeset ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_bind_textdomain_codeset=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_bind_textdomain_codeset=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
+ DATADIRNAME=share
+else
+ DATADIRNAME=lib
+fi
+
+ ;;
+ *)
+ DATADIRNAME=lib
+ ;;
+ esac
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
+
+
+GETTEXT_PACKAGE=pulseaudio
+
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
+_ACEOF
+
+
+
+for ac_header in locale.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------------------- ##
+## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
+## --------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_locale_h = yes; then
+ { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_val_LC_MESSAGES=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ am_cv_val_LC_MESSAGES=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
+ if test $am_cv_val_LC_MESSAGES = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+ fi
+ fi
+ USE_NLS=yes
+
+
+ gt_cv_have_gettext=no
+
+ CATOBJEXT=NONE
+ XGETTEXT=:
+ INTLLIBS=
+
+ if test "${ac_cv_header_libintl_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
+$as_echo_n "checking for libintl.h... " >&6; }
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+$as_echo "$ac_cv_header_libintl_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
+$as_echo_n "checking libintl.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <libintl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
+$as_echo_n "checking libintl.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------------------- ##
+## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
+## --------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
+$as_echo_n "checking for libintl.h... " >&6; }
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_libintl_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+$as_echo "$ac_cv_header_libintl_h" >&6; }
+
+fi
+if test "x$ac_cv_header_libintl_h" = x""yes; then
+ gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
+
+ #
+ # First check in libc
+ #
+ { $as_echo "$as_me:$LINENO: checking for ngettext in libc" >&5
+$as_echo_n "checking for ngettext in libc... " >&6; }
+if test "${gt_cv_func_ngettext_libc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !ngettext ("","", 1)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ gt_cv_func_ngettext_libc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_func_ngettext_libc=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
+$as_echo "$gt_cv_func_ngettext_libc" >&6; }
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
+$as_echo_n "checking for dgettext in libc... " >&6; }
+if test "${gt_cv_func_dgettext_libc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !dgettext ("","")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ gt_cv_func_dgettext_libc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_func_dgettext_libc=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
+$as_echo "$gt_cv_func_dgettext_libc" >&6; }
+ fi
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+
+for ac_func in bind_textdomain_codeset
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+ #
+ # If we don't have everything we want, check in libintl
+ #
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
+ || test "$gt_cv_func_ngettext_libc" != "yes" \
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+ { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
+$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bindtextdomain ();
+int
+main ()
+{
+return bindtextdomain ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_intl_bindtextdomain=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_bindtextdomain=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
+$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
+if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
+ { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_intl_ngettext=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_ngettext=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
+ { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
+$as_echo_n "checking for dgettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_dgettext+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgettext ();
+int
+main ()
+{
+return dgettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_intl_dgettext=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_dgettext=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
+$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
+if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
+ gt_cv_func_dgettext_libintl=yes
+fi
+
+fi
+
+fi
+
+
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+ { $as_echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
+$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_intl_ngettext=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_ngettext=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
+ { $as_echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
+$as_echo_n "checking for dcgettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dcgettext ();
+int
+main ()
+{
+return dcgettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_intl_dcgettext=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_dcgettext=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
+$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
+if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then
+ gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv
+else
+ :
+fi
+
+else
+ :
+fi
+
+ fi
+
+ #
+ # If we found libintl, then check in it for bind_textdomain_codeset();
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
+ # and both have dgettext and ngettext
+ #
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS -lintl $libintl_extra_libs"
+ unset ac_cv_func_bind_textdomain_codeset
+
+for ac_func in bind_textdomain_codeset
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$glib_save_LIBS"
+
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+ gt_cv_func_dgettext_libc=no
+ else
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ && test "$gt_cv_func_ngettext_libc" = "yes"; then
+ gt_cv_func_dgettext_libintl=no
+ fi
+ fi
+ fi
+ fi
+
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ gt_cv_have_gettext=yes
+ fi
+
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ INTLLIBS="-lintl $libintl_extra_libs"
+ fi
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != "no"; then
+ { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+ if test "$MSGFMT" != "no"; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS $INTLLIBS"
+
+for ac_func in dcgettext
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ MSGFMT_OPTS=
+ { $as_echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
+$as_echo_n "checking if msgfmt accepts -c... " >&6; }
+ cat >conftest.foo <<_ACEOF
+
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo@bar.xx>\n"
+"Language-Team: C <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+_ACEOF
+if { ($as_echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
+ ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ MSGFMT_OPTS=-c; { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+echo "$as_me: failed input was:" >&5
+sed 's/^/| /' conftest.foo >&5
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ case $host in
+ *-*-solaris*)
+ { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char bind_textdomain_codeset (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef bind_textdomain_codeset
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bind_textdomain_codeset ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+choke me
+#endif
+
+int
+main ()
+{
+return bind_textdomain_codeset ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_bind_textdomain_codeset=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_bind_textdomain_codeset=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+
+ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+ ;;
+ esac
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$glib_save_LIBS"
+ INSTOBJEXT=.mo
+ else
+ gt_cv_have_gettext=no
+ fi
+ fi
+
+fi
+
+
+
+ if test "$gt_cv_have_gettext" = "yes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+
+ ac_config_commands="$ac_config_commands default-1"
+
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+$as_echo_n "checking for catalogs to be installed... " >&6; }
+ NEW_LINGUAS=
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
+ done
+ LINGUAS=$NEW_LINGUAS
+ { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
+$as_echo "$LINGUAS" >&6; }
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+
+
+pulselocaledir='${prefix}/${DATADIRNAME}/locale'
+
+
###################################
# External libraries #
###################################
@@ -28258,8 +33315,8 @@ HAVE_X11=0
# The macro tests the host, not the build target
if test "x$os_is_win32" != "x1" ; then
- { echo "$as_me:$LINENO: checking for X" >&5
-echo $ECHO_N "checking for X... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
# Check whether --with-x was given.
@@ -28273,11 +33330,11 @@ if test "x$with_x" = xno; then
have_x=disabled
else
case $x_includes,$x_libraries in #(
- *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
-echo "$as_me: error: Cannot use X directory names containing '" >&2;}
+ *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
+$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
{ (exit 1); exit 1; }; };; #(
*,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
@@ -28298,7 +33355,7 @@ _ACEOF
eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
done
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl; do
+ for ac_extension in a so sl dylib la dll; do
if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
test -f "$ac_im_libdir/libX11.$ac_extension"; then
ac_im_usrlibdir=$ac_im_libdir; break
@@ -28312,7 +33369,7 @@ _ACEOF
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
esac
case $ac_im_usrlibdir in
- /usr/lib | /lib) ;;
+ /usr/lib | /usr/lib64 | /lib | /lib64) ;;
*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
esac
fi
@@ -28373,13 +33430,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -28387,7 +33445,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# We can compile using X headers with no special include directory.
ac_x_includes=
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
for ac_dir in $ac_x_header_dirs; do
@@ -28428,30 +33486,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
LIBS=$ac_save_LIBS
-for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
# Don't even attempt the hair of trying to link an X program!
- for ac_extension in a so sl; do
+ for ac_extension in a so sl dylib la dll; do
if test -r "$ac_dir/libX11.$ac_extension"; then
ac_x_libraries=$ac_dir
break 2
@@ -28460,6 +33521,7 @@ do
done
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no
@@ -28482,8 +33544,8 @@ fi
fi # $with_x != no
if test "$have_x" != yes; then
- { echo "$as_me:$LINENO: result: $have_x" >&5
-echo "${ECHO_T}$have_x" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
@@ -28493,8 +33555,8 @@ else
ac_cv_have_x="have_x=yes\
ac_x_includes='$x_includes'\
ac_x_libraries='$x_libraries'"
- { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
-echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
fi
if test "$no_x" = yes; then
@@ -28515,8 +33577,8 @@ else
X_LIBS="$X_LIBS -L$x_libraries"
# For Solaris; some versions of Sun CC require a space after -R and
# others require no space. Words are not sufficient . . . .
- { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
-echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
+$as_echo_n "checking whether -R must be followed by a space... " >&6; }
ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
ac_xsave_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
@@ -28541,23 +33603,26 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
X_LIBS="$X_LIBS -R$x_libraries"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
LIBS="$ac_xsave_LIBS -R $x_libraries"
@@ -28582,33 +33647,38 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
X_LIBS="$X_LIBS -R $x_libraries"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { echo "$as_me:$LINENO: result: neither works" >&5
-echo "${ECHO_T}neither works" >&6; }
+ { $as_echo "$as_me:$LINENO: result: neither works" >&5
+$as_echo "neither works" >&6; }
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
ac_c_werror_flag=$ac_xsave_c_werror_flag
@@ -28654,27 +33724,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
-echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet $LIBS"
@@ -28706,41 +33779,45 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dnet_dnet_ntoa=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dnet_dnet_ntoa=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
-if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
- { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
-echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub $LIBS"
@@ -28772,39 +33849,44 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dnet_stub_dnet_ntoa=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
-if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi
fi
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS="$ac_xsave_LIBS"
@@ -28817,10 +33899,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
# on Irix 5.2, according to T.E. Dickey.
# The functions gethostbyname, getservbyname, and inet_addr are
# in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
- { echo "$as_me:$LINENO: checking for gethostbyname" >&5
-echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
+$as_echo_n "checking for gethostbyname... " >&6; }
if test "${ac_cv_func_gethostbyname+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -28873,37 +33955,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_gethostbyname=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_gethostbyname=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+$as_echo "$ac_cv_func_gethostbyname" >&6; }
if test $ac_cv_func_gethostbyname = no; then
- { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
-echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
@@ -28935,41 +34021,45 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_nsl_gethostbyname=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test $ac_cv_lib_nsl_gethostbyname = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi
if test $ac_cv_lib_nsl_gethostbyname = no; then
- { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
-echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
@@ -29001,33 +34091,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_bsd_gethostbyname=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_bsd_gethostbyname=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
-if test $ac_cv_lib_bsd_gethostbyname = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
fi
@@ -29041,10 +34135,10 @@ fi
# variants that don't use the name server (or something). -lsocket
# must be given before -lnsl if both are needed. We assume that
# if connect needs -lnsl, so does gethostbyname.
- { echo "$as_me:$LINENO: checking for connect" >&5
-echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for connect" >&5
+$as_echo_n "checking for connect... " >&6; }
if test "${ac_cv_func_connect+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -29097,37 +34191,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_connect=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_connect=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
-echo "${ECHO_T}$ac_cv_func_connect" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+$as_echo "$ac_cv_func_connect" >&6; }
if test $ac_cv_func_connect = no; then
- { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
-echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
if test "${ac_cv_lib_socket_connect+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
@@ -29159,43 +34257,47 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_socket_connect=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_socket_connect=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
-if test $ac_cv_lib_socket_connect = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = x""yes; then
X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi
fi
# Guillermo Gomez says -lposix is necessary on A/UX.
- { echo "$as_me:$LINENO: checking for remove" >&5
-echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for remove" >&5
+$as_echo_n "checking for remove... " >&6; }
if test "${ac_cv_func_remove+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -29248,37 +34350,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_remove=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_remove=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
-echo "${ECHO_T}$ac_cv_func_remove" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
+$as_echo "$ac_cv_func_remove" >&6; }
if test $ac_cv_func_remove = no; then
- { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
-echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
+$as_echo_n "checking for remove in -lposix... " >&6; }
if test "${ac_cv_lib_posix_remove+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix $LIBS"
@@ -29310,43 +34416,47 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_posix_remove=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_posix_remove=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
-echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
-if test $ac_cv_lib_posix_remove = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
+$as_echo "$ac_cv_lib_posix_remove" >&6; }
+if test "x$ac_cv_lib_posix_remove" = x""yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi
fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
- { echo "$as_me:$LINENO: checking for shmat" >&5
-echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for shmat" >&5
+$as_echo_n "checking for shmat... " >&6; }
if test "${ac_cv_func_shmat+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -29399,37 +34509,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_shmat=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_shmat=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
-echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
+$as_echo "$ac_cv_func_shmat" >&6; }
if test $ac_cv_func_shmat = no; then
- { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
-echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
+$as_echo_n "checking for shmat in -lipc... " >&6; }
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc $LIBS"
@@ -29461,33 +34575,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_ipc_shmat=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ipc_shmat=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
-echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
-if test $ac_cv_lib_ipc_shmat = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
+$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
fi
@@ -29503,10 +34621,10 @@ fi
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# John Interrante, Karl Berry
- { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
-echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
+$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
@@ -29538,33 +34656,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_ICE_IceConnectionNumber=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ICE_IceConnectionNumber=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
-echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
-if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi
@@ -29604,10 +34726,10 @@ fi
if test "x${with_caps}" != "xno"; then
- { echo "$as_me:$LINENO: checking for library containing cap_init" >&5
-echo $ECHO_N "checking for library containing cap_init... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for library containing cap_init" >&5
+$as_echo_n "checking for library containing cap_init... " >&6; }
if test "${ac_cv_search_cap_init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
@@ -29645,26 +34767,30 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_search_cap_init=$ac_res
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_cap_init+set}" = set; then
@@ -29679,8 +34805,8 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_cap_init" >&5
-echo "${ECHO_T}$ac_cv_search_cap_init" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_cap_init" >&5
+$as_echo "$ac_cv_search_cap_init" >&6; }
ac_res=$ac_cv_search_cap_init
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -29688,8 +34814,8 @@ if test "$ac_res" != no; then
else
if test "x${with_caps}" = "xyes" ; then
- { { echo "$as_me:$LINENO: error: *** POSIX caps libraries not found" >&5
-echo "$as_me: error: *** POSIX caps libraries not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** POSIX caps libraries not found" >&5
+$as_echo "$as_me: error: *** POSIX caps libraries not found" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -29697,20 +34823,21 @@ fi
for ac_header in sys/capability.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -29726,32 +34853,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -29765,51 +34893,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -29818,28 +34947,31 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
else
if test "x${with_caps}" = "xyes" ; then
- { { echo "$as_me:$LINENO: error: *** POSIX caps headers not found" >&5
-echo "$as_me: error: *** POSIX caps headers not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** POSIX caps headers not found" >&5
+$as_echo "$as_me: error: *** POSIX caps headers not found" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -29848,16 +34980,170 @@ done
fi
+#### Valgrind (optional) ####
+
+
+for ac_header in valgrind/memcheck.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------------------- ##
+## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
+## --------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
#### pkg-config ####
# Check for pkg-config manually first, as if its not installed the
# PKG_PROG_PKG_CONFIG macro won't be defined.
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_have_pkg_config+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$have_pkg_config"; then
ac_cv_prog_have_pkg_config="$have_pkg_config" # Let the user override the test.
@@ -29870,7 +35156,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_have_pkg_config="yes"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -29882,18 +35168,18 @@ fi
fi
have_pkg_config=$ac_cv_prog_have_pkg_config
if test -n "$have_pkg_config"; then
- { echo "$as_me:$LINENO: result: $have_pkg_config" >&5
-echo "${ECHO_T}$have_pkg_config" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $have_pkg_config" >&5
+$as_echo "$have_pkg_config" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test x"$have_pkg_config" = "xno"; then
- { { echo "$as_me:$LINENO: error: pkg-config is required to install this program" >&5
-echo "$as_me: error: pkg-config is required to install this program" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: pkg-config is required to install this program" >&5
+$as_echo "$as_me: error: pkg-config is required to install this program" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -29903,10 +35189,10 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
@@ -29921,7 +35207,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -29933,11 +35219,11 @@ esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
- { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -29946,10 +35232,10 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
@@ -29964,7 +35250,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -29976,11 +35262,11 @@ esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
- { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
@@ -29988,12 +35274,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
@@ -30005,14 +35287,14 @@ fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
- { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
PKG_CONFIG=""
fi
@@ -30022,17 +35304,17 @@ fi
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for LIBSNDFILE" >&5
-echo $ECHO_N "checking for LIBSNDFILE... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for LIBSNDFILE" >&5
+$as_echo_n "checking for LIBSNDFILE... " >&6; }
if test -n "$LIBSNDFILE_CFLAGS"; then
pkg_cv_LIBSNDFILE_CFLAGS="$LIBSNDFILE_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" sndfile >= 1.0.10 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" sndfile >= 1.0.10 \"") >&5
($PKG_CONFIG --exists --print-errors " sndfile >= 1.0.10 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_LIBSNDFILE_CFLAGS=`$PKG_CONFIG --cflags " sndfile >= 1.0.10 " 2>/dev/null`
else
@@ -30045,10 +35327,10 @@ if test -n "$LIBSNDFILE_LIBS"; then
pkg_cv_LIBSNDFILE_LIBS="$LIBSNDFILE_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" sndfile >= 1.0.10 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" sndfile >= 1.0.10 \"") >&5
($PKG_CONFIG --exists --print-errors " sndfile >= 1.0.10 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_LIBSNDFILE_LIBS=`$PKG_CONFIG --libs " sndfile >= 1.0.10 " 2>/dev/null`
else
@@ -30075,7 +35357,7 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$LIBSNDFILE_PKG_ERRORS" >&5
- { { echo "$as_me:$LINENO: error: Package requirements ( sndfile >= 1.0.10 ) were not met:
+ { { $as_echo "$as_me:$LINENO: error: Package requirements ( sndfile >= 1.0.10 ) were not met:
$LIBSNDFILE_PKG_ERRORS
@@ -30086,7 +35368,7 @@ Alternatively, you may set the environment variables LIBSNDFILE_CFLAGS
and LIBSNDFILE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
-echo "$as_me: error: Package requirements ( sndfile >= 1.0.10 ) were not met:
+$as_echo "$as_me: error: Package requirements ( sndfile >= 1.0.10 ) were not met:
$LIBSNDFILE_PKG_ERRORS
@@ -30099,7 +35381,9 @@ See the pkg-config man page for more details.
" >&2;}
{ (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
- { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -30109,7 +35393,7 @@ See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -30119,12 +35403,124 @@ See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
else
LIBSNDFILE_CFLAGS=$pkg_cv_LIBSNDFILE_CFLAGS
LIBSNDFILE_LIBS=$pkg_cv_LIBSNDFILE_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:$LINENO: checking for LIBSPEEX" >&5
+$as_echo_n "checking for LIBSPEEX... " >&6; }
+
+if test -n "$LIBSPEEX_CFLAGS"; then
+ pkg_cv_LIBSPEEX_CFLAGS="$LIBSPEEX_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" speexdsp >= 1.2 \"") >&5
+ ($PKG_CONFIG --exists --print-errors " speexdsp >= 1.2 ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LIBSPEEX_CFLAGS=`$PKG_CONFIG --cflags " speexdsp >= 1.2 " 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBSPEEX_LIBS"; then
+ pkg_cv_LIBSPEEX_LIBS="$LIBSPEEX_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" speexdsp >= 1.2 \"") >&5
+ ($PKG_CONFIG --exists --print-errors " speexdsp >= 1.2 ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LIBSPEEX_LIBS=`$PKG_CONFIG --libs " speexdsp >= 1.2 " 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBSPEEX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " speexdsp >= 1.2 " 2>&1`
+ else
+ LIBSPEEX_PKG_ERRORS=`$PKG_CONFIG --print-errors " speexdsp >= 1.2 " 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBSPEEX_PKG_ERRORS" >&5
+
+ { { $as_echo "$as_me:$LINENO: error: Package requirements ( speexdsp >= 1.2 ) were not met:
+
+$LIBSPEEX_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBSPEEX_CFLAGS
+and LIBSPEEX_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+$as_echo "$as_me: error: Package requirements ( speexdsp >= 1.2 ) were not met:
+
+$LIBSPEEX_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBSPEEX_CFLAGS
+and LIBSPEEX_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBSPEEX_CFLAGS
+and LIBSPEEX_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBSPEEX_CFLAGS
+and LIBSPEEX_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+else
+ LIBSPEEX_CFLAGS=$pkg_cv_LIBSPEEX_CFLAGS
+ LIBSPEEX_LIBS=$pkg_cv_LIBSPEEX_LIBS
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
:
fi
@@ -30132,28 +35528,29 @@ fi
#### atomic-ops ###
-{ echo "$as_me:$LINENO: checking whether we need libatomic_ops" >&5
-echo $ECHO_N "checking whether we need libatomic_ops... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we need libatomic_ops" >&5
+$as_echo_n "checking whether we need libatomic_ops... " >&6; }
if test "x$need_libatomic_ops" = "xyes"; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
for ac_header in atomic_ops.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -30169,32 +35566,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -30208,51 +35606,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -30261,27 +35660,30 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
else
- { { echo "$as_me:$LINENO: error: *** libatomic-ops headers not found" >&5
-echo "$as_me: error: *** libatomic-ops headers not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** libatomic-ops headers not found" >&5
+$as_echo "$as_me: error: *** libatomic-ops headers not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -30294,8 +35696,8 @@ done
LIBS="$LIBS -latomic_ops"
fi
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
#### Libsamplerate support (optional) ####
@@ -30306,8 +35708,8 @@ if test "${enable_samplerate+set}" = set; then
case "${enableval}" in
yes) samplerate=yes ;;
no) samplerate=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-samplerate" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-samplerate" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-samplerate" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-samplerate" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -30319,17 +35721,17 @@ fi
if test "x${samplerate}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for LIBSAMPLERATE" >&5
-echo $ECHO_N "checking for LIBSAMPLERATE... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for LIBSAMPLERATE" >&5
+$as_echo_n "checking for LIBSAMPLERATE... " >&6; }
if test -n "$LIBSAMPLERATE_CFLAGS"; then
pkg_cv_LIBSAMPLERATE_CFLAGS="$LIBSAMPLERATE_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" samplerate >= 0.1.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" samplerate >= 0.1.0 \"") >&5
($PKG_CONFIG --exists --print-errors " samplerate >= 0.1.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_LIBSAMPLERATE_CFLAGS=`$PKG_CONFIG --cflags " samplerate >= 0.1.0 " 2>/dev/null`
else
@@ -30342,10 +35744,10 @@ if test -n "$LIBSAMPLERATE_LIBS"; then
pkg_cv_LIBSAMPLERATE_LIBS="$LIBSAMPLERATE_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" samplerate >= 0.1.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" samplerate >= 0.1.0 \"") >&5
($PKG_CONFIG --exists --print-errors " samplerate >= 0.1.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_LIBSAMPLERATE_LIBS=`$PKG_CONFIG --libs " samplerate >= 0.1.0 " 2>/dev/null`
else
@@ -30372,13 +35774,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$LIBSAMPLERATE_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_LIBSAMPLERATE=0
if test "x$samplerate" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** Libsamplerate not found" >&5
-echo "$as_me: error: *** Libsamplerate not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Libsamplerate not found" >&5
+$as_echo "$as_me: error: *** Libsamplerate not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -30386,16 +35788,16 @@ elif test $pkg_failed = untried; then
HAVE_LIBSAMPLERATE=0
if test "x$samplerate" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** Libsamplerate not found" >&5
-echo "$as_me: error: *** Libsamplerate not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Libsamplerate not found" >&5
+$as_echo "$as_me: error: *** Libsamplerate not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
LIBSAMPLERATE_CFLAGS=$pkg_cv_LIBSAMPLERATE_CFLAGS
LIBSAMPLERATE_LIBS=$pkg_cv_LIBSAMPLERATE_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_LIBSAMPLERATE=1
fi
else
@@ -30430,8 +35832,8 @@ if test "${enable_oss+set}" = set; then
case "${enableval}" in
yes) oss=yes ;;
no) oss=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-oss" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-oss" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-oss" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-oss" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -30444,20 +35846,21 @@ if test "x${oss}" != xno ; then
for ac_header in sys/soundcard.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -30473,32 +35876,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -30512,51 +35916,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -30565,21 +35970,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
HAVE_OSS=1
@@ -30593,8 +36001,8 @@ else
HAVE_OSS=0
if test "x$oss" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** OSS support not found" >&5
-echo "$as_me: error: *** OSS support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** OSS support not found" >&5
+$as_echo "$as_me: error: *** OSS support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -30625,8 +36033,8 @@ if test "${enable_alsa+set}" = set; then
case "${enableval}" in
yes) alsa=yes ;;
no) alsa=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-alsa" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-alsa" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-alsa" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-alsa" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -30638,19 +36046,19 @@ fi
if test "x${alsa}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for ASOUNDLIB" >&5
-echo $ECHO_N "checking for ASOUNDLIB... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for ASOUNDLIB" >&5
+$as_echo_n "checking for ASOUNDLIB... " >&6; }
if test -n "$ASOUNDLIB_CFLAGS"; then
pkg_cv_ASOUNDLIB_CFLAGS="$ASOUNDLIB_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" alsa >= 1.0.0 \"") >&5
- ($PKG_CONFIG --exists --print-errors " alsa >= 1.0.0 ") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" alsa >= 1.0.17 \"") >&5
+ ($PKG_CONFIG --exists --print-errors " alsa >= 1.0.17 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_ASOUNDLIB_CFLAGS=`$PKG_CONFIG --cflags " alsa >= 1.0.0 " 2>/dev/null`
+ pkg_cv_ASOUNDLIB_CFLAGS=`$PKG_CONFIG --cflags " alsa >= 1.0.17 " 2>/dev/null`
else
pkg_failed=yes
fi
@@ -30661,12 +36069,12 @@ if test -n "$ASOUNDLIB_LIBS"; then
pkg_cv_ASOUNDLIB_LIBS="$ASOUNDLIB_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" alsa >= 1.0.0 \"") >&5
- ($PKG_CONFIG --exists --print-errors " alsa >= 1.0.0 ") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" alsa >= 1.0.17 \"") >&5
+ ($PKG_CONFIG --exists --print-errors " alsa >= 1.0.17 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_ASOUNDLIB_LIBS=`$PKG_CONFIG --libs " alsa >= 1.0.0 " 2>/dev/null`
+ pkg_cv_ASOUNDLIB_LIBS=`$PKG_CONFIG --libs " alsa >= 1.0.17 " 2>/dev/null`
else
pkg_failed=yes
fi
@@ -30684,20 +36092,20 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- ASOUNDLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " alsa >= 1.0.0 " 2>&1`
+ ASOUNDLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " alsa >= 1.0.17 " 2>&1`
else
- ASOUNDLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors " alsa >= 1.0.0 " 2>&1`
+ ASOUNDLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors " alsa >= 1.0.17 " 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$ASOUNDLIB_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_ALSA=0
if test "x$alsa" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** ALSA support not found" >&5
-echo "$as_me: error: *** ALSA support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Needed alsa >= 1.0.17 support not found" >&5
+$as_echo "$as_me: error: *** Needed alsa >= 1.0.17 support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -30705,16 +36113,16 @@ elif test $pkg_failed = untried; then
HAVE_ALSA=0
if test "x$alsa" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** ALSA support not found" >&5
-echo "$as_me: error: *** ALSA support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Needed alsa >= 1.0.17 support not found" >&5
+$as_echo "$as_me: error: *** Needed alsa >= 1.0.17 support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
ASOUNDLIB_CFLAGS=$pkg_cv_ASOUNDLIB_CFLAGS
ASOUNDLIB_LIBS=$pkg_cv_ASOUNDLIB_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_ALSA=1
@@ -30748,8 +36156,8 @@ if test "${enable_solaris+set}" = set; then
case "${enableval}" in
yes) solaris=yes ;;
no) solaris=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-solaris" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-solaris" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-solaris" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-solaris" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -30762,20 +36170,21 @@ if test "x${solaris}" != xno ; then
for ac_header in sys/audio.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -30791,32 +36200,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -30830,51 +36240,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -30883,21 +36294,24 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
HAVE_SOLARIS=1
@@ -30911,8 +36325,8 @@ else
HAVE_SOLARIS=0
if test "x$solaris" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** Solaris audio support not found" >&5
-echo "$as_me: error: *** Solaris audio support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Solaris audio support not found" >&5
+$as_echo "$as_me: error: *** Solaris audio support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -30942,8 +36356,8 @@ if test "${enable_glib2+set}" = set; then
case "${enableval}" in
yes) glib2=yes ;;
no) glib2=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-glib2" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-glib2" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-glib2" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-glib2" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -30955,17 +36369,17 @@ fi
if test "x${glib2}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for GLIB20" >&5
-echo $ECHO_N "checking for GLIB20... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for GLIB20" >&5
+$as_echo_n "checking for GLIB20... " >&6; }
if test -n "$GLIB20_CFLAGS"; then
pkg_cv_GLIB20_CFLAGS="$GLIB20_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.4.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.4.0 \"") >&5
($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.4.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_GLIB20_CFLAGS=`$PKG_CONFIG --cflags " glib-2.0 >= 2.4.0 " 2>/dev/null`
else
@@ -30978,10 +36392,10 @@ if test -n "$GLIB20_LIBS"; then
pkg_cv_GLIB20_LIBS="$GLIB20_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.4.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.4.0 \"") >&5
($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.4.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_GLIB20_LIBS=`$PKG_CONFIG --libs " glib-2.0 >= 2.4.0 " 2>/dev/null`
else
@@ -31008,13 +36422,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$GLIB20_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_GLIB20=0
if test "x$glib2" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** GLib 2 support not found" >&5
-echo "$as_me: error: *** GLib 2 support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** GLib 2 support not found" >&5
+$as_echo "$as_me: error: *** GLib 2 support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -31022,16 +36436,16 @@ elif test $pkg_failed = untried; then
HAVE_GLIB20=0
if test "x$glib2" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** GLib 2 support not found" >&5
-echo "$as_me: error: *** GLib 2 support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** GLib 2 support not found" >&5
+$as_echo "$as_me: error: *** GLib 2 support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
GLIB20_CFLAGS=$pkg_cv_GLIB20_CFLAGS
GLIB20_LIBS=$pkg_cv_GLIB20_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_GLIB20=1
fi
else
@@ -31058,30 +36472,30 @@ if test "${enable_gconf+set}" = set; then
case "${enableval}" in
yes) gconf=yes ;;
no) gconf=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-gconf" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-gconf" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-gconf" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-gconf" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- glib=auto
+ gconf=auto
fi
if test "x${gconf}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for GCONF" >&5
-echo $ECHO_N "checking for GCONF... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for GCONF" >&5
+$as_echo_n "checking for GCONF... " >&6; }
if test -n "$GCONF_CFLAGS"; then
pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" gconf-2.0 >= 2.4.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" gconf-2.0 >= 2.4.0 \"") >&5
($PKG_CONFIG --exists --print-errors " gconf-2.0 >= 2.4.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags " gconf-2.0 >= 2.4.0 " 2>/dev/null`
else
@@ -31094,10 +36508,10 @@ if test -n "$GCONF_LIBS"; then
pkg_cv_GCONF_LIBS="$GCONF_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" gconf-2.0 >= 2.4.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" gconf-2.0 >= 2.4.0 \"") >&5
($PKG_CONFIG --exists --print-errors " gconf-2.0 >= 2.4.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs " gconf-2.0 >= 2.4.0 " 2>/dev/null`
else
@@ -31124,13 +36538,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$GCONF_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_GCONF=0
if test "x$gconf" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** GConf support not found" >&5
-echo "$as_me: error: *** GConf support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** GConf support not found" >&5
+$as_echo "$as_me: error: *** GConf support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -31138,16 +36552,16 @@ elif test $pkg_failed = untried; then
HAVE_GCONF=0
if test "x$gconf" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** GConf support not found" >&5
-echo "$as_me: error: *** GConf support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** GConf support not found" >&5
+$as_echo "$as_me: error: *** GConf support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS
GCONF_LIBS=$pkg_cv_GCONF_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_GCONF=1
fi
else
@@ -31174,8 +36588,8 @@ if test "${enable_avahi+set}" = set; then
case "${enableval}" in
yes) avahi=yes ;;
no) avahi=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-avahi" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-avahi" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-avahi" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-avahi" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -31187,17 +36601,17 @@ fi
if test "x${avahi}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for AVAHI" >&5
-echo $ECHO_N "checking for AVAHI... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for AVAHI" >&5
+$as_echo_n "checking for AVAHI... " >&6; }
if test -n "$AVAHI_CFLAGS"; then
pkg_cv_AVAHI_CFLAGS="$AVAHI_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" avahi-client >= 0.6.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" avahi-client >= 0.6.0 \"") >&5
($PKG_CONFIG --exists --print-errors " avahi-client >= 0.6.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_AVAHI_CFLAGS=`$PKG_CONFIG --cflags " avahi-client >= 0.6.0 " 2>/dev/null`
else
@@ -31210,10 +36624,10 @@ if test -n "$AVAHI_LIBS"; then
pkg_cv_AVAHI_LIBS="$AVAHI_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" avahi-client >= 0.6.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" avahi-client >= 0.6.0 \"") >&5
($PKG_CONFIG --exists --print-errors " avahi-client >= 0.6.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_AVAHI_LIBS=`$PKG_CONFIG --libs " avahi-client >= 0.6.0 " 2>/dev/null`
else
@@ -31240,13 +36654,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$AVAHI_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_AVAHI=0
if test "x$avahi" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** Avahi support not found" >&5
-echo "$as_me: error: *** Avahi support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Avahi support not found" >&5
+$as_echo "$as_me: error: *** Avahi support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -31254,16 +36668,16 @@ elif test $pkg_failed = untried; then
HAVE_AVAHI=0
if test "x$avahi" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** Avahi support not found" >&5
-echo "$as_me: error: *** Avahi support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Avahi support not found" >&5
+$as_echo "$as_me: error: *** Avahi support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
AVAHI_CFLAGS=$pkg_cv_AVAHI_CFLAGS
AVAHI_LIBS=$pkg_cv_AVAHI_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_AVAHI=1
fi
else
@@ -31286,17 +36700,17 @@ fi
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for LIBOIL" >&5
-echo $ECHO_N "checking for LIBOIL... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for LIBOIL" >&5
+$as_echo_n "checking for LIBOIL... " >&6; }
if test -n "$LIBOIL_CFLAGS"; then
pkg_cv_LIBOIL_CFLAGS="$LIBOIL_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" liboil-0.3 >= 0.3.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" liboil-0.3 >= 0.3.0 \"") >&5
($PKG_CONFIG --exists --print-errors " liboil-0.3 >= 0.3.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_LIBOIL_CFLAGS=`$PKG_CONFIG --cflags " liboil-0.3 >= 0.3.0 " 2>/dev/null`
else
@@ -31309,10 +36723,10 @@ if test -n "$LIBOIL_LIBS"; then
pkg_cv_LIBOIL_LIBS="$LIBOIL_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" liboil-0.3 >= 0.3.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" liboil-0.3 >= 0.3.0 \"") >&5
($PKG_CONFIG --exists --print-errors " liboil-0.3 >= 0.3.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_LIBOIL_LIBS=`$PKG_CONFIG --libs " liboil-0.3 >= 0.3.0 " 2>/dev/null`
else
@@ -31339,7 +36753,7 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$LIBOIL_PKG_ERRORS" >&5
- { { echo "$as_me:$LINENO: error: Package requirements ( liboil-0.3 >= 0.3.0 ) were not met:
+ { { $as_echo "$as_me:$LINENO: error: Package requirements ( liboil-0.3 >= 0.3.0 ) were not met:
$LIBOIL_PKG_ERRORS
@@ -31350,7 +36764,7 @@ Alternatively, you may set the environment variables LIBOIL_CFLAGS
and LIBOIL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
-echo "$as_me: error: Package requirements ( liboil-0.3 >= 0.3.0 ) were not met:
+$as_echo "$as_me: error: Package requirements ( liboil-0.3 >= 0.3.0 ) were not met:
$LIBOIL_PKG_ERRORS
@@ -31363,7 +36777,9 @@ See the pkg-config man page for more details.
" >&2;}
{ (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
- { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -31373,7 +36789,7 @@ See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -31383,12 +36799,12 @@ See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
else
LIBOIL_CFLAGS=$pkg_cv_LIBOIL_CFLAGS
LIBOIL_LIBS=$pkg_cv_LIBOIL_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
:
fi
@@ -31402,8 +36818,8 @@ if test "${enable_jack+set}" = set; then
case "${enableval}" in
yes) jack=yes ;;
no) jack=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-jack" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-jack" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-jack" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-jack" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -31415,17 +36831,17 @@ fi
if test "x${jack}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for JACK" >&5
-echo $ECHO_N "checking for JACK... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for JACK" >&5
+$as_echo_n "checking for JACK... " >&6; }
if test -n "$JACK_CFLAGS"; then
pkg_cv_JACK_CFLAGS="$JACK_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" jack >= 0.100 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" jack >= 0.100 \"") >&5
($PKG_CONFIG --exists --print-errors " jack >= 0.100 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags " jack >= 0.100 " 2>/dev/null`
else
@@ -31438,10 +36854,10 @@ if test -n "$JACK_LIBS"; then
pkg_cv_JACK_LIBS="$JACK_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" jack >= 0.100 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" jack >= 0.100 \"") >&5
($PKG_CONFIG --exists --print-errors " jack >= 0.100 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs " jack >= 0.100 " 2>/dev/null`
else
@@ -31468,13 +36884,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$JACK_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_JACK=0
if test "x$jack" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** JACK support not found" >&5
-echo "$as_me: error: *** JACK support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** JACK support not found" >&5
+$as_echo "$as_me: error: *** JACK support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -31482,16 +36898,16 @@ elif test $pkg_failed = untried; then
HAVE_JACK=0
if test "x$jack" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** JACK support not found" >&5
-echo "$as_me: error: *** JACK support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** JACK support not found" >&5
+$as_echo "$as_me: error: *** JACK support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
JACK_CFLAGS=$pkg_cv_JACK_CFLAGS
JACK_LIBS=$pkg_cv_JACK_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_JACK=1
fi
else
@@ -31518,8 +36934,8 @@ if test "${enable_asyncns+set}" = set; then
case "${enableval}" in
yes) asyncns=yes ;;
no) asyncns=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-asyncns" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-asyncns" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-asyncns" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-asyncns" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -31531,17 +36947,17 @@ fi
if test "x${asyncns}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for LIBASYNCNS" >&5
-echo $ECHO_N "checking for LIBASYNCNS... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for LIBASYNCNS" >&5
+$as_echo_n "checking for LIBASYNCNS... " >&6; }
if test -n "$LIBASYNCNS_CFLAGS"; then
pkg_cv_LIBASYNCNS_CFLAGS="$LIBASYNCNS_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" libasyncns >= 0.1 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" libasyncns >= 0.1 \"") >&5
($PKG_CONFIG --exists --print-errors " libasyncns >= 0.1 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_LIBASYNCNS_CFLAGS=`$PKG_CONFIG --cflags " libasyncns >= 0.1 " 2>/dev/null`
else
@@ -31554,10 +36970,10 @@ if test -n "$LIBASYNCNS_LIBS"; then
pkg_cv_LIBASYNCNS_LIBS="$LIBASYNCNS_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" libasyncns >= 0.1 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" libasyncns >= 0.1 \"") >&5
($PKG_CONFIG --exists --print-errors " libasyncns >= 0.1 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_LIBASYNCNS_LIBS=`$PKG_CONFIG --libs " libasyncns >= 0.1 " 2>/dev/null`
else
@@ -31584,13 +37000,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$LIBASYNCNS_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_LIBASYNCNS=0
if test "x$asyncns" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** Async DNS support not found" >&5
-echo "$as_me: error: *** Async DNS support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Async DNS support not found" >&5
+$as_echo "$as_me: error: *** Async DNS support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -31598,16 +37014,16 @@ elif test $pkg_failed = untried; then
HAVE_LIBASYNCNS=0
if test "x$asyncns" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** Async DNS support not found" >&5
-echo "$as_me: error: *** Async DNS support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** Async DNS support not found" >&5
+$as_echo "$as_me: error: *** Async DNS support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
LIBASYNCNS_CFLAGS=$pkg_cv_LIBASYNCNS_CFLAGS
LIBASYNCNS_LIBS=$pkg_cv_LIBASYNCNS_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_LIBASYNCNS=1
fi
else
@@ -31642,8 +37058,8 @@ if test "${enable_tcpwrap+set}" = set; then
case "${enableval}" in
yes) tcpwrap=yes ;;
no) tcpwrap=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-tcpwrap" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-tcpwrap" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-tcpwrap" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-tcpwrap" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -31657,8 +37073,8 @@ if test "x${tcpwrap}" != xno ; then
LIBWRAP_LIBS=
saved_LIBS="$LIBS"
LIBS="$LIBS -lwrap"
-{ echo "$as_me:$LINENO: checking for tcpwrap library and headers" >&5
-echo $ECHO_N "checking for tcpwrap library and headers... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for tcpwrap library and headers" >&5
+$as_echo_n "checking for tcpwrap library and headers... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -31684,41 +37100,45 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBWRAP
+#define HAVE_LIBWRAP /**/
_ACEOF
LIBWRAP_LIBS="-lwrap"
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS="$saved_LIBS"
if test "x${LIBWRAP_LIBS}" = x && test "x$tcpwrap" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** TCP wrappers support not found" >&5
-echo "$as_me: error: *** TCP wrappers support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** TCP wrappers support not found" >&5
+$as_echo "$as_me: error: *** TCP wrappers support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
@@ -31735,8 +37155,8 @@ if test "${enable_lirc+set}" = set; then
case "${enableval}" in
yes) lirc=yes ;;
no) lirc=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-lirc" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-lirc" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-lirc" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-lirc" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -31750,17 +37170,17 @@ if test "x${lirc}" != xno ; then
LIRC_CFLAGS=
LIRC_LIBS=
if test "${ac_cv_header_lirc_lirc_client_h+set}" = set; then
- { echo "$as_me:$LINENO: checking for lirc/lirc_client.h" >&5
-echo $ECHO_N "checking for lirc/lirc_client.h... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for lirc/lirc_client.h" >&5
+$as_echo_n "checking for lirc/lirc_client.h... " >&6; }
if test "${ac_cv_header_lirc_lirc_client_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_lirc_lirc_client_h" >&5
-echo "${ECHO_T}$ac_cv_header_lirc_lirc_client_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lirc_lirc_client_h" >&5
+$as_echo "$ac_cv_header_lirc_lirc_client_h" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking lirc/lirc_client.h usability" >&5
-echo $ECHO_N "checking lirc/lirc_client.h usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking lirc/lirc_client.h usability" >&5
+$as_echo_n "checking lirc/lirc_client.h usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -31776,32 +37196,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking lirc/lirc_client.h presence" >&5
-echo $ECHO_N "checking lirc/lirc_client.h presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking lirc/lirc_client.h presence" >&5
+$as_echo_n "checking lirc/lirc_client.h presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -31815,51 +37236,52 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: lirc/lirc_client.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: lirc/lirc_client.h: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: lirc/lirc_client.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: lirc/lirc_client.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: lirc/lirc_client.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: lirc/lirc_client.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: lirc/lirc_client.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: lirc/lirc_client.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: lirc/lirc_client.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: lirc/lirc_client.h: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: lirc/lirc_client.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: lirc/lirc_client.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: lirc/lirc_client.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: lirc/lirc_client.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: lirc/lirc_client.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: lirc/lirc_client.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------------------- ##
## Report this to mzchyfrnhqvb (at) 0pointer (dot) net ##
@@ -31868,22 +37290,22 @@ _ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-{ echo "$as_me:$LINENO: checking for lirc/lirc_client.h" >&5
-echo $ECHO_N "checking for lirc/lirc_client.h... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for lirc/lirc_client.h" >&5
+$as_echo_n "checking for lirc/lirc_client.h... " >&6; }
if test "${ac_cv_header_lirc_lirc_client_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_cv_header_lirc_lirc_client_h=$ac_header_preproc
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_lirc_lirc_client_h" >&5
-echo "${ECHO_T}$ac_cv_header_lirc_lirc_client_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lirc_lirc_client_h" >&5
+$as_echo "$ac_cv_header_lirc_lirc_client_h" >&6; }
fi
-if test $ac_cv_header_lirc_lirc_client_h = yes; then
- { echo "$as_me:$LINENO: checking for lirc_init in -llirc_client" >&5
-echo $ECHO_N "checking for lirc_init in -llirc_client... $ECHO_C" >&6; }
+if test "x$ac_cv_header_lirc_lirc_client_h" = x""yes; then
+ { $as_echo "$as_me:$LINENO: checking for lirc_init in -llirc_client" >&5
+$as_echo_n "checking for lirc_init in -llirc_client... " >&6; }
if test "${ac_cv_lib_lirc_client_lirc_init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-llirc_client $LIBS"
@@ -31915,33 +37337,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_lirc_client_lirc_init=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_lirc_client_lirc_init=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_lirc_client_lirc_init" >&5
-echo "${ECHO_T}$ac_cv_lib_lirc_client_lirc_init" >&6; }
-if test $ac_cv_lib_lirc_client_lirc_init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lirc_client_lirc_init" >&5
+$as_echo "$ac_cv_lib_lirc_client_lirc_init" >&6; }
+if test "x$ac_cv_lib_lirc_client_lirc_init" = x""yes; then
HAVE_LIRC=1
LIRC_LIBS=-llirc_client
else
@@ -31955,8 +37381,8 @@ fi
if test "x${HAVE_LIRC}" = x0 && test "x$lirc" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** LIRC support not found" >&5
-echo "$as_me: error: *** LIRC support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** LIRC support not found" >&5
+$as_echo "$as_me: error: *** LIRC support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
@@ -31982,8 +37408,8 @@ if test "${enable_hal+set}" = set; then
case "${enableval}" in
yes) hal=yes ;;
no) hal=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-hal" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-hal" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-hal" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-hal" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -31994,17 +37420,17 @@ fi
if test "x${hal}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for HAL" >&5
-echo $ECHO_N "checking for HAL... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for HAL" >&5
+$as_echo_n "checking for HAL... " >&6; }
if test -n "$HAL_CFLAGS"; then
pkg_cv_HAL_CFLAGS="$HAL_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" hal >= 0.5.7 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" hal >= 0.5.7 \"") >&5
($PKG_CONFIG --exists --print-errors " hal >= 0.5.7 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags " hal >= 0.5.7 " 2>/dev/null`
else
@@ -32017,10 +37443,10 @@ if test -n "$HAL_LIBS"; then
pkg_cv_HAL_LIBS="$HAL_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" hal >= 0.5.7 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" hal >= 0.5.7 \"") >&5
($PKG_CONFIG --exists --print-errors " hal >= 0.5.7 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs " hal >= 0.5.7 " 2>/dev/null`
else
@@ -32047,13 +37473,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$HAL_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_HAL=0
if test "x$hal" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** HAL support not found" >&5
-echo "$as_me: error: *** HAL support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** HAL support not found" >&5
+$as_echo "$as_me: error: *** HAL support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -32061,16 +37487,16 @@ elif test $pkg_failed = untried; then
HAVE_HAL=0
if test "x$hal" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** HAL support not found" >&5
-echo "$as_me: error: *** HAL support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** HAL support not found" >&5
+$as_echo "$as_me: error: *** HAL support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
HAL_CFLAGS=$pkg_cv_HAL_CFLAGS
HAL_LIBS=$pkg_cv_HAL_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_HAL=1
fi
else
@@ -32097,8 +37523,8 @@ if test "${enable_bluez+set}" = set; then
case "${enableval}" in
yes) bluez=yes ;;
no) bluez=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-bluez" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-bluez" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-bluez" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-bluez" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -32109,17 +37535,17 @@ fi
if test "x${bluez}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for BLUEZ" >&5
-echo $ECHO_N "checking for BLUEZ... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for BLUEZ" >&5
+$as_echo_n "checking for BLUEZ... " >&6; }
if test -n "$BLUEZ_CFLAGS"; then
pkg_cv_BLUEZ_CFLAGS="$BLUEZ_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" bluez >= 3.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" bluez >= 3.0 \"") >&5
($PKG_CONFIG --exists --print-errors " bluez >= 3.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_BLUEZ_CFLAGS=`$PKG_CONFIG --cflags " bluez >= 3.0 " 2>/dev/null`
else
@@ -32132,10 +37558,10 @@ if test -n "$BLUEZ_LIBS"; then
pkg_cv_BLUEZ_LIBS="$BLUEZ_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" bluez >= 3.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" bluez >= 3.0 \"") >&5
($PKG_CONFIG --exists --print-errors " bluez >= 3.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_BLUEZ_LIBS=`$PKG_CONFIG --libs " bluez >= 3.0 " 2>/dev/null`
else
@@ -32162,13 +37588,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$BLUEZ_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_BLUEZ=0
if test "x$bluez" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** BLUEZ support not found" >&5
-echo "$as_me: error: *** BLUEZ support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** BLUEZ support not found" >&5
+$as_echo "$as_me: error: *** BLUEZ support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -32176,16 +37602,16 @@ elif test $pkg_failed = untried; then
HAVE_BLUEZ=0
if test "x$bluez" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** BLUEZ support not found" >&5
-echo "$as_me: error: *** BLUEZ support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** BLUEZ support not found" >&5
+$as_echo "$as_me: error: *** BLUEZ support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
BLUEZ_CFLAGS=$pkg_cv_BLUEZ_CFLAGS
BLUEZ_LIBS=$pkg_cv_BLUEZ_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_BLUEZ=1
fi
else
@@ -32212,8 +37638,8 @@ if test "${enable_dbus+set}" = set; then
case "${enableval}" in
yes) dbus=yes ;;
no) dbus=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-dbus" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-dbus" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-dbus" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-dbus" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -32230,17 +37656,17 @@ if test "x${dbus}" != xno || test "x${bluez}" != xno || "x${hal}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for DBUS" >&5
-echo $ECHO_N "checking for DBUS... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for DBUS" >&5
+$as_echo_n "checking for DBUS... " >&6; }
if test -n "$DBUS_CFLAGS"; then
pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" dbus-1 >= 1.0.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" dbus-1 >= 1.0.0 \"") >&5
($PKG_CONFIG --exists --print-errors " dbus-1 >= 1.0.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags " dbus-1 >= 1.0.0 " 2>/dev/null`
else
@@ -32253,10 +37679,10 @@ if test -n "$DBUS_LIBS"; then
pkg_cv_DBUS_LIBS="$DBUS_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" dbus-1 >= 1.0.0 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" dbus-1 >= 1.0.0 \"") >&5
($PKG_CONFIG --exists --print-errors " dbus-1 >= 1.0.0 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs " dbus-1 >= 1.0.0 " 2>/dev/null`
else
@@ -32283,13 +37709,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$DBUS_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_DBUS=0
if test "x$dbus" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** D-Bus support not found" >&5
-echo "$as_me: error: *** D-Bus support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** D-Bus support not found" >&5
+$as_echo "$as_me: error: *** D-Bus support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -32297,16 +37723,16 @@ elif test $pkg_failed = untried; then
HAVE_DBUS=0
if test "x$dbus" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** D-Bus support not found" >&5
-echo "$as_me: error: *** D-Bus support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** D-Bus support not found" >&5
+$as_echo "$as_me: error: *** D-Bus support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
DBUS_LIBS=$pkg_cv_DBUS_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_DBUS=1
saved_LIBS="$LIBS"
@@ -32314,11 +37740,11 @@ echo "${ECHO_T}yes" >&6; }
for ac_func in dbus_watch_get_unix_fd
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -32371,35 +37797,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -32437,8 +37870,8 @@ if test "${enable_polkit+set}" = set; then
case "${enableval}" in
yes) polkit=yes ;;
no) polkit=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-polkit" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-polkit" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-polkit" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-polkit" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -32451,17 +37884,17 @@ if test "x${polkit}" != xno ; then
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for POLKIT" >&5
-echo $ECHO_N "checking for POLKIT... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for POLKIT" >&5
+$as_echo_n "checking for POLKIT... " >&6; }
if test -n "$POLKIT_CFLAGS"; then
pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" polkit-dbus >= 0.7 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" polkit-dbus >= 0.7 \"") >&5
($PKG_CONFIG --exists --print-errors " polkit-dbus >= 0.7 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_POLKIT_CFLAGS=`$PKG_CONFIG --cflags " polkit-dbus >= 0.7 " 2>/dev/null`
else
@@ -32474,10 +37907,10 @@ if test -n "$POLKIT_LIBS"; then
pkg_cv_POLKIT_LIBS="$POLKIT_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" polkit-dbus >= 0.7 \"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" polkit-dbus >= 0.7 \"") >&5
($PKG_CONFIG --exists --print-errors " polkit-dbus >= 0.7 ") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_POLKIT_LIBS=`$PKG_CONFIG --libs " polkit-dbus >= 0.7 " 2>/dev/null`
else
@@ -32504,13 +37937,13 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$POLKIT_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
HAVE_POLKIT=0
if test "x$polkit" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** PolicyKit support not found" >&5
-echo "$as_me: error: *** PolicyKit support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** PolicyKit support not found" >&5
+$as_echo "$as_me: error: *** PolicyKit support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -32518,16 +37951,16 @@ elif test $pkg_failed = untried; then
HAVE_POLKIT=0
if test "x$polkit" = xyes ; then
- { { echo "$as_me:$LINENO: error: *** PolicyKit support not found" >&5
-echo "$as_me: error: *** PolicyKit support not found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: *** PolicyKit support not found" >&5
+$as_echo "$as_me: error: *** PolicyKit support not found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
POLKIT_CFLAGS=$pkg_cv_POLKIT_CFLAGS
POLKIT_LIBS=$pkg_cv_POLKIT_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
HAVE_POLKIT=1
@@ -32561,8 +37994,8 @@ if test "${enable_manpages+set}" = set; then
enableval=$enable_manpages; case "${enableval}" in
yes) manpages=yes ;;
no) manpages=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-manpages" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-manpages" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-manpages" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-manpages" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
@@ -32570,85 +38003,6 @@ else
fi
-if test x$manpages = xyes ; then
- #
- # XMLTOMAN manpage generation
- #
- # Check whether --enable-xmltoman was given.
-if test "${enable_xmltoman+set}" = set; then
- enableval=$enable_xmltoman; case "${enableval}" in
- yes) xmltoman=yes ;;
- no) xmltoman=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-xmltoman" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-xmltoman" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
-else
- xmltoman=yes
-fi
-
-
- if test x$xmltoman = xyes ; then
- # Extract the first word of "xmltoman", so it can be a program name with args.
-set dummy xmltoman; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_have_xmltoman+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$have_xmltoman"; then
- ac_cv_prog_have_xmltoman="$have_xmltoman" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_have_xmltoman="yes"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_have_xmltoman" && ac_cv_prog_have_xmltoman="no"
-fi
-fi
-have_xmltoman=$ac_cv_prog_have_xmltoman
-if test -n "$have_xmltoman"; then
- { echo "$as_me:$LINENO: result: $have_xmltoman" >&5
-echo "${ECHO_T}$have_xmltoman" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- fi
-
- if test x$have_xmltoman = xno -o x$xmltoman = xno; then
- if ! test -e man/pulseaudio.1 ; then
- { { echo "$as_me:$LINENO: error: *** xmltoman was not found or was disabled, it is required to build the manpages as they have not been pre-built, install xmltoman, pass --disable-manpages or dont pass --disable-xmltoman" >&5
-echo "$as_me: error: *** xmltoman was not found or was disabled, it is required to build the manpages as they have not been pre-built, install xmltoman, pass --disable-manpages or dont pass --disable-xmltoman" >&2;}
- { (exit 1); exit 1; }; }
- exit 1
- fi
- { echo "$as_me:$LINENO: WARNING: *** Not rebuilding man pages as xmltoman is not found ***" >&5
-echo "$as_me: WARNING: *** Not rebuilding man pages as xmltoman is not found ***" >&2;}
- xmltoman=no
- fi
-fi
- if test "x$xmltoman" = xyes; then
- USE_XMLTOMAN_TRUE=
- USE_XMLTOMAN_FALSE='#'
-else
- USE_XMLTOMAN_TRUE='#'
- USE_XMLTOMAN_FALSE=
-fi
-
if test "x$manpages" = xyes; then
BUILD_MANPAGES_TRUE=
BUILD_MANPAGES_FALSE='#'
@@ -32738,8 +38092,8 @@ if test "${enable_per_user_esound_socket+set}" = set; then
case "${enableval}" in
yes) per_user_esound_socket=1 ;;
no) per_user_esound_socket=0 ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-per-user-esound-socket" >&5
-echo "$as_me: error: bad value ${enableval} for --disable-per-user-esound-socket" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-per-user-esound-socket" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-per-user-esound-socket" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
@@ -32759,6 +38113,10 @@ fi
#### PulseAudio system runtime dir ####
PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
+PA_SYSTEM_CONFIG_PATH="${localstatedir}/lib/pulse"
+
+PA_SYSTEM_STATE_PATH="${localstatedir}/lib/pulse"
+
###################################
# Output #
@@ -32832,7 +38190,7 @@ else
fi
-ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile libpulse.pc libpulse-simple.pc libpulse-browse.pc libpulse-mainloop-glib.pc doxygen/Makefile doxygen/doxygen.conf src/pulse/version.h"
+ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile libpulse.pc libpulse-simple.pc libpulse-browse.pc libpulse-mainloop-glib.pc doxygen/Makefile doxygen/doxygen.conf src/pulse/version.h po/Makefile.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -32861,11 +38219,12 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) $as_unset $ac_var ;;
esac ;;
esac
@@ -32898,12 +38257,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" &&
- { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -32919,7 +38278,7 @@ ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`echo "$ac_i" | sed "$ac_script"`
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -32931,229 +38290,228 @@ LTLIBOBJS=$ac_ltlibobjs
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined.
+$as_echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined.
+$as_echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${OS_IS_WIN32_TRUE}" && test -z "${OS_IS_WIN32_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"OS_IS_WIN32\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"OS_IS_WIN32\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"OS_IS_WIN32\" was never defined.
+$as_echo "$as_me: error: conditional \"OS_IS_WIN32\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_REGEX_TRUE}" && test -z "${HAVE_REGEX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_REGEX\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_REGEX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_REGEX\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_REGEX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_AF_UNIX_TRUE}" && test -z "${HAVE_AF_UNIX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_AF_UNIX\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_AF_UNIX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_AF_UNIX\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_AF_UNIX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_EVDEV_TRUE}" && test -z "${HAVE_EVDEV_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_EVDEV\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_EVDEV\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_EVDEV\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_EVDEV\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+
if test -z "${HAVE_SIGXCPU_TRUE}" && test -z "${HAVE_SIGXCPU_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_SIGXCPU\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_SIGXCPU\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_SIGXCPU\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_SIGXCPU\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_MKFIFO_TRUE}" && test -z "${HAVE_MKFIFO_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_MKFIFO\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MKFIFO\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MKFIFO\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_MKFIFO\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+
+ ac_config_commands="$ac_config_commands po/stamp-it"
+
+
if test -z "${HAVE_X11_TRUE}" && test -z "${HAVE_X11_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_X11\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_X11\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_X11\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_X11\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_LIBSAMPLERATE_TRUE}" && test -z "${HAVE_LIBSAMPLERATE_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBSAMPLERATE\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LIBSAMPLERATE\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_LIBSAMPLERATE\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_LIBSAMPLERATE\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_OSS_TRUE}" && test -z "${HAVE_OSS_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_OSS\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_OSS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_OSS\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_OSS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_ALSA_TRUE}" && test -z "${HAVE_ALSA_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_ALSA\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_ALSA\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_ALSA\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_ALSA\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_SOLARIS_TRUE}" && test -z "${HAVE_SOLARIS_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_SOLARIS\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_SOLARIS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_SOLARIS\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_SOLARIS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_GLIB20_TRUE}" && test -z "${HAVE_GLIB20_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_GLIB20\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_GLIB20\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_GLIB20\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_GLIB20\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_GCONF_TRUE}" && test -z "${HAVE_GCONF_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_GCONF\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_GCONF\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_GCONF\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_GCONF\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_AVAHI_TRUE}" && test -z "${HAVE_AVAHI_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_AVAHI\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_AVAHI\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_AVAHI\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_AVAHI\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_JACK_TRUE}" && test -z "${HAVE_JACK_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_JACK\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_JACK\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_JACK\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_JACK\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_LIBASYNCNS_TRUE}" && test -z "${HAVE_LIBASYNCNS_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBASYNCNS\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LIBASYNCNS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_LIBASYNCNS\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_LIBASYNCNS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_LIRC_TRUE}" && test -z "${HAVE_LIRC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIRC\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LIRC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_LIRC\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_LIRC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_HAL_TRUE}" && test -z "${HAVE_HAL_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_HAL\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_HAL\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_HAL\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_HAL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_BLUEZ_TRUE}" && test -z "${HAVE_BLUEZ_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_BLUEZ\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_BLUEZ\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_BLUEZ\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_BLUEZ\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_DBUS_TRUE}" && test -z "${HAVE_DBUS_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_DBUS\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DBUS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DBUS\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_DBUS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_POLKIT_TRUE}" && test -z "${HAVE_POLKIT_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_POLKIT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_POLKIT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${USE_XMLTOMAN_TRUE}" && test -z "${USE_XMLTOMAN_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"USE_XMLTOMAN\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_POLKIT\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_XMLTOMAN\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_POLKIT\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${BUILD_MANPAGES_TRUE}" && test -z "${BUILD_MANPAGES_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"BUILD_MANPAGES\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_MANPAGES\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"BUILD_MANPAGES\" was never defined.
+$as_echo "$as_me: error: conditional \"BUILD_MANPAGES\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${STATIC_BINS_TRUE}" && test -z "${STATIC_BINS_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"STATIC_BINS\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"STATIC_BINS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"STATIC_BINS\" was never defined.
+$as_echo "$as_me: error: conditional \"STATIC_BINS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${PREOPEN_MODS_TRUE}" && test -z "${PREOPEN_MODS_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"PREOPEN_MODS\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"PREOPEN_MODS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"PREOPEN_MODS\" was never defined.
+$as_echo "$as_me: error: conditional \"PREOPEN_MODS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${FORCE_PREOPEN_TRUE}" && test -z "${FORCE_PREOPEN_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"FORCE_PREOPEN\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"FORCE_PREOPEN\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"FORCE_PREOPEN\" was never defined.
+$as_echo "$as_me: error: conditional \"FORCE_PREOPEN\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -33166,7 +38524,7 @@ ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
@@ -33176,7 +38534,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -33198,17 +38556,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
# Support unset when possible.
@@ -33224,8 +38610,6 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -33248,7 +38632,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
{ (exit 1); exit 1; }
fi
@@ -33261,17 +38645,10 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -33293,7 +38670,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -33344,7 +38721,7 @@ $as_unset CDPATH
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
@@ -33372,7 +38749,6 @@ case `echo -n x` in
*)
ECHO_N='-n';;
esac
-
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -33385,19 +38761,22 @@ if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
@@ -33422,10 +38801,10 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
case $1 in
- -*)set "./$1";;
+ -*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
???[sx]*):;;*)false;;esac;fi
@@ -33447,8 +38826,8 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by pulseaudio $as_me 0.9.10, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+This file was extended by pulseaudio $as_me 0.9.13, which was
+generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -33461,7 +38840,16 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
@@ -33469,22 +38857,23 @@ config_commands="$ac_config_commands"
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [FILE]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
- -q, --quiet do not print progress messages
+ -q, --quiet, --silent
+ do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -33498,13 +38887,13 @@ $config_commands
Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-pulseaudio config.status 0.9.10
-configured by $0, generated by GNU Autoconf 2.61,
- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+pulseaudio config.status 0.9.13
+configured by $0, generated by GNU Autoconf 2.63,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2008 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -33512,11 +38901,12 @@ ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
@@ -33538,30 +38928,36 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- echo "$ac_cs_version"; exit ;;
+ $as_echo "$ac_cs_version"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- { echo "$as_me: error: ambiguous option: $1
+ { $as_echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; };;
--help | --hel | -h )
- echo "$ac_cs_usage"; exit ;;
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { echo "$as_me: error: unrecognized option: $1
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; } ;;
@@ -33580,35 +38976,38 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- CONFIG_SHELL=$SHELL
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ exec "\$@"
fi
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- echo "$ac_log"
+ $as_echo "$ac_log"
} >&5
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Handling of arguments.
for ac_config_target in $ac_config_targets
@@ -33616,6 +39015,7 @@ do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
@@ -33626,9 +39026,11 @@ do
"doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES doxygen/Makefile" ;;
"doxygen/doxygen.conf") CONFIG_FILES="$CONFIG_FILES doxygen/doxygen.conf" ;;
"src/pulse/version.h") CONFIG_FILES="$CONFIG_FILES src/pulse/version.h" ;;
+ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
@@ -33669,388 +39071,144 @@ $debug ||
(umask 077 && mkdir "$tmp")
} ||
{
- echo "$me: cannot create a temporary directory in ." >&2
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
-_ACEOF
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-am__isrc!$am__isrc$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-PA_MAJORMINOR!$PA_MAJORMINOR$ac_delim
-PACKAGE_URL!$PACKAGE_URL$ac_delim
-PA_API_VERSION!$PA_API_VERSION$ac_delim
-PA_PROTOCOL_VERSION!$PA_PROTOCOL_VERSION$ac_delim
-LIBPULSE_VERSION_INFO!$LIBPULSE_VERSION_INFO$ac_delim
-LIBPULSE_SIMPLE_VERSION_INFO!$LIBPULSE_SIMPLE_VERSION_INFO$ac_delim
-LIBPULSE_BROWSE_VERSION_INFO!$LIBPULSE_BROWSE_VERSION_INFO$ac_delim
-LIBPULSE_MAINLOOP_GLIB_VERSION_INFO!$LIBPULSE_MAINLOOP_GLIB_VERSION_INFO$ac_delim
-LIBPULSECORE_VERSION_INFO!$LIBPULSECORE_VERSION_INFO$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-M4!$M4$ac_delim
-INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
fi
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim
-CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim
-CONVENIENCE_LTDL_FALSE!$CONVENIENCE_LTDL_FALSE$ac_delim
-SED!$SED$ac_delim
-LN_S!$LN_S$ac_delim
-ECHO!$ECHO$ac_delim
-AR!$AR$ac_delim
-RANLIB!$RANLIB$ac_delim
-DLLTOOL!$DLLTOOL$ac_delim
-AS!$AS$ac_delim
-OBJDUMP!$OBJDUMP$ac_delim
-CXX!$CXX$ac_delim
-CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
-CXXDEPMODE!$CXXDEPMODE$ac_delim
-am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
-am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
-CXXCPP!$CXXCPP$ac_delim
-F77!$F77$ac_delim
-FFLAGS!$FFLAGS$ac_delim
-ac_ct_F77!$ac_ct_F77$ac_delim
-LIBTOOL!$LIBTOOL$ac_delim
-LTDLINCL!$LTDLINCL$ac_delim
-LIBLTDL!$LIBLTDL$ac_delim
-subdirs!$subdirs$ac_delim
-OS_IS_WIN32_TRUE!$OS_IS_WIN32_TRUE$ac_delim
-OS_IS_WIN32_FALSE!$OS_IS_WIN32_FALSE$ac_delim
-HAVE_REGEX_TRUE!$HAVE_REGEX_TRUE$ac_delim
-HAVE_REGEX_FALSE!$HAVE_REGEX_FALSE$ac_delim
-HAVE_AF_UNIX_TRUE!$HAVE_AF_UNIX_TRUE$ac_delim
-HAVE_AF_UNIX_FALSE!$HAVE_AF_UNIX_FALSE$ac_delim
-HAVE_EVDEV_TRUE!$HAVE_EVDEV_TRUE$ac_delim
-HAVE_EVDEV_FALSE!$HAVE_EVDEV_FALSE$ac_delim
-HAVE_SIGXCPU_TRUE!$HAVE_SIGXCPU_TRUE$ac_delim
-HAVE_SIGXCPU_FALSE!$HAVE_SIGXCPU_FALSE$ac_delim
-acx_pthread_config!$acx_pthread_config$ac_delim
-PTHREAD_CC!$PTHREAD_CC$ac_delim
-PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
-PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
-HAVE_MKFIFO_TRUE!$HAVE_MKFIFO_TRUE$ac_delim
-HAVE_MKFIFO_FALSE!$HAVE_MKFIFO_FALSE$ac_delim
-LIBICONV!$LIBICONV$ac_delim
-LTLIBICONV!$LTLIBICONV$ac_delim
-XMKMF!$XMKMF$ac_delim
-X_CFLAGS!$X_CFLAGS$ac_delim
-X_PRE_LIBS!$X_PRE_LIBS$ac_delim
-X_LIBS!$X_LIBS$ac_delim
-X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
-HAVE_X11!$HAVE_X11$ac_delim
-HAVE_X11_TRUE!$HAVE_X11_TRUE$ac_delim
-HAVE_X11_FALSE!$HAVE_X11_FALSE$ac_delim
-have_pkg_config!$have_pkg_config$ac_delim
-PKG_CONFIG!$PKG_CONFIG$ac_delim
-LIBSNDFILE_CFLAGS!$LIBSNDFILE_CFLAGS$ac_delim
-LIBSNDFILE_LIBS!$LIBSNDFILE_LIBS$ac_delim
-LIBSAMPLERATE_CFLAGS!$LIBSAMPLERATE_CFLAGS$ac_delim
-LIBSAMPLERATE_LIBS!$LIBSAMPLERATE_LIBS$ac_delim
-HAVE_LIBSAMPLERATE!$HAVE_LIBSAMPLERATE$ac_delim
-HAVE_LIBSAMPLERATE_TRUE!$HAVE_LIBSAMPLERATE_TRUE$ac_delim
-HAVE_LIBSAMPLERATE_FALSE!$HAVE_LIBSAMPLERATE_FALSE$ac_delim
-HAVE_OSS!$HAVE_OSS$ac_delim
-HAVE_OSS_TRUE!$HAVE_OSS_TRUE$ac_delim
-HAVE_OSS_FALSE!$HAVE_OSS_FALSE$ac_delim
-ASOUNDLIB_CFLAGS!$ASOUNDLIB_CFLAGS$ac_delim
-ASOUNDLIB_LIBS!$ASOUNDLIB_LIBS$ac_delim
-HAVE_ALSA!$HAVE_ALSA$ac_delim
-HAVE_ALSA_TRUE!$HAVE_ALSA_TRUE$ac_delim
-HAVE_ALSA_FALSE!$HAVE_ALSA_FALSE$ac_delim
-HAVE_SOLARIS!$HAVE_SOLARIS$ac_delim
-HAVE_SOLARIS_TRUE!$HAVE_SOLARIS_TRUE$ac_delim
-HAVE_SOLARIS_FALSE!$HAVE_SOLARIS_FALSE$ac_delim
-GLIB20_CFLAGS!$GLIB20_CFLAGS$ac_delim
-GLIB20_LIBS!$GLIB20_LIBS$ac_delim
-HAVE_GLIB20!$HAVE_GLIB20$ac_delim
-HAVE_GLIB20_TRUE!$HAVE_GLIB20_TRUE$ac_delim
-HAVE_GLIB20_FALSE!$HAVE_GLIB20_FALSE$ac_delim
-GCONF_CFLAGS!$GCONF_CFLAGS$ac_delim
-GCONF_LIBS!$GCONF_LIBS$ac_delim
-HAVE_GCONF!$HAVE_GCONF$ac_delim
-HAVE_GCONF_TRUE!$HAVE_GCONF_TRUE$ac_delim
-HAVE_GCONF_FALSE!$HAVE_GCONF_FALSE$ac_delim
-AVAHI_CFLAGS!$AVAHI_CFLAGS$ac_delim
-AVAHI_LIBS!$AVAHI_LIBS$ac_delim
-HAVE_AVAHI!$HAVE_AVAHI$ac_delim
-HAVE_AVAHI_TRUE!$HAVE_AVAHI_TRUE$ac_delim
-HAVE_AVAHI_FALSE!$HAVE_AVAHI_FALSE$ac_delim
-LIBOIL_CFLAGS!$LIBOIL_CFLAGS$ac_delim
-LIBOIL_LIBS!$LIBOIL_LIBS$ac_delim
-JACK_CFLAGS!$JACK_CFLAGS$ac_delim
-JACK_LIBS!$JACK_LIBS$ac_delim
-HAVE_JACK!$HAVE_JACK$ac_delim
-HAVE_JACK_TRUE!$HAVE_JACK_TRUE$ac_delim
-HAVE_JACK_FALSE!$HAVE_JACK_FALSE$ac_delim
-LIBASYNCNS_CFLAGS!$LIBASYNCNS_CFLAGS$ac_delim
-LIBASYNCNS_LIBS!$LIBASYNCNS_LIBS$ac_delim
-HAVE_LIBASYNCNS!$HAVE_LIBASYNCNS$ac_delim
-HAVE_LIBASYNCNS_TRUE!$HAVE_LIBASYNCNS_TRUE$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ . ./conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
{ (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
-fi
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
-_ACEOF
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-HAVE_LIBASYNCNS_FALSE!$HAVE_LIBASYNCNS_FALSE$ac_delim
-LIBWRAP_LIBS!$LIBWRAP_LIBS$ac_delim
-LIRC_CFLAGS!$LIRC_CFLAGS$ac_delim
-LIRC_LIBS!$LIRC_LIBS$ac_delim
-HAVE_LIRC_TRUE!$HAVE_LIRC_TRUE$ac_delim
-HAVE_LIRC_FALSE!$HAVE_LIRC_FALSE$ac_delim
-HAL_CFLAGS!$HAL_CFLAGS$ac_delim
-HAL_LIBS!$HAL_LIBS$ac_delim
-HAVE_HAL!$HAVE_HAL$ac_delim
-HAVE_HAL_TRUE!$HAVE_HAL_TRUE$ac_delim
-HAVE_HAL_FALSE!$HAVE_HAL_FALSE$ac_delim
-BLUEZ_CFLAGS!$BLUEZ_CFLAGS$ac_delim
-BLUEZ_LIBS!$BLUEZ_LIBS$ac_delim
-HAVE_BLUEZ!$HAVE_BLUEZ$ac_delim
-HAVE_BLUEZ_TRUE!$HAVE_BLUEZ_TRUE$ac_delim
-HAVE_BLUEZ_FALSE!$HAVE_BLUEZ_FALSE$ac_delim
-DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
-DBUS_LIBS!$DBUS_LIBS$ac_delim
-HAVE_DBUS!$HAVE_DBUS$ac_delim
-HAVE_DBUS_TRUE!$HAVE_DBUS_TRUE$ac_delim
-HAVE_DBUS_FALSE!$HAVE_DBUS_FALSE$ac_delim
-POLKIT_CFLAGS!$POLKIT_CFLAGS$ac_delim
-POLKIT_LIBS!$POLKIT_LIBS$ac_delim
-policydir!$policydir$ac_delim
-HAVE_POLKIT!$HAVE_POLKIT$ac_delim
-HAVE_POLKIT_TRUE!$HAVE_POLKIT_TRUE$ac_delim
-HAVE_POLKIT_FALSE!$HAVE_POLKIT_FALSE$ac_delim
-have_xmltoman!$have_xmltoman$ac_delim
-USE_XMLTOMAN_TRUE!$USE_XMLTOMAN_TRUE$ac_delim
-USE_XMLTOMAN_FALSE!$USE_XMLTOMAN_FALSE$ac_delim
-BUILD_MANPAGES_TRUE!$BUILD_MANPAGES_TRUE$ac_delim
-BUILD_MANPAGES_FALSE!$BUILD_MANPAGES_FALSE$ac_delim
-PA_SYSTEM_USER!$PA_SYSTEM_USER$ac_delim
-PA_SYSTEM_GROUP!$PA_SYSTEM_GROUP$ac_delim
-PA_REALTIME_GROUP!$PA_REALTIME_GROUP$ac_delim
-PA_ACCESS_GROUP!$PA_ACCESS_GROUP$ac_delim
-PA_SYSTEM_RUNTIME_PATH!$PA_SYSTEM_RUNTIME_PATH$ac_delim
-STATIC_BINS_TRUE!$STATIC_BINS_TRUE$ac_delim
-STATIC_BINS_FALSE!$STATIC_BINS_FALSE$ac_delim
-PREOPEN_MODS_TRUE!$PREOPEN_MODS_TRUE$ac_delim
-PREOPEN_MODS_FALSE!$PREOPEN_MODS_FALSE$ac_delim
-PREOPEN_MODS!$PREOPEN_MODS$ac_delim
-modlibexecdir!$modlibexecdir$ac_delim
-FORCE_PREOPEN_TRUE!$FORCE_PREOPEN_TRUE$ac_delim
-FORCE_PREOPEN_FALSE!$FORCE_PREOPEN_FALSE$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 47; then
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
{ (exit 1); exit 1; }; }
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
-fi
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACAWK
_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
_ACEOF
-
# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
@@ -34066,19 +39224,133 @@ s/^[^=]*=[ ]*$//
}'
fi
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+ { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_HEADERS"
+
-for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
do
case $ac_tag in
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
{ (exit 1); exit 1; }; };;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
@@ -34107,26 +39379,38 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
{ (exit 1); exit 1; }; };;
esac
- ac_file_inputs="$ac_file_inputs $ac_f"
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
- configure_input="Generated from "`IFS=:
- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin";;
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
;;
esac
@@ -34136,7 +39420,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
+$as_echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -34162,7 +39446,7 @@ echo X"$ac_file" |
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -34171,7 +39455,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -34192,17 +39476,17 @@ echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -34247,12 +39531,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
esac
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
-case `sed -n '/datarootdir/ {
+ac_sed_dataroot='
+/datarootdir/ {
p
q
}
@@ -34261,13 +39546,14 @@ case `sed -n '/datarootdir/ {
/@infodir@/p
/@localedir@/p
/@mandir@/p
-' $ac_file_inputs` in
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
s&@datadir@&$datadir&g
s&@docdir@&$docdir&g
@@ -34281,15 +39567,16 @@ _ACEOF
# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
+s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -34300,121 +39587,60 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&2;}
rm -f "$tmp/stdin"
case $ac_file in
- -) cat "$tmp/out"; rm -f "$tmp/out";;
- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
- esac
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
;;
:H)
#
# CONFIG_HEADER
#
-_ACEOF
-
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status. If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless. But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
-ac_dB='\\)[ (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
- sed -n '
- t rset
- :rset
- s/^[ ]*#[ ]*define[ ][ ]*//
- t ok
- d
- :ok
- s/[\\&,]/\\&/g
- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
- ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[ #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
-do
- # Write a here document:
- cat >>$CONFIG_STATUS <<_ACEOF
- # First, check the format of the line:
- cat >"\$tmp/defines.sed" <<\\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
-/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
-b
-:def
-_ACEOF
- sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
- ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
- sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
- grep . conftest.tail >/dev/null || break
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines conftest.tail
-
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
-cat >>$CONFIG_STATUS <<\_ACEOF
if test x"$ac_file" != x-; then
- echo "/* $configure_input */" >"$tmp/config.h"
- cat "$ac_result" >>"$tmp/config.h"
- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
- rm -f $ac_file
- mv "$tmp/config.h" $ac_file
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
fi
else
- echo "/* $configure_input */"
- cat "$ac_result"
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+ { (exit 1); exit 1; }; }
fi
- rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
-_am_arg=$ac_file
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
@@ -34429,7 +39655,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$_am_arg" : 'X\(//\)[^/]' \| \
X"$_am_arg" : 'X\(//\)$' \| \
X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$_am_arg" |
+$as_echo X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -34449,8 +39675,8 @@ echo X"$_am_arg" |
s/.*/./; q'`/stamp-h$_am_stamp_count
;;
- :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -34472,7 +39698,7 @@ $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
+$as_echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -34516,7 +39742,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
+$as_echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -34542,7 +39768,7 @@ echo X"$file" |
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -34551,7 +39777,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -34572,14 +39798,34 @@ echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
;;
+ "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac ;;
+ "po/stamp-it":C)
+ rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
+ >"po/stamp-it.tmp"
+ sed '/^#/d
+ s/^[[].*] *//
+ /^[ ]*$/d
+ '"s|^| $ac_top_srcdir/|" \
+ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
+
+ sed '/^POTFILES =/,/[^\\]$/ {
+ /^POTFILES =/!d
+ r po/POTFILES
+ }
+ ' "po/Makefile.in" >"po/Makefile"
+ rm -f "po/Makefile.tmp"
+ mv "po/stamp-it.tmp" "po/stamp-it"
+ ;;
esac
done # for ac_tag
@@ -34590,6 +39836,11 @@ _ACEOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -34617,7 +39868,8 @@ fi
#
if test "$no_recursion" != yes; then
- # Remove --cache-file and --srcdir arguments so they do not pile up.
+ # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+ # so they do not pile up.
ac_sub_configure_args=
ac_prev=
eval "set x $ac_configure_args"
@@ -34646,9 +39898,11 @@ if test "$no_recursion" != yes; then
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
;;
+ --disable-option-checking)
+ ;;
*)
case $ac_arg in
- *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
esac
@@ -34658,7 +39912,7 @@ if test "$no_recursion" != yes; then
# in subdir configurations.
ac_arg="--prefix=$prefix"
case $ac_arg in
- *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
@@ -34667,6 +39921,10 @@ if test "$no_recursion" != yes; then
ac_sub_configure_args="--silent $ac_sub_configure_args"
fi
+ # Always prepend --disable-option-checking to silence warnings, since
+ # different subdirs can have different --enable and --with options.
+ ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
ac_popdir=`pwd`
for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
@@ -34675,8 +39933,8 @@ if test "$no_recursion" != yes; then
test -d "$srcdir/$ac_dir" || continue
ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
- echo "$as_me:$LINENO: $ac_msg" >&5
- echo "$ac_msg" >&6
+ $as_echo "$as_me:$LINENO: $ac_msg" >&5
+ $as_echo "$ac_msg" >&6
{ as_dir="$ac_dir"
case $as_dir in #(
-*) as_dir=./$as_dir;;
@@ -34685,7 +39943,7 @@ if test "$no_recursion" != yes; then
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -34694,7 +39952,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -34715,17 +39973,17 @@ echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -34764,8 +40022,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
# This should be Cygnus configure.
ac_sub_configure=$ac_aux_dir/configure
else
- { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
-echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
+$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
ac_sub_configure=
fi
@@ -34778,19 +40036,23 @@ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
esac
- { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
# The eval makes quoting arguments work.
eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
--cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
- { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
-echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
+$as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
{ (exit 1); exit 1; }; }
fi
cd "$ac_popdir"
done
fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
# ==========================================================================
@@ -34881,6 +40143,8 @@ echo "
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
System Runtime Path: ${PA_SYSTEM_RUNTIME_PATH}
+ System State Path: ${PA_SYSTEM_STATE_PATH}
+ System Config Path: ${PA_SYSTEM_CONFIG_PATH}
Compiler: ${CC}
CFLAGS: ${CFLAGS}
Have X11: ${ENABLE_X11}
diff --git a/configure.ac b/configure.ac
index b1ef445..2b91a00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,6 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-# $Id: configure.ac 2190 2008-03-29 22:09:52Z lennart $
-
# This file is part of PulseAudio.
#
# Copyright 2004-2008 Lennart Poettering
@@ -22,30 +20,31 @@
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-AC_PREREQ(2.60)
+AC_PREREQ(2.62)
m4_define(PA_MAJOR, [0])
m4_define(PA_MINOR, [9])
-m4_define(PA_MICRO, [10])
+m4_define(PA_MICRO, [13])
-AC_INIT([pulseaudio], PA_MAJOR.PA_MINOR.PA_MICRO,[mzchyfrnhqvb (at) 0pointer (dot) net])
+AC_INIT([pulseaudio],[PA_MAJOR.PA_MINOR.PA_MICRO],[mzchyfrnhqvb (at) 0pointer (dot) net])
AC_CONFIG_SRCDIR([src/daemon/main.c])
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([foreign -Wall])
+AM_INIT_AUTOMAKE([foreign 1.10 -Wall])
AC_SUBST(PA_MAJORMINOR, "PA_MAJOR.PA_MINOR")
AC_SUBST(PACKAGE_URL, [http://pulseaudio.org/])
-AC_SUBST(PA_API_VERSION, 11)
-AC_SUBST(PA_PROTOCOL_VERSION, 12)
+AC_SUBST(PA_API_VERSION, 12)
+AC_SUBST(PA_PROTOCOL_VERSION, 14)
# The stable ABI for client applications, for the version info x:y:z
# always will hold y=z
-AC_SUBST(LIBPULSE_VERSION_INFO, [4:1:4])
+AC_SUBST(LIBPULSE_VERSION_INFO, [7:0:7])
# A simplified, synchronous, ABI-stable interface for client
# applications, for the version info x:y:z always will hold y=z
-AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:1:0])
+AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:2:0])
# The ABI-stable network browsing interface for client applications,
# for the version info x:y:z always will hold y=z
@@ -53,14 +52,15 @@ AC_SUBST(LIBPULSE_BROWSE_VERSION_INFO, [1:1:1])
# The ABI-stable GLib adapter for client applications, for the version
# info x:y:z always will hold y=z
-AC_SUBST(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO, [0:3:0])
+AC_SUBST(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO, [0:4:0])
# An internally used, ABI-unstable library that contains the
# PulseAudio core, SONAMEs are bumped on every release, version info
# suffix will always be 0:0
-AC_SUBST(LIBPULSECORE_VERSION_INFO, [5:1:0])
+AC_SUBST(LIBPULSECORE_VERSION_INFO, [8:0:0])
AC_CANONICAL_HOST
+AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
if type -p stow > /dev/null && test -d /usr/local/stow ; then
AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
@@ -86,9 +86,10 @@ AC_PROG_MKDIR_P
# CC
AC_PROG_CC
+AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
-AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
# M4
@@ -97,37 +98,16 @@ if test "x$M4" = xno ; then
AC_MSG_ERROR([m4 missing])
fi
-# GCC flags
-
-test_gcc_flag() {
- AC_LANG_CONFTEST([int main(int argc, char*argv[]) {}])
- $CC -c conftest.c $CFLAGS -o conftest.o > /dev/null 2> /dev/null
- ret=$?
- rm -f conftest.o
- return $ret
-}
-
-# If using GCC specify some additional parameters
-if test "x$GCC" = "xyes" ; then
-
- # We use gnu99 instead of c99 because many have interpreted the standard
- # in a way that int64_t isn't defined on non-64 bit platforms.
- DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math"
-
- for flag in $DESIRED_FLAGS ; do
- AC_MSG_CHECKING([whether $CC accepts $flag])
- if test_gcc_flag $flag ; then
- CFLAGS="$CFLAGS $flag"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- done
-fi
+dnl Compiler flags
+DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wno-long-long -Wvla -Wno-overlength-strings -Wconversion -Wundef -Wformat -Wlogical-op -Wpacked -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -ffast-math"
+
+for flag in $DESIRED_FLAGS ; do
+ CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
+done
# Native atomic operation support
AC_ARG_ENABLE([atomic-arm-linux-helpers],
- AC_HELP_STRING([--disable-atomic-arm-linux-helpers], [use inline asm or libatomic_ops instead]),
+ AS_HELP_STRING([--disable-atomic-arm-linux-helpers],[use inline asm or libatomic_ops instead]),
[
case "${enableval}" in
yes) atomic_arm_linux_helpers=yes ;;
@@ -138,7 +118,7 @@ AC_ARG_ENABLE([atomic-arm-linux-helpers],
[atomic_arm_linux_helpers=auto])
AC_ARG_ENABLE([atomic-arm-memory-barrier],
- AC_HELP_STRING([--enable-atomic-arm-memory-barrier], [only really needed in SMP arm systems]),
+ AS_HELP_STRING([--enable-atomic-arm-memory-barrier],[only really needed in SMP arm systems]),
[
case "${enableval}" in
yes) AC_DEFINE_UNQUOTED(ATOMIC_ARM_MEMORY_BARRIER_ENABLED, 1, [Enable memory barriers]) ;;
@@ -162,17 +142,18 @@ esac
# If everything else fails use libatomic_ops
need_libatomic_ops=yes
-AC_MSG_CHECKING([whether $CC knows __sync_bool_compare_and_swap()])
-AC_LANG_CONFTEST([int main() { int a = 4; __sync_bool_compare_and_swap(&a, 4, 5); }])
-$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
-ret=$?
-rm -f conftest.o conftest
-if test $ret -eq 0 ; then
+AC_CACHE_CHECK([whether $CC knows __sync_bool_compare_and_swap()],
+ pulseaudio_cv_sync_bool_compare_and_swap,
+ [AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([], [[int a = 4; __sync_bool_compare_and_swap(&a, 4, 5);]]),
+ [pulseaudio_cv_sync_bool_compare_and_swap=yes],
+ [pulseaudio_cv_sync_bool_compare_and_swap=no])
+ ])
+
+if test "$pulseaudio_cv_sync_bool_compare_and_swap" = "yes" ; then
AC_DEFINE([HAVE_ATOMIC_BUILTINS], 1, [Have __sync_bool_compare_and_swap() and friends.])
- AC_MSG_RESULT([yes])
need_libatomic_ops=no
else
- AC_MSG_RESULT([no])
# HW specific atomic ops stuff
AC_MSG_CHECKING([architecture for native atomic operations])
case $host_cpu in
@@ -188,29 +169,27 @@ else
need_libatomic_ops=no
else
AC_MSG_RESULT([no])
- AC_MSG_CHECKING([compiler support for arm inline asm atomic operations])
- AC_LANG_CONFTEST([[int main()
- {
- volatile int a=0;
- int o=0, n=1, r;
- asm volatile ("ldrex %0, [%1]\n"
- "subs %0, %0, %2\n"
- "strexeq %0, %3, [%1]\n"
- : "=&r" (r)
- : "r" (&a), "Ir" (o), "r" (n)
- : "cc");
- return (a==1 ? 0 : -1);
- }]])
- $CC conftest.c $CFLAGS -o conftest > /dev/null 2>&1
- ret=$?
- rm -f conftest.o conftest
- if test $ret -eq 0 ; then
+ AC_CACHE_CHECK([compiler support for arm inline asm atomic operations],
+ pulseaudio_cv_support_arm_atomic_ops,
+ [AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([],
+ [[volatile int a=0;
+ int o=0, n=1, r;
+ asm volatile ("ldrex %0, [%1]\n"
+ "subs %0, %0, %2\n"
+ "strexeq %0, %3, [%1]\n"
+ : "=&r" (r)
+ : "r" (&a), "Ir" (o), "r" (n)
+ : "cc");
+ return (a==1 ? 0 : -1);
+ ]]),
+ [pulseaudio_cv_support_arm_atomic_ops=yes],
+ [pulseaudio_cv_support_arm_atomic_ops=no])
+ ])
+ AS_IF([test "$pulseaudio_cv_support_arm_atomic_ops" = "yes"], [
AC_DEFINE([ATOMIC_ARM_INLINE_ASM], 1, [Have ARMv6 instructions.])
- AC_MSG_RESULT([yes])
need_libatomic_ops=no
- else
- AC_MSG_RESULT([no])
- fi
+ ])
fi
;;
*)
@@ -219,29 +198,19 @@ else
esac
fi
-AC_MSG_CHECKING([whether $CC knows __thread])
-AC_LANG_CONFTEST([static __thread int a = 6; int main() { a = 5; }])
-$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
-ret=$?
-rm -f conftest.o conftest
-if test $ret -eq 0 ; then
- AC_DEFINE([HAVE_TLS_BUILTIN], 1, [Have __thread().])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
+CC_CHECK_TLS
+
+AC_CACHE_CHECK([whether $CC knows _Bool],
+ pulseaudio_cv__Bool,
+ [AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([], [[_Bool b;]]),
+ [pulseaudio_cv__Bool=yes],
+ [pulseaudio_cv__Bool=no])
+ ])
-AC_MSG_CHECKING([whether $CC knows _Bool])
-AC_LANG_CONFTEST([int main() { _Bool b; }])
-$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
-ret=$?
-rm -f conftest.o conftest
-if test $ret -eq 0 ; then
+AS_IF([test "$pulseaudio_cv__Bool" = "yes"], [
AC_DEFINE([HAVE_STD_BOOL], 1, [Have _Bool.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
+ ])
#### libtool stuff ####
@@ -327,6 +296,7 @@ AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
AC_CHECK_HEADERS([sys/ioctl.h])
AC_CHECK_HEADERS([byteswap.h])
AC_CHECK_HEADERS([sys/syscall.h])
+AC_CHECK_HEADERS([sys/eventfd.h])
#### Typdefs, structures, etc. ####
@@ -339,6 +309,7 @@ AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
AC_TYPE_OFF_T
AC_TYPE_SIGNAL
AC_TYPE_UID_T
+AC_CHECK_DECLS(environ)
AC_CHECK_DEFINE([SIGXCPU], [signal.h], [
HAVE_SIGXCPU=1
@@ -376,6 +347,9 @@ AC_SEARCH_LIBS([connect], [socket])
# build, disabling its ability to make dlls.
AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])])
+AC_CHECK_LIB(gdbm, gdbm_open)
+AC_CHECK_HEADERS(gdbm.h, [], [AC_MSG_ERROR([gdbm.h not found])])
+
#### Check for functions ####
# ISO
@@ -409,20 +383,31 @@ AC_CHECK_FUNCS([lstat])
AC_CHECK_FUNCS([setresuid setresgid setreuid setregid seteuid setegid ppoll strsignal sig2str strtof_l])
-AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT])
-AC_LANG_CONFTEST([AC_LANG_SOURCE([[
-#include <pthread.h>
-int main() { int i = PTHREAD_PRIO_INHERIT; }]])])
-$PTHREAD_CC conftest.c $PTHREAD_CFLAGS $CFLAGS $PTHREAD_LIBS -o conftest > /dev/null 2> /dev/null
-ret=$?
-rm -f conftest.o conftest
-
-if test $ret -eq 0 ; then
+AC_FUNC_ALLOCA
+
+AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+ pulseaudio_cv_PTHREAD_PRIO_INHERIT,
+ [save_CC=$CC; CC=$PTHREAD_CC
+ save_CFLAGS=$CFLAGS; CFLAGS=$PTHREAD_CFLAGS
+ save_LIBS=$LIBS; LIBS=$PTHREAD_LIBS
+ AC_LINK_IFELSE(
+ AC_LANG_PROGRAM(
+ [[
+ #include <pthread.h>
+ ]],
+ [[int i = PTHREAD_PRIO_INHERIT;]]),
+ [pulseaudio_cv_PTHREAD_PRIO_INHERIT=yes],
+ [pulseaudio_cv_PTHREAD_PRIO_INHERIT=no])
+ CC=$save_CC
+ CFLAGS=$save_CFLAGS
+ LIBS=$save_LIBS
+ ])
+
+AS_IF([test "$pulseaudio_cv_PTHREAD_PRIO_INHERIT" = "yes"], [
AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
+ ])
+
+AC_DEFINE_UNQUOTED(PA_CFLAGS,"$CFLAGS", [The CFLAGS used during compilation])
#### Large File-Support (LFS) ####
@@ -435,6 +420,15 @@ AC_CHECK_FUNCS([open64])
AM_ICONV
+IT_PROG_INTLTOOL([0.35.0])
+GETTEXT_PACKAGE=pulseaudio
+AC_SUBST([GETTEXT_PACKAGE])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
+AM_GLIB_GNU_GETTEXT
+
+pulselocaledir='${prefix}/${DATADIRNAME}/locale'
+AC_SUBST(pulselocaledir)
+
###################################
# External libraries #
###################################
@@ -461,7 +455,7 @@ CAP_LIBS=''
AC_ARG_WITH(
[caps],
- AC_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.]))
+ AS_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.]))
if test "x${with_caps}" != "xno"; then
AC_SEARCH_LIBS([cap_init], [cap], [], [
@@ -474,6 +468,10 @@ if test "x${with_caps}" != "xno"; then
fi])
fi
+#### Valgrind (optional) ####
+
+AC_CHECK_HEADERS([valgrind/memcheck.h])
+
#### pkg-config ####
# Check for pkg-config manually first, as if its not installed the
@@ -492,6 +490,10 @@ PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
AC_SUBST(LIBSNDFILE_CFLAGS)
AC_SUBST(LIBSNDFILE_LIBS)
+PKG_CHECK_MODULES(LIBSPEEX, [ speexdsp >= 1.2 ])
+AC_SUBST(LIBSPEEX_CFLAGS)
+AC_SUBST(LIBSPEEX_LIBS)
+
#### atomic-ops ###
AC_MSG_CHECKING([whether we need libatomic_ops])
@@ -512,7 +514,7 @@ fi
#### Libsamplerate support (optional) ####
AC_ARG_ENABLE([samplerate],
- AC_HELP_STRING([--disable-samplerate], [Disable optional libsamplerate support]),
+ AS_HELP_STRING([--disable-samplerate],[Disable optional libsamplerate support]),
[
case "${enableval}" in
yes) samplerate=yes ;;
@@ -547,7 +549,7 @@ AM_CONDITIONAL([HAVE_LIBSAMPLERATE], [test "x$HAVE_LIBSAMPLERATE" = x1])
#### OSS support (optional) ####
AC_ARG_ENABLE([oss],
- AC_HELP_STRING([--disable-oss], [Disable optional OSS support]),
+ AS_HELP_STRING([--disable-oss],[Disable optional OSS support]),
[
case "${enableval}" in
yes) oss=yes ;;
@@ -580,7 +582,7 @@ AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1])
#### ALSA support (optional) ####
AC_ARG_ENABLE([alsa],
- AC_HELP_STRING([--disable-alsa], [Disable optional ALSA support]),
+ AS_HELP_STRING([--disable-alsa],[Disable optional ALSA support]),
[
case "${enableval}" in
yes) alsa=yes ;;
@@ -591,7 +593,7 @@ AC_ARG_ENABLE([alsa],
[alsa=auto])
if test "x${alsa}" != xno ; then
- PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ],
+ PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.17 ],
[
HAVE_ALSA=1
AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])
@@ -599,7 +601,7 @@ if test "x${alsa}" != xno ; then
[
HAVE_ALSA=0
if test "x$alsa" = xyes ; then
- AC_MSG_ERROR([*** ALSA support not found])
+ AC_MSG_ERROR([*** Needed alsa >= 1.0.17 support not found])
fi
])
else
@@ -614,7 +616,7 @@ AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1])
#### Solaris audio support (optional) ####
AC_ARG_ENABLE([solaris],
- AC_HELP_STRING([--disable-solaris], [Disable optional Solaris audio support]),
+ AS_HELP_STRING([--disable-solaris],[Disable optional Solaris audio support]),
[
case "${enableval}" in
yes) solaris=yes ;;
@@ -646,7 +648,7 @@ AM_CONDITIONAL([HAVE_SOLARIS], [test "x$HAVE_SOLARIS" = x1])
#### GLib 2 support (optional) ####
AC_ARG_ENABLE([glib2],
- AC_HELP_STRING([--disable-glib2], [Disable optional GLib 2 support]),
+ AS_HELP_STRING([--disable-glib2],[Disable optional GLib 2 support]),
[
case "${enableval}" in
yes) glib2=yes ;;
@@ -677,7 +679,7 @@ AM_CONDITIONAL([HAVE_GLIB20], [test "x$HAVE_GLIB20" = x1])
#### GConf support (optional) ####
AC_ARG_ENABLE([gconf],
- AC_HELP_STRING([--disable-gconf], [Disable optional GConf support]),
+ AS_HELP_STRING([--disable-gconf],[Disable optional GConf support]),
[
case "${enableval}" in
yes) gconf=yes ;;
@@ -685,7 +687,7 @@ AC_ARG_ENABLE([gconf],
*) AC_MSG_ERROR(bad value ${enableval} for --disable-gconf) ;;
esac
],
- [glib=auto])
+ [gconf=auto])
if test "x${gconf}" != xno ; then
PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 ],
@@ -708,7 +710,7 @@ AM_CONDITIONAL([HAVE_GCONF], [test "x$HAVE_GCONF" = x1])
#### Avahi support (optional) ####
AC_ARG_ENABLE([avahi],
- AC_HELP_STRING([--disable-avahi], [Disable optional Avahi support]),
+ AS_HELP_STRING([--disable-avahi],[Disable optional Avahi support]),
[
case "${enableval}" in
yes) avahi=yes ;;
@@ -745,7 +747,7 @@ AC_SUBST(LIBOIL_LIBS)
### JACK (optional) ####
AC_ARG_ENABLE([jack],
- AC_HELP_STRING([--disable-jack], [Disable optional JACK support]),
+ AS_HELP_STRING([--disable-jack],[Disable optional JACK support]),
[
case "${enableval}" in
yes) jack=yes ;;
@@ -776,7 +778,7 @@ AM_CONDITIONAL([HAVE_JACK], [test "x$HAVE_JACK" = x1])
#### Async DNS support (optional) ####
AC_ARG_ENABLE([asyncns],
- AC_HELP_STRING([--disable-asyncns], [Disable optional Async DNS support]),
+ AS_HELP_STRING([--disable-asyncns],[Disable optional Async DNS support]),
[
case "${enableval}" in
yes) asyncns=yes ;;
@@ -811,7 +813,7 @@ fi
#### TCP wrappers (optional) ####
AC_ARG_ENABLE([tcpwrap],
- AC_HELP_STRING([--disable-tcpwrap], [Disable optional TCP wrappers support]),
+ AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
[
case "${enableval}" in
yes) tcpwrap=yes ;;
@@ -835,7 +837,7 @@ AC_SUBST(LIBWRAP_LIBS)
#### LIRC support (optional) ####
AC_ARG_ENABLE([lirc],
- AC_HELP_STRING([--disable-lirc], [Disable optional LIRC support]),
+ AS_HELP_STRING([--disable-lirc],[Disable optional LIRC support]),
[
case "${enableval}" in
yes) lirc=yes ;;
@@ -861,7 +863,7 @@ AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1])
#### HAL support (optional) ####
AC_ARG_ENABLE([hal],
- AC_HELP_STRING([--disable-hal], [Disable optional HAL support]),
+ AS_HELP_STRING([--disable-hal],[Disable optional HAL support]),
[
case "${enableval}" in
yes) hal=yes ;;
@@ -891,7 +893,7 @@ AM_CONDITIONAL([HAVE_HAL], [test "x$HAVE_HAL" = x1])
#### BlueZ support (optional) ####
AC_ARG_ENABLE([bluez],
- AC_HELP_STRING([--disable-bluez], [Disable optional BlueZ support]),
+ AS_HELP_STRING([--disable-bluez],[Disable optional BlueZ support]),
[
case "${enableval}" in
yes) bluez=yes ;;
@@ -921,7 +923,7 @@ AM_CONDITIONAL([HAVE_BLUEZ], [test "x$HAVE_BLUEZ" = x1])
#### D-Bus support (optional) ####
AC_ARG_ENABLE([dbus],
- AC_HELP_STRING([--disable-dbus], [Disable optional D-Bus support]),
+ AS_HELP_STRING([--disable-dbus],[Disable optional D-Bus support]),
[
case "${enableval}" in
yes) dbus=yes ;;
@@ -964,7 +966,7 @@ AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1])
#### PolicyKit support (optional) ####
AC_ARG_ENABLE([polkit],
- AC_HELP_STRING([--disable-polkit], [Disable optional PolicyKit support]),
+ AS_HELP_STRING([--disable-polkit],[Disable optional PolicyKit support]),
[
case "${enableval}" in
yes) polkit=yes ;;
@@ -1007,32 +1009,6 @@ AC_ARG_ENABLE(manpages,
*) AC_MSG_ERROR([bad value ${enableval} for --disable-manpages]) ;;
esac],[manpages=yes])
-if test x$manpages = xyes ; then
- #
- # XMLTOMAN manpage generation
- #
- AC_ARG_ENABLE(xmltoman,
- AS_HELP_STRING([--disable-xmltoman],[Enable rebuilding of man pages with xmltoman]),
- [case "${enableval}" in
- yes) xmltoman=yes ;;
- no) xmltoman=no ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --disable-xmltoman]) ;;
- esac],[xmltoman=yes])
-
- if test x$xmltoman = xyes ; then
- AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
- fi
-
- if test x$have_xmltoman = xno -o x$xmltoman = xno; then
- if ! test -e man/pulseaudio.1 ; then
- AC_MSG_ERROR([*** xmltoman was not found or was disabled, it is required to build the manpages as they have not been pre-built, install xmltoman, pass --disable-manpages or dont pass --disable-xmltoman])
- exit 1
- fi
- AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
- xmltoman=no
- fi
-fi
-AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
AM_CONDITIONAL([BUILD_MANPAGES], [test "x$manpages" = xyes])
#### PulseAudio system group & user #####
@@ -1075,7 +1051,7 @@ AC_DEFINE_UNQUOTED(PA_ACCESS_GROUP,"$PA_ACCESS_GROUP", [Access group])
AC_ARG_ENABLE(
per_user_esound_socket,
- AS_HELP_STRING([--disable-per-user-esound-socket], [Use per-user esound socket directory, like /tmp/.esd-UID/socket.]),
+ AS_HELP_STRING([--disable-per-user-esound-socket], [Use global esound socket directory /tmp/.esd/socket.]),
[
case "${enableval}" in
yes) per_user_esound_socket=1 ;;
@@ -1092,6 +1068,10 @@ fi
#### PulseAudio system runtime dir ####
PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
AC_SUBST(PA_SYSTEM_RUNTIME_PATH)
+PA_SYSTEM_CONFIG_PATH="${localstatedir}/lib/pulse"
+AC_SUBST(PA_SYSTEM_CONFIG_PATH)
+PA_SYSTEM_STATE_PATH="${localstatedir}/lib/pulse"
+AC_SUBST(PA_SYSTEM_STATE_PATH)
###################################
# Output #
@@ -1099,13 +1079,13 @@ AC_SUBST(PA_SYSTEM_RUNTIME_PATH)
AC_ARG_ENABLE(
[static-bins],
- AC_HELP_STRING([--enable-static-bins],[Statically link executables.]),
+ AS_HELP_STRING([--enable-static-bins],[Statically link executables.]),
[STATIC_BINS=1], [STATIC_BINS=0])
AM_CONDITIONAL([STATIC_BINS], [test "x$STATIC_BINS" = "x1"])
AC_ARG_WITH(
[preopen-mods],
- AC_HELP_STRING([--with-preopen-mods],[Modules to preopen in daemon (default: all).]),
+ AS_HELP_STRING([--with-preopen-mods],[Modules to preopen in daemon (default: all).]),
[PREOPEN_MODS=$withval], [PREOPEN_MODS="all"])
AM_CONDITIONAL([PREOPEN_MODS], [test "x$PREOPEN_MODS" != "xall"])
if test "x$PREOPEN_MODS" != "xall" ; then
@@ -1119,14 +1099,14 @@ fi
AC_ARG_WITH(
[module-dir],
- AC_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules/]),
+ AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules/]),
[modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules/"])
AC_SUBST(modlibexecdir)
AC_ARG_ENABLE(
[force-preopen],
- AC_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),
+ AS_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),
[FORCE_PREOPEN=1], [FORCE_PREOPEN=0])
AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "x1"])
@@ -1141,6 +1121,7 @@ libpulse-mainloop-glib.pc
doxygen/Makefile
doxygen/doxygen.conf
src/pulse/version.h
+po/Makefile.in
])
AC_OUTPUT
@@ -1232,6 +1213,8 @@ echo "
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
System Runtime Path: ${PA_SYSTEM_RUNTIME_PATH}
+ System State Path: ${PA_SYSTEM_STATE_PATH}
+ System Config Path: ${PA_SYSTEM_CONFIG_PATH}
Compiler: ${CC}
CFLAGS: ${CFLAGS}
Have X11: ${ENABLE_X11}
diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am
index 169f588..60b0060 100644
--- a/doxygen/Makefile.am
+++ b/doxygen/Makefile.am
@@ -1,5 +1,3 @@
-# $Id: Makefile.am 1033 2006-06-19 21:53:48Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
diff --git a/doxygen/Makefile.in b/doxygen/Makefile.in
index 23a79b7..e343455 100644
--- a/doxygen/Makefile.in
+++ b/doxygen/Makefile.in
@@ -14,8 +14,6 @@
@SET_MAKE@
-# $Id: Makefile.am 1033 2006-06-19 21:53:48Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
@@ -54,7 +52,13 @@ subdir = doxygen
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/doxygen.conf.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_libwrap.m4 \
+ $(top_srcdir)/m4/acx_lirc.m4 $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/attributes.m4 \
+ $(top_srcdir)/m4/check_define.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/tls.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@@ -65,6 +69,8 @@ SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
@@ -78,6 +84,8 @@ AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
BLUEZ_LIBS = @BLUEZ_LIBS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -88,11 +96,13 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -103,8 +113,11 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB20_CFLAGS = @GLIB20_CFLAGS@
GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAL_CFLAGS = @HAL_CFLAGS@
HAL_LIBS = @HAL_LIBS@
@@ -127,6 +140,31 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
JACK_CFLAGS = @JACK_CFLAGS@
JACK_LIBS = @JACK_LIBS@
LDFLAGS = @LDFLAGS@
@@ -147,6 +185,8 @@ LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@
LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@
LIBSNDFILE_CFLAGS = @LIBSNDFILE_CFLAGS@
LIBSNDFILE_LIBS = @LIBSNDFILE_LIBS@
+LIBSPEEX_CFLAGS = @LIBSPEEX_CFLAGS@
+LIBSPEEX_LIBS = @LIBSPEEX_LIBS@
LIBTOOL = @LIBTOOL@
LIBWRAP_LIBS = @LIBWRAP_LIBS@
LIRC_CFLAGS = @LIRC_CFLAGS@
@@ -158,6 +198,11 @@ LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -173,12 +218,18 @@ PA_API_VERSION = @PA_API_VERSION@
PA_MAJORMINOR = @PA_MAJORMINOR@
PA_PROTOCOL_VERSION = @PA_PROTOCOL_VERSION@
PA_REALTIME_GROUP = @PA_REALTIME_GROUP@
+PA_SYSTEM_CONFIG_PATH = @PA_SYSTEM_CONFIG_PATH@
PA_SYSTEM_GROUP = @PA_SYSTEM_GROUP@
PA_SYSTEM_RUNTIME_PATH = @PA_SYSTEM_RUNTIME_PATH@
+PA_SYSTEM_STATE_PATH = @PA_SYSTEM_STATE_PATH@
PA_SYSTEM_USER = @PA_SYSTEM_USER@
PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
POLKIT_CFLAGS = @POLKIT_CFLAGS@
POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PREOPEN_MODS = @PREOPEN_MODS@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
@@ -188,7 +239,9 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
@@ -220,7 +273,6 @@ docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_pkg_config = @have_pkg_config@
-have_xmltoman = @have_xmltoman@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -243,12 +295,14 @@ policydir = @policydir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pulselocaledir = @pulselocaledir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
all: all-am
diff --git a/doxygen/doxygen.conf.in b/doxygen/doxygen.conf.in
index 81923a9..6c2021c 100644
--- a/doxygen/doxygen.conf.in
+++ b/doxygen/doxygen.conf.in
@@ -14,191 +14,191 @@
# Project related configuration options
#---------------------------------------------------------------------------
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = PulseAudio
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = @PACKAGE_VERSION@
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY =
+OUTPUT_DIRECTORY =
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of source
-# files, where putting all generated files in the same directory would otherwise
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of source
+# files, where putting all generated files in the same directory would otherwise
# cause performance problems for the file system.
CREATE_SUBDIRS = NO
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
# Swedish, and Ukrainian.
OUTPUT_LANGUAGE = English
-# This tag can be used to specify the encoding used in the generated output.
-# The encoding is not always determined by the language that is chosen,
-# but also whether or not the output is meant for Windows or non-Windows users.
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
-# forces the Windows encoding (this is the default for the Windows binary),
-# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
# all platforms other than Windows).
USE_WINDOWS_ENCODING = NO
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
# Set to NO to disable this.
BRIEF_MEMBER_DESC = YES
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
REPEAT_BRIEF = YES
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is used
-# as the annotated text. Otherwise, the brief description is used as-is. If left
-# blank, the following values are used ("$name" is automatically replaced with the
-# name of the entity): "The $name class" "The $name widget" "The $name file"
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is used
+# as the annotated text. Otherwise, the brief description is used as-is. If left
+# blank, the following values are used ("$name" is automatically replaced with the
+# name of the entity): "The $name class" "The $name widget" "The $name file"
# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
-ABBREVIATE_BRIEF =
+ABBREVIATE_BRIEF =
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
# description.
ALWAYS_DETAILED_SEC = NO
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
-# members of a class in the documentation of that class as if those members were
-# ordinary class members. Constructors, destructors and assignment operators of
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
# the base classes will not be shown.
INLINE_INHERITED_MEMB = NO
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
# to NO the shortest path that makes the file name unique will be used.
FULL_PATH_NAMES = NO
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
# path to strip.
-STRIP_FROM_PATH =
+STRIP_FROM_PATH =
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
# are normally passed to the compiler using the -I flag.
-STRIP_FROM_INC_PATH =
+STRIP_FROM_INC_PATH =
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like the Qt-style comments (thus requiring an
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
# explicit @brief command for a brief description.
JAVADOC_AUTOBRIEF = YES
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
# description. Set this tag to YES if you prefer the old behaviour instead.
MULTILINE_CPP_IS_BRIEF = NO
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
+# If set to NO, the detailed description appears after the member
# documentation.
DETAILS_AT_TOP = NO
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
# re-implements.
INHERIT_DOCS = YES
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
DISTRIBUTE_GROUP_DOC = NO
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
TAB_SIZE = 4
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
-ALIASES =
+ALIASES =
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
# of all members will be omitted, etc.
OPTIMIZE_OUTPUT_FOR_C = YES
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
-# only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
# will look different, etc.
OPTIMIZE_OUTPUT_JAVA = NO
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
# the \nosubgrouping command.
SUBGROUPING = YES
@@ -207,162 +207,162 @@ SUBGROUPING = YES
# Build related configuration options
#---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
EXTRACT_ALL = YES
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation.
EXTRACT_PRIVATE = NO
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
EXTRACT_STATIC = NO
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
# If set to NO only classes defined in header files are included.
EXTRACT_LOCAL_CLASSES = YES
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
# If set to NO (the default) only methods in the interface are included.
EXTRACT_LOCAL_METHODS = NO
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
# This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_MEMBERS = NO
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = NO
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
# documentation.
HIDE_FRIEND_COMPOUNDS = NO
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
# function's detailed documentation block.
HIDE_IN_BODY_DOCS = NO
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
INTERNAL_DOCS = NO
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
CASE_SENSE_NAMES = YES
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
# documentation. If set to YES the scope will be hidden.
HIDE_SCOPE_NAMES = NO
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
# of that file.
SHOW_INCLUDE_FILES = NO
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
INLINE_INFO = YES
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
# declaration order.
SORT_MEMBER_DOCS = YES
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
# declaration order.
SORT_BRIEF_DOCS = NO
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
+# Note: This option applies only to the class list, not to the
# alphabetical list.
SORT_BY_SCOPE_NAME = NO
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
GENERATE_TODOLIST = NO
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
# commands in the documentation.
GENERATE_TESTLIST = NO
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
# commands in the documentation.
GENERATE_BUGLIST = NO
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
# \deprecated commands in the documentation.
GENERATE_DEPRECATEDLIST= NO
-# The ENABLED_SECTIONS tag can be used to enable conditional
+# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
-ENABLED_SECTIONS =
+ENABLED_SECTIONS =
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
# command in the documentation regardless of this setting.
MAX_INITIALIZER_LINES = 30
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
# list will mention the files that were used to generate the documentation.
SHOW_USED_FILES = YES
@@ -371,133 +371,133 @@ SHOW_USED_FILES = YES
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-# The QUIET tag can be used to turn on/off the messages that are generated
+# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
QUIET = NO
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
# NO is used.
WARNINGS = YES
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
# automatically be disabled.
WARN_IF_UNDOCUMENTED = YES
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
# don't exist or using markup commands wrongly.
WARN_IF_DOC_ERROR = YES
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
# warning originated and the warning text.
WARN_FORMAT = "$file:$line: $text"
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
# to stderr.
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = ../src/pulse/context.h ../src/pulse/stream.h ../src/pulse/pulseaudio.h ../src/pulse/sample.h ../src/pulse/def.h ../src/pulse/subscribe.h ../src/pulse/introspect.h ../src/pulse/scache.h ../src/pulse/mainloop-api.h ../src/pulse/glib-mainloop.h ../src/pulse/mainloop.h ../src/pulse/mainloop-signal.h ../src/pulse/error.h ../src/pulse/operation.h ../src/pulse/simple.h ../src/pulse/version.h ../src/pulse/volume.h ../src/pulse/channelmap.h ../src/pulse/thread-mainloop.h ../src/pulse/xmalloc.h ../src/pulse/utf8.h ../src/pulse/util.h ../src/pulse/timeval.h ../src/pulse/browser.h
+INPUT = ../src/pulse/context.h ../src/pulse/stream.h ../src/pulse/pulseaudio.h ../src/pulse/sample.h ../src/pulse/def.h ../src/pulse/subscribe.h ../src/pulse/introspect.h ../src/pulse/scache.h ../src/pulse/mainloop-api.h ../src/pulse/glib-mainloop.h ../src/pulse/mainloop.h ../src/pulse/mainloop-signal.h ../src/pulse/error.h ../src/pulse/operation.h ../src/pulse/simple.h ../src/pulse/version.h ../src/pulse/volume.h ../src/pulse/channelmap.h ../src/pulse/thread-mainloop.h ../src/pulse/xmalloc.h ../src/pulse/utf8.h ../src/pulse/util.h ../src/pulse/timeval.h ../src/pulse/proplist.h ../src/pulse/gccmacro.h ../src/pulse/ext-stream-restore.h
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
-FILE_PATTERNS =
+FILE_PATTERNS =
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
RECURSIVE = NO
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
-EXCLUDE =
+EXCLUDE =
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
# that are symbolic links (a Unix filesystem feature) are excluded from the input.
EXCLUDE_SYMLINKS = NO
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories.
-EXCLUDE_PATTERNS =
+EXCLUDE_PATTERNS =
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
# the \include command).
EXAMPLE_PATH = ../src/utils ../src/tests
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
-EXAMPLE_PATTERNS =
+EXAMPLE_PATTERNS =
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
# Possible values are YES and NO. If left blank NO is used.
EXAMPLE_RECURSIVE = NO
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
# the \image command).
-IMAGE_PATH =
+IMAGE_PATH =
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
# ignored.
-INPUT_FILTER =
+INPUT_FILTER =
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
# is applied to all files.
-FILTER_PATTERNS =
+FILTER_PATTERNS =
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
FILTER_SOURCE_FILES = NO
@@ -506,38 +506,38 @@ FILTER_SOURCE_FILES = NO
# configuration options related to source browsing
#---------------------------------------------------------------------------
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
# VERBATIM_HEADERS is set to NO.
SOURCE_BROWSER = NO
-# Setting the INLINE_SOURCES tag to YES will include the body
+# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.
INLINE_SOURCES = NO
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
STRIP_CODE_COMMENTS = YES
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
# functions referencing it will be listed.
REFERENCED_BY_RELATION = YES
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
# called/used by that function will be listed.
REFERENCES_RELATION = YES
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES
@@ -546,21 +546,21 @@ VERBATIM_HEADERS = YES
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
# contains a lot of classes, structs, unions or interfaces.
ALPHABETICAL_INDEX = YES
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])
COLS_IN_ALPHA_INDEX = 5
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
# should be ignored while generating the index headers.
IGNORE_PREFIX = pa_ PA_
@@ -569,110 +569,110 @@ IGNORE_PREFIX = pa_ PA_
# configuration options related to the HTML output
#---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# generate HTML output.
GENERATE_HTML = YES
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
HTML_OUTPUT = html
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
# doxygen will generate files with .html extension.
HTML_FILE_EXTENSION = .html
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
# standard header.
-HTML_HEADER =
+HTML_HEADER =
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
# standard footer.
-HTML_FOOTER =
+HTML_FOOTER =
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
-HTML_STYLESHEET =
+HTML_STYLESHEET =
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
HTML_ALIGN_MEMBERS = YES
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
# of the generated HTML documentation.
GENERATE_HTMLHELP = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
# written to the html output directory.
-CHM_FILE =
+CHM_FILE =
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
# the HTML help compiler on the generated index.hhp.
-HHC_LOCATION =
+HHC_LOCATION =
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
# it should be included in the master .chm file (NO).
GENERATE_CHI = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
# normal table of contents (NO) in the .chm file.
BINARY_TOC = NO
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
# to the contents of the HTML help documentation and to the tree view.
TOC_EXPAND = NO
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
DISABLE_INDEX = NO
-# This tag can be used to set the number of enum values (range [1..20])
+# This tag can be used to set the number of enum values (range [1..20])
# that doxygen will group on one line in the generated HTML documentation.
ENUM_VALUES_PER_LINE = 1
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
# probably better off using the HTML help feature.
GENERATE_TREEVIEW = YES
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
# is shown.
TREEVIEW_WIDTH = 250
@@ -681,74 +681,74 @@ TREEVIEW_WIDTH = 250
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
GENERATE_LATEX = NO
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `latex' will be used as the default path.
LATEX_OUTPUT = latex
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked. If left blank `latex' will be used as the default command name.
LATEX_CMD_NAME = latex
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
# default command name.
MAKEINDEX_CMD_NAME = makeindex
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_LATEX = NO
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
# executive. If left blank a4wide will be used.
PAPER_TYPE = a4wide
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output.
-EXTRA_PACKAGES =
+EXTRA_PACKAGES =
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
# standard header. Notice: only use this tag if you know what you are doing!
-LATEX_HEADER =
+LATEX_HEADER =
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
PDF_HYPERLINKS = NO
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.
USE_PDFLATEX = NO
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
# This option is also used when generating formulas in HTML.
LATEX_BATCHMODE = NO
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
# in the output.
LATEX_HIDE_INDICES = NO
@@ -757,68 +757,68 @@ LATEX_HIDE_INDICES = NO
# configuration options related to the RTF output
#---------------------------------------------------------------------------
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
# other RTF readers or editors.
GENERATE_RTF = NO
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `rtf' will be used as the default path.
RTF_OUTPUT = rtf
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_RTF = NO
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
# Note: wordpad (write) and others do not support links.
RTF_HYPERLINKS = NO
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
-# Set optional variables used in the generation of an rtf document.
+# Set optional variables used in the generation of an rtf document.
# Syntax is similar to doxygen's config file.
-RTF_EXTENSIONS_FILE =
+RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
GENERATE_MAN = NO
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `man' will be used as the default path.
MAN_OUTPUT = man
-# The MAN_EXTENSION tag determines the extension that is added to
+# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
MAN_EXTENSION = .3
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
# would be unable to find the correct page. The default is NO.
MAN_LINKS = NO
@@ -827,33 +827,33 @@ MAN_LINKS = NO
# configuration options related to the XML output
#---------------------------------------------------------------------------
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
# the code including all documentation.
GENERATE_XML = NO
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `xml' will be used as the default path.
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
# syntax of the XML files.
-XML_SCHEMA =
+XML_SCHEMA =
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
# syntax of the XML files.
-XML_DTD =
+XML_DTD =
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
# enabling this will significantly increase the size of the XML output.
XML_PROGRAMLISTING = YES
@@ -862,10 +862,10 @@ XML_PROGRAMLISTING = YES
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
# and incomplete at the moment.
GENERATE_AUTOGEN_DEF = NO
@@ -874,283 +874,282 @@ GENERATE_AUTOGEN_DEF = NO
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
# moment.
GENERATE_PERLMOD = NO
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
# to generate PDF and DVI output from the Perl module output.
PERLMOD_LATEX = NO
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
# and Perl will parse it just the same.
PERLMOD_PRETTY = YES
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
# Makefile don't overwrite each other's variables.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
# files.
ENABLE_PREPROCESSING = YES
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = YES
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
EXPAND_ONLY_PREDEF = YES
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
SEARCH_INCLUDES = YES
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
# the preprocessor.
-INCLUDE_PATH =
+INCLUDE_PATH =
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
# be used.
-INCLUDE_FILE_PATTERNS =
+INCLUDE_FILE_PATTERNS =
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
PREDEFINED = PA_C_DECL_BEGIN= PA_C_DECL_END=
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
#EXPAND_AS_DEFINED = PA_C_DECL_BEGIN, PA_C_DECL_END
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse the
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
# parser if not removed.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
# does not have to be run to correct the links.
# Note that each tag file must have a unique name
# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
+# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
-TAGFILES =
+TAGFILES =
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.
-GENERATE_TAGFILE =
+GENERATE_TAGFILE =
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
# will be listed.
ALLEXTERNALS = NO
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
# be listed.
EXTERNAL_GROUPS = YES
-# The PERL_PATH should be the absolute path and name of the perl script
+# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to the dot tool
#---------------------------------------------------------------------------
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
-# super classes. Setting the tag to NO turns the diagrams off. Note that this
-# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off. Note that this
+# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
# recommended to install and use dot, since it yields more powerful graphs.
CLASS_DIAGRAMS = YES
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
# or is not a class.
HIDE_UNDOC_RELATIONS = YES
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
HAVE_DOT = NO
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
CLASS_GRAPH = YES
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
# class references variables) of the class with other documented classes.
COLLABORATION_GRAPH = YES
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
UML_LOOK = NO
-# If set to YES, the inheritance and collaboration graphs will show the
+# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
TEMPLATE_RELATIONS = NO
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
# other documented files.
INCLUDE_GRAPH = YES
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
# indirectly include this file.
INCLUDED_BY_GRAPH = YES
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
# functions only using the \callgraph command.
CALL_GRAPH = NO
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
# will graphical hierarchy of all classes instead of a textual one.
GRAPHICAL_HIERARCHY = YES
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are png, jpg, or gif
# If left blank png will be used.
DOT_IMAGE_FORMAT = png
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found on the path.
-DOT_PATH =
+DOT_PATH =
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
# \dotfile command).
-DOTFILE_DIRS =
+DOTFILE_DIRS =
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
# large images.
MAX_DOT_GRAPH_WIDTH = 1024
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
# large images.
MAX_DOT_GRAPH_HEIGHT = 1024
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes that
-# lay further from the root node will be omitted. Note that setting this option to
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that a graph may be further truncated if the graph's image dimensions are
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes that
+# lay further from the root node will be omitted. Note that setting this option to
+# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that a graph may be further truncated if the graph's image dimensions are
+# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
# If 0 is used for the depth value (the default), the graph is not depth-constrained.
MAX_DOT_GRAPH_DEPTH = 0
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
# arrows in the dot generated graphs.
GENERATE_LEGEND = YES
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
# the various graphs.
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
+# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
-# The SEARCHENGINE tag specifies whether or not a search engine should be
+# The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
SEARCHENGINE = NO
SHOW_DIRECTORIES=NO
-
diff --git a/ltmain.sh b/ltmain.sh
index 8e5a930..2bcb848 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -2,7 +2,7 @@
# NOTE: Changing this file will not affect anything until you rerun configure.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007 Free Software Foundation, Inc.
+# 2007, 2008 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -43,8 +43,8 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.5.24
-TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
+VERSION=1.5.26
+TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -113,15 +113,21 @@ esac
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+lt_env=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
eval "if test \"\${$lt_var+set}\" = set; then
save_$lt_var=\$$lt_var
+ lt_env=\"$lt_var=\$$lt_var \$lt_env\"
$lt_var=C
export $lt_var
fi"
done
+if test -n "$lt_env"; then
+ lt_env="env $lt_env"
+fi
+
# Make sure IFS has a sensible default
lt_nl='
'
@@ -485,7 +491,7 @@ do
echo "\
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
-Copyright (C) 2007 Free Software Foundation, Inc.
+Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $?
@@ -788,6 +794,7 @@ if test -z "$show_help"; then
*.for) xform=for ;;
*.java) xform=java ;;
*.obj) xform=obj ;;
+ *.sx) xform=sx ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -956,7 +963,7 @@ EOF
$run $rm "$lobj" "$output_obj"
$show "$command"
- if $run eval "$command"; then :
+ if $run eval $lt_env "$command"; then :
else
test -n "$output_obj" && $run $rm $removelist
exit $EXIT_FAILURE
@@ -1028,7 +1035,7 @@ EOF
command="$command$suppress_output"
$run $rm "$obj" "$output_obj"
$show "$command"
- if $run eval "$command"; then :
+ if $run eval $lt_env "$command"; then :
else
$run $rm $removelist
exit $EXIT_FAILURE
@@ -1161,6 +1168,7 @@ EOF
thread_safe=no
vinfo=
vinfo_number=no
+ single_module="${wl}-single_module"
func_infer_tag $base_compile
@@ -1646,6 +1654,11 @@ EOF
continue
;;
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
-module)
module=yes
continue
@@ -2149,7 +2162,12 @@ EOF
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
- for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
lib="$searchdir/lib${name}${search_ext}"
@@ -2945,12 +2963,18 @@ EOF
# we do not want to link against static libs,
# but need to link against shared
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -n "$deplibrary_names" ; then
for tmp in $deplibrary_names ; do
depdepl=$tmp
done
- if test -f "$path/$depdepl" ; then
+ if test -f "$deplibdir/$depdepl" ; then
+ depdepl="$deplibdir/$depdepl"
+ elif test -f "$path/$depdepl" ; then
depdepl="$path/$depdepl"
+ else
+ # Can't find it, oh well...
+ depdepl=
fi
# do not add paths which are already there
case " $newlib_search_path " in
@@ -3098,9 +3122,10 @@ EOF
case $linkmode in
oldlib)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
- fi
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
+ esac
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
@@ -4237,9 +4262,10 @@ EOF
;;
obj)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
- fi
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
+ esac
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
@@ -6478,7 +6504,7 @@ relink_command=\"$relink_command\""
fi
# Restore saved environment variables
- for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
eval "if test \"\${save_$lt_var+set}\" = set; then
$lt_var=\$save_$lt_var; export $lt_var
diff --git a/m4/acx_libwrap.m4 b/m4/acx_libwrap.m4
new file mode 100644
index 0000000..e160214
--- /dev/null
+++ b/m4/acx_libwrap.m4
@@ -0,0 +1,19 @@
+AC_DEFUN([ACX_LIBWRAP], [
+LIBWRAP_LIBS=
+saved_LIBS="$LIBS"
+LIBS="$LIBS -lwrap"
+AC_MSG_CHECKING([for tcpwrap library and headers])
+AC_LINK_IFELSE(
+AC_LANG_PROGRAM(
+[#include <tcpd.h>
+#include <syslog.h>
+int allow_severity = LOG_INFO;
+int deny_severity = LOG_WARNING;],
+[struct request_info *req;
+return hosts_access (req);]),
+[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
+LIBWRAP_LIBS="-lwrap"
+AC_MSG_RESULT(yes)],
+[AC_MSG_RESULT(no)])
+LIBS="$saved_LIBS"
+])
diff --git a/m4/acx_lirc.m4 b/m4/acx_lirc.m4
new file mode 100644
index 0000000..d3f8ea7
--- /dev/null
+++ b/m4/acx_lirc.m4
@@ -0,0 +1,6 @@
+AC_DEFUN([ACX_LIRC], [
+LIRC_CFLAGS=
+LIRC_LIBS=
+AC_CHECK_HEADER(lirc/lirc_client.h,[AC_CHECK_LIB(lirc_client,lirc_init,[HAVE_LIRC=1
+LIRC_LIBS=-llirc_client],HAVE_LIRC=0)],HAVE_LIRC=0)
+])
diff --git a/acinclude.m4 b/m4/acx_pthread.m4
index 723eb87..cbd6bfa 100644
--- a/acinclude.m4
+++ b/m4/acx_pthread.m4
@@ -45,7 +45,7 @@ dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
dnl @version 2006-05-29
dnl @license GPLWithACException
-dnl
+dnl
dnl Checks for GCC shared/pthread inconsistency based on work by
dnl Marcin Owsiany <marcin@owsiany.pl>
@@ -230,7 +230,7 @@ if test "x$acx_pthread_ok" = xyes; then
# architectures and systems. The problem is that in certain
# configurations, when -shared is specified, GCC "forgets" to
# internally use various flags which are still necessary.
-
+
AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies])
check_inconsistencies=yes
case "${host_cpu}-${host_os}" in
@@ -270,13 +270,13 @@ if test "x$acx_pthread_ok" = xyes; then
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[ok=yes])
-
+
if test "x$ok" = xyes; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
-
+
#
# Linux gcc on some architectures such as mips/mipsel forgets
# about -lpthread
@@ -289,7 +289,7 @@ if test "x$acx_pthread_ok" = xyes; then
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[ok=yes])
-
+
if test "x$ok" = xyes; then
AC_MSG_RESULT([yes])
PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
@@ -308,7 +308,7 @@ if test "x$acx_pthread_ok" = xyes; then
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[ok=yes])
-
+
if test "x$ok" = xyes; then
AC_MSG_RESULT([yes])
PTHREAD_LIBS="-lc_r $PTHREAD_LIBS"
@@ -346,43 +346,3 @@ else
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD
-AC_DEFUN([AC_CHECK_DEFINE],[
-AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1_$2])dnl
-AC_CACHE_CHECK([for $1 in $2], ac_var,
-AC_TRY_COMPILE([#include <$2>],[
- #ifdef $1
- int ok;
- #else
- choke me
- #endif
-],AS_VAR_SET(ac_var, yes),AS_VAR_SET(ac_var, no)))
-AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
-AS_VAR_POPDEF([ac_var])dnl
-])
-
-AC_DEFUN([ACX_LIBWRAP], [
-LIBWRAP_LIBS=
-saved_LIBS="$LIBS"
-LIBS="$LIBS -lwrap"
-AC_MSG_CHECKING([for tcpwrap library and headers])
-AC_LINK_IFELSE(
-AC_LANG_PROGRAM(
-[#include <tcpd.h>
-#include <syslog.h>
-int allow_severity = LOG_INFO;
-int deny_severity = LOG_WARNING;],
-[struct request_info *req;
-return hosts_access (req);]),
-[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
-LIBWRAP_LIBS="-lwrap"
-AC_MSG_RESULT(yes)],
-[AC_MSG_RESULT(no)])
-LIBS="$saved_LIBS"
-])
-
-AC_DEFUN([ACX_LIRC], [
-LIRC_CFLAGS=
-LIRC_LIBS=
-AC_CHECK_HEADER(lirc/lirc_client.h,[AC_CHECK_LIB(lirc_client,lirc_init,[HAVE_LIRC=1
-LIRC_LIBS=-llirc_client],HAVE_LIRC=0)],HAVE_LIRC=0)
-])
diff --git a/m4/attributes.m4 b/m4/attributes.m4
new file mode 100644
index 0000000..9c4a0c8
--- /dev/null
+++ b/m4/attributes.m4
@@ -0,0 +1,258 @@
+dnl Macros to check the presence of generic (non-typed) symbols.
+dnl Copyright (c) 2006-2007 Diego Pettenò <flameeyes@gmail.com>
+dnl Copyright (c) 2006-2007 xine project
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+dnl
+dnl As a special exception, the copyright owners of the
+dnl macro gives unlimited permission to copy, distribute and modify the
+dnl configure scripts that are the output of Autoconf when processing the
+dnl Macro. You need not follow the terms of the GNU General Public
+dnl License when using or distributing such scripts, even though portions
+dnl of the text of the Macro appear in them. The GNU General Public
+dnl License (GPL) does govern all other use of the material that
+dnl constitutes the Autoconf Macro.
+dnl
+dnl This special exception to the GPL applies to versions of the
+dnl Autoconf Macro released by this project. When you make and
+dnl distribute a modified version of the Autoconf Macro, you may extend
+dnl this special exception to the GPL to apply to your modified version as
+dnl well.
+
+AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
+ AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
+ [ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ AC_COMPILE_IFELSE([int a;],
+ [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
+ [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
+ CFLAGS="$ac_save_CFLAGS"
+ ])
+
+ AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
+ [$2], [$3])
+])
+
+AC_DEFUN([CC_CHECK_CFLAGS], [
+ AC_CACHE_CHECK([if $CC supports $1 flag],
+ AS_TR_SH([cc_cv_cflags_$1]),
+ CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
+ )
+
+ AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
+ [$2], [$3])
+])
+
+AC_DEFUN([CC_CHECK_LDFLAGS], [
+ AC_CACHE_CHECK([if $CC supports $1 flag],
+ AS_TR_SH([cc_cv_ldflags_$1]),
+ [ac_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $1"
+ AC_LINK_IFELSE([int main() { return 1; }],
+ [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
+ [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
+ LDFLAGS="$ac_save_LDFLAGS"
+ ])
+
+ AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
+ [$2], [$3])
+])
+
+dnl Check for a -Werror flag or equivalent. -Werror is the GCC
+dnl and ICC flag that tells the compiler to treat all the warnings
+dnl as fatal. We usually need this option to make sure that some
+dnl constructs (like attributes) are not simply ignored.
+dnl
+dnl Other compilers don't support -Werror per se, but they support
+dnl an equivalent flag:
+dnl - Sun Studio compiler supports -errwarn=%all
+AC_DEFUN([CC_CHECK_WERROR], [
+ AC_CACHE_CHECK(
+ [for $CC way to treat warnings as errors],
+ [cc_cv_werror],
+ [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror],
+ [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])])
+ ])
+])
+
+AC_DEFUN([CC_CHECK_ATTRIBUTE], [
+ AC_REQUIRE([CC_CHECK_WERROR])
+ AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))],
+ AS_TR_SH([cc_cv_attribute_$1]),
+ [ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $cc_cv_werror"
+ AC_COMPILE_IFELSE([$3],
+ [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
+ [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
+ CFLAGS="$ac_save_CFLAGS"
+ ])
+
+ AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
+ [AC_DEFINE(
+ AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
+ [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]
+ )
+ $4],
+ [$5])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
+ CC_CHECK_ATTRIBUTE(
+ [constructor],,
+ [void __attribute__((constructor)) ctor() { int a; }],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
+ CC_CHECK_ATTRIBUTE(
+ [format], [format(printf, n, n)],
+ [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
+ CC_CHECK_ATTRIBUTE(
+ [format_arg], [format_arg(printf)],
+ [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
+ CC_CHECK_ATTRIBUTE(
+ [visibility_$1], [visibility("$1")],
+ [void __attribute__((visibility("$1"))) $1_function() { }],
+ [$2], [$3])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
+ CC_CHECK_ATTRIBUTE(
+ [nonnull], [nonnull()],
+ [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
+ CC_CHECK_ATTRIBUTE(
+ [unused], ,
+ [void some_function(void *foo, __attribute__((unused)) void *bar);],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
+ CC_CHECK_ATTRIBUTE(
+ [sentinel], ,
+ [void some_function(void *foo, ...) __attribute__((sentinel));],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
+ CC_CHECK_ATTRIBUTE(
+ [deprecated], ,
+ [void some_function(void *foo, ...) __attribute__((deprecated));],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
+ CC_CHECK_ATTRIBUTE(
+ [alias], [weak, alias],
+ [void other_function(void *foo) { }
+ void some_function(void *foo) __attribute__((weak, alias("other_function")));],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
+ CC_CHECK_ATTRIBUTE(
+ [malloc], ,
+ [void * __attribute__((malloc)) my_alloc(int n);],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_PACKED], [
+ CC_CHECK_ATTRIBUTE(
+ [packed], ,
+ [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_CONST], [
+ CC_CHECK_ATTRIBUTE(
+ [const], ,
+ [int __attribute__((const)) twopow(int n) { return 1 << n; } ],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_FLAG_VISIBILITY], [
+ AC_REQUIRE([CC_CHECK_WERROR])
+ AC_CACHE_CHECK([if $CC supports -fvisibility=hidden],
+ [cc_cv_flag_visibility],
+ [cc_flag_visibility_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $cc_cv_werror"
+ CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden],
+ cc_cv_flag_visibility='yes',
+ cc_cv_flag_visibility='no')
+ CFLAGS="$cc_flag_visibility_save_CFLAGS"])
+
+ AS_IF([test "x$cc_cv_flag_visibility" = "xyes"],
+ [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
+ [Define this if the compiler supports the -fvisibility flag])
+ $1],
+ [$2])
+])
+
+AC_DEFUN([CC_FUNC_EXPECT], [
+ AC_REQUIRE([CC_CHECK_WERROR])
+ AC_CACHE_CHECK([if compiler has __builtin_expect function],
+ [cc_cv_func_expect],
+ [ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $cc_cv_werror"
+ AC_COMPILE_IFELSE(
+ [int some_function() {
+ int a = 3;
+ return (int)__builtin_expect(a, 3);
+ }],
+ [cc_cv_func_expect=yes],
+ [cc_cv_func_expect=no])
+ CFLAGS="$ac_save_CFLAGS"
+ ])
+
+ AS_IF([test "x$cc_cv_func_expect" = "xyes"],
+ [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
+ [Define this if the compiler supports __builtin_expect() function])
+ $1],
+ [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
+ AC_REQUIRE([CC_CHECK_WERROR])
+ AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported],
+ [cc_cv_attribute_aligned],
+ [ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $cc_cv_werror"
+ for cc_attribute_align_try in 64 32 16 8 4 2; do
+ AC_COMPILE_IFELSE([
+ int main() {
+ static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
+ return c;
+ }], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
+ done
+ CFLAGS="$ac_save_CFLAGS"
+ ])
+
+ if test "x$cc_cv_attribute_aligned" != "x"; then
+ AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
+ [Define the highest alignment supported])
+ fi
+])
diff --git a/m4/check_define.m4 b/m4/check_define.m4
new file mode 100644
index 0000000..43edc78
--- /dev/null
+++ b/m4/check_define.m4
@@ -0,0 +1,13 @@
+AC_DEFUN([AC_CHECK_DEFINE],[
+AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1_$2])dnl
+AC_CACHE_CHECK([for $1 in $2], ac_var,
+AC_TRY_COMPILE([#include <$2>],[
+ #ifdef $1
+ int ok;
+ #else
+ choke me
+ #endif
+],AS_VAR_SET(ac_var, yes),AS_VAR_SET(ac_var, no)))
+AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
+AS_VAR_POPDEF([ac_var])dnl
+])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644
index 0000000..66bc76f
--- /dev/null
+++ b/m4/iconv.m4
@@ -0,0 +1,180 @@
+# iconv.m4 serial AM6 (gettext-0.17)
+dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
+ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1,
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff --git a/m4/intltool.m4 b/m4/intltool.m4
new file mode 100644
index 0000000..8e3e104
--- /dev/null
+++ b/m4/intltool.m4
@@ -0,0 +1,197 @@
+## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
+## Copyright (C) 2001 Eazel, Inc.
+## Author: Maciej Stachowiak <mjs@noisehavoc.org>
+## Kenneth Christiansen <kenneth@gnu.org>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+##
+## As a special exception to the GNU General Public License, if you
+## distribute this file as part of a program that contains a
+## configuration script generated by Autoconf, you may include it under
+## the same distribution terms that you use for the rest of that program.
+
+dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
+# serial 40 IT_PROG_INTLTOOL
+AC_DEFUN([IT_PROG_INTLTOOL], [
+AC_PREREQ([2.50])dnl
+AC_REQUIRE([AM_NLS])dnl
+
+case "$am__api_version" in
+ 1.[01234])
+ AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
+ ;;
+ *)
+ ;;
+esac
+
+if test -n "$1"; then
+ AC_MSG_CHECKING([for intltool >= $1])
+
+ INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+ INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+ [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+ ]
+ AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
+ test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+ AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
+fi
+
+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+ AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
+fi
+
+ INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
+ INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
+ INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+
+AC_SUBST(INTLTOOL_DESKTOP_RULE)
+AC_SUBST(INTLTOOL_DIRECTORY_RULE)
+AC_SUBST(INTLTOOL_KEYS_RULE)
+AC_SUBST(INTLTOOL_PROP_RULE)
+AC_SUBST(INTLTOOL_OAF_RULE)
+AC_SUBST(INTLTOOL_PONG_RULE)
+AC_SUBST(INTLTOOL_SERVER_RULE)
+AC_SUBST(INTLTOOL_SHEET_RULE)
+AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
+AC_SUBST(INTLTOOL_UI_RULE)
+AC_SUBST(INTLTOOL_XAM_RULE)
+AC_SUBST(INTLTOOL_KBD_RULE)
+AC_SUBST(INTLTOOL_XML_RULE)
+AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
+AC_SUBST(INTLTOOL_CAVES_RULE)
+AC_SUBST(INTLTOOL_SCHEMAS_RULE)
+AC_SUBST(INTLTOOL_THEME_RULE)
+AC_SUBST(INTLTOOL_SERVICE_RULE)
+AC_SUBST(INTLTOOL_POLICY_RULE)
+
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+
+AC_PATH_PROG(INTLTOOL_PERL, [perl])
+if test -z "$INTLTOOL_PERL"; then
+ AC_MSG_ERROR([perl not found; required for intltool])
+fi
+if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
+ AC_MSG_ERROR([perl 5.x required for intltool])
+fi
+if test "x$2" != "xno-xml"; then
+ AC_MSG_CHECKING([for XML::Parser])
+ if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+ fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+AC_SUBST(ALL_LINGUAS)
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr]])],
+ [DATADIRNAME=share],
+ [case $host in
+ *-*-solaris*)
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
+ dnl GNU format message catalog is always supported,
+ dnl since both are added to the libc all together.
+ dnl Hence, we'd like to go with DATADIRNAME=share
+ dnl in this case.
+ AC_CHECK_FUNC(bind_textdomain_codeset,
+ [DATADIRNAME=share], [DATADIRNAME=lib])
+ ;;
+ *)
+ [DATADIRNAME=lib]
+ ;;
+ esac])
+fi
+AC_SUBST(DATADIRNAME)
+
+IT_PO_SUBDIR([po])
+
+])
+
+
+# IT_PO_SUBDIR(DIRNAME)
+# ---------------------
+# All po subdirs have to be declared with this macro; the subdir "po" is
+# declared by IT_PROG_INTLTOOL.
+#
+AC_DEFUN([IT_PO_SUBDIR],
+[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
+dnl
+dnl The following CONFIG_COMMANDS should be exetuted at the very end
+dnl of config.status.
+AC_CONFIG_COMMANDS_PRE([
+ AC_CONFIG_COMMANDS([$1/stamp-it], [
+ rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
+ >"$1/stamp-it.tmp"
+ [sed '/^#/d
+ s/^[[].*] *//
+ /^[ ]*$/d
+ '"s|^| $ac_top_srcdir/|" \
+ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
+ ]
+ [sed '/^POTFILES =/,/[^\\]$/ {
+ /^POTFILES =/!d
+ r $1/POTFILES
+ }
+ ' "$1/Makefile.in" >"$1/Makefile"]
+ rm -f "$1/Makefile.tmp"
+ mv "$1/stamp-it.tmp" "$1/stamp-it"
+ ])
+])dnl
+])
+
+# deprecated macros
+AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
+# A hint is needed for aclocal from Automake <= 1.9.4:
+# AC_DEFUN([AC_PROG_INTLTOOL], ...)
+
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644
index 0000000..96c4e2c
--- /dev/null
+++ b/m4/lib-ld.m4
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644
index 0000000..e3d26fc
--- /dev/null
+++ b/m4/lib-link.m4
@@ -0,0 +1,709 @@
+# lib-link.m4 serial 13 (gettext-0.17)
+dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.54)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl Autoconf >= 2.61 supports dots in --with options.
+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ LIB[]NAME[]_PREFIX="$basedir"
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644
index 0000000..a8684e1
--- /dev/null
+++ b/m4/lib-prefix.m4
@@ -0,0 +1,185 @@
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64. The current
+ dnl practice is that on a system supporting 32-bit and 64-bit instruction
+ dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+ dnl libraries go under $prefix/lib. We determine the compiler's default
+ dnl mode by looking at the compiler's library search path. If at least
+ dnl of its elements ends in /lib64 or points to a directory whose absolute
+ dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+ dnl default, namely "lib".
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644
index 0000000..7967cc2
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,31 @@
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+])
diff --git a/m4/tls.m4 b/m4/tls.m4
new file mode 100644
index 0000000..3808f06
--- /dev/null
+++ b/m4/tls.m4
@@ -0,0 +1,17 @@
+AC_DEFUN([CC_CHECK_TLS], [
+ AC_CACHE_CHECK([whether $CC knows __thread for Thread-Local Storage],
+ cc_cv_tls___thread,
+ [AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM(
+ [[static __thread int a = 6;]],
+ [[a = 5;]]),
+ [cc_cv_tls___thread=yes],
+ [cc_cv_tls___thread=no])
+ ])
+
+ AS_IF([test "x$cc_cv_tls___thread" = "xyes"],
+ [AC_DEFINE([SUPPORT_TLS___THREAD], 1,
+ [Define this if the compiler supports __thread for Thread-Local Storage])
+ $1],
+ [$2])
+])
diff --git a/man/Makefile.am b/man/Makefile.am
index b009557..9b229f5 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,5 +1,3 @@
-# $Id: Makefile.am 2029 2007-11-08 22:30:33Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
@@ -19,9 +17,10 @@
pulseconfdir=$(sysconfdir)/pulse
-if BUILD_MANPAGES
+CLEANFILES = \
+ $(noinst_DATA)
-man_MANS = \
+dist_man_MANS = \
pulseaudio.1 \
esdcompat.1 \
pax11publish.1 \
@@ -51,117 +50,18 @@ noinst_DATA = \
pulse-client.conf.5.xml \
default.pa.5.xml
-CLEANFILES = \
- $(noinst_DATA)
-
-pulseaudio.1.xml: pulseaudio.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-esdcompat.1.xml: esdcompat.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-pax11publish.1.xml: pax11publish.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-paplay.1.xml: paplay.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-pacat.1.xml: pacat.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-pacmd.1.xml: pacmd.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-pactl.1.xml: pactl.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-pasuspender.1.xml: pasuspender.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-padsp.1.xml: padsp.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-pabrowse.1.xml: pabrowse.1.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-pulse-daemon.conf.5.xml: pulse-daemon.conf.5.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
+if BUILD_MANPAGES
-pulse-client.conf.5.xml: pulse-client.conf.5.xml.in Makefile
- sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
- -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
- -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
+CLEANFILES += \
+ $(dist_man_MANS)
-default.pa.5.xml: default.pa.5.xml.in Makefile
+%.xml: %.xml.in Makefile
sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-if USE_XMLTOMAN
-
-CLEANFILES += \
- $(man_MANS)
-
-pulseaudio.1: pulseaudio.1.xml Makefile
- xmltoman $< > $@
-
-esdcompat.1: esdcompat.1.xml Makefile
- xmltoman $< > $@
-
-pax11publish.1: pax11publish.1.xml Makefile
- xmltoman $< > $@
-
-paplay.1: paplay.1.xml Makefile
- xmltoman $< > $@
-
-pacat.1: pacat.1.xml Makefile
- xmltoman $< > $@
-
-pacmd.1: pacmd.1.xml Makefile
- xmltoman $< > $@
-
-pactl.1: pactl.1.xml Makefile
- xmltoman $< > $@
-
-pasuspender.1: pasuspender.1.xml Makefile
- xmltoman $< > $@
-
-padsp.1: padsp.1.xml Makefile
- xmltoman $< > $@
-
-pabrowse.1: pabrowse.1.xml Makefile
- xmltoman $< > $@
-
-pulse-daemon.conf.5: pulse-daemon.conf.5.xml Makefile
- xmltoman $< > $@
-
-pulse-client.conf.5: pulse-client.conf.5.xml Makefile
- xmltoman $< > $@
-
-default.pa.5: default.pa.5.xml Makefile
- xmltoman $< > $@
+%: %.xml Makefile
+ perl $(srcdir)/xmltoman $< > $@ || rm -f $@
xmllint: $(noinst_DATA)
for f in $(noinst_DATA) ; do \
@@ -170,10 +70,7 @@ xmllint: $(noinst_DATA)
endif
-endif
-
EXTRA_DIST = \
- $(man_MANS) \
pulseaudio.1.xml.in \
esdcompat.1.xml.in \
pax11publish.1.xml.in \
@@ -187,6 +84,7 @@ EXTRA_DIST = \
pulse-daemon.conf.5.xml.in \
pulse-client.conf.5.xml.in \
default.pa.5.xml.in \
+ xmltoman \
xmltoman.css \
xmltoman.xsl \
xmltoman.dtd
diff --git a/man/Makefile.in b/man/Makefile.in
index f950098..1407478 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -14,8 +14,6 @@
@SET_MAKE@
-# $Id: Makefile.am 2029 2007-11-08 22:30:33Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
@@ -51,13 +49,20 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@am__append_1 = \
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ $(man_MANS)
+@BUILD_MANPAGES_TRUE@am__append_1 = \
+@BUILD_MANPAGES_TRUE@ $(dist_man_MANS)
subdir = man
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_libwrap.m4 \
+ $(top_srcdir)/m4/acx_lirc.m4 $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/attributes.m4 \
+ $(top_srcdir)/m4/check_define.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/tls.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@@ -70,10 +75,12 @@ man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"
man5dir = $(mandir)/man5
NROFF = nroff
-MANS = $(man_MANS)
+MANS = $(dist_man_MANS)
DATA = $(noinst_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
@@ -87,6 +94,8 @@ AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
BLUEZ_LIBS = @BLUEZ_LIBS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -97,11 +106,13 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -112,8 +123,11 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB20_CFLAGS = @GLIB20_CFLAGS@
GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAL_CFLAGS = @HAL_CFLAGS@
HAL_LIBS = @HAL_LIBS@
@@ -136,6 +150,31 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
JACK_CFLAGS = @JACK_CFLAGS@
JACK_LIBS = @JACK_LIBS@
LDFLAGS = @LDFLAGS@
@@ -156,6 +195,8 @@ LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@
LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@
LIBSNDFILE_CFLAGS = @LIBSNDFILE_CFLAGS@
LIBSNDFILE_LIBS = @LIBSNDFILE_LIBS@
+LIBSPEEX_CFLAGS = @LIBSPEEX_CFLAGS@
+LIBSPEEX_LIBS = @LIBSPEEX_LIBS@
LIBTOOL = @LIBTOOL@
LIBWRAP_LIBS = @LIBWRAP_LIBS@
LIRC_CFLAGS = @LIRC_CFLAGS@
@@ -167,6 +208,11 @@ LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -182,12 +228,18 @@ PA_API_VERSION = @PA_API_VERSION@
PA_MAJORMINOR = @PA_MAJORMINOR@
PA_PROTOCOL_VERSION = @PA_PROTOCOL_VERSION@
PA_REALTIME_GROUP = @PA_REALTIME_GROUP@
+PA_SYSTEM_CONFIG_PATH = @PA_SYSTEM_CONFIG_PATH@
PA_SYSTEM_GROUP = @PA_SYSTEM_GROUP@
PA_SYSTEM_RUNTIME_PATH = @PA_SYSTEM_RUNTIME_PATH@
+PA_SYSTEM_STATE_PATH = @PA_SYSTEM_STATE_PATH@
PA_SYSTEM_USER = @PA_SYSTEM_USER@
PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
POLKIT_CFLAGS = @POLKIT_CFLAGS@
POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PREOPEN_MODS = @PREOPEN_MODS@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
@@ -197,7 +249,9 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
@@ -229,7 +283,6 @@ docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_pkg_config = @have_pkg_config@
-have_xmltoman = @have_xmltoman@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -252,48 +305,49 @@ policydir = @policydir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pulselocaledir = @pulselocaledir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pulseconfdir = $(sysconfdir)/pulse
-@BUILD_MANPAGES_TRUE@man_MANS = \
-@BUILD_MANPAGES_TRUE@ pulseaudio.1 \
-@BUILD_MANPAGES_TRUE@ esdcompat.1 \
-@BUILD_MANPAGES_TRUE@ pax11publish.1 \
-@BUILD_MANPAGES_TRUE@ paplay.1 \
-@BUILD_MANPAGES_TRUE@ pacat.1 \
-@BUILD_MANPAGES_TRUE@ pacmd.1 \
-@BUILD_MANPAGES_TRUE@ pactl.1 \
-@BUILD_MANPAGES_TRUE@ pasuspender.1 \
-@BUILD_MANPAGES_TRUE@ padsp.1 \
-@BUILD_MANPAGES_TRUE@ pabrowse.1 \
-@BUILD_MANPAGES_TRUE@ pulse-daemon.conf.5 \
-@BUILD_MANPAGES_TRUE@ pulse-client.conf.5 \
-@BUILD_MANPAGES_TRUE@ default.pa.5
-
-@BUILD_MANPAGES_TRUE@noinst_DATA = \
-@BUILD_MANPAGES_TRUE@ pulseaudio.1.xml \
-@BUILD_MANPAGES_TRUE@ esdcompat.1.xml \
-@BUILD_MANPAGES_TRUE@ pax11publish.1.xml \
-@BUILD_MANPAGES_TRUE@ paplay.1.xml \
-@BUILD_MANPAGES_TRUE@ pacat.1.xml \
-@BUILD_MANPAGES_TRUE@ pacmd.1.xml \
-@BUILD_MANPAGES_TRUE@ pactl.1.xml \
-@BUILD_MANPAGES_TRUE@ pasuspender.1.xml \
-@BUILD_MANPAGES_TRUE@ padsp.1.xml \
-@BUILD_MANPAGES_TRUE@ pabrowse.1.xml \
-@BUILD_MANPAGES_TRUE@ pulse-daemon.conf.5.xml \
-@BUILD_MANPAGES_TRUE@ pulse-client.conf.5.xml \
-@BUILD_MANPAGES_TRUE@ default.pa.5.xml
-
-@BUILD_MANPAGES_TRUE@CLEANFILES = $(noinst_DATA) $(am__append_1)
+CLEANFILES = $(noinst_DATA) $(am__append_1)
+dist_man_MANS = \
+ pulseaudio.1 \
+ esdcompat.1 \
+ pax11publish.1 \
+ paplay.1 \
+ pacat.1 \
+ pacmd.1 \
+ pactl.1 \
+ pasuspender.1 \
+ padsp.1 \
+ pabrowse.1 \
+ pulse-daemon.conf.5 \
+ pulse-client.conf.5 \
+ default.pa.5
+
+noinst_DATA = \
+ pulseaudio.1.xml \
+ esdcompat.1.xml \
+ pax11publish.1.xml \
+ paplay.1.xml \
+ pacat.1.xml \
+ pacmd.1.xml \
+ pactl.1.xml \
+ pasuspender.1.xml \
+ padsp.1.xml \
+ pabrowse.1.xml \
+ pulse-daemon.conf.5.xml \
+ pulse-client.conf.5.xml \
+ default.pa.5.xml
+
EXTRA_DIST = \
- $(man_MANS) \
pulseaudio.1.xml.in \
esdcompat.1.xml.in \
pax11publish.1.xml.in \
@@ -307,6 +361,7 @@ EXTRA_DIST = \
pulse-daemon.conf.5.xml.in \
pulse-client.conf.5.xml.in \
default.pa.5.xml.in \
+ xmltoman \
xmltoman.css \
xmltoman.xsl \
xmltoman.dtd
@@ -576,114 +631,18 @@ uninstall-man: uninstall-man1 uninstall-man5
uninstall-man5
-@BUILD_MANPAGES_TRUE@pulseaudio.1.xml: pulseaudio.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@esdcompat.1.xml: esdcompat.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@pax11publish.1.xml: pax11publish.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@paplay.1.xml: paplay.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@pacat.1.xml: pacat.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@pacmd.1.xml: pacmd.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@pactl.1.xml: pactl.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@pasuspender.1.xml: pasuspender.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@padsp.1.xml: padsp.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@pabrowse.1.xml: pabrowse.1.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@pulse-daemon.conf.5.xml: pulse-daemon.conf.5.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@pulse-client.conf.5.xml: pulse-client.conf.5.xml.in Makefile
+@BUILD_MANPAGES_TRUE@%.xml: %.xml.in Makefile
@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-@BUILD_MANPAGES_TRUE@default.pa.5.xml: default.pa.5.xml.in Makefile
-@BUILD_MANPAGES_TRUE@ sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-@BUILD_MANPAGES_TRUE@ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pulseaudio.1: pulseaudio.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@esdcompat.1: esdcompat.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pax11publish.1: pax11publish.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@paplay.1: paplay.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pacat.1: pacat.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pacmd.1: pacmd.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pactl.1: pactl.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pasuspender.1: pasuspender.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@padsp.1: padsp.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pabrowse.1: pabrowse.1.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pulse-daemon.conf.5: pulse-daemon.conf.5.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@pulse-client.conf.5: pulse-client.conf.5.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
-
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@default.pa.5: default.pa.5.xml Makefile
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmltoman $< > $@
+@BUILD_MANPAGES_TRUE@%: %.xml Makefile
+@BUILD_MANPAGES_TRUE@ perl $(srcdir)/xmltoman $< > $@ || rm -f $@
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@xmllint: $(noinst_DATA)
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ for f in $(noinst_DATA) ; do \
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ xmllint --noout --valid "$$f" || exit 1 ; \
-@BUILD_MANPAGES_TRUE@@USE_XMLTOMAN_TRUE@ done
+@BUILD_MANPAGES_TRUE@xmllint: $(noinst_DATA)
+@BUILD_MANPAGES_TRUE@ for f in $(noinst_DATA) ; do \
+@BUILD_MANPAGES_TRUE@ xmllint --noout --valid "$$f" || exit 1 ; \
+@BUILD_MANPAGES_TRUE@ done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/man/default.pa.5.xml.in b/man/default.pa.5.xml.in
index 6118658..4caad7c 100644
--- a/man/default.pa.5.xml.in
+++ b/man/default.pa.5.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: default.pa.5.xml.in 2029 2007-11-08 22:30:33Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/esdcompat.1.xml.in b/man/esdcompat.1.xml.in
index 47e0ccd..61fefa3 100644
--- a/man/esdcompat.1.xml.in
+++ b/man/esdcompat.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: esdcompat.1.xml.in 2024 2007-11-05 23:56:00Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/pabrowse.1.xml.in b/man/pabrowse.1.xml.in
index 7e41527..33f071b 100644
--- a/man/pabrowse.1.xml.in
+++ b/man/pabrowse.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pabrowse.1.xml.in 2027 2007-11-07 13:50:47Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/pacat.1 b/man/pacat.1
index af304ea..7ea2ff6 100644
--- a/man/pacat.1
+++ b/man/pacat.1
@@ -48,7 +48,7 @@ Specify the initial playback volume to use. Choose a value between 0 (silent) an
Capture or play back audio with the specified sample rate. Defaults to 44100 Hz.
.TP
\fB--format\f1\fI=FORMAT\f1
-Capture or play back audio with the specified sample format. Specify one of \fBu8\f1, \fBs16le\f1, \fBs16be\f1, \fBfloat32le\f1, \fBfloat32be\f1, \fBulaw\f1, \fBalaw\f1. Depending on the endianess of the CPU the formats \fBs16ne\f1, \fBs16re\f1, \fBfloat32ne\f1, \fBfloat32re\f1 (for native, resp. reverse endian) are available as aliases. Defaults to s16ne.
+Capture or play back audio with the specified sample format. Specify one of \fBu8\f1, \fBs16le\f1, \fBs16be\f1, \fBs32le\f1, \fBs32be\f1, \fBfloat32le\f1, \fBfloat32be\f1, \fBulaw\f1, \fBalaw\f1. Depending on the endianess of the CPU the formats \fBs16ne\f1, \fBs16re\f1, \fBs32ne\f1, \fBs32re\f1, \fBfloat32ne\f1, \fBfloat32re\f1 (for native, resp. reverse endian) are available as aliases. Defaults to s16ne.
.TP
\fB--channels\f1\fI=CHANNELS\f1
Capture or play back audio with the specified number of channels. If more than two channels are used it is recommended to use the \fB--channel-map\f1 option below. Defaults to 2.
diff --git a/man/pacat.1.xml.in b/man/pacat.1.xml.in
index 56665fb..68a3a12 100644
--- a/man/pacat.1.xml.in
+++ b/man/pacat.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pacat.1.xml.in 2070 2007-11-21 23:03:19Z lennart $ -->
-
<!--
This file is part of PulseAudio.
@@ -110,9 +108,11 @@ USA.
<optdesc><p>Capture or play back audio with the specified sample
format. Specify one of <opt>u8</opt>, <opt>s16le</opt>,
- <opt>s16be</opt>, <opt>float32le</opt>, <opt>float32be</opt>,
+ <opt>s16be</opt>, <opt>s32le</opt>,
+ <opt>s32be</opt>, <opt>float32le</opt>, <opt>float32be</opt>,
<opt>ulaw</opt>, <opt>alaw</opt>. Depending on the endianess of
- the CPU the formats <opt>s16ne</opt>, <opt>s16re</opt>,
+ the CPU the
+ formats <opt>s16ne</opt>, <opt>s16re</opt>, <opt>s32ne</opt>, <opt>s32re</opt>,
<opt>float32ne</opt>, <opt>float32re</opt> (for native,
resp. reverse endian) are available as aliases. Defaults to
s16ne.</p></optdesc>
diff --git a/man/pacmd.1.xml.in b/man/pacmd.1.xml.in
index dd2048a..c20c016 100644
--- a/man/pacmd.1.xml.in
+++ b/man/pacmd.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pacmd.1.xml.in 2024 2007-11-05 23:56:00Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/pactl.1.xml.in b/man/pactl.1.xml.in
index b781c74..8d5bf1d 100644
--- a/man/pactl.1.xml.in
+++ b/man/pactl.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pactl.1.xml.in 2026 2007-11-06 00:21:20Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/padsp.1.xml.in b/man/padsp.1.xml.in
index de0fdf1..9bbe3d1 100644
--- a/man/padsp.1.xml.in
+++ b/man/padsp.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: padsp.1.xml.in 2027 2007-11-07 13:50:47Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/paplay.1.xml.in b/man/paplay.1.xml.in
index 692da87..843b172 100644
--- a/man/paplay.1.xml.in
+++ b/man/paplay.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: paplay.1.xml.in 2024 2007-11-05 23:56:00Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/pasuspender.1.xml.in b/man/pasuspender.1.xml.in
index 21a6d7a..52deae6 100644
--- a/man/pasuspender.1.xml.in
+++ b/man/pasuspender.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pasuspender.1.xml.in 2163 2008-03-27 23:31:55Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/pax11publish.1.xml.in b/man/pax11publish.1.xml.in
index 892b60c..3b40b97 100644
--- a/man/pax11publish.1.xml.in
+++ b/man/pax11publish.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pax11publish.1.xml.in 2024 2007-11-05 23:56:00Z lennart $ -->
-
<!--
This file is part of PulseAudio.
diff --git a/man/pulse-client.conf.5 b/man/pulse-client.conf.5
index 107395a..aa1ab8d 100644
--- a/man/pulse-client.conf.5
+++ b/man/pulse-client.conf.5
@@ -7,11 +7,11 @@ pulse-client.conf \- PulseAudio client configuration file
\fI/etc/pulse/client.conf\fB
\f1
.SH DESCRIPTION
-The PulseAudio client library reads configuration directives from a file \fI~/.pulse/client.conf\f1 on startup, and when that file doesn't exist from \fI/etc/pulse/client.conf\f1.
+The PulseAudio client library reads configuration directives from a file \fI~/.pulse/client.conf\f1 on startup and when that file doesn't exist from \fI/etc/pulse/client.conf\f1.
-The configuration file is a simple collection of variable declarations. If the configuration file parser encounters either ; or # for it ignores the rest of the line until its end.
+The configuration file is a simple collection of variable declarations. If the configuration file parser encounters either ; or # it ignores the rest of the line until its end.
-For the settings that take a boolean argument, the values \fBtrue\f1, \fByes\f1, \fBon\f1 and \fB1\f1 are equivalent, resp. \fBfalse\f1, \fBno\f1, \fBoff\f1, \fB0\f1.
+For the settings that take a boolean argument the values \fBtrue\f1, \fByes\f1, \fBon\f1 and \fB1\f1 are equivalent, resp. \fBfalse\f1, \fBno\f1, \fBoff\f1, \fB0\f1.
.SH DIRECTIVES
.TP
\fBdefault-sink=\f1 The default sink to connect to. If specified overwrites the setting in the daemon. The environment variable \fB$PULSE_SINK\f1 however takes precedence.
@@ -20,15 +20,17 @@ For the settings that take a boolean argument, the values \fBtrue\f1, \fByes\f1,
.TP
\fBdefault-server=\f1 The default sever to connect to. The environment variable \fB$PULSE_SERVER\f1 takes precedence.
.TP
-\fBautospawn=\f1 Autospawn a PulseAudio daemon when needed. Takes a boolean value, defaults to "no".
+\fBautospawn=\f1 Autospawn a PulseAudio daemon when needed. Takes a boolean value, defaults to "yes".
.TP
\fBdaemon-binary=\f1 Path to the PulseAudio daemon to run when autospawning. Defaults to a path configured at compile time.
.TP
-\fBextra-arguments=\f1 Extra arguments to pass to the PulseAudio daemon when autospawning. Defaults to \fB--log-target=syslog --exit-idle-time=5\f1
+\fBextra-arguments=\f1 Extra arguments to pass to the PulseAudio daemon when autospawning. Defaults to \fB--log-target=syslog\f1
.TP
\fBcookie-file=\f1 Specify the path to the PulseAudio authentication cookie. Defaults to \fI~/.pulse-cookie\f1.
.TP
\fBdisable-shm=\f1 Disable data transfer via POSIX shared memory. Takes a boolean argument, defaults to \fBno\f1.
+.TP
+\fBshm-size-bytes=\f1 Sets the shared memory segment size for clients, in bytes. If left unspecified or is set to 0 it will default to some system-specific default, usually 64 MiB. Please note that usually there is no need to change this value, unless you are running an OS kernel that does not do memory overcommit.
.SH AUTHORS
The PulseAudio Developers <mzchyfrnhqvb (at) 0pointer (dot) net>; PulseAudio is available from \fBhttp://pulseaudio.org/\f1
.SH SEE ALSO
diff --git a/man/pulse-client.conf.5.xml.in b/man/pulse-client.conf.5.xml.in
index 26a3ad3..26e3890 100644
--- a/man/pulse-client.conf.5.xml.in
+++ b/man/pulse-client.conf.5.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pulse-client.conf.5.xml.in 2029 2007-11-08 22:30:33Z lennart $ -->
-
<!--
This file is part of PulseAudio.
@@ -33,15 +31,15 @@ USA.
<description>
<p>The PulseAudio client library reads configuration directives from
- a file <file>~/.pulse/client.conf</file> on startup, and when that
+ a file <file>~/.pulse/client.conf</file> on startup and when that
file doesn't exist from
<file>@pulseconfdir@/client.conf</file>.</p>
<p>The configuration file is a simple collection of variable
declarations. If the configuration file parser encounters either ;
- or # for it ignores the rest of the line until its end.</p>
+ or # it ignores the rest of the line until its end.</p>
- <p>For the settings that take a boolean argument, the values
+ <p>For the settings that take a boolean argument the values
<opt>true</opt>, <opt>yes</opt>, <opt>on</opt> and <opt>1</opt>
are equivalent, resp. <opt>false</opt>, <opt>no</opt>,
<opt>off</opt>, <opt>0</opt>.</p>
@@ -71,7 +69,7 @@ USA.
<option>
<p><opt>autospawn=</opt> Autospawn a PulseAudio daemon when
- needed. Takes a boolean value, defaults to "no".</p>
+ needed. Takes a boolean value, defaults to "yes".</p>
</option>
<option>
@@ -83,7 +81,7 @@ USA.
<option>
<p><opt>extra-arguments=</opt> Extra arguments to pass to the
PulseAudio daemon when autospawning. Defaults to
- <opt>--log-target=syslog --exit-idle-time=5</opt>
+ <opt>--log-target=syslog</opt>
</p>
</option>
@@ -99,6 +97,15 @@ USA.
<opt>no</opt>.</p>
</option>
+ <option>
+ <p><opt>shm-size-bytes=</opt> Sets the shared memory segment
+ size for clients, in bytes. If left unspecified or is set to 0
+ it will default to some system-specific default, usually 64
+ MiB. Please note that usually there is no need to change this
+ value, unless you are running an OS kernel that does not do
+ memory overcommit.</p>
+ </option>
+
</section>
<section name="Authors">
diff --git a/man/pulse-daemon.conf.5 b/man/pulse-daemon.conf.5
index 4db21c0..53250a5 100644
--- a/man/pulse-daemon.conf.5
+++ b/man/pulse-daemon.conf.5
@@ -7,11 +7,11 @@ pulse-daemon.conf \- PulseAudio daemon configuration file
\fI/etc/pulse/daemon.conf\fB
\f1
.SH DESCRIPTION
-The PulseAudio sound server reads configuration directives from a file \fI~/.pulse/daemon.conf\f1 on startup, and when that file doesn't exist from \fI/etc/pulse/daemon.conf\f1. Please note that the server also reads a configuration script on startup \fIdefault.pa\f1 which also contains runtime configuration directives.
+The PulseAudio sound server reads configuration directives from a file \fI~/.pulse/daemon.conf\f1 on startup and when that file doesn't exist from \fI/etc/pulse/daemon.conf\f1. Please note that the server also reads a configuration script on startup \fIdefault.pa\f1 which also contains runtime configuration directives.
-The configuration file is a simple collection of variable declarations. If the configuration file parser encounters either ; or # for it ignores the rest of the line until its end.
+The configuration file is a simple collection of variable declarations. If the configuration file parser encounters either ; or # it ignores the rest of the line until its end.
-For the settings that take a boolean argument, the values \fBtrue\f1, \fByes\f1, \fBon\f1 and \fB1\f1 are equivalent, resp. \fBfalse\f1, \fBno\f1, \fBoff\f1, \fB0\f1.
+For the settings that take a boolean argument the values \fBtrue\f1, \fByes\f1, \fBon\f1 and \fB1\f1 are equivalent, resp. \fBfalse\f1, \fBno\f1, \fBoff\f1, \fB0\f1.
.SH GENERAL DIRECTIVES
.TP
\fBdaemonize= \f1 Daemonize after startup. Takes a boolean value, defaults to "no". The \fB--daemonize\f1 command line option takes precedence.
@@ -20,10 +20,14 @@ For the settings that take a boolean argument, the values \fBtrue\f1, \fByes\f1,
.TP
\fBdisallow-module-loading=\f1 Disallow module loading after startup. This is a security feature that makes sure that no further modules may be loaded into the PulseAudio server after startup completed. It is recommended to enable this when \fBsystem-instance\f1 is enabled. Please note that certain features like automatic hot-plug support will not work if this option is enabled. Takes a boolean argument, defaults to \fBno\f1. The \fB--disallow-module-loading\f1 command line option takes precedence.
.TP
+\fBdisallow-exit=\f1 Disallow exit on user request. Defaults to \fBno\f1.
+.TP
\fBresample-method=\f1 The resampling algorithm to use. Use one of \fBsrc-sinc-best-quality\f1, \fBsrc-sinc-medium-quality\f1, \fBsrc-sinc-fastest\f1, \fBsrc-zero-order-hold\f1, \fBsrc-linear\f1, \fBtrivial\f1, \fBspeex-float-N\f1, \fBspeex-fixed-N\f1, \fBffmpeg\f1. See the documentation of libsamplerate for an explanation for the different src- methods. The method \fBtrivial\f1 is the most basic algorithm implemented. If you're tight on CPU consider using this. On the other hand it has the worst quality of them all. The Speex resamplers take an integer quality setting in the range 0..9 (bad...good). They exist in two flavours: \fBfixed\f1 and \fBfloat\f1. The former uses fixed point numbers, the latter relies on floating point numbers. On most desktop CPUs the float point resmampler is a lot faster, and it also offers slightly better quality. See the output of \fBdump-resample-methods\f1 for a complete list of all available resamplers. Defaults to \fBspeex-float-3\f1. The \fB--resample-method\f1 command line option takes precedence. Note that some modules overwrite or allow overwriting of the resampler to use.
.TP
\fBdisable-remixing=\f1 Never upmix or downmix channels to different channel maps. Instead, do a simple name-based matching only.
.TP
+\fBdisable-lfe-remixing=\f1 When upmixing or downmixing ignore LFE channels. When this option is on the output LFE channel will only get a signal when an input LFE channel is available as well. If no input LFE channel is available the output LFE channel will always be 0. If no output LFE channel is available the signal on the input LFE channel will be ignored. Defaults to "on".
+.TP
\fBuse-pid-file=\f1 Create a PID file in \fI/tmp/pulse-$USER/pid\f1. Of this is enabled you may use commands like \fB--kill\f1 or \fB--check\f1. If you are planning to start more than one PulseAudio process per user, you better disable this option since it effectively disables multiple instances. Takes a boolean argument, defaults to \fByes\f1. The \fB--no-cpu-limit\f1 command line option takes precedence.
.TP
\fBno-cpu-limit=\f1 Do not install the CPU load limiter, even on platforms where it is supported. This option is useful when debugging/profiling PulseAudio to disable disturbing SIGXCPU signals. Takes a boolean argument, defaults to \fBno\f1. The \fB--no-cpu-limit\f1 command line argument takes precedence.
@@ -31,6 +35,8 @@ For the settings that take a boolean argument, the values \fBtrue\f1, \fByes\f1,
\fBsystem-instance=\f1 Run the daemon as system-wide instance, requires root priviliges. Takes a boolean argument, defaults to \fBno\f1. The \fB--system\f1 command line argument takes precedence.
.TP
\fBdisable-shm=\f1 Disable data transfer via POSIX shared memory. Takes a boolean argument, defaults to \fBno\f1. The \fB--disable-shm\f1 command line argument takes precedence.
+.TP
+\fBshm-size-bytes=\f1 Sets the shared memory segment size for the daemon, in bytes. If left unspecified or is set to 0 it will default to some system-specific default, usually 64 MiB. Please note that usually there is no need to change this value, unless you are running an OS kernel that does not do memory overcommit.
.SH SCHEDULING
.TP
\fBhigh-priority=\f1 Renice the daemon after startup to become a high-priority process. This a good idea if you experience drop-outs during playback. However, this is a certain security issue, since it works when called SUID root only, or RLIMIT_NICE is used. root is dropped immediately after gaining the nice level on startup, thus it is presumably safe. See \fBpulseaudio(1)\f1 for more information. Takes a boolean argument, defaults to "yes". The \fB--high-priority\f1 command line option takes precedence.
@@ -51,7 +57,9 @@ For the settings that take a boolean argument, the values \fBtrue\f1, \fByes\f1,
.TP
\fBdl-search-path=\f1 The path were to look for dynamic shared objects (DSOs/plugins). You may specify more than one path seperated by colons. The default path depends on compile time settings. The \fB--dl-search-path\f1 command line option takes precedence.
.TP
-\fBdefault-script-file=\f1 The default configuration script file to load. Specify an empty string for not loading a default script file. The default behaviour is to load \fI~/.pulse/default.pa\f1, and if that file does not exist fall back to the system wide installed version \fI/etc/pulse/default.pa\f1. If \fB-n\f1 is passed on the command line the default configuration script is ignored.
+\fBdefault-script-file=\f1 The default configuration script file to load. Specify an empty string for not loading a default script file. The default behaviour is to load \fI~/.pulse/default.pa\f1, and if that file does not exist fall back to the system wide installed version \fI/etc/pulse/default.pa\f1. If run in system-wide mode the file \fI/etc/pulse/system.pa\f1 is used instead. If \fB-n\f1 is passed on the command line or \fBdefault-script-file=\f1 is disabled the default configuration script is ignored.
+.TP
+\fBdefault-script-file=\f1 Load the default configuration script file as specified in \fBdefault-script-file=\f1. Defaults to "yes".
.SH LOGGING
.TP
\fBlog-target=\f1 The default log target. Use either \fBstderr\f1, \fBsyslog\f1 or \fBauto\f1. The latter is equivalent to \fBsylog\f1 in case \fBdaemonize\f1 is enabled, otherwise to \fBstderr\f1. Defaults to \fBauto\f1. The \fB--log-target\f1 command line option takes precedence.
@@ -62,6 +70,8 @@ See \fBgetrlimit(2)\f1 for more information. Set to -1 if PulseAudio shall not t
.TP
\fBrlimit-as\f1 Defaults to -1.
.TP
+\fBrlimit-rss\f1 Defaults to -1.
+.TP
\fBrlimit-core\f1 Defaults to -1.
.TP
\fBrlimit-data\f1 Defaults to -1.
@@ -74,15 +84,23 @@ See \fBgetrlimit(2)\f1 for more information. Set to -1 if PulseAudio shall not t
.TP
\fBrlimit-nproc\f1 Defaults to -1.
.TP
+\fBrlimit-locks\f1 Defaults to -1.
+.TP
+\fBrlimit-sigpending\f1 Defaults to -1.
+.TP
+\fBrlimit-msgqueue\f1 Defaults to -1.
+.TP
\fBrlimit-memlock\f1 Defaults to 16 KiB. Please note that the JACK client libraries may require more locked memory.
.TP
\fBrlimit-nice\f1 Defaults to 31. Please make sure that the default nice level as configured with \fBnice-level\f1 fits in this resource limit, if \fBhigh-priority\f1 is enabled.
.TP
\fBrlimit-rtprio\f1 Defaults to 9. Please make sure that the default real-time priority level as configured with \fBrealtime-priority=\f1 fits in this resource limit, if \fBrealtime-scheduling\f1 is enabled. The JACK client libraries require a real-time prority of 9 by default.
+.TP
+\fBrlimit-rttime\f1 Defaults to 1000000.
.SH DEFAULT DEVICE SETTINGS
Most drivers try to open the audio device with these settings and then fall back to lower settings. The default settings are CD quality: 16bit native endian, 2 channels, 44100 Hz sampling.
.TP
-\fBdefault-sample-format=\f1 The default sampling format. Specify one of \fBu8\f1, \fBs16le\f1, \fBs16be\f1, \fBfloat32le\f1, \fBfloat32be\f1, \fBulaw\f1, \fBalaw\f1. Depending on the endianess of the CPU the formats \fBs16ne\f1, \fBs16re\f1, \fBfloat32ne\f1, \fBfloat32re\f1 (for native, resp. reverse endian) are available as aliases.
+\fBdefault-sample-format=\f1 The default sampling format. Specify one of \fBu8\f1, \fBs16le\f1, \fBs16be\f1, \fBs32le\f1, \fBs32be\f1, \fBfloat32le\f1, \fBfloat32be\f1, \fBulaw\f1, \fBalaw\f1. Depending on the endianess of the CPU the formats \fBs16ne\f1, \fBs16re\f1, \fBs32ne\f1, \fBs32re\f1, \fBfloat32ne\f1, \fBfloat32re\f1 (for native, resp. reverse endian) are available as aliases.
.TP
\fBdefault-sample-rate=\f1 The default sample frequency.
.TP
diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index 4e384eb..a516ee3 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pulse-daemon.conf.5.xml.in 2070 2007-11-21 23:03:19Z lennart $ -->
-
<!--
This file is part of PulseAudio.
@@ -33,7 +31,7 @@ USA.
<description>
<p>The PulseAudio sound server reads configuration directives from
- a file <file>~/.pulse/daemon.conf</file> on startup, and when that
+ a file <file>~/.pulse/daemon.conf</file> on startup and when that
file doesn't exist from
<file>@pulseconfdir@/daemon.conf</file>. Please note that the
server also reads a configuration script on startup
@@ -42,9 +40,9 @@ USA.
<p>The configuration file is a simple collection of variable
declarations. If the configuration file parser encounters either ;
- or # for it ignores the rest of the line until its end.</p>
+ or # it ignores the rest of the line until its end.</p>
- <p>For the settings that take a boolean argument, the values
+ <p>For the settings that take a boolean argument the values
<opt>true</opt>, <opt>yes</opt>, <opt>on</opt> and <opt>1</opt>
are equivalent, resp. <opt>false</opt>, <opt>no</opt>,
<opt>off</opt>, <opt>0</opt>.</p>
@@ -79,6 +77,11 @@ USA.
</option>
<option>
+ <p><opt>disallow-exit=</opt> Disallow exit on user
+ request. Defaults to <opt>no</opt>.</p>
+ </option>
+
+ <option>
<p><opt>resample-method=</opt> The resampling algorithm to
use. Use one of <opt>src-sinc-best-quality</opt>,
<opt>src-sinc-medium-quality</opt>, <opt>src-sinc-fastest</opt>,
@@ -108,6 +111,16 @@ USA.
</option>
<option>
+ <p><opt>disable-lfe-remixing=</opt> When upmixing or downmixing
+ ignore LFE channels. When this option is on the output LFE
+ channel will only get a signal when an input LFE channel is
+ available as well. If no input LFE channel is available the
+ output LFE channel will always be 0. If no output LFE channel is
+ available the signal on the input LFE channel will be
+ ignored. Defaults to "on".</p>
+ </option>
+
+ <option>
<p><opt>use-pid-file=</opt> Create a PID file in
<file>/tmp/pulse-$USER/pid</file>. Of this is enabled you may
use commands like <opt>--kill</opt> or <opt>--check</opt>. If
@@ -143,6 +156,15 @@ USA.
argument takes precedence.</p>
</option>
+ <option>
+ <p><opt>shm-size-bytes=</opt> Sets the shared memory segment
+ size for the daemon, in bytes. If left unspecified or is set to 0
+ it will default to some system-specific default, usually 64
+ MiB. Please note that usually there is no need to change this
+ value, unless you are running an OS kernel that does not do
+ memory overcommit.</p>
+ </option>
+
</section>
<section name="Scheduling">
@@ -232,9 +254,17 @@ USA.
default script file. The default behaviour is to load
<file>~/.pulse/default.pa</file>, and if that file does not
exist fall back to the system wide installed version
- <file>@pulseconfdir@/default.pa</file>. If <opt>-n</opt> is
- passed on the command line the default configuration script is
- ignored.</p>
+ <file>@pulseconfdir@/default.pa</file>. If run in system-wide
+ mode the file <file>@pulseconfdir@/system.pa</file> is used
+ instead. If <opt>-n</opt> is passed on the command line
+ or <opt>default-script-file=</opt> is disabled the default
+ configuration script is ignored.</p>
+ </option>
+
+ <option>
+ <p><opt>default-script-file=</opt> Load the default
+ configuration script file as specified
+ in <opt>default-script-file=</opt>. Defaults to "yes".</p>
</option>
</section>
@@ -274,6 +304,9 @@ USA.
<p><opt>rlimit-as</opt> Defaults to -1.</p>
</option>
<option>
+ <p><opt>rlimit-rss</opt> Defaults to -1.</p>
+ </option>
+ <option>
<p><opt>rlimit-core</opt> Defaults to -1.</p>
</option>
<option>
@@ -292,6 +325,15 @@ USA.
<p><opt>rlimit-nproc</opt> Defaults to -1.</p>
</option>
<option>
+ <p><opt>rlimit-locks</opt> Defaults to -1.</p>
+ </option>
+ <option>
+ <p><opt>rlimit-sigpending</opt> Defaults to -1.</p>
+ </option>
+ <option>
+ <p><opt>rlimit-msgqueue</opt> Defaults to -1.</p>
+ </option>
+ <option>
<p><opt>rlimit-memlock</opt> Defaults to 16 KiB. Please note
that the JACK client libraries may require more locked
memory.</p>
@@ -309,6 +351,9 @@ USA.
<opt>realtime-scheduling</opt> is enabled. The JACK client
libraries require a real-time prority of 9 by default. </p>
</option>
+ <option>
+ <p><opt>rlimit-rttime</opt> Defaults to 1000000.</p>
+ </option>
</section>
@@ -321,9 +366,11 @@ USA.
<option>
<p><opt>default-sample-format=</opt> The default sampling
format. Specify one of <opt>u8</opt>, <opt>s16le</opt>,
- <opt>s16be</opt>, <opt>float32le</opt>, <opt>float32be</opt>,
+ <opt>s16be</opt>, <opt>s32le</opt>,
+ <opt>s32be</opt>, <opt>float32le</opt>, <opt>float32be</opt>,
<opt>ulaw</opt>, <opt>alaw</opt>. Depending on the endianess of
- the CPU the formats <opt>s16ne</opt>, <opt>s16re</opt>,
+ the CPU the
+ formats <opt>s16ne</opt>, <opt>s16re</opt>, <opt>s32ne</opt>, <opt>s32re</opt>,
<opt>float32ne</opt>, <opt>float32re</opt> (for native,
resp. reverse endian) are available as aliases.</p>
</option>
diff --git a/man/pulseaudio.1 b/man/pulseaudio.1
index 12c0f57..0e057d2 100644
--- a/man/pulseaudio.1
+++ b/man/pulseaudio.1
@@ -16,6 +16,8 @@ pulseaudio --dump-resample-methods\fB
pulseaudio --cleanup-shm\fB
+pulseaudio --start\fB
+
pulseaudio --kill\fB
pulseaudio --check\fB
@@ -42,6 +44,9 @@ List available audio resamplers.
\fB--cleanup-shm\f1
Identify stale PulseAudio POSIX shared memory segments in \fI/dev/shm\f1 and remove them if possible. This is done implicitly whenever a new daemon starts up or a client tries to connect to a daemon. It should normally not be necessary to issue this command by hand. Only available on systems with POSIX shared memory segments implemented via a virtual file system mounted to \fI/dev/shm\f1 (e.g. Linux).
.TP
+\fB--start\f1
+Start PulseAudio if it is not running yet. This is different from starting PulseAudio without \fB--start\f1 which would fail if PA is already running. PulseAudio is guaranteed to be fully initialized when this call returns. Implies \fB--daemon\f1.
+.TP
\fB-k | --kill\f1
Kill an already running PulseAudio daemon of the calling user (Equivalent to sending a SIGTERM).
.TP
@@ -49,9 +54,9 @@ Kill an already running PulseAudio daemon of the calling user (Equivalent to sen
Return 0 as return code when the PulseAudio daemon is already running for the calling user.
.TP
\fB--system\f1\fI[=BOOL]\f1
-Run as system-wide instance instead of per-user. Please not that this disables certain features of PulseAudio and is generally not recommended unless the system knows no local users (e.g. is a thin client). This feature needs special configuration and a dedicated UNIX user set up. It is highly recommended to combine this with \fB--disallow-module-loading\f1 (see below).
+Run as system-wide instance instead of per-user. Please note that this disables certain features of PulseAudio and is generally not recommended unless the system knows no local users (e.g. is a thin client). This feature needs special configuration and a dedicated UNIX user set up. It is highly recommended to combine this with \fB--disallow-module-loading\f1 (see below).
.TP
-\fB-D | --daemon\f1\fI[=BOOL]\f1
+\fB-D | --daemonize\f1\fI[=BOOL]\f1
Daemonize after startup, i.e. detach from the terminal.
.TP
\fB--fail\f1\fI[=BOOL]\f1
diff --git a/man/pulseaudio.1.xml.in b/man/pulseaudio.1.xml.in
index 212e856..df82824 100644
--- a/man/pulseaudio.1.xml.in
+++ b/man/pulseaudio.1.xml.in
@@ -2,8 +2,6 @@
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-<!-- $Id: pulseaudio.1.xml.in 2024 2007-11-05 23:56:00Z lennart $ -->
-
<!--
This file is part of PulseAudio.
@@ -33,6 +31,7 @@ USA.
<cmd>pulseaudio <opt>--dump-modules</opt></cmd>
<cmd>pulseaudio <opt>--dump-resample-methods</opt></cmd>
<cmd>pulseaudio <opt>--cleanup-shm</opt></cmd>
+ <cmd>pulseaudio <opt>--start</opt></cmd>
<cmd>pulseaudio <opt>--kill</opt></cmd>
<cmd>pulseaudio <opt>--check</opt></cmd>
</synopsis>
@@ -91,6 +90,16 @@ USA.
</option>
<option>
+ <p><opt>--start</opt></p>
+
+ <optdesc><p>Start PulseAudio if it is not running yet. This is
+ different from starting PulseAudio without <opt>--start</opt>
+ which would fail if PA is already running. PulseAudio is
+ guaranteed to be fully initialized when this call
+ returns. Implies <opt>--daemon</opt>.</p></optdesc>
+ </option>
+
+ <option>
<p><opt>-k | --kill</opt></p>
<optdesc><p>Kill an already running PulseAudio daemon of the
@@ -109,7 +118,7 @@ USA.
<p><opt>--system</opt><arg>[=BOOL]</arg></p>
<optdesc><p>Run as system-wide instance instead of
- per-user. Please not that this disables certain features of
+ per-user. Please note that this disables certain features of
PulseAudio and is generally not recommended unless the system
knows no local users (e.g. is a thin client). This feature needs
special configuration and a dedicated UNIX user set up. It is
@@ -118,7 +127,7 @@ USA.
</option>
<option>
- <p><opt>-D | --daemon</opt><arg>[=BOOL]</arg></p>
+ <p><opt>-D | --daemonize</opt><arg>[=BOOL]</arg></p>
<optdesc><p>Daemonize after startup, i.e. detach from the
terminal.</p></optdesc>
diff --git a/man/xmltoman b/man/xmltoman
new file mode 100755
index 0000000..6a7489a
--- /dev/null
+++ b/man/xmltoman
@@ -0,0 +1,217 @@
+#!/usr/bin/perl -w
+
+# xmltoman - simple xml to man converter
+# Copyright (C) 2000-2002 Oliver Kurth <oku@masqmail.cx>
+# 2003 Lennart Poettering <mzkzygbzna@0pointer.de>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+use XML::Parser;
+
+my $buffer = "";
+my $break_req = 0;
+
+my @stack;
+my $stack_n = 0;
+
+my $para = 0;
+
+sub out {
+ my $t = shift;
+
+ if ($t ne "") {
+ print $t;
+ $break_req=1;
+ }
+}
+
+sub out_buf {
+ local $_;
+
+ my $space = shift;
+
+ $_ = $buffer;
+ $buffer = "";
+
+ s/\n/\ /gm;
+ s/\s+/\ /gm;
+ s/^\s*//gm if (!$break_req);
+ s/^\s$//gm if (!$space);
+
+ out($_);
+}
+
+sub stack_push {
+ my $a = shift;
+
+ if ($stack_n == 0 or $a ne $stack[$stack_n-1]) {
+ out("\\fB") if $a =~ /^bold$/;
+ out("\\fI") if $a =~ /^italic$/;
+ }
+
+ $stack[$stack_n++] = $a;
+}
+
+sub stack_pop {
+ local $_;
+
+ if ($stack_n > 0) {
+ $stack_n--;
+
+ if ($stack_n > 0) {
+ $a = $stack[$stack_n-1];
+ out("\\fB") if $a =~ /^bold$/;
+ out("\\fI") if $a =~ /^italic$/;
+ } else {
+ out("\\f1");
+ }
+ }
+}
+
+sub handle_start {
+ local $_;
+ my $expat = shift;
+ my $element = shift;
+ my %attr = @_;
+
+ $_ = $element;
+
+ if (/^manpage$/) {
+ out_buf(0);
+ print "\n" if ($break_req);
+ print ".TH " . $attr{name} . " " . $attr{section} . " User Manuals\n";
+ print ".SH NAME\n";
+ print $attr{name} . " \\- " . $attr{desc} . "\n";
+ $break_req = 0;
+ } elsif (/^synopsis$/) {
+ out_buf(0);
+ print "\n" if ($break_req);
+ print ".SH SYNOPSIS\n";
+ $section = $element;
+ $break_req = 0;
+ stack_push("bold");
+ } elsif (/^description$/) {
+ out_buf(0);
+ print "\n" if ($break_req);
+ print ".SH DESCRIPTION\n";
+ $section = $element;
+ $break_req = 0;
+ } elsif (/^options$/) {
+ out_buf(0);
+ print "\n" if ($break_req);
+ print ".SH OPTIONS\n";
+ $section = $element;
+ $break_req = 0;
+ } elsif (/^seealso$/) {
+ out_buf(0);
+ print "\n" if ($break_req);
+ print ".SH SEE ALSO\n";
+ $section = $element;
+ $break_req = 0;
+ } elsif (/^section$/) {
+ out_buf(0);
+ print "\n" if ($break_req);
+ print ".SH ".uc($attr{name})."\n";
+ $section = $attr{name};
+ $break_req = 0;
+ } elsif (/^option$/) {
+ out_buf(0);
+ print "\n" if ($break_req);
+ print ".TP\n";
+ $break_req = 0;
+ } elsif (/^p$/ or /^cmd$/) {
+ out_buf(0);
+ print "\n" if ($para);
+ $break_req = 0;
+ } elsif (/^optdesc$/) {
+ out_buf(0);
+ $break_req = 0;
+ } elsif (/^arg$/ or /^file$/) {
+ out_buf(1);
+ stack_push("italic");
+ } elsif (/^opt$/) {
+ out_buf(1);
+ stack_push("bold");
+ } elsif (/^manref$/) {
+ out_buf(1);
+ stack_push("bold");
+ out($attr{name} ."(" . $attr{section} . ")");
+ stack_pop();
+ } elsif (/^url$/) {
+ out_buf(1);
+ stack_push("bold");
+ out($attr{href});
+ stack_pop();
+ };
+
+ $para = 0;
+}
+
+sub handle_end {
+ local $_;
+ my $expat = shift;
+ my $element = shift;
+
+ $_ = $element;
+
+ $para = 0;
+
+ if (/^description$/ or /^options$/ or /^section$/ or /^seealso$/) {
+ out_buf(0);
+ } elsif (/^p$/ or /^cmd$/) {
+ out_buf(0);
+ print "\n" if ($break_req);
+ $para = 1;
+ $break_req = 0;
+ } elsif (/^synopsis$/) {
+ out_buf(0);
+ stack_pop();
+ } elsif (/^opt$/ or /^arg$/ or /^file$/) {
+ out_buf(1);
+ stack_pop();
+ } elsif (/^manpage$/) {
+ out_buf(0);
+ print "\n" if $break_req;
+ $break_req = 0;
+ } elsif (/^optdesc$/ or /^cmd$/ or /^option$/) {
+ # Simply ignore
+ } else {
+ out_buf(1);
+ }
+};
+
+sub handle_char {
+ local $_;
+ my $expat = shift;
+ my $string = shift;
+
+ $buffer .= $string;
+}
+
+MAIN:{
+ my $file = shift;
+
+ if (!$file) {
+ print STDERR "You need to specify a file to parse\n";
+ exit(1);
+ }
+
+ my $parser = new XML::Parser(Handlers => {
+ Start => \&handle_start,
+ End => \&handle_end,
+ Char => \&handle_char});
+
+ $parser->parsefile($file, ProtocolEncoding => 'ISO-8859-1');
+}
diff --git a/man/xmltoman.css b/man/xmltoman.css
index aad64a4..113aeec 100644
--- a/man/xmltoman.css
+++ b/man/xmltoman.css
@@ -1,5 +1,3 @@
-/* $Id: xmltoman.css 2023 2007-11-05 15:10:13Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/man/xmltoman.dtd b/man/xmltoman.dtd
index 5764bab..4760638 100644
--- a/man/xmltoman.dtd
+++ b/man/xmltoman.dtd
@@ -1,6 +1,4 @@
-<!-- $Id: xmltoman.dtd 2023 2007-11-05 15:10:13Z lennart $ -->
-
-<!--
+<!--
This file is part of PulseAudio.
PulseAudio is free software; you can redistribute it and/or modify it under
@@ -15,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with PulseAudio; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-->
<!ELEMENT manpage (synopsis | description | section | options | seealso)*>
diff --git a/man/xmltoman.xsl b/man/xmltoman.xsl
index 439c2df..766ab25 100644
--- a/man/xmltoman.xsl
+++ b/man/xmltoman.xsl
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-15"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
-<!--
+<!--
This file is part of PulseAudio.
PulseAudio is free software; you can redistribute it and/or modify it under
@@ -16,24 +16,22 @@
You should have received a copy of the GNU General Public License
along with PulseAudio; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-->
-<!-- $Id: xmltoman.xsl 2023 2007-11-05 15:10:13Z lennart $ -->
-
<xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
<xsl:template match="/manpage">
-
+
<html>
<head>
<title><xsl:value-of select="@name"/>(<xsl:value-of select="@section"/>)</title>
<style type="text/css">
- body { color: black; background-color: white; }
- a:link, a:visited { color: #900000; }
- h1 { text-transform:uppercase; font-size: 18pt; }
- p { margin-left:1cm; margin-right:1cm; }
+ body { color: black; background-color: white; }
+ a:link, a:visited { color: #900000; }
+ h1 { text-transform:uppercase; font-size: 18pt; }
+ p { margin-left:1cm; margin-right:1cm; }
.cmd { font-family:monospace; }
.file { font-family:monospace; }
.arg { text-transform:uppercase; font-family:monospace; font-style: italic; }
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644
index 0000000..41b2016
--- /dev/null
+++ b/po/ChangeLog
@@ -0,0 +1,100 @@
+2008-10-03 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-09-26 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-09-09 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: New file, from gettext-0.17.
+
+2008-09-09 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-09-03 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-09-03 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-09-03 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-29 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-29 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-19 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-19 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-19 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-19 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-19 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-19 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-19 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-18 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-18 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-18 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-12 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-06 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-06 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-06 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-06 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
+2008-08-06 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.17.
+
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..e3f5e8f
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,4 @@
+de
+el
+fr
+sv
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..57ef267
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,217 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
+#
+# This file may be copied and used freely without restrictions. It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob@ximian.com> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p@.
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && gencat $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(GENPOT)
+
+install: install-data
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $$dir; \
+ if test -r $$lang.gmo; then \
+ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $(srcdir)/$$lang.gmo as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo"; \
+ fi; \
+ if test -r $$lang.gmo.m; then \
+ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ if test -r $(srcdir)/$$lang.gmo.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+ $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $(srcdir)/$$lang.gmo.m as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ done
+
+check: all $(GETTEXT_PACKAGE).pot
+ rm -f missing notexist
+ srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+ if [ -r missing -o -r notexist ]; then \
+ exit 1; \
+ fi
+
+mostlyclean:
+ rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+ rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES stamp-it
+ rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ extra_dists="$(EXTRA_DISTFILES)"; \
+ for file in $$extra_dists; do \
+ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+ done; \
+ for file in $$dists; do \
+ test -f $$file || file="$(srcdir)/$$file"; \
+ ln $$file $(distdir) 2> /dev/null \
+ || cp -p $$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ echo "$$lang:"; \
+ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+ if $$result; then \
+ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.gmo failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+Makefile POTFILES: stamp-it
+ @if test ! -f $@; then \
+ rm -f stamp-it; \
+ $(MAKE) stamp-it; \
+ fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..c20340e
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,193 @@
+src/modules/module-rescue-streams.c
+src/modules/module-tunnel.c
+src/modules/module-native-protocol-fd.c
+src/modules/module-zeroconf-discover.c
+src/modules/module-alsa-source.c
+src/modules/module-device-restore.c
+src/modules/module-match.c
+src/modules/dbus-util.c
+src/modules/module-console-kit.c
+src/modules/module-oss.c
+src/modules/oss-util.c
+src/modules/module-mmkbd-evdev.c
+src/modules/module-position-event-sounds.c
+src/modules/alsa-util.c
+src/modules/module-pipe-source.c
+src/modules/module-solaris.c
+src/modules/module-default-device-restore.c
+src/modules/module-x11-xsmp.c
+src/modules/module-remap-sink.c
+src/modules/bluetooth/module-bluetooth-proximity.c
+src/modules/module-detect.c
+src/modules/module-always-sink.c
+src/modules/module-lirc.c
+src/modules/module-hal-detect.c
+src/modules/module-sine.c
+src/modules/module-zeroconf-publish.c
+src/modules/module-jack-source.c
+src/modules/module-cli.c
+src/modules/gconf/module-gconf.c
+src/modules/gconf/gconf-helper.c
+src/modules/module-esound-sink.c
+src/modules/module-alsa-sink.c
+src/modules/module-volume-restore.c
+src/modules/module-x11-bell.c
+src/modules/module-protocol-stub.c
+src/modules/module-stream-restore.c
+src/modules/module-jack-sink.c
+src/modules/module-esound-compat-spawnfd.c
+src/modules/module-esound-compat-spawnpid.c
+#src/modules/module-waveout.c
+src/modules/module-combine.c
+src/modules/bluetooth/proximity-helper.c
+src/modules/module-x11-publish.c
+src/modules/rtp/module-rtp-recv.c
+src/modules/rtp/sdp.c
+src/modules/rtp/rtp.c
+src/modules/rtp/sap.c
+src/modules/rtp/module-rtp-send.c
+src/modules/module-ladspa-sink.c
+src/modules/module-suspend-on-idle.c
+src/modules/module-pipe-sink.c
+src/modules/module-null-sink.c
+src/pulsecore/memblock.c
+src/pulsecore/queue.c
+src/pulsecore/core.c
+#src/pulsecore/shmasyncq.c
+src/pulsecore/x11wrap.c
+src/pulsecore/rtclock.c
+src/pulsecore/ioline.c
+src/pulsecore/autoload.c
+src/pulsecore/asyncq.c
+src/pulsecore/mutex-posix.c
+src/pulsecore/protocol-esound.c
+src/pulsecore/proplist-util.c
+src/pulsecore/pstream.c
+src/pulsecore/cli-command.c
+src/pulsecore/ltdl-helper.c
+src/pulsecore/ipacl.c
+src/pulsecore/sample-util.c
+src/pulsecore/log.c
+src/pulsecore/auth-cookie.c
+src/pulsecore/protocol-cli.c
+src/pulsecore/resampler.c
+src/pulsecore/pdispatch.c
+src/pulsecore/hook-list.c
+src/pulsecore/conf-parser.c
+src/pulsecore/mcalign.c
+src/pulsecore/core-subscribe.c
+src/pulsecore/protocol-native.c
+src/pulsecore/source-output.c
+src/pulsecore/modargs.c
+src/pulsecore/core-scache.c
+src/pulsecore/iochannel.c
+src/pulsecore/shared.c
+src/pulsecore/socket-client.c
+src/pulsecore/idxset.c
+src/pulsecore/pipe.c
+src/pulsecore/asyncmsgq.c
+src/pulsecore/inet_pton.c
+src/pulsecore/socket-util.c
+src/pulsecore/object.c
+src/pulsecore/sioman.c
+src/pulsecore/sink-input.c
+src/pulsecore/x11prop.c
+src/pulsecore/sconv-s16be.c
+src/pulsecore/thread-posix.c
+src/pulsecore/client.c
+src/pulsecore/inet_ntop.c
+src/pulsecore/strlist.c
+src/pulsecore/msgobject.c
+src/pulsecore/mutex-win32.c
+src/pulsecore/dynarray.c
+src/pulsecore/rtsig.c
+src/pulsecore/once.c
+src/pulsecore/source.c
+src/pulsecore/memchunk.c
+src/pulsecore/protocol-simple.c
+src/pulsecore/sink.c
+src/pulsecore/sconv-s16le.c
+src/pulsecore/sconv.c
+src/pulsecore/core-error.c
+src/pulsecore/strbuf.c
+src/pulsecore/play-memblockq.c
+src/pulsecore/dllmain.c
+src/pulsecore/envelope.c
+src/pulsecore/pid.c
+src/pulsecore/thread-mq.c
+src/pulsecore/shm.c
+src/pulsecore/play-memchunk.c
+src/pulsecore/hashmap.c
+src/pulsecore/avahi-wrap.c
+src/pulsecore/authkey.c
+src/pulsecore/namereg.c
+src/pulsecore/poll.c
+src/pulsecore/tokenizer.c
+src/pulsecore/semaphore-posix.c
+src/pulsecore/cli-text.c
+src/pulsecore/g711.c
+src/pulsecore/core-util.c
+src/pulsecore/thread-win32.c
+src/pulsecore/tagstruct.c
+src/pulsecore/socket-server.c
+src/pulsecore/flist.c
+src/pulsecore/fdsem.c
+src/pulsecore/random.c
+src/pulsecore/modinfo.c
+src/pulsecore/start-child.c
+src/pulsecore/packet.c
+src/pulsecore/pstream-util.c
+src/pulsecore/rtpoll.c
+src/pulsecore/sound-file.c
+src/pulsecore/module.c
+src/pulsecore/ffmpeg/resample2.c
+src/pulsecore/cli.c
+src/pulsecore/time-smoother.c
+src/pulsecore/parseaddr.c
+src/pulsecore/sound-file-stream.c
+src/pulsecore/memblockq.c
+src/pulsecore/protocol-http.c
+src/pulsecore/semaphore-win32.c
+src/daemon/cpulimit.c
+src/daemon/ltdl-bind-now.c
+src/daemon/polkit.c
+src/daemon/main.c
+src/daemon/cmdline.c
+src/daemon/dumpmodules.c
+src/daemon/daemon-conf.c
+src/daemon/caps.c
+src/pulse/channelmap.c
+src/pulse/error.c
+src/pulse/proplist.c
+src/pulse/xmalloc.c
+src/pulse/ext-stream-restore.c
+src/pulse/stream.c
+src/pulse/i18n.c
+src/pulse/util.c
+src/pulse/utf8.c
+src/pulse/mainloop-api.c
+src/pulse/sample.c
+src/pulse/client-conf-x11.c
+src/pulse/client-conf.c
+src/pulse/browser.c
+src/pulse/volume.c
+src/pulse/simple.c
+src/pulse/subscribe.c
+src/pulse/introspect.c
+src/pulse/mainloop.c
+src/pulse/mainloop-signal.c
+src/pulse/operation.c
+src/pulse/context.c
+src/pulse/thread-mainloop.c
+src/pulse/scache.c
+src/pulse/glib-mainloop.c
+src/pulse/timeval.c
+src/utils/pacat.c
+src/utils/pasuspender.c
+src/utils/pabrowse.c
+src/utils/pactl.c
+src/utils/padsp.c
+src/utils/pax11publish.c
+src/utils/pacmd.c
+src/utils/paplay.c
+src/pulsecore/lock-autospawn.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
new file mode 100644
index 0000000..4622d2f
--- /dev/null
+++ b/po/POTFILES.skip
@@ -0,0 +1 @@
+src/pulsecore/atomic.h
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..9643d04
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,1827 @@
+# German translation of pulseaudio
+# Copyright (C) 2008 pulseaudio
+# This file is distributed under the same license as the pulseaudio package.
+# Fabian Affolter <fab@fedoraproject.org>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pulseaudio\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-10-06 03:21+0200\n"
+"PO-Revision-Date: 2008-08-31 12:22+0100\n"
+"Last-Translator: Fabian Affolter <fab@fedoraproject.org>\n"
+"Language-Team: German <fedora-trans-de@redhat.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-Language: German\n"
+
+#: ../src/daemon/ltdl-bind-now.c:177 ../src/daemon/ltdl-bind-now.c:197
+msgid "Failed to add bind-now-loader."
+msgstr "Hinzufügen von bind-now-loader fehlgeschlagen."
+
+#: ../src/daemon/ltdl-bind-now.c:184
+msgid "Failed to find original dlopen loader."
+msgstr "Finden von originalem dlopen-Loader fehlgeschlagen."
+
+#: ../src/daemon/polkit.c:55
+#, c-format
+msgid "Cannot connect to system bus: %s"
+msgstr "Kann nicht mit dem System-Bus verbinden: %s"
+
+#: ../src/daemon/polkit.c:65
+#, c-format
+msgid "Cannot get caller from PID: %s"
+msgstr "Kann caller von PID nicht benziehen: %s"
+
+#: ../src/daemon/polkit.c:77
+msgid "Cannot set UID on caller object."
+msgstr "Kann caller-Ojekt für UID nicht setzen."
+
+#: ../src/daemon/polkit.c:82
+msgid "Failed to get CK session."
+msgstr "Kann CK-Session nicht beziehen."
+
+#: ../src/daemon/polkit.c:90
+msgid "Cannot set UID on session object."
+msgstr ""
+
+#: ../src/daemon/polkit.c:95
+msgid "Cannot allocate PolKitAction."
+msgstr ""
+
+#: ../src/daemon/polkit.c:100
+msgid "Cannot set action_id"
+msgstr "Kann action_id nicht setzen"
+
+#: ../src/daemon/polkit.c:105
+msgid "Cannot allocate PolKitContext."
+msgstr ""
+
+#: ../src/daemon/polkit.c:110
+#, c-format
+msgid "Cannot initialize PolKitContext: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:119
+#, c-format
+msgid "Could not determine whether caller is authorized: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:139
+#, c-format
+msgid "Cannot obtain auth: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:148
+#, c-format
+msgid "PolicyKit responded with '%s'"
+msgstr "PolicyKit antwortet mit '%s'"
+
+#: ../src/daemon/main.c:134
+#, c-format
+msgid "Got signal %s."
+msgstr "Signal %s empfangen."
+
+#: ../src/daemon/main.c:161
+msgid "Exiting."
+msgstr "Beende."
+
+#: ../src/daemon/main.c:179
+#, c-format
+msgid "Failed to find user '%s'."
+msgstr "Kann Benutzer '%s' nicht finden."
+
+#: ../src/daemon/main.c:184
+#, c-format
+msgid "Failed to find group '%s'."
+msgstr "Kann Gruppe '%s' nicht finden."
+
+#: ../src/daemon/main.c:188
+#, c-format
+msgid "Found user '%s' (UID %lu) and group '%s' (GID %lu)."
+msgstr ""
+
+#: ../src/daemon/main.c:193
+#, c-format
+msgid "GID of user '%s' and of group '%s' don't match."
+msgstr ""
+
+#: ../src/daemon/main.c:198
+#, c-format
+msgid "Home directory of user '%s' is not '%s', ignoring."
+msgstr "Benutzerverzeichnis von Benutzer '%s' ist nicht '%s', ignoriere."
+
+#: ../src/daemon/main.c:201 ../src/daemon/main.c:206
+#, c-format
+msgid "Failed to create '%s': %s"
+msgstr "Erzeugen von '%s' fehlgeschlagen: %s"
+
+#: ../src/daemon/main.c:213
+#, c-format
+msgid "Failed to change group list: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:229
+#, c-format
+msgid "Failed to change GID: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:245
+#, c-format
+msgid "Failed to change UID: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:259
+msgid "Successfully dropped root privileges."
+msgstr ""
+
+#: ../src/daemon/main.c:267
+msgid "System wide mode unsupported on this platform."
+msgstr ""
+
+#: ../src/daemon/main.c:285
+#, c-format
+msgid "setrlimit(%s, (%u, %u)) failed: %s"
+msgstr "setrlimit(%s, (%u, %u)) fehlgeschlagen: %s"
+
+#: ../src/daemon/main.c:425
+msgid "Failed to parse command line."
+msgstr ""
+
+#: ../src/daemon/main.c:441
+#, c-format
+msgid "We're in the group '%s', allowing high-priority scheduling."
+msgstr ""
+
+#: ../src/daemon/main.c:448
+#, c-format
+msgid "We're in the group '%s', allowing real-time scheduling."
+msgstr ""
+
+#: ../src/daemon/main.c:456
+msgid "PolicyKit grants us acquire-high-priority privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:459
+msgid "PolicyKit refuses acquire-high-priority privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:464
+msgid "PolicyKit grants us acquire-real-time privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:467
+msgid "PolicyKit refuses acquire-real-time privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:479
+msgid ""
+"Called SUID root and real-time/high-priority scheduling was requested in the "
+"configuration. However, we lack the necessary priviliges:\n"
+"We are not in group '"
+msgstr ""
+
+#: ../src/daemon/main.c:497
+msgid ""
+"High-priority scheduling enabled in configuration but not allowed by policy."
+msgstr ""
+
+#: ../src/daemon/main.c:522
+msgid "Successfully increased RLIMIT_RTPRIO"
+msgstr "RLIMIT_RTPRIO erfolgreich erhöht"
+
+#: ../src/daemon/main.c:525
+#, c-format
+msgid "RLIMIT_RTPRIO failed: %s"
+msgstr "RLIMIT_RTPRIO fehlgeschlagen: %s"
+
+#: ../src/daemon/main.c:532
+msgid "Giving up CAP_NICE"
+msgstr ""
+
+#: ../src/daemon/main.c:539
+msgid ""
+"Real-time scheduling enabled in configuration but not allowed by policy."
+msgstr ""
+
+#: ../src/daemon/main.c:597
+msgid "Daemon not running"
+msgstr "Daemon läuft nicht"
+
+#: ../src/daemon/main.c:599
+#, c-format
+msgid "Daemon running as PID %u"
+msgstr ""
+
+#: ../src/daemon/main.c:609
+#, c-format
+msgid "Failed to kill daemon: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:627
+msgid ""
+"This program is not intended to be run as root (unless --system is "
+"specified)."
+msgstr ""
+
+#: ../src/daemon/main.c:629
+msgid "Root priviliges required."
+msgstr "Root-Berechtigungen benötigt."
+
+#: ../src/daemon/main.c:634
+msgid "--start not supported for system instances."
+msgstr ""
+
+#: ../src/daemon/main.c:639
+msgid "Running in system mode, but --disallow-exit not set!"
+msgstr ""
+
+#: ../src/daemon/main.c:642
+msgid "Running in system mode, but --disallow-module-loading not set!"
+msgstr ""
+
+#: ../src/daemon/main.c:645
+msgid "Running in system mode, forcibly disabling SHM mode!"
+msgstr ""
+
+#: ../src/daemon/main.c:650
+msgid "Running in system mode, forcibly disabling exit idle time!"
+msgstr ""
+
+#: ../src/daemon/main.c:677
+msgid "Failed to acquire stdio."
+msgstr ""
+
+#: ../src/daemon/main.c:683
+#, c-format
+msgid "pipe failed: %s"
+msgstr "pipe fehlgeschlagen: %s"
+
+#: ../src/daemon/main.c:688
+#, c-format
+msgid "fork() failed: %s"
+msgstr "fork() fehlgeschlagen: %s"
+
+#: ../src/daemon/main.c:702
+#, c-format
+msgid "read() failed: %s"
+msgstr "read() fehlgeschlagen: %s"
+
+#: ../src/daemon/main.c:708
+msgid "Daemon startup failed."
+msgstr "Start des Dämons fehlgeschlagen."
+
+#: ../src/daemon/main.c:710
+msgid "Daemon startup successful."
+msgstr "Start des Dämons erfolgreich."
+
+#: ../src/daemon/main.c:780
+#, c-format
+msgid "This is PulseAudio %s"
+msgstr "Dies ist PulseAudio %s"
+
+#: ../src/daemon/main.c:781
+#, c-format
+msgid "Compilation host: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:782
+#, c-format
+msgid "Compilation CFLAGS: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:785
+#, c-format
+msgid "Running on host: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:788
+#, c-format
+msgid "Page size is %lu bytes"
+msgstr "Seitengröße ist %lu Bytes."
+
+#: ../src/daemon/main.c:791
+msgid "Compiled with Valgrind support: yes"
+msgstr ""
+
+#: ../src/daemon/main.c:793
+msgid "Compiled with Valgrind support: no"
+msgstr ""
+
+#: ../src/daemon/main.c:796
+#, c-format
+msgid "Running in valgrind mode: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:799
+msgid "Optimized build: yes"
+msgstr ""
+
+#: ../src/daemon/main.c:801
+msgid "Optimized build: no"
+msgstr ""
+
+#: ../src/daemon/main.c:805
+msgid "Failed to get machine ID"
+msgstr ""
+
+#: ../src/daemon/main.c:808
+#, c-format
+msgid "Machine ID is %s."
+msgstr "System- ID ist %s."
+
+#: ../src/daemon/main.c:813
+#, c-format
+msgid "Using runtime directory %s."
+msgstr ""
+
+#: ../src/daemon/main.c:818
+#, c-format
+msgid "Using state directory %s."
+msgstr ""
+
+#: ../src/daemon/main.c:821
+#, c-format
+msgid "Running in system mode: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:836
+msgid "pa_pid_file_create() failed."
+msgstr "pa_pid_file_create() fehlgeschlagen."
+
+#: ../src/daemon/main.c:848
+msgid "Fresh high-resolution timers available! Bon appetit!"
+msgstr ""
+
+#: ../src/daemon/main.c:850
+msgid ""
+"Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
+"resolution timers enabled!"
+msgstr ""
+
+#: ../src/daemon/main.c:860
+msgid "pa_core_new() failed."
+msgstr "pa_core_new() fehlgeschlagen."
+
+#: ../src/daemon/main.c:921
+msgid "Failed to initialize daemon."
+msgstr ""
+
+#: ../src/daemon/main.c:926
+msgid "Daemon startup without any loaded modules, refusing to work."
+msgstr ""
+
+#: ../src/daemon/main.c:931
+#, c-format
+msgid "Default sink name (%s) does not exist in name register."
+msgstr ""
+
+#: ../src/daemon/main.c:944
+msgid "Daemon startup complete."
+msgstr "Start des Dämons abgeschlossen."
+
+#: ../src/daemon/main.c:950
+msgid "Daemon shutdown initiated."
+msgstr ""
+
+#: ../src/daemon/main.c:971
+msgid "Daemon terminated."
+msgstr "Dämon beendet."
+
+#: ../src/daemon/cmdline.c:117
+#, c-format
+msgid ""
+"%s [options]\n"
+"\n"
+"COMMANDS:\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+" --dump-conf Dump default configuration\n"
+" --dump-modules Dump list of available modules\n"
+" --dump-resample-methods Dump available resample methods\n"
+" --cleanup-shm Cleanup stale shared memory "
+"segments\n"
+" --start Start the daemon if it is not "
+"running\n"
+" -k --kill Kill a running daemon\n"
+" --check Check for a running daemon\n"
+"\n"
+"OPTIONS:\n"
+" --system[=BOOL] Run as system-wide instance\n"
+" -D, --daemonize[=BOOL] Daemonize after startup\n"
+" --fail[=BOOL] Quit when startup fails\n"
+" --high-priority[=BOOL] Try to set high nice level\n"
+" (only available as root, when SUID "
+"or\n"
+" with elevated RLIMIT_NICE)\n"
+" --realtime[=BOOL] Try to enable realtime scheduling\n"
+" (only available as root, when SUID "
+"or\n"
+" with elevated RLIMIT_RTPRIO)\n"
+" --disallow-module-loading[=BOOL] Disallow module user requested "
+"module\n"
+" loading/unloading after startup\n"
+" --disallow-exit[=BOOL] Disallow user requested exit\n"
+" --exit-idle-time=SECS Terminate the daemon when idle and "
+"this\n"
+" time passed\n"
+" --module-idle-time=SECS Unload autoloaded modules when idle "
+"and\n"
+" this time passed\n"
+" --scache-idle-time=SECS Unload autoloaded samples when idle "
+"and\n"
+" this time passed\n"
+" --log-level[=LEVEL] Increase or set verbosity level\n"
+" -v Increase the verbosity level\n"
+" --log-target={auto,syslog,stderr} Specify the log target\n"
+" -p, --dl-search-path=PATH Set the search path for dynamic "
+"shared\n"
+" objects (plugins)\n"
+" --resample-method=METHOD Use the specified resampling method\n"
+" (See --dump-resample-methods for\n"
+" possible values)\n"
+" --use-pid-file[=BOOL] Create a PID file\n"
+" --no-cpu-limit[=BOOL] Do not install CPU load limiter on\n"
+" platforms that support it.\n"
+" --disable-shm[=BOOL] Disable shared memory support.\n"
+"\n"
+"STARTUP SCRIPT:\n"
+" -L, --load=\"MODULE ARGUMENTS\" Load the specified plugin module "
+"with\n"
+" the specified argument\n"
+" -F, --file=FILENAME Run the specified script\n"
+" -C Open a command line on the running "
+"TTY\n"
+" after startup\n"
+"\n"
+" -n Don't load default script file\n"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:245
+msgid "--daemonize expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:252
+msgid "--fail expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:262
+msgid ""
+"--log-level expects log level argument (either numeric in range 0..4 or one "
+"of debug, info, notice, warn, error)."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:274
+msgid "--high-priority expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:281
+msgid "--realtime expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:288
+msgid "--disallow-module-loading expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:295
+msgid "--disallow-exit boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:302
+msgid "--use-pid-file expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:319
+msgid "Invalid log target: use either 'syslog', 'stderr' or 'auto'."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:338
+#, c-format
+msgid "Invalid resample method '%s'."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:345
+msgid "--system expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:352
+msgid "--no-cpu-limit expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:359
+msgid "--disable-shm expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:60
+#, c-format
+msgid "Name: %s\n"
+msgstr "Name: %s\n"
+
+#: ../src/daemon/dumpmodules.c:63
+#, c-format
+msgid "No module information available\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:66
+#, c-format
+msgid "Version: %s\n"
+msgstr "Version: %s\n"
+
+#: ../src/daemon/dumpmodules.c:68
+#, c-format
+msgid "Description: %s\n"
+msgstr "Beschreibung: %s\n"
+
+#: ../src/daemon/dumpmodules.c:70
+#, c-format
+msgid "Author: %s\n"
+msgstr "Author: %s\n"
+
+#: ../src/daemon/dumpmodules.c:72
+#, c-format
+msgid "Usage: %s\n"
+msgstr "Verwendung: %s\n"
+
+#: ../src/daemon/dumpmodules.c:73
+#, c-format
+msgid "Load Once: %s\n"
+msgstr "Lade einmalig: %s\n"
+
+#: ../src/daemon/dumpmodules.c:77
+#, c-format
+msgid "Path: %s\n"
+msgstr "Pfad: %s\n"
+
+#: ../src/daemon/daemon-conf.c:205
+#, c-format
+msgid "[%s:%u] Invalid log target '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:221
+#, c-format
+msgid "[%s:%u] Invalid log level '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:237
+#, c-format
+msgid "[%s:%u] Invalid resample method '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:260
+#, c-format
+msgid "[%s:%u] Invalid rlimit '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:267
+#, c-format
+msgid "[%s:%u] rlimit not supported on this platform."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:283
+#, c-format
+msgid "[%s:%u] Invalid sample format '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:301
+#, c-format
+msgid "[%s:%u] Invalid sample rate '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:319
+#, c-format
+msgid "[%s:%u] Invalid sample channels '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:337
+#, c-format
+msgid "[%s:%u] Invalid number of fragments '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:355
+#, c-format
+msgid "[%s:%u] Invalid fragment size '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:373
+#, c-format
+msgid "[%s:%u] Invalid nice level '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:570
+#, c-format
+msgid "Failed to open configuration file: %s"
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:644
+#, c-format
+msgid "### Read from configuration file: %s ###\n"
+msgstr ""
+
+#: ../src/daemon/caps.c:63
+msgid "Dropping root priviliges."
+msgstr "Verlasse Root-Berechtigungen."
+
+#: ../src/daemon/caps.c:103
+msgid "Limited capabilities successfully to CAP_SYS_NICE."
+msgstr ""
+
+#: ../src/pulse/channelmap.c:102
+msgid "Mono"
+msgstr "Mono"
+
+#: ../src/pulse/channelmap.c:104
+msgid "Front Center"
+msgstr "Vorne Mitte"
+
+#: ../src/pulse/channelmap.c:105
+msgid "Front Left"
+msgstr "Vorne Links"
+
+#: ../src/pulse/channelmap.c:106
+msgid "Front Right"
+msgstr "Vorne Rechts"
+
+#: ../src/pulse/channelmap.c:108
+msgid "Rear Center"
+msgstr "Hinten Mitte"
+
+#: ../src/pulse/channelmap.c:109
+msgid "Rear Left"
+msgstr "Hinten Links"
+
+#: ../src/pulse/channelmap.c:110
+msgid "Rear Right"
+msgstr "Hinten Rechts"
+
+#: ../src/pulse/channelmap.c:112
+msgid "Low Frequency Emmiter"
+msgstr "Niedrigfrequenzemitter"
+
+#: ../src/pulse/channelmap.c:114
+msgid "Front Left-of-center"
+msgstr "Vorne Links der Mitte"
+
+#: ../src/pulse/channelmap.c:115
+msgid "Front Right-of-center"
+msgstr "Vorne Rechts der Mitte"
+
+#: ../src/pulse/channelmap.c:117
+msgid "Side Left"
+msgstr "Seite Links"
+
+#: ../src/pulse/channelmap.c:118
+msgid "Side Right"
+msgstr "Seite Rechts"
+
+#: ../src/pulse/channelmap.c:120
+msgid "Auxiliary 0"
+msgstr "Zusatz 0"
+
+#: ../src/pulse/channelmap.c:121
+msgid "Auxiliary 1"
+msgstr "Zusatz 1"
+
+#: ../src/pulse/channelmap.c:122
+msgid "Auxiliary 2"
+msgstr "Zusatz 2"
+
+#: ../src/pulse/channelmap.c:123
+msgid "Auxiliary 3"
+msgstr "Zusatz 3"
+
+#: ../src/pulse/channelmap.c:124
+msgid "Auxiliary 4"
+msgstr "Zusatz 4"
+
+#: ../src/pulse/channelmap.c:125
+msgid "Auxiliary 5"
+msgstr "Zusatz 5"
+
+#: ../src/pulse/channelmap.c:126
+msgid "Auxiliary 6"
+msgstr "Zusatz 6"
+
+#: ../src/pulse/channelmap.c:127
+msgid "Auxiliary 7"
+msgstr "Zusatz 7"
+
+#: ../src/pulse/channelmap.c:128
+msgid "Auxiliary 8"
+msgstr "Zusatz 8"
+
+#: ../src/pulse/channelmap.c:129
+msgid "Auxiliary 9"
+msgstr "Zusatz 9"
+
+#: ../src/pulse/channelmap.c:130
+msgid "Auxiliary 10"
+msgstr "Zusatz 10"
+
+#: ../src/pulse/channelmap.c:131
+msgid "Auxiliary 11"
+msgstr "Zusatz 11"
+
+#: ../src/pulse/channelmap.c:132
+msgid "Auxiliary 12"
+msgstr "Zusatz 12"
+
+#: ../src/pulse/channelmap.c:133
+msgid "Auxiliary 13"
+msgstr "Zusatz 13"
+
+#: ../src/pulse/channelmap.c:134
+msgid "Auxiliary 14"
+msgstr "Zusatz 14"
+
+#: ../src/pulse/channelmap.c:135
+msgid "Auxiliary 15"
+msgstr "Zusatz 15"
+
+#: ../src/pulse/channelmap.c:136
+msgid "Auxiliary 16"
+msgstr "Zusatz 16"
+
+#: ../src/pulse/channelmap.c:137
+msgid "Auxiliary 17"
+msgstr "Zusatz 17"
+
+#: ../src/pulse/channelmap.c:138
+msgid "Auxiliary 18"
+msgstr "Zusatz 18"
+
+#: ../src/pulse/channelmap.c:139
+msgid "Auxiliary 19"
+msgstr "Zusatz 19"
+
+#: ../src/pulse/channelmap.c:140
+msgid "Auxiliary 20"
+msgstr "Zusatz 20"
+
+#: ../src/pulse/channelmap.c:141
+msgid "Auxiliary 21"
+msgstr "Zusatz 21"
+
+#: ../src/pulse/channelmap.c:142
+msgid "Auxiliary 22"
+msgstr "Zusatz 22"
+
+#: ../src/pulse/channelmap.c:143
+msgid "Auxiliary 23"
+msgstr "Zusatz 23"
+
+#: ../src/pulse/channelmap.c:144
+msgid "Auxiliary 24"
+msgstr "Zusatz 24"
+
+#: ../src/pulse/channelmap.c:145
+msgid "Auxiliary 25"
+msgstr "Zusatz 25"
+
+#: ../src/pulse/channelmap.c:146
+msgid "Auxiliary 26"
+msgstr "Zusatz 26"
+
+#: ../src/pulse/channelmap.c:147
+msgid "Auxiliary 27"
+msgstr "Zusatz 26"
+
+#: ../src/pulse/channelmap.c:148
+msgid "Auxiliary 28"
+msgstr "Zusatz 28"
+
+#: ../src/pulse/channelmap.c:149
+msgid "Auxiliary 29"
+msgstr "Zusatz 29"
+
+#: ../src/pulse/channelmap.c:150
+msgid "Auxiliary 30"
+msgstr "Zusatz 30"
+
+#: ../src/pulse/channelmap.c:151
+msgid "Auxiliary 31"
+msgstr "Zusatz 31"
+
+#: ../src/pulse/channelmap.c:153
+msgid "Top Center"
+msgstr "Oben Mitte"
+
+#: ../src/pulse/channelmap.c:155
+msgid "Top Front Center"
+msgstr "Oben Vorne Mitter"
+
+#: ../src/pulse/channelmap.c:156
+msgid "Top Front Left"
+msgstr "Oben Vorne Links"
+
+#: ../src/pulse/channelmap.c:157
+msgid "Top Front Right"
+msgstr "Oben Vorne Rechts"
+
+#: ../src/pulse/channelmap.c:159
+msgid "Top Rear Center"
+msgstr "Oben Hinten Mitte"
+
+#: ../src/pulse/channelmap.c:160
+msgid "Top Rear Left"
+msgstr "Oben Hinten Links"
+
+#: ../src/pulse/channelmap.c:161
+msgid "Top Rear Right"
+msgstr "Oben Hinten Rechts"
+
+#: ../src/pulse/channelmap.c:472 ../src/pulse/sample.c:144
+#: ../src/pulse/volume.c:163 ../src/pulse/volume.c:194
+#, fuzzy
+msgid "(invalid)"
+msgstr "Ungültig"
+
+#: ../src/pulse/error.c:43
+msgid "OK"
+msgstr "OK"
+
+#: ../src/pulse/error.c:44
+msgid "Access denied"
+msgstr "Zugriff abgelehnt"
+
+#: ../src/pulse/error.c:45
+msgid "Unknown command"
+msgstr "Unbekannter Befehl"
+
+#: ../src/pulse/error.c:46
+msgid "Invalid argument"
+msgstr "Ungültiges Argument"
+
+#: ../src/pulse/error.c:47
+msgid "Entity exists"
+msgstr "Entität existiert bereits"
+
+#: ../src/pulse/error.c:48
+msgid "No such entity"
+msgstr "Keine Entität vorhanden"
+
+#: ../src/pulse/error.c:49
+msgid "Connection refused"
+msgstr "Verbindung zurückgewiesen"
+
+#: ../src/pulse/error.c:50
+msgid "Protocol error"
+msgstr "Protokollfehler"
+
+#: ../src/pulse/error.c:51
+msgid "Timeout"
+msgstr "Zeitüberschreitung"
+
+#: ../src/pulse/error.c:52
+msgid "No authorization key"
+msgstr "Kein Authorisierungsschlüssel vorhanden"
+
+#: ../src/pulse/error.c:53
+msgid "Internal error"
+msgstr "Interner Fehler"
+
+#: ../src/pulse/error.c:54
+msgid "Connection terminated"
+msgstr "Verbindung beendet"
+
+#: ../src/pulse/error.c:55
+msgid "Entity killed"
+msgstr "Entität terminiert."
+
+#: ../src/pulse/error.c:56
+msgid "Invalid server"
+msgstr "Ungültiger Server"
+
+#: ../src/pulse/error.c:57
+msgid "Module initalization failed"
+msgstr "Modulinitialisierung fehlgeschlagen"
+
+#: ../src/pulse/error.c:58
+msgid "Bad state"
+msgstr "Ungültiger Zustand"
+
+#: ../src/pulse/error.c:59
+msgid "No data"
+msgstr "Keine Daten vorhanden"
+
+#: ../src/pulse/error.c:60
+msgid "Incompatible protocol version"
+msgstr "Inkompatible Protokollversion"
+
+#: ../src/pulse/error.c:61
+msgid "Too large"
+msgstr "Zu groß"
+
+#: ../src/pulse/error.c:62
+msgid "Not supported"
+msgstr "Nicht unterstützt"
+
+#: ../src/pulse/error.c:63
+msgid "Unknown error code"
+msgstr "Unbekannter Fehlercode"
+
+#: ../src/pulse/error.c:64
+msgid "No such extension"
+msgstr "Erweiterung nicht vorhanden"
+
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:100
+msgid "XOpenDisplay() failed"
+msgstr "XOpenDisplay() fehlgeschlagen"
+
+#: ../src/pulse/client-conf-x11.c:78
+msgid "Failed to parse cookie data"
+msgstr ""
+
+#: ../src/pulse/client-conf.c:120
+#, c-format
+msgid "Failed to open configuration file '%s': %s"
+msgstr ""
+
+#: ../src/pulse/context.c:516
+msgid "No cookie loaded. Attempting to connect without."
+msgstr ""
+
+#: ../src/pulse/context.c:642
+#, c-format
+msgid "fork(): %s"
+msgstr "fork(): %s"
+
+#: ../src/pulse/context.c:695
+#, c-format
+msgid "waitpid(): %s"
+msgstr "waitpid(): %s"
+
+#: ../src/pulse/context.c:1256
+#, c-format
+msgid "Received message for unknown extension '%s'"
+msgstr ""
+
+#: ../src/utils/pacat.c:93
+#, c-format
+msgid "pa_stream_write() failed: %s\n"
+msgstr "pa_stream_write() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:132
+#, c-format
+msgid "pa_stream_peek() failed: %s\n"
+msgstr "pa_stream_peek() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:141
+#, c-format
+msgid "Buffer overrun, dropping incoming data\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:143
+#, c-format
+msgid "pa_stream_drop() failed: %s\n"
+msgstr "pa_stream_drop() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:169
+#, c-format
+msgid "Stream successfully created.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:172
+#, c-format
+msgid "pa_stream_get_buffer_attr() failed: %s\n"
+msgstr "pa_stream_get_buffer_attr() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:176
+#, c-format
+msgid "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:179
+#, c-format
+msgid "Buffer metrics: maxlength=%u, fragsize=%u\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:183
+#, c-format
+msgid "Using sample spec '%s', channel map '%s'.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:187
+#, c-format
+msgid "Connected to device %s (%u, %ssuspended).\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:197
+#, c-format
+msgid "Stream error: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:207
+#, c-format
+msgid "Stream device suspended.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:209
+#, c-format
+msgid "Stream device resumed.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:217
+#, c-format
+msgid "Stream underrun.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:224
+#, c-format
+msgid "Stream overrun.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:231
+#, c-format
+msgid "Stream started.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:238
+#, c-format
+msgid "Stream moved to device %s (%u, %ssuspended).%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:238
+msgid "not "
+msgstr "nicht"
+
+#: ../src/utils/pacat.c:259
+#, c-format
+msgid "Connection established.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:262
+#, c-format
+msgid "pa_stream_new() failed: %s\n"
+msgstr "pa_stream_new() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:287
+#, c-format
+msgid "pa_stream_connect_playback() failed: %s\n"
+msgstr "pa_stream_connect_playback() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:293
+#, c-format
+msgid "pa_stream_connect_record() failed: %s\n"
+msgstr "pa_stream_connect_record() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:307 ../src/utils/pasuspender.c:159
+#: ../src/utils/pactl.c:666 ../src/utils/paplay.c:183
+#, c-format
+msgid "Connection failure: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:328 ../src/utils/paplay.c:75
+#, c-format
+msgid "Failed to drain stream: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:333 ../src/utils/paplay.c:80
+#, c-format
+msgid "Playback stream drained.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:343 ../src/utils/paplay.c:92
+#, c-format
+msgid "Draining connection to server.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:369
+#, c-format
+msgid "Got EOF.\n"
+msgstr "Erhielt EOF.\n"
+
+#: ../src/utils/pacat.c:375
+#, c-format
+msgid "pa_stream_drain(): %s\n"
+msgstr "pa_stream_drain(): %s\n"
+
+#: ../src/utils/pacat.c:385
+#, c-format
+msgid "read() failed: %s\n"
+msgstr "read() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:417
+#, c-format
+msgid "write() failed: %s\n"
+msgstr "write() fehlgeschlagen: %s\n"
+
+#: ../src/utils/pacat.c:438
+#, c-format
+msgid "Got signal, exiting.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:452
+#, c-format
+msgid "Failed to get latency: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:457
+#, c-format
+msgid "Time: %0.3f sec; Latency: %0.0f usec. \r"
+msgstr ""
+
+#: ../src/utils/pacat.c:477
+#, c-format
+msgid "pa_stream_update_timing_info() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:490
+#, c-format
+msgid ""
+"%s [options]\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -r, --record Create a connection for recording\n"
+" -p, --playback Create a connection for playback\n"
+"\n"
+" -v, --verbose Enable verbose operations\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -d, --device=DEVICE The name of the sink/source to "
+"connect to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+" --stream-name=NAME How to call this stream on the "
+"server\n"
+" --volume=VOLUME Specify the initial (linear) volume "
+"in range 0...65536\n"
+" --rate=SAMPLERATE The sample rate in Hz (defaults to "
+"44100)\n"
+" --format=SAMPLEFORMAT The sample type, one of s16le, "
+"s16be, u8, float32le,\n"
+" float32be, ulaw, alaw, s32le, s32be "
+"(defaults to s16ne)\n"
+" --channels=CHANNELS The number of channels, 1 for mono, "
+"2 for stereo\n"
+" (defaults to 2)\n"
+" --channel-map=CHANNELMAP Channel map to use instead of the "
+"default\n"
+" --fix-format Take the sample format from the sink "
+"the stream is\n"
+" being connected to.\n"
+" --fix-rate Take the sampling rate from the sink "
+"the stream is\n"
+" being connected to.\n"
+" --fix-channels Take the number of channels and the "
+"channel map\n"
+" from the sink the stream is being "
+"connected to.\n"
+" --no-remix Don't upmix or downmix channels.\n"
+" --no-remap Map channels by index instead of "
+"name.\n"
+" --latency=BYTES Request the specified latency in "
+"bytes.\n"
+" --process-time=BYTES Request the specified process time "
+"per request in bytes.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:591
+#, c-format
+msgid ""
+"pacat %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:647
+#, c-format
+msgid "Invalid channel map '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:676
+#, c-format
+msgid "Invalid latency specification '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:683
+#, c-format
+msgid "Invalid process time specification '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:694
+#, c-format
+msgid "Invalid sample specification\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:699
+#, c-format
+msgid "Channel map doesn't match sample specification\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:706
+#, c-format
+msgid "Opening a %s stream with sample specification '%s'.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:706
+msgid "recording"
+msgstr "aufnehmen"
+
+#: ../src/utils/pacat.c:706
+msgid "playback"
+msgstr "abspielen"
+
+#: ../src/utils/pacat.c:714
+#, c-format
+msgid "open(): %s\n"
+msgstr "open(): %s\n"
+
+#: ../src/utils/pacat.c:719
+#, c-format
+msgid "dup2(): %s\n"
+msgstr "dup2(): %s\n"
+
+#: ../src/utils/pacat.c:729
+#, c-format
+msgid "Too many arguments.\n"
+msgstr "Zu viele Argumente.\n"
+
+#: ../src/utils/pacat.c:742 ../src/utils/pasuspender.c:280
+#: ../src/utils/pactl.c:909 ../src/utils/paplay.c:381
+#, c-format
+msgid "pa_mainloop_new() failed.\n"
+msgstr "pa_mainloop_new() fehlgeschlagen.\n"
+
+#: ../src/utils/pacat.c:763
+#, c-format
+msgid "io_new() failed.\n"
+msgstr "io_new() fehlgeschlagen.\n"
+
+#: ../src/utils/pacat.c:769 ../src/utils/pasuspender.c:293
+#: ../src/utils/pactl.c:923 ../src/utils/paplay.c:396
+#, c-format
+msgid "pa_context_new() failed.\n"
+msgstr "pa_context_new() fehlgeschlagen.\n"
+
+#: ../src/utils/pacat.c:777
+#, fuzzy, c-format
+msgid "pa_context_connect() failed: %s"
+msgstr "pa_context_new() fehlgeschlagen.\n"
+
+#: ../src/utils/pacat.c:788
+#, c-format
+msgid "time_new() failed.\n"
+msgstr "time_new() fehlgeschlagen.\n"
+
+#: ../src/utils/pacat.c:795 ../src/utils/pasuspender.c:301
+#: ../src/utils/pactl.c:931 ../src/utils/paplay.c:407
+#, c-format
+msgid "pa_mainloop_run() failed.\n"
+msgstr "pa_mainloop_run() fehlgeschlagen.\n"
+
+#: ../src/utils/pasuspender.c:81
+#, c-format
+msgid "fork(): %s\n"
+msgstr "fork(): %s\n"
+
+#: ../src/utils/pasuspender.c:92
+#, c-format
+msgid "execvp(): %s\n"
+msgstr "execvp(): %s\n"
+
+#: ../src/utils/pasuspender.c:109
+#, c-format
+msgid "Failure to suspend: %s\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:124
+#, c-format
+msgid "Failure to resume: %s\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:147
+#, c-format
+msgid "WARNING: Sound server is not local, not suspending.\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:176 ../src/utils/pactl.c:672
+#: ../src/utils/paplay.c:191
+#, c-format
+msgid "Got SIGINT, exiting.\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:194
+#, c-format
+msgid "WARNING: Child process terminated by signal %u\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:212
+#, c-format
+msgid ""
+"%s [options] ... \n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+"\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:251
+#, c-format
+msgid ""
+"pasuspender %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:107
+#, c-format
+msgid "Failed to get statistics: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:113
+#, c-format
+msgid "Currently in use: %u blocks containing %s bytes total.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:116
+#, c-format
+msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:119
+#, c-format
+msgid "Sample cache size: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:128
+#, c-format
+msgid "Failed to get server information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:135
+#, c-format
+msgid ""
+"User name: %s\n"
+"Host Name: %s\n"
+"Server Name: %s\n"
+"Server Version: %s\n"
+"Default Sample Specification: %s\n"
+"Default Sink: %s\n"
+"Default Source: %s\n"
+"Cookie: %08x\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:160
+#, c-format
+msgid "Failed to get sink information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:176
+#, c-format
+msgid ""
+"*** Sink #%u ***\n"
+"Name: %s\n"
+"Driver: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Owner Module: %u\n"
+"Volume: %s\n"
+"Monitor Source: %s\n"
+"Latency: %0.0f usec, configured %0.0f usec\n"
+"Flags: %s%s%s%s%s%s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:193 ../src/utils/pactl.c:371
+msgid "muted"
+msgstr "stumm"
+
+#: ../src/utils/pactl.c:212
+#, c-format
+msgid "Failed to get source information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:228
+#, c-format
+msgid ""
+"*** Source #%u ***\n"
+"Name: %s\n"
+"Driver: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Owner Module: %u\n"
+"Volume: %s\n"
+"Monitor of Sink: %s\n"
+"Latency: %0.0f usec, configured %0.0f usec\n"
+"Flags: %s%s%s%s%s%s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:246 ../src/utils/pactl.c:289 ../src/utils/pactl.c:322
+#: ../src/utils/pactl.c:366 ../src/utils/pactl.c:367 ../src/utils/pactl.c:374
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:419 ../src/utils/pactl.c:425
+#: ../src/utils/pactl.c:468 ../src/utils/pactl.c:469 ../src/utils/pactl.c:473
+msgid "n/a"
+msgstr "k.A."
+
+#: ../src/utils/pactl.c:263
+#, c-format
+msgid "Failed to get module information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:281
+#, c-format
+msgid ""
+"*** Module #%u ***\n"
+"Name: %s\n"
+"Argument: %s\n"
+"Usage counter: %s\n"
+"Auto unload: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:298
+#, c-format
+msgid "Failed to get client information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:316
+#, c-format
+msgid ""
+"*** Client #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:333
+#, c-format
+msgid "Failed to get sink input information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:352
+#, c-format
+msgid ""
+"*** Sink Input #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Client: %s\n"
+"Sink: %u\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Volume: %s\n"
+"Buffer Latency: %0.0f usec\n"
+"Sink Latency: %0.0f usec\n"
+"Resample method: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:385
+#, c-format
+msgid "Failed to get source output information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:405
+#, c-format
+msgid ""
+"*** Source Output #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Client: %s\n"
+"Source: %u\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Buffer Latency: %0.0f usec\n"
+"Source Latency: %0.0f usec\n"
+"Resample method: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:436
+#, c-format
+msgid "Failed to get sample information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:455
+#, c-format
+msgid ""
+"*** Sample #%u ***\n"
+"Name: %s\n"
+"Volume: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Duration: %0.1fs\n"
+"Size: %s\n"
+"Lazy: %s\n"
+"Filename: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:481
+#, c-format
+msgid "Failed to get autoload information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:497
+#, c-format
+msgid ""
+"*** Autoload Entry #%u ***\n"
+"Name: %s\n"
+"Type: %s\n"
+"Module: %s\n"
+"Argument: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:504
+msgid "sink"
+msgstr ""
+
+#: ../src/utils/pactl.c:504
+msgid "source"
+msgstr "Quelle"
+
+#: ../src/utils/pactl.c:511 ../src/utils/pactl.c:521
+#, c-format
+msgid "Failure: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:545
+#, c-format
+msgid "Failed to upload sample: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:562
+#, c-format
+msgid "Premature end of file\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:678
+#, c-format
+msgid ""
+"%s [options] stat\n"
+"%s [options] list\n"
+"%s [options] exit\n"
+"%s [options] upload-sample FILENAME [NAME]\n"
+"%s [options] play-sample NAME [SINK]\n"
+"%s [options] remove-sample NAME\n"
+"%s [options] move-sink-input ID SINK\n"
+"%s [options] move-source-output ID SOURCE\n"
+"%s [options] load-module NAME [ARGS ...]\n"
+"%s [options] unload-module ID\n"
+"%s [options] suspend-sink [SINK] 1|0\n"
+"%s [options] suspend-source [SOURCE] 1|0\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:729
+#, c-format
+msgid ""
+"pactl %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:768
+#, c-format
+msgid "Please specify a sample file to load\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:790
+#, c-format
+msgid "Failed to open sound file.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:802
+#, c-format
+msgid "You have to specify a sample name to play\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:814
+#, c-format
+msgid "You have to specify a sample name to remove\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:822
+#, c-format
+msgid "You have to specify a sink input index and a sink\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:831
+#, c-format
+msgid "You have to specify a source output index and a source\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:845
+#, c-format
+msgid "You have to specify a module name and arguments.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:865
+#, c-format
+msgid "You have to specify a module index\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:875
+#, c-format
+msgid ""
+"You may not specify more than one sink. You have to specify at least one "
+"boolean value.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:888
+#, c-format
+msgid ""
+"You may not specify more than one source. You have to specify at least one "
+"boolean value.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:904
+#, c-format
+msgid "No valid command specified.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:61
+#, c-format
+msgid ""
+"%s [-D display] [-S server] [-O sink] [-I source] [-c file] [-d|-e|-i|-r]\n"
+"\n"
+" -d Show current PulseAudio data attached to X11 display (default)\n"
+" -e Export local PulseAudio data to X11 display\n"
+" -i Import PulseAudio data from X11 display to local environment "
+"variables and cookie file.\n"
+" -r Remove PulseAudio data from X11 display\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:94
+#, c-format
+msgid "Failed to parse command line.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:108
+#, c-format
+msgid "Server: %s\n"
+msgstr "Server: %s\n"
+
+#: ../src/utils/pax11publish.c:110
+#, c-format
+msgid "Source: %s\n"
+msgstr "Quelle: %s\n"
+
+#: ../src/utils/pax11publish.c:112
+#, c-format
+msgid "Sink: %s\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:114
+#, c-format
+msgid "Cookie: %s\n"
+msgstr "Cookie: %s\n"
+
+#: ../src/utils/pax11publish.c:132
+#, c-format
+msgid "Failed to parse cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:137
+#, c-format
+msgid "Failed to save cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:152
+#, c-format
+msgid "Failed to load client configuration file.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:157
+#, c-format
+msgid "Failed to read environment configuration data.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:174
+#, c-format
+msgid "Failed to get FQDN.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:194
+#, c-format
+msgid "Failed to load cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:211
+#, c-format
+msgid "Not yet implemented.\n"
+msgstr ""
+
+#: ../src/utils/pacmd.c:64
+#, c-format
+msgid "socket(PF_UNIX, SOCK_STREAM, 0): %s"
+msgstr "socket(PF_UNIX, SOCK_STREAM, 0): %s"
+
+#: ../src/utils/pacmd.c:81
+#, c-format
+msgid "connect(): %s"
+msgstr "connect(): %s"
+
+#: ../src/utils/pacmd.c:89
+msgid "Failed to kill PulseAudio daemon."
+msgstr ""
+
+#: ../src/utils/pacmd.c:97
+msgid "Daemon not responding."
+msgstr ""
+
+#: ../src/utils/pacmd.c:112
+#, c-format
+msgid "select(): %s"
+msgstr "select(): %s"
+
+#: ../src/utils/pacmd.c:124 ../src/utils/pacmd.c:140
+#, c-format
+msgid "read(): %s"
+msgstr "read(): %s"
+
+#: ../src/utils/pacmd.c:153 ../src/utils/pacmd.c:167
+#, c-format
+msgid "write(): %s"
+msgstr "write(): %s"
+
+#: ../src/utils/paplay.c:139
+#, c-format
+msgid "Stream successfully created\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:144
+#, c-format
+msgid "Stream errror: %s\n"
+msgstr "Stream-Fehler: %s\n"
+
+#: ../src/utils/paplay.c:165
+#, c-format
+msgid "Connection established.\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:198
+#, c-format
+msgid ""
+"%s [options] [FILE]\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -v, --verbose Enable verbose operation\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -d, --device=DEVICE The name of the sink to connect to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+" --stream-name=NAME How to call this stream on the "
+"server\n"
+" --volume=VOLUME Specify the initial (linear) volume "
+"in range 0...65536\n"
+" --channel-map=CHANNELMAP Set the channel map to the use\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:255
+#, c-format
+msgid ""
+"paplay %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:292
+#, c-format
+msgid "Invalid channel map\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:314
+#, c-format
+msgid "Failed to open file '%s'\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:350
+#, c-format
+msgid "Channel map doesn't match file.\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:376
+#, c-format
+msgid "Using sample spec '%s'\n"
+msgstr ""
+
+#: ../src/pulsecore/lock-autospawn.c:126 ../src/pulsecore/lock-autospawn.c:207
+msgid "Cannot access autospawn lock."
+msgstr ""
+
+#~ msgid "socketpair(): %s"
+#~ msgstr "socketpair(): %s"
diff --git a/po/el.po b/po/el.po
new file mode 100644
index 0000000..fed9ba9
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,1824 @@
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Dimitris Glezos <dimitris@glezos.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: el\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-10-06 03:21+0200\n"
+"PO-Revision-Date: 2008-08-22 19:40+0300\n"
+"Last-Translator: Dimitris Glezos <dimitris@glezos.com>\n"
+"Language-Team: Greek <fedora-trans-el@redhat.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KAider 0.1\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../src/daemon/ltdl-bind-now.c:177 ../src/daemon/ltdl-bind-now.c:197
+msgid "Failed to add bind-now-loader."
+msgstr ""
+
+#: ../src/daemon/ltdl-bind-now.c:184
+msgid "Failed to find original dlopen loader."
+msgstr ""
+
+#: ../src/daemon/polkit.c:55
+#, c-format
+msgid "Cannot connect to system bus: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:65
+#, c-format
+msgid "Cannot get caller from PID: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:77
+msgid "Cannot set UID on caller object."
+msgstr ""
+
+#: ../src/daemon/polkit.c:82
+msgid "Failed to get CK session."
+msgstr ""
+
+#: ../src/daemon/polkit.c:90
+msgid "Cannot set UID on session object."
+msgstr ""
+
+#: ../src/daemon/polkit.c:95
+msgid "Cannot allocate PolKitAction."
+msgstr ""
+
+#: ../src/daemon/polkit.c:100
+msgid "Cannot set action_id"
+msgstr ""
+
+#: ../src/daemon/polkit.c:105
+msgid "Cannot allocate PolKitContext."
+msgstr ""
+
+#: ../src/daemon/polkit.c:110
+#, c-format
+msgid "Cannot initialize PolKitContext: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:119
+#, c-format
+msgid "Could not determine whether caller is authorized: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:139
+#, c-format
+msgid "Cannot obtain auth: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:148
+#, c-format
+msgid "PolicyKit responded with '%s'"
+msgstr ""
+
+#: ../src/daemon/main.c:134
+#, c-format
+msgid "Got signal %s."
+msgstr ""
+
+#: ../src/daemon/main.c:161
+msgid "Exiting."
+msgstr "Έξοδος."
+
+#: ../src/daemon/main.c:179
+#, c-format
+msgid "Failed to find user '%s'."
+msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+
+#: ../src/daemon/main.c:184
+#, c-format
+msgid "Failed to find group '%s'."
+msgstr "Αποτυχία εύρεσης ομάδας χρηστών '%s'."
+
+#: ../src/daemon/main.c:188
+#, c-format
+msgid "Found user '%s' (UID %lu) and group '%s' (GID %lu)."
+msgstr ""
+
+#: ../src/daemon/main.c:193
+#, c-format
+msgid "GID of user '%s' and of group '%s' don't match."
+msgstr ""
+
+#: ../src/daemon/main.c:198
+#, c-format
+msgid "Home directory of user '%s' is not '%s', ignoring."
+msgstr ""
+
+#: ../src/daemon/main.c:201 ../src/daemon/main.c:206
+#, c-format
+msgid "Failed to create '%s': %s"
+msgstr ""
+
+#: ../src/daemon/main.c:213
+#, c-format
+msgid "Failed to change group list: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:229
+#, c-format
+msgid "Failed to change GID: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:245
+#, c-format
+msgid "Failed to change UID: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:259
+msgid "Successfully dropped root privileges."
+msgstr ""
+
+#: ../src/daemon/main.c:267
+msgid "System wide mode unsupported on this platform."
+msgstr ""
+
+#: ../src/daemon/main.c:285
+#, c-format
+msgid "setrlimit(%s, (%u, %u)) failed: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:425
+msgid "Failed to parse command line."
+msgstr ""
+
+#: ../src/daemon/main.c:441
+#, c-format
+msgid "We're in the group '%s', allowing high-priority scheduling."
+msgstr ""
+
+#: ../src/daemon/main.c:448
+#, c-format
+msgid "We're in the group '%s', allowing real-time scheduling."
+msgstr ""
+
+#: ../src/daemon/main.c:456
+msgid "PolicyKit grants us acquire-high-priority privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:459
+msgid "PolicyKit refuses acquire-high-priority privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:464
+msgid "PolicyKit grants us acquire-real-time privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:467
+msgid "PolicyKit refuses acquire-real-time privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:479
+msgid ""
+"Called SUID root and real-time/high-priority scheduling was requested in the "
+"configuration. However, we lack the necessary priviliges:\n"
+"We are not in group '"
+msgstr ""
+
+#: ../src/daemon/main.c:497
+msgid ""
+"High-priority scheduling enabled in configuration but not allowed by policy."
+msgstr ""
+
+#: ../src/daemon/main.c:522
+msgid "Successfully increased RLIMIT_RTPRIO"
+msgstr ""
+
+#: ../src/daemon/main.c:525
+#, c-format
+msgid "RLIMIT_RTPRIO failed: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:532
+msgid "Giving up CAP_NICE"
+msgstr ""
+
+#: ../src/daemon/main.c:539
+msgid ""
+"Real-time scheduling enabled in configuration but not allowed by policy."
+msgstr ""
+
+#: ../src/daemon/main.c:597
+msgid "Daemon not running"
+msgstr ""
+
+#: ../src/daemon/main.c:599
+#, c-format
+msgid "Daemon running as PID %u"
+msgstr ""
+
+#: ../src/daemon/main.c:609
+#, c-format
+msgid "Failed to kill daemon: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:627
+msgid ""
+"This program is not intended to be run as root (unless --system is "
+"specified)."
+msgstr ""
+
+#: ../src/daemon/main.c:629
+msgid "Root priviliges required."
+msgstr ""
+
+#: ../src/daemon/main.c:634
+msgid "--start not supported for system instances."
+msgstr ""
+
+#: ../src/daemon/main.c:639
+msgid "Running in system mode, but --disallow-exit not set!"
+msgstr ""
+
+#: ../src/daemon/main.c:642
+msgid "Running in system mode, but --disallow-module-loading not set!"
+msgstr ""
+
+#: ../src/daemon/main.c:645
+msgid "Running in system mode, forcibly disabling SHM mode!"
+msgstr ""
+
+#: ../src/daemon/main.c:650
+msgid "Running in system mode, forcibly disabling exit idle time!"
+msgstr ""
+
+#: ../src/daemon/main.c:677
+msgid "Failed to acquire stdio."
+msgstr ""
+
+#: ../src/daemon/main.c:683
+#, c-format
+msgid "pipe failed: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:688
+#, c-format
+msgid "fork() failed: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:702
+#, c-format
+msgid "read() failed: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:708
+msgid "Daemon startup failed."
+msgstr ""
+
+#: ../src/daemon/main.c:710
+msgid "Daemon startup successful."
+msgstr ""
+
+#: ../src/daemon/main.c:780
+#, c-format
+msgid "This is PulseAudio %s"
+msgstr "Αυτό είναι το PulseAudio %s"
+
+#: ../src/daemon/main.c:781
+#, c-format
+msgid "Compilation host: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:782
+#, c-format
+msgid "Compilation CFLAGS: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:785
+#, c-format
+msgid "Running on host: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:788
+#, c-format
+msgid "Page size is %lu bytes"
+msgstr ""
+
+#: ../src/daemon/main.c:791
+msgid "Compiled with Valgrind support: yes"
+msgstr ""
+
+#: ../src/daemon/main.c:793
+msgid "Compiled with Valgrind support: no"
+msgstr ""
+
+#: ../src/daemon/main.c:796
+#, c-format
+msgid "Running in valgrind mode: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:799
+msgid "Optimized build: yes"
+msgstr ""
+
+#: ../src/daemon/main.c:801
+msgid "Optimized build: no"
+msgstr ""
+
+#: ../src/daemon/main.c:805
+msgid "Failed to get machine ID"
+msgstr ""
+
+#: ../src/daemon/main.c:808
+#, c-format
+msgid "Machine ID is %s."
+msgstr ""
+
+#: ../src/daemon/main.c:813
+#, c-format
+msgid "Using runtime directory %s."
+msgstr ""
+
+#: ../src/daemon/main.c:818
+#, c-format
+msgid "Using state directory %s."
+msgstr ""
+
+#: ../src/daemon/main.c:821
+#, c-format
+msgid "Running in system mode: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:836
+msgid "pa_pid_file_create() failed."
+msgstr ""
+
+#: ../src/daemon/main.c:848
+msgid "Fresh high-resolution timers available! Bon appetit!"
+msgstr ""
+
+#: ../src/daemon/main.c:850
+msgid ""
+"Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
+"resolution timers enabled!"
+msgstr ""
+"Δικέ μου, ο πυρήνας σου είναι για τα μπάζα! Η πρόταση του σεφ σήμερα είναι "
+"Linux με ενεργοποιημένα τα high-resolution timers!"
+
+#: ../src/daemon/main.c:860
+msgid "pa_core_new() failed."
+msgstr ""
+
+#: ../src/daemon/main.c:921
+msgid "Failed to initialize daemon."
+msgstr ""
+
+#: ../src/daemon/main.c:926
+msgid "Daemon startup without any loaded modules, refusing to work."
+msgstr ""
+
+#: ../src/daemon/main.c:931
+#, c-format
+msgid "Default sink name (%s) does not exist in name register."
+msgstr ""
+
+#: ../src/daemon/main.c:944
+msgid "Daemon startup complete."
+msgstr ""
+
+#: ../src/daemon/main.c:950
+msgid "Daemon shutdown initiated."
+msgstr ""
+
+#: ../src/daemon/main.c:971
+msgid "Daemon terminated."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:117
+#, c-format
+msgid ""
+"%s [options]\n"
+"\n"
+"COMMANDS:\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+" --dump-conf Dump default configuration\n"
+" --dump-modules Dump list of available modules\n"
+" --dump-resample-methods Dump available resample methods\n"
+" --cleanup-shm Cleanup stale shared memory "
+"segments\n"
+" --start Start the daemon if it is not "
+"running\n"
+" -k --kill Kill a running daemon\n"
+" --check Check for a running daemon\n"
+"\n"
+"OPTIONS:\n"
+" --system[=BOOL] Run as system-wide instance\n"
+" -D, --daemonize[=BOOL] Daemonize after startup\n"
+" --fail[=BOOL] Quit when startup fails\n"
+" --high-priority[=BOOL] Try to set high nice level\n"
+" (only available as root, when SUID "
+"or\n"
+" with elevated RLIMIT_NICE)\n"
+" --realtime[=BOOL] Try to enable realtime scheduling\n"
+" (only available as root, when SUID "
+"or\n"
+" with elevated RLIMIT_RTPRIO)\n"
+" --disallow-module-loading[=BOOL] Disallow module user requested "
+"module\n"
+" loading/unloading after startup\n"
+" --disallow-exit[=BOOL] Disallow user requested exit\n"
+" --exit-idle-time=SECS Terminate the daemon when idle and "
+"this\n"
+" time passed\n"
+" --module-idle-time=SECS Unload autoloaded modules when idle "
+"and\n"
+" this time passed\n"
+" --scache-idle-time=SECS Unload autoloaded samples when idle "
+"and\n"
+" this time passed\n"
+" --log-level[=LEVEL] Increase or set verbosity level\n"
+" -v Increase the verbosity level\n"
+" --log-target={auto,syslog,stderr} Specify the log target\n"
+" -p, --dl-search-path=PATH Set the search path for dynamic "
+"shared\n"
+" objects (plugins)\n"
+" --resample-method=METHOD Use the specified resampling method\n"
+" (See --dump-resample-methods for\n"
+" possible values)\n"
+" --use-pid-file[=BOOL] Create a PID file\n"
+" --no-cpu-limit[=BOOL] Do not install CPU load limiter on\n"
+" platforms that support it.\n"
+" --disable-shm[=BOOL] Disable shared memory support.\n"
+"\n"
+"STARTUP SCRIPT:\n"
+" -L, --load=\"MODULE ARGUMENTS\" Load the specified plugin module "
+"with\n"
+" the specified argument\n"
+" -F, --file=FILENAME Run the specified script\n"
+" -C Open a command line on the running "
+"TTY\n"
+" after startup\n"
+"\n"
+" -n Don't load default script file\n"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:245
+msgid "--daemonize expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:252
+msgid "--fail expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:262
+msgid ""
+"--log-level expects log level argument (either numeric in range 0..4 or one "
+"of debug, info, notice, warn, error)."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:274
+msgid "--high-priority expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:281
+msgid "--realtime expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:288
+msgid "--disallow-module-loading expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:295
+msgid "--disallow-exit boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:302
+msgid "--use-pid-file expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:319
+msgid "Invalid log target: use either 'syslog', 'stderr' or 'auto'."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:338
+#, c-format
+msgid "Invalid resample method '%s'."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:345
+msgid "--system expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:352
+msgid "--no-cpu-limit expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:359
+msgid "--disable-shm expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:60
+#, c-format
+msgid "Name: %s\n"
+msgstr "Όνομα: %s\n"
+
+#: ../src/daemon/dumpmodules.c:63
+#, c-format
+msgid "No module information available\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:66
+#, c-format
+msgid "Version: %s\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:68
+#, c-format
+msgid "Description: %s\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:70
+#, c-format
+msgid "Author: %s\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:72
+#, c-format
+msgid "Usage: %s\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:73
+#, c-format
+msgid "Load Once: %s\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:77
+#, c-format
+msgid "Path: %s\n"
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:205
+#, c-format
+msgid "[%s:%u] Invalid log target '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:221
+#, c-format
+msgid "[%s:%u] Invalid log level '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:237
+#, c-format
+msgid "[%s:%u] Invalid resample method '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:260
+#, c-format
+msgid "[%s:%u] Invalid rlimit '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:267
+#, c-format
+msgid "[%s:%u] rlimit not supported on this platform."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:283
+#, c-format
+msgid "[%s:%u] Invalid sample format '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:301
+#, c-format
+msgid "[%s:%u] Invalid sample rate '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:319
+#, c-format
+msgid "[%s:%u] Invalid sample channels '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:337
+#, c-format
+msgid "[%s:%u] Invalid number of fragments '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:355
+#, c-format
+msgid "[%s:%u] Invalid fragment size '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:373
+#, c-format
+msgid "[%s:%u] Invalid nice level '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:570
+#, c-format
+msgid "Failed to open configuration file: %s"
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:644
+#, c-format
+msgid "### Read from configuration file: %s ###\n"
+msgstr ""
+
+#: ../src/daemon/caps.c:63
+msgid "Dropping root priviliges."
+msgstr ""
+
+#: ../src/daemon/caps.c:103
+msgid "Limited capabilities successfully to CAP_SYS_NICE."
+msgstr ""
+
+#: ../src/pulse/channelmap.c:102
+msgid "Mono"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:104
+msgid "Front Center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:105
+msgid "Front Left"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:106
+msgid "Front Right"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:108
+msgid "Rear Center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:109
+msgid "Rear Left"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:110
+msgid "Rear Right"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:112
+msgid "Low Frequency Emmiter"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:114
+msgid "Front Left-of-center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:115
+msgid "Front Right-of-center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:117
+msgid "Side Left"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:118
+msgid "Side Right"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:120
+msgid "Auxiliary 0"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:121
+msgid "Auxiliary 1"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:122
+msgid "Auxiliary 2"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:123
+msgid "Auxiliary 3"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:124
+msgid "Auxiliary 4"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:125
+msgid "Auxiliary 5"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:126
+msgid "Auxiliary 6"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:127
+msgid "Auxiliary 7"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:128
+msgid "Auxiliary 8"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:129
+msgid "Auxiliary 9"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:130
+msgid "Auxiliary 10"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:131
+msgid "Auxiliary 11"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:132
+msgid "Auxiliary 12"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:133
+msgid "Auxiliary 13"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:134
+msgid "Auxiliary 14"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:135
+msgid "Auxiliary 15"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:136
+msgid "Auxiliary 16"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:137
+msgid "Auxiliary 17"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:138
+msgid "Auxiliary 18"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:139
+msgid "Auxiliary 19"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:140
+msgid "Auxiliary 20"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:141
+msgid "Auxiliary 21"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:142
+msgid "Auxiliary 22"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:143
+msgid "Auxiliary 23"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:144
+msgid "Auxiliary 24"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:145
+msgid "Auxiliary 25"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:146
+msgid "Auxiliary 26"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:147
+msgid "Auxiliary 27"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:148
+msgid "Auxiliary 28"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:149
+msgid "Auxiliary 29"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:150
+msgid "Auxiliary 30"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:151
+msgid "Auxiliary 31"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:153
+msgid "Top Center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:155
+msgid "Top Front Center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:156
+msgid "Top Front Left"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:157
+msgid "Top Front Right"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:159
+msgid "Top Rear Center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:160
+msgid "Top Rear Left"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:161
+msgid "Top Rear Right"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:472 ../src/pulse/sample.c:144
+#: ../src/pulse/volume.c:163 ../src/pulse/volume.c:194
+msgid "(invalid)"
+msgstr ""
+
+#: ../src/pulse/error.c:43
+msgid "OK"
+msgstr ""
+
+#: ../src/pulse/error.c:44
+msgid "Access denied"
+msgstr ""
+
+#: ../src/pulse/error.c:45
+msgid "Unknown command"
+msgstr ""
+
+#: ../src/pulse/error.c:46
+msgid "Invalid argument"
+msgstr ""
+
+#: ../src/pulse/error.c:47
+msgid "Entity exists"
+msgstr ""
+
+#: ../src/pulse/error.c:48
+msgid "No such entity"
+msgstr ""
+
+#: ../src/pulse/error.c:49
+msgid "Connection refused"
+msgstr ""
+
+#: ../src/pulse/error.c:50
+msgid "Protocol error"
+msgstr ""
+
+#: ../src/pulse/error.c:51
+msgid "Timeout"
+msgstr ""
+
+#: ../src/pulse/error.c:52
+msgid "No authorization key"
+msgstr ""
+
+#: ../src/pulse/error.c:53
+msgid "Internal error"
+msgstr ""
+
+#: ../src/pulse/error.c:54
+msgid "Connection terminated"
+msgstr ""
+
+#: ../src/pulse/error.c:55
+msgid "Entity killed"
+msgstr ""
+
+#: ../src/pulse/error.c:56
+msgid "Invalid server"
+msgstr ""
+
+#: ../src/pulse/error.c:57
+msgid "Module initalization failed"
+msgstr ""
+
+#: ../src/pulse/error.c:58
+msgid "Bad state"
+msgstr ""
+
+#: ../src/pulse/error.c:59
+msgid "No data"
+msgstr ""
+
+#: ../src/pulse/error.c:60
+msgid "Incompatible protocol version"
+msgstr ""
+
+#: ../src/pulse/error.c:61
+msgid "Too large"
+msgstr ""
+
+#: ../src/pulse/error.c:62
+msgid "Not supported"
+msgstr ""
+
+#: ../src/pulse/error.c:63
+msgid "Unknown error code"
+msgstr ""
+
+#: ../src/pulse/error.c:64
+msgid "No such extension"
+msgstr ""
+
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:100
+msgid "XOpenDisplay() failed"
+msgstr ""
+
+#: ../src/pulse/client-conf-x11.c:78
+msgid "Failed to parse cookie data"
+msgstr ""
+
+#: ../src/pulse/client-conf.c:120
+#, c-format
+msgid "Failed to open configuration file '%s': %s"
+msgstr ""
+
+#: ../src/pulse/context.c:516
+msgid "No cookie loaded. Attempting to connect without."
+msgstr ""
+
+#: ../src/pulse/context.c:642
+#, c-format
+msgid "fork(): %s"
+msgstr ""
+
+#: ../src/pulse/context.c:695
+#, c-format
+msgid "waitpid(): %s"
+msgstr ""
+
+#: ../src/pulse/context.c:1256
+#, c-format
+msgid "Received message for unknown extension '%s'"
+msgstr ""
+
+#: ../src/utils/pacat.c:93
+#, c-format
+msgid "pa_stream_write() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:132
+#, c-format
+msgid "pa_stream_peek() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:141
+#, c-format
+msgid "Buffer overrun, dropping incoming data\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:143
+#, c-format
+msgid "pa_stream_drop() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:169
+#, c-format
+msgid "Stream successfully created.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:172
+#, c-format
+msgid "pa_stream_get_buffer_attr() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:176
+#, c-format
+msgid "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:179
+#, c-format
+msgid "Buffer metrics: maxlength=%u, fragsize=%u\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:183
+#, c-format
+msgid "Using sample spec '%s', channel map '%s'.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:187
+#, c-format
+msgid "Connected to device %s (%u, %ssuspended).\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:197
+#, c-format
+msgid "Stream error: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:207
+#, c-format
+msgid "Stream device suspended.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:209
+#, c-format
+msgid "Stream device resumed.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:217
+#, c-format
+msgid "Stream underrun.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:224
+#, c-format
+msgid "Stream overrun.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:231
+#, c-format
+msgid "Stream started.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:238
+#, c-format
+msgid "Stream moved to device %s (%u, %ssuspended).%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:238
+msgid "not "
+msgstr ""
+
+#: ../src/utils/pacat.c:259
+#, c-format
+msgid "Connection established.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:262
+#, c-format
+msgid "pa_stream_new() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:287
+#, c-format
+msgid "pa_stream_connect_playback() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:293
+#, c-format
+msgid "pa_stream_connect_record() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:307 ../src/utils/pasuspender.c:159
+#: ../src/utils/pactl.c:666 ../src/utils/paplay.c:183
+#, c-format
+msgid "Connection failure: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:328 ../src/utils/paplay.c:75
+#, c-format
+msgid "Failed to drain stream: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:333 ../src/utils/paplay.c:80
+#, c-format
+msgid "Playback stream drained.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:343 ../src/utils/paplay.c:92
+#, c-format
+msgid "Draining connection to server.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:369
+#, c-format
+msgid "Got EOF.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:375
+#, c-format
+msgid "pa_stream_drain(): %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:385
+#, c-format
+msgid "read() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:417
+#, c-format
+msgid "write() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:438
+#, c-format
+msgid "Got signal, exiting.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:452
+#, c-format
+msgid "Failed to get latency: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:457
+#, c-format
+msgid "Time: %0.3f sec; Latency: %0.0f usec. \r"
+msgstr ""
+
+#: ../src/utils/pacat.c:477
+#, c-format
+msgid "pa_stream_update_timing_info() failed: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:490
+#, c-format
+msgid ""
+"%s [options]\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -r, --record Create a connection for recording\n"
+" -p, --playback Create a connection for playback\n"
+"\n"
+" -v, --verbose Enable verbose operations\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -d, --device=DEVICE The name of the sink/source to "
+"connect to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+" --stream-name=NAME How to call this stream on the "
+"server\n"
+" --volume=VOLUME Specify the initial (linear) volume "
+"in range 0...65536\n"
+" --rate=SAMPLERATE The sample rate in Hz (defaults to "
+"44100)\n"
+" --format=SAMPLEFORMAT The sample type, one of s16le, "
+"s16be, u8, float32le,\n"
+" float32be, ulaw, alaw, s32le, s32be "
+"(defaults to s16ne)\n"
+" --channels=CHANNELS The number of channels, 1 for mono, "
+"2 for stereo\n"
+" (defaults to 2)\n"
+" --channel-map=CHANNELMAP Channel map to use instead of the "
+"default\n"
+" --fix-format Take the sample format from the sink "
+"the stream is\n"
+" being connected to.\n"
+" --fix-rate Take the sampling rate from the sink "
+"the stream is\n"
+" being connected to.\n"
+" --fix-channels Take the number of channels and the "
+"channel map\n"
+" from the sink the stream is being "
+"connected to.\n"
+" --no-remix Don't upmix or downmix channels.\n"
+" --no-remap Map channels by index instead of "
+"name.\n"
+" --latency=BYTES Request the specified latency in "
+"bytes.\n"
+" --process-time=BYTES Request the specified process time "
+"per request in bytes.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:591
+#, c-format
+msgid ""
+"pacat %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:647
+#, c-format
+msgid "Invalid channel map '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:676
+#, c-format
+msgid "Invalid latency specification '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:683
+#, c-format
+msgid "Invalid process time specification '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:694
+#, c-format
+msgid "Invalid sample specification\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:699
+#, c-format
+msgid "Channel map doesn't match sample specification\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:706
+#, c-format
+msgid "Opening a %s stream with sample specification '%s'.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:706
+msgid "recording"
+msgstr ""
+
+#: ../src/utils/pacat.c:706
+msgid "playback"
+msgstr ""
+
+#: ../src/utils/pacat.c:714
+#, c-format
+msgid "open(): %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:719
+#, c-format
+msgid "dup2(): %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:729
+#, c-format
+msgid "Too many arguments.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:742 ../src/utils/pasuspender.c:280
+#: ../src/utils/pactl.c:909 ../src/utils/paplay.c:381
+#, c-format
+msgid "pa_mainloop_new() failed.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:763
+#, c-format
+msgid "io_new() failed.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:769 ../src/utils/pasuspender.c:293
+#: ../src/utils/pactl.c:923 ../src/utils/paplay.c:396
+#, c-format
+msgid "pa_context_new() failed.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:777
+#, c-format
+msgid "pa_context_connect() failed: %s"
+msgstr ""
+
+#: ../src/utils/pacat.c:788
+#, c-format
+msgid "time_new() failed.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:795 ../src/utils/pasuspender.c:301
+#: ../src/utils/pactl.c:931 ../src/utils/paplay.c:407
+#, c-format
+msgid "pa_mainloop_run() failed.\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:81
+#, c-format
+msgid "fork(): %s\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:92
+#, c-format
+msgid "execvp(): %s\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:109
+#, c-format
+msgid "Failure to suspend: %s\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:124
+#, c-format
+msgid "Failure to resume: %s\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:147
+#, c-format
+msgid "WARNING: Sound server is not local, not suspending.\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:176 ../src/utils/pactl.c:672
+#: ../src/utils/paplay.c:191
+#, c-format
+msgid "Got SIGINT, exiting.\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:194
+#, c-format
+msgid "WARNING: Child process terminated by signal %u\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:212
+#, c-format
+msgid ""
+"%s [options] ... \n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+"\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:251
+#, c-format
+msgid ""
+"pasuspender %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:107
+#, c-format
+msgid "Failed to get statistics: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:113
+#, c-format
+msgid "Currently in use: %u blocks containing %s bytes total.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:116
+#, c-format
+msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:119
+#, c-format
+msgid "Sample cache size: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:128
+#, c-format
+msgid "Failed to get server information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:135
+#, c-format
+msgid ""
+"User name: %s\n"
+"Host Name: %s\n"
+"Server Name: %s\n"
+"Server Version: %s\n"
+"Default Sample Specification: %s\n"
+"Default Sink: %s\n"
+"Default Source: %s\n"
+"Cookie: %08x\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:160
+#, c-format
+msgid "Failed to get sink information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:176
+#, c-format
+msgid ""
+"*** Sink #%u ***\n"
+"Name: %s\n"
+"Driver: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Owner Module: %u\n"
+"Volume: %s\n"
+"Monitor Source: %s\n"
+"Latency: %0.0f usec, configured %0.0f usec\n"
+"Flags: %s%s%s%s%s%s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:193 ../src/utils/pactl.c:371
+msgid "muted"
+msgstr ""
+
+#: ../src/utils/pactl.c:212
+#, c-format
+msgid "Failed to get source information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:228
+#, c-format
+msgid ""
+"*** Source #%u ***\n"
+"Name: %s\n"
+"Driver: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Owner Module: %u\n"
+"Volume: %s\n"
+"Monitor of Sink: %s\n"
+"Latency: %0.0f usec, configured %0.0f usec\n"
+"Flags: %s%s%s%s%s%s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:246 ../src/utils/pactl.c:289 ../src/utils/pactl.c:322
+#: ../src/utils/pactl.c:366 ../src/utils/pactl.c:367 ../src/utils/pactl.c:374
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:419 ../src/utils/pactl.c:425
+#: ../src/utils/pactl.c:468 ../src/utils/pactl.c:469 ../src/utils/pactl.c:473
+msgid "n/a"
+msgstr ""
+
+#: ../src/utils/pactl.c:263
+#, c-format
+msgid "Failed to get module information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:281
+#, c-format
+msgid ""
+"*** Module #%u ***\n"
+"Name: %s\n"
+"Argument: %s\n"
+"Usage counter: %s\n"
+"Auto unload: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:298
+#, c-format
+msgid "Failed to get client information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:316
+#, c-format
+msgid ""
+"*** Client #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:333
+#, c-format
+msgid "Failed to get sink input information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:352
+#, c-format
+msgid ""
+"*** Sink Input #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Client: %s\n"
+"Sink: %u\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Volume: %s\n"
+"Buffer Latency: %0.0f usec\n"
+"Sink Latency: %0.0f usec\n"
+"Resample method: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:385
+#, c-format
+msgid "Failed to get source output information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:405
+#, c-format
+msgid ""
+"*** Source Output #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Client: %s\n"
+"Source: %u\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Buffer Latency: %0.0f usec\n"
+"Source Latency: %0.0f usec\n"
+"Resample method: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:436
+#, c-format
+msgid "Failed to get sample information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:455
+#, c-format
+msgid ""
+"*** Sample #%u ***\n"
+"Name: %s\n"
+"Volume: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Duration: %0.1fs\n"
+"Size: %s\n"
+"Lazy: %s\n"
+"Filename: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:481
+#, c-format
+msgid "Failed to get autoload information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:497
+#, c-format
+msgid ""
+"*** Autoload Entry #%u ***\n"
+"Name: %s\n"
+"Type: %s\n"
+"Module: %s\n"
+"Argument: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:504
+msgid "sink"
+msgstr ""
+
+#: ../src/utils/pactl.c:504
+msgid "source"
+msgstr ""
+
+#: ../src/utils/pactl.c:511 ../src/utils/pactl.c:521
+#, c-format
+msgid "Failure: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:545
+#, c-format
+msgid "Failed to upload sample: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:562
+#, c-format
+msgid "Premature end of file\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:678
+#, c-format
+msgid ""
+"%s [options] stat\n"
+"%s [options] list\n"
+"%s [options] exit\n"
+"%s [options] upload-sample FILENAME [NAME]\n"
+"%s [options] play-sample NAME [SINK]\n"
+"%s [options] remove-sample NAME\n"
+"%s [options] move-sink-input ID SINK\n"
+"%s [options] move-source-output ID SOURCE\n"
+"%s [options] load-module NAME [ARGS ...]\n"
+"%s [options] unload-module ID\n"
+"%s [options] suspend-sink [SINK] 1|0\n"
+"%s [options] suspend-source [SOURCE] 1|0\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:729
+#, c-format
+msgid ""
+"pactl %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:768
+#, c-format
+msgid "Please specify a sample file to load\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:790
+#, c-format
+msgid "Failed to open sound file.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:802
+#, c-format
+msgid "You have to specify a sample name to play\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:814
+#, c-format
+msgid "You have to specify a sample name to remove\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:822
+#, c-format
+msgid "You have to specify a sink input index and a sink\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:831
+#, c-format
+msgid "You have to specify a source output index and a source\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:845
+#, c-format
+msgid "You have to specify a module name and arguments.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:865
+#, c-format
+msgid "You have to specify a module index\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:875
+#, c-format
+msgid ""
+"You may not specify more than one sink. You have to specify at least one "
+"boolean value.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:888
+#, c-format
+msgid ""
+"You may not specify more than one source. You have to specify at least one "
+"boolean value.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:904
+#, c-format
+msgid "No valid command specified.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:61
+#, c-format
+msgid ""
+"%s [-D display] [-S server] [-O sink] [-I source] [-c file] [-d|-e|-i|-r]\n"
+"\n"
+" -d Show current PulseAudio data attached to X11 display (default)\n"
+" -e Export local PulseAudio data to X11 display\n"
+" -i Import PulseAudio data from X11 display to local environment "
+"variables and cookie file.\n"
+" -r Remove PulseAudio data from X11 display\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:94
+#, c-format
+msgid "Failed to parse command line.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:108
+#, c-format
+msgid "Server: %s\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:110
+#, c-format
+msgid "Source: %s\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:112
+#, c-format
+msgid "Sink: %s\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:114
+#, c-format
+msgid "Cookie: %s\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:132
+#, c-format
+msgid "Failed to parse cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:137
+#, c-format
+msgid "Failed to save cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:152
+#, c-format
+msgid "Failed to load client configuration file.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:157
+#, c-format
+msgid "Failed to read environment configuration data.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:174
+#, c-format
+msgid "Failed to get FQDN.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:194
+#, c-format
+msgid "Failed to load cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:211
+#, c-format
+msgid "Not yet implemented.\n"
+msgstr ""
+
+#: ../src/utils/pacmd.c:64
+#, c-format
+msgid "socket(PF_UNIX, SOCK_STREAM, 0): %s"
+msgstr ""
+
+#: ../src/utils/pacmd.c:81
+#, c-format
+msgid "connect(): %s"
+msgstr ""
+
+#: ../src/utils/pacmd.c:89
+msgid "Failed to kill PulseAudio daemon."
+msgstr ""
+
+#: ../src/utils/pacmd.c:97
+msgid "Daemon not responding."
+msgstr ""
+
+#: ../src/utils/pacmd.c:112
+#, c-format
+msgid "select(): %s"
+msgstr ""
+
+#: ../src/utils/pacmd.c:124 ../src/utils/pacmd.c:140
+#, c-format
+msgid "read(): %s"
+msgstr ""
+
+#: ../src/utils/pacmd.c:153 ../src/utils/pacmd.c:167
+#, c-format
+msgid "write(): %s"
+msgstr ""
+
+#: ../src/utils/paplay.c:139
+#, c-format
+msgid "Stream successfully created\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:144
+#, c-format
+msgid "Stream errror: %s\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:165
+#, c-format
+msgid "Connection established.\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:198
+#, c-format
+msgid ""
+"%s [options] [FILE]\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -v, --verbose Enable verbose operation\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -d, --device=DEVICE The name of the sink to connect to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+" --stream-name=NAME How to call this stream on the "
+"server\n"
+" --volume=VOLUME Specify the initial (linear) volume "
+"in range 0...65536\n"
+" --channel-map=CHANNELMAP Set the channel map to the use\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:255
+#, c-format
+msgid ""
+"paplay %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:292
+#, c-format
+msgid "Invalid channel map\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:314
+#, c-format
+msgid "Failed to open file '%s'\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:350
+#, c-format
+msgid "Channel map doesn't match file.\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:376
+#, c-format
+msgid "Using sample spec '%s'\n"
+msgstr ""
+
+#: ../src/pulsecore/lock-autospawn.c:126 ../src/pulsecore/lock-autospawn.c:207
+msgid "Cannot access autospawn lock."
+msgstr ""
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..4dc57d6
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,2178 @@
+# French translation of pulseaudio.
+# Copyright (C) 2006-2008 Lennart Poettering
+# This file is distributed under the same license as the pulseaudio package.
+#
+# Robert-André Mauchin <zebob.m@pengzone.org>, 2008.
+# Michaël Ughetto <telimektar esraonline com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pulseaudio trunk\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-10-06 03:21+0200\n"
+"PO-Revision-Date: 2008-09-06 10:49+0200\n"
+"Last-Translator: Robert-André Mauchin <zebob.m@pengzone.org>\n"
+"Language-Team: Fedora French <fedora-trans-fr@redhat.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n>1;\n"
+
+#: ../src/daemon/ltdl-bind-now.c:177 ../src/daemon/ltdl-bind-now.c:197
+msgid "Failed to add bind-now-loader."
+msgstr "Échec lors de l'ajout du chargeur bind-now."
+
+#: ../src/daemon/ltdl-bind-now.c:184
+msgid "Failed to find original dlopen loader."
+msgstr "Échec lors de la recherche du chargeur dlopen original."
+
+#: ../src/daemon/polkit.c:55
+#, c-format
+msgid "Cannot connect to system bus: %s"
+msgstr "Impossible de se connecter au bus système : %s"
+
+#: ../src/daemon/polkit.c:65
+#, c-format
+msgid "Cannot get caller from PID: %s"
+msgstr "Impossible d'obtenir le programme appelant à partir du PID : %s"
+
+#: ../src/daemon/polkit.c:77
+msgid "Cannot set UID on caller object."
+msgstr "Impossible de définir un UID sur l'objet appelant."
+
+#: ../src/daemon/polkit.c:82
+msgid "Failed to get CK session."
+msgstr "Échec lors de l'obtention de la session CK."
+
+#: ../src/daemon/polkit.c:90
+msgid "Cannot set UID on session object."
+msgstr "Impossible de définir l'UID sur l'objet de session."
+
+#: ../src/daemon/polkit.c:95
+msgid "Cannot allocate PolKitAction."
+msgstr "Impossible d'allouer PolKitAction."
+
+#: ../src/daemon/polkit.c:100
+msgid "Cannot set action_id"
+msgstr "Impossible de définir action_id."
+
+#: ../src/daemon/polkit.c:105
+msgid "Cannot allocate PolKitContext."
+msgstr "Impossible d'allouer PolKitContext."
+
+#: ../src/daemon/polkit.c:110
+#, c-format
+msgid "Cannot initialize PolKitContext: %s"
+msgstr "Impossible d'initialiser PolKitContext : %s"
+
+#: ../src/daemon/polkit.c:119
+#, c-format
+msgid "Could not determine whether caller is authorized: %s"
+msgstr "Impossible de déterminer si le programme appelant est autorisé : %s"
+
+#: ../src/daemon/polkit.c:139
+#, c-format
+msgid "Cannot obtain auth: %s"
+msgstr "Impossible d'obtenir l'authentification : %s"
+
+#: ../src/daemon/polkit.c:148
+#, c-format
+msgid "PolicyKit responded with '%s'"
+msgstr "PolicyKit a renvoyé « %s »"
+
+#: ../src/daemon/main.c:134
+#, c-format
+msgid "Got signal %s."
+msgstr "Signal %s obtenu."
+
+#: ../src/daemon/main.c:161
+msgid "Exiting."
+msgstr "Fermeture."
+
+#: ../src/daemon/main.c:179
+#, c-format
+msgid "Failed to find user '%s'."
+msgstr "Impossible de trouver l'utilisateur « %s »."
+
+#: ../src/daemon/main.c:184
+#, c-format
+msgid "Failed to find group '%s'."
+msgstr "Impossible de trouver le groupe « %s »."
+
+#: ../src/daemon/main.c:188
+#, c-format
+msgid "Found user '%s' (UID %lu) and group '%s' (GID %lu)."
+msgstr "Utilisateur « %s ” (UID %lu) et groupe « %s » (GID %lu) trouvé."
+
+#: ../src/daemon/main.c:193
+#, c-format
+msgid "GID of user '%s' and of group '%s' don't match."
+msgstr ""
+"Le GID de l'utilisateur « %s » et du groupe « %s » ne sont pas identiques."
+
+#: ../src/daemon/main.c:198
+#, c-format
+msgid "Home directory of user '%s' is not '%s', ignoring."
+msgstr "Le dossier personnel de l'utilisateur « %s » n'est pas « %s », ignoré."
+
+#: ../src/daemon/main.c:201 ../src/daemon/main.c:206
+#, c-format
+msgid "Failed to create '%s': %s"
+msgstr "Échec lors de la création de « %s » : %s"
+
+#: ../src/daemon/main.c:213
+#, c-format
+msgid "Failed to change group list: %s"
+msgstr "Échec lors du changement de la liste du groupe : %s"
+
+#: ../src/daemon/main.c:229
+#, c-format
+msgid "Failed to change GID: %s"
+msgstr "Échec lors du changement de GID : %s"
+
+#: ../src/daemon/main.c:245
+#, c-format
+msgid "Failed to change UID: %s"
+msgstr "Échec lors du changement d'UID : %s"
+
+#: ../src/daemon/main.c:259
+msgid "Successfully dropped root privileges."
+msgstr "Les permissions root ont été correctement abandonnées."
+
+#: ../src/daemon/main.c:267
+msgid "System wide mode unsupported on this platform."
+msgstr "Mode système étendu non pris en charge sur cette plateforme."
+
+#: ../src/daemon/main.c:285
+#, c-format
+msgid "setrlimit(%s, (%u, %u)) failed: %s"
+msgstr "setrlimit(%s, (%u, %u)) a échoué : %s"
+
+#: ../src/daemon/main.c:425
+msgid "Failed to parse command line."
+msgstr "Échec lors de l'analyse de la ligne de commande"
+
+#: ../src/daemon/main.c:441
+#, c-format
+msgid "We're in the group '%s', allowing high-priority scheduling."
+msgstr ""
+"Nous sommes dans le groupe « %s », permettant une planification à haute "
+"priorité."
+
+#: ../src/daemon/main.c:448
+#, c-format
+msgid "We're in the group '%s', allowing real-time scheduling."
+msgstr ""
+"Nous sommes dans le groupe « %s », permettant une planification en temps réel."
+
+#: ../src/daemon/main.c:456
+msgid "PolicyKit grants us acquire-high-priority privilege."
+msgstr "PolicyKit a accordé l'acquisition des permissions de haute priorité."
+
+#: ../src/daemon/main.c:459
+msgid "PolicyKit refuses acquire-high-priority privilege."
+msgstr "PolicyKit a refusé l'acquisition des permissions de haute priorité."
+
+#: ../src/daemon/main.c:464
+msgid "PolicyKit grants us acquire-real-time privilege."
+msgstr "PolicyKit a accordé l'acquisition des permissions de temps réel."
+
+#: ../src/daemon/main.c:467
+msgid "PolicyKit refuses acquire-real-time privilege."
+msgstr "PolicyKit a refusé l'acquisition des permissions de temps réel."
+
+#: ../src/daemon/main.c:479
+msgid ""
+"Called SUID root and real-time/high-priority scheduling was requested in the "
+"configuration. However, we lack the necessary priviliges:\n"
+"We are not in group '"
+msgstr ""
+"Le SUID root a été appelé et la planification à haute priorité/en temps réel "
+"demandée dans la configuration. Néanmoins nous n'avons pas les permissions "
+"nécessaires :\n"
+"nous ne somme pas dans le groupe "
+
+#: ../src/daemon/main.c:497
+msgid ""
+"High-priority scheduling enabled in configuration but not allowed by policy."
+msgstr ""
+"La planification à haute priorité est activée dans la configuration mais "
+"n'est pas permise par la politique."
+
+#: ../src/daemon/main.c:522
+msgid "Successfully increased RLIMIT_RTPRIO"
+msgstr "Augmentation de RLIMIT_RTPRIO réussie"
+
+#: ../src/daemon/main.c:525
+#, c-format
+msgid "RLIMIT_RTPRIO failed: %s"
+msgstr "RLIMIT_RTPRIO a échoué : %s"
+
+#: ../src/daemon/main.c:532
+msgid "Giving up CAP_NICE"
+msgstr "Abandon de CAP_NICE"
+
+#: ../src/daemon/main.c:539
+msgid ""
+"Real-time scheduling enabled in configuration but not allowed by policy."
+msgstr ""
+"La planification en temps réel est activée mais n'est pas permise par la "
+"politique."
+
+#: ../src/daemon/main.c:597
+msgid "Daemon not running"
+msgstr "Lé démon n'est pas lancé"
+
+#: ../src/daemon/main.c:599
+#, c-format
+msgid "Daemon running as PID %u"
+msgstr "Le démon est lancé avec le PID %u"
+
+#: ../src/daemon/main.c:609
+#, c-format
+msgid "Failed to kill daemon: %s"
+msgstr "Impossible de tuer le démon : %s"
+
+#: ../src/daemon/main.c:627
+msgid ""
+"This program is not intended to be run as root (unless --system is "
+"specified)."
+msgstr ""
+"Le programme n'est pas conçu pour être lancé en tant que root (sauf si --"
+"system est renseigné)."
+
+#: ../src/daemon/main.c:629
+msgid "Root priviliges required."
+msgstr "Les permissions root sont nécessaires."
+
+#: ../src/daemon/main.c:634
+msgid "--start not supported for system instances."
+msgstr "--start n'est pas pris en charge pour les instances système."
+
+#: ../src/daemon/main.c:639
+msgid "Running in system mode, but --disallow-exit not set!"
+msgstr ""
+"Le démon s'exécute en mode système, mais --disallow-exit n'est pas défini."
+
+#: ../src/daemon/main.c:642
+msgid "Running in system mode, but --disallow-module-loading not set!"
+msgstr ""
+"Le démon s'exécute en mode système, mais --disallow-module-loading n'est pas "
+"défini."
+
+#: ../src/daemon/main.c:645
+msgid "Running in system mode, forcibly disabling SHM mode!"
+msgstr "Le démon s'exécute en mode système, désactivation forcée du mode SHM."
+
+#: ../src/daemon/main.c:650
+msgid "Running in system mode, forcibly disabling exit idle time!"
+msgstr ""
+"Le démon s'exécute en mode système, désactivation forcée de la fermeture "
+"après délai d'inactivité."
+
+#: ../src/daemon/main.c:677
+msgid "Failed to acquire stdio."
+msgstr "Échec lors de l'acquisition de stdio."
+
+#: ../src/daemon/main.c:683
+#, c-format
+msgid "pipe failed: %s"
+msgstr "Échec du tube : %s"
+
+#: ../src/daemon/main.c:688
+#, c-format
+msgid "fork() failed: %s"
+msgstr "Échec de fork() : %s"
+
+#: ../src/daemon/main.c:702
+#, c-format
+msgid "read() failed: %s"
+msgstr "Échec de read() : %s"
+
+#: ../src/daemon/main.c:708
+msgid "Daemon startup failed."
+msgstr "Échec lors du démarrage du démon."
+
+#: ../src/daemon/main.c:710
+msgid "Daemon startup successful."
+msgstr "Démarrage du démon réussi."
+
+#: ../src/daemon/main.c:780
+#, c-format
+msgid "This is PulseAudio %s"
+msgstr "Pulseaudio %s"
+
+#: ../src/daemon/main.c:781
+#, fuzzy, c-format
+msgid "Compilation host: %s"
+msgstr "CFLAGS de compilation : %s"
+
+#: ../src/daemon/main.c:782
+#, c-format
+msgid "Compilation CFLAGS: %s"
+msgstr "CFLAGS de compilation : %s"
+
+#: ../src/daemon/main.c:785
+#, fuzzy, c-format
+msgid "Running on host: %s"
+msgstr "Exécution en mode système : %s"
+
+#: ../src/daemon/main.c:788
+#, c-format
+msgid "Page size is %lu bytes"
+msgstr "La taille de la page est de %lu octets"
+
+#: ../src/daemon/main.c:791
+msgid "Compiled with Valgrind support: yes"
+msgstr "Compilé avec la prise en charge Valgrind : oui"
+
+#: ../src/daemon/main.c:793
+msgid "Compiled with Valgrind support: no"
+msgstr "Compilé avec la prise en charge Valgrind : non"
+
+#: ../src/daemon/main.c:796
+#, fuzzy, c-format
+msgid "Running in valgrind mode: %s"
+msgstr "Exécution en mode système : %s"
+
+#: ../src/daemon/main.c:799
+msgid "Optimized build: yes"
+msgstr "Construction optimisée : oui"
+
+#: ../src/daemon/main.c:801
+msgid "Optimized build: no"
+msgstr "Construction optimisée : non"
+
+#: ../src/daemon/main.c:805
+msgid "Failed to get machine ID"
+msgstr "Échec lors de l'obtention de l'ID de la machine"
+
+#: ../src/daemon/main.c:808
+#, c-format
+msgid "Machine ID is %s."
+msgstr "L'ID de la machine est %s."
+
+#: ../src/daemon/main.c:813
+#, c-format
+msgid "Using runtime directory %s."
+msgstr "Utilisation du répertoire d'exécution %s."
+
+#: ../src/daemon/main.c:818
+#, c-format
+msgid "Using state directory %s."
+msgstr "Utilisation du répertoire d'état %s."
+
+#: ../src/daemon/main.c:821
+#, c-format
+msgid "Running in system mode: %s"
+msgstr "Exécution en mode système : %s"
+
+#: ../src/daemon/main.c:836
+msgid "pa_pid_file_create() failed."
+msgstr "Échec de pa_pid_file_create()."
+
+#: ../src/daemon/main.c:848
+msgid "Fresh high-resolution timers available! Bon appetit!"
+msgstr ""
+"De nouvelles horloges à haute résolution sont disponibles ! Bon appétit !"
+
+#: ../src/daemon/main.c:850
+msgid ""
+"Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
+"resolution timers enabled!"
+msgstr ""
+"Eh mec, ton noyau il pue ! La recommandation d'aujourd'hui du patron est "
+"d'activer les horloges à haute résolution sur ton Linux."
+
+#: ../src/daemon/main.c:860
+msgid "pa_core_new() failed."
+msgstr "Échec de pa_core_new()."
+
+#: ../src/daemon/main.c:921
+msgid "Failed to initialize daemon."
+msgstr "Échec lors de l'initialisation du démon"
+
+#: ../src/daemon/main.c:926
+msgid "Daemon startup without any loaded modules, refusing to work."
+msgstr "Démarrage du démon sans aucun module chargé : refus de fonctionner."
+
+#: ../src/daemon/main.c:931
+#, c-format
+msgid "Default sink name (%s) does not exist in name register."
+msgstr ""
+"Le nom de la destination par défaut (%s) n'existe pas dans le registre des "
+"noms."
+
+#: ../src/daemon/main.c:944
+msgid "Daemon startup complete."
+msgstr "Démarrage du démon effectué."
+
+#: ../src/daemon/main.c:950
+msgid "Daemon shutdown initiated."
+msgstr "Fermeture du démon initiée."
+
+#: ../src/daemon/main.c:971
+msgid "Daemon terminated."
+msgstr "Démon terminé."
+
+#: ../src/daemon/cmdline.c:117
+#, c-format
+msgid ""
+"%s [options]\n"
+"\n"
+"COMMANDS:\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+" --dump-conf Dump default configuration\n"
+" --dump-modules Dump list of available modules\n"
+" --dump-resample-methods Dump available resample methods\n"
+" --cleanup-shm Cleanup stale shared memory "
+"segments\n"
+" --start Start the daemon if it is not "
+"running\n"
+" -k --kill Kill a running daemon\n"
+" --check Check for a running daemon\n"
+"\n"
+"OPTIONS:\n"
+" --system[=BOOL] Run as system-wide instance\n"
+" -D, --daemonize[=BOOL] Daemonize after startup\n"
+" --fail[=BOOL] Quit when startup fails\n"
+" --high-priority[=BOOL] Try to set high nice level\n"
+" (only available as root, when SUID "
+"or\n"
+" with elevated RLIMIT_NICE)\n"
+" --realtime[=BOOL] Try to enable realtime scheduling\n"
+" (only available as root, when SUID "
+"or\n"
+" with elevated RLIMIT_RTPRIO)\n"
+" --disallow-module-loading[=BOOL] Disallow module user requested "
+"module\n"
+" loading/unloading after startup\n"
+" --disallow-exit[=BOOL] Disallow user requested exit\n"
+" --exit-idle-time=SECS Terminate the daemon when idle and "
+"this\n"
+" time passed\n"
+" --module-idle-time=SECS Unload autoloaded modules when idle "
+"and\n"
+" this time passed\n"
+" --scache-idle-time=SECS Unload autoloaded samples when idle "
+"and\n"
+" this time passed\n"
+" --log-level[=LEVEL] Increase or set verbosity level\n"
+" -v Increase the verbosity level\n"
+" --log-target={auto,syslog,stderr} Specify the log target\n"
+" -p, --dl-search-path=PATH Set the search path for dynamic "
+"shared\n"
+" objects (plugins)\n"
+" --resample-method=METHOD Use the specified resampling method\n"
+" (See --dump-resample-methods for\n"
+" possible values)\n"
+" --use-pid-file[=BOOL] Create a PID file\n"
+" --no-cpu-limit[=BOOL] Do not install CPU load limiter on\n"
+" platforms that support it.\n"
+" --disable-shm[=BOOL] Disable shared memory support.\n"
+"\n"
+"STARTUP SCRIPT:\n"
+" -L, --load=\"MODULE ARGUMENTS\" Load the specified plugin module "
+"with\n"
+" the specified argument\n"
+" -F, --file=FILENAME Run the specified script\n"
+" -C Open a command line on the running "
+"TTY\n"
+" after startup\n"
+"\n"
+" -n Don't load default script file\n"
+msgstr ""
+"%s [options]\n"
+"\n"
+"COMMANDES :\n"
+" -h, --help Affiche cette aide\n"
+" --version Affiche la version\n"
+" --dump-conf Affiche la configuration par défaut\n"
+" --dump-modules Affiche la liste des modules "
+"disponibles\n"
+" --dump-resample-methods Affiche la liste des méthodes "
+"d'échantillonnage disponibles\n"
+" --cleanup-shm Nettoie les segments de mémoire "
+"partagée périmés\n"
+" --start Démarre le démon s'il n'est pas "
+"lancé\n"
+" -k --kill Tue un démon en cours d'exécution\n"
+" --check Vérifie s'il existe un démon en "
+"cours d'exécution\n"
+"\n"
+"OPTIONS :\n"
+" --system[=BOOL] Exécuter en tant qu'instance "
+"système\n"
+" -D, --daemonize[=BOOL] Définir en tant que démon après le "
+"démarrage\n"
+" --fail[=BOOL] Quitte quand le démarrage échoue\n"
+" --high-priority[=BOOL] Tente de définir un niveau nice plus "
+"élevé\n"
+" (seulement disponible en tant que "
+"root, avec le SUID ou\n"
+" avec un RLIMIT_NICE élevé)\n"
+" --realtime[=BOOL] Tente d'activer une planification en "
+"temps réel\n"
+" (seulement disponible en tant que "
+"root, avec le SUID ou\n"
+" ave un RLIMIT_RTPRIO élevé)\n"
+" --disallow-module-loading[=BOOL] Empêche les chargements/"
+"déchargements de module\n"
+" demandés par l'utilisateur après le "
+"démarrage\n"
+" --disallow-exit[=BOOL] Empêche les fermetures demandées par "
+"l'utilisateur\n"
+" --exit-idle-time=SECS Termine le démon quand la durée "
+"d'inactivité \n"
+" et ce temps se sont écoulés\n"
+" --module-idle-time=SECS Décharge les modules chargés "
+"automatiquement \n"
+" quand la durée d'inactivité et ce "
+"temps se sont écoulés\n"
+" --scache-idle-time=SECS Décharge les échantillons chargés "
+"automatiquement \n"
+" quand la durée d'inactivité et ce "
+"temps se sont écoulés\n"
+" --log-level[=NIVEAU] Augmente ou définit le niveau de "
+"verbosité\n"
+" -v Augmente le niveau de verbosité\n"
+" --log-target={auto,syslog,stderr} Indique la cible du journal\n"
+" -p, --dl-search-path=CHEMIN Définit le chemin de recherche pour "
+"les objets dynamiques\n"
+" partagés (extensions)\n"
+" --resample-method=MÉTHODE Utilise la méthode de "
+"rééchantillonnage indiquée\n"
+" (Voir --dump-resample-methods pour\n"
+" les valeurs possibles)\n"
+" --use-pid-file[=BOOL] Crée un fichier PID\n"
+" --no-cpu-limit[=BOOL] Ne pas installer de limiteur de "
+"charge CPU\n"
+" sur les plateformes qui le "
+"supportent.\n"
+" --disable-shm[=BOOL] Désactive la prise en charge de la "
+"mémoire partagée.\n"
+"\n"
+"SCRIPT DE DÉMARRAGE :\n"
+" -L, --load=\"PARAMÈTRES DU MODULE\" Charge le module d'extension indiqué "
+"avec\n"
+" le paramètre indiqué\n"
+" -F, --file=NOMDEFICHIER Exécute le script indiqué\n"
+" -C Ouvre une ligne de commande sur le "
+"TTY en cours \n"
+" après le démarrage\n"
+"\n"
+" -n Ne pas charger les fichiers de "
+"scripts par défaut\n"
+
+#: ../src/daemon/cmdline.c:245
+msgid "--daemonize expects boolean argument"
+msgstr "--daemonize requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:252
+msgid "--fail expects boolean argument"
+msgstr "--fail requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:262
+msgid ""
+"--log-level expects log level argument (either numeric in range 0..4 or one "
+"of debug, info, notice, warn, error)."
+msgstr ""
+"--log-level requiert un paramètre de niveau de journal (soit numérique entre "
+"0 et 4, soit de débogage : info, notice, warn , error)."
+
+#: ../src/daemon/cmdline.c:274
+msgid "--high-priority expects boolean argument"
+msgstr "--high-priority requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:281
+msgid "--realtime expects boolean argument"
+msgstr "--realtime requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:288
+msgid "--disallow-module-loading expects boolean argument"
+msgstr "--disallow-module-loading requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:295
+msgid "--disallow-exit boolean argument"
+msgstr "--disallow-exit requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:302
+msgid "--use-pid-file expects boolean argument"
+msgstr "--use-pid-file requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:319
+msgid "Invalid log target: use either 'syslog', 'stderr' or 'auto'."
+msgstr "Cible du journal invalide : utilisez « syslog », « stderr » ou « auto »."
+
+#: ../src/daemon/cmdline.c:338
+#, c-format
+msgid "Invalid resample method '%s'."
+msgstr "Méthode de rééchantillonnage invalide « %s »."
+
+#: ../src/daemon/cmdline.c:345
+msgid "--system expects boolean argument"
+msgstr "--system requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:352
+msgid "--no-cpu-limit expects boolean argument"
+msgstr "--no-cpu-limit requiert un paramètre booléen"
+
+#: ../src/daemon/cmdline.c:359
+msgid "--disable-shm expects boolean argument"
+msgstr "--disable-shm requiert un paramètre booléen"
+
+#: ../src/daemon/dumpmodules.c:60
+#, c-format
+msgid "Name: %s\n"
+msgstr "Nom : %s\n"
+
+#: ../src/daemon/dumpmodules.c:63
+#, c-format
+msgid "No module information available\n"
+msgstr "Aucune information de module disponible\n"
+
+#: ../src/daemon/dumpmodules.c:66
+#, c-format
+msgid "Version: %s\n"
+msgstr "Version : %s\n"
+
+#: ../src/daemon/dumpmodules.c:68
+#, c-format
+msgid "Description: %s\n"
+msgstr "Description : %s\n"
+
+#: ../src/daemon/dumpmodules.c:70
+#, c-format
+msgid "Author: %s\n"
+msgstr "Auteur : %s\n"
+
+#: ../src/daemon/dumpmodules.c:72
+#, c-format
+msgid "Usage: %s\n"
+msgstr "Utilisation : %s\n"
+
+#: ../src/daemon/dumpmodules.c:73
+#, c-format
+msgid "Load Once: %s\n"
+msgstr "Chargement unique : %s\n"
+
+#: ../src/daemon/dumpmodules.c:77
+#, c-format
+msgid "Path: %s\n"
+msgstr "Chemin : %s\n"
+
+# dans les lignes suivantes [%s = nom de fichier: %u = ligne dans celui-ci]
+#: ../src/daemon/daemon-conf.c:205
+#, c-format
+msgid "[%s:%u] Invalid log target '%s'."
+msgstr "[%s:%u] Cible du journal « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:221
+#, c-format
+msgid "[%s:%u] Invalid log level '%s'."
+msgstr "[%s:%u] Niveau du journal « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:237
+#, c-format
+msgid "[%s:%u] Invalid resample method '%s'."
+msgstr "[%s:%u] Méthode de rééchantillonnage « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:260
+#, c-format
+msgid "[%s:%u] Invalid rlimit '%s'."
+msgstr "[%s:%u] rlimit « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:267
+#, c-format
+msgid "[%s:%u] rlimit not supported on this platform."
+msgstr "[%s:%u] rlimit n'est pas pris en charge sur cette plateforme."
+
+#: ../src/daemon/daemon-conf.c:283
+#, c-format
+msgid "[%s:%u] Invalid sample format '%s'."
+msgstr "[%s:%u] Format d'échantillon « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:301
+#, c-format
+msgid "[%s:%u] Invalid sample rate '%s'."
+msgstr "[%s:%u] Taux d'échantillonnage « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:319
+#, c-format
+msgid "[%s:%u] Invalid sample channels '%s'."
+msgstr "[%s:%u] Canaux d'échantillonnage « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:337
+#, c-format
+msgid "[%s:%u] Invalid number of fragments '%s'."
+msgstr "[%s:%u] Nombre de fragments « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:355
+#, c-format
+msgid "[%s:%u] Invalid fragment size '%s'."
+msgstr "[%s:%u] Taille du fragment « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:373
+#, c-format
+msgid "[%s:%u] Invalid nice level '%s'."
+msgstr "[%s:%u] Niveau de priorité (nice) « %s » invalide."
+
+#: ../src/daemon/daemon-conf.c:570
+#, c-format
+msgid "Failed to open configuration file: %s"
+msgstr "Échec lors de l'ouverture du fichier de configuration : %s"
+
+#: ../src/daemon/daemon-conf.c:644
+#, c-format
+msgid "### Read from configuration file: %s ###\n"
+msgstr "### Lecture à partir du fichier de configuration : %s ###\n"
+
+#: ../src/daemon/caps.c:63
+msgid "Dropping root priviliges."
+msgstr "Abandon des permissions root."
+
+#: ../src/daemon/caps.c:103
+msgid "Limited capabilities successfully to CAP_SYS_NICE."
+msgstr "Limitation des capacités à CAP_SYS_NICE réussie."
+
+#: ../src/pulse/channelmap.c:102
+msgid "Mono"
+msgstr "Mono"
+
+#: ../src/pulse/channelmap.c:104
+msgid "Front Center"
+msgstr "Avant centre"
+
+#: ../src/pulse/channelmap.c:105
+msgid "Front Left"
+msgstr "Avant gauche"
+
+#: ../src/pulse/channelmap.c:106
+msgid "Front Right"
+msgstr "Avant droit"
+
+#: ../src/pulse/channelmap.c:108
+msgid "Rear Center"
+msgstr "Arrière centre"
+
+#: ../src/pulse/channelmap.c:109
+msgid "Rear Left"
+msgstr "Arrière gauche"
+
+#: ../src/pulse/channelmap.c:110
+msgid "Rear Right"
+msgstr "Arrière droit"
+
+#: ../src/pulse/channelmap.c:112
+msgid "Low Frequency Emmiter"
+msgstr "Émetteur à basse fréquence"
+
+#: ../src/pulse/channelmap.c:114
+msgid "Front Left-of-center"
+msgstr "Avant à gauche du centre"
+
+#: ../src/pulse/channelmap.c:115
+msgid "Front Right-of-center"
+msgstr "Avant à droite du centre"
+
+#: ../src/pulse/channelmap.c:117
+msgid "Side Left"
+msgstr "Côté gauche"
+
+#: ../src/pulse/channelmap.c:118
+msgid "Side Right"
+msgstr "Côté droit"
+
+#: ../src/pulse/channelmap.c:120
+msgid "Auxiliary 0"
+msgstr "Auxiliaire 0"
+
+#: ../src/pulse/channelmap.c:121
+msgid "Auxiliary 1"
+msgstr "Auxiliaire 1"
+
+#: ../src/pulse/channelmap.c:122
+msgid "Auxiliary 2"
+msgstr "Auxiliaire 2"
+
+#: ../src/pulse/channelmap.c:123
+msgid "Auxiliary 3"
+msgstr "Auxiliaire 3"
+
+#: ../src/pulse/channelmap.c:124
+msgid "Auxiliary 4"
+msgstr "Auxiliaire 4"
+
+#: ../src/pulse/channelmap.c:125
+msgid "Auxiliary 5"
+msgstr "Auxiliaire 5"
+
+#: ../src/pulse/channelmap.c:126
+msgid "Auxiliary 6"
+msgstr "Auxiliaire 6"
+
+#: ../src/pulse/channelmap.c:127
+msgid "Auxiliary 7"
+msgstr "Auxiliaire 7"
+
+#: ../src/pulse/channelmap.c:128
+msgid "Auxiliary 8"
+msgstr "Auxiliaire 8"
+
+#: ../src/pulse/channelmap.c:129
+msgid "Auxiliary 9"
+msgstr "Auxiliaire 9"
+
+#: ../src/pulse/channelmap.c:130
+msgid "Auxiliary 10"
+msgstr "Auxiliaire 10"
+
+#: ../src/pulse/channelmap.c:131
+msgid "Auxiliary 11"
+msgstr "Auxiliaire 11"
+
+#: ../src/pulse/channelmap.c:132
+msgid "Auxiliary 12"
+msgstr "Auxiliaire 12"
+
+#: ../src/pulse/channelmap.c:133
+msgid "Auxiliary 13"
+msgstr "Auxiliaire 13"
+
+#: ../src/pulse/channelmap.c:134
+msgid "Auxiliary 14"
+msgstr "Auxiliaire 14"
+
+#: ../src/pulse/channelmap.c:135
+msgid "Auxiliary 15"
+msgstr "Auxiliaire 15"
+
+#: ../src/pulse/channelmap.c:136
+msgid "Auxiliary 16"
+msgstr "Auxiliaire 16"
+
+#: ../src/pulse/channelmap.c:137
+msgid "Auxiliary 17"
+msgstr "Auxiliaire 17"
+
+#: ../src/pulse/channelmap.c:138
+msgid "Auxiliary 18"
+msgstr "Auxiliaire 18"
+
+#: ../src/pulse/channelmap.c:139
+msgid "Auxiliary 19"
+msgstr "Auxiliaire 19"
+
+#: ../src/pulse/channelmap.c:140
+msgid "Auxiliary 20"
+msgstr "Auxiliaire 20"
+
+#: ../src/pulse/channelmap.c:141
+msgid "Auxiliary 21"
+msgstr "Auxiliaire 21"
+
+#: ../src/pulse/channelmap.c:142
+msgid "Auxiliary 22"
+msgstr "Auxiliaire 22"
+
+#: ../src/pulse/channelmap.c:143
+msgid "Auxiliary 23"
+msgstr "Auxiliaire 23"
+
+#: ../src/pulse/channelmap.c:144
+msgid "Auxiliary 24"
+msgstr "Auxiliaire 24"
+
+#: ../src/pulse/channelmap.c:145
+msgid "Auxiliary 25"
+msgstr "Auxiliaire 25"
+
+#: ../src/pulse/channelmap.c:146
+msgid "Auxiliary 26"
+msgstr "Auxiliaire 26"
+
+#: ../src/pulse/channelmap.c:147
+msgid "Auxiliary 27"
+msgstr "Auxiliaire 27"
+
+#: ../src/pulse/channelmap.c:148
+msgid "Auxiliary 28"
+msgstr "Auxiliaire 28"
+
+#: ../src/pulse/channelmap.c:149
+msgid "Auxiliary 29"
+msgstr "Auxiliaire 29"
+
+#: ../src/pulse/channelmap.c:150
+msgid "Auxiliary 30"
+msgstr "Auxiliaire 30"
+
+#: ../src/pulse/channelmap.c:151
+msgid "Auxiliary 31"
+msgstr "Auxiliaire 31"
+
+#: ../src/pulse/channelmap.c:153
+msgid "Top Center"
+msgstr "Centre haut"
+
+#: ../src/pulse/channelmap.c:155
+msgid "Top Front Center"
+msgstr "Avant centre haut"
+
+#: ../src/pulse/channelmap.c:156
+msgid "Top Front Left"
+msgstr "Avant gauche haut"
+
+#: ../src/pulse/channelmap.c:157
+msgid "Top Front Right"
+msgstr "Avant droit haut"
+
+#: ../src/pulse/channelmap.c:159
+msgid "Top Rear Center"
+msgstr "Arrière centre haut"
+
+#: ../src/pulse/channelmap.c:160
+msgid "Top Rear Left"
+msgstr "Arrière gauche haut"
+
+#: ../src/pulse/channelmap.c:161
+msgid "Top Rear Right"
+msgstr "Arrière droit haut"
+
+#: ../src/pulse/channelmap.c:472 ../src/pulse/sample.c:144
+#: ../src/pulse/volume.c:163 ../src/pulse/volume.c:194
+#, fuzzy
+msgid "(invalid)"
+msgstr "Invalide"
+
+#: ../src/pulse/error.c:43
+msgid "OK"
+msgstr "OK"
+
+#: ../src/pulse/error.c:44
+msgid "Access denied"
+msgstr "Accès refusé"
+
+#: ../src/pulse/error.c:45
+msgid "Unknown command"
+msgstr "Commande inconnue"
+
+#: ../src/pulse/error.c:46
+msgid "Invalid argument"
+msgstr "Paramètre invalide"
+
+#: ../src/pulse/error.c:47
+msgid "Entity exists"
+msgstr "L'entité existe"
+
+#: ../src/pulse/error.c:48
+msgid "No such entity"
+msgstr "Aucune entité de ce type"
+
+#: ../src/pulse/error.c:49
+msgid "Connection refused"
+msgstr "Connexion refusée"
+
+#: ../src/pulse/error.c:50
+msgid "Protocol error"
+msgstr "Erreur du protocole"
+
+#: ../src/pulse/error.c:51
+msgid "Timeout"
+msgstr "Délai dépassé"
+
+#: ../src/pulse/error.c:52
+msgid "No authorization key"
+msgstr "Aucune clé d'autorisation"
+
+#: ../src/pulse/error.c:53
+msgid "Internal error"
+msgstr "Erreur interne"
+
+#: ../src/pulse/error.c:54
+msgid "Connection terminated"
+msgstr "Connexion terminée"
+
+#: ../src/pulse/error.c:55
+msgid "Entity killed"
+msgstr "L'entité a été tuée"
+
+#: ../src/pulse/error.c:56
+msgid "Invalid server"
+msgstr "Serveur invalide"
+
+#: ../src/pulse/error.c:57
+msgid "Module initalization failed"
+msgstr "Échec lors de l'initialisation du module"
+
+#: ../src/pulse/error.c:58
+msgid "Bad state"
+msgstr "État incorrect"
+
+#: ../src/pulse/error.c:59
+msgid "No data"
+msgstr "Aucune donnée"
+
+#: ../src/pulse/error.c:60
+msgid "Incompatible protocol version"
+msgstr "Version du protocole invalide"
+
+#: ../src/pulse/error.c:61
+msgid "Too large"
+msgstr "Trop grand"
+
+#: ../src/pulse/error.c:62
+msgid "Not supported"
+msgstr "Non pris en charge"
+
+#: ../src/pulse/error.c:63
+msgid "Unknown error code"
+msgstr "Code d'erreur inconnu"
+
+#: ../src/pulse/error.c:64
+msgid "No such extension"
+msgstr "Aucune extension de ce type"
+
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:100
+msgid "XOpenDisplay() failed"
+msgstr "Échec de XOpenDisplay()"
+
+#: ../src/pulse/client-conf-x11.c:78
+msgid "Failed to parse cookie data"
+msgstr "Échec lors de l'analyse des données du cookie"
+
+#: ../src/pulse/client-conf.c:120
+#, c-format
+msgid "Failed to open configuration file '%s': %s"
+msgstr "Échec lors de l'ouverture du fichier de configuration « %s » :%s"
+
+#: ../src/pulse/context.c:516
+msgid "No cookie loaded. Attempting to connect without."
+msgstr "Aucun cookie chargé. Tentative de connexion sans celui-ci."
+
+#: ../src/pulse/context.c:642
+#, c-format
+msgid "fork(): %s"
+msgstr "fork() : %s"
+
+#: ../src/pulse/context.c:695
+#, c-format
+msgid "waitpid(): %s"
+msgstr "waitpid() : %s"
+
+#: ../src/pulse/context.c:1256
+#, c-format
+msgid "Received message for unknown extension '%s'"
+msgstr "Message reçu pour une extension inconnue « %s »"
+
+#: ../src/utils/pacat.c:93
+#, c-format
+msgid "pa_stream_write() failed: %s\n"
+msgstr "Échec de pa_stream_write() : %s\n"
+
+#: ../src/utils/pacat.c:132
+#, c-format
+msgid "pa_stream_peek() failed: %s\n"
+msgstr "Échec de pa_stream_peek() : %s\n"
+
+#: ../src/utils/pacat.c:141
+#, c-format
+msgid "Buffer overrun, dropping incoming data\n"
+msgstr "Saturation du tampon, abandon des données entrantes\n"
+
+#: ../src/utils/pacat.c:143
+#, c-format
+msgid "pa_stream_drop() failed: %s\n"
+msgstr "Échec de pa_stream_drop() : %s\n"
+
+#: ../src/utils/pacat.c:169
+#, c-format
+msgid "Stream successfully created.\n"
+msgstr "Création du flux réussie.\n"
+
+#: ../src/utils/pacat.c:172
+#, c-format
+msgid "pa_stream_get_buffer_attr() failed: %s\n"
+msgstr "Échec de pa_stream_get_buffer_attr() : %s\n"
+
+#: ../src/utils/pacat.c:176
+#, c-format
+msgid "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n"
+msgstr "Mesures du tampon : maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n"
+
+#: ../src/utils/pacat.c:179
+#, c-format
+msgid "Buffer metrics: maxlength=%u, fragsize=%u\n"
+msgstr "Mesures du tampon : maxlength=%u, fragsize=%u\n"
+
+#: ../src/utils/pacat.c:183
+#, c-format
+msgid "Using sample spec '%s', channel map '%s'.\n"
+msgstr ""
+"Utilisation de la spécification d'échantillon « %s », plan des canaux « %s ».\n"
+
+# l'espace manquant entre %s et suspended est voulu
+#: ../src/utils/pacat.c:187
+#, c-format
+msgid "Connected to device %s (%u, %ssuspended).\n"
+msgstr "Connecté au périphérique %s (%u, %ssuspendu).\n"
+
+#: ../src/utils/pacat.c:197
+#, c-format
+msgid "Stream error: %s\n"
+msgstr "Erreur du flux : %s\n"
+
+#: ../src/utils/pacat.c:207
+#, c-format
+msgid "Stream device suspended.%s \n"
+msgstr "Périphérique de flux suspendu %s \n"
+
+#: ../src/utils/pacat.c:209
+#, c-format
+msgid "Stream device resumed.%s \n"
+msgstr "Périphérique de flux repris %s \n"
+
+#: ../src/utils/pacat.c:217
+#, c-format
+msgid "Stream underrun.%s \n"
+msgstr "Flux vide %s \n"
+
+#: ../src/utils/pacat.c:224
+#, c-format
+msgid "Stream overrun.%s \n"
+msgstr "Flux saturé %s \n"
+
+#: ../src/utils/pacat.c:231
+#, c-format
+msgid "Stream started.%s \n"
+msgstr "Flux démarré %s \n"
+
+#: ../src/utils/pacat.c:238
+#, c-format
+msgid "Stream moved to device %s (%u, %ssuspended).%s \n"
+msgstr "Flux déplacé vers le périphérique %s (%u, %ssuspendu).%s \n"
+
+# suspendu ou non suspendu
+#: ../src/utils/pacat.c:238
+msgid "not "
+msgstr "non "
+
+#: ../src/utils/pacat.c:259
+#, c-format
+msgid "Connection established.%s \n"
+msgstr "Connection établie.%s \n"
+
+#: ../src/utils/pacat.c:262
+#, c-format
+msgid "pa_stream_new() failed: %s\n"
+msgstr "Échec de pa_stream_new() : %s\n"
+
+#: ../src/utils/pacat.c:287
+#, c-format
+msgid "pa_stream_connect_playback() failed: %s\n"
+msgstr "Échec de pa_stream_connect_playback() : %s\n"
+
+#: ../src/utils/pacat.c:293
+#, c-format
+msgid "pa_stream_connect_record() failed: %s\n"
+msgstr "Échec de pa_stream_connect_record() : %s\n"
+
+#: ../src/utils/pacat.c:307 ../src/utils/pasuspender.c:159
+#: ../src/utils/pactl.c:666 ../src/utils/paplay.c:183
+#, c-format
+msgid "Connection failure: %s\n"
+msgstr "Échec lors de la connexion : %s\n"
+
+#: ../src/utils/pacat.c:328 ../src/utils/paplay.c:75
+#, c-format
+msgid "Failed to drain stream: %s\n"
+msgstr "Échec lors du vidage du flux : %s\n"
+
+#: ../src/utils/pacat.c:333 ../src/utils/paplay.c:80
+#, c-format
+msgid "Playback stream drained.\n"
+msgstr "Flux de lecture vidé.\n"
+
+#: ../src/utils/pacat.c:343 ../src/utils/paplay.c:92
+#, c-format
+msgid "Draining connection to server.\n"
+msgstr "Vidage de la connexion au serveur.\n"
+
+#: ../src/utils/pacat.c:369
+#, c-format
+msgid "Got EOF.\n"
+msgstr "EOF obtenu.\n"
+
+#: ../src/utils/pacat.c:375
+#, c-format
+msgid "pa_stream_drain(): %s\n"
+msgstr "pa_stream_drain() : %s\n"
+
+#: ../src/utils/pacat.c:385
+#, c-format
+msgid "read() failed: %s\n"
+msgstr "Échec de read() : %s\n"
+
+#: ../src/utils/pacat.c:417
+#, c-format
+msgid "write() failed: %s\n"
+msgstr "Échec de write() : %s\n"
+
+#: ../src/utils/pacat.c:438
+#, c-format
+msgid "Got signal, exiting.\n"
+msgstr "Signal obtenu, fermeture.\n"
+
+#: ../src/utils/pacat.c:452
+#, c-format
+msgid "Failed to get latency: %s\n"
+msgstr "Échec lors de l'obtention de la latence : %s\n"
+
+#: ../src/utils/pacat.c:457
+#, c-format
+msgid "Time: %0.3f sec; Latency: %0.0f usec. \r"
+msgstr "Durée : %0.3f s ; Latency : %0.0f µs. \r"
+
+#: ../src/utils/pacat.c:477
+#, c-format
+msgid "pa_stream_update_timing_info() failed: %s\n"
+msgstr "Échec de pa_stream_update_timing_info() : %s\n"
+
+# downmix = par ex. convertir 5 canaux en 2 canaux
+# upmixer = par ex. convertir 2 canaux en 5 canaux
+# https://bugzilla.redhat.com/show_bug.cgi?id=460798
+#: ../src/utils/pacat.c:490
+#, fuzzy, c-format
+msgid ""
+"%s [options]\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -r, --record Create a connection for recording\n"
+" -p, --playback Create a connection for playback\n"
+"\n"
+" -v, --verbose Enable verbose operations\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -d, --device=DEVICE The name of the sink/source to "
+"connect to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+" --stream-name=NAME How to call this stream on the "
+"server\n"
+" --volume=VOLUME Specify the initial (linear) volume "
+"in range 0...65536\n"
+" --rate=SAMPLERATE The sample rate in Hz (defaults to "
+"44100)\n"
+" --format=SAMPLEFORMAT The sample type, one of s16le, "
+"s16be, u8, float32le,\n"
+" float32be, ulaw, alaw, s32le, s32be "
+"(defaults to s16ne)\n"
+" --channels=CHANNELS The number of channels, 1 for mono, "
+"2 for stereo\n"
+" (defaults to 2)\n"
+" --channel-map=CHANNELMAP Channel map to use instead of the "
+"default\n"
+" --fix-format Take the sample format from the sink "
+"the stream is\n"
+" being connected to.\n"
+" --fix-rate Take the sampling rate from the sink "
+"the stream is\n"
+" being connected to.\n"
+" --fix-channels Take the number of channels and the "
+"channel map\n"
+" from the sink the stream is being "
+"connected to.\n"
+" --no-remix Don't upmix or downmix channels.\n"
+" --no-remap Map channels by index instead of "
+"name.\n"
+" --latency=BYTES Request the specified latency in "
+"bytes.\n"
+" --process-time=BYTES Request the specified process time "
+"per request in bytes.\n"
+msgstr ""
+"%s [options]\n"
+"\n"
+" -h, --help Affiche cette aide\n"
+" --version Affiche la version\n"
+"\n"
+" -r, --record Crée une connexion pour "
+"l'enregistrement\n"
+" -p, --playback Crée une connexion pour la lecture\n"
+"\n"
+" -v, --verbose Active le mode verbeux\n"
+"\n"
+" -s, --server=SERVEUR Le nom du serveur auquel se "
+"connecter\n"
+" -d, --device=PÉRIPHÉRIQUE Le nom de la destination/source à "
+"laquelle de connecter\n"
+" -n, --client-name=NOM Définit le nom de ce client sur le "
+"serveur\n"
+" --stream-name=NOM Définit le nom de ce flux sur le "
+"serveur\n"
+" --volume=VOLUME Indique le volume initial (linéaire) "
+"entre 0 et 65536\n"
+" --rate=TAUXDÉCHANTILLONNAGE Le taux d'échantillonnage en Hz (par "
+"défaut 44100)\n"
+" --format=FORMATDELÉCHANTILLON Le type de l'échantillon, parmi : "
+"s16le, s16be, u8, float32le,\n"
+" float32be, ulaw, alaw (par défaut "
+"s16ne)\n"
+" --channels=CANAUX Le nombre de canaux, 1 pour mono, 2 "
+"pour stéréo\n"
+" (par défaut 2)\n"
+" --channel-map=PLANDESCANAUX Plan des canaux à utiliser au lieu "
+"de celui par défaut\n"
+" --fix-format Prend le format de l'échantillon de "
+"la destination où le flux\n"
+" est en train de se connecter.\n"
+" --fix-rate Prend le taux d'échantillonnage de "
+"la destination où le flux\n"
+" est en train de se connecter.\n"
+" --fix-channels Prend le nombre et le plan des "
+"canaux de la destination \n"
+" où le flux est en train de se "
+"connecter.\n"
+" --no-remix Ne pas augmenter ou diminuer le "
+"nombre de canaux par mixage.\n"
+" --no-remap Créer le plan des canaux par index "
+"et non par nom.\n"
+" --latency=OCTETS Demande la latence indiquée en "
+"octets.\n"
+" --process-time=OCTETS Demande le temps de traitement "
+"indiqué par requête en octets.\n"
+
+#: ../src/utils/pacat.c:591
+#, c-format
+msgid ""
+"pacat %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+"pacat %s\n"
+"Compilé avec libpulse %s\n"
+"Lié avec libpulse %s\n"
+
+#: ../src/utils/pacat.c:647
+#, c-format
+msgid "Invalid channel map '%s'\n"
+msgstr "Plan des canaux invalide « %s »\n"
+
+#: ../src/utils/pacat.c:676
+#, c-format
+msgid "Invalid latency specification '%s'\n"
+msgstr "Spécification de latence invalide « %s »\n"
+
+#: ../src/utils/pacat.c:683
+#, c-format
+msgid "Invalid process time specification '%s'\n"
+msgstr "Spécification de temps de traitement invalide « %s »\n"
+
+#: ../src/utils/pacat.c:694
+#, c-format
+msgid "Invalid sample specification\n"
+msgstr "Spécification d'échantillon invalide\n"
+
+#: ../src/utils/pacat.c:699
+#, c-format
+msgid "Channel map doesn't match sample specification\n"
+msgstr ""
+"Le plan des canaux ne correspond pas à la spécification d'échantillon\n"
+
+#: ../src/utils/pacat.c:706
+#, c-format
+msgid "Opening a %s stream with sample specification '%s'.\n"
+msgstr "Ouverture d'un flux %s avec une spécification d'échantillon « %s ».\n"
+
+#: ../src/utils/pacat.c:706
+msgid "recording"
+msgstr "enregistrement"
+
+#: ../src/utils/pacat.c:706
+msgid "playback"
+msgstr "lecture"
+
+#: ../src/utils/pacat.c:714
+#, c-format
+msgid "open(): %s\n"
+msgstr "open() : %s\n"
+
+#: ../src/utils/pacat.c:719
+#, c-format
+msgid "dup2(): %s\n"
+msgstr "dup2() : %s\n"
+
+#: ../src/utils/pacat.c:729
+#, c-format
+msgid "Too many arguments.\n"
+msgstr "Trop de paramètres.\n"
+
+#: ../src/utils/pacat.c:742 ../src/utils/pasuspender.c:280
+#: ../src/utils/pactl.c:909 ../src/utils/paplay.c:381
+#, c-format
+msgid "pa_mainloop_new() failed.\n"
+msgstr "Échec de pa_mainloop_new().\n"
+
+#: ../src/utils/pacat.c:763
+#, c-format
+msgid "io_new() failed.\n"
+msgstr "Échec de io_new().\n"
+
+#: ../src/utils/pacat.c:769 ../src/utils/pasuspender.c:293
+#: ../src/utils/pactl.c:923 ../src/utils/paplay.c:396
+#, c-format
+msgid "pa_context_new() failed.\n"
+msgstr "Échec de pa_context_new().\n"
+
+#: ../src/utils/pacat.c:777
+#, fuzzy, c-format
+msgid "pa_context_connect() failed: %s"
+msgstr "Échec de pa_context_new().\n"
+
+#: ../src/utils/pacat.c:788
+#, c-format
+msgid "time_new() failed.\n"
+msgstr "Échec de time_new().\n"
+
+#: ../src/utils/pacat.c:795 ../src/utils/pasuspender.c:301
+#: ../src/utils/pactl.c:931 ../src/utils/paplay.c:407
+#, c-format
+msgid "pa_mainloop_run() failed.\n"
+msgstr "Échec de pa_mainloop_run().\n"
+
+#: ../src/utils/pasuspender.c:81
+#, c-format
+msgid "fork(): %s\n"
+msgstr "fork() : %s\n"
+
+#: ../src/utils/pasuspender.c:92
+#, c-format
+msgid "execvp(): %s\n"
+msgstr "execvp() : %s\n"
+
+#: ../src/utils/pasuspender.c:109
+#, c-format
+msgid "Failure to suspend: %s\n"
+msgstr "Échec lors de la suspension : %s\n"
+
+#: ../src/utils/pasuspender.c:124
+#, c-format
+msgid "Failure to resume: %s\n"
+msgstr "Échec lors de la reprise : %s\n"
+
+#: ../src/utils/pasuspender.c:147
+#, c-format
+msgid "WARNING: Sound server is not local, not suspending.\n"
+msgstr ""
+"AVERTISSEMENT : le serveur de son n'est pas local, suspension annulée.\n"
+
+#: ../src/utils/pasuspender.c:176 ../src/utils/pactl.c:672
+#: ../src/utils/paplay.c:191
+#, c-format
+msgid "Got SIGINT, exiting.\n"
+msgstr "SIGINT reçu, fermeture.\n"
+
+#: ../src/utils/pasuspender.c:194
+#, c-format
+msgid "WARNING: Child process terminated by signal %u\n"
+msgstr "AVERTISSEMENT : le processus fils a été terminé par le signal %u\n"
+
+#: ../src/utils/pasuspender.c:212
+#, c-format
+msgid ""
+"%s [options] ... \n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+"\n"
+msgstr ""
+"%s [options] ... \n"
+"\n"
+" -h, --help Affiche cette aide\n"
+" --version Affiche la version\n"
+" -s, --server=SERVEUR Le nom du serveur auquel se "
+"connecter\n"
+"\n"
+
+#: ../src/utils/pasuspender.c:251
+#, c-format
+msgid ""
+"pasuspender %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+"pasuspender %s\n"
+"Compilé avec libpulse %s\n"
+"Lié avec libpulse %s\n"
+
+#: ../src/utils/pactl.c:107
+#, c-format
+msgid "Failed to get statistics: %s\n"
+msgstr "Échec lors de l'obtention des statistiques : %s\n"
+
+#: ../src/utils/pactl.c:113
+#, c-format
+msgid "Currently in use: %u blocks containing %s bytes total.\n"
+msgstr "En cours d'utilisation : %u blocs contenant au total %s octets.\n"
+
+#: ../src/utils/pactl.c:116
+#, c-format
+msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
+msgstr ""
+"Alloué pendant l'ensemble de la durée d'exécution : %u blocs contenant au "
+"total %s octets.\n"
+
+#: ../src/utils/pactl.c:119
+#, c-format
+msgid "Sample cache size: %s\n"
+msgstr "Taille du cache de l'échantillon : %s\n"
+
+#: ../src/utils/pactl.c:128
+#, c-format
+msgid "Failed to get server information: %s\n"
+msgstr "Échec lors de l'obtention des informations du serveur : %s\n"
+
+#: ../src/utils/pactl.c:135
+#, c-format
+msgid ""
+"User name: %s\n"
+"Host Name: %s\n"
+"Server Name: %s\n"
+"Server Version: %s\n"
+"Default Sample Specification: %s\n"
+"Default Sink: %s\n"
+"Default Source: %s\n"
+"Cookie: %08x\n"
+msgstr ""
+"Nom d'utilisateur : %s\n"
+"Nom d'hôte : %s\n"
+"Nom du serveur : %s\n"
+"Version du serveur : %s\n"
+"Spécification d'échantillon par défaut : %s\n"
+"Destination par défaut : %s\n"
+"Source par défaut : %s\n"
+"Cookie : %08x\n"
+
+#: ../src/utils/pactl.c:160
+#, c-format
+msgid "Failed to get sink information: %s\n"
+msgstr "Échec lors de l'obtention des informations sur la destination : %s\n"
+
+# demander à Lennart s'il s'agit de monitor of source
+#: ../src/utils/pactl.c:176
+#, c-format
+msgid ""
+"*** Sink #%u ***\n"
+"Name: %s\n"
+"Driver: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Owner Module: %u\n"
+"Volume: %s\n"
+"Monitor Source: %s\n"
+"Latency: %0.0f usec, configured %0.0f usec\n"
+"Flags: %s%s%s%s%s%s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+"*** Destination #%u ***\n"
+"Nom : %s\n"
+"Pilote : %s\n"
+"Spécification de l'échantillon : %s\n"
+"Plan des canaux : %s\n"
+"Module propriétaire : %u\n"
+"Volume : %s\n"
+"Moniteur de la source : %s\n"
+"Latence : %0.0f µs, %0.0f µs configurée \n"
+"Drapeaux : %s%s%s%s%s%s\n"
+"Propriétés :\n"
+"%s"
+
+#: ../src/utils/pactl.c:193 ../src/utils/pactl.c:371
+msgid "muted"
+msgstr "en sourdine"
+
+#: ../src/utils/pactl.c:212
+#, c-format
+msgid "Failed to get source information: %s\n"
+msgstr "Échec lors de l'obtention des informations sur la source : %s\n"
+
+#: ../src/utils/pactl.c:228
+#, c-format
+msgid ""
+"*** Source #%u ***\n"
+"Name: %s\n"
+"Driver: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Owner Module: %u\n"
+"Volume: %s\n"
+"Monitor of Sink: %s\n"
+"Latency: %0.0f usec, configured %0.0f usec\n"
+"Flags: %s%s%s%s%s%s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+"*** Source #%u ***\n"
+"Nom : %s\n"
+"Pilote : %s\n"
+"Spécification de l'échantillon : %s\n"
+"Plan des canaux : %s\n"
+"Module propriétaire : %u\n"
+"Volume : %s\n"
+"Moniteur de la destination : %s\n"
+"Latence : %0.0f µs, %0.0f µs configurée \n"
+"Drapeaux : %s%s%s%s%s%s\n"
+"Propriétés :\n"
+"%s"
+
+#: ../src/utils/pactl.c:246 ../src/utils/pactl.c:289 ../src/utils/pactl.c:322
+#: ../src/utils/pactl.c:366 ../src/utils/pactl.c:367 ../src/utils/pactl.c:374
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:419 ../src/utils/pactl.c:425
+#: ../src/utils/pactl.c:468 ../src/utils/pactl.c:469 ../src/utils/pactl.c:473
+msgid "n/a"
+msgstr "n/d"
+
+#: ../src/utils/pactl.c:263
+#, c-format
+msgid "Failed to get module information: %s\n"
+msgstr "Échec lors de l'obtention des informations du module : %s\n"
+
+#: ../src/utils/pactl.c:281
+#, c-format
+msgid ""
+"*** Module #%u ***\n"
+"Name: %s\n"
+"Argument: %s\n"
+"Usage counter: %s\n"
+"Auto unload: %s\n"
+msgstr ""
+"*** Module #%u ***\n"
+"Nom : %s\n"
+"Paramètre : %s\n"
+"Nombre d'utilisations : %s\n"
+"Déchargement automatique : %s\n"
+
+#: ../src/utils/pactl.c:298
+#, c-format
+msgid "Failed to get client information: %s\n"
+msgstr "Échec lors de l'obtention des informations du client : %s\n"
+
+#: ../src/utils/pactl.c:316
+#, c-format
+msgid ""
+"*** Client #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+"*** Client #%u ***\n"
+"Pilote : %s\n"
+"Module propriétaire : %s\n"
+"Propriétés :\n"
+"%s"
+
+#: ../src/utils/pactl.c:333
+#, c-format
+msgid "Failed to get sink input information: %s\n"
+msgstr ""
+"Échec lors de l'obtention des informations de l'entrée de la destination : %"
+"s\n"
+
+#: ../src/utils/pactl.c:352
+#, c-format
+msgid ""
+"*** Sink Input #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Client: %s\n"
+"Sink: %u\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Volume: %s\n"
+"Buffer Latency: %0.0f usec\n"
+"Sink Latency: %0.0f usec\n"
+"Resample method: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+"*** Entrée de la destination #%u ***\n"
+"Pilote : %s\n"
+"Module propriétaire : %s\n"
+"Client : %s\n"
+"Destination : %u\n"
+"Spécification de l'échantillon : %s\n"
+"Plan des canaux : %s\n"
+"Volume : %s\n"
+"Latence du tampon : %0.0f µs\n"
+"Latence de la destination : %0.0f µs\n"
+"Méthode de rééchantillonnage : %s\n"
+"Propriétés :\n"
+"%s"
+
+#: ../src/utils/pactl.c:385
+#, c-format
+msgid "Failed to get source output information: %s\n"
+msgstr ""
+"Échec lors de l'obtention des informations de la sortie de la source : %s\n"
+
+#: ../src/utils/pactl.c:405
+#, c-format
+msgid ""
+"*** Source Output #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Client: %s\n"
+"Source: %u\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Buffer Latency: %0.0f usec\n"
+"Source Latency: %0.0f usec\n"
+"Resample method: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+"*** Source Output #%u ***\n"
+"Pilote : %s\n"
+"Module propriétaire : %s\n"
+"Client : %s\n"
+"Source : %u\n"
+"Spécification de l'échantillon : %s\n"
+"Plan des canaux : %s\n"
+"Latence du tampon : %0.0f µs\n"
+"Latence de la source : %0.0f µs\n"
+"Méthode de rééchantillonnage : %s\n"
+"Propriétés :\n"
+"%s"
+
+#: ../src/utils/pactl.c:436
+#, c-format
+msgid "Failed to get sample information: %s\n"
+msgstr "Échec lors de l'obtention des informations de l'échantillon : %s\n"
+
+# Lazy ?
+# load-sample-lazy = Create a new entry in the sample cache, but don't load
+# the sample immediately. The sample is loaded only when it is first used
+#: ../src/utils/pactl.c:455
+#, c-format
+msgid ""
+"*** Sample #%u ***\n"
+"Name: %s\n"
+"Volume: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Duration: %0.1fs\n"
+"Size: %s\n"
+"Lazy: %s\n"
+"Filename: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+"*** Échantillon #%u ***\n"
+"Nom : %s\n"
+"Volume : %s\n"
+"Spécification de l'échantillon : %s\n"
+"Plan des canaux : %s\n"
+"Durée : %0.1f s\n"
+"Taille : %s\n"
+"Cache retardé : %s\n"
+"Nom de fichier : %s\n"
+"Propriétés :\n"
+"%s"
+
+#: ../src/utils/pactl.c:481
+#, c-format
+msgid "Failed to get autoload information: %s\n"
+msgstr ""
+"Échec lors de l'obtention des informations du chargement automatique : %s\n"
+
+#: ../src/utils/pactl.c:497
+#, c-format
+msgid ""
+"*** Autoload Entry #%u ***\n"
+"Name: %s\n"
+"Type: %s\n"
+"Module: %s\n"
+"Argument: %s\n"
+msgstr ""
+"*** Entrée de chargement automatique #%u ***\n"
+"Nom : %s\n"
+"Type : %s\n"
+"Module : %s\n"
+"Paramètre : %s\n"
+
+#: ../src/utils/pactl.c:504
+msgid "sink"
+msgstr "destination"
+
+#: ../src/utils/pactl.c:504
+msgid "source"
+msgstr "source"
+
+#: ../src/utils/pactl.c:511 ../src/utils/pactl.c:521
+#, c-format
+msgid "Failure: %s\n"
+msgstr "Échec : %s\n"
+
+#: ../src/utils/pactl.c:545
+#, c-format
+msgid "Failed to upload sample: %s\n"
+msgstr "Échec lors de l'envoi de l'échantillon : %s\n"
+
+#: ../src/utils/pactl.c:562
+#, c-format
+msgid "Premature end of file\n"
+msgstr "Fin prématurée du fichier\n"
+
+#: ../src/utils/pactl.c:678
+#, c-format
+msgid ""
+"%s [options] stat\n"
+"%s [options] list\n"
+"%s [options] exit\n"
+"%s [options] upload-sample FILENAME [NAME]\n"
+"%s [options] play-sample NAME [SINK]\n"
+"%s [options] remove-sample NAME\n"
+"%s [options] move-sink-input ID SINK\n"
+"%s [options] move-source-output ID SOURCE\n"
+"%s [options] load-module NAME [ARGS ...]\n"
+"%s [options] unload-module ID\n"
+"%s [options] suspend-sink [SINK] 1|0\n"
+"%s [options] suspend-source [SOURCE] 1|0\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+msgstr ""
+"%s [options] stat\n"
+"%s [options] list\n"
+"%s [options] exit\n"
+"%s [options] upload-sample NOMDEFICHIER [NOM]\n"
+"%s [options] play-sample NOM [DEST]\n"
+"%s [options] remove-sample NOM\n"
+"%s [options] move-sink-input ID DEST\n"
+"%s [options] move-source-output ID SOURCE\n"
+"%s [options] load-module NOM [PARAMS ...]\n"
+"%s [options] unload-module ID\n"
+"%s [options] suspend-sink [DEST] 1|0\n"
+"%s [options] suspend-source [SOURCE] 1|0\n"
+"\n"
+" -h, --help Affiche cette aide\n"
+" --version Affiche la version\n"
+"\n"
+" -s, --server=SERVEUR Le nom du serveur auquel se "
+"connecter\n"
+" -n, --client-name=NOM Définit le nom de ce client sur le "
+"serveur\n"
+
+#: ../src/utils/pactl.c:729
+#, c-format
+msgid ""
+"pactl %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+"pactl %s\n"
+"Compilé avec libpulse %s\n"
+"Lié avec libpulse %s\n"
+
+#: ../src/utils/pactl.c:768
+#, c-format
+msgid "Please specify a sample file to load\n"
+msgstr "Veuillez indiquer un fichier d'échantillon à charger\n"
+
+#: ../src/utils/pactl.c:790
+#, c-format
+msgid "Failed to open sound file.\n"
+msgstr "Échec lors de l'ouverture du fichier audio.\n"
+
+#: ../src/utils/pactl.c:802
+#, c-format
+msgid "You have to specify a sample name to play\n"
+msgstr "Vous devez indiquer un nom d'échantillon à lire\n"
+
+#: ../src/utils/pactl.c:814
+#, c-format
+msgid "You have to specify a sample name to remove\n"
+msgstr "Vous devez indiquer un nom d'échantillon à supprimer\n"
+
+#: ../src/utils/pactl.c:822
+#, c-format
+msgid "You have to specify a sink input index and a sink\n"
+msgstr ""
+"Vous devez indiquer un index de sortie de destination et une destination\n"
+
+#: ../src/utils/pactl.c:831
+#, c-format
+msgid "You have to specify a source output index and a source\n"
+msgstr "Vous devez indiquer un index de sortie de source et une source\n"
+
+#: ../src/utils/pactl.c:845
+#, c-format
+msgid "You have to specify a module name and arguments.\n"
+msgstr "Vous devez indiquer un nom de module et des paramètres.\n"
+
+#: ../src/utils/pactl.c:865
+#, c-format
+msgid "You have to specify a module index\n"
+msgstr "Vous devez indiquer un index de module\n"
+
+#: ../src/utils/pactl.c:875
+#, c-format
+msgid ""
+"You may not specify more than one sink. You have to specify at least one "
+"boolean value.\n"
+msgstr ""
+"Vous ne pouvez pas indiquer plus d'une destination. Vous devez indiquer au "
+"moins une valeur booléenne.\n"
+
+#: ../src/utils/pactl.c:888
+#, c-format
+msgid ""
+"You may not specify more than one source. You have to specify at least one "
+"boolean value.\n"
+msgstr ""
+"Vous ne pouvez pas indiquer plus d'une source. Vous devez indiquer au moins "
+"une valeur booléenne.\n"
+
+#: ../src/utils/pactl.c:904
+#, c-format
+msgid "No valid command specified.\n"
+msgstr "Aucune commande valide indiquée.\n"
+
+#: ../src/utils/pax11publish.c:61
+#, c-format
+msgid ""
+"%s [-D display] [-S server] [-O sink] [-I source] [-c file] [-d|-e|-i|-r]\n"
+"\n"
+" -d Show current PulseAudio data attached to X11 display (default)\n"
+" -e Export local PulseAudio data to X11 display\n"
+" -i Import PulseAudio data from X11 display to local environment "
+"variables and cookie file.\n"
+" -r Remove PulseAudio data from X11 display\n"
+msgstr ""
+"%s [-D visuel] [-S serveur] [-O destination] [-I source] [-c fichier] [-d|-"
+"e|-i|-r]\n"
+"\n"
+" -d Affiche les données PulseAudio actuelles attachées au visuel X11 (par "
+"défaut)\n"
+" -e Exporte les données PulseAudio locales vers le visuel X11\n"
+" -i Importe les données PulseAudio depuis le visuel X11 vers les "
+"variables de l'environnement local et le fichier de cookie.\n"
+" -r Enlève les données PulseAudio du visuel X11\n"
+
+#: ../src/utils/pax11publish.c:94
+#, c-format
+msgid "Failed to parse command line.\n"
+msgstr "Échec lors de l'analyse de la ligne de commande.\n"
+
+#: ../src/utils/pax11publish.c:108
+#, c-format
+msgid "Server: %s\n"
+msgstr "Serveur : %s\n"
+
+#: ../src/utils/pax11publish.c:110
+#, c-format
+msgid "Source: %s\n"
+msgstr "Source : %s\n"
+
+#: ../src/utils/pax11publish.c:112
+#, c-format
+msgid "Sink: %s\n"
+msgstr "Destination : %s\n"
+
+#: ../src/utils/pax11publish.c:114
+#, c-format
+msgid "Cookie: %s\n"
+msgstr "Cookie : %s\n"
+
+#: ../src/utils/pax11publish.c:132
+#, c-format
+msgid "Failed to parse cookie data\n"
+msgstr "Échec lors de l'analyse des données du cookie\n"
+
+#: ../src/utils/pax11publish.c:137
+#, c-format
+msgid "Failed to save cookie data\n"
+msgstr "Échec lors de l'enregistrement des données du cookie\n"
+
+#: ../src/utils/pax11publish.c:152
+#, c-format
+msgid "Failed to load client configuration file.\n"
+msgstr "Échec lors du chargement du fichier de configuration du client.\n"
+
+#: ../src/utils/pax11publish.c:157
+#, c-format
+msgid "Failed to read environment configuration data.\n"
+msgstr ""
+"Échec lors de la lecture des données de configuration de l'environnement.\n"
+
+# Fully Qualified Domain Name
+#: ../src/utils/pax11publish.c:174
+#, c-format
+msgid "Failed to get FQDN.\n"
+msgstr "Échec lors de l'obtention du FQDN (« nom de domaine complet »).\n"
+
+#: ../src/utils/pax11publish.c:194
+#, c-format
+msgid "Failed to load cookie data\n"
+msgstr "Échec lors du chargement des données du cookie\n"
+
+#: ../src/utils/pax11publish.c:211
+#, c-format
+msgid "Not yet implemented.\n"
+msgstr "Pas encore implémenté.\n"
+
+#: ../src/utils/pacmd.c:64
+#, c-format
+msgid "socket(PF_UNIX, SOCK_STREAM, 0): %s"
+msgstr "socket(PF_UNIX, SOCK_STREAM, 0) : %s"
+
+#: ../src/utils/pacmd.c:81
+#, c-format
+msgid "connect(): %s"
+msgstr "connect() : %s"
+
+#: ../src/utils/pacmd.c:89
+msgid "Failed to kill PulseAudio daemon."
+msgstr "Impossible de tuer le démon PulseAudio."
+
+#: ../src/utils/pacmd.c:97
+msgid "Daemon not responding."
+msgstr "Le démon ne répond pas."
+
+#: ../src/utils/pacmd.c:112
+#, c-format
+msgid "select(): %s"
+msgstr "select() : %s"
+
+#: ../src/utils/pacmd.c:124 ../src/utils/pacmd.c:140
+#, c-format
+msgid "read(): %s"
+msgstr "read() : %s"
+
+#: ../src/utils/pacmd.c:153 ../src/utils/pacmd.c:167
+#, c-format
+msgid "write(): %s"
+msgstr "write() : %s"
+
+#: ../src/utils/paplay.c:139
+#, c-format
+msgid "Stream successfully created\n"
+msgstr "Création du flux réussie\n"
+
+#: ../src/utils/paplay.c:144
+#, c-format
+msgid "Stream errror: %s\n"
+msgstr "Erreur du flux : %s\n"
+
+#: ../src/utils/paplay.c:165
+#, c-format
+msgid "Connection established.\n"
+msgstr "Connexion établie.\n"
+
+#: ../src/utils/paplay.c:198
+#, c-format
+msgid ""
+"%s [options] [FILE]\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -v, --verbose Enable verbose operation\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -d, --device=DEVICE The name of the sink to connect to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+" --stream-name=NAME How to call this stream on the "
+"server\n"
+" --volume=VOLUME Specify the initial (linear) volume "
+"in range 0...65536\n"
+" --channel-map=CHANNELMAP Set the channel map to the use\n"
+msgstr ""
+"%s [options] [FICHIER]\n"
+"\n"
+" -h, --help Affiche cette aide\n"
+" --version Affiche la version\n"
+"\n"
+" -v, --verbose Active le mode verbeux\n"
+"\n"
+" -s, --server=SERVEUR Le nom du serveur auquel se "
+"connecter\n"
+" -d, --device=PÉRIPHÉRIQUE Le nom de la destination à laquelle "
+"se connecter\n"
+" -n, --client-name=NOM Définit le nom de ce client sur le "
+"serveur\n"
+" --stream-name=NOM Définit le nom de ce flux sur le "
+"serveur\n"
+" --volume=VOLUME Définit le volume initial (linéaire) "
+"entre 0 et 65536\n"
+" --channel-map=PLANDESCANAUX Définit le plan des canaux à "
+"utiliser\n"
+
+#: ../src/utils/paplay.c:255
+#, c-format
+msgid ""
+"paplay %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+"paplay %s\n"
+"Compilé avec libpulse %s\n"
+"Lié avec libpulse %s\n"
+
+#: ../src/utils/paplay.c:292
+#, c-format
+msgid "Invalid channel map\n"
+msgstr "Plan des canaux invalide\n"
+
+#: ../src/utils/paplay.c:314
+#, c-format
+msgid "Failed to open file '%s'\n"
+msgstr "Échec lors de l'ouverture du fichier « %s »\n"
+
+#: ../src/utils/paplay.c:350
+#, c-format
+msgid "Channel map doesn't match file.\n"
+msgstr "Le plan des canaux ne correspond pas au fichier.\n"
+
+#: ../src/utils/paplay.c:376
+#, c-format
+msgid "Using sample spec '%s'\n"
+msgstr "Utilisation de la spécification de l'échantillon « %s »\n"
+
+#: ../src/pulsecore/lock-autospawn.c:126 ../src/pulsecore/lock-autospawn.c:207
+msgid "Cannot access autospawn lock."
+msgstr ""
+
+#~ msgid ""
+#~ "' and PolicyKit refuse to grant us priviliges. Dropping SUID again.\n"
+#~ "For enabling real-time scheduling please acquire the appropriate "
+#~ "PolicyKit priviliges, or become a member of '"
+#~ msgstr ""
+#~ " et PolicyKit refuse de nous accorder les permissions. Abandon du SUID à "
+#~ "nouveau.\n"
+#~ "Pour activer la planification en temps réel, veuillez aquérir les "
+#~ "permissions PolicyKit appropriées, ou devenez membre de "
+
+#~ msgid ""
+#~ "', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this "
+#~ "user."
+#~ msgstr ""
+#~ ", ou augmentez les limites de ressource RLIMIT_NICE/RLIMIT_RTPRIO pour "
+#~ "cet utilisateur."
+
+#~ msgid "socketpair(): %s"
+#~ msgstr "socketpair() : %s"
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 0000000..269a225
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,1836 @@
+# Swedish translation for pulseaudio.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the pulseaudio package.
+# Daniel Nylander <po@danielnylander.se>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pulseaudio\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-10-06 03:21+0200\n"
+"PO-Revision-Date: 2008-09-05 18:24+0100\n"
+"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/daemon/ltdl-bind-now.c:177 ../src/daemon/ltdl-bind-now.c:197
+msgid "Failed to add bind-now-loader."
+msgstr ""
+
+#: ../src/daemon/ltdl-bind-now.c:184
+msgid "Failed to find original dlopen loader."
+msgstr ""
+
+#: ../src/daemon/polkit.c:55
+#, c-format
+msgid "Cannot connect to system bus: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:65
+#, c-format
+msgid "Cannot get caller from PID: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:77
+msgid "Cannot set UID on caller object."
+msgstr ""
+
+#: ../src/daemon/polkit.c:82
+msgid "Failed to get CK session."
+msgstr ""
+
+#: ../src/daemon/polkit.c:90
+msgid "Cannot set UID on session object."
+msgstr ""
+
+#: ../src/daemon/polkit.c:95
+msgid "Cannot allocate PolKitAction."
+msgstr ""
+
+#: ../src/daemon/polkit.c:100
+msgid "Cannot set action_id"
+msgstr ""
+
+#: ../src/daemon/polkit.c:105
+msgid "Cannot allocate PolKitContext."
+msgstr ""
+
+#: ../src/daemon/polkit.c:110
+#, c-format
+msgid "Cannot initialize PolKitContext: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:119
+#, c-format
+msgid "Could not determine whether caller is authorized: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:139
+#, c-format
+msgid "Cannot obtain auth: %s"
+msgstr ""
+
+#: ../src/daemon/polkit.c:148
+#, c-format
+msgid "PolicyKit responded with '%s'"
+msgstr "PolicyKit svarade med \"%s\""
+
+#: ../src/daemon/main.c:134
+#, c-format
+msgid "Got signal %s."
+msgstr "Fick signal %s."
+
+#: ../src/daemon/main.c:161
+msgid "Exiting."
+msgstr "Avslutar."
+
+#: ../src/daemon/main.c:179
+#, c-format
+msgid "Failed to find user '%s'."
+msgstr "Misslyckades med att hitta användaren \"%s\"."
+
+#: ../src/daemon/main.c:184
+#, c-format
+msgid "Failed to find group '%s'."
+msgstr "Misslyckades med att hitta gruppen \"%s\"."
+
+#: ../src/daemon/main.c:188
+#, c-format
+msgid "Found user '%s' (UID %lu) and group '%s' (GID %lu)."
+msgstr ""
+
+#: ../src/daemon/main.c:193
+#, c-format
+msgid "GID of user '%s' and of group '%s' don't match."
+msgstr ""
+
+#: ../src/daemon/main.c:198
+#, c-format
+msgid "Home directory of user '%s' is not '%s', ignoring."
+msgstr "Hemkatalogen för användaren \"%s\" är inte \"%s\", ignorerar."
+
+#: ../src/daemon/main.c:201 ../src/daemon/main.c:206
+#, c-format
+msgid "Failed to create '%s': %s"
+msgstr "Misslyckades med att skapa \"%s\": %s"
+
+#: ../src/daemon/main.c:213
+#, c-format
+msgid "Failed to change group list: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:229
+#, c-format
+msgid "Failed to change GID: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:245
+#, c-format
+msgid "Failed to change UID: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:259
+msgid "Successfully dropped root privileges."
+msgstr ""
+
+#: ../src/daemon/main.c:267
+msgid "System wide mode unsupported on this platform."
+msgstr ""
+
+#: ../src/daemon/main.c:285
+#, c-format
+msgid "setrlimit(%s, (%u, %u)) failed: %s"
+msgstr "setrlimit(%s, (%u, %u)) misslyckades: %s"
+
+#: ../src/daemon/main.c:425
+msgid "Failed to parse command line."
+msgstr ""
+
+#: ../src/daemon/main.c:441
+#, c-format
+msgid "We're in the group '%s', allowing high-priority scheduling."
+msgstr ""
+
+#: ../src/daemon/main.c:448
+#, c-format
+msgid "We're in the group '%s', allowing real-time scheduling."
+msgstr ""
+
+#: ../src/daemon/main.c:456
+msgid "PolicyKit grants us acquire-high-priority privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:459
+msgid "PolicyKit refuses acquire-high-priority privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:464
+msgid "PolicyKit grants us acquire-real-time privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:467
+msgid "PolicyKit refuses acquire-real-time privilege."
+msgstr ""
+
+#: ../src/daemon/main.c:479
+msgid ""
+"Called SUID root and real-time/high-priority scheduling was requested in the "
+"configuration. However, we lack the necessary priviliges:\n"
+"We are not in group '"
+msgstr ""
+
+#: ../src/daemon/main.c:497
+msgid ""
+"High-priority scheduling enabled in configuration but not allowed by policy."
+msgstr ""
+
+#: ../src/daemon/main.c:522
+msgid "Successfully increased RLIMIT_RTPRIO"
+msgstr ""
+
+#: ../src/daemon/main.c:525
+#, c-format
+msgid "RLIMIT_RTPRIO failed: %s"
+msgstr "RLIMIT_RTPRIO misslyckades: %s"
+
+#: ../src/daemon/main.c:532
+msgid "Giving up CAP_NICE"
+msgstr ""
+
+#: ../src/daemon/main.c:539
+msgid ""
+"Real-time scheduling enabled in configuration but not allowed by policy."
+msgstr ""
+
+#: ../src/daemon/main.c:597
+msgid "Daemon not running"
+msgstr ""
+
+#: ../src/daemon/main.c:599
+#, c-format
+msgid "Daemon running as PID %u"
+msgstr ""
+
+#: ../src/daemon/main.c:609
+#, c-format
+msgid "Failed to kill daemon: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:627
+msgid ""
+"This program is not intended to be run as root (unless --system is "
+"specified)."
+msgstr ""
+"Detta program är inte tänkt att köras som root (såvida inte --system har "
+"angivits)."
+
+#: ../src/daemon/main.c:629
+msgid "Root priviliges required."
+msgstr "Root-behörighet krävs."
+
+#: ../src/daemon/main.c:634
+msgid "--start not supported for system instances."
+msgstr "--start stöds inte för systeminstanser."
+
+#: ../src/daemon/main.c:639
+msgid "Running in system mode, but --disallow-exit not set!"
+msgstr ""
+
+#: ../src/daemon/main.c:642
+msgid "Running in system mode, but --disallow-module-loading not set!"
+msgstr ""
+
+#: ../src/daemon/main.c:645
+msgid "Running in system mode, forcibly disabling SHM mode!"
+msgstr ""
+
+#: ../src/daemon/main.c:650
+msgid "Running in system mode, forcibly disabling exit idle time!"
+msgstr ""
+
+#: ../src/daemon/main.c:677
+msgid "Failed to acquire stdio."
+msgstr ""
+
+#: ../src/daemon/main.c:683
+#, c-format
+msgid "pipe failed: %s"
+msgstr "pipe misslyckades: %s"
+
+#: ../src/daemon/main.c:688
+#, c-format
+msgid "fork() failed: %s"
+msgstr "fork() misslyckades: %s"
+
+#: ../src/daemon/main.c:702
+#, c-format
+msgid "read() failed: %s"
+msgstr "read() misslyckades: %s"
+
+#: ../src/daemon/main.c:708
+msgid "Daemon startup failed."
+msgstr ""
+
+#: ../src/daemon/main.c:710
+msgid "Daemon startup successful."
+msgstr ""
+
+#: ../src/daemon/main.c:780
+#, c-format
+msgid "This is PulseAudio %s"
+msgstr "Detta är PulseAudio %s"
+
+#: ../src/daemon/main.c:781
+#, c-format
+msgid "Compilation host: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:782
+#, c-format
+msgid "Compilation CFLAGS: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:785
+#, c-format
+msgid "Running on host: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:788
+#, c-format
+msgid "Page size is %lu bytes"
+msgstr ""
+
+#: ../src/daemon/main.c:791
+msgid "Compiled with Valgrind support: yes"
+msgstr ""
+
+#: ../src/daemon/main.c:793
+msgid "Compiled with Valgrind support: no"
+msgstr ""
+
+#: ../src/daemon/main.c:796
+#, c-format
+msgid "Running in valgrind mode: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:799
+msgid "Optimized build: yes"
+msgstr ""
+
+#: ../src/daemon/main.c:801
+msgid "Optimized build: no"
+msgstr ""
+
+#: ../src/daemon/main.c:805
+msgid "Failed to get machine ID"
+msgstr ""
+
+#: ../src/daemon/main.c:808
+#, c-format
+msgid "Machine ID is %s."
+msgstr ""
+
+#: ../src/daemon/main.c:813
+#, c-format
+msgid "Using runtime directory %s."
+msgstr ""
+
+#: ../src/daemon/main.c:818
+#, c-format
+msgid "Using state directory %s."
+msgstr ""
+
+#: ../src/daemon/main.c:821
+#, c-format
+msgid "Running in system mode: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:836
+msgid "pa_pid_file_create() failed."
+msgstr "pa_pid_file_create() misslyckades."
+
+#: ../src/daemon/main.c:848
+msgid "Fresh high-resolution timers available! Bon appetit!"
+msgstr ""
+
+#: ../src/daemon/main.c:850
+msgid ""
+"Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
+"resolution timers enabled!"
+msgstr ""
+
+#: ../src/daemon/main.c:860
+msgid "pa_core_new() failed."
+msgstr "pa_core_new() misslyckades."
+
+#: ../src/daemon/main.c:921
+msgid "Failed to initialize daemon."
+msgstr ""
+
+#: ../src/daemon/main.c:926
+msgid "Daemon startup without any loaded modules, refusing to work."
+msgstr ""
+
+#: ../src/daemon/main.c:931
+#, c-format
+msgid "Default sink name (%s) does not exist in name register."
+msgstr ""
+
+#: ../src/daemon/main.c:944
+msgid "Daemon startup complete."
+msgstr ""
+
+#: ../src/daemon/main.c:950
+msgid "Daemon shutdown initiated."
+msgstr ""
+
+#: ../src/daemon/main.c:971
+msgid "Daemon terminated."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:117
+#, c-format
+msgid ""
+"%s [options]\n"
+"\n"
+"COMMANDS:\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+" --dump-conf Dump default configuration\n"
+" --dump-modules Dump list of available modules\n"
+" --dump-resample-methods Dump available resample methods\n"
+" --cleanup-shm Cleanup stale shared memory "
+"segments\n"
+" --start Start the daemon if it is not "
+"running\n"
+" -k --kill Kill a running daemon\n"
+" --check Check for a running daemon\n"
+"\n"
+"OPTIONS:\n"
+" --system[=BOOL] Run as system-wide instance\n"
+" -D, --daemonize[=BOOL] Daemonize after startup\n"
+" --fail[=BOOL] Quit when startup fails\n"
+" --high-priority[=BOOL] Try to set high nice level\n"
+" (only available as root, when SUID "
+"or\n"
+" with elevated RLIMIT_NICE)\n"
+" --realtime[=BOOL] Try to enable realtime scheduling\n"
+" (only available as root, when SUID "
+"or\n"
+" with elevated RLIMIT_RTPRIO)\n"
+" --disallow-module-loading[=BOOL] Disallow module user requested "
+"module\n"
+" loading/unloading after startup\n"
+" --disallow-exit[=BOOL] Disallow user requested exit\n"
+" --exit-idle-time=SECS Terminate the daemon when idle and "
+"this\n"
+" time passed\n"
+" --module-idle-time=SECS Unload autoloaded modules when idle "
+"and\n"
+" this time passed\n"
+" --scache-idle-time=SECS Unload autoloaded samples when idle "
+"and\n"
+" this time passed\n"
+" --log-level[=LEVEL] Increase or set verbosity level\n"
+" -v Increase the verbosity level\n"
+" --log-target={auto,syslog,stderr} Specify the log target\n"
+" -p, --dl-search-path=PATH Set the search path for dynamic "
+"shared\n"
+" objects (plugins)\n"
+" --resample-method=METHOD Use the specified resampling method\n"
+" (See --dump-resample-methods for\n"
+" possible values)\n"
+" --use-pid-file[=BOOL] Create a PID file\n"
+" --no-cpu-limit[=BOOL] Do not install CPU load limiter on\n"
+" platforms that support it.\n"
+" --disable-shm[=BOOL] Disable shared memory support.\n"
+"\n"
+"STARTUP SCRIPT:\n"
+" -L, --load=\"MODULE ARGUMENTS\" Load the specified plugin module "
+"with\n"
+" the specified argument\n"
+" -F, --file=FILENAME Run the specified script\n"
+" -C Open a command line on the running "
+"TTY\n"
+" after startup\n"
+"\n"
+" -n Don't load default script file\n"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:245
+msgid "--daemonize expects boolean argument"
+msgstr "--daemonize förväntar sig ett booleskt argument"
+
+#: ../src/daemon/cmdline.c:252
+msgid "--fail expects boolean argument"
+msgstr "--fail förväntar sig ett booleskt argument"
+
+#: ../src/daemon/cmdline.c:262
+msgid ""
+"--log-level expects log level argument (either numeric in range 0..4 or one "
+"of debug, info, notice, warn, error)."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:274
+msgid "--high-priority expects boolean argument"
+msgstr "--high-priority förväntar sig ett booleskt argument"
+
+#: ../src/daemon/cmdline.c:281
+msgid "--realtime expects boolean argument"
+msgstr "--realtime förväntar sig ett booleskt argument"
+
+#: ../src/daemon/cmdline.c:288
+msgid "--disallow-module-loading expects boolean argument"
+msgstr "--disallow-module-loading förväntar sig ett booleskt argument"
+
+#: ../src/daemon/cmdline.c:295
+msgid "--disallow-exit boolean argument"
+msgstr "--disallow-exit booleskt argument"
+
+#: ../src/daemon/cmdline.c:302
+msgid "--use-pid-file expects boolean argument"
+msgstr "--use-pid-file förväntar sig ett booleskt argument"
+
+#: ../src/daemon/cmdline.c:319
+msgid "Invalid log target: use either 'syslog', 'stderr' or 'auto'."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:338
+#, c-format
+msgid "Invalid resample method '%s'."
+msgstr ""
+
+#: ../src/daemon/cmdline.c:345
+msgid "--system expects boolean argument"
+msgstr "--system förväntar sig ett booleskt argument"
+
+#: ../src/daemon/cmdline.c:352
+msgid "--no-cpu-limit expects boolean argument"
+msgstr "--no-cpu-limit förväntar sig ett booleskt argument"
+
+#: ../src/daemon/cmdline.c:359
+msgid "--disable-shm expects boolean argument"
+msgstr "--disable-shm förväntar sig ett booleskt argument"
+
+#: ../src/daemon/dumpmodules.c:60
+#, c-format
+msgid "Name: %s\n"
+msgstr "Namn: %s\n"
+
+#: ../src/daemon/dumpmodules.c:63
+#, c-format
+msgid "No module information available\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:66
+#, c-format
+msgid "Version: %s\n"
+msgstr "Version: %s\n"
+
+#: ../src/daemon/dumpmodules.c:68
+#, c-format
+msgid "Description: %s\n"
+msgstr "Beskrivning: %s\n"
+
+#: ../src/daemon/dumpmodules.c:70
+#, c-format
+msgid "Author: %s\n"
+msgstr "Upphovsman: %s\n"
+
+#: ../src/daemon/dumpmodules.c:72
+#, c-format
+msgid "Usage: %s\n"
+msgstr "Användning: %s\n"
+
+#: ../src/daemon/dumpmodules.c:73
+#, c-format
+msgid "Load Once: %s\n"
+msgstr ""
+
+#: ../src/daemon/dumpmodules.c:77
+#, c-format
+msgid "Path: %s\n"
+msgstr "Sökväg: %s\n"
+
+#: ../src/daemon/daemon-conf.c:205
+#, c-format
+msgid "[%s:%u] Invalid log target '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:221
+#, c-format
+msgid "[%s:%u] Invalid log level '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:237
+#, c-format
+msgid "[%s:%u] Invalid resample method '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:260
+#, c-format
+msgid "[%s:%u] Invalid rlimit '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:267
+#, c-format
+msgid "[%s:%u] rlimit not supported on this platform."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:283
+#, c-format
+msgid "[%s:%u] Invalid sample format '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:301
+#, c-format
+msgid "[%s:%u] Invalid sample rate '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:319
+#, c-format
+msgid "[%s:%u] Invalid sample channels '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:337
+#, c-format
+msgid "[%s:%u] Invalid number of fragments '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:355
+#, c-format
+msgid "[%s:%u] Invalid fragment size '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:373
+#, c-format
+msgid "[%s:%u] Invalid nice level '%s'."
+msgstr ""
+
+#: ../src/daemon/daemon-conf.c:570
+#, c-format
+msgid "Failed to open configuration file: %s"
+msgstr "Misslyckades med att öppna konfigurationsfil: %s"
+
+#: ../src/daemon/daemon-conf.c:644
+#, c-format
+msgid "### Read from configuration file: %s ###\n"
+msgstr ""
+
+#: ../src/daemon/caps.c:63
+msgid "Dropping root priviliges."
+msgstr "Släpper root-behörighet."
+
+#: ../src/daemon/caps.c:103
+msgid "Limited capabilities successfully to CAP_SYS_NICE."
+msgstr ""
+
+#: ../src/pulse/channelmap.c:102
+msgid "Mono"
+msgstr "Mono"
+
+#: ../src/pulse/channelmap.c:104
+msgid "Front Center"
+msgstr "Center fram"
+
+#: ../src/pulse/channelmap.c:105
+msgid "Front Left"
+msgstr "Vänster fram"
+
+#: ../src/pulse/channelmap.c:106
+msgid "Front Right"
+msgstr "Höger fram"
+
+#: ../src/pulse/channelmap.c:108
+msgid "Rear Center"
+msgstr "Center bak"
+
+#: ../src/pulse/channelmap.c:109
+msgid "Rear Left"
+msgstr "Vänster bak"
+
+#: ../src/pulse/channelmap.c:110
+msgid "Rear Right"
+msgstr "Höger bak"
+
+#: ../src/pulse/channelmap.c:112
+msgid "Low Frequency Emmiter"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:114
+msgid "Front Left-of-center"
+msgstr "Vänster-om-center fram"
+
+#: ../src/pulse/channelmap.c:115
+msgid "Front Right-of-center"
+msgstr "Höger-om-center fram"
+
+#: ../src/pulse/channelmap.c:117
+msgid "Side Left"
+msgstr "Vänster sida"
+
+#: ../src/pulse/channelmap.c:118
+msgid "Side Right"
+msgstr "Höger sida"
+
+#: ../src/pulse/channelmap.c:120
+msgid "Auxiliary 0"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:121
+msgid "Auxiliary 1"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:122
+msgid "Auxiliary 2"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:123
+msgid "Auxiliary 3"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:124
+msgid "Auxiliary 4"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:125
+msgid "Auxiliary 5"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:126
+msgid "Auxiliary 6"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:127
+msgid "Auxiliary 7"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:128
+msgid "Auxiliary 8"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:129
+msgid "Auxiliary 9"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:130
+msgid "Auxiliary 10"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:131
+msgid "Auxiliary 11"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:132
+msgid "Auxiliary 12"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:133
+msgid "Auxiliary 13"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:134
+msgid "Auxiliary 14"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:135
+msgid "Auxiliary 15"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:136
+msgid "Auxiliary 16"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:137
+msgid "Auxiliary 17"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:138
+msgid "Auxiliary 18"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:139
+msgid "Auxiliary 19"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:140
+msgid "Auxiliary 20"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:141
+msgid "Auxiliary 21"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:142
+msgid "Auxiliary 22"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:143
+msgid "Auxiliary 23"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:144
+msgid "Auxiliary 24"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:145
+msgid "Auxiliary 25"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:146
+msgid "Auxiliary 26"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:147
+msgid "Auxiliary 27"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:148
+msgid "Auxiliary 28"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:149
+msgid "Auxiliary 29"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:150
+msgid "Auxiliary 30"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:151
+msgid "Auxiliary 31"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:153
+msgid "Top Center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:155
+msgid "Top Front Center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:156
+msgid "Top Front Left"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:157
+msgid "Top Front Right"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:159
+msgid "Top Rear Center"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:160
+msgid "Top Rear Left"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:161
+msgid "Top Rear Right"
+msgstr ""
+
+#: ../src/pulse/channelmap.c:472 ../src/pulse/sample.c:144
+#: ../src/pulse/volume.c:163 ../src/pulse/volume.c:194
+#, fuzzy
+msgid "(invalid)"
+msgstr "Ogiltig"
+
+#: ../src/pulse/error.c:43
+msgid "OK"
+msgstr "OK"
+
+#: ../src/pulse/error.c:44
+msgid "Access denied"
+msgstr "Åtkomst nekad"
+
+#: ../src/pulse/error.c:45
+msgid "Unknown command"
+msgstr "Okänt kommando"
+
+#: ../src/pulse/error.c:46
+msgid "Invalid argument"
+msgstr "Ogiltigt argument"
+
+#: ../src/pulse/error.c:47
+msgid "Entity exists"
+msgstr "Entiteten finns"
+
+#: ../src/pulse/error.c:48
+msgid "No such entity"
+msgstr "Ingen sådan entitet"
+
+#: ../src/pulse/error.c:49
+msgid "Connection refused"
+msgstr "Anslutning nekades"
+
+#: ../src/pulse/error.c:50
+msgid "Protocol error"
+msgstr "Protokollfel"
+
+#: ../src/pulse/error.c:51
+msgid "Timeout"
+msgstr "Tidsgräns nåddes"
+
+#: ../src/pulse/error.c:52
+msgid "No authorization key"
+msgstr ""
+
+#: ../src/pulse/error.c:53
+msgid "Internal error"
+msgstr "Internt fel"
+
+#: ../src/pulse/error.c:54
+msgid "Connection terminated"
+msgstr "Anslutningen terminerad"
+
+#: ../src/pulse/error.c:55
+msgid "Entity killed"
+msgstr ""
+
+#: ../src/pulse/error.c:56
+msgid "Invalid server"
+msgstr "Ogiltig server"
+
+#: ../src/pulse/error.c:57
+msgid "Module initalization failed"
+msgstr ""
+
+#: ../src/pulse/error.c:58
+msgid "Bad state"
+msgstr "Felaktigt tillstånd"
+
+#: ../src/pulse/error.c:59
+msgid "No data"
+msgstr "Inget data"
+
+#: ../src/pulse/error.c:60
+msgid "Incompatible protocol version"
+msgstr ""
+
+#: ../src/pulse/error.c:61
+msgid "Too large"
+msgstr "För stor"
+
+#: ../src/pulse/error.c:62
+msgid "Not supported"
+msgstr "Stöds inte"
+
+#: ../src/pulse/error.c:63
+msgid "Unknown error code"
+msgstr "Okänd felkod"
+
+#: ../src/pulse/error.c:64
+msgid "No such extension"
+msgstr ""
+
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:100
+msgid "XOpenDisplay() failed"
+msgstr "XOpenDisplay() misslyckades"
+
+#: ../src/pulse/client-conf-x11.c:78
+msgid "Failed to parse cookie data"
+msgstr ""
+
+#: ../src/pulse/client-conf.c:120
+#, c-format
+msgid "Failed to open configuration file '%s': %s"
+msgstr "Misslyckades med att öppna konfigurationsfilen \"%s\": %s"
+
+#: ../src/pulse/context.c:516
+msgid "No cookie loaded. Attempting to connect without."
+msgstr ""
+
+#: ../src/pulse/context.c:642
+#, c-format
+msgid "fork(): %s"
+msgstr "fork(): %s"
+
+#: ../src/pulse/context.c:695
+#, c-format
+msgid "waitpid(): %s"
+msgstr "waitpid(): %s"
+
+#: ../src/pulse/context.c:1256
+#, c-format
+msgid "Received message for unknown extension '%s'"
+msgstr ""
+
+#: ../src/utils/pacat.c:93
+#, c-format
+msgid "pa_stream_write() failed: %s\n"
+msgstr "pa_stream_write() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:132
+#, c-format
+msgid "pa_stream_peek() failed: %s\n"
+msgstr "pa_stream_peek() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:141
+#, c-format
+msgid "Buffer overrun, dropping incoming data\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:143
+#, c-format
+msgid "pa_stream_drop() failed: %s\n"
+msgstr "pa_stream_drop() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:169
+#, c-format
+msgid "Stream successfully created.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:172
+#, c-format
+msgid "pa_stream_get_buffer_attr() failed: %s\n"
+msgstr "pa_stream_get_buffer_attr() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:176
+#, c-format
+msgid "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:179
+#, c-format
+msgid "Buffer metrics: maxlength=%u, fragsize=%u\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:183
+#, c-format
+msgid "Using sample spec '%s', channel map '%s'.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:187
+#, c-format
+msgid "Connected to device %s (%u, %ssuspended).\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:197
+#, c-format
+msgid "Stream error: %s\n"
+msgstr "Strömfel: %s\n"
+
+#: ../src/utils/pacat.c:207
+#, c-format
+msgid "Stream device suspended.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:209
+#, c-format
+msgid "Stream device resumed.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:217
+#, c-format
+msgid "Stream underrun.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:224
+#, c-format
+msgid "Stream overrun.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:231
+#, c-format
+msgid "Stream started.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:238
+#, c-format
+msgid "Stream moved to device %s (%u, %ssuspended).%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:238
+msgid "not "
+msgstr "inte "
+
+#: ../src/utils/pacat.c:259
+#, c-format
+msgid "Connection established.%s \n"
+msgstr ""
+
+#: ../src/utils/pacat.c:262
+#, c-format
+msgid "pa_stream_new() failed: %s\n"
+msgstr "pa_stream_new() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:287
+#, c-format
+msgid "pa_stream_connect_playback() failed: %s\n"
+msgstr "pa_stream_connect_playback() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:293
+#, c-format
+msgid "pa_stream_connect_record() failed: %s\n"
+msgstr "pa_stream_connect_record() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:307 ../src/utils/pasuspender.c:159
+#: ../src/utils/pactl.c:666 ../src/utils/paplay.c:183
+#, c-format
+msgid "Connection failure: %s\n"
+msgstr "Anslutningsfel: %s\n"
+
+#: ../src/utils/pacat.c:328 ../src/utils/paplay.c:75
+#, c-format
+msgid "Failed to drain stream: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:333 ../src/utils/paplay.c:80
+#, c-format
+msgid "Playback stream drained.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:343 ../src/utils/paplay.c:92
+#, c-format
+msgid "Draining connection to server.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:369
+#, c-format
+msgid "Got EOF.\n"
+msgstr "Fick filslut.\n"
+
+#: ../src/utils/pacat.c:375
+#, c-format
+msgid "pa_stream_drain(): %s\n"
+msgstr "pa_stream_drain(): %s\n"
+
+#: ../src/utils/pacat.c:385
+#, c-format
+msgid "read() failed: %s\n"
+msgstr "read() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:417
+#, c-format
+msgid "write() failed: %s\n"
+msgstr "write() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:438
+#, c-format
+msgid "Got signal, exiting.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:452
+#, c-format
+msgid "Failed to get latency: %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:457
+#, c-format
+msgid "Time: %0.3f sec; Latency: %0.0f usec. \r"
+msgstr "Tid: %0.3f sec; Latens: %0.0f ms \r"
+
+#: ../src/utils/pacat.c:477
+#, c-format
+msgid "pa_stream_update_timing_info() failed: %s\n"
+msgstr "pa_stream_update_timing_info() misslyckades: %s\n"
+
+#: ../src/utils/pacat.c:490
+#, c-format
+msgid ""
+"%s [options]\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -r, --record Create a connection for recording\n"
+" -p, --playback Create a connection for playback\n"
+"\n"
+" -v, --verbose Enable verbose operations\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -d, --device=DEVICE The name of the sink/source to "
+"connect to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+" --stream-name=NAME How to call this stream on the "
+"server\n"
+" --volume=VOLUME Specify the initial (linear) volume "
+"in range 0...65536\n"
+" --rate=SAMPLERATE The sample rate in Hz (defaults to "
+"44100)\n"
+" --format=SAMPLEFORMAT The sample type, one of s16le, "
+"s16be, u8, float32le,\n"
+" float32be, ulaw, alaw, s32le, s32be "
+"(defaults to s16ne)\n"
+" --channels=CHANNELS The number of channels, 1 for mono, "
+"2 for stereo\n"
+" (defaults to 2)\n"
+" --channel-map=CHANNELMAP Channel map to use instead of the "
+"default\n"
+" --fix-format Take the sample format from the sink "
+"the stream is\n"
+" being connected to.\n"
+" --fix-rate Take the sampling rate from the sink "
+"the stream is\n"
+" being connected to.\n"
+" --fix-channels Take the number of channels and the "
+"channel map\n"
+" from the sink the stream is being "
+"connected to.\n"
+" --no-remix Don't upmix or downmix channels.\n"
+" --no-remap Map channels by index instead of "
+"name.\n"
+" --latency=BYTES Request the specified latency in "
+"bytes.\n"
+" --process-time=BYTES Request the specified process time "
+"per request in bytes.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:591
+#, c-format
+msgid ""
+"pacat %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:647
+#, c-format
+msgid "Invalid channel map '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:676
+#, c-format
+msgid "Invalid latency specification '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:683
+#, c-format
+msgid "Invalid process time specification '%s'\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:694
+#, c-format
+msgid "Invalid sample specification\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:699
+#, c-format
+msgid "Channel map doesn't match sample specification\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:706
+#, c-format
+msgid "Opening a %s stream with sample specification '%s'.\n"
+msgstr ""
+
+#: ../src/utils/pacat.c:706
+msgid "recording"
+msgstr ""
+
+#: ../src/utils/pacat.c:706
+msgid "playback"
+msgstr ""
+
+#: ../src/utils/pacat.c:714
+#, c-format
+msgid "open(): %s\n"
+msgstr "open(): %s\n"
+
+#: ../src/utils/pacat.c:719
+#, c-format
+msgid "dup2(): %s\n"
+msgstr "dup2(): %s\n"
+
+#: ../src/utils/pacat.c:729
+#, c-format
+msgid "Too many arguments.\n"
+msgstr "För många argument.\n"
+
+#: ../src/utils/pacat.c:742 ../src/utils/pasuspender.c:280
+#: ../src/utils/pactl.c:909 ../src/utils/paplay.c:381
+#, c-format
+msgid "pa_mainloop_new() failed.\n"
+msgstr "pa_mainloop_new() misslyckades.\n"
+
+#: ../src/utils/pacat.c:763
+#, c-format
+msgid "io_new() failed.\n"
+msgstr "io_new() misslyckades.\n"
+
+#: ../src/utils/pacat.c:769 ../src/utils/pasuspender.c:293
+#: ../src/utils/pactl.c:923 ../src/utils/paplay.c:396
+#, c-format
+msgid "pa_context_new() failed.\n"
+msgstr "pa_context_new() misslyckades.\n"
+
+#: ../src/utils/pacat.c:777
+#, fuzzy, c-format
+msgid "pa_context_connect() failed: %s"
+msgstr "pa_context_new() misslyckades.\n"
+
+#: ../src/utils/pacat.c:788
+#, c-format
+msgid "time_new() failed.\n"
+msgstr "time_new() misslyckades.\n"
+
+#: ../src/utils/pacat.c:795 ../src/utils/pasuspender.c:301
+#: ../src/utils/pactl.c:931 ../src/utils/paplay.c:407
+#, c-format
+msgid "pa_mainloop_run() failed.\n"
+msgstr "pa_mainloop_run() misslyckades.\n"
+
+#: ../src/utils/pasuspender.c:81
+#, c-format
+msgid "fork(): %s\n"
+msgstr "fork(): %s\n"
+
+#: ../src/utils/pasuspender.c:92
+#, c-format
+msgid "execvp(): %s\n"
+msgstr "execvp(): %s\n"
+
+#: ../src/utils/pasuspender.c:109
+#, c-format
+msgid "Failure to suspend: %s\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:124
+#, c-format
+msgid "Failure to resume: %s\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:147
+#, c-format
+msgid "WARNING: Sound server is not local, not suspending.\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:176 ../src/utils/pactl.c:672
+#: ../src/utils/paplay.c:191
+#, c-format
+msgid "Got SIGINT, exiting.\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:194
+#, c-format
+msgid "WARNING: Child process terminated by signal %u\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:212
+#, c-format
+msgid ""
+"%s [options] ... \n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+"\n"
+msgstr ""
+
+#: ../src/utils/pasuspender.c:251
+#, c-format
+msgid ""
+"pasuspender %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+"pasuspender %s\n"
+"Kompilerad med libpulse %s\n"
+"Länkad med libpulse %s\n"
+
+#: ../src/utils/pactl.c:107
+#, c-format
+msgid "Failed to get statistics: %s\n"
+msgstr "Misslyckades med att få statistik: %s\n"
+
+#: ../src/utils/pactl.c:113
+#, c-format
+msgid "Currently in use: %u blocks containing %s bytes total.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:116
+#, c-format
+msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:119
+#, c-format
+msgid "Sample cache size: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:128
+#, c-format
+msgid "Failed to get server information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:135
+#, c-format
+msgid ""
+"User name: %s\n"
+"Host Name: %s\n"
+"Server Name: %s\n"
+"Server Version: %s\n"
+"Default Sample Specification: %s\n"
+"Default Sink: %s\n"
+"Default Source: %s\n"
+"Cookie: %08x\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:160
+#, c-format
+msgid "Failed to get sink information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:176
+#, c-format
+msgid ""
+"*** Sink #%u ***\n"
+"Name: %s\n"
+"Driver: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Owner Module: %u\n"
+"Volume: %s\n"
+"Monitor Source: %s\n"
+"Latency: %0.0f usec, configured %0.0f usec\n"
+"Flags: %s%s%s%s%s%s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:193 ../src/utils/pactl.c:371
+msgid "muted"
+msgstr "tystad"
+
+#: ../src/utils/pactl.c:212
+#, c-format
+msgid "Failed to get source information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:228
+#, c-format
+msgid ""
+"*** Source #%u ***\n"
+"Name: %s\n"
+"Driver: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Owner Module: %u\n"
+"Volume: %s\n"
+"Monitor of Sink: %s\n"
+"Latency: %0.0f usec, configured %0.0f usec\n"
+"Flags: %s%s%s%s%s%s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:246 ../src/utils/pactl.c:289 ../src/utils/pactl.c:322
+#: ../src/utils/pactl.c:366 ../src/utils/pactl.c:367 ../src/utils/pactl.c:374
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:419 ../src/utils/pactl.c:425
+#: ../src/utils/pactl.c:468 ../src/utils/pactl.c:469 ../src/utils/pactl.c:473
+msgid "n/a"
+msgstr ""
+
+#: ../src/utils/pactl.c:263
+#, c-format
+msgid "Failed to get module information: %s\n"
+msgstr "Misslyckades med att få modulinformation: %s\n"
+
+#: ../src/utils/pactl.c:281
+#, c-format
+msgid ""
+"*** Module #%u ***\n"
+"Name: %s\n"
+"Argument: %s\n"
+"Usage counter: %s\n"
+"Auto unload: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:298
+#, c-format
+msgid "Failed to get client information: %s\n"
+msgstr "Misslyckades med att få klientinformation: %s\n"
+
+#: ../src/utils/pactl.c:316
+#, c-format
+msgid ""
+"*** Client #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:333
+#, c-format
+msgid "Failed to get sink input information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:352
+#, c-format
+msgid ""
+"*** Sink Input #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Client: %s\n"
+"Sink: %u\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Volume: %s\n"
+"Buffer Latency: %0.0f usec\n"
+"Sink Latency: %0.0f usec\n"
+"Resample method: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:385
+#, c-format
+msgid "Failed to get source output information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:405
+#, c-format
+msgid ""
+"*** Source Output #%u ***\n"
+"Driver: %s\n"
+"Owner Module: %s\n"
+"Client: %s\n"
+"Source: %u\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Buffer Latency: %0.0f usec\n"
+"Source Latency: %0.0f usec\n"
+"Resample method: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:436
+#, c-format
+msgid "Failed to get sample information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:455
+#, c-format
+msgid ""
+"*** Sample #%u ***\n"
+"Name: %s\n"
+"Volume: %s\n"
+"Sample Specification: %s\n"
+"Channel Map: %s\n"
+"Duration: %0.1fs\n"
+"Size: %s\n"
+"Lazy: %s\n"
+"Filename: %s\n"
+"Properties:\n"
+"%s"
+msgstr ""
+
+#: ../src/utils/pactl.c:481
+#, c-format
+msgid "Failed to get autoload information: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:497
+#, c-format
+msgid ""
+"*** Autoload Entry #%u ***\n"
+"Name: %s\n"
+"Type: %s\n"
+"Module: %s\n"
+"Argument: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:504
+msgid "sink"
+msgstr "sink"
+
+#: ../src/utils/pactl.c:504
+msgid "source"
+msgstr "källa"
+
+#: ../src/utils/pactl.c:511 ../src/utils/pactl.c:521
+#, c-format
+msgid "Failure: %s\n"
+msgstr "Fel: %s\n"
+
+#: ../src/utils/pactl.c:545
+#, c-format
+msgid "Failed to upload sample: %s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:562
+#, c-format
+msgid "Premature end of file\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:678
+#, c-format
+msgid ""
+"%s [options] stat\n"
+"%s [options] list\n"
+"%s [options] exit\n"
+"%s [options] upload-sample FILENAME [NAME]\n"
+"%s [options] play-sample NAME [SINK]\n"
+"%s [options] remove-sample NAME\n"
+"%s [options] move-sink-input ID SINK\n"
+"%s [options] move-source-output ID SOURCE\n"
+"%s [options] load-module NAME [ARGS ...]\n"
+"%s [options] unload-module ID\n"
+"%s [options] suspend-sink [SINK] 1|0\n"
+"%s [options] suspend-source [SOURCE] 1|0\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:729
+#, c-format
+msgid ""
+"pactl %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+"pactl %s\n"
+"Kompilerad med libpulse %s\n"
+"Länkad med libpulse %s\n"
+
+#: ../src/utils/pactl.c:768
+#, c-format
+msgid "Please specify a sample file to load\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:790
+#, c-format
+msgid "Failed to open sound file.\n"
+msgstr "Misslyckades med att öppna ljudfil.\n"
+
+#: ../src/utils/pactl.c:802
+#, c-format
+msgid "You have to specify a sample name to play\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:814
+#, c-format
+msgid "You have to specify a sample name to remove\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:822
+#, c-format
+msgid "You have to specify a sink input index and a sink\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:831
+#, c-format
+msgid "You have to specify a source output index and a source\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:845
+#, c-format
+msgid "You have to specify a module name and arguments.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:865
+#, c-format
+msgid "You have to specify a module index\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:875
+#, c-format
+msgid ""
+"You may not specify more than one sink. You have to specify at least one "
+"boolean value.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:888
+#, c-format
+msgid ""
+"You may not specify more than one source. You have to specify at least one "
+"boolean value.\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:904
+#, c-format
+msgid "No valid command specified.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:61
+#, c-format
+msgid ""
+"%s [-D display] [-S server] [-O sink] [-I source] [-c file] [-d|-e|-i|-r]\n"
+"\n"
+" -d Show current PulseAudio data attached to X11 display (default)\n"
+" -e Export local PulseAudio data to X11 display\n"
+" -i Import PulseAudio data from X11 display to local environment "
+"variables and cookie file.\n"
+" -r Remove PulseAudio data from X11 display\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:94
+#, c-format
+msgid "Failed to parse command line.\n"
+msgstr "Misslyckades med att tolka kommandorad.\n"
+
+#: ../src/utils/pax11publish.c:108
+#, c-format
+msgid "Server: %s\n"
+msgstr "Server: %s\n"
+
+#: ../src/utils/pax11publish.c:110
+#, c-format
+msgid "Source: %s\n"
+msgstr "Källa: %s\n"
+
+#: ../src/utils/pax11publish.c:112
+#, c-format
+msgid "Sink: %s\n"
+msgstr "Sink: %s\n"
+
+#: ../src/utils/pax11publish.c:114
+#, c-format
+msgid "Cookie: %s\n"
+msgstr "Kaka: %s\n"
+
+#: ../src/utils/pax11publish.c:132
+#, c-format
+msgid "Failed to parse cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:137
+#, c-format
+msgid "Failed to save cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:152
+#, c-format
+msgid "Failed to load client configuration file.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:157
+#, c-format
+msgid "Failed to read environment configuration data.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:174
+#, c-format
+msgid "Failed to get FQDN.\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:194
+#, c-format
+msgid "Failed to load cookie data\n"
+msgstr ""
+
+#: ../src/utils/pax11publish.c:211
+#, c-format
+msgid "Not yet implemented.\n"
+msgstr "Ännu inte implementerad.\n"
+
+#: ../src/utils/pacmd.c:64
+#, c-format
+msgid "socket(PF_UNIX, SOCK_STREAM, 0): %s"
+msgstr ""
+
+#: ../src/utils/pacmd.c:81
+#, c-format
+msgid "connect(): %s"
+msgstr "connect(): %s"
+
+#: ../src/utils/pacmd.c:89
+msgid "Failed to kill PulseAudio daemon."
+msgstr ""
+
+#: ../src/utils/pacmd.c:97
+msgid "Daemon not responding."
+msgstr ""
+
+#: ../src/utils/pacmd.c:112
+#, c-format
+msgid "select(): %s"
+msgstr "select(): %s"
+
+#: ../src/utils/pacmd.c:124 ../src/utils/pacmd.c:140
+#, c-format
+msgid "read(): %s"
+msgstr "read(): %s"
+
+#: ../src/utils/pacmd.c:153 ../src/utils/pacmd.c:167
+#, c-format
+msgid "write(): %s"
+msgstr "write(): %s"
+
+#: ../src/utils/paplay.c:139
+#, c-format
+msgid "Stream successfully created\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:144
+#, c-format
+msgid "Stream errror: %s\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:165
+#, c-format
+msgid "Connection established.\n"
+msgstr "Anslutning etablerad.\n"
+
+#: ../src/utils/paplay.c:198
+#, c-format
+msgid ""
+"%s [options] [FILE]\n"
+"\n"
+" -h, --help Show this help\n"
+" --version Show version\n"
+"\n"
+" -v, --verbose Enable verbose operation\n"
+"\n"
+" -s, --server=SERVER The name of the server to connect "
+"to\n"
+" -d, --device=DEVICE The name of the sink to connect to\n"
+" -n, --client-name=NAME How to call this client on the "
+"server\n"
+" --stream-name=NAME How to call this stream on the "
+"server\n"
+" --volume=VOLUME Specify the initial (linear) volume "
+"in range 0...65536\n"
+" --channel-map=CHANNELMAP Set the channel map to the use\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:255
+#, c-format
+msgid ""
+"paplay %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
+"paplay %s\n"
+"Kompilerad med libpulse %s\n"
+"Länkad med libpulse %s\n"
+
+#: ../src/utils/paplay.c:292
+#, c-format
+msgid "Invalid channel map\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:314
+#, c-format
+msgid "Failed to open file '%s'\n"
+msgstr "Misslyckades med att öppna filen \"%s\"\n"
+
+#: ../src/utils/paplay.c:350
+#, c-format
+msgid "Channel map doesn't match file.\n"
+msgstr ""
+
+#: ../src/utils/paplay.c:376
+#, c-format
+msgid "Using sample spec '%s'\n"
+msgstr ""
+
+#: ../src/pulsecore/lock-autospawn.c:126 ../src/pulsecore/lock-autospawn.c:207
+msgid "Cannot access autospawn lock."
+msgstr ""
+
+#~ msgid "socketpair(): %s"
+#~ msgstr "socketpair(): %s"
diff --git a/src/Makefile.am b/src/Makefile.am
index 9319bbe..f277198 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,3 @@
-# $Id: Makefile.am 2195 2008-03-30 01:43:15Z lennart $
-#
# This file is part of PulseAudio.
#
# Copyright 2004-2006 Lennart Poettering
@@ -47,21 +45,25 @@ endif
# Compiler/linker flags #
###################################
-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src/modules -I$(top_builddir)/src/modules/rtp -I$(top_builddir)/src/modules/gconf
+AM_CFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src/modules -I$(top_builddir)/src/modules/rtp -I$(top_builddir)/src/modules/gconf -I$(top_builddir)/src/modules/bluetooth
AM_CFLAGS += $(PTHREAD_CFLAGS) -D_POSIX_PTHREAD_SEMANTICS
AM_CFLAGS += $(LTDLINCL)
-AM_CFLAGS += $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS)
+AM_CFLAGS += $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS) $(LIBSPEEX_CFLAGS)
AM_CFLAGS += -DPA_DLSEARCHPATH=\"$(modlibexecdir)\"
AM_CFLAGS += -DPA_DEFAULT_CONFIG_DIR=\"$(PA_DEFAULT_CONFIG_DIR)\"
AM_CFLAGS += -DPA_BINARY=\"$(PA_BINARY)\"
AM_CFLAGS += -DPA_SYSTEM_RUNTIME_PATH=\"$(PA_SYSTEM_RUNTIME_PATH)\"
+AM_CFLAGS += -DPA_SYSTEM_CONFIG_PATH=\"$(PA_SYSTEM_CONFIG_PATH)\"
+AM_CFLAGS += -DPA_SYSTEM_STATE_PATH=\"$(PA_SYSTEM_STATE_PATH)\"
AM_CFLAGS += -DAO_REQUIRE_CAS
+AM_CFLAGS += -DPULSE_LOCALEDIR=\"$(pulselocaledir)\"
+AM_CFLAGS += -DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\"
# This cool debug trap works on i386/gcc only
AM_CFLAGS += '-DDEBUG_TRAP=__asm__("int $$3")'
-AM_LIBADD = $(PTHREAD_LIBS)
-AM_LDADD = $(PTHREAD_LIBS)
+AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
+AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS)
# Only required on some platforms but defined for all to avoid errors
AM_LDFLAGS = -Wl,-no-undefined -Wl,--gc-sections
@@ -96,23 +98,26 @@ EXTRA_DIST = \
pulse/version.h.in \
daemon/daemon.conf.in \
daemon/default.pa.in \
+ daemon/system.pa.in \
daemon/default.pa.win32 \
depmod.py \
daemon/esdcompat.in \
+ daemon/start-pulseaudio-x11.in \
utils/padsp \
modules/module-defs.h.m4 \
- daemon/pulseaudio-module-xsmp.desktop \
+ daemon/pulseaudio.desktop \
map-file \
daemon/org.pulseaudio.policy
pulseconf_DATA = \
default.pa \
+ system.pa \
daemon.conf \
client.conf
if HAVE_X11
xdgautostart_DATA = \
- daemon/pulseaudio-module-xsmp.desktop
+ daemon/pulseaudio.desktop
endif
BUILT_SOURCES = \
@@ -131,12 +136,11 @@ pulseaudio_SOURCES = \
daemon/daemon-conf.c daemon/daemon-conf.h \
daemon/dumpmodules.c daemon/dumpmodules.h \
daemon/ltdl-bind-now.c daemon/ltdl-bind-now.h \
- daemon/main.c \
- pulsecore/gccmacro.h
+ daemon/main.c
-pulseaudio_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS) $(CAP_CFLAGS) $(LIBOIL_CFLAGS) $(DBUS_CFLAGS)
+pulseaudio_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSPEEX_CFLAGS) $(LIBSNDFILE_CFLAGS) $(CAP_CFLAGS) $(LIBOIL_CFLAGS) $(DBUS_CFLAGS)
pulseaudio_CPPFLAGS = $(AM_CPPFLAGS)
-pulseaudio_LDADD = $(AM_LDADD) libpulsecore.la $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(CAP_LIBS) $(LIBOIL_LIBS) $(DBUS_LIBS)
+pulseaudio_LDADD = $(AM_LDADD) libpulsecore.la $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSPEEX_LIBS) $(LIBSNDFILE_LIBS) $(CAP_LIBS) $(LIBOIL_LIBS) $(DBUS_LIBS)
# This is needed because automake doesn't properly expand the foreach below
pulseaudio_DEPENDENCIES = libpulsecore.la $(PREOPEN_LIBS)
@@ -185,7 +189,7 @@ if HAVE_AVAHI
bin_PROGRAMS += pabrowse
endif
-bin_SCRIPTS = esdcompat
+bin_SCRIPTS = esdcompat start-pulseaudio-x11
pacat_SOURCES = utils/pacat.c
pacat_LDADD = $(AM_LDADD) libpulse.la
@@ -197,22 +201,22 @@ paplay_LDADD = $(AM_LDADD) libpulse.la $(LIBSNDFILE_LIBS)
paplay_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
paplay_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-pactl_SOURCES = utils/pactl.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+pactl_SOURCES = utils/pactl.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
pactl_LDADD = $(AM_LDADD) libpulse.la $(LIBSNDFILE_LIBS)
pactl_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
pactl_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-pasuspender_SOURCES = utils/pasuspender.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+pasuspender_SOURCES = utils/pasuspender.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
pasuspender_LDADD = $(AM_LDADD) libpulse.la $(LIBSNDFILE_LIBS)
pasuspender_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
pasuspender_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-pacmd_SOURCES = utils/pacmd.c pulsecore/pid.c pulsecore/pid.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+pacmd_SOURCES = utils/pacmd.c pulsecore/pid.c pulsecore/pid.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
pacmd_CFLAGS = $(AM_CFLAGS)
pacmd_LDADD = $(AM_LDADD) libpulse.la
pacmd_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-pax11publish_SOURCES = utils/pax11publish.c pulsecore/x11prop.c pulsecore/x11prop.h pulse/client-conf.c pulse/client-conf.h pulsecore/authkey.h pulsecore/authkey.c pulsecore/random.h pulsecore/random.c pulsecore/conf-parser.c pulsecore/conf-parser.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+pax11publish_SOURCES = utils/pax11publish.c pulsecore/x11prop.c pulsecore/x11prop.h pulse/client-conf.c pulse/client-conf.h pulsecore/authkey.h pulsecore/authkey.c pulsecore/random.h pulsecore/random.c pulsecore/conf-parser.c pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/conf-parser.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
pax11publish_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
pax11publish_LDADD = $(AM_LDADD) libpulse.la $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS)
pax11publish_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
@@ -232,6 +236,7 @@ noinst_PROGRAMS = \
pacat-simple \
parec-simple \
strlist-test \
+ close-test \
voltest \
memblockq-test \
sync-playback \
@@ -253,7 +258,13 @@ noinst_PROGRAMS = \
resampler-test \
smoother-test \
mix-test \
- remix-test
+ remix-test \
+ envelope-test \
+ proplist-test \
+ rtstutter \
+ stripnul \
+ lock-autospawn-test \
+ prioq-test
if HAVE_SIGXCPU
noinst_PROGRAMS += \
@@ -353,6 +364,11 @@ strlist_test_CFLAGS = $(AM_CFLAGS)
strlist_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore.la libstrlist.la
strlist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+close_test_SOURCES = tests/close-test.c
+close_test_CFLAGS = $(AM_CFLAGS)
+close_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore.la libstrlist.la
+close_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+
voltest_SOURCES = tests/voltest.c
voltest_CFLAGS = $(AM_CFLAGS)
voltest_LDADD = $(AM_LDADD) libpulse.la
@@ -418,6 +434,36 @@ smoother_test_LDADD = $(AM_LDADD) libpulsecore.la
smoother_test_CFLAGS = $(AM_CFLAGS)
smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+envelope_test_SOURCES = tests/envelope-test.c
+envelope_test_LDADD = $(AM_LDADD) libpulsecore.la
+envelope_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+envelope_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+
+proplist_test_SOURCES = tests/proplist-test.c
+proplist_test_LDADD = $(AM_LDADD) libpulsecore.la
+proplist_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+proplist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+
+rtstutter_SOURCES = tests/rtstutter.c
+rtstutter_LDADD = $(AM_LDADD) libpulsecore.la
+rtstutter_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+rtstutter_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+
+stripnul_SOURCES = tests/stripnul.c
+stripnul_LDADD = $(AM_LDADD) libpulsecore.la
+stripnul_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+stripnul_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+
+lock_autospawn_test_SOURCES = tests/lock-autospawn-test.c
+lock_autospawn_test_LDADD = $(AM_LDADD) libpulsecore.la
+lock_autospawn_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+lock_autospawn_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+
+prioq_test_SOURCES = tests/prioq-test.c
+prioq_test_LDADD = $(AM_LDADD) libpulsecore.la
+prioq_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+prioq_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+
###################################
# Client library #
###################################
@@ -445,7 +491,10 @@ pulseinclude_HEADERS = \
pulse/util.h \
pulse/version.h \
pulse/volume.h \
- pulse/xmalloc.h
+ pulse/xmalloc.h \
+ pulse/proplist.h \
+ pulse/gccmacro.h \
+ pulse/ext-stream-restore.h
if HAVE_AVAHI
pulseinclude_HEADERS += \
@@ -495,7 +544,10 @@ libpulse_la_SOURCES = \
pulse/utf8.c pulse/utf8.h \
pulse/util.c pulse/util.h \
pulse/volume.c pulse/volume.h \
- pulse/xmalloc.c pulse/xmalloc.h
+ pulse/xmalloc.c pulse/xmalloc.h \
+ pulse/proplist.c pulse/proplist.h \
+ pulse/ext-stream-restore.c pulse/ext-stream-restore.h \
+ pulse/i18n.c pulse/i18n.h
# Internal stuff that is shared with libpulsecore
libpulse_la_SOURCES += \
@@ -503,7 +555,6 @@ libpulse_la_SOURCES += \
pulsecore/conf-parser.c pulsecore/conf-parser.h \
pulsecore/core-util.c pulsecore/core-util.h \
pulsecore/dynarray.c pulsecore/dynarray.h \
- pulsecore/gccmacro.h \
pulsecore/hashmap.c pulsecore/hashmap.h \
pulsecore/idxset.c pulsecore/idxset.h \
pulsecore/inet_ntop.c pulsecore/inet_ntop.h \
@@ -536,6 +587,9 @@ libpulse_la_SOURCES += \
pulsecore/object.c pulsecore/object.h \
pulsecore/msgobject.c pulsecore/msgobject.h \
pulsecore/once.c pulsecore/once.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h \
+ pulsecore/time-smoother.c pulsecore/time-smoother.h \
+ pulsecore/proplist-util.c pulsecore/proplist-util.h \
$(PA_THREAD_OBJS)
if OS_IS_WIN32
@@ -551,7 +605,7 @@ endif
libpulse_la_CFLAGS = $(AM_CFLAGS)
libpulse_la_LDFLAGS = -version-info $(LIBPULSE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
-libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LIBICONV)
+libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LTLIBICONV)
if HAVE_X11
libpulse_la_CFLAGS += $(X_CFLAGS)
@@ -569,13 +623,14 @@ libpulse_simple_la_SOURCES = \
pulsecore/core-util.c pulsecore/core-util.h \
pulsecore/core-error.c pulsecore/core-error.h \
pulsecore/once.c pulsecore/once.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h \
$(PA_THREAD_OBJS)
libpulse_simple_la_CFLAGS = $(AM_CFLAGS)
libpulse_simple_la_LIBADD = $(AM_LIBADD) libpulse.la
libpulse_simple_la_LDFLAGS = -version-info $(LIBPULSE_SIMPLE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
-libpulse_browse_la_SOURCES = pulse/browser.c pulse/browser.h pulsecore/avahi-wrap.c pulsecore/avahi-wrap.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+libpulse_browse_la_SOURCES = pulse/browser.c pulse/browser.h pulsecore/avahi-wrap.c pulsecore/avahi-wrap.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
libpulse_browse_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
libpulse_browse_la_LIBADD = $(AM_LIBADD) libpulse.la $(AVAHI_LIBS)
libpulse_browse_la_LDFLAGS = -version-info $(LIBPULSE_BROWSE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
@@ -583,6 +638,7 @@ libpulse_browse_la_LDFLAGS = -version-info $(LIBPULSE_BROWSE_VERSION_INFO) -Wl,-
libpulse_mainloop_glib_la_SOURCES = \
pulse/glib-mainloop.h pulse/glib-mainloop.c \
pulsecore/log.c pulsecore/log.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h \
pulsecore/core-util.c pulsecore/core-util.h \
pulsecore/core-error.c pulsecore/core-error.h \
pulsecore/once.c pulsecore/once.h \
@@ -603,22 +659,16 @@ bin_SCRIPTS += utils/padsp
endif
-libpulsedsp_la_SOURCES = utils/padsp.c
+libpulsedsp_la_SOURCES = utils/padsp.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
libpulsedsp_la_CFLAGS = $(AM_CFLAGS)
libpulsedsp_la_LIBADD = $(AM_LIBADD) libpulse.la
libpulsedsp_la_LDFLAGS = -avoid-version
###################################
-# Speex Resampler #
+# ffmpeg resampler #
###################################
-noinst_LTLIBRARIES = libspeex-resampler-fixed.la libspeex-resampler-float.la libffmpeg-resampler.la
-
-libspeex_resampler_fixed_la_CPPFLAGS = $(AM_CPPFLAGS) -DRANDOM_PREFIX=paspfx -DOUTSIDE_SPEEX -DFIXED_POINT
-libspeex_resampler_fixed_la_SOURCES = pulsecore/speex/resample.c pulsecore/speex/speex_resampler.h pulsecore/speex/arch.h pulsecore/speex/fixed_generic.h pulsecore/speexwrap.h
-
-libspeex_resampler_float_la_CPPFLAGS = $(AM_CPPFLAGS) -DRANDOM_PREFIX=paspfl -DOUTSIDE_SPEEX -DFLOATING_POINT
-libspeex_resampler_float_la_SOURCES = pulsecore/speex/resample.c pulsecore/speex/speex_resampler.h pulsecore/speex/arch.h
+noinst_LTLIBRARIES = libffmpeg-resampler.la
libffmpeg_resampler_la_CPPFLAGS = $(AM_CPPFLAGS)
libffmpeg_resampler_la_SOURCES = pulsecore/ffmpeg/resample2.c pulsecore/ffmpeg/avcodec.h pulsecore/ffmpeg/dsputil.h
@@ -635,7 +685,6 @@ noinst_HEADERS = \
pulsecore/cli-text.h \
pulsecore/client.h \
pulsecore/core.h \
- pulsecore/core-def.h \
pulsecore/core-scache.h \
pulsecore/core-subscribe.h \
pulsecore/conf-parser.h \
@@ -656,7 +705,7 @@ noinst_HEADERS = \
pulsecore/pid.h \
pulsecore/play-memchunk.h \
pulsecore/play-memblockq.h \
- pulsecore/props.h \
+ pulsecore/shared.h \
pulsecore/queue.h \
pulsecore/random.h \
pulsecore/resampler.h \
@@ -694,7 +743,9 @@ libpulsecore_la_SOURCES = \
pulse/utf8.c pulse/utf8.h \
pulse/util.c pulse/util.h \
pulse/volume.c pulse/volume.h \
- pulse/xmalloc.c pulse/xmalloc.h
+ pulse/xmalloc.c pulse/xmalloc.h \
+ pulse/proplist.c pulse/proplist.h \
+ pulse/i18n.c pulse/i18n.h
# Pure core stuff (some are shared in libpulse though).
libpulsecore_la_SOURCES += \
@@ -712,6 +763,7 @@ libpulsecore_la_SOURCES += \
pulsecore/g711.c pulsecore/g711.h \
pulsecore/hashmap.c pulsecore/hashmap.h \
pulsecore/idxset.c pulsecore/idxset.h \
+ pulsecore/prioq.c pulsecore/prioq.h \
pulsecore/log.c pulsecore/log.h \
pulsecore/mcalign.c pulsecore/mcalign.h \
pulsecore/memblock.c pulsecore/memblock.h \
@@ -727,7 +779,7 @@ libpulsecore_la_SOURCES += \
pulsecore/play-memchunk.c pulsecore/play-memchunk.h \
pulsecore/play-memblockq.c pulsecore/play-memblockq.h \
pulsecore/poll.c pulsecore/poll.h \
- pulsecore/props.c pulsecore/props.h \
+ pulsecore/shared.c pulsecore/shared.h \
pulsecore/queue.c pulsecore/queue.h \
pulsecore/random.c pulsecore/random.h \
pulsecore/resampler.c pulsecore/resampler.h \
@@ -762,6 +814,9 @@ libpulsecore_la_SOURCES += \
pulsecore/once.c pulsecore/once.h \
pulsecore/time-smoother.c pulsecore/time-smoother.h \
pulsecore/start-child.c pulsecore/start-child.h \
+ pulsecore/envelope.c pulsecore/envelope.h \
+ pulsecore/proplist-util.c pulsecore/proplist-util.h \
+ pulsecore/lock-autospawn.c pulsecore/lock-autospawn.h \
$(PA_THREAD_OBJS)
if OS_IS_WIN32
@@ -771,7 +826,7 @@ endif
libpulsecore_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBOIL_CFLAGS)
libpulsecore_la_LDFLAGS = -version-info $(LIBPULSECORE_VERSION_INFO)
-libpulsecore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LIBICONV) libspeex-resampler-fixed.la libspeex-resampler-float.la libffmpeg-resampler.la
+libpulsecore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(LIBSPEEX_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LTLIBICONV) libffmpeg-resampler.la
###################################
# Plug-in support libraries #
@@ -794,7 +849,7 @@ noinst_HEADERS += \
pulsecore/pstream-util.h \
pulsecore/pdispatch.h \
pulsecore/authkey.h \
- pulsecore/authkey-prop.h \
+ pulsecore/auth-cookie.h \
pulsecore/strlist.h \
pulsecore/protocol-simple.h \
pulsecore/esound.h \
@@ -824,7 +879,7 @@ modlibexec_LTLIBRARIES = \
libpstream-util.la \
libpdispatch.la \
libauthkey.la \
- libauthkey-prop.la \
+ libauth-cookie.la \
libstrlist.la \
libprotocol-simple.la \
libprotocol-http.la \
@@ -888,7 +943,7 @@ libpstream_la_LIBADD = $(AM_LIBADD) libpulsecore.la libpacket.la libiochannel.la
libpstream_util_la_SOURCES = pulsecore/pstream-util.c pulsecore/pstream-util.h
libpstream_util_la_LDFLAGS = -avoid-version
-libpstream_util_la_LIBADD = $(AM_LIBADD) libpacket.la libpstream.la libtagstruct.la
+libpstream_util_la_LIBADD = $(AM_LIBADD) libpacket.la libpstream.la libtagstruct.la libpulsecore.la
libpdispatch_la_SOURCES = pulsecore/pdispatch.c pulsecore/pdispatch.h
libpdispatch_la_LDFLAGS = -avoid-version
@@ -925,7 +980,7 @@ libprotocol_http_la_LIBADD = $(AM_LIBADD) libsocket-server.la libioline.la libpu
libprotocol_native_la_SOURCES = pulsecore/protocol-native.c pulsecore/protocol-native.h pulsecore/native-common.h
libprotocol_native_la_LDFLAGS = -avoid-version
-libprotocol_native_la_LIBADD = $(AM_LIBADD) libsocket-server.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libstrlist.la libpulsecore.la libiochannel.la libipacl.la
+libprotocol_native_la_LIBADD = $(AM_LIBADD) libsocket-server.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauth-cookie.la libstrlist.la libpulsecore.la libiochannel.la libipacl.la
libtagstruct_la_SOURCES = pulsecore/tagstruct.c pulsecore/tagstruct.h
libtagstruct_la_LDFLAGS = -avoid-version
@@ -933,15 +988,15 @@ libtagstruct_la_LIBADD = $(AM_LIBADD) libpulsecore.la $(WINSOCK_LIBS)
libprotocol_esound_la_SOURCES = pulsecore/protocol-esound.c pulsecore/protocol-esound.h pulsecore/esound.h
libprotocol_esound_la_LDFLAGS = -avoid-version
-libprotocol_esound_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libauthkey.la libpulsecore.la libipacl.la
+libprotocol_esound_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libauthkey.la libauth-cookie.la libpulsecore.la libipacl.la
libauthkey_la_SOURCES = pulsecore/authkey.c pulsecore/authkey.h
libauthkey_la_LDFLAGS = -avoid-version
libauthkey_la_LIBADD = $(AM_LIBADD) libpulsecore.la
-libauthkey_prop_la_SOURCES = pulsecore/authkey-prop.c pulsecore/authkey-prop.h
-libauthkey_prop_la_LDFLAGS = -avoid-version
-libauthkey_prop_la_LIBADD = $(AM_LIBADD) libpulsecore.la
+libauth_cookie_la_SOURCES = pulsecore/auth-cookie.c pulsecore/auth-cookie.h
+libauth_cookie_la_LDFLAGS = -avoid-version
+libauth_cookie_la_LIBADD = $(AM_LIBADD) libauthkey.la libpulsecore.la
libsocket_util_la_SOURCES = \
pulsecore/inet_ntop.c pulsecore/inet_ntop.h \
@@ -983,7 +1038,10 @@ modlibexec_LTLIBRARIES += \
module-null-sink.la \
module-detect.la \
module-volume-restore.la \
+ module-device-restore.la \
+ module-stream-restore.la \
module-default-device-restore.la \
+ module-always-sink.la \
module-rescue-streams.la \
module-suspend-on-idle.la \
module-http-protocol-tcp.la \
@@ -996,7 +1054,9 @@ modlibexec_LTLIBRARIES += \
module-ladspa-sink.la \
module-esound-sink.la \
module-tunnel-sink.la \
- module-tunnel-source.la
+ module-tunnel-source.la \
+ module-position-event-sounds.la
+
# See comment at librtp.la above
if !OS_IS_WIN32
@@ -1099,12 +1159,22 @@ modlibexec_LTLIBRARIES += \
module-hal-detect.la
endif
+if HAVE_DBUS
+modlibexec_LTLIBRARIES += \
+ libdbus-util.la \
+ module-console-kit.la
+endif
+
if HAVE_BLUEZ
modlibexec_LTLIBRARIES += \
- module-bt-proximity.la
+ module-bluetooth-proximity.la \
+ module-bluetooth-discover.la \
+ libbluetooth-ipc.la \
+ libbluetooth-sbc.la \
+ module-bluetooth-device.la
pulselibexec_PROGRAMS += \
- bt-proximity-helper
+ proximity-helper
endif
# These are generated by a M4 script
@@ -1153,12 +1223,19 @@ SYMDEF_FILES = \
modules/module-jack-sink-symdef.h \
modules/module-jack-source-symdef.h \
modules/module-volume-restore-symdef.h \
+ modules/module-device-restore-symdef.h \
+ modules/module-stream-restore-symdef.h \
modules/module-default-device-restore-symdef.h \
+ modules/module-always-sink-symdef.h \
modules/module-rescue-streams-symdef.h \
modules/module-suspend-on-idle-symdef.h \
modules/module-hal-detect-symdef.h \
- modules/module-bt-proximity-symdef.h \
- modules/gconf/module-gconf-symdef.h
+ modules/bluetooth/module-bluetooth-proximity-symdef.h \
+ modules/bluetooth/module-bluetooth-discover-symdef.h \
+ modules/bluetooth/module-bluetooth-device-symdef.h \
+ modules/gconf/module-gconf-symdef.h \
+ modules/module-position-event-sounds-symdef.h \
+ modules/module-console-kit-symdef.h
EXTRA_DIST += $(SYMDEF_FILES)
BUILT_SOURCES += $(SYMDEF_FILES)
@@ -1167,6 +1244,7 @@ $(SYMDEF_FILES): modules/module-defs.h.m4
$(MKDIR_P) modules
$(MKDIR_P) modules/gconf
$(MKDIR_P) modules/rtp
+ $(MKDIR_P) modules/bluetooth
$(M4) -Dfname="$@" $< > $@
# Simple protocol
@@ -1281,7 +1359,7 @@ module_remap_sink_la_LDFLAGS = -module -avoid-version
module_remap_sink_la_LIBADD = $(AM_LIBADD) libpulsecore.la
module_ladspa_sink_la_SOURCES = modules/module-ladspa-sink.c modules/ladspa.h
-module_ladspa_sink_la_CFLAGS = -DLADSPA_PATH=\"$(libdir)/ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa\" $(AM_CFLAGS)
+module_ladspa_sink_la_CFLAGS = -DLADSPA_PATH=\"$(libdir)/ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/local/lib64/ladspa:/usr/lib64/ladspa\" $(AM_CFLAGS)
module_ladspa_sink_la_LDFLAGS = -module -avoid-version
module_ladspa_sink_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) libpulsecore.la
@@ -1292,11 +1370,11 @@ module_match_la_LIBADD = $(AM_LIBADD) libpulsecore.la
module_tunnel_sink_la_SOURCES = modules/module-tunnel.c
module_tunnel_sink_la_CFLAGS = -DTUNNEL_SINK=1 $(AM_CFLAGS)
module_tunnel_sink_la_LDFLAGS = -module -avoid-version
-module_tunnel_sink_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libsocket-util.la libiochannel.la
+module_tunnel_sink_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauth-cookie.la libsocket-util.la libiochannel.la
module_tunnel_source_la_SOURCES = modules/module-tunnel.c
module_tunnel_source_la_LDFLAGS = -module -avoid-version
-module_tunnel_source_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libsocket-util.la libiochannel.la
+module_tunnel_source_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauth-cookie.la libsocket-util.la libiochannel.la
# X11
@@ -1308,12 +1386,12 @@ module_x11_bell_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA
module_x11_publish_la_SOURCES = modules/module-x11-publish.c
module_x11_publish_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
module_x11_publish_la_LDFLAGS = -module -avoid-version
-module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libauthkey.la libauthkey-prop.la libx11prop.la libstrlist.la libpulsecore.la
+module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libauthkey.la libauth-cookie.la libx11prop.la libstrlist.la libprotocol-native.la libpulsecore.la
module_x11_xsmp_la_SOURCES = modules/module-x11-xsmp.c
module_x11_xsmp_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
module_x11_xsmp_la_LDFLAGS = -module -avoid-version
-module_x11_xsmp_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libpulsecore.la
+module_x11_xsmp_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libpulsecore.la
# OSS
@@ -1393,12 +1471,36 @@ module_volume_restore_la_LDFLAGS = -module -avoid-version
module_volume_restore_la_LIBADD = $(AM_LIBADD) libpulsecore.la
module_volume_restore_la_CFLAGS = $(AM_CFLAGS)
+# Position event sounds in space
+module_position_event_sounds_la_SOURCES = modules/module-position-event-sounds.c
+module_position_event_sounds_la_LDFLAGS = -module -avoid-version
+module_position_event_sounds_la_LIBADD = $(AM_LIBADD) libpulsecore.la
+module_position_event_sounds_CFLAGS = $(AM_CFLAGS)
+
+# Device volume/muted restore module
+module_device_restore_la_SOURCES = modules/module-device-restore.c
+module_device_restore_la_LDFLAGS = -module -avoid-version
+module_device_restore_la_LIBADD = $(AM_LIBADD) libpulsecore.la -lgdbm
+module_device_restore_la_CFLAGS = $(AM_CFLAGS)
+
+# Stream volume/muted/device restore module
+module_stream_restore_la_SOURCES = modules/module-stream-restore.c
+module_stream_restore_la_LDFLAGS = -module -avoid-version
+module_stream_restore_la_LIBADD = $(AM_LIBADD) libtagstruct.la libprotocol-native.la libpulsecore.la -lgdbm
+module_stream_restore_la_CFLAGS = $(AM_CFLAGS)
+
# Default sink/source restore module
module_default_device_restore_la_SOURCES = modules/module-default-device-restore.c
module_default_device_restore_la_LDFLAGS = -module -avoid-version
module_default_device_restore_la_LIBADD = $(AM_LIBADD) libpulsecore.la
module_default_device_restore_la_CFLAGS = $(AM_CFLAGS)
+# Always Sink module
+module_always_sink_la_SOURCES = modules/module-always-sink.c
+module_always_sink_la_LDFLAGS = -module -avoid-version
+module_always_sink_la_LIBADD = $(AM_LIBADD) libpulsecore.la
+module_always_sink_la_CFLAGS = $(AM_CFLAGS)
+
# Rescue streams module
module_rescue_streams_la_SOURCES = modules/module-rescue-streams.c
module_rescue_streams_la_LDFLAGS = -module -avoid-version
@@ -1434,7 +1536,7 @@ module_jack_source_la_LDFLAGS = -module -avoid-version
module_jack_source_la_LIBADD = $(AM_LIBADD) libpulsecore.la $(JACK_LIBS)
module_jack_source_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS)
-# HAL
+# HAL/D-Bus
libdbus_util_la_SOURCES = modules/dbus-util.c modules/dbus-util.h
libdbus_util_la_LDFLAGS = -avoid-version
libdbus_util_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la
@@ -1445,6 +1547,11 @@ module_hal_detect_la_LDFLAGS = -module -avoid-version
module_hal_detect_la_LIBADD = $(AM_LIBADD) $(HAL_LIBS) libpulsecore.la libdbus-util.la
module_hal_detect_la_CFLAGS = $(AM_CFLAGS) $(HAL_CFLAGS)
+module_console_kit_la_SOURCES = modules/module-console-kit.c
+module_console_kit_la_LDFLAGS = -module -avoid-version
+module_console_kit_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la
+module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
+
# GConf support
module_gconf_la_SOURCES = modules/gconf/module-gconf.c
module_gconf_la_LDFLAGS = -module -avoid-version
@@ -1457,15 +1564,36 @@ gconf_helper_CFLAGS = $(AM_CFLAGS) $(GCONF_CFLAGS)
gconf_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
# Bluetooth proximity
-module_bt_proximity_la_SOURCES = modules/module-bt-proximity.c
-module_bt_proximity_la_LDFLAGS = -module -avoid-version
-module_bt_proximity_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la
-module_bt_proximity_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DPA_BT_PROXIMITY_HELPER=\"$(pulselibexecdir)/bt-proximity-helper\"
-
-bt_proximity_helper_SOURCES = modules/bt-proximity-helper.c
-bt_proximity_helper_LDADD = $(AM_LDADD) $(BLUEZ_LIBS)
-bt_proximity_helper_CFLAGS = $(AM_CFLAGS) $(BLUEZ_CFLAGS)
-bt_proximity_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+module_bluetooth_proximity_la_SOURCES = modules/bluetooth/module-bluetooth-proximity.c
+module_bluetooth_proximity_la_LDFLAGS = -module -avoid-version
+module_bluetooth_proximity_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la
+module_bluetooth_proximity_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DPA_BT_PROXIMITY_HELPER=\"$(pulselibexecdir)/proximity-helper\"
+
+proximity_helper_SOURCES = modules/bluetooth/proximity-helper.c
+proximity_helper_LDADD = $(AM_LDADD) $(BLUEZ_LIBS)
+proximity_helper_CFLAGS = $(AM_CFLAGS) $(BLUEZ_CFLAGS)
+proximity_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+
+# Bluetooth sink / source
+module_bluetooth_discover_la_SOURCES = modules/bluetooth/module-bluetooth-discover.c
+module_bluetooth_discover_la_LDFLAGS = -module -avoid-version
+module_bluetooth_discover_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la
+module_bluetooth_discover_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
+
+libbluetooth_sbc_la_SOURCES = modules/bluetooth/sbc.c modules/bluetooth/sbc.h modules/bluetooth/sbc_tables.h modules/bluetooth/sbc_math.h
+libbluetooth_sbc_la_LDFLAGS = -avoid-version
+libbluetooth_sbc_la_LIBADD = $(AM_LIBADD)
+libbluetooth_sbc_la_CFLAGS = $(AM_CFLAGS)
+
+libbluetooth_ipc_la_SOURCES = modules/bluetooth/ipc.c modules/bluetooth/ipc.h
+libbluetooth_ipc_la_LDFLAGS = -avoid-version
+libbluetooth_ipc_la_LIBADD = $(AM_LIBADD)
+libbluetooth_ipc_la_CFLAGS = $(AM_CFLAGS)
+
+module_bluetooth_device_la_SOURCES = modules/bluetooth/module-bluetooth-device.c modules/bluetooth/rtp.h
+module_bluetooth_device_la_LDFLAGS = -module -avoid-version
+module_bluetooth_device_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la libbluetooth-ipc.la libbluetooth-sbc.la libsocket-util.la
+module_bluetooth_device_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
###################################
# Some minor stuff #
@@ -1475,7 +1603,7 @@ suid: pulseaudio .libs/lt-pulseaudio
chown root $^
chmod u+s $^
-CLEANFILES = esdcompat client.conf default.pa daemon.conf
+CLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11
esdcompat: daemon/esdcompat.in Makefile
sed -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
@@ -1483,17 +1611,28 @@ esdcompat: daemon/esdcompat.in Makefile
-e 's,@PA_BINARY\@,$(PA_BINARY),g' < $< > $@
chmod +x esdcompat
+start-pulseaudio-x11: daemon/start-pulseaudio-x11.in Makefile
+ sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \
+ -e 's,@PACTL_BINARY\@,$(bindir)/pactl,g' < $< > $@
+ chmod +x start-pulseaudio-x11
+
client.conf: pulse/client.conf.in Makefile
sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' < $< > $@
if OS_IS_WIN32
default.pa: daemon/default.pa.win32
cp $< $@
+system.pa: daemon/default.pa.win32
+ cp $< $@
else
default.pa: daemon/default.pa.in Makefile
sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \
-e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \
-e 's,@PA_SOEXT\@,.so,g' < $< > $@
+system.pa: daemon/system.pa.in Makefile
+ sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \
+ -e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \
+ -e 's,@PA_SOEXT\@,.so,g' < $< > $@
endif
daemon.conf: daemon/daemon.conf.in Makefile
@@ -1503,7 +1642,7 @@ daemon.conf: daemon/daemon.conf.in Makefile
install-exec-hook:
chown root $(DESTDIR)$(bindir)/pulseaudio ; true
chmod u+s $(DESTDIR)$(bindir)/pulseaudio
- -chmod u+s $(DESTDIR)$(pulselibexecdir)/bt-proximity-helper
+ -chmod u+s $(DESTDIR)$(pulselibexecdir)/proximity-helper
ln -sf pacat $(DESTDIR)$(bindir)/parec
rm -f $(DESTDIR)$(modlibexecdir)/*.a
rm -f $(DESTDIR)$(libdir)/libpulsedsp.a
@@ -1513,12 +1652,6 @@ install-exec-hook:
massif: pulseaudio
libtool --mode=execute valgrind --tool=massif --depth=6 --alloc-fn=pa_xmalloc --alloc-fn=pa_xmalloc0 --alloc-fn=pa_xrealloc --alloc-fn=dbus_realloc --alloc-fn=pa_xnew0_internal --alloc-fn=pa_xnew_internal ./pulseaudio
-update-speex:
- wget -O pulsecore/speex/speex_resampler.h http://svn.xiph.org/trunk/speex/include/speex/speex_resampler.h
- wget -O pulsecore/speex/resample.c http://svn.xiph.org/trunk/speex/libspeex/resample.c
- wget -O pulsecore/speex/arch.h http://svn.xiph.org/trunk/speex/libspeex/arch.h
- wget -O pulsecore/speex/fixed_generic.h http://svn.xiph.org/trunk/speex/libspeex/fixed_generic.h
-
update-ffmpeg:
wget -O pulsecore/ffmpeg/resample2.c http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/resample2.c?view=co
@@ -1526,7 +1659,7 @@ update-ffmpeg:
update-map-file:
( echo "PULSE_0 {" ; \
echo "global:" ; \
- ctags -I PA_GCC_PURE,PA_GCC_CONST -f - --c-kinds=p $(pulseinclude_HEADERS) | awk '/^pa_/ { print $$1 ";" }' | sort ; \
+ ctags -I PA_GCC_MALLOC,PA_GCC_ALLOC_SIZE2,PA_GCC_ALLOC_SIZE,PA_GCC_PURE,PA_GCC_CONST,PA_GCC_DEPRECATED,PA_GCC_PRINTF_ATTR -f - --c-kinds=p $(pulseinclude_HEADERS) | awk '/^pa_/ { print $$1 ";" }' | sort ; \
echo "local:" ; \
echo "*;" ; \
echo "};" ) > $(srcdir)/map-file
diff --git a/src/Makefile.in b/src/Makefile.in
index ceb916c..2446707 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -14,8 +14,6 @@
@SET_MAKE@
-# $Id: Makefile.am 2195 2008-03-30 01:43:15Z lennart $
-#
# This file is part of PulseAudio.
#
# Copyright 2004-2006 Lennart Poettering
@@ -75,18 +73,20 @@ bin_PROGRAMS = pulseaudio$(EXEEXT) pacat$(EXEEXT) pactl$(EXEEXT) \
@HAVE_AVAHI_TRUE@am__append_7 = pabrowse
noinst_PROGRAMS = mainloop-test$(EXEEXT) mcalign-test$(EXEEXT) \
pacat-simple$(EXEEXT) parec-simple$(EXEEXT) \
- strlist-test$(EXEEXT) voltest$(EXEEXT) memblockq-test$(EXEEXT) \
- sync-playback$(EXEEXT) interpol-test$(EXEEXT) \
- channelmap-test$(EXEEXT) thread-mainloop-test$(EXEEXT) \
- utf8-test$(EXEEXT) get-binary-name-test$(EXEEXT) \
- ipacl-test$(EXEEXT) hook-list-test$(EXEEXT) \
- memblock-test$(EXEEXT) thread-test$(EXEEXT) \
- flist-test$(EXEEXT) asyncq-test$(EXEEXT) \
+ strlist-test$(EXEEXT) close-test$(EXEEXT) voltest$(EXEEXT) \
+ memblockq-test$(EXEEXT) sync-playback$(EXEEXT) \
+ interpol-test$(EXEEXT) channelmap-test$(EXEEXT) \
+ thread-mainloop-test$(EXEEXT) utf8-test$(EXEEXT) \
+ get-binary-name-test$(EXEEXT) ipacl-test$(EXEEXT) \
+ hook-list-test$(EXEEXT) memblock-test$(EXEEXT) \
+ thread-test$(EXEEXT) flist-test$(EXEEXT) asyncq-test$(EXEEXT) \
asyncmsgq-test$(EXEEXT) queue-test$(EXEEXT) \
rtpoll-test$(EXEEXT) sig2str-test$(EXEEXT) \
resampler-test$(EXEEXT) smoother-test$(EXEEXT) \
- mix-test$(EXEEXT) remix-test$(EXEEXT) $(am__EXEEXT_4) \
- $(am__EXEEXT_5)
+ mix-test$(EXEEXT) remix-test$(EXEEXT) envelope-test$(EXEEXT) \
+ proplist-test$(EXEEXT) rtstutter$(EXEEXT) stripnul$(EXEEXT) \
+ lock-autospawn-test$(EXEEXT) prioq-test$(EXEEXT) \
+ $(am__EXEEXT_4) $(am__EXEEXT_5)
@HAVE_SIGXCPU_TRUE@am__append_8 = \
@HAVE_SIGXCPU_TRUE@ cpulimit-test \
@HAVE_SIGXCPU_TRUE@ cpulimit-test2
@@ -220,18 +220,32 @@ pulselibexec_PROGRAMS = $(am__EXEEXT_6) $(am__EXEEXT_7)
@HAVE_HAL_TRUE@ libdbus-util.la \
@HAVE_HAL_TRUE@ module-hal-detect.la
-@HAVE_BLUEZ_TRUE@am__append_44 = \
-@HAVE_BLUEZ_TRUE@ module-bt-proximity.la
+@HAVE_DBUS_TRUE@am__append_44 = \
+@HAVE_DBUS_TRUE@ libdbus-util.la \
+@HAVE_DBUS_TRUE@ module-console-kit.la
@HAVE_BLUEZ_TRUE@am__append_45 = \
-@HAVE_BLUEZ_TRUE@ bt-proximity-helper
+@HAVE_BLUEZ_TRUE@ module-bluetooth-proximity.la \
+@HAVE_BLUEZ_TRUE@ module-bluetooth-discover.la \
+@HAVE_BLUEZ_TRUE@ libbluetooth-ipc.la \
+@HAVE_BLUEZ_TRUE@ libbluetooth-sbc.la \
+@HAVE_BLUEZ_TRUE@ module-bluetooth-device.la
+
+@HAVE_BLUEZ_TRUE@am__append_46 = \
+@HAVE_BLUEZ_TRUE@ proximity-helper
subdir = src
DIST_COMMON = $(am__noinst_HEADERS_DIST) \
$(am__pulseinclude_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_libwrap.m4 \
+ $(top_srcdir)/m4/acx_lirc.m4 $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/attributes.m4 \
+ $(top_srcdir)/m4/check_define.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/tls.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@@ -254,7 +268,7 @@ modlibexecLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES) $(modlibexec_LTLIBRARIES) \
$(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
libalsa_util_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_1) libpulsecore.la
am_libalsa_util_la_OBJECTS = libalsa_util_la-alsa-util.lo
@@ -263,13 +277,13 @@ libalsa_util_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libalsa_util_la_CFLAGS) \
$(CFLAGS) $(libalsa_util_la_LDFLAGS) $(LDFLAGS) -o $@
@HAVE_ALSA_TRUE@am_libalsa_util_la_rpath = -rpath $(modlibexecdir)
-libauthkey_prop_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+libauth_cookie_la_DEPENDENCIES = $(am__DEPENDENCIES_2) libauthkey.la \
libpulsecore.la
-am_libauthkey_prop_la_OBJECTS = authkey-prop.lo
-libauthkey_prop_la_OBJECTS = $(am_libauthkey_prop_la_OBJECTS)
-libauthkey_prop_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+am_libauth_cookie_la_OBJECTS = auth-cookie.lo
+libauth_cookie_la_OBJECTS = $(am_libauth_cookie_la_OBJECTS)
+libauth_cookie_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(libauthkey_prop_la_LDFLAGS) $(LDFLAGS) -o $@
+ $(libauth_cookie_la_LDFLAGS) $(LDFLAGS) -o $@
libauthkey_la_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
am_libauthkey_la_OBJECTS = authkey.lo
libauthkey_la_OBJECTS = $(am_libauthkey_la_OBJECTS)
@@ -284,6 +298,24 @@ libavahi_wrap_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libavahi_wrap_la_CFLAGS) \
$(CFLAGS) $(libavahi_wrap_la_LDFLAGS) $(LDFLAGS) -o $@
@HAVE_AVAHI_TRUE@am_libavahi_wrap_la_rpath = -rpath $(modlibexecdir)
+libbluetooth_ipc_la_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_libbluetooth_ipc_la_OBJECTS = libbluetooth_ipc_la-ipc.lo
+libbluetooth_ipc_la_OBJECTS = $(am_libbluetooth_ipc_la_OBJECTS)
+libbluetooth_ipc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libbluetooth_ipc_la_CFLAGS) $(CFLAGS) \
+ $(libbluetooth_ipc_la_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_BLUEZ_TRUE@am_libbluetooth_ipc_la_rpath = -rpath \
+@HAVE_BLUEZ_TRUE@ $(modlibexecdir)
+libbluetooth_sbc_la_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_libbluetooth_sbc_la_OBJECTS = libbluetooth_sbc_la-sbc.lo
+libbluetooth_sbc_la_OBJECTS = $(am_libbluetooth_sbc_la_OBJECTS)
+libbluetooth_sbc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libbluetooth_sbc_la_CFLAGS) $(CFLAGS) \
+ $(libbluetooth_sbc_la_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_BLUEZ_TRUE@am_libbluetooth_sbc_la_rpath = -rpath \
+@HAVE_BLUEZ_TRUE@ $(modlibexecdir)
libcli_la_DEPENDENCIES = $(am__DEPENDENCIES_2) libiochannel.la \
libioline.la libpulsecore.la
am_libcli_la_OBJECTS = libcli_la-cli.lo
@@ -298,6 +330,7 @@ libdbus_util_la_OBJECTS = $(am_libdbus_util_la_OBJECTS)
libdbus_util_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libdbus_util_la_CFLAGS) \
$(CFLAGS) $(libdbus_util_la_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_DBUS_TRUE@am_libdbus_util_la_rpath = -rpath $(modlibexecdir)
@HAVE_HAL_TRUE@am_libdbus_util_la_rpath = -rpath $(modlibexecdir)
libffmpeg_resampler_la_LIBADD =
am_libffmpeg_resampler_la_OBJECTS = \
@@ -359,7 +392,7 @@ libprotocol_cli_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(libprotocol_cli_la_LDFLAGS) $(LDFLAGS) -o $@
libprotocol_esound_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libsocket-server.la libiochannel.la libauthkey.la \
- libpulsecore.la libipacl.la
+ libauth-cookie.la libpulsecore.la libipacl.la
am_libprotocol_esound_la_OBJECTS = protocol-esound.lo
libprotocol_esound_la_OBJECTS = $(am_libprotocol_esound_la_OBJECTS)
libprotocol_esound_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -376,7 +409,7 @@ libprotocol_http_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
libprotocol_native_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libsocket-server.la libpstream.la libpstream-util.la \
libpdispatch.la libtagstruct.la libauthkey.la \
- libauthkey-prop.la libstrlist.la libpulsecore.la \
+ libauth-cookie.la libstrlist.la libpulsecore.la \
libiochannel.la libipacl.la
am_libprotocol_native_la_OBJECTS = protocol-native.lo
libprotocol_native_la_OBJECTS = $(am_libprotocol_native_la_OBJECTS)
@@ -391,7 +424,7 @@ libprotocol_simple_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libprotocol_simple_la_LDFLAGS) $(LDFLAGS) -o $@
libpstream_util_la_DEPENDENCIES = $(am__DEPENDENCIES_2) libpacket.la \
- libpstream.la libtagstruct.la
+ libpstream.la libtagstruct.la libpulsecore.la
am_libpstream_util_la_OBJECTS = pstream-util.lo
libpstream_util_la_OBJECTS = $(am_libpstream_util_la_OBJECTS)
libpstream_util_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -410,9 +443,9 @@ am__libpulse_browse_la_SOURCES_DIST = pulse/browser.c pulse/browser.h \
pulsecore/avahi-wrap.c pulsecore/avahi-wrap.h \
pulsecore/core-util.c pulsecore/core-util.h \
pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c \
- pulsecore/log.h pulsecore/once.c pulsecore/once.h \
- pulsecore/mutex-posix.c pulsecore/mutex.h \
- pulsecore/thread-posix.c pulsecore/thread.h \
+ pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h \
+ pulsecore/once.c pulsecore/once.h pulsecore/mutex-posix.c \
+ pulsecore/mutex.h pulsecore/thread-posix.c pulsecore/thread.h \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
pulsecore/mutex-win32.c pulsecore/thread-win32.c \
pulsecore/semaphore-win32.c
@@ -426,7 +459,8 @@ am_libpulse_browse_la_OBJECTS = libpulse_browse_la-browser.lo \
libpulse_browse_la-avahi-wrap.lo \
libpulse_browse_la-core-util.lo \
libpulse_browse_la-core-error.lo libpulse_browse_la-log.lo \
- libpulse_browse_la-once.lo $(am__objects_1)
+ libpulse_browse_la-rtclock.lo libpulse_browse_la-once.lo \
+ $(am__objects_1)
libpulse_browse_la_OBJECTS = $(am_libpulse_browse_la_OBJECTS)
libpulse_browse_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -437,9 +471,10 @@ libpulse_mainloop_glib_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libpulse.la $(am__DEPENDENCIES_1)
am__libpulse_mainloop_glib_la_SOURCES_DIST = pulse/glib-mainloop.h \
pulse/glib-mainloop.c pulsecore/log.c pulsecore/log.h \
- pulsecore/core-util.c pulsecore/core-util.h \
- pulsecore/core-error.c pulsecore/core-error.h pulsecore/once.c \
- pulsecore/once.h pulsecore/mutex-posix.c pulsecore/mutex.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/core-util.c \
+ pulsecore/core-util.h pulsecore/core-error.c \
+ pulsecore/core-error.h pulsecore/once.c pulsecore/once.h \
+ pulsecore/mutex-posix.c pulsecore/mutex.h \
pulsecore/thread-posix.c pulsecore/thread.h \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
pulsecore/mutex-win32.c pulsecore/thread-win32.c \
@@ -455,6 +490,7 @@ am__libpulse_mainloop_glib_la_SOURCES_DIST = pulse/glib-mainloop.h \
am_libpulse_mainloop_glib_la_OBJECTS = \
libpulse_mainloop_glib_la-glib-mainloop.lo \
libpulse_mainloop_glib_la-log.lo \
+ libpulse_mainloop_glib_la-rtclock.lo \
libpulse_mainloop_glib_la-core-util.lo \
libpulse_mainloop_glib_la-core-error.lo \
libpulse_mainloop_glib_la-once.lo $(am__objects_2)
@@ -471,6 +507,7 @@ am__libpulse_simple_la_SOURCES_DIST = pulse/simple.c pulse/simple.h \
pulsecore/log.c pulsecore/log.h pulsecore/core-util.c \
pulsecore/core-util.h pulsecore/core-error.c \
pulsecore/core-error.h pulsecore/once.c pulsecore/once.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h \
pulsecore/mutex-posix.c pulsecore/mutex.h \
pulsecore/thread-posix.c pulsecore/thread.h \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
@@ -485,7 +522,7 @@ am__libpulse_simple_la_SOURCES_DIST = pulse/simple.c pulse/simple.h \
am_libpulse_simple_la_OBJECTS = libpulse_simple_la-simple.lo \
libpulse_simple_la-log.lo libpulse_simple_la-core-util.lo \
libpulse_simple_la-core-error.lo libpulse_simple_la-once.lo \
- $(am__objects_3)
+ libpulse_simple_la-rtclock.lo $(am__objects_3)
libpulse_simple_la_OBJECTS = $(am_libpulse_simple_la_OBJECTS)
libpulse_simple_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -508,12 +545,14 @@ am__libpulse_la_SOURCES_DIST = pulse/cdecl.h pulse/channelmap.c \
pulse/thread-mainloop.h pulse/timeval.c pulse/timeval.h \
pulse/utf8.c pulse/utf8.h pulse/util.c pulse/util.h \
pulse/volume.c pulse/volume.h pulse/xmalloc.c pulse/xmalloc.h \
+ pulse/proplist.c pulse/proplist.h pulse/ext-stream-restore.c \
+ pulse/ext-stream-restore.h pulse/i18n.c pulse/i18n.h \
pulsecore/authkey.c pulsecore/authkey.h \
pulsecore/conf-parser.c pulsecore/conf-parser.h \
pulsecore/core-util.c pulsecore/core-util.h \
- pulsecore/dynarray.c pulsecore/dynarray.h pulsecore/gccmacro.h \
- pulsecore/hashmap.c pulsecore/hashmap.h pulsecore/idxset.c \
- pulsecore/idxset.h pulsecore/inet_ntop.c pulsecore/inet_ntop.h \
+ pulsecore/dynarray.c pulsecore/dynarray.h pulsecore/hashmap.c \
+ pulsecore/hashmap.h pulsecore/idxset.c pulsecore/idxset.h \
+ pulsecore/inet_ntop.c pulsecore/inet_ntop.h \
pulsecore/iochannel.c pulsecore/iochannel.h pulsecore/llist.h \
pulsecore/log.c pulsecore/log.h pulsecore/mcalign.c \
pulsecore/mcalign.h pulsecore/memblock.c pulsecore/memblock.h \
@@ -535,7 +574,10 @@ am__libpulse_la_SOURCES_DIST = pulse/cdecl.h pulse/channelmap.c \
pulsecore/shm.c pulsecore/shm.h pulsecore/flist.c \
pulsecore/flist.h pulsecore/object.c pulsecore/object.h \
pulsecore/msgobject.c pulsecore/msgobject.h pulsecore/once.c \
- pulsecore/once.h pulsecore/mutex-posix.c pulsecore/mutex.h \
+ pulsecore/once.h pulsecore/rtclock.c pulsecore/rtclock.h \
+ pulsecore/time-smoother.c pulsecore/time-smoother.h \
+ pulsecore/proplist-util.c pulsecore/proplist-util.h \
+ pulsecore/mutex-posix.c pulsecore/mutex.h \
pulsecore/thread-posix.c pulsecore/thread.h \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
pulsecore/mutex-win32.c pulsecore/thread-win32.c \
@@ -560,24 +602,27 @@ am_libpulse_la_OBJECTS = libpulse_la-channelmap.lo \
libpulse_la-stream.lo libpulse_la-subscribe.lo \
libpulse_la-thread-mainloop.lo libpulse_la-timeval.lo \
libpulse_la-utf8.lo libpulse_la-util.lo libpulse_la-volume.lo \
- libpulse_la-xmalloc.lo libpulse_la-authkey.lo \
- libpulse_la-conf-parser.lo libpulse_la-core-util.lo \
- libpulse_la-dynarray.lo libpulse_la-hashmap.lo \
- libpulse_la-idxset.lo libpulse_la-inet_ntop.lo \
- libpulse_la-iochannel.lo libpulse_la-log.lo \
- libpulse_la-mcalign.lo libpulse_la-memblock.lo \
- libpulse_la-memblockq.lo libpulse_la-memchunk.lo \
- libpulse_la-packet.lo libpulse_la-parseaddr.lo \
- libpulse_la-pdispatch.lo libpulse_la-pipe.lo \
- libpulse_la-poll.lo libpulse_la-pstream.lo \
+ libpulse_la-xmalloc.lo libpulse_la-proplist.lo \
+ libpulse_la-ext-stream-restore.lo libpulse_la-i18n.lo \
+ libpulse_la-authkey.lo libpulse_la-conf-parser.lo \
+ libpulse_la-core-util.lo libpulse_la-dynarray.lo \
+ libpulse_la-hashmap.lo libpulse_la-idxset.lo \
+ libpulse_la-inet_ntop.lo libpulse_la-iochannel.lo \
+ libpulse_la-log.lo libpulse_la-mcalign.lo \
+ libpulse_la-memblock.lo libpulse_la-memblockq.lo \
+ libpulse_la-memchunk.lo libpulse_la-packet.lo \
+ libpulse_la-parseaddr.lo libpulse_la-pdispatch.lo \
+ libpulse_la-pipe.lo libpulse_la-poll.lo libpulse_la-pstream.lo \
libpulse_la-pstream-util.lo libpulse_la-queue.lo \
libpulse_la-random.lo libpulse_la-socket-client.lo \
libpulse_la-socket-util.lo libpulse_la-strbuf.lo \
libpulse_la-strlist.lo libpulse_la-tagstruct.lo \
libpulse_la-core-error.lo libpulse_la-shm.lo \
libpulse_la-flist.lo libpulse_la-object.lo \
- libpulse_la-msgobject.lo libpulse_la-once.lo $(am__objects_4) \
- $(am__objects_5) $(am__objects_6)
+ libpulse_la-msgobject.lo libpulse_la-once.lo \
+ libpulse_la-rtclock.lo libpulse_la-time-smoother.lo \
+ libpulse_la-proplist-util.lo $(am__objects_4) $(am__objects_5) \
+ $(am__objects_6)
libpulse_la_OBJECTS = $(am_libpulse_la_OBJECTS)
libpulse_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libpulse_la_CFLAGS) \
@@ -586,8 +631,7 @@ libpulsecore_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- libspeex-resampler-fixed.la libspeex-resampler-float.la \
- libffmpeg-resampler.la
+ $(am__DEPENDENCIES_1) libffmpeg-resampler.la
am__libpulsecore_la_SOURCES_DIST = pulse/channelmap.c \
pulse/channelmap.h pulse/error.c pulse/error.h \
pulse/mainloop.c pulse/mainloop.h pulse/mainloop-api.c \
@@ -595,20 +639,22 @@ am__libpulsecore_la_SOURCES_DIST = pulse/channelmap.c \
pulse/mainloop-signal.h pulse/sample.c pulse/sample.h \
pulse/timeval.c pulse/timeval.h pulse/utf8.c pulse/utf8.h \
pulse/util.c pulse/util.h pulse/volume.c pulse/volume.h \
- pulse/xmalloc.c pulse/xmalloc.h pulsecore/autoload.c \
- pulsecore/autoload.h pulsecore/cli-command.c \
- pulsecore/cli-command.h pulsecore/cli-text.c \
- pulsecore/cli-text.h pulsecore/client.c pulsecore/client.h \
- pulsecore/conf-parser.c pulsecore/conf-parser.h \
- pulsecore/core.c pulsecore/core.h pulsecore/core-scache.c \
- pulsecore/core-scache.h pulsecore/core-subscribe.c \
- pulsecore/core-subscribe.h pulsecore/core-util.c \
- pulsecore/core-util.h pulsecore/dynarray.c \
- pulsecore/dynarray.h pulsecore/endianmacros.h pulsecore/g711.c \
- pulsecore/g711.h pulsecore/hashmap.c pulsecore/hashmap.h \
- pulsecore/idxset.c pulsecore/idxset.h pulsecore/log.c \
- pulsecore/log.h pulsecore/mcalign.c pulsecore/mcalign.h \
- pulsecore/memblock.c pulsecore/memblock.h \
+ pulse/xmalloc.c pulse/xmalloc.h pulse/proplist.c \
+ pulse/proplist.h pulse/i18n.c pulse/i18n.h \
+ pulsecore/autoload.c pulsecore/autoload.h \
+ pulsecore/cli-command.c pulsecore/cli-command.h \
+ pulsecore/cli-text.c pulsecore/cli-text.h pulsecore/client.c \
+ pulsecore/client.h pulsecore/conf-parser.c \
+ pulsecore/conf-parser.h pulsecore/core.c pulsecore/core.h \
+ pulsecore/core-scache.c pulsecore/core-scache.h \
+ pulsecore/core-subscribe.c pulsecore/core-subscribe.h \
+ pulsecore/core-util.c pulsecore/core-util.h \
+ pulsecore/dynarray.c pulsecore/dynarray.h \
+ pulsecore/endianmacros.h pulsecore/g711.c pulsecore/g711.h \
+ pulsecore/hashmap.c pulsecore/hashmap.h pulsecore/idxset.c \
+ pulsecore/idxset.h pulsecore/prioq.c pulsecore/prioq.h \
+ pulsecore/log.c pulsecore/log.h pulsecore/mcalign.c \
+ pulsecore/mcalign.h pulsecore/memblock.c pulsecore/memblock.h \
pulsecore/memblockq.c pulsecore/memblockq.h \
pulsecore/memchunk.c pulsecore/memchunk.h pulsecore/modargs.c \
pulsecore/modargs.h pulsecore/modinfo.c pulsecore/modinfo.h \
@@ -618,7 +664,7 @@ am__libpulsecore_la_SOURCES_DIST = pulse/channelmap.c \
pulsecore/pipe.c pulsecore/pipe.h pulsecore/play-memchunk.c \
pulsecore/play-memchunk.h pulsecore/play-memblockq.c \
pulsecore/play-memblockq.h pulsecore/poll.c pulsecore/poll.h \
- pulsecore/props.c pulsecore/props.h pulsecore/queue.c \
+ pulsecore/shared.c pulsecore/shared.h pulsecore/queue.c \
pulsecore/queue.h pulsecore/random.c pulsecore/random.h \
pulsecore/resampler.c pulsecore/resampler.h \
pulsecore/sample-util.c pulsecore/sample-util.h \
@@ -644,7 +690,10 @@ am__libpulsecore_la_SOURCES_DIST = pulse/channelmap.c \
pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/macro.h \
pulsecore/once.c pulsecore/once.h pulsecore/time-smoother.c \
pulsecore/time-smoother.h pulsecore/start-child.c \
- pulsecore/start-child.h pulsecore/mutex-posix.c \
+ pulsecore/start-child.h pulsecore/envelope.c \
+ pulsecore/envelope.h pulsecore/proplist-util.c \
+ pulsecore/proplist-util.h pulsecore/lock-autospawn.c \
+ pulsecore/lock-autospawn.h pulsecore/mutex-posix.c \
pulsecore/mutex.h pulsecore/thread-posix.c pulsecore/thread.h \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
pulsecore/mutex-win32.c pulsecore/thread-win32.c \
@@ -662,22 +711,23 @@ am_libpulsecore_la_OBJECTS = libpulsecore_la-channelmap.lo \
libpulsecore_la-mainloop-signal.lo libpulsecore_la-sample.lo \
libpulsecore_la-timeval.lo libpulsecore_la-utf8.lo \
libpulsecore_la-util.lo libpulsecore_la-volume.lo \
- libpulsecore_la-xmalloc.lo libpulsecore_la-autoload.lo \
+ libpulsecore_la-xmalloc.lo libpulsecore_la-proplist.lo \
+ libpulsecore_la-i18n.lo libpulsecore_la-autoload.lo \
libpulsecore_la-cli-command.lo libpulsecore_la-cli-text.lo \
libpulsecore_la-client.lo libpulsecore_la-conf-parser.lo \
libpulsecore_la-core.lo libpulsecore_la-core-scache.lo \
libpulsecore_la-core-subscribe.lo libpulsecore_la-core-util.lo \
libpulsecore_la-dynarray.lo libpulsecore_la-g711.lo \
libpulsecore_la-hashmap.lo libpulsecore_la-idxset.lo \
- libpulsecore_la-log.lo libpulsecore_la-mcalign.lo \
- libpulsecore_la-memblock.lo libpulsecore_la-memblockq.lo \
- libpulsecore_la-memchunk.lo libpulsecore_la-modargs.lo \
- libpulsecore_la-modinfo.lo libpulsecore_la-ltdl-helper.lo \
- libpulsecore_la-module.lo libpulsecore_la-namereg.lo \
- libpulsecore_la-pid.lo libpulsecore_la-pipe.lo \
- libpulsecore_la-play-memchunk.lo \
+ libpulsecore_la-prioq.lo libpulsecore_la-log.lo \
+ libpulsecore_la-mcalign.lo libpulsecore_la-memblock.lo \
+ libpulsecore_la-memblockq.lo libpulsecore_la-memchunk.lo \
+ libpulsecore_la-modargs.lo libpulsecore_la-modinfo.lo \
+ libpulsecore_la-ltdl-helper.lo libpulsecore_la-module.lo \
+ libpulsecore_la-namereg.lo libpulsecore_la-pid.lo \
+ libpulsecore_la-pipe.lo libpulsecore_la-play-memchunk.lo \
libpulsecore_la-play-memblockq.lo libpulsecore_la-poll.lo \
- libpulsecore_la-props.lo libpulsecore_la-queue.lo \
+ libpulsecore_la-shared.lo libpulsecore_la-queue.lo \
libpulsecore_la-random.lo libpulsecore_la-resampler.lo \
libpulsecore_la-sample-util.lo libpulsecore_la-sconv.lo \
libpulsecore_la-sconv-s16be.lo libpulsecore_la-sconv-s16le.lo \
@@ -693,14 +743,34 @@ am_libpulsecore_la_OBJECTS = libpulsecore_la-channelmap.lo \
libpulsecore_la-msgobject.lo libpulsecore_la-rtsig.lo \
libpulsecore_la-rtpoll.lo libpulsecore_la-rtclock.lo \
libpulsecore_la-once.lo libpulsecore_la-time-smoother.lo \
- libpulsecore_la-start-child.lo $(am__objects_7) \
+ libpulsecore_la-start-child.lo libpulsecore_la-envelope.lo \
+ libpulsecore_la-proplist-util.lo \
+ libpulsecore_la-lock-autospawn.lo $(am__objects_7) \
$(am__objects_8)
libpulsecore_la_OBJECTS = $(am_libpulsecore_la_OBJECTS)
libpulsecore_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libpulsecore_la_LDFLAGS) $(LDFLAGS) -o $@
libpulsedsp_la_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la
-am_libpulsedsp_la_OBJECTS = libpulsedsp_la-padsp.lo
+am__libpulsedsp_la_SOURCES_DIST = utils/padsp.c pulsecore/core-util.c \
+ pulsecore/core-util.h pulsecore/core-error.c \
+ pulsecore/core-error.h pulsecore/log.c pulsecore/log.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c \
+ pulsecore/once.h pulsecore/mutex-posix.c pulsecore/mutex.h \
+ pulsecore/thread-posix.c pulsecore/thread.h \
+ pulsecore/semaphore-posix.c pulsecore/semaphore.h \
+ pulsecore/mutex-win32.c pulsecore/thread-win32.c \
+ pulsecore/semaphore-win32.c
+@OS_IS_WIN32_FALSE@am__objects_9 = libpulsedsp_la-mutex-posix.lo \
+@OS_IS_WIN32_FALSE@ libpulsedsp_la-thread-posix.lo \
+@OS_IS_WIN32_FALSE@ libpulsedsp_la-semaphore-posix.lo
+@OS_IS_WIN32_TRUE@am__objects_9 = libpulsedsp_la-mutex-win32.lo \
+@OS_IS_WIN32_TRUE@ libpulsedsp_la-thread-win32.lo \
+@OS_IS_WIN32_TRUE@ libpulsedsp_la-semaphore-win32.lo
+am_libpulsedsp_la_OBJECTS = libpulsedsp_la-padsp.lo \
+ libpulsedsp_la-core-util.lo libpulsedsp_la-core-error.lo \
+ libpulsedsp_la-log.lo libpulsedsp_la-rtclock.lo \
+ libpulsedsp_la-once.lo $(am__objects_9)
libpulsedsp_la_OBJECTS = $(am_libpulsedsp_la_OBJECTS)
libpulsedsp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libpulsedsp_la_CFLAGS) \
@@ -738,16 +808,6 @@ libsocket_util_la_OBJECTS = $(am_libsocket_util_la_OBJECTS)
libsocket_util_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libsocket_util_la_LDFLAGS) $(LDFLAGS) -o $@
-libspeex_resampler_fixed_la_LIBADD =
-am_libspeex_resampler_fixed_la_OBJECTS = \
- libspeex_resampler_fixed_la-resample.lo
-libspeex_resampler_fixed_la_OBJECTS = \
- $(am_libspeex_resampler_fixed_la_OBJECTS)
-libspeex_resampler_float_la_LIBADD =
-am_libspeex_resampler_float_la_OBJECTS = \
- libspeex_resampler_float_la-resample.lo
-libspeex_resampler_float_la_OBJECTS = \
- $(am_libspeex_resampler_float_la_OBJECTS)
libstrlist_la_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
am_libstrlist_la_OBJECTS = strlist.lo
libstrlist_la_OBJECTS = $(am_libstrlist_la_OBJECTS)
@@ -800,16 +860,51 @@ module_alsa_source_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(module_alsa_source_la_LDFLAGS) $(LDFLAGS) -o $@
@HAVE_ALSA_TRUE@am_module_alsa_source_la_rpath = -rpath \
@HAVE_ALSA_TRUE@ $(modlibexecdir)
-module_bt_proximity_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_1) libpulsecore.la libdbus-util.la
-am_module_bt_proximity_la_OBJECTS = \
- module_bt_proximity_la-module-bt-proximity.lo
-module_bt_proximity_la_OBJECTS = $(am_module_bt_proximity_la_OBJECTS)
-module_bt_proximity_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+module_always_sink_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ libpulsecore.la
+am_module_always_sink_la_OBJECTS = \
+ module_always_sink_la-module-always-sink.lo
+module_always_sink_la_OBJECTS = $(am_module_always_sink_la_OBJECTS)
+module_always_sink_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(module_bt_proximity_la_CFLAGS) $(CFLAGS) \
- $(module_bt_proximity_la_LDFLAGS) $(LDFLAGS) -o $@
-@HAVE_BLUEZ_TRUE@am_module_bt_proximity_la_rpath = -rpath \
+ $(module_always_sink_la_CFLAGS) $(CFLAGS) \
+ $(module_always_sink_la_LDFLAGS) $(LDFLAGS) -o $@
+module_bluetooth_device_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1) libpulsecore.la libdbus-util.la \
+ libbluetooth-ipc.la libbluetooth-sbc.la libsocket-util.la
+am_module_bluetooth_device_la_OBJECTS = \
+ module_bluetooth_device_la-module-bluetooth-device.lo
+module_bluetooth_device_la_OBJECTS = \
+ $(am_module_bluetooth_device_la_OBJECTS)
+module_bluetooth_device_la_LINK = $(LIBTOOL) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(module_bluetooth_device_la_CFLAGS) $(CFLAGS) \
+ $(module_bluetooth_device_la_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_BLUEZ_TRUE@am_module_bluetooth_device_la_rpath = -rpath \
+@HAVE_BLUEZ_TRUE@ $(modlibexecdir)
+module_bluetooth_discover_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1) libpulsecore.la libdbus-util.la
+am_module_bluetooth_discover_la_OBJECTS = \
+ module_bluetooth_discover_la-module-bluetooth-discover.lo
+module_bluetooth_discover_la_OBJECTS = \
+ $(am_module_bluetooth_discover_la_OBJECTS)
+module_bluetooth_discover_la_LINK = $(LIBTOOL) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(module_bluetooth_discover_la_CFLAGS) $(CFLAGS) \
+ $(module_bluetooth_discover_la_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_BLUEZ_TRUE@am_module_bluetooth_discover_la_rpath = -rpath \
+@HAVE_BLUEZ_TRUE@ $(modlibexecdir)
+module_bluetooth_proximity_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1) libpulsecore.la libdbus-util.la
+am_module_bluetooth_proximity_la_OBJECTS = \
+ module_bluetooth_proximity_la-module-bluetooth-proximity.lo
+module_bluetooth_proximity_la_OBJECTS = \
+ $(am_module_bluetooth_proximity_la_OBJECTS)
+module_bluetooth_proximity_la_LINK = $(LIBTOOL) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(module_bluetooth_proximity_la_CFLAGS) $(CFLAGS) \
+ $(module_bluetooth_proximity_la_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_BLUEZ_TRUE@am_module_bluetooth_proximity_la_rpath = -rpath \
@HAVE_BLUEZ_TRUE@ $(modlibexecdir)
module_cli_protocol_tcp_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libpulsecore.la libprotocol-cli.la libsocket-server.la
@@ -847,6 +942,17 @@ module_combine_la_OBJECTS = $(am_module_combine_la_OBJECTS)
module_combine_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(module_combine_la_LDFLAGS) $(LDFLAGS) -o $@
+module_console_kit_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1) libpulsecore.la libdbus-util.la
+am_module_console_kit_la_OBJECTS = \
+ module_console_kit_la-module-console-kit.lo
+module_console_kit_la_OBJECTS = $(am_module_console_kit_la_OBJECTS)
+module_console_kit_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(module_console_kit_la_CFLAGS) $(CFLAGS) \
+ $(module_console_kit_la_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_DBUS_TRUE@am_module_console_kit_la_rpath = -rpath \
+@HAVE_DBUS_TRUE@ $(modlibexecdir)
module_default_device_restore_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libpulsecore.la
am_module_default_device_restore_la_OBJECTS = module_default_device_restore_la-module-default-device-restore.lo
@@ -862,6 +968,16 @@ module_detect_la_OBJECTS = $(am_module_detect_la_OBJECTS)
module_detect_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(module_detect_la_CFLAGS) \
$(CFLAGS) $(module_detect_la_LDFLAGS) $(LDFLAGS) -o $@
+module_device_restore_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ libpulsecore.la
+am_module_device_restore_la_OBJECTS = \
+ module_device_restore_la-module-device-restore.lo
+module_device_restore_la_OBJECTS = \
+ $(am_module_device_restore_la_OBJECTS)
+module_device_restore_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(module_device_restore_la_CFLAGS) $(CFLAGS) \
+ $(module_device_restore_la_LDFLAGS) $(LDFLAGS) -o $@
module_esound_compat_spawnfd_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libpulsecore.la
am_module_esound_compat_spawnfd_la_OBJECTS = \
@@ -1080,6 +1196,16 @@ module_pipe_source_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(module_pipe_source_la_LDFLAGS) $(LDFLAGS) -o $@
@HAVE_MKFIFO_TRUE@am_module_pipe_source_la_rpath = -rpath \
@HAVE_MKFIFO_TRUE@ $(modlibexecdir)
+module_position_event_sounds_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ libpulsecore.la
+am_module_position_event_sounds_la_OBJECTS = \
+ module-position-event-sounds.lo
+module_position_event_sounds_la_OBJECTS = \
+ $(am_module_position_event_sounds_la_OBJECTS)
+module_position_event_sounds_la_LINK = $(LIBTOOL) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) \
+ $(module_position_event_sounds_la_LDFLAGS) $(LDFLAGS) -o $@
module_remap_sink_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libpulsecore.la
am_module_remap_sink_la_OBJECTS = module-remap-sink.lo
@@ -1155,6 +1281,16 @@ module_solaris_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(module_solaris_la_LDFLAGS) $(LDFLAGS) -o $@
@HAVE_SOLARIS_TRUE@am_module_solaris_la_rpath = -rpath \
@HAVE_SOLARIS_TRUE@ $(modlibexecdir)
+module_stream_restore_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ libtagstruct.la libprotocol-native.la libpulsecore.la
+am_module_stream_restore_la_OBJECTS = \
+ module_stream_restore_la-module-stream-restore.lo
+module_stream_restore_la_OBJECTS = \
+ $(am_module_stream_restore_la_OBJECTS)
+module_stream_restore_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(module_stream_restore_la_CFLAGS) $(CFLAGS) \
+ $(module_stream_restore_la_LDFLAGS) $(LDFLAGS) -o $@
module_suspend_on_idle_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libpulsecore.la
am_module_suspend_on_idle_la_OBJECTS = \
@@ -1168,7 +1304,7 @@ module_suspend_on_idle_la_LINK = $(LIBTOOL) --tag=CC \
module_tunnel_sink_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libpulsecore.la libsocket-client.la libpstream.la \
libpstream-util.la libpdispatch.la libtagstruct.la \
- libauthkey.la libauthkey-prop.la libsocket-util.la \
+ libauthkey.la libauth-cookie.la libsocket-util.la \
libiochannel.la
am_module_tunnel_sink_la_OBJECTS = \
module_tunnel_sink_la-module-tunnel.lo
@@ -1180,7 +1316,7 @@ module_tunnel_sink_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
module_tunnel_source_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
libpulsecore.la libsocket-client.la libpstream.la \
libpstream-util.la libpdispatch.la libtagstruct.la \
- libauthkey.la libauthkey-prop.la libsocket-util.la \
+ libauthkey.la libauth-cookie.la libsocket-util.la \
libiochannel.la
am_module_tunnel_source_la_OBJECTS = module-tunnel.lo
module_tunnel_source_la_OBJECTS = \
@@ -1211,7 +1347,8 @@ module_x11_bell_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
module_x11_publish_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) libx11wrap.la libauthkey.la \
- libauthkey-prop.la libx11prop.la libstrlist.la libpulsecore.la
+ libauth-cookie.la libx11prop.la libstrlist.la \
+ libprotocol-native.la libpulsecore.la
am_module_x11_publish_la_OBJECTS = \
module_x11_publish_la-module-x11-publish.lo
module_x11_publish_la_OBJECTS = $(am_module_x11_publish_la_OBJECTS)
@@ -1223,7 +1360,7 @@ module_x11_publish_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@HAVE_X11_TRUE@ $(modlibexecdir)
module_x11_xsmp_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) libpulsecore.la
+ $(am__DEPENDENCIES_1) libx11wrap.la libpulsecore.la
am_module_x11_xsmp_la_OBJECTS = module_x11_xsmp_la-module-x11-xsmp.lo
module_x11_xsmp_la_OBJECTS = $(am_module_x11_xsmp_la_OBJECTS)
module_x11_xsmp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -1263,7 +1400,7 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
@HAVE_SIGXCPU_TRUE@ cpulimit-test2$(EXEEXT)
@HAVE_GLIB20_TRUE@am__EXEEXT_5 = mainloop-test-glib$(EXEEXT)
@HAVE_GCONF_TRUE@am__EXEEXT_6 = gconf-helper$(EXEEXT)
-@HAVE_BLUEZ_TRUE@am__EXEEXT_7 = bt-proximity-helper$(EXEEXT)
+@HAVE_BLUEZ_TRUE@am__EXEEXT_7 = proximity-helper$(EXEEXT)
pulselibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pulselibexec_PROGRAMS)
am_asyncmsgq_test_OBJECTS = asyncmsgq_test-asyncmsgq-test.$(OBJEXT)
@@ -1278,15 +1415,6 @@ asyncq_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
asyncq_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(asyncq_test_CFLAGS) \
$(CFLAGS) $(asyncq_test_LDFLAGS) $(LDFLAGS) -o $@
-am_bt_proximity_helper_OBJECTS = \
- bt_proximity_helper-bt-proximity-helper.$(OBJEXT)
-bt_proximity_helper_OBJECTS = $(am_bt_proximity_helper_OBJECTS)
-bt_proximity_helper_DEPENDENCIES = $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_1)
-bt_proximity_helper_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(bt_proximity_helper_CFLAGS) $(CFLAGS) \
- $(bt_proximity_helper_LDFLAGS) $(LDFLAGS) -o $@
am_channelmap_test_OBJECTS = \
channelmap_test-channelmap-test.$(OBJEXT)
channelmap_test_OBJECTS = $(am_channelmap_test_OBJECTS)
@@ -1294,6 +1422,13 @@ channelmap_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la
channelmap_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(channelmap_test_CFLAGS) \
$(CFLAGS) $(channelmap_test_LDFLAGS) $(LDFLAGS) -o $@
+am_close_test_OBJECTS = close_test-close-test.$(OBJEXT)
+close_test_OBJECTS = $(am_close_test_OBJECTS)
+close_test_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+ libpulsecore.la libstrlist.la
+close_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(close_test_CFLAGS) \
+ $(CFLAGS) $(close_test_LDFLAGS) $(LDFLAGS) -o $@
am_cpulimit_test_OBJECTS = cpulimit_test-cpulimit-test.$(OBJEXT) \
cpulimit_test-cpulimit.$(OBJEXT)
cpulimit_test_OBJECTS = $(am_cpulimit_test_OBJECTS)
@@ -1308,6 +1443,12 @@ cpulimit_test2_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
cpulimit_test2_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(cpulimit_test2_CFLAGS) \
$(CFLAGS) $(cpulimit_test2_LDFLAGS) $(LDFLAGS) -o $@
+am_envelope_test_OBJECTS = envelope_test-envelope-test.$(OBJEXT)
+envelope_test_OBJECTS = $(am_envelope_test_OBJECTS)
+envelope_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
+envelope_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(envelope_test_CFLAGS) \
+ $(CFLAGS) $(envelope_test_LDFLAGS) $(LDFLAGS) -o $@
am_flist_test_OBJECTS = flist_test-flist-test.$(OBJEXT)
flist_test_OBJECTS = $(am_flist_test_OBJECTS)
flist_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
@@ -1349,14 +1490,23 @@ ipacl_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
ipacl_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ipacl_test_CFLAGS) \
$(CFLAGS) $(ipacl_test_LDFLAGS) $(LDFLAGS) -o $@
+am_lock_autospawn_test_OBJECTS = \
+ lock_autospawn_test-lock-autospawn-test.$(OBJEXT)
+lock_autospawn_test_OBJECTS = $(am_lock_autospawn_test_OBJECTS)
+lock_autospawn_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ libpulsecore.la
+lock_autospawn_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(lock_autospawn_test_CFLAGS) $(CFLAGS) \
+ $(lock_autospawn_test_LDFLAGS) $(LDFLAGS) -o $@
am_mainloop_test_OBJECTS = mainloop_test-mainloop-test.$(OBJEXT)
mainloop_test_OBJECTS = $(am_mainloop_test_OBJECTS)
mainloop_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la
mainloop_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(mainloop_test_CFLAGS) \
$(CFLAGS) $(mainloop_test_LDFLAGS) $(LDFLAGS) -o $@
-am__objects_9 = mainloop_test_glib-mainloop-test.$(OBJEXT)
-am_mainloop_test_glib_OBJECTS = $(am__objects_9)
+am__objects_10 = mainloop_test_glib-mainloop-test.$(OBJEXT)
+am_mainloop_test_glib_OBJECTS = $(am__objects_10)
mainloop_test_glib_OBJECTS = $(am_mainloop_test_glib_OBJECTS)
am__DEPENDENCIES_4 = $(am__DEPENDENCIES_2) libpulse.la
mainloop_test_glib_DEPENDENCIES = $(am__DEPENDENCIES_4) \
@@ -1414,21 +1564,22 @@ pacat_simple_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
am__pacmd_SOURCES_DIST = utils/pacmd.c pulsecore/pid.c pulsecore/pid.h \
pulsecore/core-util.c pulsecore/core-util.h \
pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c \
- pulsecore/log.h pulsecore/once.c pulsecore/once.h \
- pulsecore/mutex-posix.c pulsecore/mutex.h \
- pulsecore/thread-posix.c pulsecore/thread.h \
+ pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h \
+ pulsecore/once.c pulsecore/once.h pulsecore/mutex-posix.c \
+ pulsecore/mutex.h pulsecore/thread-posix.c pulsecore/thread.h \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
pulsecore/mutex-win32.c pulsecore/thread-win32.c \
pulsecore/semaphore-win32.c
-@OS_IS_WIN32_FALSE@am__objects_10 = pacmd-mutex-posix.$(OBJEXT) \
+@OS_IS_WIN32_FALSE@am__objects_11 = pacmd-mutex-posix.$(OBJEXT) \
@OS_IS_WIN32_FALSE@ pacmd-thread-posix.$(OBJEXT) \
@OS_IS_WIN32_FALSE@ pacmd-semaphore-posix.$(OBJEXT)
-@OS_IS_WIN32_TRUE@am__objects_10 = pacmd-mutex-win32.$(OBJEXT) \
+@OS_IS_WIN32_TRUE@am__objects_11 = pacmd-mutex-win32.$(OBJEXT) \
@OS_IS_WIN32_TRUE@ pacmd-thread-win32.$(OBJEXT) \
@OS_IS_WIN32_TRUE@ pacmd-semaphore-win32.$(OBJEXT)
am_pacmd_OBJECTS = pacmd-pacmd.$(OBJEXT) pacmd-pid.$(OBJEXT) \
pacmd-core-util.$(OBJEXT) pacmd-core-error.$(OBJEXT) \
- pacmd-log.$(OBJEXT) pacmd-once.$(OBJEXT) $(am__objects_10)
+ pacmd-log.$(OBJEXT) pacmd-rtclock.$(OBJEXT) \
+ pacmd-once.$(OBJEXT) $(am__objects_11)
pacmd_OBJECTS = $(am_pacmd_OBJECTS)
pacmd_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la
pacmd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -1437,20 +1588,21 @@ pacmd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
am__pactl_SOURCES_DIST = utils/pactl.c pulsecore/core-util.c \
pulsecore/core-util.h pulsecore/core-error.c \
pulsecore/core-error.h pulsecore/log.c pulsecore/log.h \
- pulsecore/once.c pulsecore/once.h pulsecore/mutex-posix.c \
- pulsecore/mutex.h pulsecore/thread-posix.c pulsecore/thread.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c \
+ pulsecore/once.h pulsecore/mutex-posix.c pulsecore/mutex.h \
+ pulsecore/thread-posix.c pulsecore/thread.h \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
pulsecore/mutex-win32.c pulsecore/thread-win32.c \
pulsecore/semaphore-win32.c
-@OS_IS_WIN32_FALSE@am__objects_11 = pactl-mutex-posix.$(OBJEXT) \
+@OS_IS_WIN32_FALSE@am__objects_12 = pactl-mutex-posix.$(OBJEXT) \
@OS_IS_WIN32_FALSE@ pactl-thread-posix.$(OBJEXT) \
@OS_IS_WIN32_FALSE@ pactl-semaphore-posix.$(OBJEXT)
-@OS_IS_WIN32_TRUE@am__objects_11 = pactl-mutex-win32.$(OBJEXT) \
+@OS_IS_WIN32_TRUE@am__objects_12 = pactl-mutex-win32.$(OBJEXT) \
@OS_IS_WIN32_TRUE@ pactl-thread-win32.$(OBJEXT) \
@OS_IS_WIN32_TRUE@ pactl-semaphore-win32.$(OBJEXT)
am_pactl_OBJECTS = pactl-pactl.$(OBJEXT) pactl-core-util.$(OBJEXT) \
pactl-core-error.$(OBJEXT) pactl-log.$(OBJEXT) \
- pactl-once.$(OBJEXT) $(am__objects_11)
+ pactl-rtclock.$(OBJEXT) pactl-once.$(OBJEXT) $(am__objects_12)
pactl_OBJECTS = $(am_pactl_OBJECTS)
pactl_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la \
$(am__DEPENDENCIES_1)
@@ -1474,22 +1626,23 @@ parec_simple_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
am__pasuspender_SOURCES_DIST = utils/pasuspender.c \
pulsecore/core-util.c pulsecore/core-util.h \
pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c \
- pulsecore/log.h pulsecore/once.c pulsecore/once.h \
- pulsecore/mutex-posix.c pulsecore/mutex.h \
- pulsecore/thread-posix.c pulsecore/thread.h \
+ pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h \
+ pulsecore/once.c pulsecore/once.h pulsecore/mutex-posix.c \
+ pulsecore/mutex.h pulsecore/thread-posix.c pulsecore/thread.h \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
pulsecore/mutex-win32.c pulsecore/thread-win32.c \
pulsecore/semaphore-win32.c
-@OS_IS_WIN32_FALSE@am__objects_12 = pasuspender-mutex-posix.$(OBJEXT) \
+@OS_IS_WIN32_FALSE@am__objects_13 = pasuspender-mutex-posix.$(OBJEXT) \
@OS_IS_WIN32_FALSE@ pasuspender-thread-posix.$(OBJEXT) \
@OS_IS_WIN32_FALSE@ pasuspender-semaphore-posix.$(OBJEXT)
-@OS_IS_WIN32_TRUE@am__objects_12 = pasuspender-mutex-win32.$(OBJEXT) \
+@OS_IS_WIN32_TRUE@am__objects_13 = pasuspender-mutex-win32.$(OBJEXT) \
@OS_IS_WIN32_TRUE@ pasuspender-thread-win32.$(OBJEXT) \
@OS_IS_WIN32_TRUE@ pasuspender-semaphore-win32.$(OBJEXT)
am_pasuspender_OBJECTS = pasuspender-pasuspender.$(OBJEXT) \
pasuspender-core-util.$(OBJEXT) \
pasuspender-core-error.$(OBJEXT) pasuspender-log.$(OBJEXT) \
- pasuspender-once.$(OBJEXT) $(am__objects_12)
+ pasuspender-rtclock.$(OBJEXT) pasuspender-once.$(OBJEXT) \
+ $(am__objects_13)
pasuspender_OBJECTS = $(am_pasuspender_OBJECTS)
pasuspender_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la \
$(am__DEPENDENCIES_1)
@@ -1500,6 +1653,7 @@ am__pax11publish_SOURCES_DIST = utils/pax11publish.c \
pulsecore/x11prop.c pulsecore/x11prop.h pulse/client-conf.c \
pulse/client-conf.h pulsecore/authkey.h pulsecore/authkey.c \
pulsecore/random.h pulsecore/random.c pulsecore/conf-parser.c \
+ pulsecore/rtclock.c pulsecore/rtclock.h \
pulsecore/conf-parser.h pulsecore/core-util.c \
pulsecore/core-util.h pulsecore/core-error.c \
pulsecore/core-error.h pulsecore/log.c pulsecore/log.h \
@@ -1508,11 +1662,11 @@ am__pax11publish_SOURCES_DIST = utils/pax11publish.c \
pulsecore/semaphore-posix.c pulsecore/semaphore.h \
pulsecore/mutex-win32.c pulsecore/thread-win32.c \
pulsecore/semaphore-win32.c
-@OS_IS_WIN32_FALSE@am__objects_13 = \
+@OS_IS_WIN32_FALSE@am__objects_14 = \
@OS_IS_WIN32_FALSE@ pax11publish-mutex-posix.$(OBJEXT) \
@OS_IS_WIN32_FALSE@ pax11publish-thread-posix.$(OBJEXT) \
@OS_IS_WIN32_FALSE@ pax11publish-semaphore-posix.$(OBJEXT)
-@OS_IS_WIN32_TRUE@am__objects_13 = pax11publish-mutex-win32.$(OBJEXT) \
+@OS_IS_WIN32_TRUE@am__objects_14 = pax11publish-mutex-win32.$(OBJEXT) \
@OS_IS_WIN32_TRUE@ pax11publish-thread-win32.$(OBJEXT) \
@OS_IS_WIN32_TRUE@ pax11publish-semaphore-win32.$(OBJEXT)
am_pax11publish_OBJECTS = pax11publish-pax11publish.$(OBJEXT) \
@@ -1520,9 +1674,10 @@ am_pax11publish_OBJECTS = pax11publish-pax11publish.$(OBJEXT) \
pax11publish-client-conf.$(OBJEXT) \
pax11publish-authkey.$(OBJEXT) pax11publish-random.$(OBJEXT) \
pax11publish-conf-parser.$(OBJEXT) \
+ pax11publish-rtclock.$(OBJEXT) \
pax11publish-core-util.$(OBJEXT) \
pax11publish-core-error.$(OBJEXT) pax11publish-log.$(OBJEXT) \
- pax11publish-once.$(OBJEXT) $(am__objects_13)
+ pax11publish-once.$(OBJEXT) $(am__objects_14)
pax11publish_OBJECTS = $(am_pax11publish_OBJECTS)
pax11publish_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -1530,19 +1685,39 @@ pax11publish_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la \
pax11publish_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(pax11publish_CFLAGS) \
$(CFLAGS) $(pax11publish_LDFLAGS) $(LDFLAGS) -o $@
+am_prioq_test_OBJECTS = prioq_test-prioq-test.$(OBJEXT)
+prioq_test_OBJECTS = $(am_prioq_test_OBJECTS)
+prioq_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
+prioq_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(prioq_test_CFLAGS) \
+ $(CFLAGS) $(prioq_test_LDFLAGS) $(LDFLAGS) -o $@
+am_proplist_test_OBJECTS = proplist_test-proplist-test.$(OBJEXT)
+proplist_test_OBJECTS = $(am_proplist_test_OBJECTS)
+proplist_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
+proplist_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(proplist_test_CFLAGS) \
+ $(CFLAGS) $(proplist_test_LDFLAGS) $(LDFLAGS) -o $@
+am_proximity_helper_OBJECTS = \
+ proximity_helper-proximity-helper.$(OBJEXT)
+proximity_helper_OBJECTS = $(am_proximity_helper_OBJECTS)
+proximity_helper_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+proximity_helper_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(proximity_helper_CFLAGS) \
+ $(CFLAGS) $(proximity_helper_LDFLAGS) $(LDFLAGS) -o $@
am__pulseaudio_SOURCES_DIST = daemon/caps.h daemon/caps.c \
daemon/cmdline.c daemon/cmdline.h daemon/cpulimit.c \
daemon/cpulimit.h daemon/daemon-conf.c daemon/daemon-conf.h \
daemon/dumpmodules.c daemon/dumpmodules.h \
daemon/ltdl-bind-now.c daemon/ltdl-bind-now.h daemon/main.c \
- pulsecore/gccmacro.h daemon/polkit.c daemon/polkit.h
-@HAVE_POLKIT_TRUE@am__objects_14 = pulseaudio-polkit.$(OBJEXT)
+ daemon/polkit.c daemon/polkit.h
+@HAVE_POLKIT_TRUE@am__objects_15 = pulseaudio-polkit.$(OBJEXT)
am_pulseaudio_OBJECTS = pulseaudio-caps.$(OBJEXT) \
pulseaudio-cmdline.$(OBJEXT) pulseaudio-cpulimit.$(OBJEXT) \
pulseaudio-daemon-conf.$(OBJEXT) \
pulseaudio-dumpmodules.$(OBJEXT) \
pulseaudio-ltdl-bind-now.$(OBJEXT) pulseaudio-main.$(OBJEXT) \
- $(am__objects_14)
+ $(am__objects_15)
pulseaudio_OBJECTS = $(am_pulseaudio_OBJECTS)
@HAVE_POLKIT_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1)
pulseaudio_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -1572,6 +1747,12 @@ rtpoll_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
rtpoll_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(rtpoll_test_CFLAGS) \
$(CFLAGS) $(rtpoll_test_LDFLAGS) $(LDFLAGS) -o $@
+am_rtstutter_OBJECTS = rtstutter-rtstutter.$(OBJEXT)
+rtstutter_OBJECTS = $(am_rtstutter_OBJECTS)
+rtstutter_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
+rtstutter_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(rtstutter_CFLAGS) \
+ $(CFLAGS) $(rtstutter_LDFLAGS) $(LDFLAGS) -o $@
am_sig2str_test_OBJECTS = sig2str_test-sig2str-test.$(OBJEXT)
sig2str_test_OBJECTS = $(am_sig2str_test_OBJECTS)
sig2str_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
@@ -1584,6 +1765,12 @@ smoother_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
smoother_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(smoother_test_CFLAGS) \
$(CFLAGS) $(smoother_test_LDFLAGS) $(LDFLAGS) -o $@
+am_stripnul_OBJECTS = stripnul-stripnul.$(OBJEXT)
+stripnul_OBJECTS = $(am_stripnul_OBJECTS)
+stripnul_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulsecore.la
+stripnul_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(stripnul_CFLAGS) $(CFLAGS) \
+ $(stripnul_LDFLAGS) $(LDFLAGS) -o $@
am_strlist_test_OBJECTS = strlist_test-strlist-test.$(OBJEXT)
strlist_test_OBJECTS = $(am_strlist_test_OBJECTS)
strlist_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -1638,8 +1825,9 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-SOURCES = $(libalsa_util_la_SOURCES) $(libauthkey_prop_la_SOURCES) \
+SOURCES = $(libalsa_util_la_SOURCES) $(libauth_cookie_la_SOURCES) \
$(libauthkey_la_SOURCES) $(libavahi_wrap_la_SOURCES) \
+ $(libbluetooth_ipc_la_SOURCES) $(libbluetooth_sbc_la_SOURCES) \
$(libcli_la_SOURCES) $(libdbus_util_la_SOURCES) \
$(libffmpeg_resampler_la_SOURCES) $(libiochannel_la_SOURCES) \
$(libioline_la_SOURCES) $(libipacl_la_SOURCES) \
@@ -1655,18 +1843,21 @@ SOURCES = $(libalsa_util_la_SOURCES) $(libauthkey_prop_la_SOURCES) \
$(libpulsecore_la_SOURCES) $(libpulsedsp_la_SOURCES) \
$(librtp_la_SOURCES) $(libsocket_client_la_SOURCES) \
$(libsocket_server_la_SOURCES) $(libsocket_util_la_SOURCES) \
- $(libspeex_resampler_fixed_la_SOURCES) \
- $(libspeex_resampler_float_la_SOURCES) \
$(libstrlist_la_SOURCES) $(libtagstruct_la_SOURCES) \
$(libx11prop_la_SOURCES) $(libx11wrap_la_SOURCES) \
$(module_alsa_sink_la_SOURCES) \
$(module_alsa_source_la_SOURCES) \
- $(module_bt_proximity_la_SOURCES) \
+ $(module_always_sink_la_SOURCES) \
+ $(module_bluetooth_device_la_SOURCES) \
+ $(module_bluetooth_discover_la_SOURCES) \
+ $(module_bluetooth_proximity_la_SOURCES) \
$(module_cli_protocol_tcp_la_SOURCES) \
$(module_cli_protocol_unix_la_SOURCES) \
$(module_cli_la_SOURCES) $(module_combine_la_SOURCES) \
+ $(module_console_kit_la_SOURCES) \
$(module_default_device_restore_la_SOURCES) \
$(module_detect_la_SOURCES) \
+ $(module_device_restore_la_SOURCES) \
$(module_esound_compat_spawnfd_la_SOURCES) \
$(module_esound_compat_spawnpid_la_SOURCES) \
$(module_esound_protocol_tcp_la_SOURCES) \
@@ -1685,12 +1876,14 @@ SOURCES = $(libalsa_util_la_SOURCES) $(libauthkey_prop_la_SOURCES) \
$(module_null_sink_la_SOURCES) $(module_oss_la_SOURCES) \
$(module_pipe_sink_la_SOURCES) \
$(module_pipe_source_la_SOURCES) \
+ $(module_position_event_sounds_la_SOURCES) \
$(module_remap_sink_la_SOURCES) \
$(module_rescue_streams_la_SOURCES) \
$(module_rtp_recv_la_SOURCES) $(module_rtp_send_la_SOURCES) \
$(module_simple_protocol_tcp_la_SOURCES) \
$(module_simple_protocol_unix_la_SOURCES) \
$(module_sine_la_SOURCES) $(module_solaris_la_SOURCES) \
+ $(module_stream_restore_la_SOURCES) \
$(module_suspend_on_idle_la_SOURCES) \
$(module_tunnel_sink_la_SOURCES) \
$(module_tunnel_source_la_SOURCES) \
@@ -1700,33 +1893,36 @@ SOURCES = $(libalsa_util_la_SOURCES) $(libauthkey_prop_la_SOURCES) \
$(module_zeroconf_discover_la_SOURCES) \
$(module_zeroconf_publish_la_SOURCES) \
$(asyncmsgq_test_SOURCES) $(asyncq_test_SOURCES) \
- $(bt_proximity_helper_SOURCES) $(channelmap_test_SOURCES) \
+ $(channelmap_test_SOURCES) $(close_test_SOURCES) \
$(cpulimit_test_SOURCES) $(cpulimit_test2_SOURCES) \
- $(flist_test_SOURCES) $(gconf_helper_SOURCES) \
- $(get_binary_name_test_SOURCES) $(hook_list_test_SOURCES) \
- $(interpol_test_SOURCES) $(ipacl_test_SOURCES) \
+ $(envelope_test_SOURCES) $(flist_test_SOURCES) \
+ $(gconf_helper_SOURCES) $(get_binary_name_test_SOURCES) \
+ $(hook_list_test_SOURCES) $(interpol_test_SOURCES) \
+ $(ipacl_test_SOURCES) $(lock_autospawn_test_SOURCES) \
$(mainloop_test_SOURCES) $(mainloop_test_glib_SOURCES) \
$(mcalign_test_SOURCES) $(memblock_test_SOURCES) \
$(memblockq_test_SOURCES) $(mix_test_SOURCES) \
$(pabrowse_SOURCES) $(pacat_SOURCES) $(pacat_simple_SOURCES) \
$(pacmd_SOURCES) $(pactl_SOURCES) $(paplay_SOURCES) \
$(parec_simple_SOURCES) $(pasuspender_SOURCES) \
- $(pax11publish_SOURCES) $(pulseaudio_SOURCES) \
- $(queue_test_SOURCES) $(remix_test_SOURCES) \
- $(resampler_test_SOURCES) $(rtpoll_test_SOURCES) \
+ $(pax11publish_SOURCES) $(prioq_test_SOURCES) \
+ $(proplist_test_SOURCES) $(proximity_helper_SOURCES) \
+ $(pulseaudio_SOURCES) $(queue_test_SOURCES) \
+ $(remix_test_SOURCES) $(resampler_test_SOURCES) \
+ $(rtpoll_test_SOURCES) $(rtstutter_SOURCES) \
$(sig2str_test_SOURCES) $(smoother_test_SOURCES) \
- $(strlist_test_SOURCES) $(sync_playback_SOURCES) \
- $(thread_mainloop_test_SOURCES) $(thread_test_SOURCES) \
- $(utf8_test_SOURCES) $(voltest_SOURCES)
-DIST_SOURCES = $(libalsa_util_la_SOURCES) \
- $(libauthkey_prop_la_SOURCES) $(libauthkey_la_SOURCES) \
- $(libavahi_wrap_la_SOURCES) $(libcli_la_SOURCES) \
- $(libdbus_util_la_SOURCES) $(libffmpeg_resampler_la_SOURCES) \
- $(libiochannel_la_SOURCES) $(libioline_la_SOURCES) \
- $(libipacl_la_SOURCES) $(liboss_util_la_SOURCES) \
- $(libpacket_la_SOURCES) $(libparseaddr_la_SOURCES) \
- $(libpdispatch_la_SOURCES) $(libprotocol_cli_la_SOURCES) \
- $(libprotocol_esound_la_SOURCES) \
+ $(stripnul_SOURCES) $(strlist_test_SOURCES) \
+ $(sync_playback_SOURCES) $(thread_mainloop_test_SOURCES) \
+ $(thread_test_SOURCES) $(utf8_test_SOURCES) $(voltest_SOURCES)
+DIST_SOURCES = $(libalsa_util_la_SOURCES) $(libauth_cookie_la_SOURCES) \
+ $(libauthkey_la_SOURCES) $(libavahi_wrap_la_SOURCES) \
+ $(libbluetooth_ipc_la_SOURCES) $(libbluetooth_sbc_la_SOURCES) \
+ $(libcli_la_SOURCES) $(libdbus_util_la_SOURCES) \
+ $(libffmpeg_resampler_la_SOURCES) $(libiochannel_la_SOURCES) \
+ $(libioline_la_SOURCES) $(libipacl_la_SOURCES) \
+ $(liboss_util_la_SOURCES) $(libpacket_la_SOURCES) \
+ $(libparseaddr_la_SOURCES) $(libpdispatch_la_SOURCES) \
+ $(libprotocol_cli_la_SOURCES) $(libprotocol_esound_la_SOURCES) \
$(libprotocol_http_la_SOURCES) \
$(libprotocol_native_la_SOURCES) \
$(libprotocol_simple_la_SOURCES) $(libpstream_util_la_SOURCES) \
@@ -1735,21 +1931,24 @@ DIST_SOURCES = $(libalsa_util_la_SOURCES) \
$(am__libpulse_mainloop_glib_la_SOURCES_DIST) \
$(am__libpulse_simple_la_SOURCES_DIST) \
$(am__libpulse_la_SOURCES_DIST) \
- $(am__libpulsecore_la_SOURCES_DIST) $(libpulsedsp_la_SOURCES) \
- $(librtp_la_SOURCES) $(libsocket_client_la_SOURCES) \
- $(libsocket_server_la_SOURCES) $(libsocket_util_la_SOURCES) \
- $(libspeex_resampler_fixed_la_SOURCES) \
- $(libspeex_resampler_float_la_SOURCES) \
- $(libstrlist_la_SOURCES) $(libtagstruct_la_SOURCES) \
- $(libx11prop_la_SOURCES) $(libx11wrap_la_SOURCES) \
- $(module_alsa_sink_la_SOURCES) \
+ $(am__libpulsecore_la_SOURCES_DIST) \
+ $(am__libpulsedsp_la_SOURCES_DIST) $(librtp_la_SOURCES) \
+ $(libsocket_client_la_SOURCES) $(libsocket_server_la_SOURCES) \
+ $(libsocket_util_la_SOURCES) $(libstrlist_la_SOURCES) \
+ $(libtagstruct_la_SOURCES) $(libx11prop_la_SOURCES) \
+ $(libx11wrap_la_SOURCES) $(module_alsa_sink_la_SOURCES) \
$(module_alsa_source_la_SOURCES) \
- $(module_bt_proximity_la_SOURCES) \
+ $(module_always_sink_la_SOURCES) \
+ $(module_bluetooth_device_la_SOURCES) \
+ $(module_bluetooth_discover_la_SOURCES) \
+ $(module_bluetooth_proximity_la_SOURCES) \
$(module_cli_protocol_tcp_la_SOURCES) \
$(module_cli_protocol_unix_la_SOURCES) \
$(module_cli_la_SOURCES) $(module_combine_la_SOURCES) \
+ $(module_console_kit_la_SOURCES) \
$(module_default_device_restore_la_SOURCES) \
$(module_detect_la_SOURCES) \
+ $(module_device_restore_la_SOURCES) \
$(module_esound_compat_spawnfd_la_SOURCES) \
$(module_esound_compat_spawnpid_la_SOURCES) \
$(module_esound_protocol_tcp_la_SOURCES) \
@@ -1768,12 +1967,14 @@ DIST_SOURCES = $(libalsa_util_la_SOURCES) \
$(module_null_sink_la_SOURCES) $(module_oss_la_SOURCES) \
$(module_pipe_sink_la_SOURCES) \
$(module_pipe_source_la_SOURCES) \
+ $(module_position_event_sounds_la_SOURCES) \
$(module_remap_sink_la_SOURCES) \
$(module_rescue_streams_la_SOURCES) \
$(module_rtp_recv_la_SOURCES) $(module_rtp_send_la_SOURCES) \
$(module_simple_protocol_tcp_la_SOURCES) \
$(module_simple_protocol_unix_la_SOURCES) \
$(module_sine_la_SOURCES) $(module_solaris_la_SOURCES) \
+ $(module_stream_restore_la_SOURCES) \
$(module_suspend_on_idle_la_SOURCES) \
$(module_tunnel_sink_la_SOURCES) \
$(module_tunnel_source_la_SOURCES) \
@@ -1783,11 +1984,12 @@ DIST_SOURCES = $(libalsa_util_la_SOURCES) \
$(module_zeroconf_discover_la_SOURCES) \
$(module_zeroconf_publish_la_SOURCES) \
$(asyncmsgq_test_SOURCES) $(asyncq_test_SOURCES) \
- $(bt_proximity_helper_SOURCES) $(channelmap_test_SOURCES) \
+ $(channelmap_test_SOURCES) $(close_test_SOURCES) \
$(cpulimit_test_SOURCES) $(cpulimit_test2_SOURCES) \
- $(flist_test_SOURCES) $(gconf_helper_SOURCES) \
- $(get_binary_name_test_SOURCES) $(hook_list_test_SOURCES) \
- $(interpol_test_SOURCES) $(ipacl_test_SOURCES) \
+ $(envelope_test_SOURCES) $(flist_test_SOURCES) \
+ $(gconf_helper_SOURCES) $(get_binary_name_test_SOURCES) \
+ $(hook_list_test_SOURCES) $(interpol_test_SOURCES) \
+ $(ipacl_test_SOURCES) $(lock_autospawn_test_SOURCES) \
$(mainloop_test_SOURCES) $(mainloop_test_glib_SOURCES) \
$(mcalign_test_SOURCES) $(memblock_test_SOURCES) \
$(memblockq_test_SOURCES) $(mix_test_SOURCES) \
@@ -1795,11 +1997,13 @@ DIST_SOURCES = $(libalsa_util_la_SOURCES) \
$(am__pacmd_SOURCES_DIST) $(am__pactl_SOURCES_DIST) \
$(paplay_SOURCES) $(parec_simple_SOURCES) \
$(am__pasuspender_SOURCES_DIST) \
- $(am__pax11publish_SOURCES_DIST) \
+ $(am__pax11publish_SOURCES_DIST) $(prioq_test_SOURCES) \
+ $(proplist_test_SOURCES) $(proximity_helper_SOURCES) \
$(am__pulseaudio_SOURCES_DIST) $(queue_test_SOURCES) \
$(remix_test_SOURCES) $(resampler_test_SOURCES) \
- $(rtpoll_test_SOURCES) $(sig2str_test_SOURCES) \
- $(smoother_test_SOURCES) $(strlist_test_SOURCES) \
+ $(rtpoll_test_SOURCES) $(rtstutter_SOURCES) \
+ $(sig2str_test_SOURCES) $(smoother_test_SOURCES) \
+ $(stripnul_SOURCES) $(strlist_test_SOURCES) \
$(sync_playback_SOURCES) $(thread_mainloop_test_SOURCES) \
$(thread_test_SOURCES) $(utf8_test_SOURCES) $(voltest_SOURCES)
policyDATA_INSTALL = $(INSTALL_DATA)
@@ -1808,16 +2012,15 @@ xdgautostartDATA_INSTALL = $(INSTALL_DATA)
DATA = $(policy_DATA) $(pulseconf_DATA) $(xdgautostart_DATA)
am__noinst_HEADERS_DIST = pulsecore/autoload.h pulsecore/atomic.h \
pulsecore/cli-command.h pulsecore/cli-text.h \
- pulsecore/client.h pulsecore/core.h pulsecore/core-def.h \
- pulsecore/core-scache.h pulsecore/core-subscribe.h \
- pulsecore/conf-parser.h pulsecore/core-util.h \
- pulsecore/dynarray.h pulsecore/g711.h pulsecore/hashmap.h \
- pulsecore/idxset.h pulsecore/log.h pulsecore/mcalign.h \
- pulsecore/memblock.h pulsecore/memblockq.h \
+ pulsecore/client.h pulsecore/core.h pulsecore/core-scache.h \
+ pulsecore/core-subscribe.h pulsecore/conf-parser.h \
+ pulsecore/core-util.h pulsecore/dynarray.h pulsecore/g711.h \
+ pulsecore/hashmap.h pulsecore/idxset.h pulsecore/log.h \
+ pulsecore/mcalign.h pulsecore/memblock.h pulsecore/memblockq.h \
pulsecore/memchunk.h pulsecore/modargs.h pulsecore/modinfo.h \
pulsecore/module.h pulsecore/namereg.h pulsecore/pid.h \
pulsecore/play-memchunk.h pulsecore/play-memblockq.h \
- pulsecore/props.h pulsecore/queue.h pulsecore/random.h \
+ pulsecore/shared.h pulsecore/queue.h pulsecore/random.h \
pulsecore/resampler.h pulsecore/sample-util.h \
pulsecore/sconv.h pulsecore/sink.h pulsecore/sink-input.h \
pulsecore/sioman.h pulsecore/sound-file.h \
@@ -1832,7 +2035,7 @@ am__noinst_HEADERS_DIST = pulsecore/autoload.h pulsecore/atomic.h \
pulsecore/packet.h pulsecore/pstream.h pulsecore/ioline.h \
pulsecore/cli.h pulsecore/protocol-cli.h pulsecore/tagstruct.h \
pulsecore/pstream-util.h pulsecore/pdispatch.h \
- pulsecore/authkey.h pulsecore/authkey-prop.h \
+ pulsecore/authkey.h pulsecore/auth-cookie.h \
pulsecore/strlist.h pulsecore/protocol-simple.h \
pulsecore/esound.h pulsecore/protocol-esound.h \
pulsecore/native-common.h pulsecore/protocol-native.h \
@@ -1845,6 +2048,7 @@ am__pulseinclude_HEADERS_DIST = pulse/cdecl.h pulse/channelmap.h \
pulse/scache.h pulse/simple.h pulse/stream.h pulse/subscribe.h \
pulse/thread-mainloop.h pulse/timeval.h pulse/utf8.h \
pulse/util.h pulse/version.h pulse/volume.h pulse/xmalloc.h \
+ pulse/proplist.h pulse/gccmacro.h pulse/ext-stream-restore.h \
pulse/browser.h pulse/glib-mainloop.h
pulseincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(noinst_HEADERS) $(pulseinclude_HEADERS)
@@ -1852,6 +2056,8 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
@@ -1865,6 +2071,8 @@ AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
BLUEZ_LIBS = @BLUEZ_LIBS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -1875,11 +2083,13 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -1890,8 +2100,11 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB20_CFLAGS = @GLIB20_CFLAGS@
GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAL_CFLAGS = @HAL_CFLAGS@
HAL_LIBS = @HAL_LIBS@
@@ -1914,6 +2127,31 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
JACK_CFLAGS = @JACK_CFLAGS@
JACK_LIBS = @JACK_LIBS@
LDFLAGS = @LDFLAGS@
@@ -1934,6 +2172,8 @@ LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@
LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@
LIBSNDFILE_CFLAGS = @LIBSNDFILE_CFLAGS@
LIBSNDFILE_LIBS = @LIBSNDFILE_LIBS@
+LIBSPEEX_CFLAGS = @LIBSPEEX_CFLAGS@
+LIBSPEEX_LIBS = @LIBSPEEX_LIBS@
LIBTOOL = @LIBTOOL@
LIBWRAP_LIBS = @LIBWRAP_LIBS@
LIRC_CFLAGS = @LIRC_CFLAGS@
@@ -1945,6 +2185,11 @@ LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -1960,12 +2205,18 @@ PA_API_VERSION = @PA_API_VERSION@
PA_MAJORMINOR = @PA_MAJORMINOR@
PA_PROTOCOL_VERSION = @PA_PROTOCOL_VERSION@
PA_REALTIME_GROUP = @PA_REALTIME_GROUP@
+PA_SYSTEM_CONFIG_PATH = @PA_SYSTEM_CONFIG_PATH@
PA_SYSTEM_GROUP = @PA_SYSTEM_GROUP@
PA_SYSTEM_RUNTIME_PATH = @PA_SYSTEM_RUNTIME_PATH@
+PA_SYSTEM_STATE_PATH = @PA_SYSTEM_STATE_PATH@
PA_SYSTEM_USER = @PA_SYSTEM_USER@
PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
POLKIT_CFLAGS = @POLKIT_CFLAGS@
POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PREOPEN_MODS = @PREOPEN_MODS@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
@@ -1975,7 +2226,9 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
@@ -2007,7 +2260,6 @@ docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_pkg_config = @have_pkg_config@
-have_xmltoman = @have_xmltoman@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -2030,12 +2282,14 @@ policydir = @policydir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pulselocaledir = @pulselocaledir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pulseincludedir = $(includedir)/pulse
@@ -2058,15 +2312,21 @@ PA_BINARY = $(bindir)/pulseaudio$(EXEEXT)
# This cool debug trap works on i386/gcc only
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src/modules \
-I$(top_builddir)/src/modules/rtp \
- -I$(top_builddir)/src/modules/gconf $(PTHREAD_CFLAGS) \
+ -I$(top_builddir)/src/modules/gconf \
+ -I$(top_builddir)/src/modules/bluetooth $(PTHREAD_CFLAGS) \
-D_POSIX_PTHREAD_SEMANTICS $(LTDLINCL) $(LIBSAMPLERATE_CFLAGS) \
- $(LIBSNDFILE_CFLAGS) -DPA_DLSEARCHPATH=\"$(modlibexecdir)\" \
+ $(LIBSNDFILE_CFLAGS) $(LIBSPEEX_CFLAGS) \
+ -DPA_DLSEARCHPATH=\"$(modlibexecdir)\" \
-DPA_DEFAULT_CONFIG_DIR=\"$(PA_DEFAULT_CONFIG_DIR)\" \
-DPA_BINARY=\"$(PA_BINARY)\" \
-DPA_SYSTEM_RUNTIME_PATH=\"$(PA_SYSTEM_RUNTIME_PATH)\" \
- -DAO_REQUIRE_CAS '-DDEBUG_TRAP=__asm__("int $$3")'
-AM_LIBADD = $(PTHREAD_LIBS)
-AM_LDADD = $(PTHREAD_LIBS)
+ -DPA_SYSTEM_CONFIG_PATH=\"$(PA_SYSTEM_CONFIG_PATH)\" \
+ -DPA_SYSTEM_STATE_PATH=\"$(PA_SYSTEM_STATE_PATH)\" \
+ -DAO_REQUIRE_CAS -DPULSE_LOCALEDIR=\"$(pulselocaledir)\" \
+ -DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\" \
+ '-DDEBUG_TRAP=__asm__("int $$3")'
+AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
+AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS)
# Only required on some platforms but defined for all to avoid errors
AM_LDFLAGS = -Wl,-no-undefined -Wl,--gc-sections $(am__append_1)
@@ -2087,33 +2347,34 @@ AM_LDFLAGS = -Wl,-no-undefined -Wl,--gc-sections $(am__append_1)
# Extra files #
###################################
EXTRA_DIST = pulse/client.conf.in pulse/version.h.in \
- daemon/daemon.conf.in daemon/default.pa.in \
+ daemon/daemon.conf.in daemon/default.pa.in daemon/system.pa.in \
daemon/default.pa.win32 depmod.py daemon/esdcompat.in \
- utils/padsp modules/module-defs.h.m4 \
- daemon/pulseaudio-module-xsmp.desktop map-file \
+ daemon/start-pulseaudio-x11.in utils/padsp \
+ modules/module-defs.h.m4 daemon/pulseaudio.desktop map-file \
daemon/org.pulseaudio.policy $(SYMDEF_FILES)
pulseconf_DATA = \
default.pa \
+ system.pa \
daemon.conf \
client.conf
@HAVE_X11_TRUE@xdgautostart_DATA = \
-@HAVE_X11_TRUE@ daemon/pulseaudio-module-xsmp.desktop
+@HAVE_X11_TRUE@ daemon/pulseaudio.desktop
BUILT_SOURCES = pulse/version.h $(SYMDEF_FILES)
pulseaudio_SOURCES = daemon/caps.h daemon/caps.c daemon/cmdline.c \
daemon/cmdline.h daemon/cpulimit.c daemon/cpulimit.h \
daemon/daemon-conf.c daemon/daemon-conf.h daemon/dumpmodules.c \
daemon/dumpmodules.h daemon/ltdl-bind-now.c \
- daemon/ltdl-bind-now.h daemon/main.c pulsecore/gccmacro.h \
- $(am__append_2)
+ daemon/ltdl-bind-now.h daemon/main.c $(am__append_2)
pulseaudio_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS) \
- $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS) $(CAP_CFLAGS) \
- $(LIBOIL_CFLAGS) $(DBUS_CFLAGS) $(am__append_3)
+ $(LIBSAMPLERATE_CFLAGS) $(LIBSPEEX_CFLAGS) \
+ $(LIBSNDFILE_CFLAGS) $(CAP_CFLAGS) $(LIBOIL_CFLAGS) \
+ $(DBUS_CFLAGS) $(am__append_3)
pulseaudio_CPPFLAGS = $(AM_CPPFLAGS)
pulseaudio_LDADD = $(AM_LDADD) libpulsecore.la $(LIBLTDL) \
- $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(CAP_LIBS) \
- $(LIBOIL_LIBS) $(DBUS_LIBS) $(am__append_4)
+ $(LIBSAMPLERATE_LIBS) $(LIBSPEEX_LIBS) $(LIBSNDFILE_LIBS) \
+ $(CAP_LIBS) $(LIBOIL_LIBS) $(DBUS_LIBS) $(am__append_4)
# This is needed because automake doesn't properly expand the foreach below
pulseaudio_DEPENDENCIES = libpulsecore.la $(PREOPEN_LIBS)
@PREOPEN_MODS_FALSE@PREOPEN_LIBS = $(modlibexec_LTLIBRARIES)
@@ -2121,7 +2382,7 @@ pulseaudio_DEPENDENCIES = libpulsecore.la $(PREOPEN_LIBS)
@FORCE_PREOPEN_FALSE@pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
@FORCE_PREOPEN_TRUE@pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f))
@HAVE_POLKIT_TRUE@policy_DATA = daemon/org.pulseaudio.policy
-bin_SCRIPTS = esdcompat $(am__append_21)
+bin_SCRIPTS = esdcompat start-pulseaudio-x11 $(am__append_21)
pacat_SOURCES = utils/pacat.c
pacat_LDADD = $(AM_LDADD) libpulse.la
pacat_CFLAGS = $(AM_CFLAGS)
@@ -2130,19 +2391,19 @@ paplay_SOURCES = utils/paplay.c
paplay_LDADD = $(AM_LDADD) libpulse.la $(LIBSNDFILE_LIBS)
paplay_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
paplay_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-pactl_SOURCES = utils/pactl.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+pactl_SOURCES = utils/pactl.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
pactl_LDADD = $(AM_LDADD) libpulse.la $(LIBSNDFILE_LIBS)
pactl_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
pactl_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-pasuspender_SOURCES = utils/pasuspender.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+pasuspender_SOURCES = utils/pasuspender.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
pasuspender_LDADD = $(AM_LDADD) libpulse.la $(LIBSNDFILE_LIBS)
pasuspender_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
pasuspender_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-pacmd_SOURCES = utils/pacmd.c pulsecore/pid.c pulsecore/pid.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+pacmd_SOURCES = utils/pacmd.c pulsecore/pid.c pulsecore/pid.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
pacmd_CFLAGS = $(AM_CFLAGS)
pacmd_LDADD = $(AM_LDADD) libpulse.la
pacmd_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-pax11publish_SOURCES = utils/pax11publish.c pulsecore/x11prop.c pulsecore/x11prop.h pulse/client-conf.c pulse/client-conf.h pulsecore/authkey.h pulsecore/authkey.c pulsecore/random.h pulsecore/random.c pulsecore/conf-parser.c pulsecore/conf-parser.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+pax11publish_SOURCES = utils/pax11publish.c pulsecore/x11prop.c pulsecore/x11prop.h pulse/client-conf.c pulse/client-conf.h pulsecore/authkey.h pulsecore/authkey.c pulsecore/random.h pulsecore/random.c pulsecore/conf-parser.c pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/conf-parser.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
pax11publish_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
pax11publish_LDADD = $(AM_LDADD) libpulse.la $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS)
pax11publish_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
@@ -2221,6 +2482,10 @@ strlist_test_SOURCES = tests/strlist-test.c
strlist_test_CFLAGS = $(AM_CFLAGS)
strlist_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore.la libstrlist.la
strlist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+close_test_SOURCES = tests/close-test.c
+close_test_CFLAGS = $(AM_CFLAGS)
+close_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore.la libstrlist.la
+close_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
voltest_SOURCES = tests/voltest.c
voltest_CFLAGS = $(AM_CFLAGS)
voltest_LDADD = $(AM_LDADD) libpulse.la
@@ -2273,6 +2538,30 @@ smoother_test_SOURCES = tests/smoother-test.c
smoother_test_LDADD = $(AM_LDADD) libpulsecore.la
smoother_test_CFLAGS = $(AM_CFLAGS)
smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+envelope_test_SOURCES = tests/envelope-test.c
+envelope_test_LDADD = $(AM_LDADD) libpulsecore.la
+envelope_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+envelope_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+proplist_test_SOURCES = tests/proplist-test.c
+proplist_test_LDADD = $(AM_LDADD) libpulsecore.la
+proplist_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+proplist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+rtstutter_SOURCES = tests/rtstutter.c
+rtstutter_LDADD = $(AM_LDADD) libpulsecore.la
+rtstutter_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+rtstutter_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+stripnul_SOURCES = tests/stripnul.c
+stripnul_LDADD = $(AM_LDADD) libpulsecore.la
+stripnul_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+stripnul_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+lock_autospawn_test_SOURCES = tests/lock-autospawn-test.c
+lock_autospawn_test_LDADD = $(AM_LDADD) libpulsecore.la
+lock_autospawn_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+lock_autospawn_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
+prioq_test_SOURCES = tests/prioq-test.c
+prioq_test_LDADD = $(AM_LDADD) libpulsecore.la
+prioq_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
+prioq_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
###################################
# Client library #
@@ -2284,6 +2573,7 @@ pulseinclude_HEADERS = pulse/cdecl.h pulse/channelmap.h \
pulse/scache.h pulse/simple.h pulse/stream.h pulse/subscribe.h \
pulse/thread-mainloop.h pulse/timeval.h pulse/utf8.h \
pulse/util.h pulse/version.h pulse/volume.h pulse/xmalloc.h \
+ pulse/proplist.h pulse/gccmacro.h pulse/ext-stream-restore.h \
$(am__append_10) $(am__append_11)
lib_LTLIBRARIES = libpulse.la libpulse-simple.la $(am__append_12) \
$(am__append_13) $(am__append_20) libpulsecore.la
@@ -2305,12 +2595,14 @@ libpulse_la_SOURCES = pulse/cdecl.h pulse/channelmap.c \
pulse/thread-mainloop.h pulse/timeval.c pulse/timeval.h \
pulse/utf8.c pulse/utf8.h pulse/util.c pulse/util.h \
pulse/volume.c pulse/volume.h pulse/xmalloc.c pulse/xmalloc.h \
+ pulse/proplist.c pulse/proplist.h pulse/ext-stream-restore.c \
+ pulse/ext-stream-restore.h pulse/i18n.c pulse/i18n.h \
pulsecore/authkey.c pulsecore/authkey.h \
pulsecore/conf-parser.c pulsecore/conf-parser.h \
pulsecore/core-util.c pulsecore/core-util.h \
- pulsecore/dynarray.c pulsecore/dynarray.h pulsecore/gccmacro.h \
- pulsecore/hashmap.c pulsecore/hashmap.h pulsecore/idxset.c \
- pulsecore/idxset.h pulsecore/inet_ntop.c pulsecore/inet_ntop.h \
+ pulsecore/dynarray.c pulsecore/dynarray.h pulsecore/hashmap.c \
+ pulsecore/hashmap.h pulsecore/idxset.c pulsecore/idxset.h \
+ pulsecore/inet_ntop.c pulsecore/inet_ntop.h \
pulsecore/iochannel.c pulsecore/iochannel.h pulsecore/llist.h \
pulsecore/log.c pulsecore/log.h pulsecore/mcalign.c \
pulsecore/mcalign.h pulsecore/memblock.c pulsecore/memblock.h \
@@ -2332,12 +2624,14 @@ libpulse_la_SOURCES = pulse/cdecl.h pulse/channelmap.c \
pulsecore/shm.c pulsecore/shm.h pulsecore/flist.c \
pulsecore/flist.h pulsecore/object.c pulsecore/object.h \
pulsecore/msgobject.c pulsecore/msgobject.h pulsecore/once.c \
- pulsecore/once.h $(PA_THREAD_OBJS) $(am__append_14) \
- $(am__append_15)
+ pulsecore/once.h pulsecore/rtclock.c pulsecore/rtclock.h \
+ pulsecore/time-smoother.c pulsecore/time-smoother.h \
+ pulsecore/proplist-util.c pulsecore/proplist-util.h \
+ $(PA_THREAD_OBJS) $(am__append_14) $(am__append_15)
libpulse_la_CFLAGS = $(AM_CFLAGS) $(am__append_16) $(am__append_18)
libpulse_la_LDFLAGS = -version-info $(LIBPULSE_VERSION_INFO) \
-Wl,-version-script=$(srcdir)/map-file $(am__append_17)
-libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LIBICONV) \
+libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LTLIBICONV) \
$(am__append_19)
libpulse_simple_la_SOURCES = \
pulse/simple.c pulse/simple.h \
@@ -2345,18 +2639,20 @@ libpulse_simple_la_SOURCES = \
pulsecore/core-util.c pulsecore/core-util.h \
pulsecore/core-error.c pulsecore/core-error.h \
pulsecore/once.c pulsecore/once.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h \
$(PA_THREAD_OBJS)
libpulse_simple_la_CFLAGS = $(AM_CFLAGS)
libpulse_simple_la_LIBADD = $(AM_LIBADD) libpulse.la
libpulse_simple_la_LDFLAGS = -version-info $(LIBPULSE_SIMPLE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
-libpulse_browse_la_SOURCES = pulse/browser.c pulse/browser.h pulsecore/avahi-wrap.c pulsecore/avahi-wrap.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
+libpulse_browse_la_SOURCES = pulse/browser.c pulse/browser.h pulsecore/avahi-wrap.c pulsecore/avahi-wrap.h pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
libpulse_browse_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
libpulse_browse_la_LIBADD = $(AM_LIBADD) libpulse.la $(AVAHI_LIBS)
libpulse_browse_la_LDFLAGS = -version-info $(LIBPULSE_BROWSE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
libpulse_mainloop_glib_la_SOURCES = \
pulse/glib-mainloop.h pulse/glib-mainloop.c \
pulsecore/log.c pulsecore/log.h \
+ pulsecore/rtclock.c pulsecore/rtclock.h \
pulsecore/core-util.c pulsecore/core-util.h \
pulsecore/core-error.c pulsecore/core-error.h \
pulsecore/once.c pulsecore/once.h \
@@ -2365,19 +2661,15 @@ libpulse_mainloop_glib_la_SOURCES = \
libpulse_mainloop_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
libpulse_mainloop_glib_la_LIBADD = $(AM_LIBADD) libpulse.la $(GLIB20_LIBS)
libpulse_mainloop_glib_la_LDFLAGS = -version-info $(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
-libpulsedsp_la_SOURCES = utils/padsp.c
+libpulsedsp_la_SOURCES = utils/padsp.c pulsecore/core-util.c pulsecore/core-util.h pulsecore/core-error.c pulsecore/core-error.h pulsecore/log.c pulsecore/log.h pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/once.c pulsecore/once.h $(PA_THREAD_OBJS)
libpulsedsp_la_CFLAGS = $(AM_CFLAGS)
libpulsedsp_la_LIBADD = $(AM_LIBADD) libpulse.la
libpulsedsp_la_LDFLAGS = -avoid-version
###################################
-# Speex Resampler #
+# ffmpeg resampler #
###################################
-noinst_LTLIBRARIES = libspeex-resampler-fixed.la libspeex-resampler-float.la libffmpeg-resampler.la
-libspeex_resampler_fixed_la_CPPFLAGS = $(AM_CPPFLAGS) -DRANDOM_PREFIX=paspfx -DOUTSIDE_SPEEX -DFIXED_POINT
-libspeex_resampler_fixed_la_SOURCES = pulsecore/speex/resample.c pulsecore/speex/speex_resampler.h pulsecore/speex/arch.h pulsecore/speex/fixed_generic.h pulsecore/speexwrap.h
-libspeex_resampler_float_la_CPPFLAGS = $(AM_CPPFLAGS) -DRANDOM_PREFIX=paspfl -DOUTSIDE_SPEEX -DFLOATING_POINT
-libspeex_resampler_float_la_SOURCES = pulsecore/speex/resample.c pulsecore/speex/speex_resampler.h pulsecore/speex/arch.h
+noinst_LTLIBRARIES = libffmpeg-resampler.la
libffmpeg_resampler_la_CPPFLAGS = $(AM_CPPFLAGS)
libffmpeg_resampler_la_SOURCES = pulsecore/ffmpeg/resample2.c pulsecore/ffmpeg/avcodec.h pulsecore/ffmpeg/dsputil.h
@@ -2394,16 +2686,15 @@ libffmpeg_resampler_la_SOURCES = pulsecore/ffmpeg/resample2.c pulsecore/ffmpeg/a
#pulsecoreinclude_HEADERS +=
noinst_HEADERS = pulsecore/autoload.h pulsecore/atomic.h \
pulsecore/cli-command.h pulsecore/cli-text.h \
- pulsecore/client.h pulsecore/core.h pulsecore/core-def.h \
- pulsecore/core-scache.h pulsecore/core-subscribe.h \
- pulsecore/conf-parser.h pulsecore/core-util.h \
- pulsecore/dynarray.h pulsecore/g711.h pulsecore/hashmap.h \
- pulsecore/idxset.h pulsecore/log.h pulsecore/mcalign.h \
- pulsecore/memblock.h pulsecore/memblockq.h \
+ pulsecore/client.h pulsecore/core.h pulsecore/core-scache.h \
+ pulsecore/core-subscribe.h pulsecore/conf-parser.h \
+ pulsecore/core-util.h pulsecore/dynarray.h pulsecore/g711.h \
+ pulsecore/hashmap.h pulsecore/idxset.h pulsecore/log.h \
+ pulsecore/mcalign.h pulsecore/memblock.h pulsecore/memblockq.h \
pulsecore/memchunk.h pulsecore/modargs.h pulsecore/modinfo.h \
pulsecore/module.h pulsecore/namereg.h pulsecore/pid.h \
pulsecore/play-memchunk.h pulsecore/play-memblockq.h \
- pulsecore/props.h pulsecore/queue.h pulsecore/random.h \
+ pulsecore/shared.h pulsecore/queue.h pulsecore/random.h \
pulsecore/resampler.h pulsecore/sample-util.h \
pulsecore/sconv.h pulsecore/sink.h pulsecore/sink-input.h \
pulsecore/sioman.h pulsecore/sound-file.h \
@@ -2418,7 +2709,7 @@ noinst_HEADERS = pulsecore/autoload.h pulsecore/atomic.h \
pulsecore/packet.h pulsecore/pstream.h pulsecore/ioline.h \
pulsecore/cli.h pulsecore/protocol-cli.h pulsecore/tagstruct.h \
pulsecore/pstream-util.h pulsecore/pdispatch.h \
- pulsecore/authkey.h pulsecore/authkey-prop.h \
+ pulsecore/authkey.h pulsecore/auth-cookie.h \
pulsecore/strlist.h pulsecore/protocol-simple.h \
pulsecore/esound.h pulsecore/protocol-esound.h \
pulsecore/native-common.h pulsecore/protocol-native.h \
@@ -2434,6 +2725,7 @@ libpulsecore_la_SOURCES = pulse/channelmap.c pulse/channelmap.h \
pulse/sample.h pulse/timeval.c pulse/timeval.h pulse/utf8.c \
pulse/utf8.h pulse/util.c pulse/util.h pulse/volume.c \
pulse/volume.h pulse/xmalloc.c pulse/xmalloc.h \
+ pulse/proplist.c pulse/proplist.h pulse/i18n.c pulse/i18n.h \
pulsecore/autoload.c pulsecore/autoload.h \
pulsecore/cli-command.c pulsecore/cli-command.h \
pulsecore/cli-text.c pulsecore/cli-text.h pulsecore/client.c \
@@ -2445,19 +2737,19 @@ libpulsecore_la_SOURCES = pulse/channelmap.c pulse/channelmap.h \
pulsecore/dynarray.c pulsecore/dynarray.h \
pulsecore/endianmacros.h pulsecore/g711.c pulsecore/g711.h \
pulsecore/hashmap.c pulsecore/hashmap.h pulsecore/idxset.c \
- pulsecore/idxset.h pulsecore/log.c pulsecore/log.h \
- pulsecore/mcalign.c pulsecore/mcalign.h pulsecore/memblock.c \
- pulsecore/memblock.h pulsecore/memblockq.c \
- pulsecore/memblockq.h pulsecore/memchunk.c \
- pulsecore/memchunk.h pulsecore/modargs.c pulsecore/modargs.h \
- pulsecore/modinfo.c pulsecore/modinfo.h \
+ pulsecore/idxset.h pulsecore/prioq.c pulsecore/prioq.h \
+ pulsecore/log.c pulsecore/log.h pulsecore/mcalign.c \
+ pulsecore/mcalign.h pulsecore/memblock.c pulsecore/memblock.h \
+ pulsecore/memblockq.c pulsecore/memblockq.h \
+ pulsecore/memchunk.c pulsecore/memchunk.h pulsecore/modargs.c \
+ pulsecore/modargs.h pulsecore/modinfo.c pulsecore/modinfo.h \
pulsecore/ltdl-helper.c pulsecore/ltdl-helper.h \
pulsecore/module.c pulsecore/module.h pulsecore/namereg.c \
pulsecore/namereg.h pulsecore/pid.c pulsecore/pid.h \
pulsecore/pipe.c pulsecore/pipe.h pulsecore/play-memchunk.c \
pulsecore/play-memchunk.h pulsecore/play-memblockq.c \
pulsecore/play-memblockq.h pulsecore/poll.c pulsecore/poll.h \
- pulsecore/props.c pulsecore/props.h pulsecore/queue.c \
+ pulsecore/shared.c pulsecore/shared.h pulsecore/queue.c \
pulsecore/queue.h pulsecore/random.c pulsecore/random.h \
pulsecore/resampler.c pulsecore/resampler.h \
pulsecore/sample-util.c pulsecore/sample-util.h \
@@ -2483,10 +2775,13 @@ libpulsecore_la_SOURCES = pulse/channelmap.c pulse/channelmap.h \
pulsecore/rtclock.c pulsecore/rtclock.h pulsecore/macro.h \
pulsecore/once.c pulsecore/once.h pulsecore/time-smoother.c \
pulsecore/time-smoother.h pulsecore/start-child.c \
- pulsecore/start-child.h $(PA_THREAD_OBJS) $(am__append_22)
+ pulsecore/start-child.h pulsecore/envelope.c \
+ pulsecore/envelope.h pulsecore/proplist-util.c \
+ pulsecore/proplist-util.h pulsecore/lock-autospawn.c \
+ pulsecore/lock-autospawn.h $(PA_THREAD_OBJS) $(am__append_22)
libpulsecore_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBOIL_CFLAGS)
libpulsecore_la_LDFLAGS = -version-info $(LIBPULSECORE_VERSION_INFO)
-libpulsecore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LIBICONV) libspeex-resampler-fixed.la libspeex-resampler-float.la libffmpeg-resampler.la
+libpulsecore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(LIBSPEEX_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LTLIBICONV) libffmpeg-resampler.la
### Warning! Due to an obscure bug in libtool/automake it is required
### that the libraries in modlibexec_LTLIBRARIES are specified in-order,
@@ -2501,24 +2796,27 @@ modlibexec_LTLIBRARIES = libsocket-util.la libiochannel.la \
libsocket-client.la libpacket.la libpstream.la libioline.la \
libcli.la libprotocol-cli.la libtagstruct.la \
libpstream-util.la libpdispatch.la libauthkey.la \
- libauthkey-prop.la libstrlist.la libprotocol-simple.la \
+ libauth-cookie.la libstrlist.la libprotocol-simple.la \
libprotocol-http.la libprotocol-native.la \
libprotocol-esound.la $(am__append_23) $(am__append_25) \
$(am__append_27) module-cli.la module-cli-protocol-tcp.la \
module-simple-protocol-tcp.la module-null-sink.la \
module-detect.la module-volume-restore.la \
- module-default-device-restore.la module-rescue-streams.la \
- module-suspend-on-idle.la module-http-protocol-tcp.la \
- module-sine.la module-native-protocol-tcp.la \
- module-native-protocol-fd.la module-esound-protocol-tcp.la \
- module-combine.la module-remap-sink.la module-ladspa-sink.la \
+ module-device-restore.la module-stream-restore.la \
+ module-default-device-restore.la module-always-sink.la \
+ module-rescue-streams.la module-suspend-on-idle.la \
+ module-http-protocol-tcp.la module-sine.la \
+ module-native-protocol-tcp.la module-native-protocol-fd.la \
+ module-esound-protocol-tcp.la module-combine.la \
+ module-remap-sink.la module-ladspa-sink.la \
module-esound-sink.la module-tunnel-sink.la \
- module-tunnel-source.la $(am__append_28) $(am__append_29) \
- $(am__append_30) $(am__append_31) $(am__append_32) \
- $(am__append_33) $(am__append_34) $(am__append_35) \
- $(am__append_36) $(am__append_37) $(am__append_38) \
- $(am__append_39) $(am__append_40) $(am__append_41) \
- $(am__append_43) $(am__append_44)
+ module-tunnel-source.la module-position-event-sounds.la \
+ $(am__append_28) $(am__append_29) $(am__append_30) \
+ $(am__append_31) $(am__append_32) $(am__append_33) \
+ $(am__append_34) $(am__append_35) $(am__append_36) \
+ $(am__append_37) $(am__append_38) $(am__append_39) \
+ $(am__append_40) $(am__append_41) $(am__append_43) \
+ $(am__append_44) $(am__append_45)
libprotocol_simple_la_SOURCES = pulsecore/protocol-simple.c pulsecore/protocol-simple.h
libprotocol_simple_la_LDFLAGS = -avoid-version
libprotocol_simple_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-server.la libiochannel.la
@@ -2546,7 +2844,7 @@ libpstream_la_LDFLAGS = -avoid-version
libpstream_la_LIBADD = $(AM_LIBADD) libpulsecore.la libpacket.la libiochannel.la $(WINSOCK_LIBS)
libpstream_util_la_SOURCES = pulsecore/pstream-util.c pulsecore/pstream-util.h
libpstream_util_la_LDFLAGS = -avoid-version
-libpstream_util_la_LIBADD = $(AM_LIBADD) libpacket.la libpstream.la libtagstruct.la
+libpstream_util_la_LIBADD = $(AM_LIBADD) libpacket.la libpstream.la libtagstruct.la libpulsecore.la
libpdispatch_la_SOURCES = pulsecore/pdispatch.c pulsecore/pdispatch.h
libpdispatch_la_LDFLAGS = -avoid-version
libpdispatch_la_LIBADD = $(AM_LIBADD) libtagstruct.la libpulsecore.la
@@ -2574,19 +2872,19 @@ libprotocol_http_la_LDFLAGS = -avoid-version
libprotocol_http_la_LIBADD = $(AM_LIBADD) libsocket-server.la libioline.la libpulsecore.la libiochannel.la
libprotocol_native_la_SOURCES = pulsecore/protocol-native.c pulsecore/protocol-native.h pulsecore/native-common.h
libprotocol_native_la_LDFLAGS = -avoid-version
-libprotocol_native_la_LIBADD = $(AM_LIBADD) libsocket-server.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libstrlist.la libpulsecore.la libiochannel.la libipacl.la
+libprotocol_native_la_LIBADD = $(AM_LIBADD) libsocket-server.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauth-cookie.la libstrlist.la libpulsecore.la libiochannel.la libipacl.la
libtagstruct_la_SOURCES = pulsecore/tagstruct.c pulsecore/tagstruct.h
libtagstruct_la_LDFLAGS = -avoid-version
libtagstruct_la_LIBADD = $(AM_LIBADD) libpulsecore.la $(WINSOCK_LIBS)
libprotocol_esound_la_SOURCES = pulsecore/protocol-esound.c pulsecore/protocol-esound.h pulsecore/esound.h
libprotocol_esound_la_LDFLAGS = -avoid-version
-libprotocol_esound_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libauthkey.la libpulsecore.la libipacl.la
+libprotocol_esound_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libauthkey.la libauth-cookie.la libpulsecore.la libipacl.la
libauthkey_la_SOURCES = pulsecore/authkey.c pulsecore/authkey.h
libauthkey_la_LDFLAGS = -avoid-version
libauthkey_la_LIBADD = $(AM_LIBADD) libpulsecore.la
-libauthkey_prop_la_SOURCES = pulsecore/authkey-prop.c pulsecore/authkey-prop.h
-libauthkey_prop_la_LDFLAGS = -avoid-version
-libauthkey_prop_la_LIBADD = $(AM_LIBADD) libpulsecore.la
+libauth_cookie_la_SOURCES = pulsecore/auth-cookie.c pulsecore/auth-cookie.h
+libauth_cookie_la_LDFLAGS = -avoid-version
+libauth_cookie_la_LIBADD = $(AM_LIBADD) libauthkey.la libpulsecore.la
libsocket_util_la_SOURCES = \
pulsecore/inet_ntop.c pulsecore/inet_ntop.h \
pulsecore/socket-util.c pulsecore/socket-util.h
@@ -2658,12 +2956,19 @@ SYMDEF_FILES = \
modules/module-jack-sink-symdef.h \
modules/module-jack-source-symdef.h \
modules/module-volume-restore-symdef.h \
+ modules/module-device-restore-symdef.h \
+ modules/module-stream-restore-symdef.h \
modules/module-default-device-restore-symdef.h \
+ modules/module-always-sink-symdef.h \
modules/module-rescue-streams-symdef.h \
modules/module-suspend-on-idle-symdef.h \
modules/module-hal-detect-symdef.h \
- modules/module-bt-proximity-symdef.h \
- modules/gconf/module-gconf-symdef.h
+ modules/bluetooth/module-bluetooth-proximity-symdef.h \
+ modules/bluetooth/module-bluetooth-discover-symdef.h \
+ modules/bluetooth/module-bluetooth-device-symdef.h \
+ modules/gconf/module-gconf-symdef.h \
+ modules/module-position-event-sounds-symdef.h \
+ modules/module-console-kit-symdef.h
# Simple protocol
@@ -2756,7 +3061,7 @@ module_remap_sink_la_SOURCES = modules/module-remap-sink.c
module_remap_sink_la_LDFLAGS = -module -avoid-version
module_remap_sink_la_LIBADD = $(AM_LIBADD) libpulsecore.la
module_ladspa_sink_la_SOURCES = modules/module-ladspa-sink.c modules/ladspa.h
-module_ladspa_sink_la_CFLAGS = -DLADSPA_PATH=\"$(libdir)/ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa\" $(AM_CFLAGS)
+module_ladspa_sink_la_CFLAGS = -DLADSPA_PATH=\"$(libdir)/ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/local/lib64/ladspa:/usr/lib64/ladspa\" $(AM_CFLAGS)
module_ladspa_sink_la_LDFLAGS = -module -avoid-version
module_ladspa_sink_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) libpulsecore.la
module_match_la_SOURCES = modules/module-match.c
@@ -2765,10 +3070,10 @@ module_match_la_LIBADD = $(AM_LIBADD) libpulsecore.la
module_tunnel_sink_la_SOURCES = modules/module-tunnel.c
module_tunnel_sink_la_CFLAGS = -DTUNNEL_SINK=1 $(AM_CFLAGS)
module_tunnel_sink_la_LDFLAGS = -module -avoid-version
-module_tunnel_sink_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libsocket-util.la libiochannel.la
+module_tunnel_sink_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauth-cookie.la libsocket-util.la libiochannel.la
module_tunnel_source_la_SOURCES = modules/module-tunnel.c
module_tunnel_source_la_LDFLAGS = -module -avoid-version
-module_tunnel_source_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libsocket-util.la libiochannel.la
+module_tunnel_source_la_LIBADD = $(AM_LIBADD) libpulsecore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauth-cookie.la libsocket-util.la libiochannel.la
# X11
module_x11_bell_la_SOURCES = modules/module-x11-bell.c
@@ -2778,11 +3083,11 @@ module_x11_bell_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA
module_x11_publish_la_SOURCES = modules/module-x11-publish.c
module_x11_publish_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
module_x11_publish_la_LDFLAGS = -module -avoid-version
-module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libauthkey.la libauthkey-prop.la libx11prop.la libstrlist.la libpulsecore.la
+module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libauthkey.la libauth-cookie.la libx11prop.la libstrlist.la libprotocol-native.la libpulsecore.la
module_x11_xsmp_la_SOURCES = modules/module-x11-xsmp.c
module_x11_xsmp_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
module_x11_xsmp_la_LDFLAGS = -module -avoid-version
-module_x11_xsmp_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libpulsecore.la
+module_x11_xsmp_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libpulsecore.la
# OSS
liboss_util_la_SOURCES = modules/oss-util.c modules/oss-util.h
@@ -2852,12 +3157,36 @@ module_volume_restore_la_LDFLAGS = -module -avoid-version
module_volume_restore_la_LIBADD = $(AM_LIBADD) libpulsecore.la
module_volume_restore_la_CFLAGS = $(AM_CFLAGS)
+# Position event sounds in space
+module_position_event_sounds_la_SOURCES = modules/module-position-event-sounds.c
+module_position_event_sounds_la_LDFLAGS = -module -avoid-version
+module_position_event_sounds_la_LIBADD = $(AM_LIBADD) libpulsecore.la
+module_position_event_sounds_CFLAGS = $(AM_CFLAGS)
+
+# Device volume/muted restore module
+module_device_restore_la_SOURCES = modules/module-device-restore.c
+module_device_restore_la_LDFLAGS = -module -avoid-version
+module_device_restore_la_LIBADD = $(AM_LIBADD) libpulsecore.la -lgdbm
+module_device_restore_la_CFLAGS = $(AM_CFLAGS)
+
+# Stream volume/muted/device restore module
+module_stream_restore_la_SOURCES = modules/module-stream-restore.c
+module_stream_restore_la_LDFLAGS = -module -avoid-version
+module_stream_restore_la_LIBADD = $(AM_LIBADD) libtagstruct.la libprotocol-native.la libpulsecore.la -lgdbm
+module_stream_restore_la_CFLAGS = $(AM_CFLAGS)
+
# Default sink/source restore module
module_default_device_restore_la_SOURCES = modules/module-default-device-restore.c
module_default_device_restore_la_LDFLAGS = -module -avoid-version
module_default_device_restore_la_LIBADD = $(AM_LIBADD) libpulsecore.la
module_default_device_restore_la_CFLAGS = $(AM_CFLAGS)
+# Always Sink module
+module_always_sink_la_SOURCES = modules/module-always-sink.c
+module_always_sink_la_LDFLAGS = -module -avoid-version
+module_always_sink_la_LIBADD = $(AM_LIBADD) libpulsecore.la
+module_always_sink_la_CFLAGS = $(AM_CFLAGS)
+
# Rescue streams module
module_rescue_streams_la_SOURCES = modules/module-rescue-streams.c
module_rescue_streams_la_LDFLAGS = -module -avoid-version
@@ -2890,7 +3219,7 @@ module_jack_source_la_LDFLAGS = -module -avoid-version
module_jack_source_la_LIBADD = $(AM_LIBADD) libpulsecore.la $(JACK_LIBS)
module_jack_source_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS)
-# HAL
+# HAL/D-Bus
libdbus_util_la_SOURCES = modules/dbus-util.c modules/dbus-util.h
libdbus_util_la_LDFLAGS = -avoid-version
libdbus_util_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la
@@ -2899,6 +3228,10 @@ module_hal_detect_la_SOURCES = modules/module-hal-detect.c
module_hal_detect_la_LDFLAGS = -module -avoid-version
module_hal_detect_la_LIBADD = $(AM_LIBADD) $(HAL_LIBS) libpulsecore.la libdbus-util.la
module_hal_detect_la_CFLAGS = $(AM_CFLAGS) $(HAL_CFLAGS)
+module_console_kit_la_SOURCES = modules/module-console-kit.c
+module_console_kit_la_LDFLAGS = -module -avoid-version
+module_console_kit_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la
+module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
# GConf support
module_gconf_la_SOURCES = modules/gconf/module-gconf.c
@@ -2911,15 +3244,33 @@ gconf_helper_CFLAGS = $(AM_CFLAGS) $(GCONF_CFLAGS)
gconf_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
# Bluetooth proximity
-module_bt_proximity_la_SOURCES = modules/module-bt-proximity.c
-module_bt_proximity_la_LDFLAGS = -module -avoid-version
-module_bt_proximity_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la
-module_bt_proximity_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DPA_BT_PROXIMITY_HELPER=\"$(pulselibexecdir)/bt-proximity-helper\"
-bt_proximity_helper_SOURCES = modules/bt-proximity-helper.c
-bt_proximity_helper_LDADD = $(AM_LDADD) $(BLUEZ_LIBS)
-bt_proximity_helper_CFLAGS = $(AM_CFLAGS) $(BLUEZ_CFLAGS)
-bt_proximity_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
-CLEANFILES = esdcompat client.conf default.pa daemon.conf
+module_bluetooth_proximity_la_SOURCES = modules/bluetooth/module-bluetooth-proximity.c
+module_bluetooth_proximity_la_LDFLAGS = -module -avoid-version
+module_bluetooth_proximity_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la
+module_bluetooth_proximity_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DPA_BT_PROXIMITY_HELPER=\"$(pulselibexecdir)/proximity-helper\"
+proximity_helper_SOURCES = modules/bluetooth/proximity-helper.c
+proximity_helper_LDADD = $(AM_LDADD) $(BLUEZ_LIBS)
+proximity_helper_CFLAGS = $(AM_CFLAGS) $(BLUEZ_CFLAGS)
+proximity_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+
+# Bluetooth sink / source
+module_bluetooth_discover_la_SOURCES = modules/bluetooth/module-bluetooth-discover.c
+module_bluetooth_discover_la_LDFLAGS = -module -avoid-version
+module_bluetooth_discover_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la
+module_bluetooth_discover_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
+libbluetooth_sbc_la_SOURCES = modules/bluetooth/sbc.c modules/bluetooth/sbc.h modules/bluetooth/sbc_tables.h modules/bluetooth/sbc_math.h
+libbluetooth_sbc_la_LDFLAGS = -avoid-version
+libbluetooth_sbc_la_LIBADD = $(AM_LIBADD)
+libbluetooth_sbc_la_CFLAGS = $(AM_CFLAGS)
+libbluetooth_ipc_la_SOURCES = modules/bluetooth/ipc.c modules/bluetooth/ipc.h
+libbluetooth_ipc_la_LDFLAGS = -avoid-version
+libbluetooth_ipc_la_LIBADD = $(AM_LIBADD)
+libbluetooth_ipc_la_CFLAGS = $(AM_CFLAGS)
+module_bluetooth_device_la_SOURCES = modules/bluetooth/module-bluetooth-device.c modules/bluetooth/rtp.h
+module_bluetooth_device_la_LDFLAGS = -module -avoid-version
+module_bluetooth_device_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore.la libdbus-util.la libbluetooth-ipc.la libbluetooth-sbc.la libsocket-util.la
+module_bluetooth_device_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
+CLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -3019,12 +3370,16 @@ clean-noinstLTLIBRARIES:
done
libalsa-util.la: $(libalsa_util_la_OBJECTS) $(libalsa_util_la_DEPENDENCIES)
$(libalsa_util_la_LINK) $(am_libalsa_util_la_rpath) $(libalsa_util_la_OBJECTS) $(libalsa_util_la_LIBADD) $(LIBS)
-libauthkey-prop.la: $(libauthkey_prop_la_OBJECTS) $(libauthkey_prop_la_DEPENDENCIES)
- $(libauthkey_prop_la_LINK) -rpath $(modlibexecdir) $(libauthkey_prop_la_OBJECTS) $(libauthkey_prop_la_LIBADD) $(LIBS)
+libauth-cookie.la: $(libauth_cookie_la_OBJECTS) $(libauth_cookie_la_DEPENDENCIES)
+ $(libauth_cookie_la_LINK) -rpath $(modlibexecdir) $(libauth_cookie_la_OBJECTS) $(libauth_cookie_la_LIBADD) $(LIBS)
libauthkey.la: $(libauthkey_la_OBJECTS) $(libauthkey_la_DEPENDENCIES)
$(libauthkey_la_LINK) -rpath $(modlibexecdir) $(libauthkey_la_OBJECTS) $(libauthkey_la_LIBADD) $(LIBS)
libavahi-wrap.la: $(libavahi_wrap_la_OBJECTS) $(libavahi_wrap_la_DEPENDENCIES)
$(libavahi_wrap_la_LINK) $(am_libavahi_wrap_la_rpath) $(libavahi_wrap_la_OBJECTS) $(libavahi_wrap_la_LIBADD) $(LIBS)
+libbluetooth-ipc.la: $(libbluetooth_ipc_la_OBJECTS) $(libbluetooth_ipc_la_DEPENDENCIES)
+ $(libbluetooth_ipc_la_LINK) $(am_libbluetooth_ipc_la_rpath) $(libbluetooth_ipc_la_OBJECTS) $(libbluetooth_ipc_la_LIBADD) $(LIBS)
+libbluetooth-sbc.la: $(libbluetooth_sbc_la_OBJECTS) $(libbluetooth_sbc_la_DEPENDENCIES)
+ $(libbluetooth_sbc_la_LINK) $(am_libbluetooth_sbc_la_rpath) $(libbluetooth_sbc_la_OBJECTS) $(libbluetooth_sbc_la_LIBADD) $(LIBS)
libcli.la: $(libcli_la_OBJECTS) $(libcli_la_DEPENDENCIES)
$(libcli_la_LINK) -rpath $(modlibexecdir) $(libcli_la_OBJECTS) $(libcli_la_LIBADD) $(LIBS)
libdbus-util.la: $(libdbus_util_la_OBJECTS) $(libdbus_util_la_DEPENDENCIES)
@@ -3079,10 +3434,6 @@ libsocket-server.la: $(libsocket_server_la_OBJECTS) $(libsocket_server_la_DEPEND
$(libsocket_server_la_LINK) -rpath $(modlibexecdir) $(libsocket_server_la_OBJECTS) $(libsocket_server_la_LIBADD) $(LIBS)
libsocket-util.la: $(libsocket_util_la_OBJECTS) $(libsocket_util_la_DEPENDENCIES)
$(libsocket_util_la_LINK) -rpath $(modlibexecdir) $(libsocket_util_la_OBJECTS) $(libsocket_util_la_LIBADD) $(LIBS)
-libspeex-resampler-fixed.la: $(libspeex_resampler_fixed_la_OBJECTS) $(libspeex_resampler_fixed_la_DEPENDENCIES)
- $(LINK) $(libspeex_resampler_fixed_la_OBJECTS) $(libspeex_resampler_fixed_la_LIBADD) $(LIBS)
-libspeex-resampler-float.la: $(libspeex_resampler_float_la_OBJECTS) $(libspeex_resampler_float_la_DEPENDENCIES)
- $(LINK) $(libspeex_resampler_float_la_OBJECTS) $(libspeex_resampler_float_la_LIBADD) $(LIBS)
libstrlist.la: $(libstrlist_la_OBJECTS) $(libstrlist_la_DEPENDENCIES)
$(libstrlist_la_LINK) -rpath $(modlibexecdir) $(libstrlist_la_OBJECTS) $(libstrlist_la_LIBADD) $(LIBS)
libtagstruct.la: $(libtagstruct_la_OBJECTS) $(libtagstruct_la_DEPENDENCIES)
@@ -3095,8 +3446,14 @@ module-alsa-sink.la: $(module_alsa_sink_la_OBJECTS) $(module_alsa_sink_la_DEPEND
$(module_alsa_sink_la_LINK) $(am_module_alsa_sink_la_rpath) $(module_alsa_sink_la_OBJECTS) $(module_alsa_sink_la_LIBADD) $(LIBS)
module-alsa-source.la: $(module_alsa_source_la_OBJECTS) $(module_alsa_source_la_DEPENDENCIES)
$(module_alsa_source_la_LINK) $(am_module_alsa_source_la_rpath) $(module_alsa_source_la_OBJECTS) $(module_alsa_source_la_LIBADD) $(LIBS)
-module-bt-proximity.la: $(module_bt_proximity_la_OBJECTS) $(module_bt_proximity_la_DEPENDENCIES)
- $(module_bt_proximity_la_LINK) $(am_module_bt_proximity_la_rpath) $(module_bt_proximity_la_OBJECTS) $(module_bt_proximity_la_LIBADD) $(LIBS)
+module-always-sink.la: $(module_always_sink_la_OBJECTS) $(module_always_sink_la_DEPENDENCIES)
+ $(module_always_sink_la_LINK) -rpath $(modlibexecdir) $(module_always_sink_la_OBJECTS) $(module_always_sink_la_LIBADD) $(LIBS)
+module-bluetooth-device.la: $(module_bluetooth_device_la_OBJECTS) $(module_bluetooth_device_la_DEPENDENCIES)
+ $(module_bluetooth_device_la_LINK) $(am_module_bluetooth_device_la_rpath) $(module_bluetooth_device_la_OBJECTS) $(module_bluetooth_device_la_LIBADD) $(LIBS)
+module-bluetooth-discover.la: $(module_bluetooth_discover_la_OBJECTS) $(module_bluetooth_discover_la_DEPENDENCIES)
+ $(module_bluetooth_discover_la_LINK) $(am_module_bluetooth_discover_la_rpath) $(module_bluetooth_discover_la_OBJECTS) $(module_bluetooth_discover_la_LIBADD) $(LIBS)
+module-bluetooth-proximity.la: $(module_bluetooth_proximity_la_OBJECTS) $(module_bluetooth_proximity_la_DEPENDENCIES)
+ $(module_bluetooth_proximity_la_LINK) $(am_module_bluetooth_proximity_la_rpath) $(module_bluetooth_proximity_la_OBJECTS) $(module_bluetooth_proximity_la_LIBADD) $(LIBS)
module-cli-protocol-tcp.la: $(module_cli_protocol_tcp_la_OBJECTS) $(module_cli_protocol_tcp_la_DEPENDENCIES)
$(module_cli_protocol_tcp_la_LINK) -rpath $(modlibexecdir) $(module_cli_protocol_tcp_la_OBJECTS) $(module_cli_protocol_tcp_la_LIBADD) $(LIBS)
module-cli-protocol-unix.la: $(module_cli_protocol_unix_la_OBJECTS) $(module_cli_protocol_unix_la_DEPENDENCIES)
@@ -3105,10 +3462,14 @@ module-cli.la: $(module_cli_la_OBJECTS) $(module_cli_la_DEPENDENCIES)
$(module_cli_la_LINK) -rpath $(modlibexecdir) $(module_cli_la_OBJECTS) $(module_cli_la_LIBADD) $(LIBS)
module-combine.la: $(module_combine_la_OBJECTS) $(module_combine_la_DEPENDENCIES)
$(module_combine_la_LINK) -rpath $(modlibexecdir) $(module_combine_la_OBJECTS) $(module_combine_la_LIBADD) $(LIBS)
+module-console-kit.la: $(module_console_kit_la_OBJECTS) $(module_console_kit_la_DEPENDENCIES)
+ $(module_console_kit_la_LINK) $(am_module_console_kit_la_rpath) $(module_console_kit_la_OBJECTS) $(module_console_kit_la_LIBADD) $(LIBS)
module-default-device-restore.la: $(module_default_device_restore_la_OBJECTS) $(module_default_device_restore_la_DEPENDENCIES)
$(module_default_device_restore_la_LINK) -rpath $(modlibexecdir) $(module_default_device_restore_la_OBJECTS) $(module_default_device_restore_la_LIBADD) $(LIBS)
module-detect.la: $(module_detect_la_OBJECTS) $(module_detect_la_DEPENDENCIES)
$(module_detect_la_LINK) -rpath $(modlibexecdir) $(module_detect_la_OBJECTS) $(module_detect_la_LIBADD) $(LIBS)
+module-device-restore.la: $(module_device_restore_la_OBJECTS) $(module_device_restore_la_DEPENDENCIES)
+ $(module_device_restore_la_LINK) -rpath $(modlibexecdir) $(module_device_restore_la_OBJECTS) $(module_device_restore_la_LIBADD) $(LIBS)
module-esound-compat-spawnfd.la: $(module_esound_compat_spawnfd_la_OBJECTS) $(module_esound_compat_spawnfd_la_DEPENDENCIES)
$(module_esound_compat_spawnfd_la_LINK) $(am_module_esound_compat_spawnfd_la_rpath) $(module_esound_compat_spawnfd_la_OBJECTS) $(module_esound_compat_spawnfd_la_LIBADD) $(LIBS)
module-esound-compat-spawnpid.la: $(module_esound_compat_spawnpid_la_OBJECTS) $(module_esound_compat_spawnpid_la_DEPENDENCIES)
@@ -3153,6 +3514,8 @@ module-pipe-sink.la: $(module_pipe_sink_la_OBJECTS) $(module_pipe_sink_la_DEPEND
$(module_pipe_sink_la_LINK) $(am_module_pipe_sink_la_rpath) $(module_pipe_sink_la_OBJECTS) $(module_pipe_sink_la_LIBADD) $(LIBS)
module-pipe-source.la: $(module_pipe_source_la_OBJECTS) $(module_pipe_source_la_DEPENDENCIES)
$(module_pipe_source_la_LINK) $(am_module_pipe_source_la_rpath) $(module_pipe_source_la_OBJECTS) $(module_pipe_source_la_LIBADD) $(LIBS)
+module-position-event-sounds.la: $(module_position_event_sounds_la_OBJECTS) $(module_position_event_sounds_la_DEPENDENCIES)
+ $(module_position_event_sounds_la_LINK) -rpath $(modlibexecdir) $(module_position_event_sounds_la_OBJECTS) $(module_position_event_sounds_la_LIBADD) $(LIBS)
module-remap-sink.la: $(module_remap_sink_la_OBJECTS) $(module_remap_sink_la_DEPENDENCIES)
$(module_remap_sink_la_LINK) -rpath $(modlibexecdir) $(module_remap_sink_la_OBJECTS) $(module_remap_sink_la_LIBADD) $(LIBS)
module-rescue-streams.la: $(module_rescue_streams_la_OBJECTS) $(module_rescue_streams_la_DEPENDENCIES)
@@ -3169,6 +3532,8 @@ module-sine.la: $(module_sine_la_OBJECTS) $(module_sine_la_DEPENDENCIES)
$(module_sine_la_LINK) -rpath $(modlibexecdir) $(module_sine_la_OBJECTS) $(module_sine_la_LIBADD) $(LIBS)
module-solaris.la: $(module_solaris_la_OBJECTS) $(module_solaris_la_DEPENDENCIES)
$(module_solaris_la_LINK) $(am_module_solaris_la_rpath) $(module_solaris_la_OBJECTS) $(module_solaris_la_LIBADD) $(LIBS)
+module-stream-restore.la: $(module_stream_restore_la_OBJECTS) $(module_stream_restore_la_DEPENDENCIES)
+ $(module_stream_restore_la_LINK) -rpath $(modlibexecdir) $(module_stream_restore_la_OBJECTS) $(module_stream_restore_la_LIBADD) $(LIBS)
module-suspend-on-idle.la: $(module_suspend_on_idle_la_OBJECTS) $(module_suspend_on_idle_la_DEPENDENCIES)
$(module_suspend_on_idle_la_LINK) -rpath $(modlibexecdir) $(module_suspend_on_idle_la_OBJECTS) $(module_suspend_on_idle_la_LIBADD) $(LIBS)
module-tunnel-sink.la: $(module_tunnel_sink_la_OBJECTS) $(module_tunnel_sink_la_DEPENDENCIES)
@@ -3256,18 +3621,21 @@ asyncmsgq-test$(EXEEXT): $(asyncmsgq_test_OBJECTS) $(asyncmsgq_test_DEPENDENCIES
asyncq-test$(EXEEXT): $(asyncq_test_OBJECTS) $(asyncq_test_DEPENDENCIES)
@rm -f asyncq-test$(EXEEXT)
$(asyncq_test_LINK) $(asyncq_test_OBJECTS) $(asyncq_test_LDADD) $(LIBS)
-bt-proximity-helper$(EXEEXT): $(bt_proximity_helper_OBJECTS) $(bt_proximity_helper_DEPENDENCIES)
- @rm -f bt-proximity-helper$(EXEEXT)
- $(bt_proximity_helper_LINK) $(bt_proximity_helper_OBJECTS) $(bt_proximity_helper_LDADD) $(LIBS)
channelmap-test$(EXEEXT): $(channelmap_test_OBJECTS) $(channelmap_test_DEPENDENCIES)
@rm -f channelmap-test$(EXEEXT)
$(channelmap_test_LINK) $(channelmap_test_OBJECTS) $(channelmap_test_LDADD) $(LIBS)
+close-test$(EXEEXT): $(close_test_OBJECTS) $(close_test_DEPENDENCIES)
+ @rm -f close-test$(EXEEXT)
+ $(close_test_LINK) $(close_test_OBJECTS) $(close_test_LDADD) $(LIBS)
cpulimit-test$(EXEEXT): $(cpulimit_test_OBJECTS) $(cpulimit_test_DEPENDENCIES)
@rm -f cpulimit-test$(EXEEXT)
$(cpulimit_test_LINK) $(cpulimit_test_OBJECTS) $(cpulimit_test_LDADD) $(LIBS)
cpulimit-test2$(EXEEXT): $(cpulimit_test2_OBJECTS) $(cpulimit_test2_DEPENDENCIES)
@rm -f cpulimit-test2$(EXEEXT)
$(cpulimit_test2_LINK) $(cpulimit_test2_OBJECTS) $(cpulimit_test2_LDADD) $(LIBS)
+envelope-test$(EXEEXT): $(envelope_test_OBJECTS) $(envelope_test_DEPENDENCIES)
+ @rm -f envelope-test$(EXEEXT)
+ $(envelope_test_LINK) $(envelope_test_OBJECTS) $(envelope_test_LDADD) $(LIBS)
flist-test$(EXEEXT): $(flist_test_OBJECTS) $(flist_test_DEPENDENCIES)
@rm -f flist-test$(EXEEXT)
$(flist_test_LINK) $(flist_test_OBJECTS) $(flist_test_LDADD) $(LIBS)
@@ -3286,6 +3654,9 @@ interpol-test$(EXEEXT): $(interpol_test_OBJECTS) $(interpol_test_DEPENDENCIES)
ipacl-test$(EXEEXT): $(ipacl_test_OBJECTS) $(ipacl_test_DEPENDENCIES)
@rm -f ipacl-test$(EXEEXT)
$(ipacl_test_LINK) $(ipacl_test_OBJECTS) $(ipacl_test_LDADD) $(LIBS)
+lock-autospawn-test$(EXEEXT): $(lock_autospawn_test_OBJECTS) $(lock_autospawn_test_DEPENDENCIES)
+ @rm -f lock-autospawn-test$(EXEEXT)
+ $(lock_autospawn_test_LINK) $(lock_autospawn_test_OBJECTS) $(lock_autospawn_test_LDADD) $(LIBS)
mainloop-test$(EXEEXT): $(mainloop_test_OBJECTS) $(mainloop_test_DEPENDENCIES)
@rm -f mainloop-test$(EXEEXT)
$(mainloop_test_LINK) $(mainloop_test_OBJECTS) $(mainloop_test_LDADD) $(LIBS)
@@ -3331,6 +3702,15 @@ pasuspender$(EXEEXT): $(pasuspender_OBJECTS) $(pasuspender_DEPENDENCIES)
pax11publish$(EXEEXT): $(pax11publish_OBJECTS) $(pax11publish_DEPENDENCIES)
@rm -f pax11publish$(EXEEXT)
$(pax11publish_LINK) $(pax11publish_OBJECTS) $(pax11publish_LDADD) $(LIBS)
+prioq-test$(EXEEXT): $(prioq_test_OBJECTS) $(prioq_test_DEPENDENCIES)
+ @rm -f prioq-test$(EXEEXT)
+ $(prioq_test_LINK) $(prioq_test_OBJECTS) $(prioq_test_LDADD) $(LIBS)
+proplist-test$(EXEEXT): $(proplist_test_OBJECTS) $(proplist_test_DEPENDENCIES)
+ @rm -f proplist-test$(EXEEXT)
+ $(proplist_test_LINK) $(proplist_test_OBJECTS) $(proplist_test_LDADD) $(LIBS)
+proximity-helper$(EXEEXT): $(proximity_helper_OBJECTS) $(proximity_helper_DEPENDENCIES)
+ @rm -f proximity-helper$(EXEEXT)
+ $(proximity_helper_LINK) $(proximity_helper_OBJECTS) $(proximity_helper_LDADD) $(LIBS)
pulseaudio$(EXEEXT): $(pulseaudio_OBJECTS) $(pulseaudio_DEPENDENCIES)
@rm -f pulseaudio$(EXEEXT)
$(pulseaudio_LINK) $(pulseaudio_OBJECTS) $(pulseaudio_LDADD) $(LIBS)
@@ -3346,12 +3726,18 @@ resampler-test$(EXEEXT): $(resampler_test_OBJECTS) $(resampler_test_DEPENDENCIES
rtpoll-test$(EXEEXT): $(rtpoll_test_OBJECTS) $(rtpoll_test_DEPENDENCIES)
@rm -f rtpoll-test$(EXEEXT)
$(rtpoll_test_LINK) $(rtpoll_test_OBJECTS) $(rtpoll_test_LDADD) $(LIBS)
+rtstutter$(EXEEXT): $(rtstutter_OBJECTS) $(rtstutter_DEPENDENCIES)
+ @rm -f rtstutter$(EXEEXT)
+ $(rtstutter_LINK) $(rtstutter_OBJECTS) $(rtstutter_LDADD) $(LIBS)
sig2str-test$(EXEEXT): $(sig2str_test_OBJECTS) $(sig2str_test_DEPENDENCIES)
@rm -f sig2str-test$(EXEEXT)
$(sig2str_test_LINK) $(sig2str_test_OBJECTS) $(sig2str_test_LDADD) $(LIBS)
smoother-test$(EXEEXT): $(smoother_test_OBJECTS) $(smoother_test_DEPENDENCIES)
@rm -f smoother-test$(EXEEXT)
$(smoother_test_LINK) $(smoother_test_OBJECTS) $(smoother_test_LDADD) $(LIBS)
+stripnul$(EXEEXT): $(stripnul_OBJECTS) $(stripnul_DEPENDENCIES)
+ @rm -f stripnul$(EXEEXT)
+ $(stripnul_LINK) $(stripnul_OBJECTS) $(stripnul_LDADD) $(LIBS)
strlist-test$(EXEEXT): $(strlist_test_OBJECTS) $(strlist_test_DEPENDENCIES)
@rm -f strlist-test$(EXEEXT)
$(strlist_test_LINK) $(strlist_test_OBJECTS) $(strlist_test_LDADD) $(LIBS)
@@ -3398,14 +3784,15 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asyncmsgq_test-asyncmsgq-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asyncq_test-asyncq-test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authkey-prop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth-cookie.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authkey.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bt_proximity_helper-bt-proximity-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channelmap_test-channelmap-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close_test-close-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpulimit_test-cpulimit-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpulimit_test-cpulimit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpulimit_test2-cpulimit-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpulimit_test2-cpulimit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/envelope_test-envelope-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flist_test-flist-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gconf_helper-gconf-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_binary_name_test-get-binary-name-test.Po@am__quote@
@@ -3421,6 +3808,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipacl_test-ipacl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalsa_util_la-alsa-util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_wrap_la-avahi-wrap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbluetooth_ipc_la-ipc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbluetooth_sbc_la-sbc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcli_la-cli.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_util_la-dbus-util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libffmpeg_resampler_la-resample2.Plo@am__quote@
@@ -3432,6 +3821,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_browse_la-mutex-posix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_browse_la-mutex-win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_browse_la-once.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_browse_la-rtclock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_browse_la-semaphore-posix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_browse_la-semaphore-win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_browse_la-thread-posix.Plo@am__quote@
@@ -3447,8 +3837,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-dllmain.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-dynarray.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-ext-stream-restore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-flist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-hashmap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-i18n.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-idxset.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-inet_ntop.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-introspect.Plo@am__quote@
@@ -3472,10 +3864,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-pdispatch.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-pipe.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-poll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-proplist-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-proplist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-pstream-util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-pstream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-queue.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-random.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-rtclock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-sample.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-scache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-semaphore-posix.Plo@am__quote@
@@ -3491,6 +3886,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-thread-mainloop.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-thread-posix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-thread-win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-time-smoother.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-timeval.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-utf8.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_la-util.Plo@am__quote@
@@ -3504,6 +3900,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_mainloop_glib_la-mutex-posix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_mainloop_glib_la-mutex-win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_mainloop_glib_la-once.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_mainloop_glib_la-rtclock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_mainloop_glib_la-semaphore-posix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_mainloop_glib_la-semaphore-win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_mainloop_glib_la-thread-posix.Plo@am__quote@
@@ -3514,6 +3911,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_simple_la-mutex-posix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_simple_la-mutex-win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_simple_la-once.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_simple_la-rtclock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_simple_la-semaphore-posix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_simple_la-semaphore-win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulse_simple_la-simple.Plo@am__quote@
@@ -3534,13 +3932,16 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-core.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-dllmain.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-dynarray.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-envelope.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-error.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-fdsem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-flist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-g711.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-hashmap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-hook-list.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-i18n.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-idxset.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-lock-autospawn.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-log.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-ltdl-helper.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-mainloop-api.Plo@am__quote@
@@ -3564,7 +3965,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-play-memblockq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-play-memchunk.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-poll.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-props.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-prioq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-proplist-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-proplist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-queue.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-random.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-resampler.Plo@am__quote@
@@ -3578,6 +3981,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-sconv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-semaphore-posix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-semaphore-win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-shared.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-shm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-sink-input.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-sink.Plo@am__quote@
@@ -3598,12 +4002,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-volume.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsecore_la-xmalloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-core-error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-core-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-mutex-posix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-mutex-win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-once.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-padsp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-rtclock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-semaphore-posix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-semaphore-win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-thread-posix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpulsedsp_la-thread-win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsocket_client_la-socket-client.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspeex_resampler_fixed_la-resample.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspeex_resampler_float_la-resample.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libx11prop_la-x11prop.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libx11wrap_la-x11wrap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock_autospawn_test-lock-autospawn-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mainloop_test-mainloop-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mainloop_test_glib-mainloop-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcalign_test-mcalign-test.Po@am__quote@
@@ -3620,17 +4034,23 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module-oss.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module-pipe-sink.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module-pipe-source.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module-position-event-sounds.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module-remap-sink.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module-sine.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module-solaris.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module-tunnel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_alsa_sink_la-module-alsa-sink.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_alsa_source_la-module-alsa-source.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_bt_proximity_la-module-bt-proximity.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_always_sink_la-module-always-sink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_bluetooth_device_la-module-bluetooth-device.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_bluetooth_discover_la-module-bluetooth-discover.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_bluetooth_proximity_la-module-bluetooth-proximity.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_cli_protocol_tcp_la-module-protocol-stub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_cli_protocol_unix_la-module-protocol-stub.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_console_kit_la-module-console-kit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_default_device_restore_la-module-default-device-restore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_detect_la-module-detect.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_device_restore_la-module-device-restore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_esound_protocol_tcp_la-module-protocol-stub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_esound_protocol_unix_la-module-protocol-stub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_gconf_la-module-gconf.Plo@am__quote@
@@ -3650,6 +4070,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_rtp_send_la-module-rtp-send.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_simple_protocol_tcp_la-module-protocol-stub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_simple_protocol_unix_la-module-protocol-stub.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_stream_restore_la-module-stream-restore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_suspend_on_idle_la-module-suspend-on-idle.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_tunnel_sink_la-module-tunnel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_volume_restore_la-module-volume-restore.Plo@am__quote@
@@ -3671,6 +4092,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacmd-once.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacmd-pacmd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacmd-pid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacmd-rtclock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacmd-semaphore-posix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacmd-semaphore-win32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacmd-thread-posix.Po@am__quote@
@@ -3682,6 +4104,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pactl-mutex-win32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pactl-once.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pactl-pactl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pactl-rtclock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pactl-semaphore-posix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pactl-semaphore-win32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pactl-thread-posix.Po@am__quote@
@@ -3696,6 +4119,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pasuspender-mutex-win32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pasuspender-once.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pasuspender-pasuspender.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pasuspender-rtclock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pasuspender-semaphore-posix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pasuspender-semaphore-win32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pasuspender-thread-posix.Po@am__quote@
@@ -3711,17 +4135,21 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-once.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-pax11publish.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-random.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-rtclock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-semaphore-posix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-semaphore-win32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-thread-posix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-thread-win32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pax11publish-x11prop.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdispatch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prioq_test-prioq-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proplist_test-proplist-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-cli.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-esound.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-http.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-native.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-simple.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proximity_helper-proximity-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pstream-util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pstream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pulseaudio-caps.Po@am__quote@
@@ -3737,12 +4165,14 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resampler_test-resampler-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpoll_test-rtpoll-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtstutter-rtstutter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig2str_test-sig2str-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smoother_test-smoother-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket-server.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripnul-stripnul.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlist_test-strlist-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_playback-sync-playback.Po@am__quote@
@@ -3780,12 +4210,12 @@ libalsa_util_la-alsa-util.lo: modules/alsa-util.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalsa_util_la_CFLAGS) $(CFLAGS) -c -o libalsa_util_la-alsa-util.lo `test -f 'modules/alsa-util.c' || echo '$(srcdir)/'`modules/alsa-util.c
-authkey-prop.lo: pulsecore/authkey-prop.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT authkey-prop.lo -MD -MP -MF $(DEPDIR)/authkey-prop.Tpo -c -o authkey-prop.lo `test -f 'pulsecore/authkey-prop.c' || echo '$(srcdir)/'`pulsecore/authkey-prop.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/authkey-prop.Tpo $(DEPDIR)/authkey-prop.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/authkey-prop.c' object='authkey-prop.lo' libtool=yes @AMDEPBACKSLASH@
+auth-cookie.lo: pulsecore/auth-cookie.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT auth-cookie.lo -MD -MP -MF $(DEPDIR)/auth-cookie.Tpo -c -o auth-cookie.lo `test -f 'pulsecore/auth-cookie.c' || echo '$(srcdir)/'`pulsecore/auth-cookie.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/auth-cookie.Tpo $(DEPDIR)/auth-cookie.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/auth-cookie.c' object='auth-cookie.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o authkey-prop.lo `test -f 'pulsecore/authkey-prop.c' || echo '$(srcdir)/'`pulsecore/authkey-prop.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o auth-cookie.lo `test -f 'pulsecore/auth-cookie.c' || echo '$(srcdir)/'`pulsecore/auth-cookie.c
authkey.lo: pulsecore/authkey.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT authkey.lo -MD -MP -MF $(DEPDIR)/authkey.Tpo -c -o authkey.lo `test -f 'pulsecore/authkey.c' || echo '$(srcdir)/'`pulsecore/authkey.c
@@ -3801,6 +4231,20 @@ libavahi_wrap_la-avahi-wrap.lo: pulsecore/avahi-wrap.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_wrap_la_CFLAGS) $(CFLAGS) -c -o libavahi_wrap_la-avahi-wrap.lo `test -f 'pulsecore/avahi-wrap.c' || echo '$(srcdir)/'`pulsecore/avahi-wrap.c
+libbluetooth_ipc_la-ipc.lo: modules/bluetooth/ipc.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluetooth_ipc_la_CFLAGS) $(CFLAGS) -MT libbluetooth_ipc_la-ipc.lo -MD -MP -MF $(DEPDIR)/libbluetooth_ipc_la-ipc.Tpo -c -o libbluetooth_ipc_la-ipc.lo `test -f 'modules/bluetooth/ipc.c' || echo '$(srcdir)/'`modules/bluetooth/ipc.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libbluetooth_ipc_la-ipc.Tpo $(DEPDIR)/libbluetooth_ipc_la-ipc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bluetooth/ipc.c' object='libbluetooth_ipc_la-ipc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluetooth_ipc_la_CFLAGS) $(CFLAGS) -c -o libbluetooth_ipc_la-ipc.lo `test -f 'modules/bluetooth/ipc.c' || echo '$(srcdir)/'`modules/bluetooth/ipc.c
+
+libbluetooth_sbc_la-sbc.lo: modules/bluetooth/sbc.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluetooth_sbc_la_CFLAGS) $(CFLAGS) -MT libbluetooth_sbc_la-sbc.lo -MD -MP -MF $(DEPDIR)/libbluetooth_sbc_la-sbc.Tpo -c -o libbluetooth_sbc_la-sbc.lo `test -f 'modules/bluetooth/sbc.c' || echo '$(srcdir)/'`modules/bluetooth/sbc.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libbluetooth_sbc_la-sbc.Tpo $(DEPDIR)/libbluetooth_sbc_la-sbc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bluetooth/sbc.c' object='libbluetooth_sbc_la-sbc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluetooth_sbc_la_CFLAGS) $(CFLAGS) -c -o libbluetooth_sbc_la-sbc.lo `test -f 'modules/bluetooth/sbc.c' || echo '$(srcdir)/'`modules/bluetooth/sbc.c
+
libcli_la-cli.lo: pulsecore/cli.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcli_la-cli.lo -MD -MP -MF $(DEPDIR)/libcli_la-cli.Tpo -c -o libcli_la-cli.lo `test -f 'pulsecore/cli.c' || echo '$(srcdir)/'`pulsecore/cli.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libcli_la-cli.Tpo $(DEPDIR)/libcli_la-cli.Plo
@@ -3962,6 +4406,13 @@ libpulse_browse_la-log.lo: pulsecore/log.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_browse_la_CFLAGS) $(CFLAGS) -c -o libpulse_browse_la-log.lo `test -f 'pulsecore/log.c' || echo '$(srcdir)/'`pulsecore/log.c
+libpulse_browse_la-rtclock.lo: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_browse_la_CFLAGS) $(CFLAGS) -MT libpulse_browse_la-rtclock.lo -MD -MP -MF $(DEPDIR)/libpulse_browse_la-rtclock.Tpo -c -o libpulse_browse_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_browse_la-rtclock.Tpo $(DEPDIR)/libpulse_browse_la-rtclock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='libpulse_browse_la-rtclock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_browse_la_CFLAGS) $(CFLAGS) -c -o libpulse_browse_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
libpulse_browse_la-once.lo: pulsecore/once.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_browse_la_CFLAGS) $(CFLAGS) -MT libpulse_browse_la-once.lo -MD -MP -MF $(DEPDIR)/libpulse_browse_la-once.Tpo -c -o libpulse_browse_la-once.lo `test -f 'pulsecore/once.c' || echo '$(srcdir)/'`pulsecore/once.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_browse_la-once.Tpo $(DEPDIR)/libpulse_browse_la-once.Plo
@@ -4025,6 +4476,13 @@ libpulse_mainloop_glib_la-log.lo: pulsecore/log.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_mainloop_glib_la_CFLAGS) $(CFLAGS) -c -o libpulse_mainloop_glib_la-log.lo `test -f 'pulsecore/log.c' || echo '$(srcdir)/'`pulsecore/log.c
+libpulse_mainloop_glib_la-rtclock.lo: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_mainloop_glib_la_CFLAGS) $(CFLAGS) -MT libpulse_mainloop_glib_la-rtclock.lo -MD -MP -MF $(DEPDIR)/libpulse_mainloop_glib_la-rtclock.Tpo -c -o libpulse_mainloop_glib_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_mainloop_glib_la-rtclock.Tpo $(DEPDIR)/libpulse_mainloop_glib_la-rtclock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='libpulse_mainloop_glib_la-rtclock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_mainloop_glib_la_CFLAGS) $(CFLAGS) -c -o libpulse_mainloop_glib_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
libpulse_mainloop_glib_la-core-util.lo: pulsecore/core-util.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_mainloop_glib_la_CFLAGS) $(CFLAGS) -MT libpulse_mainloop_glib_la-core-util.lo -MD -MP -MF $(DEPDIR)/libpulse_mainloop_glib_la-core-util.Tpo -c -o libpulse_mainloop_glib_la-core-util.lo `test -f 'pulsecore/core-util.c' || echo '$(srcdir)/'`pulsecore/core-util.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_mainloop_glib_la-core-util.Tpo $(DEPDIR)/libpulse_mainloop_glib_la-core-util.Plo
@@ -4123,6 +4581,13 @@ libpulse_simple_la-once.lo: pulsecore/once.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_simple_la_CFLAGS) $(CFLAGS) -c -o libpulse_simple_la-once.lo `test -f 'pulsecore/once.c' || echo '$(srcdir)/'`pulsecore/once.c
+libpulse_simple_la-rtclock.lo: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_simple_la_CFLAGS) $(CFLAGS) -MT libpulse_simple_la-rtclock.lo -MD -MP -MF $(DEPDIR)/libpulse_simple_la-rtclock.Tpo -c -o libpulse_simple_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_simple_la-rtclock.Tpo $(DEPDIR)/libpulse_simple_la-rtclock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='libpulse_simple_la-rtclock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_simple_la_CFLAGS) $(CFLAGS) -c -o libpulse_simple_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
libpulse_simple_la-mutex-posix.lo: pulsecore/mutex-posix.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_simple_la_CFLAGS) $(CFLAGS) -MT libpulse_simple_la-mutex-posix.lo -MD -MP -MF $(DEPDIR)/libpulse_simple_la-mutex-posix.Tpo -c -o libpulse_simple_la-mutex-posix.lo `test -f 'pulsecore/mutex-posix.c' || echo '$(srcdir)/'`pulsecore/mutex-posix.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_simple_la-mutex-posix.Tpo $(DEPDIR)/libpulse_simple_la-mutex-posix.Plo
@@ -4298,6 +4763,27 @@ libpulse_la-xmalloc.lo: pulse/xmalloc.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o libpulse_la-xmalloc.lo `test -f 'pulse/xmalloc.c' || echo '$(srcdir)/'`pulse/xmalloc.c
+libpulse_la-proplist.lo: pulse/proplist.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT libpulse_la-proplist.lo -MD -MP -MF $(DEPDIR)/libpulse_la-proplist.Tpo -c -o libpulse_la-proplist.lo `test -f 'pulse/proplist.c' || echo '$(srcdir)/'`pulse/proplist.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_la-proplist.Tpo $(DEPDIR)/libpulse_la-proplist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulse/proplist.c' object='libpulse_la-proplist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o libpulse_la-proplist.lo `test -f 'pulse/proplist.c' || echo '$(srcdir)/'`pulse/proplist.c
+
+libpulse_la-ext-stream-restore.lo: pulse/ext-stream-restore.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT libpulse_la-ext-stream-restore.lo -MD -MP -MF $(DEPDIR)/libpulse_la-ext-stream-restore.Tpo -c -o libpulse_la-ext-stream-restore.lo `test -f 'pulse/ext-stream-restore.c' || echo '$(srcdir)/'`pulse/ext-stream-restore.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_la-ext-stream-restore.Tpo $(DEPDIR)/libpulse_la-ext-stream-restore.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulse/ext-stream-restore.c' object='libpulse_la-ext-stream-restore.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o libpulse_la-ext-stream-restore.lo `test -f 'pulse/ext-stream-restore.c' || echo '$(srcdir)/'`pulse/ext-stream-restore.c
+
+libpulse_la-i18n.lo: pulse/i18n.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT libpulse_la-i18n.lo -MD -MP -MF $(DEPDIR)/libpulse_la-i18n.Tpo -c -o libpulse_la-i18n.lo `test -f 'pulse/i18n.c' || echo '$(srcdir)/'`pulse/i18n.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_la-i18n.Tpo $(DEPDIR)/libpulse_la-i18n.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulse/i18n.c' object='libpulse_la-i18n.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o libpulse_la-i18n.lo `test -f 'pulse/i18n.c' || echo '$(srcdir)/'`pulse/i18n.c
+
libpulse_la-authkey.lo: pulsecore/authkey.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT libpulse_la-authkey.lo -MD -MP -MF $(DEPDIR)/libpulse_la-authkey.Tpo -c -o libpulse_la-authkey.lo `test -f 'pulsecore/authkey.c' || echo '$(srcdir)/'`pulsecore/authkey.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_la-authkey.Tpo $(DEPDIR)/libpulse_la-authkey.Plo
@@ -4529,6 +5015,27 @@ libpulse_la-once.lo: pulsecore/once.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o libpulse_la-once.lo `test -f 'pulsecore/once.c' || echo '$(srcdir)/'`pulsecore/once.c
+libpulse_la-rtclock.lo: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT libpulse_la-rtclock.lo -MD -MP -MF $(DEPDIR)/libpulse_la-rtclock.Tpo -c -o libpulse_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_la-rtclock.Tpo $(DEPDIR)/libpulse_la-rtclock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='libpulse_la-rtclock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o libpulse_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
+libpulse_la-time-smoother.lo: pulsecore/time-smoother.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT libpulse_la-time-smoother.lo -MD -MP -MF $(DEPDIR)/libpulse_la-time-smoother.Tpo -c -o libpulse_la-time-smoother.lo `test -f 'pulsecore/time-smoother.c' || echo '$(srcdir)/'`pulsecore/time-smoother.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_la-time-smoother.Tpo $(DEPDIR)/libpulse_la-time-smoother.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/time-smoother.c' object='libpulse_la-time-smoother.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o libpulse_la-time-smoother.lo `test -f 'pulsecore/time-smoother.c' || echo '$(srcdir)/'`pulsecore/time-smoother.c
+
+libpulse_la-proplist-util.lo: pulsecore/proplist-util.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT libpulse_la-proplist-util.lo -MD -MP -MF $(DEPDIR)/libpulse_la-proplist-util.Tpo -c -o libpulse_la-proplist-util.lo `test -f 'pulsecore/proplist-util.c' || echo '$(srcdir)/'`pulsecore/proplist-util.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_la-proplist-util.Tpo $(DEPDIR)/libpulse_la-proplist-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/proplist-util.c' object='libpulse_la-proplist-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o libpulse_la-proplist-util.lo `test -f 'pulsecore/proplist-util.c' || echo '$(srcdir)/'`pulsecore/proplist-util.c
+
libpulse_la-mutex-posix.lo: pulsecore/mutex-posix.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT libpulse_la-mutex-posix.lo -MD -MP -MF $(DEPDIR)/libpulse_la-mutex-posix.Tpo -c -o libpulse_la-mutex-posix.lo `test -f 'pulsecore/mutex-posix.c' || echo '$(srcdir)/'`pulsecore/mutex-posix.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulse_la-mutex-posix.Tpo $(DEPDIR)/libpulse_la-mutex-posix.Plo
@@ -4669,6 +5176,20 @@ libpulsecore_la-xmalloc.lo: pulse/xmalloc.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-xmalloc.lo `test -f 'pulse/xmalloc.c' || echo '$(srcdir)/'`pulse/xmalloc.c
+libpulsecore_la-proplist.lo: pulse/proplist.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-proplist.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-proplist.Tpo -c -o libpulsecore_la-proplist.lo `test -f 'pulse/proplist.c' || echo '$(srcdir)/'`pulse/proplist.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-proplist.Tpo $(DEPDIR)/libpulsecore_la-proplist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulse/proplist.c' object='libpulsecore_la-proplist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-proplist.lo `test -f 'pulse/proplist.c' || echo '$(srcdir)/'`pulse/proplist.c
+
+libpulsecore_la-i18n.lo: pulse/i18n.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-i18n.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-i18n.Tpo -c -o libpulsecore_la-i18n.lo `test -f 'pulse/i18n.c' || echo '$(srcdir)/'`pulse/i18n.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-i18n.Tpo $(DEPDIR)/libpulsecore_la-i18n.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulse/i18n.c' object='libpulsecore_la-i18n.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-i18n.lo `test -f 'pulse/i18n.c' || echo '$(srcdir)/'`pulse/i18n.c
+
libpulsecore_la-autoload.lo: pulsecore/autoload.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-autoload.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-autoload.Tpo -c -o libpulsecore_la-autoload.lo `test -f 'pulsecore/autoload.c' || echo '$(srcdir)/'`pulsecore/autoload.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-autoload.Tpo $(DEPDIR)/libpulsecore_la-autoload.Plo
@@ -4760,6 +5281,13 @@ libpulsecore_la-idxset.lo: pulsecore/idxset.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-idxset.lo `test -f 'pulsecore/idxset.c' || echo '$(srcdir)/'`pulsecore/idxset.c
+libpulsecore_la-prioq.lo: pulsecore/prioq.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-prioq.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-prioq.Tpo -c -o libpulsecore_la-prioq.lo `test -f 'pulsecore/prioq.c' || echo '$(srcdir)/'`pulsecore/prioq.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-prioq.Tpo $(DEPDIR)/libpulsecore_la-prioq.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/prioq.c' object='libpulsecore_la-prioq.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-prioq.lo `test -f 'pulsecore/prioq.c' || echo '$(srcdir)/'`pulsecore/prioq.c
+
libpulsecore_la-log.lo: pulsecore/log.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-log.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-log.Tpo -c -o libpulsecore_la-log.lo `test -f 'pulsecore/log.c' || echo '$(srcdir)/'`pulsecore/log.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-log.Tpo $(DEPDIR)/libpulsecore_la-log.Plo
@@ -4865,12 +5393,12 @@ libpulsecore_la-poll.lo: pulsecore/poll.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-poll.lo `test -f 'pulsecore/poll.c' || echo '$(srcdir)/'`pulsecore/poll.c
-libpulsecore_la-props.lo: pulsecore/props.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-props.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-props.Tpo -c -o libpulsecore_la-props.lo `test -f 'pulsecore/props.c' || echo '$(srcdir)/'`pulsecore/props.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-props.Tpo $(DEPDIR)/libpulsecore_la-props.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/props.c' object='libpulsecore_la-props.lo' libtool=yes @AMDEPBACKSLASH@
+libpulsecore_la-shared.lo: pulsecore/shared.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-shared.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-shared.Tpo -c -o libpulsecore_la-shared.lo `test -f 'pulsecore/shared.c' || echo '$(srcdir)/'`pulsecore/shared.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-shared.Tpo $(DEPDIR)/libpulsecore_la-shared.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/shared.c' object='libpulsecore_la-shared.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-props.lo `test -f 'pulsecore/props.c' || echo '$(srcdir)/'`pulsecore/props.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-shared.lo `test -f 'pulsecore/shared.c' || echo '$(srcdir)/'`pulsecore/shared.c
libpulsecore_la-queue.lo: pulsecore/queue.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-queue.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-queue.Tpo -c -o libpulsecore_la-queue.lo `test -f 'pulsecore/queue.c' || echo '$(srcdir)/'`pulsecore/queue.c
@@ -5096,6 +5624,27 @@ libpulsecore_la-start-child.lo: pulsecore/start-child.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-start-child.lo `test -f 'pulsecore/start-child.c' || echo '$(srcdir)/'`pulsecore/start-child.c
+libpulsecore_la-envelope.lo: pulsecore/envelope.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-envelope.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-envelope.Tpo -c -o libpulsecore_la-envelope.lo `test -f 'pulsecore/envelope.c' || echo '$(srcdir)/'`pulsecore/envelope.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-envelope.Tpo $(DEPDIR)/libpulsecore_la-envelope.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/envelope.c' object='libpulsecore_la-envelope.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-envelope.lo `test -f 'pulsecore/envelope.c' || echo '$(srcdir)/'`pulsecore/envelope.c
+
+libpulsecore_la-proplist-util.lo: pulsecore/proplist-util.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-proplist-util.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-proplist-util.Tpo -c -o libpulsecore_la-proplist-util.lo `test -f 'pulsecore/proplist-util.c' || echo '$(srcdir)/'`pulsecore/proplist-util.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-proplist-util.Tpo $(DEPDIR)/libpulsecore_la-proplist-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/proplist-util.c' object='libpulsecore_la-proplist-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-proplist-util.lo `test -f 'pulsecore/proplist-util.c' || echo '$(srcdir)/'`pulsecore/proplist-util.c
+
+libpulsecore_la-lock-autospawn.lo: pulsecore/lock-autospawn.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-lock-autospawn.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-lock-autospawn.Tpo -c -o libpulsecore_la-lock-autospawn.lo `test -f 'pulsecore/lock-autospawn.c' || echo '$(srcdir)/'`pulsecore/lock-autospawn.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-lock-autospawn.Tpo $(DEPDIR)/libpulsecore_la-lock-autospawn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/lock-autospawn.c' object='libpulsecore_la-lock-autospawn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpulsecore_la-lock-autospawn.lo `test -f 'pulsecore/lock-autospawn.c' || echo '$(srcdir)/'`pulsecore/lock-autospawn.c
+
libpulsecore_la-mutex-posix.lo: pulsecore/mutex-posix.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpulsecore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpulsecore_la-mutex-posix.lo -MD -MP -MF $(DEPDIR)/libpulsecore_la-mutex-posix.Tpo -c -o libpulsecore_la-mutex-posix.lo `test -f 'pulsecore/mutex-posix.c' || echo '$(srcdir)/'`pulsecore/mutex-posix.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsecore_la-mutex-posix.Tpo $(DEPDIR)/libpulsecore_la-mutex-posix.Plo
@@ -5152,6 +5701,83 @@ libpulsedsp_la-padsp.lo: utils/padsp.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-padsp.lo `test -f 'utils/padsp.c' || echo '$(srcdir)/'`utils/padsp.c
+libpulsedsp_la-core-util.lo: pulsecore/core-util.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-core-util.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-core-util.Tpo -c -o libpulsedsp_la-core-util.lo `test -f 'pulsecore/core-util.c' || echo '$(srcdir)/'`pulsecore/core-util.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-core-util.Tpo $(DEPDIR)/libpulsedsp_la-core-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/core-util.c' object='libpulsedsp_la-core-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-core-util.lo `test -f 'pulsecore/core-util.c' || echo '$(srcdir)/'`pulsecore/core-util.c
+
+libpulsedsp_la-core-error.lo: pulsecore/core-error.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-core-error.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-core-error.Tpo -c -o libpulsedsp_la-core-error.lo `test -f 'pulsecore/core-error.c' || echo '$(srcdir)/'`pulsecore/core-error.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-core-error.Tpo $(DEPDIR)/libpulsedsp_la-core-error.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/core-error.c' object='libpulsedsp_la-core-error.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-core-error.lo `test -f 'pulsecore/core-error.c' || echo '$(srcdir)/'`pulsecore/core-error.c
+
+libpulsedsp_la-log.lo: pulsecore/log.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-log.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-log.Tpo -c -o libpulsedsp_la-log.lo `test -f 'pulsecore/log.c' || echo '$(srcdir)/'`pulsecore/log.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-log.Tpo $(DEPDIR)/libpulsedsp_la-log.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/log.c' object='libpulsedsp_la-log.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-log.lo `test -f 'pulsecore/log.c' || echo '$(srcdir)/'`pulsecore/log.c
+
+libpulsedsp_la-rtclock.lo: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-rtclock.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-rtclock.Tpo -c -o libpulsedsp_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-rtclock.Tpo $(DEPDIR)/libpulsedsp_la-rtclock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='libpulsedsp_la-rtclock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-rtclock.lo `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
+libpulsedsp_la-once.lo: pulsecore/once.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-once.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-once.Tpo -c -o libpulsedsp_la-once.lo `test -f 'pulsecore/once.c' || echo '$(srcdir)/'`pulsecore/once.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-once.Tpo $(DEPDIR)/libpulsedsp_la-once.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/once.c' object='libpulsedsp_la-once.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-once.lo `test -f 'pulsecore/once.c' || echo '$(srcdir)/'`pulsecore/once.c
+
+libpulsedsp_la-mutex-posix.lo: pulsecore/mutex-posix.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-mutex-posix.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-mutex-posix.Tpo -c -o libpulsedsp_la-mutex-posix.lo `test -f 'pulsecore/mutex-posix.c' || echo '$(srcdir)/'`pulsecore/mutex-posix.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-mutex-posix.Tpo $(DEPDIR)/libpulsedsp_la-mutex-posix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/mutex-posix.c' object='libpulsedsp_la-mutex-posix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-mutex-posix.lo `test -f 'pulsecore/mutex-posix.c' || echo '$(srcdir)/'`pulsecore/mutex-posix.c
+
+libpulsedsp_la-thread-posix.lo: pulsecore/thread-posix.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-thread-posix.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-thread-posix.Tpo -c -o libpulsedsp_la-thread-posix.lo `test -f 'pulsecore/thread-posix.c' || echo '$(srcdir)/'`pulsecore/thread-posix.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-thread-posix.Tpo $(DEPDIR)/libpulsedsp_la-thread-posix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/thread-posix.c' object='libpulsedsp_la-thread-posix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-thread-posix.lo `test -f 'pulsecore/thread-posix.c' || echo '$(srcdir)/'`pulsecore/thread-posix.c
+
+libpulsedsp_la-semaphore-posix.lo: pulsecore/semaphore-posix.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-semaphore-posix.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-semaphore-posix.Tpo -c -o libpulsedsp_la-semaphore-posix.lo `test -f 'pulsecore/semaphore-posix.c' || echo '$(srcdir)/'`pulsecore/semaphore-posix.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-semaphore-posix.Tpo $(DEPDIR)/libpulsedsp_la-semaphore-posix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/semaphore-posix.c' object='libpulsedsp_la-semaphore-posix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-semaphore-posix.lo `test -f 'pulsecore/semaphore-posix.c' || echo '$(srcdir)/'`pulsecore/semaphore-posix.c
+
+libpulsedsp_la-mutex-win32.lo: pulsecore/mutex-win32.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-mutex-win32.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-mutex-win32.Tpo -c -o libpulsedsp_la-mutex-win32.lo `test -f 'pulsecore/mutex-win32.c' || echo '$(srcdir)/'`pulsecore/mutex-win32.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-mutex-win32.Tpo $(DEPDIR)/libpulsedsp_la-mutex-win32.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/mutex-win32.c' object='libpulsedsp_la-mutex-win32.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-mutex-win32.lo `test -f 'pulsecore/mutex-win32.c' || echo '$(srcdir)/'`pulsecore/mutex-win32.c
+
+libpulsedsp_la-thread-win32.lo: pulsecore/thread-win32.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-thread-win32.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-thread-win32.Tpo -c -o libpulsedsp_la-thread-win32.lo `test -f 'pulsecore/thread-win32.c' || echo '$(srcdir)/'`pulsecore/thread-win32.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-thread-win32.Tpo $(DEPDIR)/libpulsedsp_la-thread-win32.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/thread-win32.c' object='libpulsedsp_la-thread-win32.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-thread-win32.lo `test -f 'pulsecore/thread-win32.c' || echo '$(srcdir)/'`pulsecore/thread-win32.c
+
+libpulsedsp_la-semaphore-win32.lo: pulsecore/semaphore-win32.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -MT libpulsedsp_la-semaphore-win32.lo -MD -MP -MF $(DEPDIR)/libpulsedsp_la-semaphore-win32.Tpo -c -o libpulsedsp_la-semaphore-win32.lo `test -f 'pulsecore/semaphore-win32.c' || echo '$(srcdir)/'`pulsecore/semaphore-win32.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpulsedsp_la-semaphore-win32.Tpo $(DEPDIR)/libpulsedsp_la-semaphore-win32.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/semaphore-win32.c' object='libpulsedsp_la-semaphore-win32.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsedsp_la_CFLAGS) $(CFLAGS) -c -o libpulsedsp_la-semaphore-win32.lo `test -f 'pulsecore/semaphore-win32.c' || echo '$(srcdir)/'`pulsecore/semaphore-win32.c
+
rtp.lo: modules/rtp/rtp.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rtp.lo -MD -MP -MF $(DEPDIR)/rtp.Tpo -c -o rtp.lo `test -f 'modules/rtp/rtp.c' || echo '$(srcdir)/'`modules/rtp/rtp.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rtp.Tpo $(DEPDIR)/rtp.Plo
@@ -5201,20 +5827,6 @@ socket-util.lo: pulsecore/socket-util.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o socket-util.lo `test -f 'pulsecore/socket-util.c' || echo '$(srcdir)/'`pulsecore/socket-util.c
-libspeex_resampler_fixed_la-resample.lo: pulsecore/speex/resample.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspeex_resampler_fixed_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libspeex_resampler_fixed_la-resample.lo -MD -MP -MF $(DEPDIR)/libspeex_resampler_fixed_la-resample.Tpo -c -o libspeex_resampler_fixed_la-resample.lo `test -f 'pulsecore/speex/resample.c' || echo '$(srcdir)/'`pulsecore/speex/resample.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libspeex_resampler_fixed_la-resample.Tpo $(DEPDIR)/libspeex_resampler_fixed_la-resample.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/speex/resample.c' object='libspeex_resampler_fixed_la-resample.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspeex_resampler_fixed_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libspeex_resampler_fixed_la-resample.lo `test -f 'pulsecore/speex/resample.c' || echo '$(srcdir)/'`pulsecore/speex/resample.c
-
-libspeex_resampler_float_la-resample.lo: pulsecore/speex/resample.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspeex_resampler_float_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libspeex_resampler_float_la-resample.lo -MD -MP -MF $(DEPDIR)/libspeex_resampler_float_la-resample.Tpo -c -o libspeex_resampler_float_la-resample.lo `test -f 'pulsecore/speex/resample.c' || echo '$(srcdir)/'`pulsecore/speex/resample.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libspeex_resampler_float_la-resample.Tpo $(DEPDIR)/libspeex_resampler_float_la-resample.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/speex/resample.c' object='libspeex_resampler_float_la-resample.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspeex_resampler_float_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libspeex_resampler_float_la-resample.lo `test -f 'pulsecore/speex/resample.c' || echo '$(srcdir)/'`pulsecore/speex/resample.c
-
strlist.lo: pulsecore/strlist.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlist.lo -MD -MP -MF $(DEPDIR)/strlist.Tpo -c -o strlist.lo `test -f 'pulsecore/strlist.c' || echo '$(srcdir)/'`pulsecore/strlist.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/strlist.Tpo $(DEPDIR)/strlist.Plo
@@ -5257,12 +5869,33 @@ module_alsa_source_la-module-alsa-source.lo: modules/module-alsa-source.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_alsa_source_la_CFLAGS) $(CFLAGS) -c -o module_alsa_source_la-module-alsa-source.lo `test -f 'modules/module-alsa-source.c' || echo '$(srcdir)/'`modules/module-alsa-source.c
-module_bt_proximity_la-module-bt-proximity.lo: modules/module-bt-proximity.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_bt_proximity_la_CFLAGS) $(CFLAGS) -MT module_bt_proximity_la-module-bt-proximity.lo -MD -MP -MF $(DEPDIR)/module_bt_proximity_la-module-bt-proximity.Tpo -c -o module_bt_proximity_la-module-bt-proximity.lo `test -f 'modules/module-bt-proximity.c' || echo '$(srcdir)/'`modules/module-bt-proximity.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_bt_proximity_la-module-bt-proximity.Tpo $(DEPDIR)/module_bt_proximity_la-module-bt-proximity.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/module-bt-proximity.c' object='module_bt_proximity_la-module-bt-proximity.lo' libtool=yes @AMDEPBACKSLASH@
+module_always_sink_la-module-always-sink.lo: modules/module-always-sink.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_always_sink_la_CFLAGS) $(CFLAGS) -MT module_always_sink_la-module-always-sink.lo -MD -MP -MF $(DEPDIR)/module_always_sink_la-module-always-sink.Tpo -c -o module_always_sink_la-module-always-sink.lo `test -f 'modules/module-always-sink.c' || echo '$(srcdir)/'`modules/module-always-sink.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_always_sink_la-module-always-sink.Tpo $(DEPDIR)/module_always_sink_la-module-always-sink.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/module-always-sink.c' object='module_always_sink_la-module-always-sink.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_bt_proximity_la_CFLAGS) $(CFLAGS) -c -o module_bt_proximity_la-module-bt-proximity.lo `test -f 'modules/module-bt-proximity.c' || echo '$(srcdir)/'`modules/module-bt-proximity.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_always_sink_la_CFLAGS) $(CFLAGS) -c -o module_always_sink_la-module-always-sink.lo `test -f 'modules/module-always-sink.c' || echo '$(srcdir)/'`modules/module-always-sink.c
+
+module_bluetooth_device_la-module-bluetooth-device.lo: modules/bluetooth/module-bluetooth-device.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_bluetooth_device_la_CFLAGS) $(CFLAGS) -MT module_bluetooth_device_la-module-bluetooth-device.lo -MD -MP -MF $(DEPDIR)/module_bluetooth_device_la-module-bluetooth-device.Tpo -c -o module_bluetooth_device_la-module-bluetooth-device.lo `test -f 'modules/bluetooth/module-bluetooth-device.c' || echo '$(srcdir)/'`modules/bluetooth/module-bluetooth-device.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_bluetooth_device_la-module-bluetooth-device.Tpo $(DEPDIR)/module_bluetooth_device_la-module-bluetooth-device.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bluetooth/module-bluetooth-device.c' object='module_bluetooth_device_la-module-bluetooth-device.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_bluetooth_device_la_CFLAGS) $(CFLAGS) -c -o module_bluetooth_device_la-module-bluetooth-device.lo `test -f 'modules/bluetooth/module-bluetooth-device.c' || echo '$(srcdir)/'`modules/bluetooth/module-bluetooth-device.c
+
+module_bluetooth_discover_la-module-bluetooth-discover.lo: modules/bluetooth/module-bluetooth-discover.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_bluetooth_discover_la_CFLAGS) $(CFLAGS) -MT module_bluetooth_discover_la-module-bluetooth-discover.lo -MD -MP -MF $(DEPDIR)/module_bluetooth_discover_la-module-bluetooth-discover.Tpo -c -o module_bluetooth_discover_la-module-bluetooth-discover.lo `test -f 'modules/bluetooth/module-bluetooth-discover.c' || echo '$(srcdir)/'`modules/bluetooth/module-bluetooth-discover.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_bluetooth_discover_la-module-bluetooth-discover.Tpo $(DEPDIR)/module_bluetooth_discover_la-module-bluetooth-discover.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bluetooth/module-bluetooth-discover.c' object='module_bluetooth_discover_la-module-bluetooth-discover.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_bluetooth_discover_la_CFLAGS) $(CFLAGS) -c -o module_bluetooth_discover_la-module-bluetooth-discover.lo `test -f 'modules/bluetooth/module-bluetooth-discover.c' || echo '$(srcdir)/'`modules/bluetooth/module-bluetooth-discover.c
+
+module_bluetooth_proximity_la-module-bluetooth-proximity.lo: modules/bluetooth/module-bluetooth-proximity.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_bluetooth_proximity_la_CFLAGS) $(CFLAGS) -MT module_bluetooth_proximity_la-module-bluetooth-proximity.lo -MD -MP -MF $(DEPDIR)/module_bluetooth_proximity_la-module-bluetooth-proximity.Tpo -c -o module_bluetooth_proximity_la-module-bluetooth-proximity.lo `test -f 'modules/bluetooth/module-bluetooth-proximity.c' || echo '$(srcdir)/'`modules/bluetooth/module-bluetooth-proximity.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_bluetooth_proximity_la-module-bluetooth-proximity.Tpo $(DEPDIR)/module_bluetooth_proximity_la-module-bluetooth-proximity.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bluetooth/module-bluetooth-proximity.c' object='module_bluetooth_proximity_la-module-bluetooth-proximity.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_bluetooth_proximity_la_CFLAGS) $(CFLAGS) -c -o module_bluetooth_proximity_la-module-bluetooth-proximity.lo `test -f 'modules/bluetooth/module-bluetooth-proximity.c' || echo '$(srcdir)/'`modules/bluetooth/module-bluetooth-proximity.c
module_cli_protocol_tcp_la-module-protocol-stub.lo: modules/module-protocol-stub.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_cli_protocol_tcp_la_CFLAGS) $(CFLAGS) -MT module_cli_protocol_tcp_la-module-protocol-stub.lo -MD -MP -MF $(DEPDIR)/module_cli_protocol_tcp_la-module-protocol-stub.Tpo -c -o module_cli_protocol_tcp_la-module-protocol-stub.lo `test -f 'modules/module-protocol-stub.c' || echo '$(srcdir)/'`modules/module-protocol-stub.c
@@ -5292,6 +5925,13 @@ module-combine.lo: modules/module-combine.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module-combine.lo `test -f 'modules/module-combine.c' || echo '$(srcdir)/'`modules/module-combine.c
+module_console_kit_la-module-console-kit.lo: modules/module-console-kit.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_console_kit_la_CFLAGS) $(CFLAGS) -MT module_console_kit_la-module-console-kit.lo -MD -MP -MF $(DEPDIR)/module_console_kit_la-module-console-kit.Tpo -c -o module_console_kit_la-module-console-kit.lo `test -f 'modules/module-console-kit.c' || echo '$(srcdir)/'`modules/module-console-kit.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_console_kit_la-module-console-kit.Tpo $(DEPDIR)/module_console_kit_la-module-console-kit.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/module-console-kit.c' object='module_console_kit_la-module-console-kit.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_console_kit_la_CFLAGS) $(CFLAGS) -c -o module_console_kit_la-module-console-kit.lo `test -f 'modules/module-console-kit.c' || echo '$(srcdir)/'`modules/module-console-kit.c
+
module_default_device_restore_la-module-default-device-restore.lo: modules/module-default-device-restore.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_default_device_restore_la_CFLAGS) $(CFLAGS) -MT module_default_device_restore_la-module-default-device-restore.lo -MD -MP -MF $(DEPDIR)/module_default_device_restore_la-module-default-device-restore.Tpo -c -o module_default_device_restore_la-module-default-device-restore.lo `test -f 'modules/module-default-device-restore.c' || echo '$(srcdir)/'`modules/module-default-device-restore.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_default_device_restore_la-module-default-device-restore.Tpo $(DEPDIR)/module_default_device_restore_la-module-default-device-restore.Plo
@@ -5306,6 +5946,13 @@ module_detect_la-module-detect.lo: modules/module-detect.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_detect_la_CFLAGS) $(CFLAGS) -c -o module_detect_la-module-detect.lo `test -f 'modules/module-detect.c' || echo '$(srcdir)/'`modules/module-detect.c
+module_device_restore_la-module-device-restore.lo: modules/module-device-restore.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_device_restore_la_CFLAGS) $(CFLAGS) -MT module_device_restore_la-module-device-restore.lo -MD -MP -MF $(DEPDIR)/module_device_restore_la-module-device-restore.Tpo -c -o module_device_restore_la-module-device-restore.lo `test -f 'modules/module-device-restore.c' || echo '$(srcdir)/'`modules/module-device-restore.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_device_restore_la-module-device-restore.Tpo $(DEPDIR)/module_device_restore_la-module-device-restore.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/module-device-restore.c' object='module_device_restore_la-module-device-restore.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_device_restore_la_CFLAGS) $(CFLAGS) -c -o module_device_restore_la-module-device-restore.lo `test -f 'modules/module-device-restore.c' || echo '$(srcdir)/'`modules/module-device-restore.c
+
module-esound-compat-spawnfd.lo: modules/module-esound-compat-spawnfd.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module-esound-compat-spawnfd.lo -MD -MP -MF $(DEPDIR)/module-esound-compat-spawnfd.Tpo -c -o module-esound-compat-spawnfd.lo `test -f 'modules/module-esound-compat-spawnfd.c' || echo '$(srcdir)/'`modules/module-esound-compat-spawnfd.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module-esound-compat-spawnfd.Tpo $(DEPDIR)/module-esound-compat-spawnfd.Plo
@@ -5460,6 +6107,13 @@ module-pipe-source.lo: modules/module-pipe-source.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module-pipe-source.lo `test -f 'modules/module-pipe-source.c' || echo '$(srcdir)/'`modules/module-pipe-source.c
+module-position-event-sounds.lo: modules/module-position-event-sounds.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module-position-event-sounds.lo -MD -MP -MF $(DEPDIR)/module-position-event-sounds.Tpo -c -o module-position-event-sounds.lo `test -f 'modules/module-position-event-sounds.c' || echo '$(srcdir)/'`modules/module-position-event-sounds.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module-position-event-sounds.Tpo $(DEPDIR)/module-position-event-sounds.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/module-position-event-sounds.c' object='module-position-event-sounds.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module-position-event-sounds.lo `test -f 'modules/module-position-event-sounds.c' || echo '$(srcdir)/'`modules/module-position-event-sounds.c
+
module-remap-sink.lo: modules/module-remap-sink.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module-remap-sink.lo -MD -MP -MF $(DEPDIR)/module-remap-sink.Tpo -c -o module-remap-sink.lo `test -f 'modules/module-remap-sink.c' || echo '$(srcdir)/'`modules/module-remap-sink.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module-remap-sink.Tpo $(DEPDIR)/module-remap-sink.Plo
@@ -5516,6 +6170,13 @@ module-solaris.lo: modules/module-solaris.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module-solaris.lo `test -f 'modules/module-solaris.c' || echo '$(srcdir)/'`modules/module-solaris.c
+module_stream_restore_la-module-stream-restore.lo: modules/module-stream-restore.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_stream_restore_la_CFLAGS) $(CFLAGS) -MT module_stream_restore_la-module-stream-restore.lo -MD -MP -MF $(DEPDIR)/module_stream_restore_la-module-stream-restore.Tpo -c -o module_stream_restore_la-module-stream-restore.lo `test -f 'modules/module-stream-restore.c' || echo '$(srcdir)/'`modules/module-stream-restore.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_stream_restore_la-module-stream-restore.Tpo $(DEPDIR)/module_stream_restore_la-module-stream-restore.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/module-stream-restore.c' object='module_stream_restore_la-module-stream-restore.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_stream_restore_la_CFLAGS) $(CFLAGS) -c -o module_stream_restore_la-module-stream-restore.lo `test -f 'modules/module-stream-restore.c' || echo '$(srcdir)/'`modules/module-stream-restore.c
+
module_suspend_on_idle_la-module-suspend-on-idle.lo: modules/module-suspend-on-idle.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_suspend_on_idle_la_CFLAGS) $(CFLAGS) -MT module_suspend_on_idle_la-module-suspend-on-idle.lo -MD -MP -MF $(DEPDIR)/module_suspend_on_idle_la-module-suspend-on-idle.Tpo -c -o module_suspend_on_idle_la-module-suspend-on-idle.lo `test -f 'modules/module-suspend-on-idle.c' || echo '$(srcdir)/'`modules/module-suspend-on-idle.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/module_suspend_on_idle_la-module-suspend-on-idle.Tpo $(DEPDIR)/module_suspend_on_idle_la-module-suspend-on-idle.Plo
@@ -5607,20 +6268,6 @@ asyncq_test-asyncq-test.obj: tests/asyncq-test.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(asyncq_test_CFLAGS) $(CFLAGS) -c -o asyncq_test-asyncq-test.obj `if test -f 'tests/asyncq-test.c'; then $(CYGPATH_W) 'tests/asyncq-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/asyncq-test.c'; fi`
-bt_proximity_helper-bt-proximity-helper.o: modules/bt-proximity-helper.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bt_proximity_helper_CFLAGS) $(CFLAGS) -MT bt_proximity_helper-bt-proximity-helper.o -MD -MP -MF $(DEPDIR)/bt_proximity_helper-bt-proximity-helper.Tpo -c -o bt_proximity_helper-bt-proximity-helper.o `test -f 'modules/bt-proximity-helper.c' || echo '$(srcdir)/'`modules/bt-proximity-helper.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bt_proximity_helper-bt-proximity-helper.Tpo $(DEPDIR)/bt_proximity_helper-bt-proximity-helper.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bt-proximity-helper.c' object='bt_proximity_helper-bt-proximity-helper.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bt_proximity_helper_CFLAGS) $(CFLAGS) -c -o bt_proximity_helper-bt-proximity-helper.o `test -f 'modules/bt-proximity-helper.c' || echo '$(srcdir)/'`modules/bt-proximity-helper.c
-
-bt_proximity_helper-bt-proximity-helper.obj: modules/bt-proximity-helper.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bt_proximity_helper_CFLAGS) $(CFLAGS) -MT bt_proximity_helper-bt-proximity-helper.obj -MD -MP -MF $(DEPDIR)/bt_proximity_helper-bt-proximity-helper.Tpo -c -o bt_proximity_helper-bt-proximity-helper.obj `if test -f 'modules/bt-proximity-helper.c'; then $(CYGPATH_W) 'modules/bt-proximity-helper.c'; else $(CYGPATH_W) '$(srcdir)/modules/bt-proximity-helper.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bt_proximity_helper-bt-proximity-helper.Tpo $(DEPDIR)/bt_proximity_helper-bt-proximity-helper.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bt-proximity-helper.c' object='bt_proximity_helper-bt-proximity-helper.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bt_proximity_helper_CFLAGS) $(CFLAGS) -c -o bt_proximity_helper-bt-proximity-helper.obj `if test -f 'modules/bt-proximity-helper.c'; then $(CYGPATH_W) 'modules/bt-proximity-helper.c'; else $(CYGPATH_W) '$(srcdir)/modules/bt-proximity-helper.c'; fi`
-
channelmap_test-channelmap-test.o: tests/channelmap-test.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(channelmap_test_CFLAGS) $(CFLAGS) -MT channelmap_test-channelmap-test.o -MD -MP -MF $(DEPDIR)/channelmap_test-channelmap-test.Tpo -c -o channelmap_test-channelmap-test.o `test -f 'tests/channelmap-test.c' || echo '$(srcdir)/'`tests/channelmap-test.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/channelmap_test-channelmap-test.Tpo $(DEPDIR)/channelmap_test-channelmap-test.Po
@@ -5635,6 +6282,20 @@ channelmap_test-channelmap-test.obj: tests/channelmap-test.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(channelmap_test_CFLAGS) $(CFLAGS) -c -o channelmap_test-channelmap-test.obj `if test -f 'tests/channelmap-test.c'; then $(CYGPATH_W) 'tests/channelmap-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/channelmap-test.c'; fi`
+close_test-close-test.o: tests/close-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(close_test_CFLAGS) $(CFLAGS) -MT close_test-close-test.o -MD -MP -MF $(DEPDIR)/close_test-close-test.Tpo -c -o close_test-close-test.o `test -f 'tests/close-test.c' || echo '$(srcdir)/'`tests/close-test.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/close_test-close-test.Tpo $(DEPDIR)/close_test-close-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/close-test.c' object='close_test-close-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(close_test_CFLAGS) $(CFLAGS) -c -o close_test-close-test.o `test -f 'tests/close-test.c' || echo '$(srcdir)/'`tests/close-test.c
+
+close_test-close-test.obj: tests/close-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(close_test_CFLAGS) $(CFLAGS) -MT close_test-close-test.obj -MD -MP -MF $(DEPDIR)/close_test-close-test.Tpo -c -o close_test-close-test.obj `if test -f 'tests/close-test.c'; then $(CYGPATH_W) 'tests/close-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/close-test.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/close_test-close-test.Tpo $(DEPDIR)/close_test-close-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/close-test.c' object='close_test-close-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(close_test_CFLAGS) $(CFLAGS) -c -o close_test-close-test.obj `if test -f 'tests/close-test.c'; then $(CYGPATH_W) 'tests/close-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/close-test.c'; fi`
+
cpulimit_test-cpulimit-test.o: tests/cpulimit-test.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpulimit_test_CFLAGS) $(CFLAGS) -MT cpulimit_test-cpulimit-test.o -MD -MP -MF $(DEPDIR)/cpulimit_test-cpulimit-test.Tpo -c -o cpulimit_test-cpulimit-test.o `test -f 'tests/cpulimit-test.c' || echo '$(srcdir)/'`tests/cpulimit-test.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cpulimit_test-cpulimit-test.Tpo $(DEPDIR)/cpulimit_test-cpulimit-test.Po
@@ -5691,6 +6352,20 @@ cpulimit_test2-cpulimit.obj: daemon/cpulimit.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpulimit_test2_CFLAGS) $(CFLAGS) -c -o cpulimit_test2-cpulimit.obj `if test -f 'daemon/cpulimit.c'; then $(CYGPATH_W) 'daemon/cpulimit.c'; else $(CYGPATH_W) '$(srcdir)/daemon/cpulimit.c'; fi`
+envelope_test-envelope-test.o: tests/envelope-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(envelope_test_CFLAGS) $(CFLAGS) -MT envelope_test-envelope-test.o -MD -MP -MF $(DEPDIR)/envelope_test-envelope-test.Tpo -c -o envelope_test-envelope-test.o `test -f 'tests/envelope-test.c' || echo '$(srcdir)/'`tests/envelope-test.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/envelope_test-envelope-test.Tpo $(DEPDIR)/envelope_test-envelope-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/envelope-test.c' object='envelope_test-envelope-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(envelope_test_CFLAGS) $(CFLAGS) -c -o envelope_test-envelope-test.o `test -f 'tests/envelope-test.c' || echo '$(srcdir)/'`tests/envelope-test.c
+
+envelope_test-envelope-test.obj: tests/envelope-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(envelope_test_CFLAGS) $(CFLAGS) -MT envelope_test-envelope-test.obj -MD -MP -MF $(DEPDIR)/envelope_test-envelope-test.Tpo -c -o envelope_test-envelope-test.obj `if test -f 'tests/envelope-test.c'; then $(CYGPATH_W) 'tests/envelope-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/envelope-test.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/envelope_test-envelope-test.Tpo $(DEPDIR)/envelope_test-envelope-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/envelope-test.c' object='envelope_test-envelope-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(envelope_test_CFLAGS) $(CFLAGS) -c -o envelope_test-envelope-test.obj `if test -f 'tests/envelope-test.c'; then $(CYGPATH_W) 'tests/envelope-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/envelope-test.c'; fi`
+
flist_test-flist-test.o: tests/flist-test.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(flist_test_CFLAGS) $(CFLAGS) -MT flist_test-flist-test.o -MD -MP -MF $(DEPDIR)/flist_test-flist-test.Tpo -c -o flist_test-flist-test.o `test -f 'tests/flist-test.c' || echo '$(srcdir)/'`tests/flist-test.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/flist_test-flist-test.Tpo $(DEPDIR)/flist_test-flist-test.Po
@@ -5803,6 +6478,20 @@ ipacl_test-inet_pton.obj: pulsecore/inet_pton.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipacl_test_CFLAGS) $(CFLAGS) -c -o ipacl_test-inet_pton.obj `if test -f 'pulsecore/inet_pton.c'; then $(CYGPATH_W) 'pulsecore/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/inet_pton.c'; fi`
+lock_autospawn_test-lock-autospawn-test.o: tests/lock-autospawn-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lock_autospawn_test_CFLAGS) $(CFLAGS) -MT lock_autospawn_test-lock-autospawn-test.o -MD -MP -MF $(DEPDIR)/lock_autospawn_test-lock-autospawn-test.Tpo -c -o lock_autospawn_test-lock-autospawn-test.o `test -f 'tests/lock-autospawn-test.c' || echo '$(srcdir)/'`tests/lock-autospawn-test.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/lock_autospawn_test-lock-autospawn-test.Tpo $(DEPDIR)/lock_autospawn_test-lock-autospawn-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/lock-autospawn-test.c' object='lock_autospawn_test-lock-autospawn-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lock_autospawn_test_CFLAGS) $(CFLAGS) -c -o lock_autospawn_test-lock-autospawn-test.o `test -f 'tests/lock-autospawn-test.c' || echo '$(srcdir)/'`tests/lock-autospawn-test.c
+
+lock_autospawn_test-lock-autospawn-test.obj: tests/lock-autospawn-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lock_autospawn_test_CFLAGS) $(CFLAGS) -MT lock_autospawn_test-lock-autospawn-test.obj -MD -MP -MF $(DEPDIR)/lock_autospawn_test-lock-autospawn-test.Tpo -c -o lock_autospawn_test-lock-autospawn-test.obj `if test -f 'tests/lock-autospawn-test.c'; then $(CYGPATH_W) 'tests/lock-autospawn-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/lock-autospawn-test.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/lock_autospawn_test-lock-autospawn-test.Tpo $(DEPDIR)/lock_autospawn_test-lock-autospawn-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/lock-autospawn-test.c' object='lock_autospawn_test-lock-autospawn-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lock_autospawn_test_CFLAGS) $(CFLAGS) -c -o lock_autospawn_test-lock-autospawn-test.obj `if test -f 'tests/lock-autospawn-test.c'; then $(CYGPATH_W) 'tests/lock-autospawn-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/lock-autospawn-test.c'; fi`
+
mainloop_test-mainloop-test.o: tests/mainloop-test.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mainloop_test_CFLAGS) $(CFLAGS) -MT mainloop_test-mainloop-test.o -MD -MP -MF $(DEPDIR)/mainloop_test-mainloop-test.Tpo -c -o mainloop_test-mainloop-test.o `test -f 'tests/mainloop-test.c' || echo '$(srcdir)/'`tests/mainloop-test.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mainloop_test-mainloop-test.Tpo $(DEPDIR)/mainloop_test-mainloop-test.Po
@@ -5999,6 +6688,20 @@ pacmd-log.obj: pulsecore/log.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pacmd_CFLAGS) $(CFLAGS) -c -o pacmd-log.obj `if test -f 'pulsecore/log.c'; then $(CYGPATH_W) 'pulsecore/log.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/log.c'; fi`
+pacmd-rtclock.o: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pacmd_CFLAGS) $(CFLAGS) -MT pacmd-rtclock.o -MD -MP -MF $(DEPDIR)/pacmd-rtclock.Tpo -c -o pacmd-rtclock.o `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pacmd-rtclock.Tpo $(DEPDIR)/pacmd-rtclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='pacmd-rtclock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pacmd_CFLAGS) $(CFLAGS) -c -o pacmd-rtclock.o `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
+pacmd-rtclock.obj: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pacmd_CFLAGS) $(CFLAGS) -MT pacmd-rtclock.obj -MD -MP -MF $(DEPDIR)/pacmd-rtclock.Tpo -c -o pacmd-rtclock.obj `if test -f 'pulsecore/rtclock.c'; then $(CYGPATH_W) 'pulsecore/rtclock.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/rtclock.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pacmd-rtclock.Tpo $(DEPDIR)/pacmd-rtclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='pacmd-rtclock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pacmd_CFLAGS) $(CFLAGS) -c -o pacmd-rtclock.obj `if test -f 'pulsecore/rtclock.c'; then $(CYGPATH_W) 'pulsecore/rtclock.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/rtclock.c'; fi`
+
pacmd-once.o: pulsecore/once.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pacmd_CFLAGS) $(CFLAGS) -MT pacmd-once.o -MD -MP -MF $(DEPDIR)/pacmd-once.Tpo -c -o pacmd-once.o `test -f 'pulsecore/once.c' || echo '$(srcdir)/'`pulsecore/once.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pacmd-once.Tpo $(DEPDIR)/pacmd-once.Po
@@ -6153,6 +6856,20 @@ pactl-log.obj: pulsecore/log.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pactl_CFLAGS) $(CFLAGS) -c -o pactl-log.obj `if test -f 'pulsecore/log.c'; then $(CYGPATH_W) 'pulsecore/log.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/log.c'; fi`
+pactl-rtclock.o: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pactl_CFLAGS) $(CFLAGS) -MT pactl-rtclock.o -MD -MP -MF $(DEPDIR)/pactl-rtclock.Tpo -c -o pactl-rtclock.o `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pactl-rtclock.Tpo $(DEPDIR)/pactl-rtclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='pactl-rtclock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pactl_CFLAGS) $(CFLAGS) -c -o pactl-rtclock.o `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
+pactl-rtclock.obj: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pactl_CFLAGS) $(CFLAGS) -MT pactl-rtclock.obj -MD -MP -MF $(DEPDIR)/pactl-rtclock.Tpo -c -o pactl-rtclock.obj `if test -f 'pulsecore/rtclock.c'; then $(CYGPATH_W) 'pulsecore/rtclock.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/rtclock.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pactl-rtclock.Tpo $(DEPDIR)/pactl-rtclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='pactl-rtclock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pactl_CFLAGS) $(CFLAGS) -c -o pactl-rtclock.obj `if test -f 'pulsecore/rtclock.c'; then $(CYGPATH_W) 'pulsecore/rtclock.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/rtclock.c'; fi`
+
pactl-once.o: pulsecore/once.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pactl_CFLAGS) $(CFLAGS) -MT pactl-once.o -MD -MP -MF $(DEPDIR)/pactl-once.Tpo -c -o pactl-once.o `test -f 'pulsecore/once.c' || echo '$(srcdir)/'`pulsecore/once.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pactl-once.Tpo $(DEPDIR)/pactl-once.Po
@@ -6335,6 +7052,20 @@ pasuspender-log.obj: pulsecore/log.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pasuspender_CFLAGS) $(CFLAGS) -c -o pasuspender-log.obj `if test -f 'pulsecore/log.c'; then $(CYGPATH_W) 'pulsecore/log.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/log.c'; fi`
+pasuspender-rtclock.o: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pasuspender_CFLAGS) $(CFLAGS) -MT pasuspender-rtclock.o -MD -MP -MF $(DEPDIR)/pasuspender-rtclock.Tpo -c -o pasuspender-rtclock.o `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pasuspender-rtclock.Tpo $(DEPDIR)/pasuspender-rtclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='pasuspender-rtclock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pasuspender_CFLAGS) $(CFLAGS) -c -o pasuspender-rtclock.o `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
+pasuspender-rtclock.obj: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pasuspender_CFLAGS) $(CFLAGS) -MT pasuspender-rtclock.obj -MD -MP -MF $(DEPDIR)/pasuspender-rtclock.Tpo -c -o pasuspender-rtclock.obj `if test -f 'pulsecore/rtclock.c'; then $(CYGPATH_W) 'pulsecore/rtclock.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/rtclock.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pasuspender-rtclock.Tpo $(DEPDIR)/pasuspender-rtclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='pasuspender-rtclock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pasuspender_CFLAGS) $(CFLAGS) -c -o pasuspender-rtclock.obj `if test -f 'pulsecore/rtclock.c'; then $(CYGPATH_W) 'pulsecore/rtclock.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/rtclock.c'; fi`
+
pasuspender-once.o: pulsecore/once.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pasuspender_CFLAGS) $(CFLAGS) -MT pasuspender-once.o -MD -MP -MF $(DEPDIR)/pasuspender-once.Tpo -c -o pasuspender-once.o `test -f 'pulsecore/once.c' || echo '$(srcdir)/'`pulsecore/once.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pasuspender-once.Tpo $(DEPDIR)/pasuspender-once.Po
@@ -6517,6 +7248,20 @@ pax11publish-conf-parser.obj: pulsecore/conf-parser.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pax11publish_CFLAGS) $(CFLAGS) -c -o pax11publish-conf-parser.obj `if test -f 'pulsecore/conf-parser.c'; then $(CYGPATH_W) 'pulsecore/conf-parser.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/conf-parser.c'; fi`
+pax11publish-rtclock.o: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pax11publish_CFLAGS) $(CFLAGS) -MT pax11publish-rtclock.o -MD -MP -MF $(DEPDIR)/pax11publish-rtclock.Tpo -c -o pax11publish-rtclock.o `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pax11publish-rtclock.Tpo $(DEPDIR)/pax11publish-rtclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='pax11publish-rtclock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pax11publish_CFLAGS) $(CFLAGS) -c -o pax11publish-rtclock.o `test -f 'pulsecore/rtclock.c' || echo '$(srcdir)/'`pulsecore/rtclock.c
+
+pax11publish-rtclock.obj: pulsecore/rtclock.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pax11publish_CFLAGS) $(CFLAGS) -MT pax11publish-rtclock.obj -MD -MP -MF $(DEPDIR)/pax11publish-rtclock.Tpo -c -o pax11publish-rtclock.obj `if test -f 'pulsecore/rtclock.c'; then $(CYGPATH_W) 'pulsecore/rtclock.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/rtclock.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pax11publish-rtclock.Tpo $(DEPDIR)/pax11publish-rtclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulsecore/rtclock.c' object='pax11publish-rtclock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pax11publish_CFLAGS) $(CFLAGS) -c -o pax11publish-rtclock.obj `if test -f 'pulsecore/rtclock.c'; then $(CYGPATH_W) 'pulsecore/rtclock.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/rtclock.c'; fi`
+
pax11publish-core-util.o: pulsecore/core-util.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pax11publish_CFLAGS) $(CFLAGS) -MT pax11publish-core-util.o -MD -MP -MF $(DEPDIR)/pax11publish-core-util.Tpo -c -o pax11publish-core-util.o `test -f 'pulsecore/core-util.c' || echo '$(srcdir)/'`pulsecore/core-util.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pax11publish-core-util.Tpo $(DEPDIR)/pax11publish-core-util.Po
@@ -6657,6 +7402,48 @@ pax11publish-semaphore-win32.obj: pulsecore/semaphore-win32.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pax11publish_CFLAGS) $(CFLAGS) -c -o pax11publish-semaphore-win32.obj `if test -f 'pulsecore/semaphore-win32.c'; then $(CYGPATH_W) 'pulsecore/semaphore-win32.c'; else $(CYGPATH_W) '$(srcdir)/pulsecore/semaphore-win32.c'; fi`
+prioq_test-prioq-test.o: tests/prioq-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -MT prioq_test-prioq-test.o -MD -MP -MF $(DEPDIR)/prioq_test-prioq-test.Tpo -c -o prioq_test-prioq-test.o `test -f 'tests/prioq-test.c' || echo '$(srcdir)/'`tests/prioq-test.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/prioq_test-prioq-test.Tpo $(DEPDIR)/prioq_test-prioq-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/prioq-test.c' object='prioq_test-prioq-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -c -o prioq_test-prioq-test.o `test -f 'tests/prioq-test.c' || echo '$(srcdir)/'`tests/prioq-test.c
+
+prioq_test-prioq-test.obj: tests/prioq-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -MT prioq_test-prioq-test.obj -MD -MP -MF $(DEPDIR)/prioq_test-prioq-test.Tpo -c -o prioq_test-prioq-test.obj `if test -f 'tests/prioq-test.c'; then $(CYGPATH_W) 'tests/prioq-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/prioq-test.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/prioq_test-prioq-test.Tpo $(DEPDIR)/prioq_test-prioq-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/prioq-test.c' object='prioq_test-prioq-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -c -o prioq_test-prioq-test.obj `if test -f 'tests/prioq-test.c'; then $(CYGPATH_W) 'tests/prioq-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/prioq-test.c'; fi`
+
+proplist_test-proplist-test.o: tests/proplist-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proplist_test_CFLAGS) $(CFLAGS) -MT proplist_test-proplist-test.o -MD -MP -MF $(DEPDIR)/proplist_test-proplist-test.Tpo -c -o proplist_test-proplist-test.o `test -f 'tests/proplist-test.c' || echo '$(srcdir)/'`tests/proplist-test.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/proplist_test-proplist-test.Tpo $(DEPDIR)/proplist_test-proplist-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/proplist-test.c' object='proplist_test-proplist-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proplist_test_CFLAGS) $(CFLAGS) -c -o proplist_test-proplist-test.o `test -f 'tests/proplist-test.c' || echo '$(srcdir)/'`tests/proplist-test.c
+
+proplist_test-proplist-test.obj: tests/proplist-test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proplist_test_CFLAGS) $(CFLAGS) -MT proplist_test-proplist-test.obj -MD -MP -MF $(DEPDIR)/proplist_test-proplist-test.Tpo -c -o proplist_test-proplist-test.obj `if test -f 'tests/proplist-test.c'; then $(CYGPATH_W) 'tests/proplist-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/proplist-test.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/proplist_test-proplist-test.Tpo $(DEPDIR)/proplist_test-proplist-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/proplist-test.c' object='proplist_test-proplist-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proplist_test_CFLAGS) $(CFLAGS) -c -o proplist_test-proplist-test.obj `if test -f 'tests/proplist-test.c'; then $(CYGPATH_W) 'tests/proplist-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/proplist-test.c'; fi`
+
+proximity_helper-proximity-helper.o: modules/bluetooth/proximity-helper.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proximity_helper_CFLAGS) $(CFLAGS) -MT proximity_helper-proximity-helper.o -MD -MP -MF $(DEPDIR)/proximity_helper-proximity-helper.Tpo -c -o proximity_helper-proximity-helper.o `test -f 'modules/bluetooth/proximity-helper.c' || echo '$(srcdir)/'`modules/bluetooth/proximity-helper.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/proximity_helper-proximity-helper.Tpo $(DEPDIR)/proximity_helper-proximity-helper.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bluetooth/proximity-helper.c' object='proximity_helper-proximity-helper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proximity_helper_CFLAGS) $(CFLAGS) -c -o proximity_helper-proximity-helper.o `test -f 'modules/bluetooth/proximity-helper.c' || echo '$(srcdir)/'`modules/bluetooth/proximity-helper.c
+
+proximity_helper-proximity-helper.obj: modules/bluetooth/proximity-helper.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proximity_helper_CFLAGS) $(CFLAGS) -MT proximity_helper-proximity-helper.obj -MD -MP -MF $(DEPDIR)/proximity_helper-proximity-helper.Tpo -c -o proximity_helper-proximity-helper.obj `if test -f 'modules/bluetooth/proximity-helper.c'; then $(CYGPATH_W) 'modules/bluetooth/proximity-helper.c'; else $(CYGPATH_W) '$(srcdir)/modules/bluetooth/proximity-helper.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/proximity_helper-proximity-helper.Tpo $(DEPDIR)/proximity_helper-proximity-helper.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='modules/bluetooth/proximity-helper.c' object='proximity_helper-proximity-helper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proximity_helper_CFLAGS) $(CFLAGS) -c -o proximity_helper-proximity-helper.obj `if test -f 'modules/bluetooth/proximity-helper.c'; then $(CYGPATH_W) 'modules/bluetooth/proximity-helper.c'; else $(CYGPATH_W) '$(srcdir)/modules/bluetooth/proximity-helper.c'; fi`
+
pulseaudio-caps.o: daemon/caps.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pulseaudio_CPPFLAGS) $(CPPFLAGS) $(pulseaudio_CFLAGS) $(CFLAGS) -MT pulseaudio-caps.o -MD -MP -MF $(DEPDIR)/pulseaudio-caps.Tpo -c -o pulseaudio-caps.o `test -f 'daemon/caps.c' || echo '$(srcdir)/'`daemon/caps.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pulseaudio-caps.Tpo $(DEPDIR)/pulseaudio-caps.Po
@@ -6825,6 +7612,20 @@ rtpoll_test-rtpoll-test.obj: tests/rtpoll-test.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtpoll_test_CFLAGS) $(CFLAGS) -c -o rtpoll_test-rtpoll-test.obj `if test -f 'tests/rtpoll-test.c'; then $(CYGPATH_W) 'tests/rtpoll-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/rtpoll-test.c'; fi`
+rtstutter-rtstutter.o: tests/rtstutter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtstutter_CFLAGS) $(CFLAGS) -MT rtstutter-rtstutter.o -MD -MP -MF $(DEPDIR)/rtstutter-rtstutter.Tpo -c -o rtstutter-rtstutter.o `test -f 'tests/rtstutter.c' || echo '$(srcdir)/'`tests/rtstutter.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rtstutter-rtstutter.Tpo $(DEPDIR)/rtstutter-rtstutter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/rtstutter.c' object='rtstutter-rtstutter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtstutter_CFLAGS) $(CFLAGS) -c -o rtstutter-rtstutter.o `test -f 'tests/rtstutter.c' || echo '$(srcdir)/'`tests/rtstutter.c
+
+rtstutter-rtstutter.obj: tests/rtstutter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtstutter_CFLAGS) $(CFLAGS) -MT rtstutter-rtstutter.obj -MD -MP -MF $(DEPDIR)/rtstutter-rtstutter.Tpo -c -o rtstutter-rtstutter.obj `if test -f 'tests/rtstutter.c'; then $(CYGPATH_W) 'tests/rtstutter.c'; else $(CYGPATH_W) '$(srcdir)/tests/rtstutter.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rtstutter-rtstutter.Tpo $(DEPDIR)/rtstutter-rtstutter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/rtstutter.c' object='rtstutter-rtstutter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtstutter_CFLAGS) $(CFLAGS) -c -o rtstutter-rtstutter.obj `if test -f 'tests/rtstutter.c'; then $(CYGPATH_W) 'tests/rtstutter.c'; else $(CYGPATH_W) '$(srcdir)/tests/rtstutter.c'; fi`
+
sig2str_test-sig2str-test.o: tests/sig2str-test.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sig2str_test_CFLAGS) $(CFLAGS) -MT sig2str_test-sig2str-test.o -MD -MP -MF $(DEPDIR)/sig2str_test-sig2str-test.Tpo -c -o sig2str_test-sig2str-test.o `test -f 'tests/sig2str-test.c' || echo '$(srcdir)/'`tests/sig2str-test.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sig2str_test-sig2str-test.Tpo $(DEPDIR)/sig2str_test-sig2str-test.Po
@@ -6853,6 +7654,20 @@ smoother_test-smoother-test.obj: tests/smoother-test.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(smoother_test_CFLAGS) $(CFLAGS) -c -o smoother_test-smoother-test.obj `if test -f 'tests/smoother-test.c'; then $(CYGPATH_W) 'tests/smoother-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/smoother-test.c'; fi`
+stripnul-stripnul.o: tests/stripnul.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stripnul_CFLAGS) $(CFLAGS) -MT stripnul-stripnul.o -MD -MP -MF $(DEPDIR)/stripnul-stripnul.Tpo -c -o stripnul-stripnul.o `test -f 'tests/stripnul.c' || echo '$(srcdir)/'`tests/stripnul.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stripnul-stripnul.Tpo $(DEPDIR)/stripnul-stripnul.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/stripnul.c' object='stripnul-stripnul.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stripnul_CFLAGS) $(CFLAGS) -c -o stripnul-stripnul.o `test -f 'tests/stripnul.c' || echo '$(srcdir)/'`tests/stripnul.c
+
+stripnul-stripnul.obj: tests/stripnul.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stripnul_CFLAGS) $(CFLAGS) -MT stripnul-stripnul.obj -MD -MP -MF $(DEPDIR)/stripnul-stripnul.Tpo -c -o stripnul-stripnul.obj `if test -f 'tests/stripnul.c'; then $(CYGPATH_W) 'tests/stripnul.c'; else $(CYGPATH_W) '$(srcdir)/tests/stripnul.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stripnul-stripnul.Tpo $(DEPDIR)/stripnul-stripnul.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/stripnul.c' object='stripnul-stripnul.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stripnul_CFLAGS) $(CFLAGS) -c -o stripnul-stripnul.obj `if test -f 'tests/stripnul.c'; then $(CYGPATH_W) 'tests/stripnul.c'; else $(CYGPATH_W) '$(srcdir)/tests/stripnul.c'; fi`
+
strlist_test-strlist-test.o: tests/strlist-test.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlist_test_CFLAGS) $(CFLAGS) -MT strlist_test-strlist-test.o -MD -MP -MF $(DEPDIR)/strlist_test-strlist-test.Tpo -c -o strlist_test-strlist-test.o `test -f 'tests/strlist-test.c' || echo '$(srcdir)/'`tests/strlist-test.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/strlist_test-strlist-test.Tpo $(DEPDIR)/strlist_test-strlist-test.Po
@@ -7224,6 +8039,7 @@ $(SYMDEF_FILES): modules/module-defs.h.m4
$(MKDIR_P) modules
$(MKDIR_P) modules/gconf
$(MKDIR_P) modules/rtp
+ $(MKDIR_P) modules/bluetooth
$(M4) -Dfname="$@" $< > $@
###################################
@@ -7240,15 +8056,26 @@ esdcompat: daemon/esdcompat.in Makefile
-e 's,@PA_BINARY\@,$(PA_BINARY),g' < $< > $@
chmod +x esdcompat
+start-pulseaudio-x11: daemon/start-pulseaudio-x11.in Makefile
+ sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \
+ -e 's,@PACTL_BINARY\@,$(bindir)/pactl,g' < $< > $@
+ chmod +x start-pulseaudio-x11
+
client.conf: pulse/client.conf.in Makefile
sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' < $< > $@
@OS_IS_WIN32_TRUE@default.pa: daemon/default.pa.win32
@OS_IS_WIN32_TRUE@ cp $< $@
+@OS_IS_WIN32_TRUE@system.pa: daemon/default.pa.win32
+@OS_IS_WIN32_TRUE@ cp $< $@
@OS_IS_WIN32_FALSE@default.pa: daemon/default.pa.in Makefile
@OS_IS_WIN32_FALSE@ sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \
@OS_IS_WIN32_FALSE@ -e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \
@OS_IS_WIN32_FALSE@ -e 's,@PA_SOEXT\@,.so,g' < $< > $@
+@OS_IS_WIN32_FALSE@system.pa: daemon/system.pa.in Makefile
+@OS_IS_WIN32_FALSE@ sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \
+@OS_IS_WIN32_FALSE@ -e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \
+@OS_IS_WIN32_FALSE@ -e 's,@PA_SOEXT\@,.so,g' < $< > $@
daemon.conf: daemon/daemon.conf.in Makefile
sed -e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \
@@ -7257,7 +8084,7 @@ daemon.conf: daemon/daemon.conf.in Makefile
install-exec-hook:
chown root $(DESTDIR)$(bindir)/pulseaudio ; true
chmod u+s $(DESTDIR)$(bindir)/pulseaudio
- -chmod u+s $(DESTDIR)$(pulselibexecdir)/bt-proximity-helper
+ -chmod u+s $(DESTDIR)$(pulselibexecdir)/proximity-helper
ln -sf pacat $(DESTDIR)$(bindir)/parec
rm -f $(DESTDIR)$(modlibexecdir)/*.a
rm -f $(DESTDIR)$(libdir)/libpulsedsp.a
@@ -7267,12 +8094,6 @@ install-exec-hook:
massif: pulseaudio
libtool --mode=execute valgrind --tool=massif --depth=6 --alloc-fn=pa_xmalloc --alloc-fn=pa_xmalloc0 --alloc-fn=pa_xrealloc --alloc-fn=dbus_realloc --alloc-fn=pa_xnew0_internal --alloc-fn=pa_xnew_internal ./pulseaudio
-update-speex:
- wget -O pulsecore/speex/speex_resampler.h http://svn.xiph.org/trunk/speex/include/speex/speex_resampler.h
- wget -O pulsecore/speex/resample.c http://svn.xiph.org/trunk/speex/libspeex/resample.c
- wget -O pulsecore/speex/arch.h http://svn.xiph.org/trunk/speex/libspeex/arch.h
- wget -O pulsecore/speex/fixed_generic.h http://svn.xiph.org/trunk/speex/libspeex/fixed_generic.h
-
update-ffmpeg:
wget -O pulsecore/ffmpeg/resample2.c http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/resample2.c?view=co
@@ -7280,7 +8101,7 @@ update-ffmpeg:
update-map-file:
( echo "PULSE_0 {" ; \
echo "global:" ; \
- ctags -I PA_GCC_PURE,PA_GCC_CONST -f - --c-kinds=p $(pulseinclude_HEADERS) | awk '/^pa_/ { print $$1 ";" }' | sort ; \
+ ctags -I PA_GCC_MALLOC,PA_GCC_ALLOC_SIZE2,PA_GCC_ALLOC_SIZE,PA_GCC_PURE,PA_GCC_CONST,PA_GCC_DEPRECATED,PA_GCC_PRINTF_ATTR -f - --c-kinds=p $(pulseinclude_HEADERS) | awk '/^pa_/ { print $$1 ";" }' | sort ; \
echo "local:" ; \
echo "*;" ; \
echo "};" ) > $(srcdir)/map-file
diff --git a/src/daemon/caps.c b/src/daemon/caps.c
index 8b19838..707b532 100644
--- a/src/daemon/caps.c
+++ b/src/daemon/caps.c
@@ -1,5 +1,3 @@
-/* $Id: caps.c 2193 2008-03-30 00:39:57Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,7 +28,13 @@
#include <errno.h>
#include <string.h>
#include <sys/types.h>
+
+#include <pulse/i18n.h>
+
#include <pulsecore/macro.h>
+#include <pulsecore/core-error.h>
+#include <pulsecore/log.h>
+#include <pulsecore/core-util.h>
#ifdef HAVE_SYS_CAPABILITY_H
#include <sys/capability.h>
@@ -39,10 +43,6 @@
#include <sys/prctl.h>
#endif
-#include <pulsecore/core-error.h>
-
-#include <pulsecore/log.h>
-
#include "caps.h"
/* Glibc <= 2.2 has broken unistd.h */
@@ -60,7 +60,7 @@ void pa_drop_root(void) {
if (uid == 0 || geteuid() != 0)
return;
- pa_log_info("Dropping root priviliges.");
+ pa_log_info(_("Dropping root priviliges."));
#if defined(HAVE_SETRESUID)
pa_assert_se(setresuid(uid, uid, uid) >= 0);
@@ -85,55 +85,78 @@ void pa_drop_root(void) {
#if defined(HAVE_SYS_CAPABILITY_H) && defined(HAVE_SYS_PRCTL_H)
/* Limit permitted capabilities set to CAPSYS_NICE */
-int pa_limit_caps(void) {
- int r = -1;
+void pa_limit_caps(void) {
cap_t caps;
cap_value_t nice_cap = CAP_SYS_NICE;
pa_assert_se(caps = cap_init());
-
- cap_clear(caps);
- cap_set_flag(caps, CAP_EFFECTIVE, 1, &nice_cap, CAP_SET);
- cap_set_flag(caps, CAP_PERMITTED, 1, &nice_cap, CAP_SET);
+ pa_assert_se(cap_clear(caps) == 0);
+ pa_assert_se(cap_set_flag(caps, CAP_EFFECTIVE, 1, &nice_cap, CAP_SET) == 0);
+ pa_assert_se(cap_set_flag(caps, CAP_PERMITTED, 1, &nice_cap, CAP_SET) == 0);
if (cap_set_proc(caps) < 0)
- goto fail;
-
- if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0)
- goto fail;
+ /* Hmm, so we couldn't limit our caps, which probably means we
+ * hadn't any in the first place, so let's just make sure of
+ * that */
+ pa_drop_caps();
+ else
+ pa_log_info(_("Limited capabilities successfully to CAP_SYS_NICE."));
- pa_log_info("Dropped capabilities successfully.");
+ pa_assert_se(cap_free(caps) == 0);
- r = 1;
-
-fail:
- cap_free(caps);
-
- return r;
+ pa_assert_se(prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == 0);
}
/* Drop all capabilities, effectively becoming a normal user */
void pa_drop_caps(void) {
cap_t caps;
+#ifndef __OPTIMIZE__
+ /* Valgrind doesn't not know set_caps, so we bypass it here -- but
+ * only in development builds.*/
+
+ if (pa_in_valgrind() && !pa_have_caps())
+ return;
+#endif
+
pa_assert_se(prctl(PR_SET_KEEPCAPS, 0, 0, 0, 0) == 0);
pa_assert_se(caps = cap_init());
- cap_clear(caps);
+ pa_assert_se(cap_clear(caps) == 0);
pa_assert_se(cap_set_proc(caps) == 0);
- cap_free(caps);
+ pa_assert_se(cap_free(caps) == 0);
+
+ pa_assert_se(!pa_have_caps());
+}
+
+pa_bool_t pa_have_caps(void) {
+ cap_t caps;
+ cap_flag_value_t flag = CAP_CLEAR;
+
+#ifdef __OPTIMIZE__
+ pa_assert_se(caps = cap_get_proc());
+#else
+ if (!(caps = cap_get_proc()))
+ return FALSE;
+#endif
+ pa_assert_se(cap_get_flag(caps, CAP_SYS_NICE, CAP_EFFECTIVE, &flag) >= 0);
+ pa_assert_se(cap_free(caps) == 0);
+
+ return flag == CAP_SET;
}
#else
/* NOOPs in case capabilities are not available. */
-int pa_limit_caps(void) {
- return 0;
+void pa_limit_caps(void) {
}
-int pa_drop_caps(void) {
+void pa_drop_caps(void) {
pa_drop_root();
- return 0;
+}
+
+pa_bool_t pa_have_caps(void) {
+ return FALSE;
}
#endif
diff --git a/src/daemon/caps.h b/src/daemon/caps.h
index 330b018..176aa90 100644
--- a/src/daemon/caps.h
+++ b/src/daemon/caps.h
@@ -1,8 +1,6 @@
#ifndef foocapshfoo
#define foocapshfoo
-/* $Id: caps.h 2193 2008-03-30 00:39:57Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -24,8 +22,11 @@
USA.
***/
+#include <pulsecore/macro.h>
+
void pa_drop_root(void);
void pa_drop_caps(void);
-int pa_limit_caps(void);
+void pa_limit_caps(void);
+pa_bool_t pa_have_caps(void);
#endif
diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c
index e9df3f7..fbd6dc3 100644
--- a/src/daemon/cmdline.c
+++ b/src/daemon/cmdline.c
@@ -1,5 +1,3 @@
-/* $Id: cmdline.c 2158 2008-03-27 23:27:34Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -32,6 +30,7 @@
#include <sys/stat.h>
#include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/strbuf.h>
@@ -51,6 +50,7 @@ enum {
ARG_HIGH_PRIORITY,
ARG_REALTIME,
ARG_DISALLOW_MODULE_LOADING,
+ ARG_DISALLOW_EXIT,
ARG_EXIT_IDLE_TIME,
ARG_MODULE_IDLE_TIME,
ARG_SCACHE_IDLE_TIME,
@@ -66,7 +66,8 @@ enum {
ARG_DISABLE_SHM,
ARG_DUMP_RESAMPLE_METHODS,
ARG_SYSTEM,
- ARG_CLEANUP_SHM
+ ARG_CLEANUP_SHM,
+ ARG_START
};
/* Tabel for getopt_long() */
@@ -82,6 +83,7 @@ static const struct option long_options[] = {
{"high-priority", 2, 0, ARG_HIGH_PRIORITY},
{"realtime", 2, 0, ARG_REALTIME},
{"disallow-module-loading", 2, 0, ARG_DISALLOW_MODULE_LOADING},
+ {"disallow-exit", 2, 0, ARG_DISALLOW_EXIT},
{"exit-idle-time", 2, 0, ARG_EXIT_IDLE_TIME},
{"module-idle-time", 2, 0, ARG_MODULE_IDLE_TIME},
{"scache-idle-time", 2, 0, ARG_SCACHE_IDLE_TIME},
@@ -91,6 +93,7 @@ static const struct option long_options[] = {
{"dl-search-path", 1, 0, ARG_DL_SEARCH_PATH},
{"resample-method", 1, 0, ARG_RESAMPLE_METHOD},
{"kill", 0, 0, ARG_KILL},
+ {"start", 0, 0, ARG_START},
{"use-pid-file", 2, 0, ARG_USE_PID_FILE},
{"check", 0, 0, ARG_CHECK},
{"system", 2, 0, ARG_SYSTEM},
@@ -111,7 +114,7 @@ void pa_cmdline_help(const char *argv0) {
else
e = argv0;
- printf("%s [options]\n\n"
+ printf(_("%s [options]\n\n"
"COMMANDS:\n"
" -h, --help Show this help\n"
" --version Show version\n"
@@ -119,6 +122,7 @@ void pa_cmdline_help(const char *argv0) {
" --dump-modules Dump list of available modules\n"
" --dump-resample-methods Dump available resample methods\n"
" --cleanup-shm Cleanup stale shared memory segments\n"
+ " --start Start the daemon if it is not running\n"
" -k --kill Kill a running daemon\n"
" --check Check for a running daemon\n\n"
@@ -132,7 +136,9 @@ void pa_cmdline_help(const char *argv0) {
" --realtime[=BOOL] Try to enable realtime scheduling\n"
" (only available as root, when SUID or\n"
" with elevated RLIMIT_RTPRIO)\n"
- " --disallow-module-loading[=BOOL] Disallow module loading after startup\n"
+ " --disallow-module-loading[=BOOL] Disallow module user requested module\n"
+ " loading/unloading after startup\n"
+ " --disallow-exit[=BOOL] Disallow user requested exit\n"
" --exit-idle-time=SECS Terminate the daemon when idle and this\n"
" time passed\n"
" --module-idle-time=SECS Unload autoloaded modules when idle and\n"
@@ -159,7 +165,7 @@ void pa_cmdline_help(const char *argv0) {
" -C Open a command line on the running TTY\n"
" after startup\n\n"
- " -n Don't load default script file\n", e);
+ " -n Don't load default script file\n"), e);
}
int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d) {
@@ -207,6 +213,11 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
conf->cmd = PA_CMD_KILL;
break;
+ case ARG_START:
+ conf->cmd = PA_CMD_START;
+ conf->daemonize = TRUE;
+ break;
+
case ARG_CHECK:
conf->cmd = PA_CMD_CHECK;
break;
@@ -231,14 +242,14 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
case ARG_DAEMONIZE:
case 'D':
if ((conf->daemonize = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--daemonize expects boolean argument");
+ pa_log(_("--daemonize expects boolean argument"));
goto fail;
}
break;
case ARG_FAIL:
if ((conf->fail = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--fail expects boolean argument");
+ pa_log(_("--fail expects boolean argument"));
goto fail;
}
break;
@@ -248,7 +259,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
if (optarg) {
if (pa_daemon_conf_set_log_level(conf, optarg) < 0) {
- pa_log("--log-level expects log level argument (either numeric in range 0..4 or one of debug, info, notice, warn, error).");
+ pa_log(_("--log-level expects log level argument (either numeric in range 0..4 or one of debug, info, notice, warn, error)."));
goto fail;
}
} else {
@@ -260,28 +271,35 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
case ARG_HIGH_PRIORITY:
if ((conf->high_priority = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--high-priority expects boolean argument");
+ pa_log(_("--high-priority expects boolean argument"));
goto fail;
}
break;
case ARG_REALTIME:
if ((conf->realtime_scheduling = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--realtime expects boolean argument");
+ pa_log(_("--realtime expects boolean argument"));
goto fail;
}
break;
case ARG_DISALLOW_MODULE_LOADING:
if ((conf->disallow_module_loading = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--disallow-module-loading expects boolean argument");
+ pa_log(_("--disallow-module-loading expects boolean argument"));
+ goto fail;
+ }
+ break;
+
+ case ARG_DISALLOW_EXIT:
+ if ((conf->disallow_exit = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
+ pa_log(_("--disallow-exit boolean argument"));
goto fail;
}
break;
case ARG_USE_PID_FILE:
if ((conf->use_pid_file = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--use-pid-file expects boolean argument");
+ pa_log(_("--use-pid-file expects boolean argument"));
goto fail;
}
break;
@@ -293,13 +311,12 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
break;
case 'n':
- pa_xfree(conf->default_script_file);
- conf->default_script_file = NULL;
+ conf->load_default_script_file = FALSE;
break;
case ARG_LOG_TARGET:
if (pa_daemon_conf_set_log_target(conf, optarg) < 0) {
- pa_log("Invalid log target: use either 'syslog', 'stderr' or 'auto'.");
+ pa_log(_("Invalid log target: use either 'syslog', 'stderr' or 'auto'."));
goto fail;
}
break;
@@ -318,28 +335,28 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
case ARG_RESAMPLE_METHOD:
if (pa_daemon_conf_set_resample_method(conf, optarg) < 0) {
- pa_log("Invalid resample method '%s'.", optarg);
+ pa_log(_("Invalid resample method '%s'."), optarg);
goto fail;
}
break;
case ARG_SYSTEM:
if ((conf->system_instance = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--system expects boolean argument");
+ pa_log(_("--system expects boolean argument"));
goto fail;
}
break;
case ARG_NO_CPU_LIMIT:
if ((conf->no_cpu_limit = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--no-cpu-limit expects boolean argument");
+ pa_log(_("--no-cpu-limit expects boolean argument"));
goto fail;
}
break;
case ARG_DISABLE_SHM:
if ((conf->disable_shm = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
- pa_log("--disable-shm expects boolean argument");
+ pa_log(_("--disable-shm expects boolean argument"));
goto fail;
}
break;
diff --git a/src/daemon/cmdline.h b/src/daemon/cmdline.h
index 964ddee..fd72a6d 100644
--- a/src/daemon/cmdline.h
+++ b/src/daemon/cmdline.h
@@ -1,8 +1,6 @@
#ifndef foocmdlinehfoo
#define foocmdlinehfoo
-/* $Id: cmdline.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c
index 69730a7..a909600 100644
--- a/src/daemon/cpulimit.c
+++ b/src/daemon/cpulimit.c
@@ -1,5 +1,3 @@
-/* $Id: cpulimit.c 2171 2008-03-27 23:37:46Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,11 +24,13 @@
#endif
#include <pulse/error.h>
+#include <pulse/timeval.h>
#include <pulsecore/core-util.h>
#include <pulsecore/core-error.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
+#include <pulsecore/rtclock.h>
#include "cpulimit.h"
@@ -69,7 +69,7 @@
#define CPUTIME_INTERVAL_HARD (5)
/* Time of the last CPU load check */
-static time_t last_time = 0;
+static pa_usec_t last_time = 0;
/* Pipe for communicating with the main loop */
static int the_pipe[2] = {-1, -1};
@@ -82,7 +82,7 @@ static pa_io_event *io_event = NULL;
static struct sigaction sigaction_prev;
/* Nonzero after pa_cpu_limit_init() */
-static int installed = 0;
+static pa_bool_t installed = FALSE;
/* The current state of operation */
static enum {
@@ -102,7 +102,7 @@ static void reset_cpu_time(int t) {
n = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec + t;
pa_assert_se(getrlimit(RLIMIT_CPU, &rl) >= 0);
- rl.rlim_cur = n;
+ rl.rlim_cur = (rlim_t) n;
pa_assert_se(setrlimit(RLIMIT_CPU, &rl) >= 0);
}
@@ -119,20 +119,21 @@ static void signal_handler(int sig) {
pa_assert(sig == SIGXCPU);
if (phase == PHASE_IDLE) {
- time_t now;
+ pa_usec_t now, elapsed;
#ifdef PRINT_CPU_LOAD
char t[256];
#endif
- time(&now);
+ now = pa_rtclock_usec();
+ elapsed = now - last_time;
#ifdef PRINT_CPU_LOAD
- pa_snprintf(t, sizeof(t), "Using %0.1f%% CPU\n", (double)CPUTIME_INTERVAL_SOFT/(now-last_time)*100);
+ pa_snprintf(t, sizeof(t), "Using %0.1f%% CPU\n", ((double) CPUTIME_INTERVAL_SOFT * (double) PA_USEC_PER_SEC) / (double) elapsed * 100.0);
write_err(t);
#endif
- if (CPUTIME_INTERVAL_SOFT >= ((now-last_time)*(double)CPUTIME_PERCENT/100)) {
+ if (((double) CPUTIME_INTERVAL_SOFT * (double) PA_USEC_PER_SEC) >= ((double) elapsed * (double) CPUTIME_PERCENT / 100.0)) {
static const char c = 'X';
write_err("Soft CPU time limit exhausted, terminating.\n");
@@ -166,6 +167,8 @@ static void callback(pa_mainloop_api*m, pa_io_event*e, int fd, pa_io_event_flags
pa_assert(e == io_event);
pa_assert(fd == the_pipe[0]);
+ pa_log("Recevied request to terminate due to CPU overload.");
+
pa_read(the_pipe[0], &c, sizeof(c), NULL);
m->quit(m, 1); /* Quit the main loop */
}
@@ -181,7 +184,7 @@ int pa_cpu_limit_init(pa_mainloop_api *m) {
pa_assert(the_pipe[1] == -1);
pa_assert(!installed);
- time(&last_time);
+ last_time = pa_rtclock_usec();
/* Prepare the main loop pipe */
if (pipe(the_pipe) < 0) {
@@ -210,7 +213,7 @@ int pa_cpu_limit_init(pa_mainloop_api *m) {
return -1;
}
- installed = 1;
+ installed = TRUE;
reset_cpu_time(CPUTIME_INTERVAL_SOFT);
@@ -231,13 +234,13 @@ void pa_cpu_limit_done(void) {
if (installed) {
pa_assert_se(sigaction(SIGXCPU, &sigaction_prev, NULL) >= 0);
- installed = 0;
+ installed = FALSE;
}
}
#else /* HAVE_SIGXCPU */
-int pa_cpu_limit_init(PA_GCC_UNUSED pa_mainloop_api *m) {
+int pa_cpu_limit_init(pa_mainloop_api *m) {
return 0;
}
diff --git a/src/daemon/cpulimit.h b/src/daemon/cpulimit.h
index b50e5bc..cb9a123 100644
--- a/src/daemon/cpulimit.h
+++ b/src/daemon/cpulimit.h
@@ -1,8 +1,6 @@
#ifndef foocpulimithfoo
#define foocpulimithfoo
-/* $Id: cpulimit.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index dc33521..939b25d 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -1,5 +1,3 @@
-/* $Id: daemon-conf.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,6 +31,8 @@
#include <sched.h>
#include <pulse/xmalloc.h>
+#include <pulse/timeval.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core-util.h>
@@ -45,6 +45,8 @@
#define DEFAULT_SCRIPT_FILE PA_DEFAULT_CONFIG_DIR PA_PATH_SEP "default.pa"
#define DEFAULT_SCRIPT_FILE_USER PA_PATH_SEP "default.pa"
+#define DEFAULT_SYSTEM_SCRIPT_FILE PA_DEFAULT_CONFIG_DIR PA_PATH_SEP "system.pa"
+
#define DEFAULT_CONFIG_FILE PA_DEFAULT_CONFIG_DIR PA_PATH_SEP "daemon.conf"
#define DEFAULT_CONFIG_FILE_USER PA_PATH_SEP "daemon.conf"
@@ -61,17 +63,20 @@ static const pa_daemon_conf default_conf = {
.realtime_scheduling = FALSE,
.realtime_priority = 5, /* Half of JACK's default rtprio */
.disallow_module_loading = FALSE,
- .exit_idle_time = -1,
+ .disallow_exit = FALSE,
+ .exit_idle_time = 20,
.module_idle_time = 20,
.scache_idle_time = 20,
.auto_log_target = 1,
.script_commands = NULL,
.dl_search_path = NULL,
+ .load_default_script_file = TRUE,
.default_script_file = NULL,
.log_target = PA_LOG_SYSLOG,
.log_level = PA_LOG_NOTICE,
.resample_method = PA_RESAMPLER_AUTO,
.disable_remixing = FALSE,
+ .disable_lfe_remixing = TRUE,
.config_file = NULL,
.use_pid_file = TRUE,
.system_instance = FALSE,
@@ -79,36 +84,46 @@ static const pa_daemon_conf default_conf = {
.disable_shm = FALSE,
.default_n_fragments = 4,
.default_fragment_size_msec = 25,
- .default_sample_spec = { .format = PA_SAMPLE_S16NE, .rate = 44100, .channels = 2 }
+ .default_sample_spec = { .format = PA_SAMPLE_S16NE, .rate = 44100, .channels = 2 },
+ .shm_size = 0
#ifdef HAVE_SYS_RESOURCE_H
- , .rlimit_as = { .value = 0, .is_set = FALSE },
- .rlimit_core = { .value = 0, .is_set = FALSE },
+ ,.rlimit_fsize = { .value = 0, .is_set = FALSE },
.rlimit_data = { .value = 0, .is_set = FALSE },
- .rlimit_fsize = { .value = 0, .is_set = FALSE },
- .rlimit_nofile = { .value = 256, .is_set = TRUE },
- .rlimit_stack = { .value = 0, .is_set = FALSE }
+ .rlimit_stack = { .value = 0, .is_set = FALSE },
+ .rlimit_core = { .value = 0, .is_set = FALSE },
+ .rlimit_rss = { .value = 0, .is_set = FALSE }
#ifdef RLIMIT_NPROC
- , .rlimit_nproc = { .value = 0, .is_set = FALSE }
+ ,.rlimit_nproc = { .value = 0, .is_set = FALSE }
#endif
+ ,.rlimit_nofile = { .value = 256, .is_set = TRUE }
#ifdef RLIMIT_MEMLOCK
- , .rlimit_memlock = { .value = 0, .is_set = FALSE }
+ ,.rlimit_memlock = { .value = 0, .is_set = FALSE }
+#endif
+ ,.rlimit_as = { .value = 0, .is_set = FALSE }
+#ifdef RLIMIT_LOCKS
+ ,.rlimit_locks = { .value = 0, .is_set = FALSE }
+#endif
+#ifdef RLIMIT_SIGPENDING
+ ,.rlimit_sigpending = { .value = 0, .is_set = FALSE }
+#endif
+#ifdef RLIMIT_MSGQUEUE
+ ,.rlimit_msgqueue = { .value = 0, .is_set = FALSE }
#endif
#ifdef RLIMIT_NICE
- , .rlimit_nice = { .value = 31, .is_set = TRUE } /* nice level of -11 */
+ ,.rlimit_nice = { .value = 31, .is_set = TRUE } /* nice level of -11 */
#endif
#ifdef RLIMIT_RTPRIO
- , .rlimit_rtprio = { .value = 9, .is_set = TRUE } /* One below JACK's default for the server */
+ ,.rlimit_rtprio = { .value = 9, .is_set = TRUE } /* One below JACK's default for the server */
+#endif
+#ifdef RLIMIT_RTTIME
+ ,.rlimit_rttime = { .value = PA_USEC_PER_SEC, .is_set = TRUE }
#endif
#endif
};
pa_daemon_conf* pa_daemon_conf_new(void) {
- FILE *f;
pa_daemon_conf *c = pa_xnewdup(pa_daemon_conf, &default_conf, 1);
- if ((f = pa_open_config_file(DEFAULT_SCRIPT_FILE, DEFAULT_SCRIPT_FILE_USER, ENV_SCRIPT_FILE, &c->default_script_file, "r")))
- fclose(f);
-
c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
return c;
}
@@ -178,7 +193,7 @@ int pa_daemon_conf_set_resample_method(pa_daemon_conf *c, const char *string) {
return 0;
}
-static int parse_log_target(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_log_target(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
pa_assert(filename);
@@ -187,14 +202,14 @@ static int parse_log_target(const char *filename, unsigned line, const char *lva
pa_assert(data);
if (pa_daemon_conf_set_log_target(c, rvalue) < 0) {
- pa_log("[%s:%u] Invalid log target '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid log target '%s'."), filename, line, rvalue);
return -1;
}
return 0;
}
-static int parse_log_level(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_log_level(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
pa_assert(filename);
@@ -203,14 +218,14 @@ static int parse_log_level(const char *filename, unsigned line, const char *lval
pa_assert(data);
if (pa_daemon_conf_set_log_level(c, rvalue) < 0) {
- pa_log("[%s:%u] Invalid log level '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid log level '%s'."), filename, line, rvalue);
return -1;
}
return 0;
}
-static int parse_resample_method(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_resample_method(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
pa_assert(filename);
@@ -219,14 +234,14 @@ static int parse_resample_method(const char *filename, unsigned line, const char
pa_assert(data);
if (pa_daemon_conf_set_resample_method(c, rvalue) < 0) {
- pa_log("[%s:%u] Invalid resample method '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid resample method '%s'."), filename, line, rvalue);
return -1;
}
return 0;
}
-static int parse_rlimit(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_rlimit(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
#ifdef HAVE_SYS_RESOURCE_H
struct pa_rlimit *r = data;
@@ -242,20 +257,20 @@ static int parse_rlimit(const char *filename, unsigned line, const char *lvalue,
} else {
int32_t k;
if (pa_atoi(rvalue, &k) < 0) {
- pa_log("[%s:%u] Invalid rlimit '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid rlimit '%s'."), filename, line, rvalue);
return -1;
}
r->is_set = k >= 0;
r->value = k >= 0 ? (rlim_t) k : 0;
}
#else
- pa_log_warn("[%s:%u] rlimit not supported on this platform.", filename, line);
+ pa_log_warn(_("[%s:%u] rlimit not supported on this platform."), filename, line);
#endif
return 0;
}
-static int parse_sample_format(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_sample_format(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
pa_sample_format_t f;
@@ -265,7 +280,7 @@ static int parse_sample_format(const char *filename, unsigned line, const char *
pa_assert(data);
if ((f = pa_parse_sample_format(rvalue)) < 0) {
- pa_log("[%s:%u] Invalid sample format '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid sample format '%s'."), filename, line, rvalue);
return -1;
}
@@ -273,17 +288,17 @@ static int parse_sample_format(const char *filename, unsigned line, const char *
return 0;
}
-static int parse_sample_rate(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_sample_rate(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
- int32_t r;
+ uint32_t r;
pa_assert(filename);
pa_assert(lvalue);
pa_assert(rvalue);
pa_assert(data);
- if (pa_atoi(rvalue, &r) < 0 || r > PA_RATE_MAX || r <= 0) {
- pa_log("[%s:%u] Invalid sample rate '%s'.", filename, line, rvalue);
+ if (pa_atou(rvalue, &r) < 0 || r > (uint32_t) PA_RATE_MAX || r <= 0) {
+ pa_log(_("[%s:%u] Invalid sample rate '%s'."), filename, line, rvalue);
return -1;
}
@@ -291,7 +306,7 @@ static int parse_sample_rate(const char *filename, unsigned line, const char *lv
return 0;
}
-static int parse_sample_channels(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_sample_channels(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
int32_t n;
@@ -300,8 +315,8 @@ static int parse_sample_channels(const char *filename, unsigned line, const char
pa_assert(rvalue);
pa_assert(data);
- if (pa_atoi(rvalue, &n) < 0 || n > PA_CHANNELS_MAX || n <= 0) {
- pa_log("[%s:%u] Invalid sample channels '%s'.", filename, line, rvalue);
+ if (pa_atoi(rvalue, &n) < 0 || n > (int32_t) PA_CHANNELS_MAX || n <= 0) {
+ pa_log(_("[%s:%u] Invalid sample channels '%s'."), filename, line, rvalue);
return -1;
}
@@ -309,7 +324,7 @@ static int parse_sample_channels(const char *filename, unsigned line, const char
return 0;
}
-static int parse_fragments(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_fragments(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
int32_t n;
@@ -319,7 +334,7 @@ static int parse_fragments(const char *filename, unsigned line, const char *lval
pa_assert(data);
if (pa_atoi(rvalue, &n) < 0 || n < 2) {
- pa_log("[%s:%u] Invalid number of fragments '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid number of fragments '%s'."), filename, line, rvalue);
return -1;
}
@@ -327,7 +342,7 @@ static int parse_fragments(const char *filename, unsigned line, const char *lval
return 0;
}
-static int parse_fragment_size_msec(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_fragment_size_msec(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
int32_t n;
@@ -337,7 +352,7 @@ static int parse_fragment_size_msec(const char *filename, unsigned line, const c
pa_assert(data);
if (pa_atoi(rvalue, &n) < 0 || n < 1) {
- pa_log("[%s:%u] Invalid fragment size '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid fragment size '%s'."), filename, line, rvalue);
return -1;
}
@@ -345,7 +360,7 @@ static int parse_fragment_size_msec(const char *filename, unsigned line, const c
return 0;
}
-static int parse_nice_level(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_nice_level(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
int32_t level;
@@ -355,7 +370,7 @@ static int parse_nice_level(const char *filename, unsigned line, const char *lva
pa_assert(data);
if (pa_atoi(rvalue, &level) < 0 || level < -20 || level > 19) {
- pa_log("[%s:%u] Invalid nice level '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid nice level '%s'."), filename, line, rvalue);
return -1;
}
@@ -363,7 +378,7 @@ static int parse_nice_level(const char *filename, unsigned line, const char *lva
return 0;
}
-static int parse_rtprio(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+static int parse_rtprio(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
int32_t rtprio;
@@ -391,6 +406,7 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
{ "high-priority", pa_config_parse_bool, NULL },
{ "realtime-scheduling", pa_config_parse_bool, NULL },
{ "disallow-module-loading", pa_config_parse_bool, NULL },
+ { "disallow-exit", pa_config_parse_bool, NULL },
{ "use-pid-file", pa_config_parse_bool, NULL },
{ "system-instance", pa_config_parse_bool, NULL },
{ "no-cpu-limit", pa_config_parse_bool, NULL },
@@ -412,25 +428,41 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
{ "default-fragment-size-msec", parse_fragment_size_msec, NULL },
{ "nice-level", parse_nice_level, NULL },
{ "disable-remixing", pa_config_parse_bool, NULL },
+ { "disable-lfe-remixing", pa_config_parse_bool, NULL },
+ { "load-default-script-file", pa_config_parse_bool, NULL },
+ { "shm-size-bytes", pa_config_parse_size, NULL },
#ifdef HAVE_SYS_RESOURCE_H
- { "rlimit-as", parse_rlimit, NULL },
- { "rlimit-core", parse_rlimit, NULL },
- { "rlimit-data", parse_rlimit, NULL },
{ "rlimit-fsize", parse_rlimit, NULL },
- { "rlimit-nofile", parse_rlimit, NULL },
+ { "rlimit-data", parse_rlimit, NULL },
{ "rlimit-stack", parse_rlimit, NULL },
+ { "rlimit-core", parse_rlimit, NULL },
+ { "rlimit-rss", parse_rlimit, NULL },
+ { "rlimit-nofile", parse_rlimit, NULL },
+ { "rlimit-as", parse_rlimit, NULL },
#ifdef RLIMIT_NPROC
{ "rlimit-nproc", parse_rlimit, NULL },
#endif
#ifdef RLIMIT_MEMLOCK
{ "rlimit-memlock", parse_rlimit, NULL },
#endif
+#ifdef RLIMIT_LOCKS
+ { "rlimit-locks", parse_rlimit, NULL },
+#endif
+#ifdef RLIMIT_SIGPENDING
+ { "rlimit-sigpending", parse_rlimit, NULL },
+#endif
+#ifdef RLIMIT_MSGQUEUE
+ { "rlimit-msgqueue", parse_rlimit, NULL },
+#endif
#ifdef RLIMIT_NICE
{ "rlimit-nice", parse_rlimit, NULL },
#endif
#ifdef RLIMIT_RTPRIO
{ "rlimit-rtprio", parse_rlimit, NULL },
#endif
+#ifdef RLIMIT_RTTIME
+ { "rlimit-rttime", parse_rlimit, NULL },
+#endif
#endif
{ NULL, NULL, NULL },
};
@@ -440,17 +472,17 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
table[2].data = &c->high_priority;
table[3].data = &c->realtime_scheduling;
table[4].data = &c->disallow_module_loading;
- table[5].data = &c->use_pid_file;
- table[6].data = &c->system_instance;
- table[7].data = &c->no_cpu_limit;
- table[8].data = &c->disable_shm;
- table[9].data = &c->exit_idle_time;
- table[10].data = &c->module_idle_time;
- table[11].data = &c->scache_idle_time;
- table[12].data = c;
- table[13].data = &c->dl_search_path;
- table[14].data = &c->default_script_file;
- table[15].data = c;
+ table[5].data = &c->disallow_exit;
+ table[6].data = &c->use_pid_file;
+ table[7].data = &c->system_instance;
+ table[8].data = &c->no_cpu_limit;
+ table[9].data = &c->disable_shm;
+ table[10].data = &c->exit_idle_time;
+ table[11].data = &c->module_idle_time;
+ table[12].data = &c->scache_idle_time;
+ table[13].data = c;
+ table[14].data = &c->dl_search_path;
+ table[15].data = &c->default_script_file;
table[16].data = c;
table[17].data = c;
table[18].data = c;
@@ -460,34 +492,70 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
table[22].data = c;
table[23].data = c;
table[24].data = c;
- table[25].data = &c->disable_remixing;
+ table[25].data = c;
+ table[26].data = &c->disable_remixing;
+ table[27].data = &c->disable_lfe_remixing;
+ table[28].data = &c->load_default_script_file;
+ table[29].data = &c->shm_size;
#ifdef HAVE_SYS_RESOURCE_H
- table[26].data = &c->rlimit_as;
- table[27].data = &c->rlimit_core;
- table[28].data = &c->rlimit_data;
- table[29].data = &c->rlimit_fsize;
- table[30].data = &c->rlimit_nofile;
- table[31].data = &c->rlimit_stack;
+ table[30].data = &c->rlimit_fsize;
+ table[31].data = &c->rlimit_data;
+ table[32].data = &c->rlimit_stack;
+ table[33].data = &c->rlimit_as;
+ table[34].data = &c->rlimit_core;
+ table[35].data = &c->rlimit_nofile;
+ table[36].data = &c->rlimit_as;
#ifdef RLIMIT_NPROC
- table[32].data = &c->rlimit_nproc;
+ table[37].data = &c->rlimit_nproc;
#endif
+
#ifdef RLIMIT_MEMLOCK
#ifndef RLIMIT_NPROC
#error "Houston, we have a numbering problem!"
#endif
- table[33].data = &c->rlimit_memlock;
+ table[38].data = &c->rlimit_memlock;
#endif
-#ifdef RLIMIT_NICE
+
+#ifdef RLIMIT_LOCKS
#ifndef RLIMIT_MEMLOCK
#error "Houston, we have a numbering problem!"
#endif
- table[34].data = &c->rlimit_nice;
+ table[39].data = &c->rlimit_locks;
+#endif
+
+#ifdef RLIMIT_SIGPENDING
+#ifndef RLIMIT_LOCKS
+#error "Houston, we have a numbering problem!"
+#endif
+ table[40].data = &c->rlimit_sigpending;
#endif
+
+#ifdef RLIMIT_MSGQUEUE
+#ifndef RLIMIT_SIGPENDING
+#error "Houston, we have a numbering problem!"
+#endif
+ table[41].data = &c->rlimit_msgqueue;
+#endif
+
+#ifdef RLIMIT_NICE
+#ifndef RLIMIT_MSGQUEUE
+#error "Houston, we have a numbering problem!"
+#endif
+ table[42].data = &c->rlimit_nice;
+#endif
+
#ifdef RLIMIT_RTPRIO
#ifndef RLIMIT_NICE
#error "Houston, we have a numbering problem!"
#endif
- table[35].data = &c->rlimit_rtprio;
+ table[43].data = &c->rlimit_rtprio;
+#endif
+
+#ifdef RLIMIT_RTTIME
+#ifndef RLIMIT_RTTIME
+#error "Houston, we have a numbering problem!"
+#endif
+ table[44].data = &c->rlimit_rttime;
#endif
#endif
@@ -496,10 +564,10 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
f = filename ?
fopen(c->config_file = pa_xstrdup(filename), "r") :
- pa_open_config_file(DEFAULT_CONFIG_FILE, DEFAULT_CONFIG_FILE_USER, ENV_CONFIG_FILE, &c->config_file, "r");
+ pa_open_config_file(DEFAULT_CONFIG_FILE, DEFAULT_CONFIG_FILE_USER, ENV_CONFIG_FILE, &c->config_file);
if (!f && errno != ENOENT) {
- pa_log_warn("Failed to open configuration file '%s': %s", c->config_file, pa_cstrerror(errno));
+ pa_log_warn(_("Failed to open configuration file: %s"), pa_cstrerror(errno));
goto finish;
}
@@ -514,6 +582,7 @@ finish:
int pa_daemon_conf_env(pa_daemon_conf *c) {
char *e;
+ pa_assert(c);
if ((e = getenv(ENV_DL_SEARCH_PATH))) {
pa_xfree(c->dl_search_path);
@@ -527,6 +596,35 @@ int pa_daemon_conf_env(pa_daemon_conf *c) {
return 0;
}
+const char *pa_daemon_conf_get_default_script_file(pa_daemon_conf *c) {
+ pa_assert(c);
+
+ if (!c->default_script_file) {
+ if (c->system_instance)
+ c->default_script_file = pa_find_config_file(DEFAULT_SYSTEM_SCRIPT_FILE, NULL, ENV_SCRIPT_FILE);
+ else
+ c->default_script_file = pa_find_config_file(DEFAULT_SCRIPT_FILE, DEFAULT_SCRIPT_FILE_USER, ENV_SCRIPT_FILE);
+ }
+
+ return c->default_script_file;
+}
+
+FILE *pa_daemon_conf_open_default_script_file(pa_daemon_conf *c) {
+ FILE *f;
+ pa_assert(c);
+
+ if (!c->default_script_file) {
+ if (c->system_instance)
+ f = pa_open_config_file(DEFAULT_SYSTEM_SCRIPT_FILE, NULL, ENV_SCRIPT_FILE, &c->default_script_file);
+ else
+ f = pa_open_config_file(DEFAULT_SCRIPT_FILE, DEFAULT_SCRIPT_FILE_USER, ENV_SCRIPT_FILE, &c->default_script_file);
+ } else
+ f = fopen(c->default_script_file, "r");
+
+ return f;
+}
+
+
static const char* const log_level_to_string[] = {
[PA_LOG_DEBUG] = "debug",
[PA_LOG_INFO] = "info",
@@ -543,7 +641,7 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) {
s = pa_strbuf_new();
if (c->config_file)
- pa_strbuf_printf(s, "### Read from configuration file: %s ###\n", c->config_file);
+ pa_strbuf_printf(s, _("### Read from configuration file: %s ###\n"), c->config_file);
pa_assert(c->log_level <= PA_LOG_LEVEL_MAX);
@@ -554,6 +652,7 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) {
pa_strbuf_printf(s, "realtime-scheduling = %s\n", pa_yes_no(c->realtime_scheduling));
pa_strbuf_printf(s, "realtime-priority = %i\n", c->realtime_priority);
pa_strbuf_printf(s, "disallow-module-loading = %s\n", pa_yes_no(c->disallow_module_loading));
+ pa_strbuf_printf(s, "disallow-exit = %s\n", pa_yes_no(c->disallow_exit));
pa_strbuf_printf(s, "use-pid-file = %s\n", pa_yes_no(c->use_pid_file));
pa_strbuf_printf(s, "system-instance = %s\n", pa_yes_no(c->system_instance));
pa_strbuf_printf(s, "no-cpu-limit = %s\n", pa_yes_no(c->no_cpu_limit));
@@ -561,35 +660,51 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) {
pa_strbuf_printf(s, "exit-idle-time = %i\n", c->exit_idle_time);
pa_strbuf_printf(s, "module-idle-time = %i\n", c->module_idle_time);
pa_strbuf_printf(s, "scache-idle-time = %i\n", c->scache_idle_time);
- pa_strbuf_printf(s, "dl-search-path = %s\n", c->dl_search_path ? c->dl_search_path : "");
- pa_strbuf_printf(s, "default-script-file = %s\n", c->default_script_file);
+ pa_strbuf_printf(s, "dl-search-path = %s\n", pa_strempty(c->dl_search_path));
+ pa_strbuf_printf(s, "default-script-file = %s\n", pa_strempty(pa_daemon_conf_get_default_script_file(c)));
+ pa_strbuf_printf(s, "load-default-script-file = %s\n", pa_yes_no(c->load_default_script_file));
pa_strbuf_printf(s, "log-target = %s\n", c->auto_log_target ? "auto" : (c->log_target == PA_LOG_SYSLOG ? "syslog" : "stderr"));
pa_strbuf_printf(s, "log-level = %s\n", log_level_to_string[c->log_level]);
pa_strbuf_printf(s, "resample-method = %s\n", pa_resample_method_to_string(c->resample_method));
pa_strbuf_printf(s, "disable-remixing = %s\n", pa_yes_no(c->disable_remixing));
+ pa_strbuf_printf(s, "disable-lfe-remixing = %s\n", pa_yes_no(c->disable_lfe_remixing));
pa_strbuf_printf(s, "default-sample-format = %s\n", pa_sample_format_to_string(c->default_sample_spec.format));
pa_strbuf_printf(s, "default-sample-rate = %u\n", c->default_sample_spec.rate);
pa_strbuf_printf(s, "default-sample-channels = %u\n", c->default_sample_spec.channels);
pa_strbuf_printf(s, "default-fragments = %u\n", c->default_n_fragments);
pa_strbuf_printf(s, "default-fragment-size-msec = %u\n", c->default_fragment_size_msec);
+ pa_strbuf_printf(s, "shm-size-bytes = %lu\n", (unsigned long) c->shm_size);
#ifdef HAVE_SYS_RESOURCE_H
- pa_strbuf_printf(s, "rlimit-as = %li\n", c->rlimit_as.is_set ? (long int) c->rlimit_as.value : -1);
- pa_strbuf_printf(s, "rlimit-core = %li\n", c->rlimit_core.is_set ? (long int) c->rlimit_core.value : -1);
- pa_strbuf_printf(s, "rlimit-data = %li\n", c->rlimit_data.is_set ? (long int) c->rlimit_data.value : -1);
pa_strbuf_printf(s, "rlimit-fsize = %li\n", c->rlimit_fsize.is_set ? (long int) c->rlimit_fsize.value : -1);
- pa_strbuf_printf(s, "rlimit-nofile = %li\n", c->rlimit_nofile.is_set ? (long int) c->rlimit_nofile.value : -1);
+ pa_strbuf_printf(s, "rlimit-data = %li\n", c->rlimit_data.is_set ? (long int) c->rlimit_data.value : -1);
pa_strbuf_printf(s, "rlimit-stack = %li\n", c->rlimit_stack.is_set ? (long int) c->rlimit_stack.value : -1);
+ pa_strbuf_printf(s, "rlimit-core = %li\n", c->rlimit_core.is_set ? (long int) c->rlimit_core.value : -1);
+ pa_strbuf_printf(s, "rlimit-as = %li\n", c->rlimit_as.is_set ? (long int) c->rlimit_as.value : -1);
+ pa_strbuf_printf(s, "rlimit-rss = %li\n", c->rlimit_rss.is_set ? (long int) c->rlimit_rss.value : -1);
#ifdef RLIMIT_NPROC
pa_strbuf_printf(s, "rlimit-nproc = %li\n", c->rlimit_nproc.is_set ? (long int) c->rlimit_nproc.value : -1);
#endif
+ pa_strbuf_printf(s, "rlimit-nofile = %li\n", c->rlimit_nofile.is_set ? (long int) c->rlimit_nofile.value : -1);
#ifdef RLIMIT_MEMLOCK
pa_strbuf_printf(s, "rlimit-memlock = %li\n", c->rlimit_memlock.is_set ? (long int) c->rlimit_memlock.value : -1);
#endif
+#ifdef RLIMIT_LOCKS
+ pa_strbuf_printf(s, "rlimit-locks = %li\n", c->rlimit_locks.is_set ? (long int) c->rlimit_locks.value : -1);
+#endif
+#ifdef RLIMIT_SIGPENDING
+ pa_strbuf_printf(s, "rlimit-sigpending = %li\n", c->rlimit_sigpending.is_set ? (long int) c->rlimit_sigpending.value : -1);
+#endif
+#ifdef RLIMIT_MSGQUEUE
+ pa_strbuf_printf(s, "rlimit-msgqueue = %li\n", c->rlimit_msgqueue.is_set ? (long int) c->rlimit_msgqueue.value : -1);
+#endif
#ifdef RLIMIT_NICE
- pa_strbuf_printf(s, "rlimit-nice = %li\n", c->rlimit_memlock.is_set ? (long int) c->rlimit_nice.value : -1);
+ pa_strbuf_printf(s, "rlimit-nice = %li\n", c->rlimit_nice.is_set ? (long int) c->rlimit_nice.value : -1);
#endif
#ifdef RLIMIT_RTPRIO
- pa_strbuf_printf(s, "rlimit-rtprio = %li\n", c->rlimit_memlock.is_set ? (long int) c->rlimit_rtprio.value : -1);
+ pa_strbuf_printf(s, "rlimit-rtprio = %li\n", c->rlimit_rtprio.is_set ? (long int) c->rlimit_rtprio.value : -1);
+#endif
+#ifdef RLIMIT_RTTIME
+ pa_strbuf_printf(s, "rlimit-rttime = %li\n", c->rlimit_rttime.is_set ? (long int) c->rlimit_rttime.value : -1);
#endif
#endif
diff --git a/src/daemon/daemon-conf.h b/src/daemon/daemon-conf.h
index 0d72f8d..9032926 100644
--- a/src/daemon/daemon-conf.h
+++ b/src/daemon/daemon-conf.h
@@ -1,8 +1,6 @@
#ifndef foodaemonconfhfoo
#define foodaemonconfhfoo
-/* $Id: daemon-conf.h 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -27,6 +25,7 @@
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
+#include <pulsecore/core-util.h>
#include <pulse/sample.h>
#ifdef HAVE_SYS_RESOURCE_H
@@ -36,6 +35,7 @@
/* The actual command to execute */
typedef enum pa_daemon_conf_cmd {
PA_CMD_DAEMON, /* the default */
+ PA_CMD_START,
PA_CMD_HELP,
PA_CMD_VERSION,
PA_CMD_DUMP_CONF,
@@ -65,7 +65,10 @@ typedef struct pa_daemon_conf {
system_instance,
no_cpu_limit,
disable_shm,
- disable_remixing;
+ disable_remixing,
+ disable_lfe_remixing,
+ load_default_script_file,
+ disallow_exit;
int exit_idle_time,
module_idle_time,
scache_idle_time,
@@ -79,23 +82,36 @@ typedef struct pa_daemon_conf {
char *config_file;
#ifdef HAVE_SYS_RESOURCE_H
- pa_rlimit rlimit_as, rlimit_core, rlimit_data, rlimit_fsize, rlimit_nofile, rlimit_stack;
+ pa_rlimit rlimit_fsize, rlimit_data, rlimit_stack, rlimit_core, rlimit_rss, rlimit_nofile, rlimit_as;
#ifdef RLIMIT_NPROC
pa_rlimit rlimit_nproc;
#endif
#ifdef RLIMIT_MEMLOCK
pa_rlimit rlimit_memlock;
#endif
+#ifdef RLIMIT_LOCKS
+ pa_rlimit rlimit_locks;
+#endif
+#ifdef RLIMIT_SIGPENDING
+ pa_rlimit rlimit_sigpending;
+#endif
+#ifdef RLIMIT_MSGQUEUE
+ pa_rlimit rlimit_msgqueue;
+#endif
#ifdef RLIMIT_NICE
pa_rlimit rlimit_nice;
#endif
#ifdef RLIMIT_RTPRIO
pa_rlimit rlimit_rtprio;
#endif
+#ifdef RLIMIT_RTTIME
+ pa_rlimit rlimit_rttime;
+#endif
#endif
unsigned default_n_fragments, default_fragment_size_msec;
pa_sample_spec default_sample_spec;
+ size_t shm_size;
} pa_daemon_conf;
/* Allocate a new structure and fill it with sane defaults */
@@ -121,4 +137,7 @@ int pa_daemon_conf_set_log_target(pa_daemon_conf *c, const char *string);
int pa_daemon_conf_set_log_level(pa_daemon_conf *c, const char *string);
int pa_daemon_conf_set_resample_method(pa_daemon_conf *c, const char *string);
+const char *pa_daemon_conf_get_default_script_file(pa_daemon_conf *c);
+FILE *pa_daemon_conf_open_default_script_file(pa_daemon_conf *c);
+
#endif
diff --git a/src/daemon/daemon.conf.in b/src/daemon/daemon.conf.in
index e423680..c672d42 100644
--- a/src/daemon/daemon.conf.in
+++ b/src/daemon/daemon.conf.in
@@ -1,5 +1,3 @@
-# $Id: daemon.conf.in 2175 2008-03-27 23:39:10Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
@@ -24,9 +22,11 @@
; daemonize = no
; fail = yes
; disallow-module-loading = no
+; disallow-exit = no
; use-pid-file = yes
; system-instance = no
; disable-shm = no
+; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; high-priority = yes
; nice-level = -11
@@ -34,12 +34,13 @@
; realtime-scheduling = no
; realtime-priority = 5
-; exit-idle-time = -1
+; exit-idle-time = 20
; module-idle-time = 20
; scache-idle-time = 20
; dl-search-path = (depends on architecture)
+; load-default-script-file = yes
; default-script-file = @PA_DEFAULT_CONFIG_FILE@
; log-target = auto
@@ -47,19 +48,25 @@
; resample-method = speex-float-3
; disable-remixing = no
+; disable-lfe-remixing = yes
; no-cpu-limit = no
-; rlimit-as = -1
-; rlimit-core = -1
-; rlimit-data = -1
; rlimit-fsize = -1
-; rlimit-nofile = 256
+; rlimit-data = -1
; rlimit-stack = -1
+; rlimit-core = -1
+; rlimit-as = -1
+; rlimit-rss = -1
; rlimit-nproc = -1
+; rlimit-nofile = 256
; rlimit-memlock = -1
+; rlimit-locks = -1
+; rlimit-sigpending = -1
+; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
+; rlimit-rtttime = 1000000
; default-sample-format = s16le
; default-sample-rate = 44100
diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
index 064a6cc..7032038 100755
--- a/src/daemon/default.pa.in
+++ b/src/daemon/default.pa.in
@@ -16,11 +16,14 @@
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+# This startup script is used only if PulseAudio is started per-user
+# (i.e. not in system mode)
+
.nofail
### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
-load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
+#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
@@ -45,6 +48,11 @@ load-module module-hal-detect
load-module module-detect
.endif
+### Automatically load driver modules for Bluetooth hardware
+#.ifexists module-bluetooth-discover@PA_SOEXT@
+#load-module module-bluetooth-discover
+#.endif
+
### Load several protocols
.ifexists module-esound-protocol-unix@PA_SOEXT@
load-module module-esound-protocol-unix
@@ -64,8 +72,9 @@ load-module module-native-protocol-unix
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"
#load-module module-rtp-send source=rtp.monitor
-### Automatically restore the volume of playback streams
-load-module module-volume-restore
+### Automatically restore the volume of streams and devices
+load-module module-stream-restore
+load-module module-device-restore
### Automatically restore the default sink/source when changed by the user during runtime
load-module module-default-device-restore
@@ -74,16 +83,18 @@ load-module module-default-device-restore
### connected to dies, similar for sources
load-module module-rescue-streams
+### Make sure we always have a sink around, even if it is a null sink.
+load-module module-always-sink
+
### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle
-### Load X11 bell module
-#load-module module-x11-bell sample=x11-bell
+### If autoexit on idle is enabled we want to make sure we only quit
+### when no local session needs us anymore.
+load-module module-console-kit
-### Register ourselves in the X11 session manager
-# Deactivated by default, to avoid deadlock when PA is started as esd from gnome-session
-# Instead we load this via /etc/xdg/autostart/ and "pactl load-module" now
-# load-module module-x11-xsmp
+### Enable positioned event sounds
+load-module module-position-event-sounds
### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
@@ -94,12 +105,21 @@ load-module module-gconf
.fail
.endif
+# X11 modules should not be started from default.pa so that one daemon
+# can be shared by multiple sessions.
+
+### Load X11 bell module
+#load-module module-x11-bell sample=bell-windowing-system
+
+### Register ourselves in the X11 session manager
+#load-module module-x11-xsmp
+
### Publish connection data in the X11 root window
-.ifexists module-x11-publish@PA_SOEXT@
-.nofail
-load-module module-x11-publish
-.fail
-.endif
+#.ifexists module-x11-publish@PA_SOEXT@
+#.nofail
+#load-module module-x11-publish
+#.fail
+#.endif
### Make some devices default
#set-default-sink output
diff --git a/src/daemon/dumpmodules.c b/src/daemon/dumpmodules.c
index f9f5b6c..9c9f1c8 100644
--- a/src/daemon/dumpmodules.c
+++ b/src/daemon/dumpmodules.c
@@ -1,5 +1,3 @@
-/* $Id: dumpmodules.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -32,6 +30,7 @@
#include <ltdl.h>
#include <pulse/util.h>
+#include <pulse/i18n.h>
#include <pulsecore/modinfo.h>
#include <pulsecore/core-util.h>
@@ -41,7 +40,7 @@
#define PREFIX "module-"
-static void short_info(const char *name, PA_GCC_UNUSED const char *path, pa_modinfo *i) {
+static void short_info(const char *name, const char *path, pa_modinfo *i) {
pa_assert(name);
pa_assert(i);
@@ -58,24 +57,24 @@ static void long_info(const char *name, const char *path, pa_modinfo *i) {
nl = 1;
- printf("Name: %s\n", name);
+ printf(_("Name: %s\n"), name);
if (!i->description && !i->version && !i->author && !i->usage)
- printf("No module information available\n");
+ printf(_("No module information available\n"));
else {
if (i->version)
- printf("Version: %s\n", i->version);
+ printf(_("Version: %s\n"), i->version);
if (i->description)
- printf("Description: %s\n", i->description);
+ printf(_("Description: %s\n"), i->description);
if (i->author)
- printf("Author: %s\n", i->author);
+ printf(_("Author: %s\n"), i->author);
if (i->usage)
- printf("Usage: %s\n", i->usage);
- printf("Load Once: %s\n", pa_yes_no(i->load_once));
+ printf(_("Usage: %s\n"), i->usage);
+ printf(_("Load Once: %s\n"), pa_yes_no(i->load_once));
}
if (path)
- printf("Path: %s\n", path);
+ printf(_("Path: %s\n"), path);
}
static void show_info(const char *name, const char *path, void (*info)(const char *name, const char *path, pa_modinfo*i)) {
diff --git a/src/daemon/dumpmodules.h b/src/daemon/dumpmodules.h
index ab2ddb6..c49a5ed 100644
--- a/src/daemon/dumpmodules.h
+++ b/src/daemon/dumpmodules.h
@@ -1,8 +1,6 @@
#ifndef foodumpmoduleshfoo
#define foodumpmoduleshfoo
-/* $Id*/
-
/***
This file is part of PulseAudio.
diff --git a/src/daemon/esdcompat.in b/src/daemon/esdcompat.in
index 55b30a7..6650180 100755
--- a/src/daemon/esdcompat.in
+++ b/src/daemon/esdcompat.in
@@ -1,7 +1,5 @@
#!/bin/sh
-# $Id: esdcompat.in 1361 2006-09-02 12:28:40Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
diff --git a/src/daemon/ltdl-bind-now.c b/src/daemon/ltdl-bind-now.c
index 91138a0..92e5d40 100644
--- a/src/daemon/ltdl-bind-now.c
+++ b/src/daemon/ltdl-bind-now.c
@@ -1,5 +1,3 @@
-/* $Id: ltdl-bind-now.c 2167 2008-03-27 23:35:06Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,21 +24,20 @@
#include <config.h>
#endif
-#if HAVE_DLFCN_H
+#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
-#if HAVE_SYS_DL_H
+#ifdef HAVE_SYS_DL_H
#include <sys/dl.h>
#endif
-#ifndef HAVE_STRUCT_LT_USER_DLLOADER
-/* Only used with ltdl 2.2 */
#include <string.h>
-#endif
#include <ltdl.h>
+#include <pulse/i18n.h>
+
#include <pulsecore/macro.h>
#include <pulsecore/mutex.h>
#include <pulsecore/thread.h>
@@ -56,9 +53,9 @@
#undef PA_BIND_NOW
#endif
-static pa_mutex *libtool_mutex = NULL;
+#ifdef HAVE_LT_DLMUTEX_REGISTER
-PA_STATIC_TLS_DECLARE_NO_FREE(libtool_tls);
+static pa_mutex *libtool_mutex = NULL;
static void libtool_lock(void) {
pa_mutex_lock(libtool_mutex);
@@ -68,6 +65,10 @@ static void libtool_unlock(void) {
pa_mutex_unlock(libtool_mutex);
}
+#endif
+
+PA_STATIC_TLS_DECLARE_NO_FREE(libtool_tls);
+
static void libtool_set_error(const char *error) {
PA_STATIC_TLS_SET(libtool_tls, (char*) error);
}
@@ -91,16 +92,19 @@ static const char *libtool_get_error(void) {
*/
#ifndef HAVE_LT_DLADVISE
-static lt_module bind_now_open(lt_user_data d, const char *fname) {
+static lt_module bind_now_open(lt_user_data d, const char *fname)
#else
- static lt_module bind_now_open(lt_user_data d, const char *fname, lt_dladvise advise) {
+static lt_module bind_now_open(lt_user_data d, const char *fname, lt_dladvise advise)
#endif
+{
lt_module m;
pa_assert(fname);
if (!(m = dlopen(fname, PA_BIND_NOW))) {
+#ifdef HAVE_LT_DLMUTEX_REGISTER
libtool_set_error(dlerror());
+#endif
return NULL;
}
@@ -112,7 +116,9 @@ static int bind_now_close(lt_user_data d, lt_module m) {
pa_assert(m);
if (dlclose(m) != 0){
+#ifdef HAVE_LT_DLMUTEX_REGISTER
libtool_set_error(dlerror());
+#endif
return 1;
}
@@ -126,7 +132,9 @@ static lt_ptr bind_now_find_sym(lt_user_data d, lt_module m, const char *symbol)
pa_assert(symbol);
if (!(ptr = dlsym(m, symbol))) {
+#ifdef HAVE_LT_DLMUTEX_REGISTER
libtool_set_error(dlerror());
+#endif
return NULL;
}
@@ -152,8 +160,9 @@ void pa_ltdl_init(void) {
#endif
pa_assert_se(lt_dlinit() == 0);
- pa_assert_se(libtool_mutex = pa_mutex_new(TRUE, FALSE));
+
#ifdef HAVE_LT_DLMUTEX_REGISTER
+ pa_assert_se(libtool_mutex = pa_mutex_new(TRUE, FALSE));
pa_assert_se(lt_dlmutex_register(libtool_lock, libtool_unlock, libtool_set_error, libtool_get_error) == 0);
#endif
@@ -165,14 +174,15 @@ void pa_ltdl_init(void) {
/* Add our BIND_NOW loader as the default module loader. */
if (lt_dlloader_add(place, &loader, "bind-now-loader") != 0)
- pa_log_warn("Failed to add bind-now-loader.");
+ pa_log_warn(_("Failed to add bind-now-loader."));
# else
/* Already initialised */
- if ( dlopen_loader != NULL ) return;
+ if (dlopen_loader)
+ return;
if (!(dlopen_loader = lt_dlloader_find("dlopen"))) {
- pa_log_warn("Failed to find original dlopen loader.");
- return;
+ pa_log_warn(_("Failed to find original dlopen loader."));
+ return;
}
memcpy(&bindnow_loader, dlopen_loader, sizeof(bindnow_loader));
@@ -184,14 +194,16 @@ void pa_ltdl_init(void) {
/* Add our BIND_NOW loader as the default module loader. */
if (lt_dlloader_add(&bindnow_loader) != 0)
- pa_log_warn("Failed to add bind-now-loader.");
+ pa_log_warn(_("Failed to add bind-now-loader."));
# endif
#endif
}
void pa_ltdl_done(void) {
pa_assert_se(lt_dlexit() == 0);
+
+#ifdef HAVE_LT_DLMUTEX_REGISTER
pa_mutex_free(libtool_mutex);
libtool_mutex = NULL;
+#endif
}
-
diff --git a/src/daemon/ltdl-bind-now.h b/src/daemon/ltdl-bind-now.h
index 4f2042b..f95d13b 100644
--- a/src/daemon/ltdl-bind-now.h
+++ b/src/daemon/ltdl-bind-now.h
@@ -1,8 +1,6 @@
#ifndef foopulsecoreltdlbindnowhfoo
#define foopulsecoreltdlbindnowhfoo
-/* $Id: ltdl-bind-now.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 1e3b358..fad635f 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -1,5 +1,3 @@
-/* $Id: main.c 2187 2008-03-28 18:09:25Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -66,7 +64,9 @@
#include <pulse/mainloop-signal.h>
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
+#include <pulsecore/lock-autospawn.h>
#include <pulsecore/winsock.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core.h>
@@ -111,11 +111,11 @@ int __padsp_disabled__ = 7;
#ifdef OS_IS_WIN32
-static void message_cb(pa_mainloop_api*a, pa_time_event*e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+static void message_cb(pa_mainloop_api*a, pa_time_event*e, const struct timeval *tv, void *userdata) {
MSG msg;
struct timeval tvnext;
- while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
if (msg.message == WM_QUIT)
raise(SIGTERM);
else {
@@ -130,8 +130,8 @@ static void message_cb(pa_mainloop_api*a, pa_time_event*e, PA_GCC_UNUSED const s
#endif
-static void signal_callback(pa_mainloop_api*m, PA_GCC_UNUSED pa_signal_event *e, int sig, void *userdata) {
- pa_log_info("Got signal %s.", pa_sig2str(sig));
+static void signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void *userdata) {
+ pa_log_info(_("Got signal %s."), pa_sig2str(sig));
switch (sig) {
#ifdef SIGUSR1
@@ -158,14 +158,12 @@ static void signal_callback(pa_mainloop_api*m, PA_GCC_UNUSED pa_signal_event *e,
case SIGINT:
case SIGTERM:
default:
- pa_log_info("Exiting.");
+ pa_log_info(_("Exiting."));
m->quit(m, 1);
break;
}
}
-#define set_env(key, value) putenv(pa_sprintf_malloc("%s=%s", (key), (value)))
-
#if defined(HAVE_PWD_H) && defined(HAVE_GRP_H)
static int change_user(void) {
@@ -178,34 +176,41 @@ static int change_user(void) {
* afterwards. */
if (!(pw = getpwnam(PA_SYSTEM_USER))) {
- pa_log("Failed to find user '%s'.", PA_SYSTEM_USER);
+ pa_log(_("Failed to find user '%s'."), PA_SYSTEM_USER);
return -1;
}
if (!(gr = getgrnam(PA_SYSTEM_GROUP))) {
- pa_log("Failed to find group '%s'.", PA_SYSTEM_GROUP);
+ pa_log(_("Failed to find group '%s'."), PA_SYSTEM_GROUP);
return -1;
}
- pa_log_info("Found user '%s' (UID %lu) and group '%s' (GID %lu).",
+ pa_log_info(_("Found user '%s' (UID %lu) and group '%s' (GID %lu)."),
PA_SYSTEM_USER, (unsigned long) pw->pw_uid,
PA_SYSTEM_GROUP, (unsigned long) gr->gr_gid);
if (pw->pw_gid != gr->gr_gid) {
- pa_log("GID of user '%s' and of group '%s' don't match.", PA_SYSTEM_USER, PA_SYSTEM_GROUP);
+ pa_log(_("GID of user '%s' and of group '%s' don't match."), PA_SYSTEM_USER, PA_SYSTEM_GROUP);
return -1;
}
if (strcmp(pw->pw_dir, PA_SYSTEM_RUNTIME_PATH) != 0)
- pa_log_warn("Warning: home directory of user '%s' is not '%s', ignoring.", PA_SYSTEM_USER, PA_SYSTEM_RUNTIME_PATH);
+ pa_log_warn(_("Home directory of user '%s' is not '%s', ignoring."), PA_SYSTEM_USER, PA_SYSTEM_RUNTIME_PATH);
if (pa_make_secure_dir(PA_SYSTEM_RUNTIME_PATH, 0755, pw->pw_uid, gr->gr_gid) < 0) {
- pa_log("Failed to create '%s': %s", PA_SYSTEM_RUNTIME_PATH, pa_cstrerror(errno));
+ pa_log(_("Failed to create '%s': %s"), PA_SYSTEM_RUNTIME_PATH, pa_cstrerror(errno));
+ return -1;
+ }
+
+ if (pa_make_secure_dir(PA_SYSTEM_STATE_PATH, 0700, pw->pw_uid, gr->gr_gid) < 0) {
+ pa_log(_("Failed to create '%s': %s"), PA_SYSTEM_STATE_PATH, pa_cstrerror(errno));
return -1;
}
+ /* We don't create the config dir here, because we don't need to write to it */
+
if (initgroups(PA_SYSTEM_USER, gr->gr_gid) != 0) {
- pa_log("Failed to change group list: %s", pa_cstrerror(errno));
+ pa_log(_("Failed to change group list: %s"), pa_cstrerror(errno));
return -1;
}
@@ -221,7 +226,7 @@ static int change_user(void) {
#endif
if (r < 0) {
- pa_log("Failed to change GID: %s", pa_cstrerror(errno));
+ pa_log(_("Failed to change GID: %s"), pa_cstrerror(errno));
return -1;
}
@@ -237,20 +242,21 @@ static int change_user(void) {
#endif
if (r < 0) {
- pa_log("Failed to change UID: %s", pa_cstrerror(errno));
+ pa_log(_("Failed to change UID: %s"), pa_cstrerror(errno));
return -1;
}
- set_env("USER", PA_SYSTEM_USER);
- set_env("USERNAME", PA_SYSTEM_USER);
- set_env("LOGNAME", PA_SYSTEM_USER);
- set_env("HOME", PA_SYSTEM_RUNTIME_PATH);
+ pa_set_env("USER", PA_SYSTEM_USER);
+ pa_set_env("USERNAME", PA_SYSTEM_USER);
+ pa_set_env("LOGNAME", PA_SYSTEM_USER);
+ pa_set_env("HOME", PA_SYSTEM_RUNTIME_PATH);
/* Relevant for pa_runtime_path() */
- set_env("PULSE_RUNTIME_PATH", PA_SYSTEM_RUNTIME_PATH);
- set_env("PULSE_CONFIG_PATH", PA_SYSTEM_RUNTIME_PATH);
+ pa_set_env("PULSE_RUNTIME_PATH", PA_SYSTEM_RUNTIME_PATH);
+ pa_set_env("PULSE_CONFIG_PATH", PA_SYSTEM_CONFIG_PATH);
+ pa_set_env("PULSE_STATE_PATH", PA_SYSTEM_STATE_PATH);
- pa_log_info("Successfully dropped root privileges.");
+ pa_log_info(_("Successfully dropped root privileges."));
return 0;
}
@@ -258,29 +264,12 @@ static int change_user(void) {
#else /* HAVE_PWD_H && HAVE_GRP_H */
static int change_user(void) {
- pa_log("System wide mode unsupported on this platform.");
+ pa_log(_("System wide mode unsupported on this platform."));
return -1;
}
#endif /* HAVE_PWD_H && HAVE_GRP_H */
-static int create_runtime_dir(void) {
- char fn[PATH_MAX];
-
- pa_runtime_path(NULL, fn, sizeof(fn));
-
- /* This function is called only when the daemon is started in
- * per-user mode. We create the runtime directory somewhere in
- * /tmp/ with the current UID/GID */
-
- if (pa_make_secure_dir(fn, 0700, (uid_t)-1, (gid_t)-1) < 0) {
- pa_log("Failed to create '%s': %s", fn, pa_cstrerror(errno));
- return -1;
- }
-
- return 0;
-}
-
#ifdef HAVE_SYS_RESOURCE_H
static int set_one_rlimit(const pa_rlimit *r, int resource, const char *name) {
@@ -293,7 +282,7 @@ static int set_one_rlimit(const pa_rlimit *r, int resource, const char *name) {
rl.rlim_cur = rl.rlim_max = r->value;
if (setrlimit(resource, &rl) < 0) {
- pa_log_warn("setrlimit(%s, (%u, %u)) failed: %s", name, (unsigned) r->value, (unsigned) r->value, pa_cstrerror(errno));
+ pa_log_info(_("setrlimit(%s, (%u, %u)) failed: %s"), name, (unsigned) r->value, (unsigned) r->value, pa_cstrerror(errno));
return -1;
}
@@ -301,24 +290,37 @@ static int set_one_rlimit(const pa_rlimit *r, int resource, const char *name) {
}
static void set_all_rlimits(const pa_daemon_conf *conf) {
- set_one_rlimit(&conf->rlimit_as, RLIMIT_AS, "RLIMIT_AS");
- set_one_rlimit(&conf->rlimit_core, RLIMIT_CORE, "RLIMIT_CORE");
- set_one_rlimit(&conf->rlimit_data, RLIMIT_DATA, "RLIMIT_DATA");
set_one_rlimit(&conf->rlimit_fsize, RLIMIT_FSIZE, "RLIMIT_FSIZE");
- set_one_rlimit(&conf->rlimit_nofile, RLIMIT_NOFILE, "RLIMIT_NOFILE");
+ set_one_rlimit(&conf->rlimit_data, RLIMIT_DATA, "RLIMIT_DATA");
set_one_rlimit(&conf->rlimit_stack, RLIMIT_STACK, "RLIMIT_STACK");
+ set_one_rlimit(&conf->rlimit_core, RLIMIT_CORE, "RLIMIT_CORE");
+ set_one_rlimit(&conf->rlimit_rss, RLIMIT_RSS, "RLIMIT_RSS");
#ifdef RLIMIT_NPROC
set_one_rlimit(&conf->rlimit_nproc, RLIMIT_NPROC, "RLIMIT_NPROC");
#endif
+ set_one_rlimit(&conf->rlimit_nofile, RLIMIT_NOFILE, "RLIMIT_NOFILE");
#ifdef RLIMIT_MEMLOCK
set_one_rlimit(&conf->rlimit_memlock, RLIMIT_MEMLOCK, "RLIMIT_MEMLOCK");
#endif
+ set_one_rlimit(&conf->rlimit_as, RLIMIT_AS, "RLIMIT_AS");
+#ifdef RLIMIT_LOCKS
+ set_one_rlimit(&conf->rlimit_locks, RLIMIT_LOCKS, "RLIMIT_LOCKS");
+#endif
+#ifdef RLIMIT_SIGPENDING
+ set_one_rlimit(&conf->rlimit_sigpending, RLIMIT_SIGPENDING, "RLIMIT_SIGPENDING");
+#endif
+#ifdef RLIMIT_MSGQUEUE
+ set_one_rlimit(&conf->rlimit_msgqueue, RLIMIT_MSGQUEUE, "RLIMIT_MSGQUEUE");
+#endif
#ifdef RLIMIT_NICE
set_one_rlimit(&conf->rlimit_nice, RLIMIT_NICE, "RLIMIT_NICE");
#endif
#ifdef RLIMIT_RTPRIO
set_one_rlimit(&conf->rlimit_rtprio, RLIMIT_RTPRIO, "RLIMIT_RTPRIO");
#endif
+#ifdef RLIMIT_RTTIME
+ set_one_rlimit(&conf->rlimit_rttime, RLIMIT_RTTIME, "RLIMIT_RTTIME");
+#endif
}
#endif
@@ -329,18 +331,25 @@ int main(int argc, char *argv[]) {
pa_mainloop *mainloop = NULL;
char *s;
int r = 0, retval = 1, d = 0;
- int daemon_pipe[2] = { -1, -1 };
pa_bool_t suid_root, real_root;
- int valid_pid_file = 0;
+ pa_bool_t valid_pid_file = FALSE;
gid_t gid = (gid_t) -1;
- pa_bool_t allow_realtime, allow_high_priority;
pa_bool_t ltdl_init = FALSE;
-
+ int passed_fd = -1;
+ const char *e;
+#ifdef HAVE_FORK
+ int daemon_pipe[2] = { -1, -1 };
+#endif
#ifdef OS_IS_WIN32
- pa_time_event *timer;
- struct timeval tv;
+ pa_time_event *win32_timer;
+ struct timeval win32_tv;
#endif
+ char *lf = NULL;
+ int autospawn_fd = -1;
+ pa_bool_t autospawn_locked = FALSE;
+ pa_log_set_maximal_level(PA_LOG_INFO);
+ pa_log_set_ident("pulseaudio");
#if defined(__linux__) && defined(__OPTIMIZE__)
/*
@@ -355,7 +364,7 @@ int main(int argc, char *argv[]) {
/* We have to execute ourselves, because the libc caches the
* value of $LD_BIND_NOW on initialization. */
- putenv(pa_xstrdup("LD_BIND_NOW=1"));
+ pa_set_env("LD_BIND_NOW", "1");
pa_assert_se(rp = pa_readlink("/proc/self/exe"));
pa_assert_se(execv(rp, argv) == 0);
}
@@ -369,7 +378,7 @@ int main(int argc, char *argv[]) {
suid_root = FALSE;
#endif
- if (suid_root) {
+ if (!real_root) {
/* Drop all capabilities except CAP_SYS_NICE */
pa_limit_caps();
@@ -385,13 +394,24 @@ int main(int argc, char *argv[]) {
* is just too risky tun let PA run as root all the time. */
}
+ if ((e = getenv("PULSE_PASSED_FD"))) {
+ passed_fd = atoi(e);
+
+ if (passed_fd <= 2)
+ passed_fd = -1;
+ }
+
+ pa_close_all(passed_fd, -1);
+
+ pa_reset_sigs(-1);
+ pa_unblock_sigs(-1);
+
/* At this point, we are a normal user, possibly with CAP_NICE if
* we were started SUID. If we are started as normal root, than we
* still are normal root. */
setlocale(LC_ALL, "");
- pa_log_set_maximal_level(PA_LOG_INFO);
- pa_log_set_ident("pulseaudio");
+ pa_init_i18n();
conf = pa_daemon_conf_new();
@@ -402,108 +422,124 @@ int main(int argc, char *argv[]) {
goto finish;
if (pa_cmdline_parse(conf, argc, argv, &d) < 0) {
- pa_log("Failed to parse command line.");
+ pa_log(_("Failed to parse command line."));
goto finish;
}
pa_log_set_maximal_level(conf->log_level);
pa_log_set_target(conf->auto_log_target ? PA_LOG_STDERR : conf->log_target, NULL);
- if (suid_root) {
- /* Ok, we're suid root, so let's better not enable high prio
- * or RT by default */
+ pa_log_debug("Started as real root: %s, suid root: %s", pa_yes_no(real_root), pa_yes_no(suid_root));
+
+ if (!real_root && pa_have_caps()) {
+ pa_bool_t allow_high_priority = FALSE, allow_realtime = FALSE;
+
+ /* Let's better not enable high prio or RT by default */
+
+ if (conf->high_priority && !allow_high_priority) {
+ if (pa_own_uid_in_group(PA_REALTIME_GROUP, &gid) > 0) {
+ pa_log_info(_("We're in the group '%s', allowing high-priority scheduling."), PA_REALTIME_GROUP);
+ allow_high_priority = TRUE;
+ }
+ }
- allow_high_priority = allow_realtime = FALSE;
+ if (conf->realtime_scheduling && !allow_realtime) {
+ if (pa_own_uid_in_group(PA_REALTIME_GROUP, &gid) > 0) {
+ pa_log_info(_("We're in the group '%s', allowing real-time scheduling."), PA_REALTIME_GROUP);
+ allow_realtime = TRUE;
+ }
+ }
#ifdef HAVE_POLKIT
- if (conf->high_priority) {
+ if (conf->high_priority && !allow_high_priority) {
if (pa_polkit_check("org.pulseaudio.acquire-high-priority") > 0) {
- pa_log_info("PolicyKit grants us acquire-high-priority privilige.");
+ pa_log_info(_("PolicyKit grants us acquire-high-priority privilege."));
allow_high_priority = TRUE;
} else
- pa_log_info("PolicyKit refuses acquire-high-priority privilige.");
+ pa_log_info(_("PolicyKit refuses acquire-high-priority privilege."));
}
- if (conf->realtime_scheduling) {
+ if (conf->realtime_scheduling && !allow_realtime) {
if (pa_polkit_check("org.pulseaudio.acquire-real-time") > 0) {
- pa_log_info("PolicyKit grants us acquire-real-time privilige.");
+ pa_log_info(_("PolicyKit grants us acquire-real-time privilege."));
allow_realtime = TRUE;
} else
- pa_log_info("PolicyKit refuses acquire-real-time privilige.");
+ pa_log_info(_("PolicyKit refuses acquire-real-time privilege."));
}
#endif
- if ((conf->high_priority || conf->realtime_scheduling) && pa_own_uid_in_group(PA_REALTIME_GROUP, &gid) > 0) {
- pa_log_info("We're in the group '"PA_REALTIME_GROUP"', allowing real-time and high-priority scheduling.");
- allow_realtime = conf->realtime_scheduling;
- allow_high_priority = conf->high_priority;
- }
-
if (!allow_high_priority && !allow_realtime) {
/* OK, there's no further need to keep CAP_NICE. Hence
* let's give it up early */
pa_drop_caps();
- pa_drop_root();
- suid_root = real_root = FALSE;
if (conf->high_priority || conf->realtime_scheduling)
- pa_log_notice("Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:\n"
- "We are not in group '"PA_REALTIME_GROUP"' and PolicyKit refuse to grant us priviliges. Dropping SUID again.\n"
- "For enabling real-time scheduling please acquire the appropriate PolicyKit priviliges, or become a member of '"PA_REALTIME_GROUP"', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.");
+ pa_log_notice(_("Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:\n"
+ "We are not in group '"PA_REALTIME_GROUP"' and PolicyKit refuse to grant us priviliges. Dropping SUID again.\n"
+ "For enabling real-time scheduling please acquire the appropriate PolicyKit priviliges, or become a member of '"PA_REALTIME_GROUP"', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user."));
}
-
- } else {
-
- /* OK, we're a normal user, so let's allow the user evrything
- * he asks for, it's now the kernel's job to enforce limits,
- * not ours anymore */
- allow_high_priority = allow_realtime = TRUE;
}
- if (conf->high_priority && !allow_high_priority) {
- pa_log_info("High-priority scheduling enabled in configuration but now allowed by policy. Disabling forcibly.");
- conf->high_priority = FALSE;
- }
+#ifdef HAVE_SYS_RESOURCE_H
+ /* Reset resource limits. If we are run as root (for system mode)
+ * this might end up increasing the limits, which is intended
+ * behaviour. For all other cases, i.e. started as normal user, or
+ * SUID root at this point we should have no CAP_SYS_RESOURCE and
+ * increasing the limits thus should fail. Which is, too, intended
+ * behaviour */
- if (conf->realtime_scheduling && !allow_realtime) {
- pa_log_info("Real-time scheduling enabled in configuration but now allowed by policy. Disabling forcibly.");
- conf->realtime_scheduling = FALSE;
- }
+ set_all_rlimits(conf);
+#endif
+
+ if (conf->high_priority && !pa_can_high_priority())
+ pa_log_warn(_("High-priority scheduling enabled in configuration but not allowed by policy."));
- if (conf->high_priority && conf->cmd == PA_CMD_DAEMON)
+ if (conf->high_priority && (conf->cmd == PA_CMD_DAEMON || conf->cmd == PA_CMD_START))
pa_raise_priority(conf->nice_level);
- if (suid_root) {
+ if (!real_root && pa_have_caps()) {
pa_bool_t drop;
- drop = conf->cmd != PA_CMD_DAEMON || !conf->realtime_scheduling;
+ drop = (conf->cmd != PA_CMD_DAEMON && conf->cmd != PA_CMD_START) || !conf->realtime_scheduling;
#ifdef RLIMIT_RTPRIO
if (!drop) {
-
+ struct rlimit rl;
/* At this point we still have CAP_NICE if we were loaded
* SUID root. If possible let's acquire RLIMIT_RTPRIO
* instead and give CAP_NICE up. */
- const pa_rlimit rl = { 9, TRUE };
+ if (getrlimit(RLIMIT_RTPRIO, &rl) >= 0) {
- if (set_one_rlimit(&rl, RLIMIT_RTPRIO, "RLIMIT_RTPRIO") >= 0) {
- pa_log_info("Successfully increased RLIMIT_RTPRIO, giving up CAP_NICE.");
- drop = TRUE;
- } else
- pa_log_warn("RLIMIT_RTPRIO failed: %s", pa_cstrerror(errno));
+ if (rl.rlim_cur >= 9)
+ drop = TRUE;
+ else {
+ rl.rlim_max = rl.rlim_cur = 9;
+
+ if (setrlimit(RLIMIT_RTPRIO, &rl) >= 0) {
+ pa_log_info(_("Successfully increased RLIMIT_RTPRIO"));
+ drop = TRUE;
+ } else
+ pa_log_warn(_("RLIMIT_RTPRIO failed: %s"), pa_cstrerror(errno));
+ }
+ }
}
#endif
if (drop) {
+ pa_log_info(_("Giving up CAP_NICE"));
pa_drop_caps();
- pa_drop_root();
- suid_root = real_root = FALSE;
+ suid_root = FALSE;
}
}
+ if (conf->realtime_scheduling && !pa_can_realtime())
+ pa_log_warn(_("Real-time scheduling enabled in configuration but not allowed by policy."));
+
+ pa_log_debug("Can realtime: %s, can high-priority: %s", pa_yes_no(pa_can_realtime()), pa_yes_no(pa_can_high_priority()));
+
LTDL_SET_PRELOADED_SYMBOLS();
pa_ltdl_init();
ltdl_init = TRUE;
@@ -558,9 +594,9 @@ int main(int argc, char *argv[]) {
pid_t pid;
if (pa_pid_file_check_running(&pid, "pulseaudio") < 0)
- pa_log_info("Daemon not running");
+ pa_log_info(_("Daemon not running"));
else {
- pa_log_info("Daemon running as PID %u", pid);
+ pa_log_info(_("Daemon running as PID %u"), pid);
retval = 0;
}
@@ -570,7 +606,7 @@ int main(int argc, char *argv[]) {
case PA_CMD_KILL:
if (pa_pid_file_kill(SIGINT, NULL, "pulseaudio") < 0)
- pa_log("Failed to kill daemon.");
+ pa_log(_("Failed to kill daemon: %s"), pa_cstrerror(errno));
else
retval = 0;
@@ -584,55 +620,109 @@ int main(int argc, char *argv[]) {
goto finish;
default:
- pa_assert(conf->cmd == PA_CMD_DAEMON);
+ pa_assert(conf->cmd == PA_CMD_DAEMON || conf->cmd == PA_CMD_START);
}
if (real_root && !conf->system_instance)
- pa_log_warn("This program is not intended to be run as root (unless --system is specified).");
+ pa_log_warn(_("This program is not intended to be run as root (unless --system is specified)."));
else if (!real_root && conf->system_instance) {
- pa_log("Root priviliges required.");
+ pa_log(_("Root priviliges required."));
goto finish;
}
+ if (conf->cmd == PA_CMD_START && conf->system_instance) {
+ pa_log(_("--start not supported for system instances."));
+ goto finish;
+ }
+
+ if (conf->system_instance && !conf->disallow_exit)
+ pa_log_warn(_("Running in system mode, but --disallow-exit not set!"));
+
+ if (conf->system_instance && !conf->disallow_module_loading)
+ pa_log_warn(_("Running in system mode, but --disallow-module-loading not set!"));
+
+ if (conf->system_instance && !conf->disable_shm) {
+ pa_log_notice(_("Running in system mode, forcibly disabling SHM mode!"));
+ conf->disable_shm = TRUE;
+ }
+
+ if (conf->system_instance && conf->exit_idle_time > 0) {
+ pa_log_notice(_("Running in system mode, forcibly disabling exit idle time!"));
+ conf->exit_idle_time = 0;
+ }
+
+ if (conf->cmd == PA_CMD_START) {
+ /* If we shall start PA only when it is not running yet, we
+ * first take the autospawn lock to make things
+ * synchronous. */
+
+ if ((autospawn_fd = pa_autospawn_lock_init()) < 0) {
+ pa_log("Failed to initialize autospawn lock");
+ goto finish;
+ }
+
+ if ((pa_autospawn_lock_acquire(TRUE) < 0)) {
+ pa_log("Failed to acquire autospawn lock");
+ goto finish;
+ }
+
+ autospawn_locked = TRUE;
+ }
+
if (conf->daemonize) {
pid_t child;
int tty_fd;
if (pa_stdio_acquire() < 0) {
- pa_log("Failed to acquire stdio.");
+ pa_log(_("Failed to acquire stdio."));
goto finish;
}
#ifdef HAVE_FORK
if (pipe(daemon_pipe) < 0) {
- pa_log("Failed to create pipe.");
+ pa_log(_("pipe failed: %s"), pa_cstrerror(errno));
goto finish;
}
if ((child = fork()) < 0) {
- pa_log("fork() failed: %s", pa_cstrerror(errno));
+ pa_log(_("fork() failed: %s"), pa_cstrerror(errno));
goto finish;
}
if (child != 0) {
+ ssize_t n;
/* Father */
pa_assert_se(pa_close(daemon_pipe[1]) == 0);
daemon_pipe[1] = -1;
- if (pa_loop_read(daemon_pipe[0], &retval, sizeof(retval), NULL) != sizeof(retval)) {
- pa_log("read() failed: %s", pa_cstrerror(errno));
+ if ((n = pa_loop_read(daemon_pipe[0], &retval, sizeof(retval), NULL)) != sizeof(retval)) {
+
+ if (n < 0)
+ pa_log(_("read() failed: %s"), pa_cstrerror(errno));
+
retval = 1;
}
if (retval)
- pa_log("daemon startup failed.");
+ pa_log(_("Daemon startup failed."));
else
- pa_log_info("daemon startup successful.");
+ pa_log_info(_("Daemon startup successful."));
goto finish;
}
+ if (autospawn_fd >= 0) {
+ /* The lock file is unlocked from the parent, so we need
+ * to close it in the child */
+
+ pa_autospawn_lock_release();
+ pa_autospawn_lock_done(TRUE);
+
+ autospawn_locked = FALSE;
+ autospawn_fd = -1;
+ }
+
pa_assert_se(pa_close(daemon_pipe[0]) == 0);
daemon_pipe[0] = -1;
#endif
@@ -652,9 +742,9 @@ int main(int argc, char *argv[]) {
pa_close(1);
pa_close(2);
- open("/dev/null", O_RDONLY);
- open("/dev/null", O_WRONLY);
- open("/dev/null", O_WRONLY);
+ pa_assert_se(open("/dev/null", O_RDONLY) == 0);
+ pa_assert_se(open("/dev/null", O_WRONLY) == 1);
+ pa_assert_se(open("/dev/null", O_WRONLY) == 2);
#else
FreeConsole();
#endif
@@ -677,43 +767,87 @@ int main(int argc, char *argv[]) {
#endif
}
+ pa_set_env("PULSE_INTERNAL", "1");
pa_assert_se(chdir("/") == 0);
umask(0022);
- if (conf->system_instance) {
+ if (conf->system_instance)
if (change_user() < 0)
goto finish;
- } else if (create_runtime_dir() < 0)
+
+ pa_set_env("PULSE_SYSTEM", conf->system_instance ? "1" : "0");
+
+ pa_log_info(_("This is PulseAudio %s"), PACKAGE_VERSION);
+ pa_log_debug(_("Compilation host: %s"), CANONICAL_HOST);
+ pa_log_debug(_("Compilation CFLAGS: %s"), PA_CFLAGS);
+
+ s = pa_uname_string();
+ pa_log_debug(_("Running on host: %s"), s);
+ pa_xfree(s);
+
+ pa_log_info(_("Page size is %lu bytes"), (unsigned long) PA_PAGE_SIZE);
+
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ pa_log_debug(_("Compiled with Valgrind support: yes"));
+#else
+ pa_log_debug(_("Compiled with Valgrind support: no"));
+#endif
+
+ pa_log_debug(_("Running in valgrind mode: %s"), pa_yes_no(pa_in_valgrind()));
+
+#ifdef __OPTIMIZE__
+ pa_log_debug(_("Optimized build: yes"));
+#else
+ pa_log_debug(_("Optimized build: no"));
+#endif
+
+ if (!(s = pa_machine_id())) {
+ pa_log(_("Failed to get machine ID"));
+ goto finish;
+ }
+ pa_log_info(_("Machine ID is %s."), s);
+ pa_xfree(s);
+
+ if (!(s = pa_get_runtime_dir()))
+ goto finish;
+ pa_log_info(_("Using runtime directory %s."), s);
+ pa_xfree(s);
+
+ if (!(s = pa_get_state_dir()))
goto finish;
+ pa_log_info(_("Using state directory %s."), s);
+ pa_xfree(s);
+
+ pa_log_info(_("Running in system mode: %s"), pa_yes_no(pa_in_system_mode()));
if (conf->use_pid_file) {
- if (pa_pid_file_create() < 0) {
- pa_log("pa_pid_file_create() failed.");
-#ifdef HAVE_FORK
- if (conf->daemonize)
- pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL);
-#endif
+ int z;
+
+ if ((z = pa_pid_file_create("pulseaudio")) != 0) {
+
+ if (conf->cmd == PA_CMD_START && z > 0) {
+ /* If we are already running and with are run in
+ * --start mode, then let's return this as success. */
+
+ retval = 0;
+ goto finish;
+ }
+
+ pa_log(_("pa_pid_file_create() failed."));
goto finish;
}
- valid_pid_file = 1;
+ valid_pid_file = TRUE;
}
-#ifdef HAVE_SYS_RESOURCE_H
- set_all_rlimits(conf);
-#endif
-
#ifdef SIGPIPE
signal(SIGPIPE, SIG_IGN);
#endif
- pa_log_info("This is PulseAudio " PACKAGE_VERSION);
- pa_log_info("Page size is %lu bytes", (unsigned long) PA_PAGE_SIZE);
-
if (pa_rtclock_hrtimer())
- pa_log_info("Fresh high-resolution timers available! Bon appetit!");
+ pa_log_info(_("Fresh high-resolution timers available! Bon appetit!"));
else
- pa_log_info("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!");
+ pa_log_info(_("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!"));
#ifdef SIGRTMIN
/* Valgrind uses SIGRTMAX. To easy debugging we don't use it here */
@@ -722,12 +856,11 @@ int main(int argc, char *argv[]) {
pa_assert_se(mainloop = pa_mainloop_new());
- if (!(c = pa_core_new(pa_mainloop_get_api(mainloop), !conf->disable_shm))) {
- pa_log("pa_core_new() failed.");
+ if (!(c = pa_core_new(pa_mainloop_get_api(mainloop), !conf->disable_shm, conf->shm_size))) {
+ pa_log(_("pa_core_new() failed."));
goto finish;
}
- c->is_system_instance = !!conf->system_instance;
c->default_sample_spec = conf->default_sample_spec;
c->default_n_fragments = conf->default_n_fragments;
c->default_fragment_size_msec = conf->default_fragment_size_msec;
@@ -738,11 +871,13 @@ int main(int argc, char *argv[]) {
c->realtime_priority = conf->realtime_priority;
c->realtime_scheduling = !!conf->realtime_scheduling;
c->disable_remixing = !!conf->disable_remixing;
+ c->disable_lfe_remixing = !!conf->disable_lfe_remixing;
+ c->running_as_daemon = !!conf->daemonize;
+ c->disallow_exit = conf->disallow_exit;
pa_assert_se(pa_signal_init(pa_mainloop_get_api(mainloop)) == 0);
pa_signal_new(SIGINT, signal_callback, c);
pa_signal_new(SIGTERM, signal_callback, c);
-
#ifdef SIGUSR1
pa_signal_new(SIGUSR1, signal_callback, c);
#endif
@@ -754,23 +889,27 @@ int main(int argc, char *argv[]) {
#endif
#ifdef OS_IS_WIN32
- pa_assert_se(timer = pa_mainloop_get_api(mainloop)->time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&tv), message_cb, NULL));
+ win32_timer = pa_mainloop_get_api(mainloop)->time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL);
#endif
- if (conf->daemonize)
- c->running_as_daemon = TRUE;
-
oil_init();
if (!conf->no_cpu_limit)
pa_assert_se(pa_cpu_limit_init(pa_mainloop_get_api(mainloop)) == 0);
buf = pa_strbuf_new();
- if (conf->default_script_file)
- r = pa_cli_command_execute_file(c, conf->default_script_file, buf, &conf->fail);
+ if (conf->load_default_script_file) {
+ FILE *f;
+
+ if ((f = pa_daemon_conf_open_default_script_file(conf))) {
+ r = pa_cli_command_execute_file_stream(c, f, buf, &conf->fail);
+ fclose(f);
+ }
+ }
if (r >= 0)
r = pa_cli_command_execute(c, conf->script_commands, buf, &conf->fail);
+
pa_log_error("%s", s = pa_strbuf_tostring_free(buf));
pa_xfree(s);
@@ -779,54 +918,70 @@ int main(int argc, char *argv[]) {
c->disallow_module_loading = !!conf->disallow_module_loading;
if (r < 0 && conf->fail) {
- pa_log("Failed to initialize daemon.");
-#ifdef HAVE_FORK
- if (conf->daemonize)
- pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL);
-#endif
- } else if (!c->modules || pa_idxset_size(c->modules) == 0) {
- pa_log("daemon startup without any loaded modules, refusing to work.");
-#ifdef HAVE_FORK
- if (conf->daemonize)
- pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL);
-#endif
- } else {
+ pa_log(_("Failed to initialize daemon."));
+ goto finish;
+ }
- retval = 0;
+ if (!c->modules || pa_idxset_size(c->modules) == 0) {
+ pa_log(_("Daemon startup without any loaded modules, refusing to work."));
+ goto finish;
+ }
- if (c->default_sink_name &&
- pa_namereg_get(c, c->default_sink_name, PA_NAMEREG_SINK, 1) == NULL) {
- pa_log_error("%s : Default sink name (%s) does not exist in name register.", __FILE__, c->default_sink_name);
- retval = !!conf->fail;
- }
+ if (c->default_sink_name && !pa_namereg_get(c, c->default_sink_name, PA_NAMEREG_SINK, TRUE) && conf->fail) {
+ pa_log_error(_("Default sink name (%s) does not exist in name register."), c->default_sink_name);
+ goto finish;
+ }
#ifdef HAVE_FORK
- if (conf->daemonize)
- pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL);
+ if (daemon_pipe[1] >= 0) {
+ int ok = 0;
+ pa_loop_write(daemon_pipe[1], &ok, sizeof(ok), NULL);
+ pa_close(daemon_pipe[1]);
+ daemon_pipe[1] = -1;
+ }
#endif
- if (!retval) {
- pa_log_info("Daemon startup complete.");
- if (pa_mainloop_run(mainloop, &retval) < 0)
- retval = 1;
- pa_log_info("Daemon shutdown initiated.");
- }
+ pa_log_info(_("Daemon startup complete."));
+
+ retval = 0;
+ if (pa_mainloop_run(mainloop, &retval) < 0)
+ goto finish;
+
+ pa_log_info(_("Daemon shutdown initiated."));
+
+finish:
+
+ if (autospawn_fd >= 0) {
+ if (autospawn_locked)
+ pa_autospawn_lock_release();
+
+ pa_autospawn_lock_done(FALSE);
}
+ if (lf)
+ pa_xfree(lf);
+
#ifdef OS_IS_WIN32
- pa_mainloop_get_api(mainloop)->time_free(timer);
+ if (win32_timer)
+ pa_mainloop_get_api(mainloop)->time_free(win32_timer);
#endif
- pa_core_unref(c);
+ if (c) {
+ pa_core_unref(c);
+ pa_log_info(_("Daemon terminated."));
+ }
if (!conf->no_cpu_limit)
pa_cpu_limit_done();
pa_signal_done();
- pa_log_info("Daemon terminated.");
+#ifdef HAVE_FORK
+ if (daemon_pipe[1] >= 0)
+ pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL);
-finish:
+ pa_close_pipe(daemon_pipe);
+#endif
if (mainloop)
pa_mainloop_free(mainloop);
@@ -837,8 +992,6 @@ finish:
if (valid_pid_file)
pa_pid_file_remove();
- pa_close_pipe(daemon_pipe);
-
#ifdef OS_IS_WIN32
WSACleanup();
#endif
diff --git a/src/daemon/org.pulseaudio.policy b/src/daemon/org.pulseaudio.policy
index 507a2cb..6cdeec6 100644
--- a/src/daemon/org.pulseaudio.policy
+++ b/src/daemon/org.pulseaudio.policy
@@ -3,8 +3,6 @@
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
-<!-- $Id$ -->
-
<!--
This file is part of PulseAudio.
diff --git a/src/daemon/polkit.c b/src/daemon/polkit.c
index ce7c83e..921e5d1 100644
--- a/src/daemon/polkit.c
+++ b/src/daemon/polkit.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -33,6 +31,8 @@
#include <dbus/dbus.h>
#include <polkit-dbus/polkit-dbus.h>
+#include <pulse/i18n.h>
+
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
@@ -52,12 +52,17 @@ int pa_polkit_check(const char *action_id) {
dbus_error_init(&dbus_error);
if (!(bus = dbus_bus_get(DBUS_BUS_SYSTEM, &dbus_error))) {
- pa_log_error("Cannot connect to system bus: %s", dbus_error.message);
+ pa_log_error(_("Cannot connect to system bus: %s"), dbus_error.message);
goto finish;
}
+ /* There seems to be a bug in some versions of D-Bus that causes
+ * dbus_shutdown() to call exit() when a connection without this
+ * flag disabled was created during runtime.*/
+ dbus_connection_set_exit_on_disconnect(bus, FALSE);
+
if (!(caller = polkit_caller_new_from_pid(bus, getpid(), &dbus_error))) {
- pa_log_error("Cannot get caller from PID: %s", dbus_error.message);
+ pa_log_error(_("Cannot get caller from PID: %s"), dbus_error.message);
goto finish;
}
@@ -69,12 +74,12 @@ int pa_polkit_check(const char *action_id) {
* -- an not the EUID or any other user id. */
if (!(polkit_caller_set_uid(caller, getuid()))) {
- pa_log_error("Cannot set UID on caller object.");
+ pa_log_error(_("Cannot set UID on caller object."));
goto finish;
}
if (!(polkit_caller_get_ck_session(caller, &session))) {
- pa_log_error("Failed to get CK session.");
+ pa_log_error(_("Failed to get CK session."));
goto finish;
}
@@ -82,27 +87,27 @@ int pa_polkit_check(const char *action_id) {
* object */
if (!(polkit_session_set_uid(session, getuid()))) {
- pa_log_error("Cannot set UID on session object.");
+ pa_log_error(_("Cannot set UID on session object."));
goto finish;
}
if (!(action = polkit_action_new())) {
- pa_log_error("Cannot allocate PolKitAction.");
+ pa_log_error(_("Cannot allocate PolKitAction."));
goto finish;
}
if (!polkit_action_set_action_id(action, action_id)) {
- pa_log_error("Cannot set action_id");
+ pa_log_error(_("Cannot set action_id"));
goto finish;
}
if (!(context = polkit_context_new())) {
- pa_log_error("Cannot allocate PolKitContext.");
+ pa_log_error(_("Cannot allocate PolKitContext."));
goto finish;
}
if (!polkit_context_init(context, &polkit_error)) {
- pa_log_error("Cannot initialize PolKitContext: %s", polkit_error_get_error_message(polkit_error));
+ pa_log_error(_("Cannot initialize PolKitContext: %s"), polkit_error_get_error_message(polkit_error));
goto finish;
}
@@ -111,7 +116,7 @@ int pa_polkit_check(const char *action_id) {
polkit_result = polkit_context_is_caller_authorized(context, action, caller, TRUE, &polkit_error);
if (polkit_error_is_set(polkit_error)) {
- pa_log_error("Could not determine whether caller is authorized: %s", polkit_error_get_error_message(polkit_error));
+ pa_log_error(_("Could not determine whether caller is authorized: %s"), polkit_error_get_error_message(polkit_error));
goto finish;
}
@@ -131,7 +136,7 @@ int pa_polkit_check(const char *action_id) {
}
if (dbus_error_is_set(&dbus_error)) {
- pa_log_error("Cannot obtain auth: %s", dbus_error.message);
+ pa_log_error(_("Cannot obtain auth: %s"), dbus_error.message);
goto finish;
}
}
@@ -140,7 +145,7 @@ int pa_polkit_check(const char *action_id) {
}
if (polkit_result != POLKIT_RESULT_YES && polkit_result != POLKIT_RESULT_NO)
- pa_log_warn("PolicyKit responded with '%s'", polkit_result_to_string_representation(polkit_result));
+ pa_log_warn(_("PolicyKit responded with '%s'"), polkit_result_to_string_representation(polkit_result));
ret = polkit_result == POLKIT_RESULT_YES;
diff --git a/src/daemon/polkit.h b/src/daemon/polkit.h
index cbcf6a6..0d65ec5 100644
--- a/src/daemon/polkit.h
+++ b/src/daemon/polkit.h
@@ -1,8 +1,6 @@
#ifndef foopolkithfoo
#define foopolkithfoo
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/daemon/pulseaudio-module-xsmp.desktop b/src/daemon/pulseaudio-module-xsmp.desktop
deleted file mode 100644
index fa719a7..0000000
--- a/src/daemon/pulseaudio-module-xsmp.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Encoding=UTF-8
-Name=PulseAudio Session Management
-Comment=Load module-x11-xsmp into PulseAudio
-Exec=pactl load-module module-x11-xsmp
-Terminal=false
-Type=Application
-Categories=
-GenericName=
diff --git a/src/daemon/pulseaudio.desktop b/src/daemon/pulseaudio.desktop
new file mode 100644
index 0000000..57a7a6e
--- /dev/null
+++ b/src/daemon/pulseaudio.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=PulseAudio Sound System
+Comment=Start the PulseAudio Sound System
+Exec=start-pulseaudio-x11
+Terminal=false
+Type=Application
+Categories=
+GenericName=
diff --git a/src/daemon/start-pulseaudio-x11.in b/src/daemon/start-pulseaudio-x11.in
new file mode 100755
index 0000000..3cccc4d
--- /dev/null
+++ b/src/daemon/start-pulseaudio-x11.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+set -e
+
+@PA_BINARY@ --start "$@"
+
+if [ x"$DISPLAY" != x ] ; then
+
+ @PACTL_BINARY@ load-module module-x11-publish "display=$DISPLAY" > /dev/null
+
+ if [ x"$SESSION_MANAGER" != x ] ; then
+ @PACTL_BINARY@ load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null
+ fi
+fi
diff --git a/src/daemon/system.pa.in b/src/daemon/system.pa.in
new file mode 100755
index 0000000..27e4281
--- /dev/null
+++ b/src/daemon/system.pa.in
@@ -0,0 +1,55 @@
+#!@PA_BINARY@ -nF
+#
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+# This startup script is used only if PulseAudio is started in system
+# mode.
+
+### Automatically load driver modules depending on the hardware available
+.ifexists module-hal-detect@PA_SOEXT@
+load-module module-hal-detect
+.else
+### Alternatively use the static hardware detection module (for systems that
+### lack HAL support)
+load-module module-detect
+.endif
+
+### Load several protocols
+.ifexists module-esound-protocol-unix@PA_SOEXT@
+load-module module-esound-protocol-unix
+.endif
+load-module module-native-protocol-unix
+
+### Automatically restore the volume of streams and devices
+load-module module-stream-restore
+load-module module-device-restore
+
+### Automatically restore the default sink/source when changed by the user during runtime
+load-module module-default-device-restore
+
+### Automatically move streams to the default sink if the sink they are
+### connected to dies, similar for sources
+load-module module-rescue-streams
+
+### Make sure we always have a sink around, even if it is a null sink.
+load-module module-always-sink
+
+### Automatically suspend sinks/sources that become idle for too long
+load-module module-suspend-on-idle
+
+### Enable positioned event sounds
+load-module module-position-event-sounds
diff --git a/src/depmod.py b/src/depmod.py
index 5e9a095..6cb3cb2 100755
--- a/src/depmod.py
+++ b/src/depmod.py
@@ -1,6 +1,5 @@
#!/usr/bin/python
-# $Id: depmod.py 1033 2006-06-19 21:53:48Z lennart $
-#
+
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
diff --git a/src/map-file b/src/map-file
index f38baef..7211914 100644
--- a/src/map-file
+++ b/src/map-file
@@ -9,9 +9,11 @@ pa_browser_unref;
pa_bytes_per_second;
pa_bytes_snprint;
pa_bytes_to_usec;
+pa_channel_map_compatible;
pa_channel_map_equal;
pa_channel_map_init;
pa_channel_map_init_auto;
+pa_channel_map_init_extend;
pa_channel_map_init_mono;
pa_channel_map_init_stereo;
pa_channel_map_parse;
@@ -30,6 +32,7 @@ pa_context_get_autoload_info_by_name;
pa_context_get_autoload_info_list;
pa_context_get_client_info;
pa_context_get_client_info_list;
+pa_context_get_index;
pa_context_get_module_info;
pa_context_get_module_info_list;
pa_context_get_protocol_version;
@@ -61,7 +64,11 @@ pa_context_move_sink_input_by_name;
pa_context_move_source_output_by_index;
pa_context_move_source_output_by_name;
pa_context_new;
+pa_context_new_with_proplist;
pa_context_play_sample;
+pa_context_play_sample_with_proplist;
+pa_context_proplist_remove;
+pa_context_proplist_update;
pa_context_ref;
pa_context_remove_autoload_by_index;
pa_context_remove_autoload_by_name;
@@ -91,10 +98,21 @@ pa_context_unload_module;
pa_context_unref;
pa_cvolume_avg;
pa_cvolume_channels_equal_to;
+pa_cvolume_compatible;
pa_cvolume_equal;
+pa_cvolume_init;
+pa_cvolume_max;
+pa_cvolume_remap;
pa_cvolume_set;
pa_cvolume_snprint;
+pa_sw_cvolume_snprint_dB;
pa_cvolume_valid;
+pa_ext_stream_restore_delete;
+pa_ext_stream_restore_read;
+pa_ext_stream_restore_set_subscribe_cb;
+pa_ext_stream_restore_subscribe;
+pa_ext_stream_restore_test;
+pa_ext_stream_restore_write;
pa_frame_size;
pa_get_binary_name;
pa_get_fqdn;
@@ -127,9 +145,25 @@ pa_operation_ref;
pa_operation_unref;
pa_parse_sample_format;
pa_path_get_filename;
+pa_proplist_clear;
+pa_proplist_contains;
+pa_proplist_copy;
+pa_proplist_free;
+pa_proplist_get;
+pa_proplist_gets;
+pa_proplist_iterate;
+pa_proplist_new;
+pa_proplist_set;
+pa_proplist_setf;
+pa_proplist_sets;
+pa_proplist_to_string;
+pa_proplist_unset;
+pa_proplist_unset_many;
+pa_proplist_update;
pa_sample_format_to_string;
pa_sample_size;
pa_sample_spec_equal;
+pa_sample_spec_init;
pa_sample_spec_snprint;
pa_sample_spec_valid;
pa_signal_done;
@@ -160,22 +194,29 @@ pa_stream_get_device_index;
pa_stream_get_device_name;
pa_stream_get_index;
pa_stream_get_latency;
+pa_stream_get_monitor_stream;
pa_stream_get_sample_spec;
pa_stream_get_state;
pa_stream_get_time;
pa_stream_get_timing_info;
+pa_stream_is_corked;
pa_stream_is_suspended;
pa_stream_new;
+pa_stream_new_with_proplist;
pa_stream_peek;
pa_stream_prebuf;
+pa_stream_proplist_remove;
+pa_stream_proplist_update;
pa_stream_readable_size;
pa_stream_ref;
pa_stream_set_buffer_attr;
pa_stream_set_latency_update_callback;
+pa_stream_set_monitor_stream;
pa_stream_set_moved_callback;
pa_stream_set_name;
pa_stream_set_overflow_callback;
pa_stream_set_read_callback;
+pa_stream_set_started_callback;
pa_stream_set_state_callback;
pa_stream_set_suspended_callback;
pa_stream_set_underflow_callback;
@@ -211,6 +252,7 @@ pa_timeval_cmp;
pa_timeval_diff;
pa_timeval_load;
pa_timeval_store;
+pa_timeval_sub;
pa_usec_to_bytes;
pa_utf8_filter;
pa_utf8_to_locale;
diff --git a/src/modules/alsa-util.c b/src/modules/alsa-util.c
index 5e1a952..ffe7795 100644
--- a/src/modules/alsa-util.c
+++ b/src/modules/alsa-util.c
@@ -1,5 +1,3 @@
-/* $Id: alsa-util.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -27,6 +25,7 @@
#endif
#include <sys/types.h>
+#include <limits.h>
#include <asoundlib.h>
#include <pulse/sample.h>
@@ -35,11 +34,12 @@
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/atomic.h>
#include "alsa-util.h"
struct pa_alsa_fdlist {
- int num_fds;
+ unsigned num_fds;
struct pollfd *fds;
/* This is a temporary buffer used to avoid lots of mallocs */
struct pollfd *work_fds;
@@ -50,16 +50,17 @@ struct pa_alsa_fdlist {
pa_defer_event *defer;
pa_io_event **ios;
- int polled;
+ pa_bool_t polled;
void (*cb)(void *userdata);
void *userdata;
};
-static void io_cb(pa_mainloop_api*a, pa_io_event* e, PA_GCC_UNUSED int fd, pa_io_event_flags_t events, void *userdata) {
+static void io_cb(pa_mainloop_api*a, pa_io_event* e, int fd, pa_io_event_flags_t events, void *userdata) {
struct pa_alsa_fdlist *fdl = userdata;
- int err, i;
+ int err;
+ unsigned i;
unsigned short revents;
pa_assert(a);
@@ -71,11 +72,11 @@ static void io_cb(pa_mainloop_api*a, pa_io_event* e, PA_GCC_UNUSED int fd, pa_io
if (fdl->polled)
return;
- fdl->polled = 1;
+ fdl->polled = TRUE;
memcpy(fdl->work_fds, fdl->fds, sizeof(struct pollfd) * fdl->num_fds);
- for (i = 0;i < fdl->num_fds; i++) {
+ for (i = 0; i < fdl->num_fds; i++) {
if (e == fdl->ios[i]) {
if (events & PA_IO_EVENT_INPUT)
fdl->work_fds[i].revents |= POLLIN;
@@ -102,9 +103,10 @@ static void io_cb(pa_mainloop_api*a, pa_io_event* e, PA_GCC_UNUSED int fd, pa_io
snd_mixer_handle_events(fdl->mixer);
}
-static void defer_cb(pa_mainloop_api*a, PA_GCC_UNUSED pa_defer_event* e, void *userdata) {
+static void defer_cb(pa_mainloop_api*a, pa_defer_event* e, void *userdata) {
struct pa_alsa_fdlist *fdl = userdata;
- int num_fds, i, err;
+ unsigned num_fds, i;
+ int err;
struct pollfd *temp;
pa_assert(a);
@@ -113,8 +115,7 @@ static void defer_cb(pa_mainloop_api*a, PA_GCC_UNUSED pa_defer_event* e, void *u
a->defer_enable(fdl->defer, 0);
- num_fds = snd_mixer_poll_descriptors_count(fdl->mixer);
- pa_assert(num_fds > 0);
+ num_fds = (unsigned) snd_mixer_poll_descriptors_count(fdl->mixer);
if (num_fds != fdl->num_fds) {
if (fdl->fds)
@@ -132,7 +133,7 @@ static void defer_cb(pa_mainloop_api*a, PA_GCC_UNUSED pa_defer_event* e, void *u
return;
}
- fdl->polled = 0;
+ fdl->polled = FALSE;
if (memcmp(fdl->fds, fdl->work_fds, sizeof(struct pollfd) * num_fds) == 0)
return;
@@ -176,7 +177,7 @@ struct pa_alsa_fdlist *pa_alsa_fdlist_new(void) {
fdl->m = NULL;
fdl->defer = NULL;
fdl->ios = NULL;
- fdl->polled = 0;
+ fdl->polled = FALSE;
return fdl;
}
@@ -190,9 +191,9 @@ void pa_alsa_fdlist_free(struct pa_alsa_fdlist *fdl) {
}
if (fdl->ios) {
- int i;
+ unsigned i;
pa_assert(fdl->m);
- for (i = 0;i < fdl->num_fds;i++)
+ for (i = 0; i < fdl->num_fds; i++)
fdl->m->io_free(fdl->ios[i]);
pa_xfree(fdl->ios);
}
@@ -290,16 +291,22 @@ int pa_alsa_set_hw_params(
pa_sample_spec *ss,
uint32_t *periods,
snd_pcm_uframes_t *period_size,
+ snd_pcm_uframes_t tsched_size,
pa_bool_t *use_mmap,
+ pa_bool_t *use_tsched,
pa_bool_t require_exact_channel_number) {
int ret = -1;
+ snd_pcm_uframes_t _period_size = *period_size;
+ unsigned int _periods = *periods;
snd_pcm_uframes_t buffer_size;
unsigned int r = ss->rate;
unsigned int c = ss->channels;
pa_sample_format_t f = ss->format;
snd_pcm_hw_params_t *hwparams;
pa_bool_t _use_mmap = use_mmap && *use_mmap;
+ pa_bool_t _use_tsched = use_tsched && *use_tsched;
+ int dir;
pa_assert(pcm_handle);
pa_assert(ss);
@@ -308,8 +315,6 @@ int pa_alsa_set_hw_params(
snd_pcm_hw_params_alloca(&hwparams);
- buffer_size = *periods * *period_size;
-
if ((ret = snd_pcm_hw_params_any(pcm_handle, hwparams)) < 0)
goto finish;
@@ -330,12 +335,19 @@ int pa_alsa_set_hw_params(
} else if ((ret = snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)
goto finish;
+ if (!_use_mmap)
+ _use_tsched = FALSE;
+
if ((ret = set_format(pcm_handle, hwparams, &f)) < 0)
goto finish;
if ((ret = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &r, NULL)) < 0)
goto finish;
+ /* Adjust the buffer sizes, if we didn't get the rate we were asking for */
+ _period_size = (snd_pcm_uframes_t) (((uint64_t) _period_size * r) / ss->rate);
+ tsched_size = (snd_pcm_uframes_t) (((uint64_t) tsched_size * r) / ss->rate);
+
if (require_exact_channel_number) {
if ((ret = snd_pcm_hw_params_set_channels(pcm_handle, hwparams, c)) < 0)
goto finish;
@@ -344,10 +356,39 @@ int pa_alsa_set_hw_params(
goto finish;
}
- if ((*period_size > 0 && (ret = snd_pcm_hw_params_set_period_size_near(pcm_handle, hwparams, period_size, NULL)) < 0) ||
- (*periods > 0 && (ret = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams, &buffer_size)) < 0))
+ if (_use_tsched) {
+ _period_size = tsched_size;
+ _periods = 1;
+
+ pa_assert_se(snd_pcm_hw_params_get_buffer_size_max(hwparams, &buffer_size) == 0);
+ pa_log_debug("Maximum hw buffer size is %u ms", (unsigned) buffer_size * 1000 / r);
+ }
+
+ buffer_size = _periods * _period_size;
+
+ if ((ret = snd_pcm_hw_params_set_periods_integer(pcm_handle, hwparams)) < 0)
goto finish;
+ if (_periods > 0) {
+
+ /* First we pass 0 as direction to get exactly what we asked
+ * for. That this is necessary is presumably a bug in ALSA */
+
+ dir = 0;
+ if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0) {
+ dir = 1;
+ if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0) {
+ dir = -1;
+ if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0)
+ goto finish;
+ }
+ }
+ }
+
+ if (_period_size > 0)
+ if ((ret = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams, &buffer_size)) < 0)
+ goto finish;
+
if ((ret = snd_pcm_hw_params(pcm_handle, hwparams)) < 0)
goto finish;
@@ -363,32 +404,38 @@ int pa_alsa_set_hw_params(
if ((ret = snd_pcm_prepare(pcm_handle)) < 0)
goto finish;
- if ((ret = snd_pcm_hw_params_get_buffer_size(hwparams, &buffer_size)) < 0 ||
- (ret = snd_pcm_hw_params_get_period_size(hwparams, period_size, NULL)) < 0)
+ if ((ret = snd_pcm_hw_params_get_period_size(hwparams, &_period_size, &dir)) < 0 ||
+ (ret = snd_pcm_hw_params_get_periods(hwparams, &_periods, &dir)) < 0)
goto finish;
/* If the sample rate deviates too much, we need to resample */
if (r < ss->rate*.95 || r > ss->rate*1.05)
ss->rate = r;
- ss->channels = c;
+ ss->channels = (uint8_t) c;
ss->format = f;
- pa_assert(buffer_size > 0);
- pa_assert(*period_size > 0);
- *periods = buffer_size / *period_size;
- pa_assert(*periods > 0);
+ pa_assert(_periods > 0);
+ pa_assert(_period_size > 0);
+
+ *periods = _periods;
+ *period_size = _period_size;
if (use_mmap)
*use_mmap = _use_mmap;
+ if (use_tsched)
+ *use_tsched = _use_tsched;
+
ret = 0;
+ snd_pcm_nonblock(pcm_handle, 1);
+
finish:
return ret;
}
-int pa_alsa_set_sw_params(snd_pcm_t *pcm) {
+int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min) {
snd_pcm_sw_params_t *swparams;
int err;
@@ -411,6 +458,11 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm) {
return err;
}
+ if ((err = snd_pcm_sw_params_set_avail_min(pcm, swparams, avail_min)) < 0) {
+ pa_log_error("snd_pcm_sw_params_set_avail_min() failed: %s", snd_strerror(err));
+ return err;
+ }
+
if ((err = snd_pcm_sw_params(pcm, swparams)) < 0) {
pa_log_warn("Unable to set sw params: %s\n", snd_strerror(err));
return err;
@@ -477,7 +529,9 @@ snd_pcm_t *pa_alsa_open_by_device_id(
int mode,
uint32_t *nfrags,
snd_pcm_uframes_t *period_size,
- pa_bool_t *use_mmap) {
+ snd_pcm_uframes_t tsched_size,
+ pa_bool_t *use_mmap,
+ pa_bool_t *use_tsched) {
int i;
int direction = 1;
@@ -524,37 +578,62 @@ snd_pcm_t *pa_alsa_open_by_device_id(
continue;
d = pa_sprintf_malloc("%s:%s", device_table[i].name, dev_id);
- pa_log_debug("Trying %s...", d);
- if ((err = snd_pcm_open(&pcm_handle, d, mode, SND_PCM_NONBLOCK)) < 0) {
- pa_log_info("Couldn't open PCM device %s: %s", d, snd_strerror(err));
- pa_xfree(d);
- continue;
- }
+ for (;;) {
+ pa_log_debug("Trying %s...", d);
+
+ /* We don't pass SND_PCM_NONBLOCK here, since alsa-lib <=
+ * 1.0.17a would then ignore the SND_PCM_NO_xxx
+ * flags. Instead we enable nonblock mode afterwards via
+ * snd_pcm_nonblock(). Also see
+ * http://mailman.alsa-project.org/pipermail/alsa-devel/2008-August/010258.html */
+
+ if ((err = snd_pcm_open(&pcm_handle, d, mode,
+ /* SND_PCM_NONBLOCK| */
+ SND_PCM_NO_AUTO_RESAMPLE|
+ SND_PCM_NO_AUTO_CHANNELS|
+ SND_PCM_NO_AUTO_FORMAT)) < 0) {
+ pa_log_info("Couldn't open PCM device %s: %s", d, snd_strerror(err));
+ break;
+ }
- try_ss.channels = device_table[i].map.channels;
- try_ss.rate = ss->rate;
- try_ss.format = ss->format;
+ try_ss.channels = device_table[i].map.channels;
+ try_ss.rate = ss->rate;
+ try_ss.format = ss->format;
- if ((err = pa_alsa_set_hw_params(pcm_handle, &try_ss, nfrags, period_size, use_mmap, TRUE)) < 0) {
- pa_log_info("PCM device %s refused our hw parameters: %s", d, snd_strerror(err));
- pa_xfree(d);
- snd_pcm_close(pcm_handle);
- continue;
+ if ((err = pa_alsa_set_hw_params(pcm_handle, &try_ss, nfrags, period_size, tsched_size, use_mmap, use_tsched, TRUE)) < 0) {
+
+ if (!pa_startswith(d, "plug:") && !pa_startswith(d, "plughw:")) {
+ char *t;
+
+ t = pa_sprintf_malloc("plug:%s", d);
+ pa_xfree(d);
+ d = t;
+
+ snd_pcm_close(pcm_handle);
+ continue;
+ }
+
+ pa_log_info("PCM device %s refused our hw parameters: %s", d, snd_strerror(err));
+ snd_pcm_close(pcm_handle);
+ break;
+ }
+
+ *ss = try_ss;
+ *map = device_table[i].map;
+ pa_assert(map->channels == ss->channels);
+ *dev = d;
+ return pcm_handle;
}
- *ss = try_ss;
- *map = device_table[i].map;
- pa_assert(map->channels == ss->channels);
- *dev = d;
- return pcm_handle;
+ pa_xfree(d);
}
- /* OK, we didn't find any good device, so let's try the raw hw: stuff */
+ /* OK, we didn't find any good device, so let's try the raw plughw: stuff */
d = pa_sprintf_malloc("hw:%s", dev_id);
pa_log_debug("Trying %s as last resort...", d);
- pcm_handle = pa_alsa_open_by_device_string(d, dev, ss, map, mode, nfrags, period_size, use_mmap);
+ pcm_handle = pa_alsa_open_by_device_string(d, dev, ss, map, mode, nfrags, period_size, tsched_size, use_mmap, use_tsched);
pa_xfree(d);
return pcm_handle;
@@ -568,7 +647,9 @@ snd_pcm_t *pa_alsa_open_by_device_string(
int mode,
uint32_t *nfrags,
snd_pcm_uframes_t *period_size,
- pa_bool_t *use_mmap) {
+ snd_pcm_uframes_t tsched_size,
+ pa_bool_t *use_mmap,
+ pa_bool_t *use_tsched) {
int err;
char *d;
@@ -584,41 +665,49 @@ snd_pcm_t *pa_alsa_open_by_device_string(
d = pa_xstrdup(device);
for (;;) {
+ pa_log_debug("Trying %s...", d);
- if ((err = snd_pcm_open(&pcm_handle, d, mode, SND_PCM_NONBLOCK)) < 0) {
+ /* We don't pass SND_PCM_NONBLOCK here, since alsa-lib <=
+ * 1.0.17a would then ignore the SND_PCM_NO_xxx flags. Instead
+ * we enable nonblock mode afterwards via
+ * snd_pcm_nonblock(). Also see
+ * http://mailman.alsa-project.org/pipermail/alsa-devel/2008-August/010258.html */
+
+ if ((err = snd_pcm_open(&pcm_handle, d, mode,
+ /*SND_PCM_NONBLOCK|*/
+ SND_PCM_NO_AUTO_RESAMPLE|
+ SND_PCM_NO_AUTO_CHANNELS|
+ SND_PCM_NO_AUTO_FORMAT)) < 0) {
pa_log("Error opening PCM device %s: %s", d, snd_strerror(err));
pa_xfree(d);
return NULL;
}
- if ((err = pa_alsa_set_hw_params(pcm_handle, ss, nfrags, period_size, use_mmap, FALSE)) < 0) {
+ if ((err = pa_alsa_set_hw_params(pcm_handle, ss, nfrags, period_size, tsched_size, use_mmap, use_tsched, FALSE)) < 0) {
- if (err == -EPERM) {
- /* Hmm, some hw is very exotic, so we retry with plug, if without it didn't work */
+ /* Hmm, some hw is very exotic, so we retry with plug, if without it didn't work */
- if (pa_startswith(d, "hw:")) {
- char *t = pa_sprintf_malloc("plughw:%s", d+3);
- pa_log_debug("Opening the device as '%s' didn't work, retrying with '%s'.", d, t);
- pa_xfree(d);
- d = t;
-
- snd_pcm_close(pcm_handle);
- continue;
- }
+ if (!pa_startswith(d, "plug:") && !pa_startswith(d, "plughw:")) {
+ char *t;
- pa_log("Failed to set hardware parameters on %s: %s", d, snd_strerror(err));
+ t = pa_sprintf_malloc("plug:%s", d);
pa_xfree(d);
+ d = t;
+
snd_pcm_close(pcm_handle);
- return NULL;
+ continue;
}
+
+ pa_log("Failed to set hardware parameters on %s: %s", d, snd_strerror(err));
+ pa_xfree(d);
+ snd_pcm_close(pcm_handle);
+ return NULL;
}
*dev = d;
- if (ss->channels != map->channels) {
- pa_assert_se(pa_channel_map_init_auto(map, ss->channels, PA_CHANNEL_MAP_AUX));
- pa_channel_map_init_auto(map, ss->channels, PA_CHANNEL_MAP_ALSA);
- }
+ if (ss->channels != map->channels)
+ pa_channel_map_init_extend(map, ss->channels, PA_CHANNEL_MAP_ALSA);
return pcm_handle;
}
@@ -756,7 +845,7 @@ int pa_alsa_calc_mixer_map(snd_mixer_elem_t *elem, const pa_channel_map *channel
if (channel_map->channels > 1 &&
((playback && snd_mixer_selem_has_playback_volume_joined(elem)) ||
(!playback && snd_mixer_selem_has_capture_volume_joined(elem)))) {
- pa_log_info("ALSA device lacks independant volume controls for each channel, falling back to software volume control.");
+ pa_log_info("ALSA device lacks independant volume controls for each channel.");
return -1;
}
@@ -768,19 +857,19 @@ int pa_alsa_calc_mixer_map(snd_mixer_elem_t *elem, const pa_channel_map *channel
id = alsa_channel_ids[channel_map->map[i]];
if (!is_mono && id == SND_MIXER_SCHN_UNKNOWN) {
- pa_log_info("Configured channel map contains channel '%s' that is unknown to the ALSA mixer. Falling back to software volume control.", pa_channel_position_to_string(channel_map->map[i]));
+ pa_log_info("Configured channel map contains channel '%s' that is unknown to the ALSA mixer.", pa_channel_position_to_string(channel_map->map[i]));
return -1;
}
if ((is_mono && mono_used) || (!is_mono && alsa_channel_used[id])) {
- pa_log_info("Channel map has duplicate channel '%s', failling back to software volume control.", pa_channel_position_to_string(channel_map->map[i]));
+ pa_log_info("Channel map has duplicate channel '%s', falling back to software volume control.", pa_channel_position_to_string(channel_map->map[i]));
return -1;
}
if ((playback && (!snd_mixer_selem_has_playback_channel(elem, id) || (is_mono && !snd_mixer_selem_is_playback_mono(elem)))) ||
(!playback && (!snd_mixer_selem_has_capture_channel(elem, id) || (is_mono && !snd_mixer_selem_is_capture_mono(elem))))) {
- pa_log_info("ALSA device lacks separate volumes control for channel '%s', falling back to software volume control.", pa_channel_position_to_string(channel_map->map[i]));
+ pa_log_info("ALSA device lacks separate volumes control for channel '%s'", pa_channel_position_to_string(channel_map->map[i]));
return -1;
}
@@ -793,7 +882,230 @@ int pa_alsa_calc_mixer_map(snd_mixer_elem_t *elem, const pa_channel_map *channel
}
}
- pa_log_info("All %u channels can be mapped to mixer channels. Using hardware volume control.", channel_map->channels);
+ pa_log_info("All %u channels can be mapped to mixer channels.", channel_map->channels);
+
+ return 0;
+}
+
+void pa_alsa_dump(snd_pcm_t *pcm) {
+ int err;
+ snd_output_t *out;
+
+ pa_assert(pcm);
+
+ pa_assert_se(snd_output_buffer_open(&out) == 0);
+
+ if ((err = snd_pcm_dump(pcm, out)) < 0)
+ pa_log_debug("snd_pcm_dump(): %s", snd_strerror(err));
+ else {
+ char *s = NULL;
+ snd_output_buffer_string(out, &s);
+ pa_log_debug("snd_pcm_dump():\n%s", pa_strnull(s));
+ }
+
+ pa_assert_se(snd_output_close(out) == 0);
+}
+
+void pa_alsa_dump_status(snd_pcm_t *pcm) {
+ int err;
+ snd_output_t *out;
+ snd_pcm_status_t *status;
+
+ pa_assert(pcm);
+
+ snd_pcm_status_alloca(&status);
+
+ pa_assert_se(snd_output_buffer_open(&out) == 0);
+
+ pa_assert_se(snd_pcm_status(pcm, status) == 0);
+
+ if ((err = snd_pcm_status_dump(status, out)) < 0)
+ pa_log_debug("snd_pcm_dump(): %s", snd_strerror(err));
+ else {
+ char *s = NULL;
+ snd_output_buffer_string(out, &s);
+ pa_log_debug("snd_pcm_dump():\n%s", pa_strnull(s));
+ }
+
+ pa_assert_se(snd_output_close(out) == 0);
+}
+
+static void alsa_error_handler(const char *file, int line, const char *function, int err, const char *fmt,...) {
+ va_list ap;
+ char *alsa_file;
+
+ alsa_file = pa_sprintf_malloc("(alsa-lib)%s", file);
+
+ va_start(ap, fmt);
+
+ pa_log_levelv_meta(PA_LOG_INFO, alsa_file, line, function, fmt, ap);
+
+ va_end(ap);
+
+ pa_xfree(alsa_file);
+}
+
+static pa_atomic_t n_error_handler_installed = PA_ATOMIC_INIT(0);
+
+void pa_alsa_redirect_errors_inc(void) {
+ /* This is not really thread safe, but we do our best */
+
+ if (pa_atomic_inc(&n_error_handler_installed) == 0)
+ snd_lib_error_set_handler(alsa_error_handler);
+}
+
+void pa_alsa_redirect_errors_dec(void) {
+ int r;
+
+ pa_assert_se((r = pa_atomic_dec(&n_error_handler_installed)) >= 1);
+
+ if (r == 1)
+ snd_lib_error_set_handler(NULL);
+}
+
+void pa_alsa_init_proplist(pa_proplist *p, snd_pcm_info_t *pcm_info) {
+
+ static const char * const alsa_class_table[SND_PCM_CLASS_LAST+1] = {
+ [SND_PCM_CLASS_GENERIC] = "generic",
+ [SND_PCM_CLASS_MULTI] = "multi",
+ [SND_PCM_CLASS_MODEM] = "modem",
+ [SND_PCM_CLASS_DIGITIZER] = "digitizer"
+ };
+ static const char * const class_table[SND_PCM_CLASS_LAST+1] = {
+ [SND_PCM_CLASS_GENERIC] = "sound",
+ [SND_PCM_CLASS_MULTI] = NULL,
+ [SND_PCM_CLASS_MODEM] = "modem",
+ [SND_PCM_CLASS_DIGITIZER] = NULL
+ };
+ static const char * const alsa_subclass_table[SND_PCM_SUBCLASS_LAST+1] = {
+ [SND_PCM_SUBCLASS_GENERIC_MIX] = "generic-mix",
+ [SND_PCM_SUBCLASS_MULTI_MIX] = "multi-mix"
+ };
+
+ snd_pcm_class_t class;
+ snd_pcm_subclass_t subclass;
+ const char *n, *id, *sdn;
+ char *cn = NULL, *lcn = NULL;
+ int card;
+
+ pa_assert(p);
+ pa_assert(pcm_info);
+
+ pa_proplist_sets(p, PA_PROP_DEVICE_API, "alsa");
+
+ class = snd_pcm_info_get_class(pcm_info);
+ if (class <= SND_PCM_CLASS_LAST) {
+ if (class_table[class])
+ pa_proplist_sets(p, PA_PROP_DEVICE_CLASS, class_table[class]);
+ if (alsa_class_table[class])
+ pa_proplist_sets(p, "alsa.class", alsa_class_table[class]);
+ }
+ subclass = snd_pcm_info_get_subclass(pcm_info);
+ if (subclass <= SND_PCM_SUBCLASS_LAST)
+ if (alsa_subclass_table[subclass])
+ pa_proplist_sets(p, "alsa.subclass", alsa_subclass_table[subclass]);
+
+ if ((n = snd_pcm_info_get_name(pcm_info)))
+ pa_proplist_sets(p, "alsa.name", n);
+
+ if ((id = snd_pcm_info_get_id(pcm_info)))
+ pa_proplist_sets(p, "alsa.id", id);
+
+ pa_proplist_setf(p, "alsa.subdevice", "%u", snd_pcm_info_get_subdevice(pcm_info));
+ if ((sdn = snd_pcm_info_get_subdevice_name(pcm_info)))
+ pa_proplist_sets(p, "alsa.subdevice_name", sdn);
+
+ pa_proplist_setf(p, "alsa.device", "%u", snd_pcm_info_get_device(pcm_info));
+
+ if ((card = snd_pcm_info_get_card(pcm_info)) >= 0) {
+ pa_proplist_setf(p, "alsa.card", "%i", card);
+
+ if (snd_card_get_name(card, &cn) >= 0)
+ pa_proplist_sets(p, "alsa.card_name", cn);
+
+ if (snd_card_get_longname(card, &lcn) >= 0)
+ pa_proplist_sets(p, "alsa.long_card_name", lcn);
+ }
+
+ if (cn && n)
+ pa_proplist_setf(p, PA_PROP_DEVICE_DESCRIPTION, "%s - %s", cn, n);
+ else if (cn)
+ pa_proplist_sets(p, PA_PROP_DEVICE_DESCRIPTION, cn);
+ else if (n)
+ pa_proplist_sets(p, PA_PROP_DEVICE_DESCRIPTION, n);
+
+ free(lcn);
+ free(cn);
+}
+
+int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents) {
+ snd_pcm_state_t state;
+ int err;
+
+ pa_assert(pcm);
+
+ if (revents & POLLERR)
+ pa_log_warn("Got POLLERR from ALSA");
+ if (revents & POLLNVAL)
+ pa_log_warn("Got POLLNVAL from ALSA");
+ if (revents & POLLHUP)
+ pa_log_warn("Got POLLHUP from ALSA");
+
+ state = snd_pcm_state(pcm);
+ pa_log_warn("PCM state is %s", snd_pcm_state_name(state));
+
+ /* Try to recover from this error */
+
+ switch (state) {
+
+ case SND_PCM_STATE_XRUN:
+ if ((err = snd_pcm_recover(pcm, -EPIPE, 1)) != 0) {
+ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and XRUN: %s", snd_strerror(err));
+ return -1;
+ }
+ break;
+
+ case SND_PCM_STATE_SUSPENDED:
+ if ((err = snd_pcm_recover(pcm, -ESTRPIPE, 1)) != 0) {
+ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and SUSPENDED: %s", snd_strerror(err));
+ return -1;
+ }
+ break;
+
+ default:
+
+ snd_pcm_drop(pcm);
+
+ if ((err = snd_pcm_prepare(pcm)) < 0) {
+ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): %s", snd_strerror(err));
+ return -1;
+ }
+ break;
+ }
return 0;
}
+
+pa_rtpoll_item* pa_alsa_build_pollfd(snd_pcm_t *pcm, pa_rtpoll *rtpoll) {
+ int n, err;
+ struct pollfd *pollfd;
+ pa_rtpoll_item *item;
+
+ pa_assert(pcm);
+
+ if ((n = snd_pcm_poll_descriptors_count(pcm)) < 0) {
+ pa_log("snd_pcm_poll_descriptors_count() failed: %s", snd_strerror(n));
+ return NULL;
+ }
+
+ item = pa_rtpoll_item_new(rtpoll, PA_RTPOLL_NEVER, (unsigned) n);
+ pollfd = pa_rtpoll_item_get_pollfd(item, NULL);
+
+ if ((err = snd_pcm_poll_descriptors(pcm, pollfd, (unsigned) n)) < 0) {
+ pa_log("snd_pcm_poll_descriptors() failed: %s", snd_strerror(err));
+ pa_rtpoll_item_free(item);
+ return NULL;
+ }
+
+ return item;
+}
diff --git a/src/modules/alsa-util.h b/src/modules/alsa-util.h
index 20f055a..b66adc1 100644
--- a/src/modules/alsa-util.h
+++ b/src/modules/alsa-util.h
@@ -1,8 +1,6 @@
#ifndef fooalsautilhfoo
#define fooalsautilhfoo
-/* $Id: alsa-util.h 2055 2007-11-13 23:42:15Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -28,9 +26,12 @@
#include <asoundlib.h>
#include <pulse/sample.h>
+#include <pulse/volume.h>
#include <pulse/mainloop-api.h>
-
#include <pulse/channelmap.h>
+#include <pulse/proplist.h>
+
+#include <pulsecore/rtpoll.h>
typedef struct pa_alsa_fdlist pa_alsa_fdlist;
@@ -43,10 +44,12 @@ int pa_alsa_set_hw_params(
pa_sample_spec *ss,
uint32_t *periods,
snd_pcm_uframes_t *period_size,
+ snd_pcm_uframes_t tsched_size,
pa_bool_t *use_mmap,
+ pa_bool_t *use_tsched,
pa_bool_t require_exact_channel_number);
-int pa_alsa_set_sw_params(snd_pcm_t *pcm);
+int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min);
int pa_alsa_prepare_mixer(snd_mixer_t *mixer, const char *dev);
snd_mixer_elem_t *pa_alsa_find_elem(snd_mixer_t *mixer, const char *name, const char *fallback);
@@ -59,7 +62,9 @@ snd_pcm_t *pa_alsa_open_by_device_id(
int mode,
uint32_t *nfrags,
snd_pcm_uframes_t *period_size,
- pa_bool_t *use_mmap);
+ snd_pcm_uframes_t tsched_size,
+ pa_bool_t *use_mmap,
+ pa_bool_t *use_tsched);
snd_pcm_t *pa_alsa_open_by_device_string(
const char *device,
@@ -69,8 +74,22 @@ snd_pcm_t *pa_alsa_open_by_device_string(
int mode,
uint32_t *nfrags,
snd_pcm_uframes_t *period_size,
- pa_bool_t *use_mmap);
+ snd_pcm_uframes_t tsched_size,
+ pa_bool_t *use_mmap,
+ pa_bool_t *use_tsched);
int pa_alsa_calc_mixer_map(snd_mixer_elem_t *elem, const pa_channel_map *channel_map, snd_mixer_selem_channel_id_t mixer_map[], pa_bool_t playback);
+void pa_alsa_dump(snd_pcm_t *pcm);
+void pa_alsa_dump_status(snd_pcm_t *pcm);
+
+void pa_alsa_redirect_errors_inc(void);
+void pa_alsa_redirect_errors_dec(void);
+
+void pa_alsa_init_proplist(pa_proplist *p, snd_pcm_info_t *pcm_info);
+
+int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents);
+
+pa_rtpoll_item* pa_alsa_build_pollfd(snd_pcm_t *pcm, pa_rtpoll *rtpoll);
+
#endif
diff --git a/src/modules/bluetooth/ipc.c b/src/modules/bluetooth/ipc.c
new file mode 100644
index 0000000..9825699
--- /dev/null
+++ b/src/modules/bluetooth/ipc.c
@@ -0,0 +1,118 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "ipc.h"
+
+/* This table contains the string representation for messages */
+static const char *strmsg[] = {
+ "BT_GETCAPABILITIES_REQ",
+ "BT_GETCAPABILITIES_RSP",
+ "BT_SETCONFIGURATION_REQ",
+ "BT_SETCONFIGURATION_RSP",
+ "BT_STREAMSTART_REQ",
+ "BT_STREAMSTART_RSP",
+ "BT_STREAMSTOP_REQ",
+ "BT_STREAMSTOP_RSP",
+ "BT_STREAMSUSPEND_IND",
+ "BT_STREAMRESUME_IND",
+ "BT_CONTROL_REQ",
+ "BT_CONTROL_RSP",
+ "BT_CONTROL_IND",
+ "BT_STREAMFD_IND",
+};
+
+int bt_audio_service_open(void)
+{
+ int sk;
+ int err;
+ struct sockaddr_un addr = {
+ AF_UNIX, BT_IPC_SOCKET_NAME
+ };
+
+ sk = socket(PF_LOCAL, SOCK_STREAM, 0);
+ if (sk < 0) {
+ err = errno;
+ fprintf(stderr, "%s: Cannot open socket: %s (%d)\n",
+ __FUNCTION__, strerror(err), err);
+ errno = err;
+ return -1;
+ }
+
+ if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+ err = errno;
+ fprintf(stderr, "%s: connect() failed: %s (%d)\n",
+ __FUNCTION__, strerror(err), err);
+ close(sk);
+ errno = err;
+ return -1;
+ }
+
+ return sk;
+}
+
+int bt_audio_service_close(int sk)
+{
+ return close(sk);
+}
+
+int bt_audio_service_get_data_fd(int sk)
+{
+ char cmsg_b[CMSG_SPACE(sizeof(int))], m;
+ int err, ret;
+ struct iovec iov = { &m, sizeof(m) };
+ struct msghdr msgh;
+ struct cmsghdr *cmsg;
+
+ memset(&msgh, 0, sizeof(msgh));
+ msgh.msg_iov = &iov;
+ msgh.msg_iovlen = 1;
+ msgh.msg_control = &cmsg_b;
+ msgh.msg_controllen = CMSG_LEN(sizeof(int));
+
+ ret = (int) recvmsg(sk, &msgh, 0);
+ if (ret < 0) {
+ err = errno;
+ fprintf(stderr, "%s: Unable to receive fd: %s (%d)\n",
+ __FUNCTION__, strerror(err), err);
+ errno = err;
+ return -1;
+ }
+
+ /* Receive auxiliary data in msgh */
+ for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;
+ cmsg = CMSG_NXTHDR(&msgh, cmsg)) {
+ if (cmsg->cmsg_level == SOL_SOCKET
+ && cmsg->cmsg_type == SCM_RIGHTS)
+ return (*(int *) CMSG_DATA(cmsg));
+ }
+
+ errno = EINVAL;
+ return -1;
+}
+
+const char *bt_audio_strmsg(int type)
+{
+ if (type < 0 || (size_t) type > (sizeof(strmsg) / sizeof(strmsg[0])))
+ return NULL;
+
+ return strmsg[type];
+}
diff --git a/src/modules/bluetooth/ipc.h b/src/modules/bluetooth/ipc.h
new file mode 100644
index 0000000..ae85e72
--- /dev/null
+++ b/src/modules/bluetooth/ipc.h
@@ -0,0 +1,308 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/*
+ Message sequence chart of streaming sequence for A2DP transport
+
+ Audio daemon User
+ on snd_pcm_open
+ <--BT_GETCAPABILITIES_REQ
+
+ BT_GETCAPABILITIES_RSP-->
+
+ on snd_pcm_hw_params
+ <--BT_SETCONFIGURATION_REQ
+
+ BT_SETCONFIGURATION_RSP-->
+
+ on snd_pcm_prepare
+ <--BT_STREAMSTART_REQ
+
+ <Moves to streaming state>
+ BT_STREAMSTART_RSP-->
+
+ BT_STREAMFD_IND -->
+
+ < streams data >
+ ..........
+
+ on snd_pcm_drop/snd_pcm_drain
+
+ <--BT_STREAMSTOP_REQ
+
+ <Moves to open state>
+ BT_STREAMSTOP_RSP-->
+
+ on IPC close or appl crash
+ <Moves to idle>
+
+ */
+
+#ifndef BT_AUDIOCLIENT_H
+#define BT_AUDIOCLIENT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <errno.h>
+
+#define BT_AUDIO_IPC_PACKET_SIZE 128
+#define BT_IPC_SOCKET_NAME "\0/org/bluez/audio"
+
+/* Generic message header definition, except for RSP messages */
+typedef struct {
+ uint8_t msg_type;
+} __attribute__ ((packed)) bt_audio_msg_header_t;
+
+/* Generic message header definition, for all RSP messages */
+typedef struct {
+ bt_audio_msg_header_t msg_h;
+ uint8_t posix_errno;
+} __attribute__ ((packed)) bt_audio_rsp_msg_header_t;
+
+/* Messages list */
+#define BT_GETCAPABILITIES_REQ 0
+#define BT_GETCAPABILITIES_RSP 1
+
+#define BT_SETCONFIGURATION_REQ 2
+#define BT_SETCONFIGURATION_RSP 3
+
+#define BT_STREAMSTART_REQ 4
+#define BT_STREAMSTART_RSP 5
+
+#define BT_STREAMSTOP_REQ 6
+#define BT_STREAMSTOP_RSP 7
+
+#define BT_STREAMSUSPEND_IND 8
+#define BT_STREAMRESUME_IND 9
+
+#define BT_CONTROL_REQ 10
+#define BT_CONTROL_RSP 11
+#define BT_CONTROL_IND 12
+
+#define BT_STREAMFD_IND 13
+
+/* BT_GETCAPABILITIES_REQ */
+
+#define BT_CAPABILITIES_TRANSPORT_A2DP 0
+#define BT_CAPABILITIES_TRANSPORT_SCO 1
+#define BT_CAPABILITIES_TRANSPORT_ANY 2
+
+#define BT_CAPABILITIES_ACCESS_MODE_READ 1
+#define BT_CAPABILITIES_ACCESS_MODE_WRITE 2
+#define BT_CAPABILITIES_ACCESS_MODE_READWRITE 3
+
+#define BT_FLAG_AUTOCONNECT 1
+
+struct bt_getcapabilities_req {
+ bt_audio_msg_header_t h;
+ char device[18]; /* Address of the remote Device */
+ uint8_t transport; /* Requested transport */
+ uint8_t flags; /* Requested flags */
+} __attribute__ ((packed));
+
+/* BT_GETCAPABILITIES_RSP */
+
+/**
+ * SBC Codec parameters as per A2DP profile 1.0 § 4.3
+ */
+
+#define BT_SBC_SAMPLING_FREQ_16000 (1 << 3)
+#define BT_SBC_SAMPLING_FREQ_32000 (1 << 2)
+#define BT_SBC_SAMPLING_FREQ_44100 (1 << 1)
+#define BT_SBC_SAMPLING_FREQ_48000 1
+
+#define BT_A2DP_CHANNEL_MODE_MONO (1 << 3)
+#define BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL (1 << 2)
+#define BT_A2DP_CHANNEL_MODE_STEREO (1 << 1)
+#define BT_A2DP_CHANNEL_MODE_JOINT_STEREO 1
+
+#define BT_A2DP_BLOCK_LENGTH_4 (1 << 3)
+#define BT_A2DP_BLOCK_LENGTH_8 (1 << 2)
+#define BT_A2DP_BLOCK_LENGTH_12 (1 << 1)
+#define BT_A2DP_BLOCK_LENGTH_16 1
+
+#define BT_A2DP_SUBBANDS_4 (1 << 1)
+#define BT_A2DP_SUBBANDS_8 1
+
+#define BT_A2DP_ALLOCATION_SNR (1 << 1)
+#define BT_A2DP_ALLOCATION_LOUDNESS 1
+
+#define BT_MPEG_SAMPLING_FREQ_16000 (1 << 5)
+#define BT_MPEG_SAMPLING_FREQ_22050 (1 << 4)
+#define BT_MPEG_SAMPLING_FREQ_24000 (1 << 3)
+#define BT_MPEG_SAMPLING_FREQ_32000 (1 << 2)
+#define BT_MPEG_SAMPLING_FREQ_44100 (1 << 1)
+#define BT_MPEG_SAMPLING_FREQ_48000 1
+
+#define BT_MPEG_LAYER_1 (1 << 2)
+#define BT_MPEG_LAYER_2 (1 << 1)
+#define BT_MPEG_LAYER_3 1
+
+typedef struct {
+ uint8_t channel_mode;
+ uint8_t frequency;
+ uint8_t allocation_method;
+ uint8_t subbands;
+ uint8_t block_length;
+ uint8_t min_bitpool;
+ uint8_t max_bitpool;
+} __attribute__ ((packed)) sbc_capabilities_t;
+
+typedef struct {
+ uint8_t channel_mode;
+ uint8_t crc;
+ uint8_t layer;
+ uint8_t frequency;
+ uint8_t mpf;
+ uint16_t bitrate;
+} __attribute__ ((packed)) mpeg_capabilities_t;
+
+struct bt_getcapabilities_rsp {
+ bt_audio_rsp_msg_header_t rsp_h;
+ uint8_t transport; /* Granted transport */
+ sbc_capabilities_t sbc_capabilities; /* A2DP only */
+ mpeg_capabilities_t mpeg_capabilities; /* A2DP only */
+ uint16_t sampling_rate; /* SCO only */
+} __attribute__ ((packed));
+
+/* BT_SETCONFIGURATION_REQ */
+struct bt_setconfiguration_req {
+ bt_audio_msg_header_t h;
+ char device[18]; /* Address of the remote Device */
+ uint8_t transport; /* Requested transport */
+ uint8_t access_mode; /* Requested access mode */
+ sbc_capabilities_t sbc_capabilities; /* A2DP only - only one of this field
+ and next one must be filled */
+ mpeg_capabilities_t mpeg_capabilities; /* A2DP only */
+} __attribute__ ((packed));
+
+/* BT_SETCONFIGURATION_RSP */
+struct bt_setconfiguration_rsp {
+ bt_audio_rsp_msg_header_t rsp_h;
+ uint8_t transport; /* Granted transport */
+ uint8_t access_mode; /* Granted access mode */
+ uint16_t link_mtu; /* Max length that transport supports */
+} __attribute__ ((packed));
+
+/* BT_STREAMSTART_REQ */
+#define BT_STREAM_ACCESS_READ 0
+#define BT_STREAM_ACCESS_WRITE 1
+#define BT_STREAM_ACCESS_READWRITE 2
+struct bt_streamstart_req {
+ bt_audio_msg_header_t h;
+} __attribute__ ((packed));
+
+/* BT_STREAMSTART_RSP */
+struct bt_streamstart_rsp {
+ bt_audio_rsp_msg_header_t rsp_h;
+} __attribute__ ((packed));
+
+/* BT_STREAMFD_IND */
+/* This message is followed by one byte of data containing the stream data fd
+ as ancilliary data */
+struct bt_streamfd_ind {
+ bt_audio_msg_header_t h;
+} __attribute__ ((packed));
+
+/* BT_STREAMSTOP_REQ */
+struct bt_streamstop_req {
+ bt_audio_msg_header_t h;
+} __attribute__ ((packed));
+
+/* BT_STREAMSTOP_RSP */
+struct bt_streamstop_rsp {
+ bt_audio_rsp_msg_header_t rsp_h;
+} __attribute__ ((packed));
+
+/* BT_STREAMSUSPEND_IND */
+struct bt_streamsuspend_ind {
+ bt_audio_msg_header_t h;
+} __attribute__ ((packed));
+
+/* BT_STREAMRESUME_IND */
+struct bt_streamresume_ind {
+ bt_audio_msg_header_t h;
+} __attribute__ ((packed));
+
+/* BT_CONTROL_REQ */
+
+#define BT_CONTROL_KEY_POWER 0x40
+#define BT_CONTROL_KEY_VOL_UP 0x41
+#define BT_CONTROL_KEY_VOL_DOWN 0x42
+#define BT_CONTROL_KEY_MUTE 0x43
+#define BT_CONTROL_KEY_PLAY 0x44
+#define BT_CONTROL_KEY_STOP 0x45
+#define BT_CONTROL_KEY_PAUSE 0x46
+#define BT_CONTROL_KEY_RECORD 0x47
+#define BT_CONTROL_KEY_REWIND 0x48
+#define BT_CONTROL_KEY_FAST_FORWARD 0x49
+#define BT_CONTROL_KEY_EJECT 0x4A
+#define BT_CONTROL_KEY_FORWARD 0x4B
+#define BT_CONTROL_KEY_BACKWARD 0x4C
+
+struct bt_control_req {
+ bt_audio_msg_header_t h;
+ uint8_t mode; /* Control Mode */
+ uint8_t key; /* Control Key */
+} __attribute__ ((packed));
+
+/* BT_CONTROL_RSP */
+struct bt_control_rsp {
+ bt_audio_rsp_msg_header_t rsp_h;
+ uint8_t mode; /* Control Mode */
+ uint8_t key; /* Control Key */
+} __attribute__ ((packed));
+
+/* BT_CONTROL_IND */
+struct bt_control_ind {
+ bt_audio_msg_header_t h;
+ uint8_t mode; /* Control Mode */
+ uint8_t key; /* Control Key */
+} __attribute__ ((packed));
+
+/* Function declaration */
+
+/* Opens a connection to the audio service: return a socket descriptor */
+int bt_audio_service_open(void);
+
+/* Closes a connection to the audio service */
+int bt_audio_service_close(int sk);
+
+/* Receives stream data file descriptor : must be called after a
+BT_STREAMFD_IND message is returned */
+int bt_audio_service_get_data_fd(int sk);
+
+/* Human readable message type string */
+const char *bt_audio_strmsg(int type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BT_AUDIOCLIENT_H */
diff --git a/src/modules/bluetooth/module-bluetooth-device-symdef.h b/src/modules/bluetooth/module-bluetooth-device-symdef.h
new file mode 100644
index 0000000..bbb78c0
--- /dev/null
+++ b/src/modules/bluetooth/module-bluetooth-device-symdef.h
@@ -0,0 +1,25 @@
+#ifndef foomodulebluetoothdevicesymdeffoo
+#define foomodulebluetoothdevicesymdeffoo
+
+#include <pulsecore/core.h>
+#include <pulsecore/module.h>
+#include <pulsecore/macro.h>
+
+#define pa__init module_bluetooth_device_LTX_pa__init
+#define pa__done module_bluetooth_device_LTX_pa__done
+#define pa__get_author module_bluetooth_device_LTX_pa__get_author
+#define pa__get_description module_bluetooth_device_LTX_pa__get_description
+#define pa__get_usage module_bluetooth_device_LTX_pa__get_usage
+#define pa__get_version module_bluetooth_device_LTX_pa__get_version
+#define pa__load_once module_bluetooth_device_LTX_pa__load_once
+
+int pa__init(pa_module*m);
+void pa__done(pa_module*m);
+
+const char* pa__get_author(void);
+const char* pa__get_description(void);
+const char* pa__get_usage(void);
+const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
+
+#endif
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
new file mode 100644
index 0000000..3460fe9
--- /dev/null
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -0,0 +1,922 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Joao Paulo Rechi Vita
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <errno.h>
+#include <poll.h>
+#include <sys/ioctl.h>
+#include <linux/sockios.h>
+#include <arpa/inet.h>
+
+#include <pulse/xmalloc.h>
+#include <pulse/timeval.h>
+#include <pulse/sample.h>
+#include <pulsecore/module.h>
+#include <pulsecore/modargs.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/core-error.h>
+#include <pulsecore/socket-util.h>
+#include <pulsecore/thread.h>
+#include <pulsecore/thread-mq.h>
+#include <pulsecore/rtpoll.h>
+#include <pulsecore/time-smoother.h>
+#include <pulsecore/rtclock.h>
+
+#include "../dbus-util.h"
+#include "module-bluetooth-device-symdef.h"
+#include "ipc.h"
+#include "sbc.h"
+#include "rtp.h"
+
+#define DEFAULT_SINK_NAME "bluetooth_sink"
+#define BUFFER_SIZE 2048
+#define MAX_BITPOOL 64
+#define MIN_BITPOOL 2U
+#define SOL_SCO 17
+#define SCO_TXBUFS 0x03
+#define SCO_RXBUFS 0x04
+
+PA_MODULE_AUTHOR("Joao Paulo Rechi Vita");
+PA_MODULE_DESCRIPTION("Bluetooth audio sink and source");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
+PA_MODULE_USAGE(
+ "sink_name=<name of the device> "
+ "address=<address of the device> "
+ "profile=<a2dp|hsp>");
+
+struct bt_a2dp {
+ sbc_capabilities_t sbc_capabilities;
+ sbc_t sbc; /* Codec data */
+ pa_bool_t sbc_initialized; /* Keep track if the encoder is initialized */
+ size_t codesize; /* SBC codesize */
+ unsigned samples; /* Number of encoded samples */
+ uint8_t buffer[BUFFER_SIZE]; /* Codec transfer buffer */
+ size_t count; /* Codec transfer buffer counter */
+
+ unsigned total_samples; /* Cumulative number of codec samples */
+ uint16_t seq_num; /* Cumulative packet sequence */
+ unsigned frame_count; /* Current frames in buffer*/
+};
+
+struct userdata {
+ pa_core *core;
+ pa_module *module;
+ pa_sink *sink;
+
+ pa_thread_mq thread_mq;
+ pa_rtpoll *rtpoll;
+ pa_rtpoll_item *rtpoll_item;
+ pa_thread *thread;
+
+ uint64_t offset;
+ pa_smoother *smoother;
+
+ char *name;
+ char *addr;
+ char *profile;
+ pa_sample_spec ss;
+
+ int audioservice_fd;
+ int stream_fd;
+
+ uint8_t transport;
+ char *strtransport;
+ size_t link_mtu;
+ size_t block_size;
+ pa_usec_t latency;
+
+ struct bt_a2dp a2dp;
+};
+
+static const char* const valid_modargs[] = {
+ "sink_name",
+ "address",
+ "profile",
+ "rate",
+ "channels",
+ NULL
+};
+
+static int bt_audioservice_send(int sk, const bt_audio_msg_header_t *msg) {
+ int e;
+ pa_log_debug("sending %s", bt_audio_strmsg(msg->msg_type));
+ if (send(sk, msg, BT_AUDIO_IPC_PACKET_SIZE, 0) > 0)
+ e = 0;
+ else {
+ e = -errno;
+ pa_log_error("Error sending data to audio service: %s(%d)", pa_cstrerror(errno), errno);
+ }
+ return e;
+}
+
+static int bt_audioservice_recv(int sk, bt_audio_msg_header_t *inmsg) {
+ int e;
+ const char *type;
+
+ pa_log_debug("trying to receive msg from audio service...");
+ if (recv(sk, inmsg, BT_AUDIO_IPC_PACKET_SIZE, 0) > 0) {
+ type = bt_audio_strmsg(inmsg->msg_type);
+ if (type) {
+ pa_log_debug("Received %s", type);
+ e = 0;
+ }
+ else {
+ e = -EINVAL;
+ pa_log_error("Bogus message type %d received from audio service", inmsg->msg_type);
+ }
+ }
+ else {
+ e = -errno;
+ pa_log_error("Error receiving data from audio service: %s(%d)", pa_cstrerror(errno), errno);
+ }
+
+ return e;
+}
+
+static int bt_audioservice_expect(int sk, bt_audio_msg_header_t *rsp_hdr, int expected_type) {
+ int e = bt_audioservice_recv(sk, rsp_hdr);
+ if (e == 0) {
+ if (rsp_hdr->msg_type != expected_type) {
+ e = -EINVAL;
+ pa_log_error("Bogus message %s received while %s was expected", bt_audio_strmsg(rsp_hdr->msg_type),
+ bt_audio_strmsg(expected_type));
+ }
+ }
+ return e;
+}
+
+static int bt_getcaps(struct userdata *u) {
+ int e;
+ union {
+ bt_audio_rsp_msg_header_t rsp_hdr;
+ struct bt_getcapabilities_req getcaps_req;
+ struct bt_getcapabilities_rsp getcaps_rsp;
+ uint8_t buf[BT_AUDIO_IPC_PACKET_SIZE];
+ } msg;
+
+ memset(msg.buf, 0, BT_AUDIO_IPC_PACKET_SIZE);
+ msg.getcaps_req.h.msg_type = BT_GETCAPABILITIES_REQ;
+ strncpy(msg.getcaps_req.device, u->addr, 18);
+ if (strcasecmp(u->profile, "a2dp") == 0)
+ msg.getcaps_req.transport = BT_CAPABILITIES_TRANSPORT_A2DP;
+ else if (strcasecmp(u->profile, "hsp") == 0)
+ msg.getcaps_req.transport = BT_CAPABILITIES_TRANSPORT_SCO;
+ else {
+ pa_log_error("Invalid profile argument: %s", u->profile);
+ return -1;
+ }
+ msg.getcaps_req.flags = BT_FLAG_AUTOCONNECT;
+
+ e = bt_audioservice_send(u->audioservice_fd, &msg.getcaps_req.h);
+ if (e < 0) {
+ pa_log_error("Failed to send GETCAPABILITIES_REQ");
+ return e;
+ }
+
+ e = bt_audioservice_expect(u->audioservice_fd, &msg.rsp_hdr.msg_h, BT_GETCAPABILITIES_RSP);
+ if (e < 0) {
+ pa_log_error("Failed to expect for GETCAPABILITIES_RSP");
+ return e;
+ }
+ if (msg.rsp_hdr.posix_errno != 0) {
+ pa_log_error("BT_GETCAPABILITIES failed : %s (%d)", pa_cstrerror(msg.rsp_hdr.posix_errno), msg.rsp_hdr.posix_errno);
+ return -msg.rsp_hdr.posix_errno;
+ }
+
+ if ((u->transport = msg.getcaps_rsp.transport) == BT_CAPABILITIES_TRANSPORT_A2DP)
+ u->a2dp.sbc_capabilities = msg.getcaps_rsp.sbc_capabilities;
+
+ return 0;
+}
+
+static uint8_t default_bitpool(uint8_t freq, uint8_t mode) {
+ switch (freq) {
+ case BT_SBC_SAMPLING_FREQ_16000:
+ case BT_SBC_SAMPLING_FREQ_32000:
+ return 53;
+ case BT_SBC_SAMPLING_FREQ_44100:
+ switch (mode) {
+ case BT_A2DP_CHANNEL_MODE_MONO:
+ case BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL:
+ return 31;
+ case BT_A2DP_CHANNEL_MODE_STEREO:
+ case BT_A2DP_CHANNEL_MODE_JOINT_STEREO:
+ return 53;
+ default:
+ pa_log_warn("Invalid channel mode %u", mode);
+ return 53;
+ }
+ case BT_SBC_SAMPLING_FREQ_48000:
+ switch (mode) {
+ case BT_A2DP_CHANNEL_MODE_MONO:
+ case BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL:
+ return 29;
+ case BT_A2DP_CHANNEL_MODE_STEREO:
+ case BT_A2DP_CHANNEL_MODE_JOINT_STEREO:
+ return 51;
+ default:
+ pa_log_warn("Invalid channel mode %u", mode);
+ return 51;
+ }
+ default:
+ pa_log_warn("Invalid sampling freq %u", freq);
+ return 53;
+ }
+}
+
+static int bt_a2dp_init(struct userdata *u) {
+ sbc_capabilities_t *cap = &u->a2dp.sbc_capabilities;
+ uint8_t max_bitpool, min_bitpool;
+ unsigned i;
+
+ static const struct {
+ uint32_t rate;
+ uint8_t cap;
+ } freq_table[] = {
+ { 16000U, BT_SBC_SAMPLING_FREQ_16000 },
+ { 32000U, BT_SBC_SAMPLING_FREQ_32000 },
+ { 44100U, BT_SBC_SAMPLING_FREQ_44100 },
+ { 48000U, BT_SBC_SAMPLING_FREQ_48000 }
+ };
+
+ /* Find the lowest freq that is at least as high as the requested
+ * sampling rate */
+ for (i = 0; i < PA_ELEMENTSOF(freq_table); i++)
+ if (freq_table[i].rate >= u->ss.rate || i == PA_ELEMENTSOF(freq_table)-1 ) {
+ u->ss.rate = freq_table[i].rate;
+ cap->frequency = freq_table[i].cap;
+ break;
+ }
+
+ if (u->ss.channels >= 2) {
+ if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_JOINT_STEREO)
+ cap->channel_mode = BT_A2DP_CHANNEL_MODE_JOINT_STEREO;
+ else if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_STEREO)
+ cap->channel_mode = BT_A2DP_CHANNEL_MODE_STEREO;
+ else if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL)
+ cap->channel_mode = BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL;
+
+ u->ss.channels = 2;
+ } else {
+ if (cap->channel_mode & BT_A2DP_CHANNEL_MODE_MONO)
+ cap->channel_mode = BT_A2DP_CHANNEL_MODE_MONO;
+ }
+
+ if (!cap->channel_mode) {
+ pa_log_error("No supported channel modes");
+ return -1;
+ }
+
+ if (cap->block_length & BT_A2DP_BLOCK_LENGTH_16)
+ cap->block_length = BT_A2DP_BLOCK_LENGTH_16;
+ else if (cap->block_length & BT_A2DP_BLOCK_LENGTH_12)
+ cap->block_length = BT_A2DP_BLOCK_LENGTH_12;
+ else if (cap->block_length & BT_A2DP_BLOCK_LENGTH_8)
+ cap->block_length = BT_A2DP_BLOCK_LENGTH_8;
+ else if (cap->block_length & BT_A2DP_BLOCK_LENGTH_4)
+ cap->block_length = BT_A2DP_BLOCK_LENGTH_4;
+ else {
+ pa_log_error("No supported block lengths");
+ return -1;
+ }
+
+ if (cap->subbands & BT_A2DP_SUBBANDS_8)
+ cap->subbands = BT_A2DP_SUBBANDS_8;
+ else if (cap->subbands & BT_A2DP_SUBBANDS_4)
+ cap->subbands = BT_A2DP_SUBBANDS_4;
+ else {
+ pa_log_error("No supported subbands");
+ return -1;
+ }
+
+ if (cap->allocation_method & BT_A2DP_ALLOCATION_LOUDNESS)
+ cap->allocation_method = BT_A2DP_ALLOCATION_LOUDNESS;
+ else if (cap->allocation_method & BT_A2DP_ALLOCATION_SNR)
+ cap->allocation_method = BT_A2DP_ALLOCATION_SNR;
+
+ min_bitpool = (uint8_t) PA_MAX(MIN_BITPOOL, cap->min_bitpool);
+ max_bitpool = (uint8_t) PA_MIN(default_bitpool(cap->frequency, cap->channel_mode), cap->max_bitpool);
+
+ cap->min_bitpool = (uint8_t) min_bitpool;
+ cap->max_bitpool = (uint8_t) max_bitpool;
+
+ return 0;
+}
+
+static void bt_a2dp_setup(struct bt_a2dp *a2dp) {
+ sbc_capabilities_t active_capabilities = a2dp->sbc_capabilities;
+
+ if (a2dp->sbc_initialized)
+ sbc_reinit(&a2dp->sbc, 0);
+ else
+ sbc_init(&a2dp->sbc, 0);
+ a2dp->sbc_initialized = TRUE;
+
+ if (active_capabilities.frequency & BT_SBC_SAMPLING_FREQ_16000)
+ a2dp->sbc.frequency = SBC_FREQ_16000;
+
+ if (active_capabilities.frequency & BT_SBC_SAMPLING_FREQ_32000)
+ a2dp->sbc.frequency = SBC_FREQ_32000;
+
+ if (active_capabilities.frequency & BT_SBC_SAMPLING_FREQ_44100)
+ a2dp->sbc.frequency = SBC_FREQ_44100;
+
+ if (active_capabilities.frequency & BT_SBC_SAMPLING_FREQ_48000)
+ a2dp->sbc.frequency = SBC_FREQ_48000;
+
+ if (active_capabilities.channel_mode & BT_A2DP_CHANNEL_MODE_MONO)
+ a2dp->sbc.mode = SBC_MODE_MONO;
+
+ if (active_capabilities.channel_mode & BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL)
+ a2dp->sbc.mode = SBC_MODE_DUAL_CHANNEL;
+
+ if (active_capabilities.channel_mode & BT_A2DP_CHANNEL_MODE_STEREO)
+ a2dp->sbc.mode = SBC_MODE_STEREO;
+
+ if (active_capabilities.channel_mode & BT_A2DP_CHANNEL_MODE_JOINT_STEREO)
+ a2dp->sbc.mode = SBC_MODE_JOINT_STEREO;
+
+ a2dp->sbc.allocation = (uint8_t) (active_capabilities.allocation_method == BT_A2DP_ALLOCATION_SNR ? SBC_AM_SNR : SBC_AM_LOUDNESS);
+
+ switch (active_capabilities.subbands) {
+ case BT_A2DP_SUBBANDS_4:
+ a2dp->sbc.subbands = SBC_SB_4;
+ break;
+ case BT_A2DP_SUBBANDS_8:
+ a2dp->sbc.subbands = SBC_SB_8;
+ break;
+ }
+
+ switch (active_capabilities.block_length) {
+ case BT_A2DP_BLOCK_LENGTH_4:
+ a2dp->sbc.blocks = SBC_BLK_4;
+ break;
+ case BT_A2DP_BLOCK_LENGTH_8:
+ a2dp->sbc.blocks = SBC_BLK_8;
+ break;
+ case BT_A2DP_BLOCK_LENGTH_12:
+ a2dp->sbc.blocks = SBC_BLK_12;
+ break;
+ case BT_A2DP_BLOCK_LENGTH_16:
+ a2dp->sbc.blocks = SBC_BLK_16;
+ break;
+ }
+
+ a2dp->sbc.bitpool = active_capabilities.max_bitpool;
+ a2dp->codesize = (uint16_t) sbc_get_codesize(&a2dp->sbc);
+ a2dp->count = sizeof(struct rtp_header) + sizeof(struct rtp_payload);
+}
+
+static int bt_setconf(struct userdata *u) {
+ int e;
+ union {
+ bt_audio_rsp_msg_header_t rsp_hdr;
+ struct bt_setconfiguration_req setconf_req;
+ struct bt_setconfiguration_rsp setconf_rsp;
+ uint8_t buf[BT_AUDIO_IPC_PACKET_SIZE];
+ } msg;
+
+ if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP) {
+ e = bt_a2dp_init(u);
+ if (e < 0) {
+ pa_log_error("a2dp_init error");
+ return e;
+ }
+ u->ss.format = PA_SAMPLE_S16LE;
+ }
+ else
+ u->ss.format = PA_SAMPLE_U8;
+
+ memset(msg.buf, 0, BT_AUDIO_IPC_PACKET_SIZE);
+ msg.setconf_req.h.msg_type = BT_SETCONFIGURATION_REQ;
+ strncpy(msg.setconf_req.device, u->addr, 18);
+ msg.setconf_req.transport = u->transport;
+ if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP)
+ msg.setconf_req.sbc_capabilities = u->a2dp.sbc_capabilities;
+ msg.setconf_req.access_mode = BT_CAPABILITIES_ACCESS_MODE_WRITE;
+
+ e = bt_audioservice_send(u->audioservice_fd, &msg.setconf_req.h);
+ if (e < 0) {
+ pa_log_error("Failed to send BT_SETCONFIGURATION_REQ");
+ return e;
+ }
+
+ e = bt_audioservice_expect(u->audioservice_fd, &msg.rsp_hdr.msg_h, BT_SETCONFIGURATION_RSP);
+ if (e < 0) {
+ pa_log_error("Failed to expect BT_SETCONFIGURATION_RSP");
+ return e;
+ }
+
+ if (msg.rsp_hdr.posix_errno != 0) {
+ pa_log_error("BT_SETCONFIGURATION failed : %s(%d)", pa_cstrerror(msg.rsp_hdr.posix_errno), msg.rsp_hdr.posix_errno);
+ return -msg.rsp_hdr.posix_errno;
+ }
+
+ u->transport = msg.setconf_rsp.transport;
+ u->strtransport = (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP ? pa_xstrdup("A2DP") : pa_xstrdup("SCO"));
+ u->link_mtu = msg.setconf_rsp.link_mtu;
+
+ /* setup SBC encoder now we agree on parameters */
+ if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP) {
+ bt_a2dp_setup(&u->a2dp);
+ u->block_size = u->a2dp.codesize;
+ pa_log_info("sbc parameters:\n\tallocation=%u\n\tsubbands=%u\n\tblocks=%u\n\tbitpool=%u\n",
+ u->a2dp.sbc.allocation, u->a2dp.sbc.subbands, u->a2dp.sbc.blocks, u->a2dp.sbc.bitpool);
+ }
+ else
+ u->block_size = u->link_mtu;
+
+ return 0;
+}
+
+static int bt_getstreamfd(struct userdata *u) {
+ int e;
+// uint32_t period_count = io->buffer_size / io->period_size;
+ union {
+ bt_audio_rsp_msg_header_t rsp_hdr;
+ struct bt_streamstart_req start_req;
+ struct bt_streamfd_ind streamfd_ind;
+ uint8_t buf[BT_AUDIO_IPC_PACKET_SIZE];
+ } msg;
+
+ memset(msg.buf, 0, BT_AUDIO_IPC_PACKET_SIZE);
+ msg.start_req.h.msg_type = BT_STREAMSTART_REQ;
+
+ e = bt_audioservice_send(u->audioservice_fd, &msg.start_req.h);
+ if (e < 0) {
+ pa_log_error("Failed to send BT_STREAMSTART_REQ");
+ return e;
+ }
+
+ e = bt_audioservice_expect(u->audioservice_fd, &msg.rsp_hdr.msg_h, BT_STREAMSTART_RSP);
+ if (e < 0) {
+ pa_log_error("Failed to expect BT_STREAMSTART_RSP");
+ return e;
+ }
+
+ if (msg.rsp_hdr.posix_errno != 0) {
+ pa_log_error("BT_START failed : %s(%d)", pa_cstrerror(msg.rsp_hdr.posix_errno), msg.rsp_hdr.posix_errno);
+ return -msg.rsp_hdr.posix_errno;
+ }
+
+ e = bt_audioservice_expect(u->audioservice_fd, &msg.streamfd_ind.h, BT_STREAMFD_IND);
+ if (e < 0) {
+ pa_log_error("Failed to expect BT_STREAMFD_IND");
+ return e;
+ }
+
+ if (u->stream_fd >= 0)
+ pa_close(u->stream_fd);
+
+ u->stream_fd = bt_audio_service_get_data_fd(u->audioservice_fd);
+ if (u->stream_fd < 0) {
+ pa_log_error("Failed to get data fd: %s (%d)",pa_cstrerror(errno), errno);
+ return -errno;
+ }
+
+// if (setsockopt(u->stream_fd, SOL_SCO, SCO_TXBUFS, &period_count, sizeof(period_count)) == 0)
+// return 0;
+// if (setsockopt(u->stream_fd, SOL_SCO, SO_SNDBUF, &period_count, sizeof(period_count)) == 0)
+// return 0;
+// /* FIXME : handle error codes */
+ pa_make_fd_nonblock(u->stream_fd);
+// pa_make_socket_low_delay(u->stream_fd);
+
+ return 0;
+}
+
+static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
+ struct userdata *u = PA_SINK(o)->userdata;
+
+ pa_log_debug("got message: %d", code);
+ switch (code) {
+
+ case PA_SINK_MESSAGE_SET_STATE:
+ switch ((pa_sink_state_t) PA_PTR_TO_UINT(data)) {
+ case PA_SINK_SUSPENDED:
+ pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
+ pa_smoother_pause(u->smoother, pa_rtclock_usec());
+ break;
+ case PA_SINK_IDLE:
+ case PA_SINK_RUNNING:
+ if (u->sink->thread_info.state == PA_SINK_SUSPENDED)
+ pa_smoother_resume(u->smoother, pa_rtclock_usec());
+ break;
+ case PA_SINK_UNLINKED:
+ case PA_SINK_INIT:
+ ;
+ }
+ break;
+
+ case PA_SINK_MESSAGE_GET_LATENCY: {
+ pa_usec_t w, r;
+/* r = pa_smoother_get(u->smoother, pa_rtclock_usec()); */
+/* /\* w = pa_bytes_to_usec(u->offset + (uint64_t) u->memchunk.length, &u->sink->sample_spec); *\/ */
+ *((pa_usec_t*) data) = /*w > r ? w - r :*/ 0;
+ return 0;
+ }
+
+ }
+
+ return pa_sink_process_msg(o, code, data, offset, chunk);
+}
+
+static int sco_process_render(struct userdata *u) {
+ void *p;
+ int ret = 0;
+ pa_memchunk memchunk;
+
+ pa_sink_render_full(u->sink, u->block_size, &memchunk);
+
+ p = pa_memblock_acquire(memchunk.memblock);
+
+ for (;;) {
+ ssize_t l;
+
+ l = pa_loop_write(u->stream_fd, (uint8_t*) p, memchunk.length, NULL);
+ pa_log_debug("Memblock written to socket: %li bytes", (long) l);
+
+ pa_assert(l != 0);
+
+ if (l > 0) {
+ u->offset += (uint64_t) l;
+ break;
+ }
+
+ if (errno == EINTR)
+ pa_log_debug("EINTR");
+ else if (errno == EAGAIN)
+ pa_log_debug("EAGAIN");
+ else {
+ pa_log_error("Failed to write data to FIFO: %s", pa_cstrerror(errno));
+ ret = -1;
+ break;
+ }
+ }
+
+ pa_memblock_release(memchunk.memblock);
+ pa_memblock_unref(memchunk.memblock);
+
+ return ret;
+}
+
+static int a2dp_process_render(struct userdata *u) {
+ int written;
+
+ struct bt_a2dp *a2dp = &u->a2dp;
+ struct rtp_header *header = (void *) a2dp->buffer;
+ struct rtp_payload *payload = (void *) (a2dp->buffer + sizeof(*header));
+
+ pa_assert(u);
+
+ do {
+ /* Render some data */
+ int frame_size, encoded;
+ void *p;
+ pa_memchunk memchunk;
+
+ pa_sink_render_full(u->sink, u->block_size, &memchunk);
+
+ p = pa_memblock_acquire(memchunk.memblock);
+
+ frame_size = (uint16_t) sbc_get_frame_length(&a2dp->sbc);
+ pa_log_debug("SBC frame_size: %d", frame_size);
+
+ encoded = sbc_encode(&a2dp->sbc, p, (int) a2dp->codesize, a2dp->buffer + a2dp->count,
+ (int) (sizeof(a2dp->buffer) - a2dp->count), &written);
+ pa_log_debug("SBC: encoded: %d; written: %d", encoded, written);
+
+ pa_memblock_release(memchunk.memblock);
+ pa_memblock_unref(memchunk.memblock);
+
+ if (encoded <= 0) {
+ pa_log_error("SBC encoding error (%d)", encoded);
+ return -1;
+ }
+
+ a2dp->count += (size_t) written;
+ a2dp->frame_count++;
+ a2dp->samples += (unsigned) encoded / frame_size;
+ a2dp->total_samples += (unsigned) encoded / frame_size;
+
+ } while (a2dp->count + (size_t) written <= u->link_mtu);
+
+ /* write it to the fifo */
+ memset(a2dp->buffer, 0, sizeof(*header) + sizeof(*payload));
+ payload->frame_count = a2dp->frame_count;
+ header->v = 2;
+ header->pt = 1;
+ header->sequence_number = htons(a2dp->seq_num);
+ header->timestamp = htonl(a2dp->total_samples);
+ header->ssrc = htonl(1);
+
+ for (;;) {
+ ssize_t l;
+
+ l = pa_loop_write(u->stream_fd, a2dp->buffer, a2dp->count, NULL);
+ pa_log_debug("avdtp_write: requested %lu bytes; written %li bytes", (unsigned long) a2dp->count, (long) l);
+
+ pa_assert(l != 0);
+
+ if (l > 0)
+ break;
+
+ if (errno == EINTR)
+ pa_log_debug("EINTR");
+ else if (errno == EAGAIN)
+ pa_log_debug("EAGAIN");
+ else {
+ pa_log_error("Failed to write data to FIFO: %s", pa_cstrerror(errno));
+ return -1;
+ }
+ }
+
+ u->offset += a2dp->codesize*a2dp->frame_count;
+
+ /* Reset buffer of data to send */
+ a2dp->count = sizeof(struct rtp_header) + sizeof(struct rtp_payload);
+ a2dp->frame_count = 0;
+ a2dp->samples = 0;
+ a2dp->seq_num++;
+
+ return 0;
+}
+
+static void thread_func(void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(u);
+
+ pa_log_debug("IO Thread starting up");
+
+ if (u->core->realtime_scheduling)
+ pa_make_realtime(u->core->realtime_priority);
+
+ pa_thread_mq_install(&u->thread_mq);
+ pa_rtpoll_install(u->rtpoll);
+
+ pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec());
+
+ for (;;) {
+ int ret, l;
+ struct pollfd *pollfd;
+ uint64_t n;
+ pa_usec_t usec;
+
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
+
+ pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
+
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && pollfd->revents) {
+ if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP) {
+ if ((l = a2dp_process_render(u)) < 0)
+ goto fail;
+ } else {
+ if ((l = sco_process_render(u)) < 0)
+ goto fail;
+ }
+ pollfd->revents = 0;
+
+ /* feed the time smoother */
+ n = u->offset;
+ if (ioctl(u->stream_fd, SIOCOUTQ, &l) >= 0 && l > 0)
+ n -= (uint64_t) l;
+ usec = pa_bytes_to_usec(n, &u->sink->sample_spec);
+ if (usec > u->latency)
+ usec -= u->latency;
+ else
+ usec = 0;
+ pa_smoother_put(u->smoother, pa_rtclock_usec(), usec);
+ }
+
+ /* Hmm, nothing to do. Let's sleep */
+ pa_log_debug("IO thread going to sleep");
+ pollfd->events = (short) (PA_SINK_IS_OPENED(u->sink->thread_info.state) ? POLLOUT : 0);
+ if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0) {
+ pa_log_error("rtpoll_run < 0");
+ goto fail;
+ }
+ pa_log_debug("IO thread waking up");
+
+ if (ret == 0) {
+ pa_log_debug("rtpoll_run == 0");
+ goto finish;
+ }
+
+ pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
+ if (pollfd->revents & ~POLLOUT) {
+ pa_log_error("FIFO shutdown.");
+ goto fail;
+ }
+ }
+
+fail:
+ /* If this was no regular exit from the loop we have to continue processing messages until we receive PA_MESSAGE_SHUTDOWN */
+ pa_log_debug("IO thread failed");
+ pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->core), PA_CORE_MESSAGE_UNLOAD_MODULE, u->module, 0, NULL, NULL);
+ pa_asyncmsgq_wait_for(u->thread_mq.inq, PA_MESSAGE_SHUTDOWN);
+
+finish:
+ pa_log_debug("IO thread shutting down");
+}
+
+int pa__init(pa_module* m) {
+ int e;
+ pa_modargs *ma;
+ uint32_t channels;
+ pa_sink_new_data data;
+ struct pollfd *pollfd;
+ struct userdata *u;
+
+ pa_assert(m);
+ m->userdata = u = pa_xnew0(struct userdata, 1);
+ u->module = m;
+ u->core = m->core;
+ u->audioservice_fd = -1;
+ u->stream_fd = -1;
+ u->transport = (uint8_t) -1;
+ u->offset = 0;
+ u->latency = 0;
+ u->a2dp.sbc_initialized = FALSE;
+ u->smoother = pa_smoother_new(PA_USEC_PER_SEC, PA_USEC_PER_SEC*2, TRUE, 10);
+ u->rtpoll = pa_rtpoll_new();
+ pa_thread_mq_init(&u->thread_mq, u->core->mainloop, u->rtpoll);
+ u->rtpoll_item = NULL;
+ u->ss = m->core->default_sample_spec;
+
+ if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
+ pa_log_error("Failed to parse module arguments");
+ goto fail;
+ }
+ if (!(u->name = pa_xstrdup(pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME)))) {
+ pa_log_error("Failed to get device name from module arguments");
+ goto fail;
+ }
+ if (!(u->addr = pa_xstrdup(pa_modargs_get_value(ma, "address", NULL)))) {
+ pa_log_error("Failed to get device address from module arguments");
+ goto fail;
+ }
+ if (!(u->profile = pa_xstrdup(pa_modargs_get_value(ma, "profile", NULL)))) {
+ pa_log_error("Failed to get profile from module arguments");
+ goto fail;
+ }
+ if (pa_modargs_get_value_u32(ma, "rate", &u->ss.rate) < 0) {
+ pa_log_error("Failed to get rate from module arguments");
+ goto fail;
+ }
+
+ channels = u->ss.channels;
+ if (pa_modargs_get_value_u32(ma, "channels", &channels) < 0) {
+ pa_log_error("Failed to get channels from module arguments");
+ goto fail;
+ }
+ u->ss.channels = (uint8_t) channels;
+
+ /* connect to the bluez audio service */
+ u->audioservice_fd = bt_audio_service_open();
+ if (u->audioservice_fd <= 0) {
+ pa_log_error("Couldn't connect to bluetooth audio service");
+ goto fail;
+ }
+ pa_log_debug("Connected to the bluetooth audio service");
+
+ /* queries device capabilities */
+ e = bt_getcaps(u);
+ if (e < 0) {
+ pa_log_error("Failed to get device capabilities");
+ goto fail;
+ }
+ pa_log_debug("Got device capabilities");
+
+ /* configures the connection */
+ e = bt_setconf(u);
+ if (e < 0) {
+ pa_log_error("Failed to set config");
+ goto fail;
+ }
+ pa_log_debug("Connection to the device configured");
+
+ /* gets the device socket */
+ e = bt_getstreamfd(u);
+ if (e < 0) {
+ pa_log_error("Failed to get stream fd (%d)", e);
+ goto fail;
+ }
+ pa_log_debug("Got the device socket");
+
+ /* create sink */
+ pa_sink_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_sink_new_data_set_name(&data, u->name);
+ pa_sink_new_data_set_sample_spec(&data, &u->ss);
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->name);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Bluetooth %s '%s' (%s)", u->strtransport, u->name, u->addr);
+ pa_proplist_sets(data.proplist, "bluetooth.protocol", u->profile);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_API, "bluez");
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_CLASS, "sound");
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_CONNECTOR, "bluetooth");
+/* pa_proplist_setf(data.proplist, PA_PROP_DEVICE_FORM_FACTOR, "headset"); /\*FIXME*\/ */
+/* pa_proplist_setf(data.proplist, PA_PROP_DEVICE_VENDOR_PRODUCT_ID, "product_id"); /\*FIXME*\/ */
+/* pa_proplist_setf(data.proplist, PA_PROP_DEVICE_SERIAL, "serial"); /\*FIXME*\/ */
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY);
+ pa_sink_new_data_done(&data);
+ if (!u->sink) {
+ pa_log_error("Failed to create sink");
+ goto fail;
+ }
+ u->sink->userdata = u;
+ u->sink->parent.process_msg = sink_process_msg;
+ pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
+ pa_sink_set_rtpoll(u->sink, u->rtpoll);
+
+ u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
+ pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
+ pollfd->fd = u->stream_fd;
+ pollfd->events = pollfd->revents = 0;
+
+ /* start rt thread */
+ if (!(u->thread = pa_thread_new(thread_func, u))) {
+ pa_log_error("Failed to create IO thread");
+ goto fail;
+ }
+ pa_sink_put(u->sink);
+
+ pa_modargs_free(ma);
+ return 0;
+
+fail:
+ if (ma)
+ pa_modargs_free(ma);
+
+ pa__done(m);
+ return -1;
+}
+
+void pa__done(pa_module *m) {
+ struct userdata *u;
+ pa_assert(m);
+
+ if (!(u = m->userdata))
+ return;
+
+ if (u->sink)
+ pa_sink_unlink(u->sink);
+
+ if (u->thread) {
+ pa_asyncmsgq_send(u->thread_mq.inq, NULL, PA_MESSAGE_SHUTDOWN, NULL, 0, NULL);
+ pa_thread_free(u->thread);
+ }
+
+ if (u->sink)
+ pa_sink_unref(u->sink);
+
+ pa_thread_mq_done(&u->thread_mq);
+
+ if (u->rtpoll_item)
+ pa_rtpoll_item_free(u->rtpoll_item);
+
+ if (u->rtpoll)
+ pa_rtpoll_free(u->rtpoll);
+
+ if (u->smoother)
+ pa_smoother_free(u->smoother);
+
+ pa_xfree(u->name);
+ pa_xfree(u->addr);
+ pa_xfree(u->profile);
+ pa_xfree(u->strtransport);
+
+ if (u->stream_fd >= 0)
+ pa_close(u->stream_fd);
+
+ if (u->audioservice_fd >= 0)
+ pa_close(u->audioservice_fd);
+
+ pa_xfree(u);
+}
diff --git a/src/modules/bluetooth/module-bluetooth-discover-symdef.h b/src/modules/bluetooth/module-bluetooth-discover-symdef.h
new file mode 100644
index 0000000..623d680
--- /dev/null
+++ b/src/modules/bluetooth/module-bluetooth-discover-symdef.h
@@ -0,0 +1,25 @@
+#ifndef foomodulebluetoothdiscoversymdeffoo
+#define foomodulebluetoothdiscoversymdeffoo
+
+#include <pulsecore/core.h>
+#include <pulsecore/module.h>
+#include <pulsecore/macro.h>
+
+#define pa__init module_bluetooth_discover_LTX_pa__init
+#define pa__done module_bluetooth_discover_LTX_pa__done
+#define pa__get_author module_bluetooth_discover_LTX_pa__get_author
+#define pa__get_description module_bluetooth_discover_LTX_pa__get_description
+#define pa__get_usage module_bluetooth_discover_LTX_pa__get_usage
+#define pa__get_version module_bluetooth_discover_LTX_pa__get_version
+#define pa__load_once module_bluetooth_discover_LTX_pa__load_once
+
+int pa__init(pa_module*m);
+void pa__done(pa_module*m);
+
+const char* pa__get_author(void);
+const char* pa__get_description(void);
+const char* pa__get_usage(void);
+const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
+
+#endif
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
new file mode 100644
index 0000000..0601e9a
--- /dev/null
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -0,0 +1,510 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Joao Paulo Rechi Vita
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <pulse/xmalloc.h>
+#include <pulsecore/module.h>
+#include <pulsecore/modargs.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/llist.h>
+#include <pulsecore/core-util.h>
+
+#include "../dbus-util.h"
+#include "module-bluetooth-discover-symdef.h"
+
+PA_MODULE_AUTHOR("Joao Paulo Rechi Vita");
+PA_MODULE_DESCRIPTION("Detect available bluetooth audio devices and load bluetooth audio drivers");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_USAGE("");
+
+struct module {
+ char *profile;
+ pa_module *pa_m;
+ PA_LLIST_FIELDS(struct module);
+};
+
+struct uuid {
+ char *uuid;
+ PA_LLIST_FIELDS(struct uuid);
+};
+
+struct device {
+ char *name;
+ char *object_path;
+ int paired;
+ char *alias;
+ int connected;
+ PA_LLIST_HEAD(struct uuid, uuid_list);
+ char *address;
+ int class;
+ int trusted;
+ PA_LLIST_HEAD(struct module, module_list);
+ PA_LLIST_FIELDS(struct device);
+};
+
+struct userdata {
+ pa_module *module;
+ pa_dbus_connection *conn;
+ PA_LLIST_HEAD(struct device, device_list);
+};
+
+static struct module *module_new(const char *profile, pa_module *pa_m) {
+ struct module *m;
+
+ m = pa_xnew(struct module, 1);
+ m->profile = pa_xstrdup(profile);
+ m->pa_m = pa_m;
+ PA_LLIST_INIT(struct module, m);
+
+ return m;
+}
+
+static void module_free(struct module *m) {
+ pa_assert(m);
+
+ pa_xfree(m->profile);
+ pa_xfree(m);
+}
+
+static struct uuid *uuid_new(const char *uuid) {
+ struct uuid *node;
+
+ node = pa_xnew(struct uuid, 1);
+ node->uuid = pa_xstrdup(uuid);
+ PA_LLIST_INIT(struct uuid, node);
+
+ return node;
+}
+
+static void uuid_free(struct uuid *uuid) {
+ pa_assert(uuid);
+
+ pa_xfree(uuid->uuid);
+ pa_xfree(uuid);
+}
+
+static struct device *device_new(const char *object_path) {
+ struct device *node;
+
+ node = pa_xnew(struct device, 1);
+ node->name = NULL;
+ node->object_path = pa_xstrdup(object_path);
+ node->paired = -1;
+ node->alias = NULL;
+ node->connected = -1;
+ PA_LLIST_HEAD_INIT(struct uuid, node->uuid_list);
+ node->address = NULL;
+ node->class = -1;
+ node->trusted = -1;
+ PA_LLIST_HEAD_INIT(struct module, node->module_list);
+ PA_LLIST_INIT(struct device, node);
+
+ return node;
+}
+
+static void device_free(struct device *device) {
+ struct module *m;
+ struct uuid *i;
+
+ pa_assert(device);
+
+ while ((m = device->module_list)) {
+ PA_LLIST_REMOVE(struct module, device->module_list, m);
+ module_free(m);
+ }
+
+ while ((i = device->uuid_list)) {
+ PA_LLIST_REMOVE(struct uuid, device->uuid_list, i);
+ uuid_free(i);
+ }
+
+ pa_xfree(device->name);
+ pa_xfree(device->object_path);
+ pa_xfree(device->alias);
+ pa_xfree(device->address);
+ pa_xfree(device);
+}
+
+static struct device* device_find(struct userdata *u, const char *path) {
+ struct device *i;
+
+ for (i = u->device_list; i; i = i->next)
+ if (pa_streq(i->object_path, path))
+ return i;
+
+ return NULL;
+}
+
+static int parse_device_property(struct userdata *u, struct device *d, DBusMessageIter *i) {
+ const char *key;
+ DBusMessageIter variant_i;
+
+ pa_assert(u);
+ pa_assert(d);
+ pa_assert(i);
+
+ if (dbus_message_iter_get_arg_type(i) != DBUS_TYPE_STRING) {
+ pa_log("Property name not a string.");
+ return -1;
+ }
+
+ dbus_message_iter_get_basic(i, &key);
+
+ if (!dbus_message_iter_next(i)) {
+ pa_log("Property value missing");
+ return -1;
+ }
+
+ if (dbus_message_iter_get_arg_type(i) != DBUS_TYPE_VARIANT) {
+ pa_log("Property value not a variant.");
+ return -1;
+ }
+
+ dbus_message_iter_recurse(i, &variant_i);
+
+ pa_log_debug("Parsing device property %s", key);
+
+ switch (dbus_message_iter_get_arg_type(&variant_i)) {
+
+ case DBUS_TYPE_STRING: {
+
+ const char *value;
+ dbus_message_iter_get_basic(&variant_i, &value);
+
+ if (pa_streq(key, "Name")) {
+ pa_xfree(d->name);
+ d->name = pa_xstrdup(value);
+ } else if (pa_streq(key, "Alias")) {
+ pa_xfree(d->alias);
+ d->alias = pa_xstrdup(value);
+ } else if (pa_streq(key, "Address")) {
+ pa_xfree(d->address);
+ d->address = pa_xstrdup(value);
+ }
+
+ break;
+ }
+
+ case DBUS_TYPE_BOOLEAN: {
+
+ dbus_bool_t value;
+ dbus_message_iter_get_basic(&variant_i, &value);
+
+ if (pa_streq(key, "Paired"))
+ d->paired = !!value;
+ else if (pa_streq(key, "Connected"))
+ d->connected = !!value;
+ else if (pa_streq(key, "Trusted"))
+ d->trusted = !!value;
+
+ break;
+ }
+
+ case DBUS_TYPE_UINT32: {
+
+ uint32_t value;
+ dbus_message_iter_get_basic(&variant_i, &value);
+
+ if (pa_streq(key, "Class"))
+ d->class = (int) value;
+
+ break;
+ }
+
+ case DBUS_TYPE_ARRAY: {
+
+ DBusMessageIter ai;
+ dbus_message_iter_recurse(&variant_i, &ai);
+
+ if (dbus_message_iter_get_arg_type(&ai) == DBUS_TYPE_STRING &&
+ pa_streq(key, "UUIDs")) {
+
+ while (dbus_message_iter_get_arg_type(&ai) != DBUS_TYPE_INVALID) {
+ struct uuid *node;
+ const char *value;
+
+ dbus_message_iter_get_basic(&ai, &value);
+ node = uuid_new(value);
+ PA_LLIST_PREPEND(struct uuid, d->uuid_list, node);
+
+ if (!dbus_message_iter_next(&ai))
+ break;
+ }
+ }
+
+ break;
+ }
+ }
+
+ return 0;
+}
+
+static int get_device_properties(struct userdata *u, struct device *d) {
+ DBusError e;
+ DBusMessage *m = NULL, *r = NULL;
+ DBusMessageIter arg_i, element_i;
+ int ret = -1;
+
+ pa_assert(u);
+ pa_assert(d);
+
+ dbus_error_init(&e);
+
+ pa_assert_se(m = dbus_message_new_method_call("org.bluez", d->object_path, "org.bluez.Device", "GetProperties"));
+
+ r = dbus_connection_send_with_reply_and_block(pa_dbus_connection_get(u->conn), m, -1, &e);
+
+ if (!r) {
+ pa_log("org.bluez.Device.GetProperties failed: %s", e.message);
+ goto finish;
+ }
+
+ if (!dbus_message_iter_init(r, &arg_i)) {
+ pa_log("org.bluez.Device.GetProperties reply has no arguments");
+ goto finish;
+ }
+
+ if (dbus_message_iter_get_arg_type(&arg_i) != DBUS_TYPE_ARRAY) {
+ pa_log("org.bluez.Device.GetProperties argument is not an array");
+ goto finish;
+ }
+
+ dbus_message_iter_recurse(&arg_i, &element_i);
+ while (dbus_message_iter_get_arg_type(&element_i) != DBUS_TYPE_INVALID) {
+
+ if (dbus_message_iter_get_arg_type(&element_i) == DBUS_TYPE_DICT_ENTRY) {
+ DBusMessageIter dict_i;
+
+ dbus_message_iter_recurse(&element_i, &dict_i);
+
+ if (parse_device_property(u, d, &dict_i) < 0)
+ goto finish;
+ }
+
+ if (!dbus_message_iter_next(&element_i))
+ break;
+ }
+
+ ret = 0;
+
+finish:
+ if (m)
+ dbus_message_unref(m);
+ if (r)
+ dbus_message_unref(r);
+
+ dbus_error_free(&e);
+
+ return ret;
+}
+
+static void load_module_for_device(struct userdata *u, struct device *d, const char *profile) {
+ char *args;
+ pa_module *pa_m;
+ struct module *m;
+
+ pa_assert(u);
+ pa_assert(d);
+
+ get_device_properties(u, d);
+ args = pa_sprintf_malloc("sink_name=\"%s\" address=\"%s\" profile=\"%s\"", d->name, d->address, profile);
+ pa_m = pa_module_load(u->module->core, "module-bluetooth-device", args);
+ pa_xfree(args);
+
+ if (!m) {
+ pa_log_debug("Failed to load module for device %s", d->object_path);
+ return;
+ }
+
+ m = module_new(profile, pa_m);
+ PA_LLIST_PREPEND(struct module, d->module_list, m);
+}
+
+static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *msg, void *userdata) {
+ DBusMessageIter arg_i;
+ DBusError err;
+ const char *value;
+ struct userdata *u;
+
+ pa_assert(bus);
+ pa_assert(msg);
+ pa_assert(userdata);
+ u = userdata;
+
+ dbus_error_init(&err);
+
+ pa_log_debug("dbus: interface=%s, path=%s, member=%s\n",
+ dbus_message_get_interface(msg),
+ dbus_message_get_path(msg),
+ dbus_message_get_member(msg));
+
+ if (dbus_message_is_signal(msg, "org.bluez.Adapter", "DeviceRemoved")) {
+
+ if (!dbus_message_iter_init(msg, &arg_i))
+ pa_log("dbus: message has no parameters");
+ else if (dbus_message_iter_get_arg_type(&arg_i) != DBUS_TYPE_OBJECT_PATH)
+ pa_log("dbus: argument is not object path");
+ else {
+ struct device *d;
+
+ dbus_message_iter_get_basic(&arg_i, &value);
+ pa_log_debug("hcid: device %s removed", value);
+
+ if ((d = device_find(u, value))) {
+ PA_LLIST_REMOVE(struct device, u->device_list, d);
+ device_free(d);
+ }
+ }
+
+ } else if (dbus_message_is_signal(msg, "org.bluez.Headset", "PropertyChanged") ||
+ dbus_message_is_signal(msg, "org.bluez.AudioSink", "PropertyChanged")) {
+
+ struct device *d;
+ const char *profile;
+ DBusMessageIter variant_i;
+
+ if (!dbus_message_iter_init(msg, &arg_i)) {
+ pa_log("dbus: message has no parameters");
+ goto done;
+ }
+
+ if (dbus_message_iter_get_arg_type(&arg_i) != DBUS_TYPE_STRING) {
+ pa_log("Property name not a string.");
+ goto done;
+ }
+
+ dbus_message_iter_get_basic(&arg_i, &value);
+
+ if (!dbus_message_iter_next(&arg_i)) {
+ pa_log("Property value missing");
+ goto done;
+ }
+
+ if (dbus_message_iter_get_arg_type(&arg_i) != DBUS_TYPE_VARIANT) {
+ pa_log("Property value not a variant.");
+ goto done;
+ }
+
+ dbus_message_iter_recurse(&arg_i, &variant_i);
+
+ if (dbus_message_iter_get_arg_type(&variant_i) == DBUS_TYPE_BOOLEAN) {
+ dbus_bool_t connected;
+ dbus_message_iter_get_basic(&variant_i, &connected);
+
+ if (!pa_streq(value, "Connected") || !connected)
+ goto done;
+ }
+
+ if (!(d = device_find(u, dbus_message_get_path(msg)))) {
+ d = device_new(dbus_message_get_path(msg));
+ PA_LLIST_PREPEND(struct device, u->device_list, d);
+ }
+
+ if (dbus_message_is_signal(msg, "org.bluez.Headset", "PropertyChanged"))
+ profile = "hsp";
+ else
+ profile = "a2dp";
+
+ load_module_for_device(u, d, profile);
+ }
+
+done:
+ dbus_error_free(&err);
+ return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+void pa__done(pa_module* m) {
+ struct userdata *u;
+ struct device *i;
+
+ pa_assert(m);
+
+ if (!(u = m->userdata))
+ return;
+
+ while ((i = u->device_list)) {
+ PA_LLIST_REMOVE(struct device, u->device_list, i);
+ device_free(i);
+ }
+
+ if (u->conn)
+ pa_dbus_connection_unref(u->conn);
+
+ pa_xfree(u);
+}
+
+int pa__init(pa_module* m) {
+ DBusError err;
+ struct userdata *u;
+
+ pa_assert(m);
+ dbus_error_init(&err);
+
+ m->userdata = u = pa_xnew(struct userdata, 1);
+ u->module = m;
+ PA_LLIST_HEAD_INIT(struct device, u->device_list);
+
+ /* connect to the bus */
+ u->conn = pa_dbus_bus_get(m->core, DBUS_BUS_SYSTEM, &err);
+ if (dbus_error_is_set(&err) || (u->conn == NULL) ) {
+ pa_log("Failed to get D-Bus connection: %s", err.message);
+ goto fail;
+ }
+
+ /* dynamic detection of bluetooth audio devices */
+ if (!dbus_connection_add_filter(pa_dbus_connection_get(u->conn), filter_cb, u, NULL)) {
+ pa_log_error("Failed to add filter function");
+ goto fail;
+ }
+
+ dbus_bus_add_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.Adapter',member='DeviceRemoved'", &err);
+ if (dbus_error_is_set(&err)) {
+ pa_log_error("Unable to subscribe to org.bluez.Adapter signals: %s: %s", err.name, err.message);
+ goto fail;
+ }
+
+ dbus_bus_add_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.Headset',member='PropertyChanged'", &err);
+ if (dbus_error_is_set(&err)) {
+ pa_log_error("Unable to subscribe to org.bluez.Headset signals: %s: %s", err.name, err.message);
+ goto fail;
+ }
+
+ dbus_bus_add_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.AudioSink',member='PropertyChanged'", &err);
+ if (dbus_error_is_set(&err)) {
+ pa_log_error("Unable to subscribe to org.bluez.AudioSink signals: %s: %s", err.name, err.message);
+ goto fail;
+ }
+
+ return 0;
+
+fail:
+ dbus_error_free(&err);
+ pa__done(m);
+
+ return -1;
+}
diff --git a/src/modules/bluetooth/module-bluetooth-proximity-symdef.h b/src/modules/bluetooth/module-bluetooth-proximity-symdef.h
new file mode 100644
index 0000000..9c58824
--- /dev/null
+++ b/src/modules/bluetooth/module-bluetooth-proximity-symdef.h
@@ -0,0 +1,25 @@
+#ifndef foomodulebluetoothproximitysymdeffoo
+#define foomodulebluetoothproximitysymdeffoo
+
+#include <pulsecore/core.h>
+#include <pulsecore/module.h>
+#include <pulsecore/macro.h>
+
+#define pa__init module_bluetooth_proximity_LTX_pa__init
+#define pa__done module_bluetooth_proximity_LTX_pa__done
+#define pa__get_author module_bluetooth_proximity_LTX_pa__get_author
+#define pa__get_description module_bluetooth_proximity_LTX_pa__get_description
+#define pa__get_usage module_bluetooth_proximity_LTX_pa__get_usage
+#define pa__get_version module_bluetooth_proximity_LTX_pa__get_version
+#define pa__load_once module_bluetooth_proximity_LTX_pa__load_once
+
+int pa__init(pa_module*m);
+void pa__done(pa_module*m);
+
+const char* pa__get_author(void);
+const char* pa__get_description(void);
+const char* pa__get_usage(void);
+const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
+
+#endif
diff --git a/src/modules/module-bt-proximity.c b/src/modules/bluetooth/module-bluetooth-proximity.c
index 9832c05..4cfaaf5 100644
--- a/src/modules/module-bt-proximity.c
+++ b/src/modules/bluetooth/module-bluetooth-proximity.c
@@ -1,5 +1,3 @@
-/* $Id: module-bt-proximity.c 2050 2007-11-13 17:37:44Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -45,8 +43,8 @@
#include <pulsecore/core-error.h>
#include <pulsecore/start-child.h>
-#include "dbus-util.h"
-#include "module-bt-proximity-symdef.h"
+#include "../dbus-util.h"
+#include "module-bluetooth-proximity-symdef.h"
PA_MODULE_AUTHOR("Lennart Poettering");
PA_MODULE_DESCRIPTION("Bluetooth Proximity Volume Control");
@@ -360,7 +358,6 @@ static int add_matches(struct userdata *u, pa_bool_t add) {
} else
dbus_bus_remove_match(pa_dbus_connection_get(u->dbus_connection), filter2, &e);
-
if (add)
pa_assert_se(dbus_connection_add_filter(pa_dbus_connection_get(u->dbus_connection), filter_func, u, NULL));
else
diff --git a/src/modules/bt-proximity-helper.c b/src/modules/bluetooth/proximity-helper.c
index e8fc504..3767f01 100644
--- a/src/modules/bt-proximity-helper.c
+++ b/src/modules/bluetooth/proximity-helper.c
@@ -1,5 +1,3 @@
-/* $Id: bt-proximity-helper.c 2178 2008-03-27 23:41:34Z lennart $ */
-
/*
* Small SUID helper that allows us to ping a BT device. Borrows
* heavily from bluez-utils' l2ping, which is licensed as GPL2+
diff --git a/src/modules/bluetooth/rtp.h b/src/modules/bluetooth/rtp.h
new file mode 100644
index 0000000..690bd43
--- /dev/null
+++ b/src/modules/bluetooth/rtp.h
@@ -0,0 +1,76 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
+struct rtp_header {
+ uint8_t cc:4;
+ uint8_t x:1;
+ uint8_t p:1;
+ uint8_t v:2;
+
+ uint8_t pt:7;
+ uint8_t m:1;
+
+ uint16_t sequence_number;
+ uint32_t timestamp;
+ uint32_t ssrc;
+ uint32_t csrc[0];
+} __attribute__ ((packed));
+
+struct rtp_payload {
+ uint8_t frame_count:4;
+ uint8_t rfa0:1;
+ uint8_t is_last_fragment:1;
+ uint8_t is_first_fragment:1;
+ uint8_t is_fragmented:1;
+} __attribute__ ((packed));
+
+#elif __BYTE_ORDER == __BIG_ENDIAN
+
+struct rtp_header {
+ uint8_t v:2;
+ uint8_t p:1;
+ uint8_t x:1;
+ uint8_t cc:4;
+
+ uint8_t m:1;
+ uint8_t pt:7;
+
+ uint16_t sequence_number;
+ uint32_t timestamp;
+ uint32_t ssrc;
+ uint32_t csrc[0];
+} __attribute__ ((packed));
+
+struct rtp_payload {
+ uint8_t is_fragmented:1;
+ uint8_t is_first_fragment:1;
+ uint8_t is_last_fragment:1;
+ uint8_t rfa0:1;
+ uint8_t frame_count:4;
+} __attribute__ ((packed));
+
+#else
+#error "Unknown byte order"
+#endif
diff --git a/src/modules/bluetooth/sbc.c b/src/modules/bluetooth/sbc.c
new file mode 100644
index 0000000..02a6143
--- /dev/null
+++ b/src/modules/bluetooth/sbc.c
@@ -0,0 +1,1411 @@
+/*
+ *
+ * Bluetooth low-complexity, subband codec (SBC) library
+ *
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
+ * Copyright (C) 2005-2008 Brad Midgley <bmidgley@xmission.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* todo items:
+
+ use a log2 table for byte integer scale factors calculation (sum log2 results
+ for high and low bytes) fill bitpool by 16 bits instead of one at a time in
+ bits allocation/bitpool generation port to the dsp
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+#include "sbc_math.h"
+#include "sbc_tables.h"
+
+#include "sbc.h"
+
+#define SBC_SYNCWORD 0x9C
+
+/* This structure contains an unpacked SBC frame.
+ Yes, there is probably quite some unused space herein */
+struct sbc_frame {
+ uint8_t frequency;
+ uint8_t block_mode;
+ uint8_t blocks;
+ enum {
+ MONO = SBC_MODE_MONO,
+ DUAL_CHANNEL = SBC_MODE_DUAL_CHANNEL,
+ STEREO = SBC_MODE_STEREO,
+ JOINT_STEREO = SBC_MODE_JOINT_STEREO
+ } mode;
+ uint8_t channels;
+ enum {
+ LOUDNESS = SBC_AM_LOUDNESS,
+ SNR = SBC_AM_SNR
+ } allocation;
+ uint8_t subband_mode;
+ uint8_t subbands;
+ uint8_t bitpool;
+ uint8_t codesize;
+ uint8_t length;
+
+ /* bit number x set means joint stereo has been used in subband x */
+ uint8_t joint;
+
+ /* only the lower 4 bits of every element are to be used */
+ uint8_t scale_factor[2][8];
+
+ /* raw integer subband samples in the frame */
+
+ int32_t sb_sample_f[16][2][8];
+ int32_t sb_sample[16][2][8]; /* modified subband samples */
+ int16_t pcm_sample[2][16*8]; /* original pcm audio samples */
+};
+
+struct sbc_decoder_state {
+ int subbands;
+ int32_t V[2][170];
+ int offset[2][16];
+};
+
+struct sbc_encoder_state {
+ int subbands;
+ int position[2];
+ int32_t X[2][160];
+};
+
+/*
+ * Calculates the CRC-8 of the first len bits in data
+ */
+static const uint8_t crc_table[256] = {
+ 0x00, 0x1D, 0x3A, 0x27, 0x74, 0x69, 0x4E, 0x53,
+ 0xE8, 0xF5, 0xD2, 0xCF, 0x9C, 0x81, 0xA6, 0xBB,
+ 0xCD, 0xD0, 0xF7, 0xEA, 0xB9, 0xA4, 0x83, 0x9E,
+ 0x25, 0x38, 0x1F, 0x02, 0x51, 0x4C, 0x6B, 0x76,
+ 0x87, 0x9A, 0xBD, 0xA0, 0xF3, 0xEE, 0xC9, 0xD4,
+ 0x6F, 0x72, 0x55, 0x48, 0x1B, 0x06, 0x21, 0x3C,
+ 0x4A, 0x57, 0x70, 0x6D, 0x3E, 0x23, 0x04, 0x19,
+ 0xA2, 0xBF, 0x98, 0x85, 0xD6, 0xCB, 0xEC, 0xF1,
+ 0x13, 0x0E, 0x29, 0x34, 0x67, 0x7A, 0x5D, 0x40,
+ 0xFB, 0xE6, 0xC1, 0xDC, 0x8F, 0x92, 0xB5, 0xA8,
+ 0xDE, 0xC3, 0xE4, 0xF9, 0xAA, 0xB7, 0x90, 0x8D,
+ 0x36, 0x2B, 0x0C, 0x11, 0x42, 0x5F, 0x78, 0x65,
+ 0x94, 0x89, 0xAE, 0xB3, 0xE0, 0xFD, 0xDA, 0xC7,
+ 0x7C, 0x61, 0x46, 0x5B, 0x08, 0x15, 0x32, 0x2F,
+ 0x59, 0x44, 0x63, 0x7E, 0x2D, 0x30, 0x17, 0x0A,
+ 0xB1, 0xAC, 0x8B, 0x96, 0xC5, 0xD8, 0xFF, 0xE2,
+ 0x26, 0x3B, 0x1C, 0x01, 0x52, 0x4F, 0x68, 0x75,
+ 0xCE, 0xD3, 0xF4, 0xE9, 0xBA, 0xA7, 0x80, 0x9D,
+ 0xEB, 0xF6, 0xD1, 0xCC, 0x9F, 0x82, 0xA5, 0xB8,
+ 0x03, 0x1E, 0x39, 0x24, 0x77, 0x6A, 0x4D, 0x50,
+ 0xA1, 0xBC, 0x9B, 0x86, 0xD5, 0xC8, 0xEF, 0xF2,
+ 0x49, 0x54, 0x73, 0x6E, 0x3D, 0x20, 0x07, 0x1A,
+ 0x6C, 0x71, 0x56, 0x4B, 0x18, 0x05, 0x22, 0x3F,
+ 0x84, 0x99, 0xBE, 0xA3, 0xF0, 0xED, 0xCA, 0xD7,
+ 0x35, 0x28, 0x0F, 0x12, 0x41, 0x5C, 0x7B, 0x66,
+ 0xDD, 0xC0, 0xE7, 0xFA, 0xA9, 0xB4, 0x93, 0x8E,
+ 0xF8, 0xE5, 0xC2, 0xDF, 0x8C, 0x91, 0xB6, 0xAB,
+ 0x10, 0x0D, 0x2A, 0x37, 0x64, 0x79, 0x5E, 0x43,
+ 0xB2, 0xAF, 0x88, 0x95, 0xC6, 0xDB, 0xFC, 0xE1,
+ 0x5A, 0x47, 0x60, 0x7D, 0x2E, 0x33, 0x14, 0x09,
+ 0x7F, 0x62, 0x45, 0x58, 0x0B, 0x16, 0x31, 0x2C,
+ 0x97, 0x8A, 0xAD, 0xB0, 0xE3, 0xFE, 0xD9, 0xC4
+};
+
+static uint8_t sbc_crc8(const uint8_t *data, size_t len)
+{
+ uint8_t crc = 0x0f;
+ size_t i;
+ uint8_t octet;
+
+ for (i = 0; i < len / 8; i++)
+ crc = crc_table[crc ^ data[i]];
+
+ octet = data[i];
+ for (i = 0; i < len % 8; i++) {
+ unsigned char bit = ((octet ^ crc) & 0x80) >> 7;
+
+ crc = ((crc & 0x7f) << 1) ^ (bit ? 0x1d : 0);
+
+ octet = octet << 1;
+ }
+
+ return crc;
+}
+
+/*
+ * Code straight from the spec to calculate the bits array
+ * Takes a pointer to the frame in question, a pointer to the bits array and
+ * the sampling frequency (as 2 bit integer)
+ */
+static void sbc_calculate_bits(const struct sbc_frame *frame, int (*bits)[8])
+{
+ uint8_t sf = frame->frequency;
+
+ if (frame->mode == MONO || frame->mode == DUAL_CHANNEL) {
+ int bitneed[2][8], loudness, max_bitneed, bitcount, slicecount, bitslice;
+ int ch, sb;
+
+ for (ch = 0; ch < frame->channels; ch++) {
+ max_bitneed = 0;
+ if (frame->allocation == SNR) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ bitneed[ch][sb] = frame->scale_factor[ch][sb];
+ if (bitneed[ch][sb] > max_bitneed)
+ max_bitneed = bitneed[ch][sb];
+ }
+ } else {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if (frame->scale_factor[ch][sb] == 0)
+ bitneed[ch][sb] = -5;
+ else {
+ if (frame->subbands == 4)
+ loudness = frame->scale_factor[ch][sb] - sbc_offset4[sf][sb];
+ else
+ loudness = frame->scale_factor[ch][sb] - sbc_offset8[sf][sb];
+ if (loudness > 0)
+ bitneed[ch][sb] = loudness / 2;
+ else
+ bitneed[ch][sb] = loudness;
+ }
+ if (bitneed[ch][sb] > max_bitneed)
+ max_bitneed = bitneed[ch][sb];
+ }
+ }
+
+ bitcount = 0;
+ slicecount = 0;
+ bitslice = max_bitneed + 1;
+ do {
+ bitslice--;
+ bitcount += slicecount;
+ slicecount = 0;
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if ((bitneed[ch][sb] > bitslice + 1) && (bitneed[ch][sb] < bitslice + 16))
+ slicecount++;
+ else if (bitneed[ch][sb] == bitslice + 1)
+ slicecount += 2;
+ }
+ } while (bitcount + slicecount < frame->bitpool);
+
+ if (bitcount + slicecount == frame->bitpool) {
+ bitcount += slicecount;
+ bitslice--;
+ }
+
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if (bitneed[ch][sb] < bitslice + 2)
+ bits[ch][sb] = 0;
+ else {
+ bits[ch][sb] = bitneed[ch][sb] - bitslice;
+ if (bits[ch][sb] > 16)
+ bits[ch][sb] = 16;
+ }
+ }
+
+ for (sb = 0; bitcount < frame->bitpool && sb < frame->subbands; sb++) {
+ if ((bits[ch][sb] >= 2) && (bits[ch][sb] < 16)) {
+ bits[ch][sb]++;
+ bitcount++;
+ } else if ((bitneed[ch][sb] == bitslice + 1) && (frame->bitpool > bitcount + 1)) {
+ bits[ch][sb] = 2;
+ bitcount += 2;
+ }
+ }
+
+ for (sb = 0; bitcount < frame->bitpool && sb < frame->subbands; sb++) {
+ if (bits[ch][sb] < 16) {
+ bits[ch][sb]++;
+ bitcount++;
+ }
+ }
+
+ }
+
+ } else if (frame->mode == STEREO || frame->mode == JOINT_STEREO) {
+ int bitneed[2][8], loudness, max_bitneed, bitcount, slicecount, bitslice;
+ int ch, sb;
+
+ max_bitneed = 0;
+ if (frame->allocation == SNR) {
+ for (ch = 0; ch < 2; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ bitneed[ch][sb] = frame->scale_factor[ch][sb];
+ if (bitneed[ch][sb] > max_bitneed)
+ max_bitneed = bitneed[ch][sb];
+ }
+ }
+ } else {
+ for (ch = 0; ch < 2; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if (frame->scale_factor[ch][sb] == 0)
+ bitneed[ch][sb] = -5;
+ else {
+ if (frame->subbands == 4)
+ loudness = frame->scale_factor[ch][sb] - sbc_offset4[sf][sb];
+ else
+ loudness = frame->scale_factor[ch][sb] - sbc_offset8[sf][sb];
+ if (loudness > 0)
+ bitneed[ch][sb] = loudness / 2;
+ else
+ bitneed[ch][sb] = loudness;
+ }
+ if (bitneed[ch][sb] > max_bitneed)
+ max_bitneed = bitneed[ch][sb];
+ }
+ }
+ }
+
+ bitcount = 0;
+ slicecount = 0;
+ bitslice = max_bitneed + 1;
+ do {
+ bitslice--;
+ bitcount += slicecount;
+ slicecount = 0;
+ for (ch = 0; ch < 2; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if ((bitneed[ch][sb] > bitslice + 1) && (bitneed[ch][sb] < bitslice + 16))
+ slicecount++;
+ else if (bitneed[ch][sb] == bitslice + 1)
+ slicecount += 2;
+ }
+ }
+ } while (bitcount + slicecount < frame->bitpool);
+
+ if (bitcount + slicecount == frame->bitpool) {
+ bitcount += slicecount;
+ bitslice--;
+ }
+
+ for (ch = 0; ch < 2; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if (bitneed[ch][sb] < bitslice + 2) {
+ bits[ch][sb] = 0;
+ } else {
+ bits[ch][sb] = bitneed[ch][sb] - bitslice;
+ if (bits[ch][sb] > 16)
+ bits[ch][sb] = 16;
+ }
+ }
+ }
+
+ ch = 0;
+ sb = 0;
+ while (bitcount < frame->bitpool) {
+ if ((bits[ch][sb] >= 2) && (bits[ch][sb] < 16)) {
+ bits[ch][sb]++;
+ bitcount++;
+ } else if ((bitneed[ch][sb] == bitslice + 1) && (frame->bitpool > bitcount + 1)) {
+ bits[ch][sb] = 2;
+ bitcount += 2;
+ }
+ if (ch == 1) {
+ ch = 0;
+ sb++;
+ if (sb >= frame->subbands) break;
+ } else
+ ch = 1;
+ }
+
+ ch = 0;
+ sb = 0;
+ while (bitcount < frame->bitpool) {
+ if (bits[ch][sb] < 16) {
+ bits[ch][sb]++;
+ bitcount++;
+ }
+ if (ch == 1) {
+ ch = 0;
+ sb++;
+ if (sb >= frame->subbands) break;
+ } else
+ ch = 1;
+ }
+
+ }
+
+}
+
+/*
+ * Unpacks a SBC frame at the beginning of the stream in data,
+ * which has at most len bytes into frame.
+ * Returns the length in bytes of the packed frame, or a negative
+ * value on error. The error codes are:
+ *
+ * -1 Data stream too short
+ * -2 Sync byte incorrect
+ * -3 CRC8 incorrect
+ * -4 Bitpool value out of bounds
+ */
+static int sbc_unpack_frame(const uint8_t *data, struct sbc_frame *frame,
+ size_t len)
+{
+ int consumed;
+ /* Will copy the parts of the header that are relevant to crc
+ * calculation here */
+ uint8_t crc_header[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ int crc_pos = 0;
+ int32_t temp;
+
+ int audio_sample;
+ int ch, sb, blk, bit; /* channel, subband, block and bit standard
+ counters */
+ int bits[2][8]; /* bits distribution */
+ uint32_t levels[2][8]; /* levels derived from that */
+
+ if (len < 4)
+ return -1;
+
+ if (data[0] != SBC_SYNCWORD)
+ return -2;
+
+ frame->frequency = (data[1] >> 6) & 0x03;
+
+ frame->block_mode = (data[1] >> 4) & 0x03;
+ switch (frame->block_mode) {
+ case SBC_BLK_4:
+ frame->blocks = 4;
+ break;
+ case SBC_BLK_8:
+ frame->blocks = 8;
+ break;
+ case SBC_BLK_12:
+ frame->blocks = 12;
+ break;
+ case SBC_BLK_16:
+ frame->blocks = 16;
+ break;
+ }
+
+ frame->mode = (data[1] >> 2) & 0x03;
+ switch (frame->mode) {
+ case MONO:
+ frame->channels = 1;
+ break;
+ case DUAL_CHANNEL: /* fall-through */
+ case STEREO:
+ case JOINT_STEREO:
+ frame->channels = 2;
+ break;
+ }
+
+ frame->allocation = (data[1] >> 1) & 0x01;
+
+ frame->subband_mode = (data[1] & 0x01);
+ frame->subbands = frame->subband_mode ? 8 : 4;
+
+ frame->bitpool = data[2];
+
+ if ((frame->mode == MONO || frame->mode == DUAL_CHANNEL) &&
+ frame->bitpool > 16 * frame->subbands)
+ return -4;
+
+ if ((frame->mode == STEREO || frame->mode == JOINT_STEREO) &&
+ frame->bitpool > 32 * frame->subbands)
+ return -4;
+
+ /* data[3] is crc, we're checking it later */
+
+ consumed = 32;
+
+ crc_header[0] = data[1];
+ crc_header[1] = data[2];
+ crc_pos = 16;
+
+ if (frame->mode == JOINT_STEREO) {
+ if (len * 8 < consumed + frame->subbands)
+ return -1;
+
+ frame->joint = 0x00;
+ for (sb = 0; sb < frame->subbands - 1; sb++)
+ frame->joint |= ((data[4] >> (7 - sb)) & 0x01) << sb;
+ if (frame->subbands == 4)
+ crc_header[crc_pos / 8] = data[4] & 0xf0;
+ else
+ crc_header[crc_pos / 8] = data[4];
+
+ consumed += frame->subbands;
+ crc_pos += frame->subbands;
+ }
+
+ if (len * 8 < consumed + (4 * frame->subbands * frame->channels))
+ return -1;
+
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ /* FIXME assert(consumed % 4 == 0); */
+ frame->scale_factor[ch][sb] =
+ (data[consumed >> 3] >> (4 - (consumed & 0x7))) & 0x0F;
+ crc_header[crc_pos >> 3] |=
+ frame->scale_factor[ch][sb] << (4 - (crc_pos & 0x7));
+
+ consumed += 4;
+ crc_pos += 4;
+ }
+ }
+
+ if (data[3] != sbc_crc8(crc_header, crc_pos))
+ return -3;
+
+ sbc_calculate_bits(frame, bits);
+
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++)
+ levels[ch][sb] = (1 << bits[ch][sb]) - 1;
+ }
+
+ for (blk = 0; blk < frame->blocks; blk++) {
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if (levels[ch][sb] > 0) {
+ audio_sample = 0;
+ for (bit = 0; bit < bits[ch][sb]; bit++) {
+ if (consumed > len * 8)
+ return -1;
+
+ if ((data[consumed >> 3] >> (7 - (consumed & 0x7))) & 0x01)
+ audio_sample |= 1 << (bits[ch][sb] - bit - 1);
+
+ consumed++;
+ }
+
+ frame->sb_sample[blk][ch][sb] =
+ (((audio_sample << 1) | 1) << frame->scale_factor[ch][sb]) /
+ levels[ch][sb] - (1 << frame->scale_factor[ch][sb]);
+ } else
+ frame->sb_sample[blk][ch][sb] = 0;
+ }
+ }
+ }
+
+ if (frame->mode == JOINT_STEREO) {
+ for (blk = 0; blk < frame->blocks; blk++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if (frame->joint & (0x01 << sb)) {
+ temp = frame->sb_sample[blk][0][sb] +
+ frame->sb_sample[blk][1][sb];
+ frame->sb_sample[blk][1][sb] =
+ frame->sb_sample[blk][0][sb] -
+ frame->sb_sample[blk][1][sb];
+ frame->sb_sample[blk][0][sb] = temp;
+ }
+ }
+ }
+ }
+
+ if ((consumed & 0x7) != 0)
+ consumed += 8 - (consumed & 0x7);
+
+ return consumed >> 3;
+}
+
+static void sbc_decoder_init(struct sbc_decoder_state *state,
+ const struct sbc_frame *frame)
+{
+ int i, ch;
+
+ memset(state->V, 0, sizeof(state->V));
+ state->subbands = frame->subbands;
+
+ for (ch = 0; ch < 2; ch++)
+ for (i = 0; i < frame->subbands * 2; i++)
+ state->offset[ch][i] = (10 * i + 10);
+}
+
+static inline void sbc_synthesize_four(struct sbc_decoder_state *state,
+ struct sbc_frame *frame, int ch, int blk)
+{
+ int i, k, idx;
+ int32_t *v = state->V[ch];
+ int *offset = state->offset[ch];
+
+ for (i = 0; i < 8; i++) {
+ /* Shifting */
+ offset[i]--;
+ if (offset[i] < 0) {
+ offset[i] = 79;
+ memcpy(v + 80, v, 9 * sizeof(*v));
+ }
+
+ /* Distribute the new matrix value to the shifted position */
+ v[offset[i]] = SCALE4_STAGED1(
+ MULA(synmatrix4[i][0], frame->sb_sample[blk][ch][0],
+ MULA(synmatrix4[i][1], frame->sb_sample[blk][ch][1],
+ MULA(synmatrix4[i][2], frame->sb_sample[blk][ch][2],
+ MUL (synmatrix4[i][3], frame->sb_sample[blk][ch][3])))));
+ }
+
+ /* Compute the samples */
+ for (idx = 0, i = 0; i < 4; i++, idx += 5) {
+ k = (i + 4) & 0xf;
+
+ /* Store in output, Q0 */
+ frame->pcm_sample[ch][blk * 4 + i] = SCALE4_STAGED2(
+ MULA(v[offset[i] + 0], sbc_proto_4_40m0[idx + 0],
+ MULA(v[offset[k] + 1], sbc_proto_4_40m1[idx + 0],
+ MULA(v[offset[i] + 2], sbc_proto_4_40m0[idx + 1],
+ MULA(v[offset[k] + 3], sbc_proto_4_40m1[idx + 1],
+ MULA(v[offset[i] + 4], sbc_proto_4_40m0[idx + 2],
+ MULA(v[offset[k] + 5], sbc_proto_4_40m1[idx + 2],
+ MULA(v[offset[i] + 6], sbc_proto_4_40m0[idx + 3],
+ MULA(v[offset[k] + 7], sbc_proto_4_40m1[idx + 3],
+ MULA(v[offset[i] + 8], sbc_proto_4_40m0[idx + 4],
+ MUL( v[offset[k] + 9], sbc_proto_4_40m1[idx + 4])))))))))));
+ }
+}
+
+static inline void sbc_synthesize_eight(struct sbc_decoder_state *state,
+ struct sbc_frame *frame, int ch, int blk)
+{
+ int i, j, k, idx;
+ int *offset = state->offset[ch];
+
+ for (i = 0; i < 16; i++) {
+ /* Shifting */
+ offset[i]--;
+ if (offset[i] < 0) {
+ offset[i] = 159;
+ for (j = 0; j < 9; j++)
+ state->V[ch][j + 160] = state->V[ch][j];
+ }
+
+ /* Distribute the new matrix value to the shifted position */
+ state->V[ch][offset[i]] = SCALE8_STAGED1(
+ MULA(synmatrix8[i][0], frame->sb_sample[blk][ch][0],
+ MULA(synmatrix8[i][1], frame->sb_sample[blk][ch][1],
+ MULA(synmatrix8[i][2], frame->sb_sample[blk][ch][2],
+ MULA(synmatrix8[i][3], frame->sb_sample[blk][ch][3],
+ MULA(synmatrix8[i][4], frame->sb_sample[blk][ch][4],
+ MULA(synmatrix8[i][5], frame->sb_sample[blk][ch][5],
+ MULA(synmatrix8[i][6], frame->sb_sample[blk][ch][6],
+ MUL( synmatrix8[i][7], frame->sb_sample[blk][ch][7])))))))));
+ }
+
+ /* Compute the samples */
+ for (idx = 0, i = 0; i < 8; i++, idx += 5) {
+ k = (i + 8) & 0xf;
+
+ /* Store in output */
+ frame->pcm_sample[ch][blk * 8 + i] = SCALE8_STAGED2( // Q0
+ MULA(state->V[ch][offset[i] + 0], sbc_proto_8_80m0[idx + 0],
+ MULA(state->V[ch][offset[k] + 1], sbc_proto_8_80m1[idx + 0],
+ MULA(state->V[ch][offset[i] + 2], sbc_proto_8_80m0[idx + 1],
+ MULA(state->V[ch][offset[k] + 3], sbc_proto_8_80m1[idx + 1],
+ MULA(state->V[ch][offset[i] + 4], sbc_proto_8_80m0[idx + 2],
+ MULA(state->V[ch][offset[k] + 5], sbc_proto_8_80m1[idx + 2],
+ MULA(state->V[ch][offset[i] + 6], sbc_proto_8_80m0[idx + 3],
+ MULA(state->V[ch][offset[k] + 7], sbc_proto_8_80m1[idx + 3],
+ MULA(state->V[ch][offset[i] + 8], sbc_proto_8_80m0[idx + 4],
+ MUL( state->V[ch][offset[k] + 9], sbc_proto_8_80m1[idx + 4])))))))))));
+ }
+}
+
+static int sbc_synthesize_audio(struct sbc_decoder_state *state,
+ struct sbc_frame *frame)
+{
+ int ch, blk;
+
+ switch (frame->subbands) {
+ case 4:
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (blk = 0; blk < frame->blocks; blk++)
+ sbc_synthesize_four(state, frame, ch, blk);
+ }
+ return frame->blocks * 4;
+
+ case 8:
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (blk = 0; blk < frame->blocks; blk++)
+ sbc_synthesize_eight(state, frame, ch, blk);
+ }
+ return frame->blocks * 8;
+
+ default:
+ return -EIO;
+ }
+}
+
+static void sbc_encoder_init(struct sbc_encoder_state *state,
+ const struct sbc_frame *frame)
+{
+ memset(&state->X, 0, sizeof(state->X));
+ state->subbands = frame->subbands;
+ state->position[0] = state->position[1] = 9 * frame->subbands;
+}
+
+static inline void _sbc_analyze_four(const int32_t *in, int32_t *out)
+{
+ sbc_fixed_t t[8], s[5];
+
+ t[0] = SCALE4_STAGE1( /* Q8 */
+ MULA(_sbc_proto_4[0], in[8] - in[32], /* Q18 */
+ MUL( _sbc_proto_4[1], in[16] - in[24])));
+
+ t[1] = SCALE4_STAGE1(
+ MULA(_sbc_proto_4[2], in[1],
+ MULA(_sbc_proto_4[3], in[9],
+ MULA(_sbc_proto_4[4], in[17],
+ MULA(_sbc_proto_4[5], in[25],
+ MUL( _sbc_proto_4[6], in[33]))))));
+
+ t[2] = SCALE4_STAGE1(
+ MULA(_sbc_proto_4[7], in[2],
+ MULA(_sbc_proto_4[8], in[10],
+ MULA(_sbc_proto_4[9], in[18],
+ MULA(_sbc_proto_4[10], in[26],
+ MUL( _sbc_proto_4[11], in[34]))))));
+
+ t[3] = SCALE4_STAGE1(
+ MULA(_sbc_proto_4[12], in[3],
+ MULA(_sbc_proto_4[13], in[11],
+ MULA(_sbc_proto_4[14], in[19],
+ MULA(_sbc_proto_4[15], in[27],
+ MUL( _sbc_proto_4[16], in[35]))))));
+
+ t[4] = SCALE4_STAGE1(
+ MULA(_sbc_proto_4[17], in[4] + in[36],
+ MULA(_sbc_proto_4[18], in[12] + in[28],
+ MUL( _sbc_proto_4[19], in[20]))));
+
+ t[5] = SCALE4_STAGE1(
+ MULA(_sbc_proto_4[16], in[5],
+ MULA(_sbc_proto_4[15], in[13],
+ MULA(_sbc_proto_4[14], in[21],
+ MULA(_sbc_proto_4[13], in[29],
+ MUL( _sbc_proto_4[12], in[37]))))));
+
+ /* don't compute t[6]... this term always multiplies
+ * with cos(pi/2) = 0 */
+
+ t[7] = SCALE4_STAGE1(
+ MULA(_sbc_proto_4[6], in[7],
+ MULA(_sbc_proto_4[5], in[15],
+ MULA(_sbc_proto_4[4], in[23],
+ MULA(_sbc_proto_4[3], in[31],
+ MUL( _sbc_proto_4[2], in[39]))))));
+
+ s[0] = MUL( _anamatrix4[0], t[0] + t[4]);
+ s[1] = MUL( _anamatrix4[2], t[2]);
+ s[2] = MULA(_anamatrix4[1], t[1] + t[3],
+ MUL(_anamatrix4[3], t[5]));
+ s[3] = MULA(_anamatrix4[3], t[1] + t[3],
+ MUL(_anamatrix4[1], -t[5] + t[7]));
+ s[4] = MUL( _anamatrix4[3], t[7]);
+
+ out[0] = SCALE4_STAGE2( s[0] + s[1] + s[2] + s[4]); /* Q0 */
+ out[1] = SCALE4_STAGE2(-s[0] + s[1] + s[3]);
+ out[2] = SCALE4_STAGE2(-s[0] + s[1] - s[3]);
+ out[3] = SCALE4_STAGE2( s[0] + s[1] - s[2] - s[4]);
+}
+
+static inline void sbc_analyze_four(struct sbc_encoder_state *state,
+ struct sbc_frame *frame, int ch, int blk)
+{
+ int32_t *x = &state->X[ch][state->position[ch]];
+ int16_t *pcm = &frame->pcm_sample[ch][blk * 4];
+
+ /* Input 4 Audio Samples */
+ x[40] = x[0] = pcm[3];
+ x[41] = x[1] = pcm[2];
+ x[42] = x[2] = pcm[1];
+ x[43] = x[3] = pcm[0];
+
+ _sbc_analyze_four(x, frame->sb_sample_f[blk][ch]);
+
+ state->position[ch] -= 4;
+ if (state->position[ch] < 0)
+ state->position[ch] = 36;
+}
+
+static inline void _sbc_analyze_eight(const int32_t *in, int32_t *out)
+{
+ sbc_fixed_t t[8], s[8];
+
+ t[0] = SCALE8_STAGE1( /* Q10 */
+ MULA(_sbc_proto_8[0], (in[16] - in[64]), /* Q18 = Q18 * Q0 */
+ MULA(_sbc_proto_8[1], (in[32] - in[48]),
+ MULA(_sbc_proto_8[2], in[4],
+ MULA(_sbc_proto_8[3], in[20],
+ MULA(_sbc_proto_8[4], in[36],
+ MUL( _sbc_proto_8[5], in[52])))))));
+
+ t[1] = SCALE8_STAGE1(
+ MULA(_sbc_proto_8[6], in[2],
+ MULA(_sbc_proto_8[7], in[18],
+ MULA(_sbc_proto_8[8], in[34],
+ MULA(_sbc_proto_8[9], in[50],
+ MUL(_sbc_proto_8[10], in[66]))))));
+
+ t[2] = SCALE8_STAGE1(
+ MULA(_sbc_proto_8[11], in[1],
+ MULA(_sbc_proto_8[12], in[17],
+ MULA(_sbc_proto_8[13], in[33],
+ MULA(_sbc_proto_8[14], in[49],
+ MULA(_sbc_proto_8[15], in[65],
+ MULA(_sbc_proto_8[16], in[3],
+ MULA(_sbc_proto_8[17], in[19],
+ MULA(_sbc_proto_8[18], in[35],
+ MULA(_sbc_proto_8[19], in[51],
+ MUL( _sbc_proto_8[20], in[67])))))))))));
+
+ t[3] = SCALE8_STAGE1(
+ MULA( _sbc_proto_8[21], in[5],
+ MULA( _sbc_proto_8[22], in[21],
+ MULA( _sbc_proto_8[23], in[37],
+ MULA( _sbc_proto_8[24], in[53],
+ MULA( _sbc_proto_8[25], in[69],
+ MULA(-_sbc_proto_8[15], in[15],
+ MULA(-_sbc_proto_8[14], in[31],
+ MULA(-_sbc_proto_8[13], in[47],
+ MULA(-_sbc_proto_8[12], in[63],
+ MUL( -_sbc_proto_8[11], in[79])))))))))));
+
+ t[4] = SCALE8_STAGE1(
+ MULA( _sbc_proto_8[26], in[6],
+ MULA( _sbc_proto_8[27], in[22],
+ MULA( _sbc_proto_8[28], in[38],
+ MULA( _sbc_proto_8[29], in[54],
+ MULA( _sbc_proto_8[30], in[70],
+ MULA(-_sbc_proto_8[10], in[14],
+ MULA(-_sbc_proto_8[9], in[30],
+ MULA(-_sbc_proto_8[8], in[46],
+ MULA(-_sbc_proto_8[7], in[62],
+ MUL( -_sbc_proto_8[6], in[78])))))))))));
+
+ t[5] = SCALE8_STAGE1(
+ MULA( _sbc_proto_8[31], in[7],
+ MULA( _sbc_proto_8[32], in[23],
+ MULA( _sbc_proto_8[33], in[39],
+ MULA( _sbc_proto_8[34], in[55],
+ MULA( _sbc_proto_8[35], in[71],
+ MULA(-_sbc_proto_8[20], in[13],
+ MULA(-_sbc_proto_8[19], in[29],
+ MULA(-_sbc_proto_8[18], in[45],
+ MULA(-_sbc_proto_8[17], in[61],
+ MUL( -_sbc_proto_8[16], in[77])))))))))));
+
+ t[6] = SCALE8_STAGE1(
+ MULA( _sbc_proto_8[36], (in[8] + in[72]),
+ MULA( _sbc_proto_8[37], (in[24] + in[56]),
+ MULA( _sbc_proto_8[38], in[40],
+ MULA(-_sbc_proto_8[39], in[12],
+ MULA(-_sbc_proto_8[5], in[28],
+ MULA(-_sbc_proto_8[4], in[44],
+ MULA(-_sbc_proto_8[3], in[60],
+ MUL( -_sbc_proto_8[2], in[76])))))))));
+
+ t[7] = SCALE8_STAGE1(
+ MULA( _sbc_proto_8[35], in[9],
+ MULA( _sbc_proto_8[34], in[25],
+ MULA( _sbc_proto_8[33], in[41],
+ MULA( _sbc_proto_8[32], in[57],
+ MULA( _sbc_proto_8[31], in[73],
+ MULA(-_sbc_proto_8[25], in[11],
+ MULA(-_sbc_proto_8[24], in[27],
+ MULA(-_sbc_proto_8[23], in[43],
+ MULA(-_sbc_proto_8[22], in[59],
+ MUL( -_sbc_proto_8[21], in[75])))))))))));
+
+ s[0] = MULA( _anamatrix8[0], t[0],
+ MUL( _anamatrix8[1], t[6]));
+ s[1] = MUL( _anamatrix8[7], t[1]);
+ s[2] = MULA( _anamatrix8[2], t[2],
+ MULA( _anamatrix8[3], t[3],
+ MULA( _anamatrix8[4], t[5],
+ MUL( _anamatrix8[5], t[7]))));
+ s[3] = MUL( _anamatrix8[6], t[4]);
+ s[4] = MULA( _anamatrix8[3], t[2],
+ MULA(-_anamatrix8[5], t[3],
+ MULA(-_anamatrix8[2], t[5],
+ MUL( -_anamatrix8[4], t[7]))));
+ s[5] = MULA( _anamatrix8[4], t[2],
+ MULA(-_anamatrix8[2], t[3],
+ MULA( _anamatrix8[5], t[5],
+ MUL( _anamatrix8[3], t[7]))));
+ s[6] = MULA( _anamatrix8[1], t[0],
+ MUL( -_anamatrix8[0], t[6]));
+ s[7] = MULA( _anamatrix8[5], t[2],
+ MULA(-_anamatrix8[4], t[3],
+ MULA( _anamatrix8[3], t[5],
+ MUL( -_anamatrix8[2], t[7]))));
+
+ out[0] = SCALE8_STAGE2( s[0] + s[1] + s[2] + s[3]);
+ out[1] = SCALE8_STAGE2( s[1] - s[3] + s[4] + s[6]);
+ out[2] = SCALE8_STAGE2( s[1] - s[3] + s[5] - s[6]);
+ out[3] = SCALE8_STAGE2(-s[0] + s[1] + s[3] + s[7]);
+ out[4] = SCALE8_STAGE2(-s[0] + s[1] + s[3] - s[7]);
+ out[5] = SCALE8_STAGE2( s[1] - s[3] - s[5] - s[6]);
+ out[6] = SCALE8_STAGE2( s[1] - s[3] - s[4] + s[6]);
+ out[7] = SCALE8_STAGE2( s[0] + s[1] - s[2] + s[3]);
+}
+
+static inline void sbc_analyze_eight(struct sbc_encoder_state *state,
+ struct sbc_frame *frame, int ch,
+ int blk)
+{
+ int32_t *x = &state->X[ch][state->position[ch]];
+ int16_t *pcm = &frame->pcm_sample[ch][blk * 8];
+
+ /* Input 8 Audio Samples */
+ x[80] = x[0] = pcm[7];
+ x[81] = x[1] = pcm[6];
+ x[82] = x[2] = pcm[5];
+ x[83] = x[3] = pcm[4];
+ x[84] = x[4] = pcm[3];
+ x[85] = x[5] = pcm[2];
+ x[86] = x[6] = pcm[1];
+ x[87] = x[7] = pcm[0];
+
+ _sbc_analyze_eight(x, frame->sb_sample_f[blk][ch]);
+
+ state->position[ch] -= 8;
+ if (state->position[ch] < 0)
+ state->position[ch] = 72;
+}
+
+static int sbc_analyze_audio(struct sbc_encoder_state *state,
+ struct sbc_frame *frame)
+{
+ int ch, blk;
+
+ switch (frame->subbands) {
+ case 4:
+ for (ch = 0; ch < frame->channels; ch++)
+ for (blk = 0; blk < frame->blocks; blk++)
+ sbc_analyze_four(state, frame, ch, blk);
+ return frame->blocks * 4;
+
+ case 8:
+ for (ch = 0; ch < frame->channels; ch++)
+ for (blk = 0; blk < frame->blocks; blk++)
+ sbc_analyze_eight(state, frame, ch, blk);
+ return frame->blocks * 8;
+
+ default:
+ return -EIO;
+ }
+}
+
+/*
+ * Packs the SBC frame from frame into the memory at data. At most len
+ * bytes will be used, should more memory be needed an appropriate
+ * error code will be returned. Returns the length of the packed frame
+ * on success or a negative value on error.
+ *
+ * The error codes are:
+ * -1 Not enough memory reserved
+ * -2 Unsupported sampling rate
+ * -3 Unsupported number of blocks
+ * -4 Unsupported number of subbands
+ * -5 Bitpool value out of bounds
+ * -99 not implemented
+ */
+
+static int sbc_pack_frame(uint8_t *data, struct sbc_frame *frame, size_t len)
+{
+ int produced;
+ /* Will copy the header parts for CRC-8 calculation here */
+ uint8_t crc_header[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ int crc_pos = 0;
+
+ uint16_t audio_sample;
+
+ int ch, sb, blk, bit; /* channel, subband, block and bit counters */
+ int bits[2][8]; /* bits distribution */
+ int levels[2][8]; /* levels are derived from that */
+
+ u_int32_t scalefactor[2][8]; /* derived from frame->scale_factor */
+
+ data[0] = SBC_SYNCWORD;
+
+ data[1] = (frame->frequency & 0x03) << 6;
+
+ data[1] |= (frame->block_mode & 0x03) << 4;
+
+ data[1] |= (frame->mode & 0x03) << 2;
+
+ data[1] |= (frame->allocation & 0x01) << 1;
+
+ switch (frame->subbands) {
+ case 4:
+ /* Nothing to do */
+ break;
+ case 8:
+ data[1] |= 0x01;
+ break;
+ default:
+ return -4;
+ break;
+ }
+
+ data[2] = frame->bitpool;
+
+ if ((frame->mode == MONO || frame->mode == DUAL_CHANNEL) &&
+ frame->bitpool > frame->subbands << 4)
+ return -5;
+
+ if ((frame->mode == STEREO || frame->mode == JOINT_STEREO) &&
+ frame->bitpool > frame->subbands << 5)
+ return -5;
+
+ /* Can't fill in crc yet */
+
+ produced = 32;
+
+ crc_header[0] = data[1];
+ crc_header[1] = data[2];
+ crc_pos = 16;
+
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ frame->scale_factor[ch][sb] = 0;
+ scalefactor[ch][sb] = 2;
+ for (blk = 0; blk < frame->blocks; blk++) {
+ while (scalefactor[ch][sb] < fabs(frame->sb_sample_f[blk][ch][sb])) {
+ frame->scale_factor[ch][sb]++;
+ scalefactor[ch][sb] *= 2;
+ }
+ }
+ }
+ }
+
+ if (frame->mode == JOINT_STEREO) {
+ /* like frame->sb_sample but joint stereo */
+ int32_t sb_sample_j[16][2];
+ /* scalefactor and scale_factor in joint case */
+ u_int32_t scalefactor_j[2];
+ uint8_t scale_factor_j[2];
+
+ frame->joint = 0;
+
+ for (sb = 0; sb < frame->subbands - 1; sb++) {
+ scale_factor_j[0] = 0;
+ scalefactor_j[0] = 2;
+ scale_factor_j[1] = 0;
+ scalefactor_j[1] = 2;
+
+ for (blk = 0; blk < frame->blocks; blk++) {
+ /* Calculate joint stereo signal */
+ sb_sample_j[blk][0] =
+ (frame->sb_sample_f[blk][0][sb] +
+ frame->sb_sample_f[blk][1][sb]) >> 1;
+ sb_sample_j[blk][1] =
+ (frame->sb_sample_f[blk][0][sb] -
+ frame->sb_sample_f[blk][1][sb]) >> 1;
+
+ /* calculate scale_factor_j and scalefactor_j for joint case */
+ while (scalefactor_j[0] < fabs(sb_sample_j[blk][0])) {
+ scale_factor_j[0]++;
+ scalefactor_j[0] *= 2;
+ }
+ while (scalefactor_j[1] < fabs(sb_sample_j[blk][1])) {
+ scale_factor_j[1]++;
+ scalefactor_j[1] *= 2;
+ }
+ }
+
+ /* decide whether to join this subband */
+ if ((scalefactor[0][sb] + scalefactor[1][sb]) >
+ (scalefactor_j[0] + scalefactor_j[1]) ) {
+ /* use joint stereo for this subband */
+ frame->joint |= 1 << sb;
+ frame->scale_factor[0][sb] = scale_factor_j[0];
+ frame->scale_factor[1][sb] = scale_factor_j[1];
+ scalefactor[0][sb] = scalefactor_j[0];
+ scalefactor[1][sb] = scalefactor_j[1];
+ for (blk = 0; blk < frame->blocks; blk++) {
+ frame->sb_sample_f[blk][0][sb] =
+ sb_sample_j[blk][0];
+ frame->sb_sample_f[blk][1][sb] =
+ sb_sample_j[blk][1];
+ }
+ }
+ }
+
+ data[4] = 0;
+ for (sb = 0; sb < frame->subbands - 1; sb++)
+ data[4] |= ((frame->joint >> sb) & 0x01) << (frame->subbands - 1 - sb);
+
+ crc_header[crc_pos >> 3] = data[4];
+
+ produced += frame->subbands;
+ crc_pos += frame->subbands;
+ }
+
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ data[produced >> 3] <<= 4;
+ crc_header[crc_pos >> 3] <<= 4;
+ data[produced >> 3] |= frame->scale_factor[ch][sb] & 0x0F;
+ crc_header[crc_pos >> 3] |= frame->scale_factor[ch][sb] & 0x0F;
+
+ produced += 4;
+ crc_pos += 4;
+ }
+ }
+
+ /* align the last crc byte */
+ if (crc_pos % 8)
+ crc_header[crc_pos >> 3] <<= 8 - (crc_pos % 8);
+
+ data[3] = sbc_crc8(crc_header, crc_pos);
+
+ sbc_calculate_bits(frame, bits);
+
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++)
+ levels[ch][sb] = (1 << bits[ch][sb]) - 1;
+ }
+
+ for (blk = 0; blk < frame->blocks; blk++) {
+ for (ch = 0; ch < frame->channels; ch++) {
+ for (sb = 0; sb < frame->subbands; sb++) {
+ if (levels[ch][sb] > 0) {
+ audio_sample =
+ (uint16_t) ((((frame->sb_sample_f[blk][ch][sb]*levels[ch][sb]) >>
+ (frame->scale_factor[ch][sb] + 1)) +
+ levels[ch][sb]) >> 1);
+ audio_sample <<= 16 - bits[ch][sb];
+ for (bit = 0; bit < bits[ch][sb]; bit++) {
+ data[produced >> 3] <<= 1;
+ if (audio_sample & 0x8000)
+ data[produced >> 3] |= 0x1;
+ audio_sample <<= 1;
+ produced++;
+ }
+ }
+ }
+ }
+ }
+
+ /* align the last byte */
+ if (produced % 8) {
+ data[produced >> 3] <<= 8 - (produced % 8);
+ }
+
+ return (produced + 7) >> 3;
+}
+
+struct sbc_priv {
+ int init;
+ struct sbc_frame frame;
+ struct sbc_decoder_state dec_state;
+ struct sbc_encoder_state enc_state;
+};
+
+static void sbc_set_defaults(sbc_t *sbc, unsigned long flags)
+{
+ sbc->frequency = SBC_FREQ_44100;
+ sbc->mode = SBC_MODE_STEREO;
+ sbc->subbands = SBC_SB_8;
+ sbc->blocks = SBC_BLK_16;
+ sbc->bitpool = 32;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ sbc->endian = SBC_LE;
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ sbc->endian = SBC_BE;
+#else
+#error "Unknown byte order"
+#endif
+}
+
+int sbc_init(sbc_t *sbc, unsigned long flags)
+{
+ if (!sbc)
+ return -EIO;
+
+ memset(sbc, 0, sizeof(sbc_t));
+
+ sbc->priv = malloc(sizeof(struct sbc_priv));
+ if (!sbc->priv)
+ return -ENOMEM;
+
+ memset(sbc->priv, 0, sizeof(struct sbc_priv));
+
+ sbc_set_defaults(sbc, flags);
+
+ return 0;
+}
+
+int sbc_parse(sbc_t *sbc, void *input, int input_len)
+{
+ return sbc_decode(sbc, input, input_len, NULL, 0, NULL);
+}
+
+int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
+ int output_len, int *written)
+{
+ struct sbc_priv *priv;
+ char *ptr;
+ int i, ch, framelen, samples;
+
+ if (!sbc && !input)
+ return -EIO;
+
+ priv = sbc->priv;
+
+ framelen = sbc_unpack_frame(input, &priv->frame, input_len);
+
+ if (!priv->init) {
+ sbc_decoder_init(&priv->dec_state, &priv->frame);
+ priv->init = 1;
+
+ sbc->frequency = priv->frame.frequency;
+ sbc->mode = priv->frame.mode;
+ sbc->subbands = priv->frame.subband_mode;
+ sbc->blocks = priv->frame.block_mode;
+ sbc->allocation = priv->frame.allocation;
+ sbc->bitpool = priv->frame.bitpool;
+
+ priv->frame.codesize = sbc_get_codesize(sbc);
+ priv->frame.length = sbc_get_frame_length(sbc);
+ }
+
+ if (!output)
+ return framelen;
+
+ if (written)
+ *written = 0;
+
+ samples = sbc_synthesize_audio(&priv->dec_state, &priv->frame);
+
+ ptr = output;
+
+ if (output_len < samples * priv->frame.channels * 2)
+ samples = output_len / (priv->frame.channels * 2);
+
+ for (i = 0; i < samples; i++) {
+ for (ch = 0; ch < priv->frame.channels; ch++) {
+ int16_t s;
+ s = priv->frame.pcm_sample[ch][i];
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ if (sbc->endian == SBC_BE) {
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ if (sbc->endian == SBC_LE) {
+#else
+#error "Unknown byte order"
+#endif
+ *ptr++ = (s & 0xff00) >> 8;
+ *ptr++ = (s & 0x00ff);
+ } else {
+ *ptr++ = (s & 0x00ff);
+ *ptr++ = (s & 0xff00) >> 8;
+ }
+ }
+ }
+
+ if (written)
+ *written = samples * priv->frame.channels * 2;
+
+ return framelen;
+}
+
+int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output,
+ int output_len, int *written)
+{
+ struct sbc_priv *priv;
+ char *ptr;
+ int i, ch, framelen, samples;
+
+ if (!sbc && !input)
+ return -EIO;
+
+ priv = sbc->priv;
+
+ if (written)
+ *written = 0;
+
+ if (!priv->init) {
+ priv->frame.frequency = sbc->frequency;
+ priv->frame.mode = sbc->mode;
+ priv->frame.channels = sbc->mode == SBC_MODE_MONO ? 1 : 2;
+ priv->frame.allocation = sbc->allocation;
+ priv->frame.subband_mode = sbc->subbands;
+ priv->frame.subbands = sbc->subbands ? 8 : 4;
+ priv->frame.block_mode = sbc->blocks;
+ priv->frame.blocks = 4 + (sbc->blocks * 4);
+ priv->frame.bitpool = sbc->bitpool;
+ priv->frame.codesize = sbc_get_codesize(sbc);
+ priv->frame.length = sbc_get_frame_length(sbc);
+
+ sbc_encoder_init(&priv->enc_state, &priv->frame);
+ priv->init = 1;
+ }
+
+ /* input must be large enough to encode a complete frame */
+ if (input_len < priv->frame.codesize)
+ return 0;
+
+ /* output must be large enough to receive the encoded frame */
+ if (!output || output_len < priv->frame.length)
+ return -ENOSPC;
+
+ ptr = input;
+
+ for (i = 0; i < priv->frame.subbands * priv->frame.blocks; i++) {
+ for (ch = 0; ch < priv->frame.channels; ch++) {
+ int16_t s;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ if (sbc->endian == SBC_BE)
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ if (sbc->endian == SBC_LE)
+#else
+#error "Unknown byte order"
+#endif
+ s = (ptr[0] & 0xff) << 8 | (ptr[1] & 0xff);
+ else
+ s = (ptr[0] & 0xff) | (ptr[1] & 0xff) << 8;
+ ptr += 2;
+ priv->frame.pcm_sample[ch][i] = s;
+ }
+ }
+
+ samples = sbc_analyze_audio(&priv->enc_state, &priv->frame);
+
+ framelen = sbc_pack_frame(output, &priv->frame, output_len);
+
+ if (written)
+ *written = framelen;
+
+ return samples * priv->frame.channels * 2;
+}
+
+void sbc_finish(sbc_t *sbc)
+{
+ if (!sbc)
+ return;
+
+ if (sbc->priv)
+ free(sbc->priv);
+
+ memset(sbc, 0, sizeof(sbc_t));
+}
+
+int sbc_get_frame_length(sbc_t *sbc)
+{
+ int ret;
+ uint8_t subbands, channels, blocks, joint;
+ struct sbc_priv *priv;
+
+ priv = sbc->priv;
+ if (!priv->init) {
+ subbands = sbc->subbands ? 8 : 4;
+ blocks = 4 + (sbc->blocks * 4);
+ channels = sbc->mode == SBC_MODE_MONO ? 1 : 2;
+ joint = sbc->mode == SBC_MODE_JOINT_STEREO ? 1 : 0;
+ } else {
+ subbands = priv->frame.subbands;
+ blocks = priv->frame.blocks;
+ channels = priv->frame.channels;
+ joint = priv->frame.joint;
+ }
+
+ ret = 4 + (4 * subbands * channels) / 8;
+
+ /* This term is not always evenly divide so we round it up */
+ if (channels == 1)
+ ret += ((blocks * channels * sbc->bitpool) + 7) / 8;
+ else
+ ret += (((joint ? subbands : 0) + blocks * sbc->bitpool) + 7)
+ / 8;
+
+ return ret;
+}
+
+int sbc_get_frame_duration(sbc_t *sbc)
+{
+ uint8_t subbands, blocks;
+ uint16_t frequency;
+ struct sbc_priv *priv;
+
+ priv = sbc->priv;
+ if (!priv->init) {
+ subbands = sbc->subbands ? 8 : 4;
+ blocks = 4 + (sbc->blocks * 4);
+ } else {
+ subbands = priv->frame.subbands;
+ blocks = priv->frame.blocks;
+ }
+
+ switch (sbc->frequency) {
+ case SBC_FREQ_16000:
+ frequency = 16000;
+ break;
+
+ case SBC_FREQ_32000:
+ frequency = 32000;
+ break;
+
+ case SBC_FREQ_44100:
+ frequency = 44100;
+ break;
+
+ case SBC_FREQ_48000:
+ frequency = 48000;
+ break;
+ default:
+ return 0;
+ }
+
+ return (1000000 * blocks * subbands) / frequency;
+}
+
+int sbc_get_codesize(sbc_t *sbc)
+{
+ uint8_t subbands, channels, blocks;
+ struct sbc_priv *priv;
+
+ priv = sbc->priv;
+ if (!priv->init) {
+ subbands = sbc->subbands ? 8 : 4;
+ blocks = 4 + (sbc->blocks * 4);
+ channels = sbc->mode == SBC_MODE_MONO ? 1 : 2;
+ } else {
+ subbands = priv->frame.subbands;
+ blocks = priv->frame.blocks;
+ channels = priv->frame.channels;
+ }
+
+ return subbands * blocks * channels * 2;
+}
+
+int sbc_reinit(sbc_t *sbc, unsigned long flags)
+{
+ struct sbc_priv *priv;
+
+ if (!sbc || !sbc->priv)
+ return -EIO;
+
+ priv = sbc->priv;
+
+ if (priv->init == 1)
+ memset(sbc->priv, 0, sizeof(struct sbc_priv));
+
+ sbc_set_defaults(sbc, flags);
+
+ return 0;
+}
diff --git a/src/modules/bluetooth/sbc.h b/src/modules/bluetooth/sbc.h
new file mode 100644
index 0000000..ab47e32
--- /dev/null
+++ b/src/modules/bluetooth/sbc.h
@@ -0,0 +1,97 @@
+/*
+ *
+ * Bluetooth low-complexity, subband codec (SBC) library
+ *
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
+ * Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __SBC_H
+#define __SBC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+/* sampling frequency */
+#define SBC_FREQ_16000 0x00
+#define SBC_FREQ_32000 0x01
+#define SBC_FREQ_44100 0x02
+#define SBC_FREQ_48000 0x03
+
+/* blocks */
+#define SBC_BLK_4 0x00
+#define SBC_BLK_8 0x01
+#define SBC_BLK_12 0x02
+#define SBC_BLK_16 0x03
+
+/* channel mode */
+#define SBC_MODE_MONO 0x00
+#define SBC_MODE_DUAL_CHANNEL 0x01
+#define SBC_MODE_STEREO 0x02
+#define SBC_MODE_JOINT_STEREO 0x03
+
+/* allocation method */
+#define SBC_AM_LOUDNESS 0x00
+#define SBC_AM_SNR 0x01
+
+/* subbands */
+#define SBC_SB_4 0x00
+#define SBC_SB_8 0x01
+
+/* Data endianess */
+#define SBC_LE 0x00
+#define SBC_BE 0x01
+
+struct sbc_struct {
+ unsigned long flags;
+
+ uint8_t frequency;
+ uint8_t blocks;
+ uint8_t subbands;
+ uint8_t mode;
+ uint8_t allocation;
+ uint8_t bitpool;
+ uint8_t endian;
+
+ void *priv;
+};
+
+typedef struct sbc_struct sbc_t;
+
+int sbc_init(sbc_t *sbc, unsigned long flags);
+int sbc_reinit(sbc_t *sbc, unsigned long flags);
+int sbc_parse(sbc_t *sbc, void *input, int input_len);
+int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
+ int output_len, int *len);
+int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output,
+ int output_len, int *written);
+int sbc_get_frame_length(sbc_t *sbc);
+int sbc_get_frame_duration(sbc_t *sbc);
+int sbc_get_codesize(sbc_t *sbc);
+void sbc_finish(sbc_t *sbc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SBC_H */
diff --git a/src/modules/bluetooth/sbc_math.h b/src/modules/bluetooth/sbc_math.h
new file mode 100644
index 0000000..b3d87a6
--- /dev/null
+++ b/src/modules/bluetooth/sbc_math.h
@@ -0,0 +1,72 @@
+/*
+ *
+ * Bluetooth low-complexity, subband codec (SBC) library
+ *
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
+ * Copyright (C) 2005-2008 Brad Midgley <bmidgley@xmission.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#define fabs(x) ((x) < 0 ? -(x) : (x))
+/* C does not provide an explicit arithmetic shift right but this will
+ always be correct and every compiler *should* generate optimal code */
+#define ASR(val, bits) ((-2 >> 1 == -1) ? \
+ ((int32_t)(val)) >> (bits) : ((int32_t) (val)) / (1 << (bits)))
+
+#define SCALE_PROTO4_TBL 15
+#define SCALE_ANA4_TBL 17
+#define SCALE_PROTO8_TBL 16
+#define SCALE_ANA8_TBL 17
+#define SCALE_SPROTO4_TBL 12
+#define SCALE_SPROTO8_TBL 14
+#define SCALE_NPROTO4_TBL 11
+#define SCALE_NPROTO8_TBL 11
+#define SCALE4_STAGE1_BITS 15
+#define SCALE4_STAGE2_BITS 16
+#define SCALE4_STAGED1_BITS 15
+#define SCALE4_STAGED2_BITS 16
+#define SCALE8_STAGE1_BITS 15
+#define SCALE8_STAGE2_BITS 15
+#define SCALE8_STAGED1_BITS 15
+#define SCALE8_STAGED2_BITS 16
+
+typedef int32_t sbc_fixed_t;
+
+#define SCALE4_STAGE1(src) ASR(src, SCALE4_STAGE1_BITS)
+#define SCALE4_STAGE2(src) ASR(src, SCALE4_STAGE2_BITS)
+#define SCALE4_STAGED1(src) ASR(src, SCALE4_STAGED1_BITS)
+#define SCALE4_STAGED2(src) ASR(src, SCALE4_STAGED2_BITS)
+#define SCALE8_STAGE1(src) ASR(src, SCALE8_STAGE1_BITS)
+#define SCALE8_STAGE2(src) ASR(src, SCALE8_STAGE2_BITS)
+#define SCALE8_STAGED1(src) ASR(src, SCALE8_STAGED1_BITS)
+#define SCALE8_STAGED2(src) ASR(src, SCALE8_STAGED2_BITS)
+
+#define SBC_FIXED_0(val) { val = 0; }
+#define MUL(a, b) ((a) * (b))
+#ifdef __arm__
+#define MULA(a, b, res) ({ \
+ int tmp = res; \
+ __asm__( \
+ "mla %0, %2, %3, %0" \
+ : "=&r" (tmp) \
+ : "0" (tmp), "r" (a), "r" (b)); \
+ tmp; })
+#else
+#define MULA(a, b, res) ((a) * (b) + (res))
+#endif
diff --git a/src/modules/bluetooth/sbc_tables.h b/src/modules/bluetooth/sbc_tables.h
new file mode 100644
index 0000000..7ac4e68
--- /dev/null
+++ b/src/modules/bluetooth/sbc_tables.h
@@ -0,0 +1,167 @@
+/*
+ *
+ * Bluetooth low-complexity, subband codec (SBC) library
+ *
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
+ * Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* A2DP specification: Appendix B, page 69 */
+static const int sbc_offset4[4][4] = {
+ { -1, 0, 0, 0 },
+ { -2, 0, 0, 1 },
+ { -2, 0, 0, 1 },
+ { -2, 0, 0, 1 }
+};
+
+/* A2DP specification: Appendix B, page 69 */
+static const int sbc_offset8[4][8] = {
+ { -2, 0, 0, 0, 0, 0, 0, 1 },
+ { -3, 0, 0, 0, 0, 0, 1, 2 },
+ { -4, 0, 0, 0, 0, 0, 1, 2 },
+ { -4, 0, 0, 0, 0, 0, 1, 2 }
+};
+
+#define SP4(val) ASR(val, SCALE_PROTO4_TBL)
+#define SA4(val) ASR(val, SCALE_ANA4_TBL)
+#define SP8(val) ASR(val, SCALE_PROTO8_TBL)
+#define SA8(val) ASR(val, SCALE_ANA8_TBL)
+#define SS4(val) ASR(val, SCALE_SPROTO4_TBL)
+#define SS8(val) ASR(val, SCALE_SPROTO8_TBL)
+#define SN4(val) ASR(val, SCALE_NPROTO4_TBL)
+#define SN8(val) ASR(val, SCALE_NPROTO8_TBL)
+
+static const int32_t _sbc_proto_4[20] = {
+ SP4(0x02cb3e8c), SP4(0x22b63dc0), SP4(0x002329cc), SP4(0x053b7548),
+ SP4(0x31eab940), SP4(0xec1f5e60), SP4(0xff3773a8), SP4(0x0061c5a7),
+ SP4(0x07646680), SP4(0x3f239480), SP4(0xf89f23a8), SP4(0x007a4737),
+ SP4(0x00b32807), SP4(0x083ddc80), SP4(0x4825e480), SP4(0x0191e578),
+ SP4(0x00ff11ca), SP4(0x00fb7991), SP4(0x069fdc58), SP4(0x4b584000)
+};
+
+static const int32_t _anamatrix4[4] = {
+ SA4(0x2d413cc0), SA4(0x3b20d780), SA4(0x40000000), SA4(0x187de2a0)
+};
+
+static const int32_t _sbc_proto_8[40] = {
+ SP8(0x02e5cd20), SP8(0x22d0c200), SP8(0x006bfe27), SP8(0x07808930),
+ SP8(0x3f1c8800), SP8(0xf8810d70), SP8(0x002cfdc6), SP8(0x055acf28),
+ SP8(0x31f566c0), SP8(0xebfe57e0), SP8(0xff27c437), SP8(0x001485cc),
+ SP8(0x041c6e58), SP8(0x2a7cfa80), SP8(0xe4c4a240), SP8(0xfe359e4c),
+ SP8(0x0048b1f8), SP8(0x0686ce30), SP8(0x38eec5c0), SP8(0xf2a1b9f0),
+ SP8(0xffe8904a), SP8(0x0095698a), SP8(0x0824a480), SP8(0x443b3c00),
+ SP8(0xfd7badc8), SP8(0x00d3e2d9), SP8(0x00c183d2), SP8(0x084e1950),
+ SP8(0x4810d800), SP8(0x017f43fe), SP8(0x01056dd8), SP8(0x00e9cb9f),
+ SP8(0x07d7d090), SP8(0x4a708980), SP8(0x0488fae8), SP8(0x0113bd20),
+ SP8(0x0107b1a8), SP8(0x069fb3c0), SP8(0x4b3db200), SP8(0x00763f48)
+};
+
+static const int32_t sbc_proto_4_40m0[] = {
+ SS4(0x00000000), SS4(0xffa6982f), SS4(0xfba93848), SS4(0x0456c7b8),
+ SS4(0x005967d1), SS4(0xfffb9ac7), SS4(0xff589157), SS4(0xf9c2a8d8),
+ SS4(0x027c1434), SS4(0x0019118b), SS4(0xfff3c74c), SS4(0xff137330),
+ SS4(0xf81b8d70), SS4(0x00ec1b8b), SS4(0xfff0b71a), SS4(0xffe99b00),
+ SS4(0xfef84470), SS4(0xf6fb4370), SS4(0xffcdc351), SS4(0xffe01dc7)
+};
+
+static const int32_t sbc_proto_4_40m1[] = {
+ SS4(0xffe090ce), SS4(0xff2c0475), SS4(0xf694f800), SS4(0xff2c0475),
+ SS4(0xffe090ce), SS4(0xffe01dc7), SS4(0xffcdc351), SS4(0xf6fb4370),
+ SS4(0xfef84470), SS4(0xffe99b00), SS4(0xfff0b71a), SS4(0x00ec1b8b),
+ SS4(0xf81b8d70), SS4(0xff137330), SS4(0xfff3c74c), SS4(0x0019118b),
+ SS4(0x027c1434), SS4(0xf9c2a8d8), SS4(0xff589157), SS4(0xfffb9ac7)
+};
+
+static const int32_t sbc_proto_8_80m0[] = {
+ SS8(0x00000000), SS8(0xfe8d1970), SS8(0xee979f00), SS8(0x11686100),
+ SS8(0x0172e690), SS8(0xfff5bd1a), SS8(0xfdf1c8d4), SS8(0xeac182c0),
+ SS8(0x0d9daee0), SS8(0x00e530da), SS8(0xffe9811d), SS8(0xfd52986c),
+ SS8(0xe7054ca0), SS8(0x0a00d410), SS8(0x006c1de4), SS8(0xffdba705),
+ SS8(0xfcbc98e8), SS8(0xe3889d20), SS8(0x06af2308), SS8(0x000bb7db),
+ SS8(0xffca00ed), SS8(0xfc3fbb68), SS8(0xe071bc00), SS8(0x03bf7948),
+ SS8(0xffc4e05c), SS8(0xffb54b3b), SS8(0xfbedadc0), SS8(0xdde26200),
+ SS8(0x0142291c), SS8(0xff960e94), SS8(0xff9f3e17), SS8(0xfbd8f358),
+ SS8(0xdbf79400), SS8(0xff405e01), SS8(0xff7d4914), SS8(0xff8b1a31),
+ SS8(0xfc1417b8), SS8(0xdac7bb40), SS8(0xfdbb828c), SS8(0xff762170)
+};
+
+static const int32_t sbc_proto_8_80m1[] = {
+ SS8(0xff7c272c), SS8(0xfcb02620), SS8(0xda612700), SS8(0xfcb02620),
+ SS8(0xff7c272c), SS8(0xff762170), SS8(0xfdbb828c), SS8(0xdac7bb40),
+ SS8(0xfc1417b8), SS8(0xff8b1a31), SS8(0xff7d4914), SS8(0xff405e01),
+ SS8(0xdbf79400), SS8(0xfbd8f358), SS8(0xff9f3e17), SS8(0xff960e94),
+ SS8(0x0142291c), SS8(0xdde26200), SS8(0xfbedadc0), SS8(0xffb54b3b),
+ SS8(0xffc4e05c), SS8(0x03bf7948), SS8(0xe071bc00), SS8(0xfc3fbb68),
+ SS8(0xffca00ed), SS8(0x000bb7db), SS8(0x06af2308), SS8(0xe3889d20),
+ SS8(0xfcbc98e8), SS8(0xffdba705), SS8(0x006c1de4), SS8(0x0a00d410),
+ SS8(0xe7054ca0), SS8(0xfd52986c), SS8(0xffe9811d), SS8(0x00e530da),
+ SS8(0x0d9daee0), SS8(0xeac182c0), SS8(0xfdf1c8d4), SS8(0xfff5bd1a)
+};
+
+static const int32_t _anamatrix8[8] = {
+ SA8(0x3b20d780), SA8(0x187de2a0), SA8(0x3ec52f80), SA8(0x3536cc40),
+ SA8(0x238e7680), SA8(0x0c7c5c20), SA8(0x2d413cc0), SA8(0x40000000)
+};
+
+static const int32_t synmatrix4[8][4] = {
+ { SN4(0x05a82798), SN4(0xfa57d868), SN4(0xfa57d868), SN4(0x05a82798) },
+ { SN4(0x030fbc54), SN4(0xf89be510), SN4(0x07641af0), SN4(0xfcf043ac) },
+ { SN4(0x00000000), SN4(0x00000000), SN4(0x00000000), SN4(0x00000000) },
+ { SN4(0xfcf043ac), SN4(0x07641af0), SN4(0xf89be510), SN4(0x030fbc54) },
+ { SN4(0xfa57d868), SN4(0x05a82798), SN4(0x05a82798), SN4(0xfa57d868) },
+ { SN4(0xf89be510), SN4(0xfcf043ac), SN4(0x030fbc54), SN4(0x07641af0) },
+ { SN4(0xf8000000), SN4(0xf8000000), SN4(0xf8000000), SN4(0xf8000000) },
+ { SN4(0xf89be510), SN4(0xfcf043ac), SN4(0x030fbc54), SN4(0x07641af0) }
+};
+
+static const int32_t synmatrix8[16][8] = {
+ { SN8(0x05a82798), SN8(0xfa57d868), SN8(0xfa57d868), SN8(0x05a82798),
+ SN8(0x05a82798), SN8(0xfa57d868), SN8(0xfa57d868), SN8(0x05a82798) },
+ { SN8(0x0471ced0), SN8(0xf8275a10), SN8(0x018f8b84), SN8(0x06a6d988),
+ SN8(0xf9592678), SN8(0xfe70747c), SN8(0x07d8a5f0), SN8(0xfb8e3130) },
+ { SN8(0x030fbc54), SN8(0xf89be510), SN8(0x07641af0), SN8(0xfcf043ac),
+ SN8(0xfcf043ac), SN8(0x07641af0), SN8(0xf89be510), SN8(0x030fbc54) },
+ { SN8(0x018f8b84), SN8(0xfb8e3130), SN8(0x06a6d988), SN8(0xf8275a10),
+ SN8(0x07d8a5f0), SN8(0xf9592678), SN8(0x0471ced0), SN8(0xfe70747c) },
+ { SN8(0x00000000), SN8(0x00000000), SN8(0x00000000), SN8(0x00000000),
+ SN8(0x00000000), SN8(0x00000000), SN8(0x00000000), SN8(0x00000000) },
+ { SN8(0xfe70747c), SN8(0x0471ced0), SN8(0xf9592678), SN8(0x07d8a5f0),
+ SN8(0xf8275a10), SN8(0x06a6d988), SN8(0xfb8e3130), SN8(0x018f8b84) },
+ { SN8(0xfcf043ac), SN8(0x07641af0), SN8(0xf89be510), SN8(0x030fbc54),
+ SN8(0x030fbc54), SN8(0xf89be510), SN8(0x07641af0), SN8(0xfcf043ac) },
+ { SN8(0xfb8e3130), SN8(0x07d8a5f0), SN8(0xfe70747c), SN8(0xf9592678),
+ SN8(0x06a6d988), SN8(0x018f8b84), SN8(0xf8275a10), SN8(0x0471ced0) },
+ { SN8(0xfa57d868), SN8(0x05a82798), SN8(0x05a82798), SN8(0xfa57d868),
+ SN8(0xfa57d868), SN8(0x05a82798), SN8(0x05a82798), SN8(0xfa57d868) },
+ { SN8(0xf9592678), SN8(0x018f8b84), SN8(0x07d8a5f0), SN8(0x0471ced0),
+ SN8(0xfb8e3130), SN8(0xf8275a10), SN8(0xfe70747c), SN8(0x06a6d988) },
+ { SN8(0xf89be510), SN8(0xfcf043ac), SN8(0x030fbc54), SN8(0x07641af0),
+ SN8(0x07641af0), SN8(0x030fbc54), SN8(0xfcf043ac), SN8(0xf89be510) },
+ { SN8(0xf8275a10), SN8(0xf9592678), SN8(0xfb8e3130), SN8(0xfe70747c),
+ SN8(0x018f8b84), SN8(0x0471ced0), SN8(0x06a6d988), SN8(0x07d8a5f0) },
+ { SN8(0xf8000000), SN8(0xf8000000), SN8(0xf8000000), SN8(0xf8000000),
+ SN8(0xf8000000), SN8(0xf8000000), SN8(0xf8000000), SN8(0xf8000000) },
+ { SN8(0xf8275a10), SN8(0xf9592678), SN8(0xfb8e3130), SN8(0xfe70747c),
+ SN8(0x018f8b84), SN8(0x0471ced0), SN8(0x06a6d988), SN8(0x07d8a5f0) },
+ { SN8(0xf89be510), SN8(0xfcf043ac), SN8(0x030fbc54), SN8(0x07641af0),
+ SN8(0x07641af0), SN8(0x030fbc54), SN8(0xfcf043ac), SN8(0xf89be510) },
+ { SN8(0xf9592678), SN8(0x018f8b84), SN8(0x07d8a5f0), SN8(0x0471ced0),
+ SN8(0xfb8e3130), SN8(0xf8275a10), SN8(0xfe70747c), SN8(0x06a6d988) }
+};
diff --git a/src/modules/dbus-util.c b/src/modules/dbus-util.c
index 8495975..d2abf08 100644
--- a/src/modules/dbus-util.c
+++ b/src/modules/dbus-util.c
@@ -1,5 +1,3 @@
-/* $Id: dbus-util.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,7 +27,7 @@
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
#include <pulsecore/log.h>
-#include <pulsecore/props.h>
+#include <pulsecore/shared.h>
#include "dbus-util.h"
@@ -92,7 +90,7 @@ static pa_io_event_flags_t get_watch_flags(DBusWatch *watch) {
}
/* pa_io_event_cb_t IO event handler */
-static void handle_io_event(PA_GCC_UNUSED pa_mainloop_api *ea, pa_io_event *e, int fd, pa_io_event_flags_t events, void *userdata) {
+static void handle_io_event(pa_mainloop_api *ea, pa_io_event *e, int fd, pa_io_event_flags_t events, void *userdata) {
unsigned int flags = 0;
DBusWatch *watch = userdata;
@@ -128,7 +126,7 @@ static void handle_time_event(pa_mainloop_api *ea, pa_time_event* e, const struc
dbus_timeout_handle(timeout);
/* restart it for the next scheduled time */
- pa_timeval_add(&next, dbus_timeout_get_interval(timeout) * 1000);
+ pa_timeval_add(&next, (pa_usec_t) dbus_timeout_get_interval(timeout) * 1000);
ea->time_restart(e, &next);
}
}
@@ -194,7 +192,7 @@ static dbus_bool_t add_timeout(DBusTimeout *timeout, void *data) {
return FALSE;
pa_gettimeofday(&tv);
- pa_timeval_add(&tv, dbus_timeout_get_interval(timeout) * 1000);
+ pa_timeval_add(&tv, (pa_usec_t) dbus_timeout_get_interval(timeout) * 1000);
ev = c->mainloop->time_new(c->mainloop, &tv, handle_time_event, timeout);
@@ -229,7 +227,7 @@ static void toggle_timeout(DBusTimeout *timeout, void *data) {
struct timeval tv;
pa_gettimeofday(&tv);
- pa_timeval_add(&tv, dbus_timeout_get_interval(timeout) * 1000);
+ pa_timeval_add(&tv, (pa_usec_t) dbus_timeout_get_interval(timeout) * 1000);
c->mainloop->time_restart(ev, &tv);
} else
@@ -256,7 +254,7 @@ static pa_dbus_connection* pa_dbus_connection_new(pa_core* c, DBusConnection *co
pconn->connection = conn;
pconn->dispatch_event = c->mainloop->defer_new(c->mainloop, dispatch_cb, conn);
- pa_property_set(c, name, pconn);
+ pa_shared_set(c, name, pconn);
return pconn;
}
@@ -284,7 +282,7 @@ void pa_dbus_connection_unref(pa_dbus_connection *c) {
}
/* already disconnected, just free */
- pa_property_remove(c->core, c->property_name);
+ pa_shared_remove(c->core, c->property_name);
c->core->mainloop->defer_free(c->dispatch_event);
dbus_connection_unref(c->connection);
pa_xfree(c);
@@ -311,7 +309,7 @@ pa_dbus_connection* pa_dbus_bus_get(pa_core *c, DBusBusType type, DBusError *err
pa_assert(type == DBUS_BUS_SYSTEM || type == DBUS_BUS_SESSION || type == DBUS_BUS_STARTER);
- if ((pconn = pa_property_get(c, prop_name[type])))
+ if ((pconn = pa_shared_get(c, prop_name[type])))
return pa_dbus_connection_ref(pconn);
if (!(conn = dbus_bus_get_private(type, error)))
diff --git a/src/modules/dbus-util.h b/src/modules/dbus-util.h
index f05bc73..2b24ac6 100644
--- a/src/modules/dbus-util.h
+++ b/src/modules/dbus-util.h
@@ -1,8 +1,6 @@
#ifndef foodbusutilhfoo
#define foodbusutilhfoo
-/* $Id: dbus-util.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/modules/gconf/gconf-helper.c b/src/modules/gconf/gconf-helper.c
index 9e5fc3d..f5016fa 100644
--- a/src/modules/gconf/gconf-helper.c
+++ b/src/modules/gconf/gconf-helper.c
@@ -1,5 +1,3 @@
-/* $Id: gconf-helper.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/modules/gconf/module-gconf.c b/src/modules/gconf/module-gconf.c
index 76a045f..845ede5 100644
--- a/src/modules/gconf/module-gconf.c
+++ b/src/modules/gconf/module-gconf.c
@@ -1,5 +1,3 @@
-/* $Id: module-gconf.c 2047 2007-11-11 23:01:44Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -98,7 +96,7 @@ static int fill_buf(struct userdata *u) {
if ((r = pa_read(u->fd, u->buf + u->buf_fill, BUF_MAX - u->buf_fill, &u->fd_type)) <= 0)
return -1;
- u->buf_fill += r;
+ u->buf_fill += (size_t) r;
return 0;
}
@@ -125,7 +123,7 @@ static char *read_string(struct userdata *u) {
if ((e = memchr(u->buf, 0, u->buf_fill))) {
char *ret = pa_xstrdup(u->buf);
- u->buf_fill -= e - u->buf +1;
+ u->buf_fill -= (size_t) (e - u->buf +1);
memmove(u->buf, e+1, u->buf_fill);
return ret;
}
@@ -144,7 +142,7 @@ static void unload_one_module(struct userdata *u, struct module_info*m, unsigned
return;
pa_log_debug("Unloading module #%i", m->items[i].index);
- pa_module_unload_by_index(u->core, m->items[i].index);
+ pa_module_unload_by_index(u->core, m->items[i].index, TRUE);
m->items[i].index = PA_INVALID_INDEX;
pa_xfree(m->items[i].name);
pa_xfree(m->items[i].args);
@@ -166,10 +164,10 @@ static void unload_all_modules(struct userdata *u, struct module_info*m) {
static void load_module(
struct userdata *u,
struct module_info *m,
- int i,
+ unsigned i,
const char *name,
const char *args,
- int is_new) {
+ pa_bool_t is_new) {
pa_module *mod;
@@ -326,7 +324,7 @@ static void io_event_cb(
u->io_event = NULL;
}
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
@@ -380,7 +378,16 @@ void pa__done(pa_module*m) {
if (u->pid != (pid_t) -1) {
kill(u->pid, SIGTERM);
- waitpid(u->pid, NULL, 0);
+
+ for (;;) {
+ if (waitpid(u->pid, NULL, 0) >= 0)
+ break;
+
+ if (errno != EINTR) {
+ pa_log("waitpid() failed: %s", pa_cstrerror(errno));
+ break;
+ }
+ }
}
if (u->io_event)
@@ -389,7 +396,6 @@ void pa__done(pa_module*m) {
if (u->fd >= 0)
pa_close(u->fd);
-
if (u->module_infos)
pa_hashmap_free(u->module_infos, module_info_free, u);
diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c
index 27463f8..0e15da3 100644
--- a/src/modules/module-alsa-sink.c
+++ b/src/modules/module-alsa-sink.c
@@ -1,9 +1,7 @@
-/* $Id: module-alsa-sink.c 2055 2007-11-13 23:42:15Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio is free software; you can redistribute it and/or modify
@@ -30,8 +28,13 @@
#include <asoundlib.h>
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
#include <pulse/xmalloc.h>
#include <pulse/util.h>
+#include <pulse/timeval.h>
#include <pulsecore/core.h>
#include <pulsecore/module.h>
@@ -46,6 +49,8 @@
#include <pulsecore/core-error.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
+#include <pulsecore/rtclock.h>
+#include <pulsecore/time-smoother.h>
#include "alsa-util.h"
#include "module-alsa-sink-symdef.h"
@@ -57,16 +62,40 @@ PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
"device=<ALSA device> "
- "device_id=<ALSA device id> "
+ "device_id=<ALSA card index> "
"format=<sample format> "
- "channels=<number of channels> "
"rate=<sample rate> "
+ "channels=<number of channels> "
+ "channel_map=<channel map> "
"fragments=<number of fragments> "
"fragment_size=<fragment size> "
- "channel_map=<channel map> "
- "mmap=<enable memory mapping?>");
+ "mmap=<enable memory mapping?> "
+ "tsched=<enable system timer based scheduling mode?> "
+ "tsched_buffer_size=<buffer size when using timer based scheduling> "
+ "tsched_buffer_watermark=<lower fill watermark>");
+
+static const char* const valid_modargs[] = {
+ "sink_name",
+ "device",
+ "device_id",
+ "format",
+ "rate",
+ "channels",
+ "channel_map",
+ "fragments",
+ "fragment_size",
+ "mmap",
+ "tsched",
+ "tsched_buffer_size",
+ "tsched_buffer_watermark",
+ NULL
+};
#define DEFAULT_DEVICE "default"
+#define DEFAULT_TSCHED_BUFFER_USEC (2*PA_USEC_PER_SEC) /* 2s */
+#define DEFAULT_TSCHED_WATERMARK_USEC (20*PA_USEC_PER_MSEC) /* 20ms */
+#define TSCHED_MIN_SLEEP_USEC (3*PA_USEC_PER_MSEC) /* 3ms */
+#define TSCHED_MIN_WAKEUP_USEC (3*PA_USEC_PER_MSEC) /* 3ms */
struct userdata {
pa_core *core;
@@ -83,227 +112,407 @@ struct userdata {
snd_mixer_t *mixer_handle;
snd_mixer_elem_t *mixer_elem;
long hw_volume_max, hw_volume_min;
+ long hw_dB_max, hw_dB_min;
+ pa_bool_t hw_dB_supported;
+ pa_bool_t mixer_seperate_channels;
+ pa_cvolume hardware_volume;
- size_t frame_size, fragment_size, hwbuf_size;
+ size_t frame_size, fragment_size, hwbuf_size, tsched_watermark;
unsigned nfragments;
pa_memchunk memchunk;
char *device_name;
- pa_bool_t use_mmap;
+ pa_bool_t use_mmap, use_tsched;
- pa_bool_t first;
+ pa_bool_t first, after_rewind;
pa_rtpoll_item *alsa_rtpoll_item;
snd_mixer_selem_channel_id_t mixer_map[SND_MIXER_SCHN_LAST];
-};
-static const char* const valid_modargs[] = {
- "device",
- "device_id",
- "sink_name",
- "format",
- "channels",
- "rate",
- "fragments",
- "fragment_size",
- "channel_map",
- "mmap",
- NULL
+ pa_smoother *smoother;
+ int64_t frame_index;
+ uint64_t since_start;
+
+ snd_pcm_sframes_t hwbuf_unused_frames;
};
-static int mmap_write(struct userdata *u) {
+static void fix_tsched_watermark(struct userdata *u) {
+ size_t max_use;
+ size_t min_sleep, min_wakeup;
+ pa_assert(u);
+
+ max_use = u->hwbuf_size - (size_t) u->hwbuf_unused_frames * u->frame_size;
+
+ min_sleep = pa_usec_to_bytes(TSCHED_MIN_SLEEP_USEC, &u->sink->sample_spec);
+ min_wakeup = pa_usec_to_bytes(TSCHED_MIN_WAKEUP_USEC, &u->sink->sample_spec);
+
+ if (min_sleep > max_use/2)
+ min_sleep = pa_frame_align(max_use/2, &u->sink->sample_spec);
+ if (min_sleep < u->frame_size)
+ min_sleep = u->frame_size;
+
+ if (min_wakeup > max_use/2)
+ min_wakeup = pa_frame_align(max_use/2, &u->sink->sample_spec);
+ if (min_wakeup < u->frame_size)
+ min_wakeup = u->frame_size;
+
+ if (u->tsched_watermark > max_use-min_sleep)
+ u->tsched_watermark = max_use-min_sleep;
+
+ if (u->tsched_watermark < min_wakeup)
+ u->tsched_watermark = min_wakeup;
+}
+
+static void hw_sleep_time(struct userdata *u, pa_usec_t *sleep_usec, pa_usec_t*process_usec) {
+ pa_usec_t usec, wm;
+
+ pa_assert(sleep_usec);
+ pa_assert(process_usec);
+
+ pa_assert(u);
+
+ usec = pa_sink_get_requested_latency_within_thread(u->sink);
+
+ if (usec == (pa_usec_t) -1)
+ usec = pa_bytes_to_usec(u->hwbuf_size, &u->sink->sample_spec);
+
+/* pa_log_debug("hw buffer time: %u ms", (unsigned) (usec / PA_USEC_PER_MSEC)); */
+
+ wm = pa_bytes_to_usec(u->tsched_watermark, &u->sink->sample_spec);
+
+ if (usec >= wm) {
+ *sleep_usec = usec - wm;
+ *process_usec = wm;
+ } else
+ *process_usec = *sleep_usec = usec / 2;
+
+/* pa_log_debug("after watermark: %u ms", (unsigned) (*sleep_usec / PA_USEC_PER_MSEC)); */
+}
+
+static int try_recover(struct userdata *u, const char *call, int err) {
+ pa_assert(u);
+ pa_assert(call);
+ pa_assert(err < 0);
+
+ pa_log_debug("%s: %s", call, snd_strerror(err));
+
+ pa_assert(err != -EAGAIN);
+
+ if (err == -EPIPE)
+ pa_log_debug("%s: Buffer underrun!", call);
+
+ if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) == 0) {
+ u->first = TRUE;
+ u->since_start = 0;
+ return 0;
+ }
+
+ pa_log("%s: %s", call, snd_strerror(err));
+ return -1;
+}
+
+static size_t check_left_to_play(struct userdata *u, snd_pcm_sframes_t n) {
+ size_t left_to_play;
+
+ if ((size_t) n*u->frame_size < u->hwbuf_size)
+ left_to_play = u->hwbuf_size - ((size_t) n*u->frame_size);
+ else
+ left_to_play = 0;
+
+ if (left_to_play > 0) {
+/* pa_log_debug("%0.2f ms left to play", (double) pa_bytes_to_usec(left_to_play, &u->sink->sample_spec) / PA_USEC_PER_MSEC); */
+ } else if (!u->first && !u->after_rewind) {
+ pa_log_info("Underrun!");
+
+ if (u->use_tsched) {
+ size_t old_watermark = u->tsched_watermark;
+
+ u->tsched_watermark *= 2;
+ fix_tsched_watermark(u);
+
+ if (old_watermark != u->tsched_watermark)
+ pa_log_notice("Increasing wakeup watermark to %0.2f ms",
+ (double) pa_bytes_to_usec(u->tsched_watermark, &u->sink->sample_spec) / PA_USEC_PER_MSEC);
+ }
+ }
+
+ return left_to_play;
+}
+
+static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec) {
int work_done = 0;
+ pa_usec_t max_sleep_usec = 0, process_usec = 0;
+ size_t left_to_play;
pa_assert(u);
pa_sink_assert_ref(u->sink);
+ if (u->use_tsched)
+ hw_sleep_time(u, &max_sleep_usec, &process_usec);
+
for (;;) {
- pa_memchunk chunk;
- void *p;
snd_pcm_sframes_t n;
- int err;
- const snd_pcm_channel_area_t *areas;
- snd_pcm_uframes_t offset, frames;
+ int r;
- if ((n = snd_pcm_avail_update(u->pcm_handle)) < 0) {
+ snd_pcm_hwsync(u->pcm_handle);
- if (n == -EPIPE) {
- pa_log_debug("snd_pcm_avail_update: Buffer underrun!");
- u->first = TRUE;
- }
+ /* First we determine how many samples are missing to fill the
+ * buffer up to 100% */
- if ((err = snd_pcm_recover(u->pcm_handle, n, 1)) == 0)
- continue;
+ if (PA_UNLIKELY((n = snd_pcm_avail_update(u->pcm_handle)) < 0)) {
- if (err == -EAGAIN)
- return work_done;
+ if ((r = try_recover(u, "snd_pcm_avail_update", (int) n)) == 0)
+ continue;
- pa_log("snd_pcm_avail_update: %s", snd_strerror(err));
- return -1;
+ return r;
}
-/* pa_log("Got request for %i samples", (int) n); */
+ left_to_play = check_left_to_play(u, n);
- if (n <= 0)
- return work_done;
+ if (u->use_tsched)
- frames = n;
+ /* We won't fill up the playback buffer before at least
+ * half the sleep time is over because otherwise we might
+ * ask for more data from the clients then they expect. We
+ * need to guarantee that clients only have to keep around
+ * a single hw buffer length. */
- if ((err = snd_pcm_mmap_begin(u->pcm_handle, &areas, &offset, &frames)) < 0) {
+ if (pa_bytes_to_usec(left_to_play, &u->sink->sample_spec) > process_usec+max_sleep_usec/2)
+ break;
- if (err == -EPIPE) {
- pa_log_debug("snd_pcm_mmap_begin: Buffer underrun!");
- u->first = TRUE;
- }
+ if (PA_UNLIKELY(n <= u->hwbuf_unused_frames))
+ break;
- if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) == 0)
- continue;
+ n -= u->hwbuf_unused_frames;
- if (err == -EAGAIN)
- return work_done;
+/* pa_log_debug("Filling up"); */
- pa_log("Failed to write data to DSP: %s", snd_strerror(err));
- return -1;
- }
+ for (;;) {
+ pa_memchunk chunk;
+ void *p;
+ int err;
+ const snd_pcm_channel_area_t *areas;
+ snd_pcm_uframes_t offset, frames = (snd_pcm_uframes_t) n;
+ snd_pcm_sframes_t sframes;
- /* Check these are multiples of 8 bit */
- pa_assert((areas[0].first & 7) == 0);
- pa_assert((areas[0].step & 7)== 0);
+/* pa_log_debug("%lu frames to write", (unsigned long) frames); */
- /* We assume a single interleaved memory buffer */
- pa_assert((areas[0].first >> 3) == 0);
- pa_assert((areas[0].step >> 3) == u->frame_size);
+ if (PA_UNLIKELY((err = snd_pcm_mmap_begin(u->pcm_handle, &areas, &offset, &frames)) < 0)) {
- p = (uint8_t*) areas[0].addr + (offset * u->frame_size);
+ if ((r = try_recover(u, "snd_pcm_mmap_begin", err)) == 0)
+ continue;
- chunk.memblock = pa_memblock_new_fixed(u->core->mempool, p, frames * u->frame_size, 1);
- chunk.length = pa_memblock_get_length(chunk.memblock);
- chunk.index = 0;
+ return r;
+ }
- pa_sink_render_into_full(u->sink, &chunk);
+ /* Make sure that if these memblocks need to be copied they will fit into one slot */
+ if (frames > pa_mempool_block_size_max(u->sink->core->mempool)/u->frame_size)
+ frames = pa_mempool_block_size_max(u->sink->core->mempool)/u->frame_size;
- /* FIXME: Maybe we can do something to keep this memory block
- * a little bit longer around? */
- pa_memblock_unref_fixed(chunk.memblock);
+ /* Check these are multiples of 8 bit */
+ pa_assert((areas[0].first & 7) == 0);
+ pa_assert((areas[0].step & 7)== 0);
- if ((err = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0) {
+ /* We assume a single interleaved memory buffer */
+ pa_assert((areas[0].first >> 3) == 0);
+ pa_assert((areas[0].step >> 3) == u->frame_size);
- if (err == -EPIPE) {
- pa_log_debug("snd_pcm_mmap_commit: Buffer underrun!");
- u->first = TRUE;
- }
+ p = (uint8_t*) areas[0].addr + (offset * u->frame_size);
- if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) == 0)
- continue;
+ chunk.memblock = pa_memblock_new_fixed(u->core->mempool, p, frames * u->frame_size, TRUE);
+ chunk.length = pa_memblock_get_length(chunk.memblock);
+ chunk.index = 0;
- if (err == -EAGAIN)
- return work_done;
+ pa_sink_render_into_full(u->sink, &chunk);
- pa_log("Failed to write data to DSP: %s", snd_strerror(err));
- return -1;
- }
+ /* FIXME: Maybe we can do something to keep this memory block
+ * a little bit longer around? */
+ pa_memblock_unref_fixed(chunk.memblock);
+
+ if (PA_UNLIKELY((sframes = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0)) {
+
+ if ((r = try_recover(u, "snd_pcm_mmap_commit", (int) sframes)) == 0)
+ continue;
+
+ return r;
+ }
- work_done = 1;
+ work_done = 1;
- if (frames >= (snd_pcm_uframes_t) n)
- return work_done;
+ u->frame_index += (int64_t) frames;
+ u->since_start += frames * u->frame_size;
-/* pa_log("wrote %i samples", (int) frames); */
+/* pa_log_debug("wrote %lu frames", (unsigned long) frames); */
+
+ if (frames >= (snd_pcm_uframes_t) n)
+ break;
+
+ n -= (snd_pcm_sframes_t) frames;
+ }
}
+
+ *sleep_usec = pa_bytes_to_usec(left_to_play, &u->sink->sample_spec) - process_usec;
+ return work_done;
}
-static int unix_write(struct userdata *u) {
- snd_pcm_status_t *status;
+static int unix_write(struct userdata *u, pa_usec_t *sleep_usec) {
int work_done = 0;
-
- snd_pcm_status_alloca(&status);
+ pa_usec_t max_sleep_usec = 0, process_usec = 0;
+ size_t left_to_play;
pa_assert(u);
pa_sink_assert_ref(u->sink);
+ if (u->use_tsched)
+ hw_sleep_time(u, &max_sleep_usec, &process_usec);
+
for (;;) {
- void *p;
- snd_pcm_sframes_t t;
- ssize_t l;
- int err;
+ snd_pcm_sframes_t n;
+ int r;
- if ((err = snd_pcm_status(u->pcm_handle, status)) < 0) {
- pa_log("Failed to query DSP status data: %s", snd_strerror(err));
- return -1;
+ snd_pcm_hwsync(u->pcm_handle);
+
+ if (PA_UNLIKELY((n = snd_pcm_avail_update(u->pcm_handle)) < 0)) {
+
+ if ((r = try_recover(u, "snd_pcm_avail_update", (int) n)) == 0)
+ continue;
+
+ return r;
}
- if (snd_pcm_status_get_avail_max(status)*u->frame_size >= u->hwbuf_size)
- pa_log_debug("Buffer underrun!");
+ left_to_play = check_left_to_play(u, n);
- l = snd_pcm_status_get_avail(status) * u->frame_size;
+ if (u->use_tsched)
-/* pa_log("%u bytes to write", l); */
+ /* We won't fill up the playback buffer before at least
+ * half the sleep time is over because otherwise we might
+ * ask for more data from the clients then they expect. We
+ * need to guarantee that clients only have to keep around
+ * a single hw buffer length. */
- if (l <= 0)
- return work_done;
+ if (pa_bytes_to_usec(left_to_play, &u->sink->sample_spec) > process_usec+max_sleep_usec/2)
+ break;
- if (u->memchunk.length <= 0)
- pa_sink_render(u->sink, l, &u->memchunk);
+ if (PA_UNLIKELY(n <= u->hwbuf_unused_frames))
+ break;
- pa_assert(u->memchunk.length > 0);
+ n -= u->hwbuf_unused_frames;
- p = pa_memblock_acquire(u->memchunk.memblock);
- t = snd_pcm_writei(u->pcm_handle, (const uint8_t*) p + u->memchunk.index, u->memchunk.length / u->frame_size);
- pa_memblock_release(u->memchunk.memblock);
+ for (;;) {
+ snd_pcm_sframes_t frames;
+ void *p;
-/* pa_log("wrote %i bytes of %u (%u)", t*u->frame_size, u->memchunk.length, l); */
+/* pa_log_debug("%lu frames to write", (unsigned long) frames); */
- pa_assert(t != 0);
+ if (u->memchunk.length <= 0)
+ pa_sink_render(u->sink, (size_t) n * u->frame_size, &u->memchunk);
- if (t < 0) {
+ pa_assert(u->memchunk.length > 0);
- if ((t = snd_pcm_recover(u->pcm_handle, t, 1)) == 0)
- continue;
+ frames = (snd_pcm_sframes_t) (u->memchunk.length / u->frame_size);
- if (t == -EAGAIN) {
- pa_log_debug("EAGAIN");
- return work_done;
- } else {
- pa_log("Failed to write data to DSP: %s", snd_strerror(t));
- return -1;
+ if (frames > n)
+ frames = n;
+
+ p = pa_memblock_acquire(u->memchunk.memblock);
+ frames = snd_pcm_writei(u->pcm_handle, (const uint8_t*) p + u->memchunk.index, (snd_pcm_uframes_t) frames);
+ pa_memblock_release(u->memchunk.memblock);
+
+ pa_assert(frames != 0);
+
+ if (PA_UNLIKELY(frames < 0)) {
+
+ if ((r = try_recover(u, "snd_pcm_writei", (int) frames)) == 0)
+ continue;
+
+ return r;
}
- }
- u->memchunk.index += t * u->frame_size;
- u->memchunk.length -= t * u->frame_size;
+ u->memchunk.index += (size_t) frames * u->frame_size;
+ u->memchunk.length -= (size_t) frames * u->frame_size;
- if (u->memchunk.length <= 0) {
- pa_memblock_unref(u->memchunk.memblock);
- pa_memchunk_reset(&u->memchunk);
- }
+ if (u->memchunk.length <= 0) {
+ pa_memblock_unref(u->memchunk.memblock);
+ pa_memchunk_reset(&u->memchunk);
+ }
- work_done = 1;
+ work_done = 1;
- if (t * u->frame_size >= (unsigned) l)
- return work_done;
+ u->frame_index += frames;
+ u->since_start += (size_t) frames * u->frame_size;
+
+/* pa_log_debug("wrote %lu frames", (unsigned long) frames); */
+
+ if (frames >= n)
+ break;
+
+ n -= frames;
+ }
}
+
+ *sleep_usec = pa_bytes_to_usec(left_to_play, &u->sink->sample_spec) - process_usec;
+ return work_done;
}
-static pa_usec_t sink_get_latency(struct userdata *u) {
- pa_usec_t r = 0;
- snd_pcm_status_t *status;
- snd_pcm_sframes_t frames = 0;
+static void update_smoother(struct userdata *u) {
+ snd_pcm_sframes_t delay = 0;
+ int64_t frames;
int err;
+ pa_usec_t now1, now2;
+/* struct timeval timestamp; */
+ snd_pcm_status_t *status;
snd_pcm_status_alloca(&status);
pa_assert(u);
pa_assert(u->pcm_handle);
- if ((err = snd_pcm_status(u->pcm_handle, status)) < 0)
- pa_log("Failed to get delay: %s", snd_strerror(err));
- else
- frames = snd_pcm_status_get_delay(status);
+ /* Let's update the time smoother */
+
+ snd_pcm_hwsync(u->pcm_handle);
+ snd_pcm_avail_update(u->pcm_handle);
+
+/* if (PA_UNLIKELY((err = snd_pcm_status(u->pcm_handle, status)) < 0)) { */
+/* pa_log("Failed to query DSP status data: %s", snd_strerror(err)); */
+/* return; */
+/* } */
+
+/* delay = snd_pcm_status_get_delay(status); */
+
+ if (PA_UNLIKELY((err = snd_pcm_delay(u->pcm_handle, &delay)) < 0)) {
+ pa_log("Failed to query DSP status data: %s", snd_strerror(err));
+ return;
+ }
+
+ frames = u->frame_index - delay;
+
+/* pa_log_debug("frame_index = %llu, delay = %llu, p = %llu", (unsigned long long) u->frame_index, (unsigned long long) delay, (unsigned long long) frames); */
+
+/* snd_pcm_status_get_tstamp(status, &timestamp); */
+/* pa_rtclock_from_wallclock(&timestamp); */
+/* now1 = pa_timeval_load(&timestamp); */
+
+ now1 = pa_rtclock_usec();
+ now2 = pa_bytes_to_usec((uint64_t) frames * u->frame_size, &u->sink->sample_spec);
+ pa_smoother_put(u->smoother, now1, now2);
+}
+
+static pa_usec_t sink_get_latency(struct userdata *u) {
+ pa_usec_t r = 0;
+ int64_t delay;
+ pa_usec_t now1, now2;
+
+ pa_assert(u);
+
+ now1 = pa_rtclock_usec();
+ now2 = pa_smoother_get(u->smoother, now1);
- if (frames > 0)
- r = pa_bytes_to_usec(frames * u->frame_size, &u->sink->sample_spec);
+ delay = (int64_t) pa_bytes_to_usec((uint64_t) u->frame_index * u->frame_size, &u->sink->sample_spec) - (int64_t) now2;
+
+ if (delay > 0)
+ r = (pa_usec_t) delay;
if (u->memchunk.memblock)
r += pa_bytes_to_usec(u->memchunk.length, &u->sink->sample_spec);
@@ -312,28 +521,14 @@ static pa_usec_t sink_get_latency(struct userdata *u) {
}
static int build_pollfd(struct userdata *u) {
- int err;
- struct pollfd *pollfd;
- int n;
-
pa_assert(u);
pa_assert(u->pcm_handle);
- if ((n = snd_pcm_poll_descriptors_count(u->pcm_handle)) < 0) {
- pa_log("snd_pcm_poll_descriptors_count() failed: %s", snd_strerror(n));
- return -1;
- }
-
if (u->alsa_rtpoll_item)
pa_rtpoll_item_free(u->alsa_rtpoll_item);
- u->alsa_rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, n);
- pollfd = pa_rtpoll_item_get_pollfd(u->alsa_rtpoll_item, NULL);
-
- if ((err = snd_pcm_poll_descriptors(u->pcm_handle, pollfd, n)) < 0) {
- pa_log("snd_pcm_poll_descriptors() failed: %s", snd_strerror(err));
+ if (!(u->alsa_rtpoll_item = pa_alsa_build_pollfd(u->pcm_handle, u->rtpoll)))
return -1;
- }
return 0;
}
@@ -342,8 +537,10 @@ static int suspend(struct userdata *u) {
pa_assert(u);
pa_assert(u->pcm_handle);
- /* Let's suspend */
- snd_pcm_drain(u->pcm_handle);
+ pa_smoother_pause(u->smoother, pa_rtclock_usec());
+
+ /* Let's suspend -- we don't call snd_pcm_drain() here since that might
+ * take awfully long with our long buffer sizes today. */
snd_pcm_close(u->pcm_handle);
u->pcm_handle = NULL;
@@ -357,10 +554,66 @@ static int suspend(struct userdata *u) {
return 0;
}
+static int update_sw_params(struct userdata *u) {
+ snd_pcm_uframes_t avail_min;
+ int err;
+
+ pa_assert(u);
+
+ /* Use the full buffer if noone asked us for anything specific */
+ u->hwbuf_unused_frames = 0;
+
+ if (u->use_tsched) {
+ pa_usec_t latency;
+
+ if ((latency = pa_sink_get_requested_latency_within_thread(u->sink)) != (pa_usec_t) -1) {
+ size_t b;
+
+ pa_log_debug("latency set to %0.2fms", (double) latency / PA_USEC_PER_MSEC);
+
+ b = pa_usec_to_bytes(latency, &u->sink->sample_spec);
+
+ /* We need at least one sample in our buffer */
+
+ if (PA_UNLIKELY(b < u->frame_size))
+ b = u->frame_size;
+
+ u->hwbuf_unused_frames = (snd_pcm_sframes_t)
+ (PA_LIKELY(b < u->hwbuf_size) ?
+ ((u->hwbuf_size - b) / u->frame_size) : 0);
+
+ fix_tsched_watermark(u);
+ }
+ }
+
+ pa_log_debug("hwbuf_unused_frames=%lu", (unsigned long) u->hwbuf_unused_frames);
+
+ /* We need at last one frame in the used part of the buffer */
+ avail_min = (snd_pcm_uframes_t) u->hwbuf_unused_frames + 1;
+
+ if (u->use_tsched) {
+ pa_usec_t sleep_usec, process_usec;
+
+ hw_sleep_time(u, &sleep_usec, &process_usec);
+ avail_min += pa_usec_to_bytes(sleep_usec, &u->sink->sample_spec);
+ }
+
+ pa_log_debug("setting avail_min=%lu", (unsigned long) avail_min);
+
+ if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min)) < 0) {
+ pa_log("Failed to set software parameters: %s", snd_strerror(err));
+ return err;
+ }
+
+ pa_sink_set_max_request(u->sink, u->hwbuf_size - (size_t) u->hwbuf_unused_frames * u->frame_size);
+
+ return 0;
+}
+
static int unsuspend(struct userdata *u) {
pa_sample_spec ss;
int err;
- pa_bool_t b;
+ pa_bool_t b, d;
unsigned nfrags;
snd_pcm_uframes_t period_size;
@@ -370,7 +623,11 @@ static int unsuspend(struct userdata *u) {
pa_log_info("Trying resume...");
snd_config_update_free_global();
- if ((err = snd_pcm_open(&u->pcm_handle, u->device_name, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0) {
+ if ((err = snd_pcm_open(&u->pcm_handle, u->device_name, SND_PCM_STREAM_PLAYBACK,
+ /*SND_PCM_NONBLOCK|*/
+ SND_PCM_NO_AUTO_RESAMPLE|
+ SND_PCM_NO_AUTO_CHANNELS|
+ SND_PCM_NO_AUTO_FORMAT)) < 0) {
pa_log("Error opening PCM device %s: %s", u->device_name, snd_strerror(err));
goto fail;
}
@@ -379,13 +636,14 @@ static int unsuspend(struct userdata *u) {
nfrags = u->nfragments;
period_size = u->fragment_size / u->frame_size;
b = u->use_mmap;
+ d = u->use_tsched;
- if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &nfrags, &period_size, &b, TRUE)) < 0) {
+ if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &nfrags, &period_size, u->hwbuf_size / u->frame_size, &b, &d, TRUE)) < 0) {
pa_log("Failed to set hardware parameters: %s", snd_strerror(err));
goto fail;
}
- if (b != u->use_mmap) {
+ if (b != u->use_mmap || d != u->use_tsched) {
pa_log_warn("Resume failed, couldn't get original access mode.");
goto fail;
}
@@ -396,14 +654,14 @@ static int unsuspend(struct userdata *u) {
}
if (nfrags != u->nfragments || period_size*u->frame_size != u->fragment_size) {
- pa_log_warn("Resume failed, couldn't restore original fragment settings.");
+ pa_log_warn("Resume failed, couldn't restore original fragment settings. (Old: %lu*%lu, New %lu*%lu)",
+ (unsigned long) u->nfragments, (unsigned long) u->fragment_size,
+ (unsigned long) nfrags, period_size * u->frame_size);
goto fail;
}
- if ((err = pa_alsa_set_sw_params(u->pcm_handle)) < 0) {
- pa_log("Failed to set software parameters: %s", snd_strerror(err));
+ if (update_sw_params(u) < 0)
goto fail;
- }
if (build_pollfd(u) < 0)
goto fail;
@@ -411,6 +669,7 @@ static int unsuspend(struct userdata *u) {
/* FIXME: We need to reload the volume somehow */
u->first = TRUE;
+ u->since_start = 0;
pa_log_info("Resumed successfully...");
@@ -446,7 +705,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
switch ((pa_sink_state_t) PA_PTR_TO_UINT(data)) {
case PA_SINK_SUSPENDED:
- pa_assert(PA_SINK_OPENED(u->sink->thread_info.state));
+ pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
if (suspend(u) < 0)
return -1;
@@ -489,34 +748,101 @@ static int mixer_callback(snd_mixer_elem_t *elem, unsigned int mask) {
return 0;
if (mask & SND_CTL_EVENT_MASK_VALUE) {
- pa_sink_get_volume(u->sink);
- pa_sink_get_mute(u->sink);
+ pa_sink_get_volume(u->sink, TRUE);
+ pa_sink_get_mute(u->sink, TRUE);
}
return 0;
}
+static pa_volume_t from_alsa_volume(struct userdata *u, long alsa_vol) {
+
+ return (pa_volume_t) round(((double) (alsa_vol - u->hw_volume_min) * PA_VOLUME_NORM) /
+ (double) (u->hw_volume_max - u->hw_volume_min));
+}
+
+static long to_alsa_volume(struct userdata *u, pa_volume_t vol) {
+ long alsa_vol;
+
+ alsa_vol = (long) round(((double) vol * (double) (u->hw_volume_max - u->hw_volume_min))
+ / PA_VOLUME_NORM) + u->hw_volume_min;
+
+ return PA_CLAMP_UNLIKELY(alsa_vol, u->hw_volume_min, u->hw_volume_max);
+}
+
static int sink_get_volume_cb(pa_sink *s) {
struct userdata *u = s->userdata;
int err;
- int i;
+ unsigned i;
+ pa_cvolume r;
+ char t[PA_CVOLUME_SNPRINT_MAX];
pa_assert(u);
pa_assert(u->mixer_elem);
- for (i = 0; i < s->sample_spec.channels; i++) {
- long set_vol, vol;
+ if (u->mixer_seperate_channels) {
- pa_assert(snd_mixer_selem_has_playback_channel(u->mixer_elem, u->mixer_map[i]));
+ r.channels = s->sample_spec.channels;
- if ((err = snd_mixer_selem_get_playback_volume(u->mixer_elem, u->mixer_map[i], &vol)) < 0)
- goto fail;
+ for (i = 0; i < s->sample_spec.channels; i++) {
+ long alsa_vol;
+
+ if (u->hw_dB_supported) {
- set_vol = (long) roundf(((float) s->volume.values[i] * (u->hw_volume_max - u->hw_volume_min)) / PA_VOLUME_NORM) + u->hw_volume_min;
+ if ((err = snd_mixer_selem_get_playback_dB(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
+ goto fail;
+
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&alsa_vol, sizeof(alsa_vol));
+#endif
+
+ r.values[i] = pa_sw_volume_from_dB((double) alsa_vol / 100.0);
+ } else {
+
+ if ((err = snd_mixer_selem_get_playback_volume(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
+ goto fail;
+
+ r.values[i] = from_alsa_volume(u, alsa_vol);
+ }
+ }
+
+ } else {
+ long alsa_vol;
- /* Try to avoid superfluous volume changes */
- if (set_vol != vol)
- s->volume.values[i] = (pa_volume_t) roundf(((float) (vol - u->hw_volume_min) * PA_VOLUME_NORM) / (u->hw_volume_max - u->hw_volume_min));
+ if (u->hw_dB_supported) {
+
+ if ((err = snd_mixer_selem_get_playback_dB(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
+ goto fail;
+
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&alsa_vol, sizeof(alsa_vol));
+#endif
+
+ pa_cvolume_set(&r, s->sample_spec.channels, pa_sw_volume_from_dB((double) alsa_vol / 100.0));
+
+ } else {
+
+ if ((err = snd_mixer_selem_get_playback_volume(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
+ goto fail;
+
+ pa_cvolume_set(&r, s->sample_spec.channels, from_alsa_volume(u, alsa_vol));
+ }
+ }
+
+ pa_log_debug("Read hardware volume: %s", pa_cvolume_snprint(t, sizeof(t), &r));
+
+ if (!pa_cvolume_equal(&u->hardware_volume, &r)) {
+
+ u->hardware_volume = s->volume = r;
+
+ if (u->hw_dB_supported) {
+ pa_cvolume reset;
+
+ /* Hmm, so the hardware volume changed, let's reset our software volume */
+
+ pa_cvolume_reset(&reset, s->sample_spec.channels);
+ pa_sink_set_soft_volume(s, &reset);
+ }
}
return 0;
@@ -524,43 +850,111 @@ static int sink_get_volume_cb(pa_sink *s) {
fail:
pa_log_error("Unable to read volume: %s", snd_strerror(err));
- s->get_volume = NULL;
- s->set_volume = NULL;
return -1;
}
static int sink_set_volume_cb(pa_sink *s) {
struct userdata *u = s->userdata;
int err;
- int i;
+ unsigned i;
+ pa_cvolume r;
pa_assert(u);
pa_assert(u->mixer_elem);
- for (i = 0; i < s->sample_spec.channels; i++) {
- long alsa_vol;
+ if (u->mixer_seperate_channels) {
+
+ r.channels = s->sample_spec.channels;
+
+ for (i = 0; i < s->sample_spec.channels; i++) {
+ long alsa_vol;
+ pa_volume_t vol;
+
+ vol = s->volume.values[i];
+
+ if (u->hw_dB_supported) {
+
+ alsa_vol = (long) (pa_sw_volume_to_dB(vol) * 100);
+ alsa_vol = PA_CLAMP_UNLIKELY(alsa_vol, u->hw_dB_min, u->hw_dB_max);
+
+ if ((err = snd_mixer_selem_set_playback_dB(u->mixer_elem, u->mixer_map[i], alsa_vol, 1)) < 0)
+ goto fail;
+
+ if ((err = snd_mixer_selem_get_playback_dB(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
+ goto fail;
+
+ r.values[i] = pa_sw_volume_from_dB((double) alsa_vol / 100.0);
+
+ } else {
+ alsa_vol = to_alsa_volume(u, vol);
+
+ if ((err = snd_mixer_selem_set_playback_volume(u->mixer_elem, u->mixer_map[i], alsa_vol)) < 0)
+ goto fail;
+
+ if ((err = snd_mixer_selem_get_playback_volume(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
+ goto fail;
+
+ r.values[i] = from_alsa_volume(u, alsa_vol);
+ }
+ }
+
+ } else {
pa_volume_t vol;
+ long alsa_vol;
- pa_assert(snd_mixer_selem_has_playback_channel(u->mixer_elem, u->mixer_map[i]));
+ vol = pa_cvolume_max(&s->volume);
- vol = s->volume.values[i];
+ if (u->hw_dB_supported) {
+ alsa_vol = (long) (pa_sw_volume_to_dB(vol) * 100);
+ alsa_vol = PA_CLAMP_UNLIKELY(alsa_vol, u->hw_dB_min, u->hw_dB_max);
- if (vol > PA_VOLUME_NORM)
- vol = PA_VOLUME_NORM;
+ if ((err = snd_mixer_selem_set_playback_dB_all(u->mixer_elem, alsa_vol, 1)) < 0)
+ goto fail;
- alsa_vol = (long) roundf(((float) vol * (u->hw_volume_max - u->hw_volume_min)) / PA_VOLUME_NORM) + u->hw_volume_min;
+ if ((err = snd_mixer_selem_get_playback_dB(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
+ goto fail;
- if ((err = snd_mixer_selem_set_playback_volume(u->mixer_elem, u->mixer_map[i], alsa_vol)) < 0)
- goto fail;
+ pa_cvolume_set(&r, s->volume.channels, pa_sw_volume_from_dB((double) alsa_vol / 100.0));
+
+ } else {
+ alsa_vol = to_alsa_volume(u, vol);
+
+ if ((err = snd_mixer_selem_set_playback_volume_all(u->mixer_elem, alsa_vol)) < 0)
+ goto fail;
+
+ if ((err = snd_mixer_selem_get_playback_volume(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
+ goto fail;
+
+ pa_cvolume_set(&r, s->sample_spec.channels, from_alsa_volume(u, alsa_vol));
+ }
}
+ u->hardware_volume = r;
+
+ if (u->hw_dB_supported) {
+ char t[PA_CVOLUME_SNPRINT_MAX];
+
+ /* Match exactly what the user requested by software */
+
+ pa_sw_cvolume_divide(&r, &s->volume, &r);
+ pa_sink_set_soft_volume(s, &r);
+
+ pa_log_debug("Requested volume: %s", pa_cvolume_snprint(t, sizeof(t), &s->volume));
+ pa_log_debug("Got hardware volume: %s", pa_cvolume_snprint(t, sizeof(t), &u->hardware_volume));
+ pa_log_debug("Calculated software volume: %s", pa_cvolume_snprint(t, sizeof(t), &r));
+
+ } else
+
+ /* We can't match exactly what the user requested, hence let's
+ * at least tell the user about it */
+
+ s->volume = r;
+
return 0;
fail:
pa_log_error("Unable to set volume: %s", snd_strerror(err));
- s->get_volume = NULL;
- s->set_volume = NULL;
return -1;
}
@@ -573,9 +967,6 @@ static int sink_get_mute_cb(pa_sink *s) {
if ((err = snd_mixer_selem_get_playback_switch(u->mixer_elem, 0, &sw)) < 0) {
pa_log_error("Unable to get switch: %s", snd_strerror(err));
-
- s->get_mute = NULL;
- s->set_mute = NULL;
return -1;
}
@@ -593,13 +984,100 @@ static int sink_set_mute_cb(pa_sink *s) {
if ((err = snd_mixer_selem_set_playback_switch_all(u->mixer_elem, !s->muted)) < 0) {
pa_log_error("Unable to set switch: %s", snd_strerror(err));
+ return -1;
+ }
- s->get_mute = NULL;
- s->set_mute = NULL;
+ return 0;
+}
+
+static void sink_update_requested_latency_cb(pa_sink *s) {
+ struct userdata *u = s->userdata;
+ snd_pcm_sframes_t before;
+ pa_assert(u);
+
+ if (!u->pcm_handle)
+ return;
+
+ before = u->hwbuf_unused_frames;
+ update_sw_params(u);
+
+ /* Let's check whether we now use only a smaller part of the
+ buffer then before. If so, we need to make sure that subsequent
+ rewinds are relative to the new maxium fill level and not to the
+ current fill level. Thus, let's do a full rewind once, to clear
+ things up. */
+
+ if (u->hwbuf_unused_frames > before) {
+ pa_log_debug("Requesting rewind due to latency change.");
+ pa_sink_request_rewind(s, (size_t) -1);
+ }
+}
+
+static int process_rewind(struct userdata *u) {
+ snd_pcm_sframes_t unused;
+ size_t rewind_nbytes, unused_nbytes, limit_nbytes;
+ pa_assert(u);
+
+ /* Figure out how much we shall rewind and reset the counter */
+ rewind_nbytes = u->sink->thread_info.rewind_nbytes;
+ u->sink->thread_info.rewind_nbytes = 0;
+
+ if (rewind_nbytes <= 0)
+ goto finish;
+
+ pa_assert(rewind_nbytes > 0);
+ pa_log_debug("Requested to rewind %lu bytes.", (unsigned long) rewind_nbytes);
+
+ snd_pcm_hwsync(u->pcm_handle);
+ if ((unused = snd_pcm_avail_update(u->pcm_handle)) < 0) {
+ pa_log("snd_pcm_avail_update() failed: %s", snd_strerror((int) unused));
return -1;
}
+ unused_nbytes = u->tsched_watermark + (size_t) unused * u->frame_size;
+
+ if (u->hwbuf_size > unused_nbytes)
+ limit_nbytes = u->hwbuf_size - unused_nbytes;
+ else
+ limit_nbytes = 0;
+
+ if (rewind_nbytes > limit_nbytes)
+ rewind_nbytes = limit_nbytes;
+
+ if (rewind_nbytes > 0) {
+ snd_pcm_sframes_t in_frames, out_frames;
+
+ pa_log_debug("Limited to %lu bytes.", (unsigned long) rewind_nbytes);
+
+ in_frames = (snd_pcm_sframes_t) (rewind_nbytes / u->frame_size);
+ pa_log_debug("before: %lu", (unsigned long) in_frames);
+ if ((out_frames = snd_pcm_rewind(u->pcm_handle, (snd_pcm_uframes_t) in_frames)) < 0) {
+ pa_log("snd_pcm_rewind() failed: %s", snd_strerror((int) out_frames));
+ return -1;
+ }
+ pa_log_debug("after: %lu", (unsigned long) out_frames);
+
+ rewind_nbytes = (size_t) out_frames * u->frame_size;
+
+ if (rewind_nbytes <= 0)
+ pa_log_info("Tried rewind, but was apparently not possible.");
+ else {
+ u->frame_index -= out_frames;
+ pa_log_debug("Rewound %lu bytes.", (unsigned long) rewind_nbytes);
+ pa_sink_process_rewind(u->sink, rewind_nbytes);
+
+ u->after_rewind = TRUE;
+ return 0;
+ }
+ } else
+ pa_log_debug("Mhmm, actually there is nothing to rewind.");
+
+finish:
+
+ pa_sink_process_rewind(u->sink, 0);
+
return 0;
+
}
static void thread_func(void *userdata) {
@@ -618,35 +1096,87 @@ static void thread_func(void *userdata) {
for (;;) {
int ret;
+/* pa_log_debug("loop"); */
+
/* Render some data and write it to the dsp */
- if (PA_SINK_OPENED(u->sink->thread_info.state)) {
- int work_done = 0;
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
+ int work_done;
+ pa_usec_t sleep_usec = 0;
- if (u->use_mmap) {
- if ((work_done = mmap_write(u)) < 0)
- goto fail;
- } else {
- if ((work_done = unix_write(u)) < 0)
- goto fail;
+ if (u->sink->thread_info.rewind_requested)
+ if (process_rewind(u) < 0)
+ goto fail;
+
+ if (u->use_mmap)
+ work_done = mmap_write(u, &sleep_usec);
+ else
+ work_done = unix_write(u, &sleep_usec);
+
+ if (work_done < 0)
+ goto fail;
+
+/* pa_log_debug("work_done = %i", work_done); */
+
+ if (work_done) {
+
+ if (u->first) {
+ pa_log_info("Starting playback.");
+ snd_pcm_start(u->pcm_handle);
+
+ pa_smoother_resume(u->smoother, pa_rtclock_usec());
+ }
+
+ update_smoother(u);
}
- if (work_done && u->first) {
- pa_log_info("Starting playback.");
- snd_pcm_start(u->pcm_handle);
- u->first = FALSE;
- continue;
+ if (u->use_tsched) {
+ pa_usec_t cusec;
+
+ if (u->since_start <= u->hwbuf_size) {
+
+ /* USB devices on ALSA seem to hit a buffer
+ * underrun during the first iterations much
+ * quicker then we calculate here, probably due to
+ * the transport latency. To accomodate for that
+ * we artificially decrease the sleep time until
+ * we have filled the buffer at least once
+ * completely.*/
+
+ /*pa_log_debug("Cutting sleep time for the initial iterations by half.");*/
+ sleep_usec /= 2;
+ }
+
+ /* OK, the playback buffer is now full, let's
+ * calculate when to wake up next */
+/* pa_log_debug("Waking up in %0.2fms (sound card clock).", (double) sleep_usec / PA_USEC_PER_MSEC); */
+
+ /* Convert from the sound card time domain to the
+ * system time domain */
+ cusec = pa_smoother_translate(u->smoother, pa_rtclock_usec(), sleep_usec);
+
+/* pa_log_debug("Waking up in %0.2fms (system clock).", (double) cusec / PA_USEC_PER_MSEC); */
+
+ /* We don't trust the conversion, so we wake up whatever comes first */
+ pa_rtpoll_set_timer_relative(u->rtpoll, PA_MIN(sleep_usec, cusec));
}
- }
+
+ u->first = FALSE;
+ u->after_rewind = FALSE;
+
+ } else if (u->use_tsched)
+
+ /* OK, we're in an invalid state, let's disable our timers */
+ pa_rtpoll_set_timer_disabled(u->rtpoll);
/* Hmm, nothing to do. Let's sleep */
- if ((ret = pa_rtpoll_run(u->rtpoll, 1)) < 0)
+ if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
goto fail;
if (ret == 0)
goto finish;
/* Tell ALSA about this and process its response */
- if (PA_SINK_OPENED(u->sink->thread_info.state)) {
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
struct pollfd *pollfd;
unsigned short revents = 0;
int err;
@@ -659,44 +1189,16 @@ static void thread_func(void *userdata) {
goto fail;
}
- if (revents & (POLLERR|POLLNVAL|POLLHUP)) {
-
- if (revents & POLLERR)
- pa_log_warn("Got POLLERR from ALSA");
- if (revents & POLLNVAL)
- pa_log_warn("Got POLLNVAL from ALSA");
- if (revents & POLLHUP)
- pa_log_warn("Got POLLHUP from ALSA");
-
- /* Try to recover from this error */
-
- switch (snd_pcm_state(u->pcm_handle)) {
-
- case SND_PCM_STATE_XRUN:
- if ((err = snd_pcm_recover(u->pcm_handle, -EPIPE, 1)) != 0) {
- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and XRUN: %s", snd_strerror(err));
- goto fail;
- }
- break;
-
- case SND_PCM_STATE_SUSPENDED:
- if ((err = snd_pcm_recover(u->pcm_handle, -ESTRPIPE, 1)) != 0) {
- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and SUSPENDED: %s", snd_strerror(err));
- goto fail;
- }
- break;
-
- default:
-
- snd_pcm_drop(u->pcm_handle);
+ if (revents & (POLLERR|POLLNVAL|POLLHUP|POLLPRI)) {
+ if (pa_alsa_recover_from_poll(u->pcm_handle, revents) < 0)
+ goto fail;
- if ((err = snd_pcm_prepare(u->pcm_handle)) < 0) {
- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): %s", snd_strerror(err));
- goto fail;
- }
- break;
- }
+ u->first = TRUE;
+ u->since_start = 0;
}
+
+ if (revents && u->use_tsched)
+ pa_log_debug("Wakeup from ALSA!%s%s", (revents & POLLIN) ? " INPUT" : "", (revents & POLLOUT) ? " OUTPUT" : "");
}
}
@@ -717,21 +1219,24 @@ int pa__init(pa_module*m) {
const char *dev_id;
pa_sample_spec ss;
pa_channel_map map;
- uint32_t nfrags, frag_size;
- snd_pcm_uframes_t period_size;
+ uint32_t nfrags, hwbuf_size, frag_size, tsched_size, tsched_watermark;
+ snd_pcm_uframes_t period_frames, tsched_frames;
size_t frame_size;
snd_pcm_info_t *pcm_info = NULL;
int err;
- char *t;
const char *name;
char *name_buf = NULL;
- int namereg_fail;
- pa_bool_t use_mmap = TRUE, b;
+ pa_bool_t namereg_fail;
+ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d;
+ pa_usec_t usec;
+ pa_sink_new_data data;
snd_pcm_info_alloca(&pcm_info);
pa_assert(m);
+ pa_alsa_redirect_errors_inc();
+
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
pa_log("Failed to parse module arguments");
goto fail;
@@ -746,35 +1251,61 @@ int pa__init(pa_module*m) {
frame_size = pa_frame_size(&ss);
nfrags = m->core->default_n_fragments;
- frag_size = pa_usec_to_bytes(m->core->default_fragment_size_msec*1000, &ss);
+ frag_size = (uint32_t) pa_usec_to_bytes(m->core->default_fragment_size_msec*PA_USEC_PER_MSEC, &ss);
if (frag_size <= 0)
- frag_size = frame_size;
-
- if (pa_modargs_get_value_u32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_u32(ma, "fragment_size", &frag_size) < 0) {
+ frag_size = (uint32_t) frame_size;
+ tsched_size = (uint32_t) pa_usec_to_bytes(DEFAULT_TSCHED_BUFFER_USEC, &ss);
+ tsched_watermark = (uint32_t) pa_usec_to_bytes(DEFAULT_TSCHED_WATERMARK_USEC, &ss);
+
+ if (pa_modargs_get_value_u32(ma, "fragments", &nfrags) < 0 ||
+ pa_modargs_get_value_u32(ma, "fragment_size", &frag_size) < 0 ||
+ pa_modargs_get_value_u32(ma, "tsched_buffer_size", &tsched_size) < 0 ||
+ pa_modargs_get_value_u32(ma, "tsched_buffer_watermark", &tsched_watermark) < 0) {
pa_log("Failed to parse buffer metrics");
goto fail;
}
- period_size = frag_size/frame_size;
+
+ hwbuf_size = frag_size * nfrags;
+ period_frames = frag_size/frame_size;
+ tsched_frames = tsched_size/frame_size;
if (pa_modargs_get_value_boolean(ma, "mmap", &use_mmap) < 0) {
pa_log("Failed to parse mmap argument.");
goto fail;
}
+ if (pa_modargs_get_value_boolean(ma, "tsched", &use_tsched) < 0) {
+ pa_log("Failed to parse tsched argument.");
+ goto fail;
+ }
+
+ if (use_tsched && !pa_rtclock_hrtimer()) {
+ pa_log_notice("Disabling timer-based scheduling because high-resolution timers are not available from the kernel.");
+ use_tsched = FALSE;
+ }
+
u = pa_xnew0(struct userdata, 1);
u->core = m->core;
u->module = m;
m->userdata = u;
u->use_mmap = use_mmap;
+ u->use_tsched = use_tsched;
u->first = TRUE;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
+ u->since_start = 0;
+ u->after_rewind = FALSE;
u->rtpoll = pa_rtpoll_new();
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
u->alsa_rtpoll_item = NULL;
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+
+ u->smoother = pa_smoother_new(DEFAULT_TSCHED_BUFFER_USEC*2, DEFAULT_TSCHED_BUFFER_USEC*2, TRUE, 5);
+ usec = pa_rtclock_usec();
+ pa_smoother_set_time_offset(u->smoother, usec);
+ pa_smoother_pause(u->smoother, usec);
snd_config_update_free_global();
b = use_mmap;
+ d = use_tsched;
if ((dev_id = pa_modargs_get_value(ma, "device_id", NULL))) {
@@ -783,8 +1314,8 @@ int pa__init(pa_module*m) {
&u->device_name,
&ss, &map,
SND_PCM_STREAM_PLAYBACK,
- &nfrags, &period_size,
- &b)))
+ &nfrags, &period_frames, tsched_frames,
+ &b, &d)))
goto fail;
@@ -795,8 +1326,8 @@ int pa__init(pa_module*m) {
&u->device_name,
&ss, &map,
SND_PCM_STREAM_PLAYBACK,
- &nfrags, &period_size,
- &b)))
+ &nfrags, &period_frames, tsched_frames,
+ &b, &d)))
goto fail;
}
@@ -806,22 +1337,25 @@ int pa__init(pa_module*m) {
if (use_mmap && !b) {
pa_log_info("Device doesn't support mmap(), falling back to UNIX read/write mode.");
- u->use_mmap = use_mmap = b;
+ u->use_mmap = use_mmap = FALSE;
+ }
+
+ if (use_tsched && (!b || !d)) {
+ pa_log_info("Cannot enabled timer-based scheduling, falling back to sound IRQ scheduling.");
+ u->use_tsched = use_tsched = FALSE;
}
if (u->use_mmap)
pa_log_info("Successfully enabled mmap() mode.");
+ if (u->use_tsched)
+ pa_log_info("Successfully enabled timer-based scheduling mode.");
+
if ((err = snd_pcm_info(u->pcm_handle, pcm_info)) < 0) {
pa_log("Error fetching PCM info: %s", snd_strerror(err));
goto fail;
}
- if ((err = pa_alsa_set_sw_params(u->pcm_handle)) < 0) {
- pa_log("Failed to set software parameters: %s", snd_strerror(err));
- goto fail;
- }
-
/* ALSA might tweak the sample spec, so recalculate the frame size */
frame_size = pa_frame_size(&ss);
@@ -833,13 +1367,24 @@ int pa__init(pa_module*m) {
if (pa_alsa_prepare_mixer(u->mixer_handle, u->device_name) >= 0)
found = TRUE;
else {
- char *md = pa_sprintf_malloc("hw:%s", dev_id);
+ snd_pcm_info_t *info;
+
+ snd_pcm_info_alloca(&info);
+
+ if (snd_pcm_info(u->pcm_handle, info) >= 0) {
+ char *md;
+ int card;
- if (strcmp(u->device_name, md))
- if (pa_alsa_prepare_mixer(u->mixer_handle, md) >= 0)
- found = TRUE;
+ if ((card = snd_pcm_info_get_card(info)) >= 0) {
- pa_xfree(md);
+ md = pa_sprintf_malloc("hw:%i", card);
+
+ if (strcmp(u->device_name, md))
+ if (pa_alsa_prepare_mixer(u->mixer_handle, md) >= 0)
+ found = TRUE;
+ pa_xfree(md);
+ }
+ }
}
if (found)
@@ -853,13 +1398,28 @@ int pa__init(pa_module*m) {
}
if ((name = pa_modargs_get_value(ma, "sink_name", NULL)))
- namereg_fail = 1;
+ namereg_fail = TRUE;
else {
name = name_buf = pa_sprintf_malloc("alsa_output.%s", u->device_name);
- namereg_fail = 0;
+ namereg_fail = FALSE;
}
- u->sink = pa_sink_new(m->core, __FILE__, name, namereg_fail, &ss, &map);
+ pa_sink_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_sink_new_data_set_name(&data, name);
+ data.namereg_fail = namereg_fail;
+ pa_sink_new_data_set_sample_spec(&data, &ss);
+ pa_sink_new_data_set_channel_map(&data, &map);
+
+ pa_alsa_init_proplist(data.proplist, pcm_info);
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->device_name);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE, "%lu", (unsigned long) (period_frames * frame_size * nfrags));
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE, "%lu", (unsigned long) (period_frames * frame_size));
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_ACCESS_MODE, u->use_tsched ? "mmap+timer" : (u->use_mmap ? "mmap" : "serial"));
+
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY);
+ pa_sink_new_data_done(&data);
pa_xfree(name_buf);
if (!u->sink) {
@@ -868,45 +1428,105 @@ int pa__init(pa_module*m) {
}
u->sink->parent.process_msg = sink_process_msg;
+ u->sink->update_requested_latency = sink_update_requested_latency_cb;
u->sink->userdata = u;
- pa_sink_set_module(u->sink, m);
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc(
- "ALSA PCM on %s (%s)%s",
- u->device_name,
- snd_pcm_info_get_name(pcm_info),
- use_mmap ? " via DMA" : ""));
- pa_xfree(t);
-
- u->sink->flags = PA_SINK_HARDWARE|PA_SINK_LATENCY;
u->frame_size = frame_size;
- u->fragment_size = frag_size = period_size * frame_size;
+ u->fragment_size = frag_size = (uint32_t) (period_frames * frame_size);
u->nfragments = nfrags;
u->hwbuf_size = u->fragment_size * nfrags;
-
- pa_log_info("Using %u fragments of size %lu bytes.", nfrags, (long unsigned) u->fragment_size);
+ u->hwbuf_unused_frames = 0;
+ u->tsched_watermark = tsched_watermark;
+ u->frame_index = 0;
+ u->hw_dB_supported = FALSE;
+ u->hw_dB_min = u->hw_dB_max = 0;
+ u->hw_volume_min = u->hw_volume_max = 0;
+ u->mixer_seperate_channels = FALSE;
+ pa_cvolume_mute(&u->hardware_volume, u->sink->sample_spec.channels);
+
+ if (use_tsched)
+ fix_tsched_watermark(u);
+
+ u->sink->thread_info.max_rewind = use_tsched ? u->hwbuf_size : 0;
+ u->sink->thread_info.max_request = u->hwbuf_size;
+
+ pa_sink_set_latency_range(u->sink,
+ !use_tsched ? pa_bytes_to_usec(u->hwbuf_size, &ss) : (pa_usec_t) -1,
+ pa_bytes_to_usec(u->hwbuf_size, &ss));
+
+ pa_log_info("Using %u fragments of size %lu bytes, buffer time is %0.2fms",
+ nfrags, (long unsigned) u->fragment_size,
+ (double) pa_bytes_to_usec(u->hwbuf_size, &ss) / PA_USEC_PER_MSEC);
+
+ if (use_tsched)
+ pa_log_info("Time scheduling watermark is %0.2fms",
+ (double) pa_bytes_to_usec(u->tsched_watermark, &ss) / PA_USEC_PER_MSEC);
+
+ if (update_sw_params(u) < 0)
+ goto fail;
pa_memchunk_reset(&u->memchunk);
if (u->mixer_handle) {
pa_assert(u->mixer_elem);
- if (snd_mixer_selem_has_playback_volume(u->mixer_elem))
- if (pa_alsa_calc_mixer_map(u->mixer_elem, &map, u->mixer_map, TRUE) >= 0) {
+ if (snd_mixer_selem_has_playback_volume(u->mixer_elem)) {
+ pa_bool_t suitable = FALSE;
+
+ if (snd_mixer_selem_get_playback_volume_range(u->mixer_elem, &u->hw_volume_min, &u->hw_volume_max) < 0)
+ pa_log_info("Failed to get volume range. Falling back to software volume control.");
+ else if (u->hw_volume_min >= u->hw_volume_max)
+ pa_log_warn("Your kernel driver is broken: it reports a volume range from %li to %li which makes no sense.", u->hw_volume_min, u->hw_volume_max);
+ else {
+ pa_log_info("Volume ranges from %li to %li.", u->hw_volume_min, u->hw_volume_max);
+ suitable = TRUE;
+ }
+
+ if (snd_mixer_selem_get_playback_dB_range(u->mixer_elem, &u->hw_dB_min, &u->hw_dB_max) < 0)
+ pa_log_info("Mixer doesn't support dB information.");
+ else {
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_min, sizeof(u->hw_dB_min));
+ VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_max, sizeof(u->hw_dB_max));
+#endif
+
+ if (u->hw_dB_min >= u->hw_dB_max)
+ pa_log_warn("Your kernel driver is broken: it reports a volume range from %0.2f dB to %0.2f dB which makes no sense.", (double) u->hw_dB_min/100.0, (double) u->hw_dB_max/100.0);
+ else {
+ pa_log_info("Volume ranges from %0.2f dB to %0.2f dB.", (double) u->hw_dB_min/100.0, (double) u->hw_dB_max/100.0);
+ u->hw_dB_supported = TRUE;
+ }
+ }
+
+ if (suitable &&
+ !u->hw_dB_supported &&
+ u->hw_volume_max - u->hw_volume_min < 3) {
+
+ pa_log_info("Device doesn't do dB volume and has less than 4 volume levels. Falling back to software volume control.");
+ suitable = FALSE;
+ }
+
+ if (suitable) {
+ u->mixer_seperate_channels = pa_alsa_calc_mixer_map(u->mixer_elem, &map, u->mixer_map, TRUE) >= 0;
+
u->sink->get_volume = sink_get_volume_cb;
u->sink->set_volume = sink_set_volume_cb;
- snd_mixer_selem_get_playback_volume_range(u->mixer_elem, &u->hw_volume_min, &u->hw_volume_max);
- u->sink->flags |= PA_SINK_HW_VOLUME_CTRL;
- }
+ u->sink->flags |= PA_SINK_HW_VOLUME_CTRL | (u->hw_dB_supported ? PA_SINK_DECIBEL_VOLUME : 0);
+ pa_log_info("Using hardware volume control. Hardware dB scale %s.", u->hw_dB_supported ? "supported" : "not supported");
+
+ } else
+ pa_log_info("Using software volume control.");
+ }
if (snd_mixer_selem_has_playback_switch(u->mixer_elem)) {
u->sink->get_mute = sink_get_mute_cb;
u->sink->set_mute = sink_set_mute_cb;
- u->sink->flags |= PA_SINK_HW_VOLUME_CTRL;
- }
+ u->sink->flags |= PA_SINK_HW_MUTE_CTRL;
+ } else
+ pa_log_info("Using software mute control.");
u->mixer_fdl = pa_alsa_fdlist_new();
@@ -920,16 +1540,29 @@ int pa__init(pa_module*m) {
} else
u->mixer_fdl = NULL;
+ pa_alsa_dump(u->pcm_handle);
+
if (!(u->thread = pa_thread_new(thread_func, u))) {
pa_log("Failed to create thread.");
goto fail;
}
/* Get initial mixer settings */
- if (u->sink->get_volume)
- u->sink->get_volume(u->sink);
- if (u->sink->get_mute)
- u->sink->get_mute(u->sink);
+ if (data.volume_is_set) {
+ if (u->sink->set_volume)
+ u->sink->set_volume(u->sink);
+ } else {
+ if (u->sink->get_volume)
+ u->sink->get_volume(u->sink);
+ }
+
+ if (data.muted_is_set) {
+ if (u->sink->set_mute)
+ u->sink->set_mute(u->sink);
+ } else {
+ if (u->sink->get_mute)
+ u->sink->get_mute(u->sink);
+ }
pa_sink_put(u->sink);
@@ -952,8 +1585,10 @@ void pa__done(pa_module*m) {
pa_assert(m);
- if (!(u = m->userdata))
+ if (!(u = m->userdata)) {
+ pa_alsa_redirect_errors_dec();
return;
+ }
if (u->sink)
pa_sink_unlink(u->sink);
@@ -988,8 +1623,13 @@ void pa__done(pa_module*m) {
snd_pcm_close(u->pcm_handle);
}
+ if (u->smoother)
+ pa_smoother_free(u->smoother);
+
pa_xfree(u->device_name);
pa_xfree(u);
snd_config_update_free_global();
+
+ pa_alsa_redirect_errors_dec();
}
diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c
index 33f5fae..2827ecf 100644
--- a/src/modules/module-alsa-source.c
+++ b/src/modules/module-alsa-source.c
@@ -1,9 +1,7 @@
-/* $Id: module-alsa-source.c 2055 2007-11-13 23:42:15Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio is free software; you can redistribute it and/or modify
@@ -30,8 +28,13 @@
#include <asoundlib.h>
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
#include <pulse/xmalloc.h>
#include <pulse/util.h>
+#include <pulse/timeval.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core.h>
@@ -47,6 +50,8 @@
#include <pulsecore/core-error.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
+#include <pulsecore/time-smoother.h>
+#include <pulsecore/rtclock.h>
#include "alsa-util.h"
#include "module-alsa-source-symdef.h"
@@ -58,16 +63,40 @@ PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"source_name=<name for the source> "
"device=<ALSA device> "
- "device_id=<ALSA device id> "
+ "device_id=<ALSA card index> "
"format=<sample format> "
- "channels=<number of channels> "
"rate=<sample rate> "
+ "channels=<number of channels> "
+ "channel_map=<channel map> "
"fragments=<number of fragments> "
"fragment_size=<fragment size> "
- "channel_map=<channel map> "
- "mmap=<enable memory mapping?>");
+ "mmap=<enable memory mapping?> "
+ "tsched=<enable system timer based scheduling mode?> "
+ "tsched_buffer_size=<buffer size when using timer based scheduling> "
+ "tsched_buffer_watermark=<upper fill watermark>");
+
+static const char* const valid_modargs[] = {
+ "source_name",
+ "device",
+ "device_id",
+ "format",
+ "rate",
+ "channels",
+ "channel_map",
+ "fragments",
+ "fragment_size",
+ "mmap",
+ "tsched",
+ "tsched_buffer_size",
+ "tsched_buffer_watermark",
+ NULL
+};
#define DEFAULT_DEVICE "default"
+#define DEFAULT_TSCHED_BUFFER_USEC (2*PA_USEC_PER_SEC) /* 2s */
+#define DEFAULT_TSCHED_WATERMARK_USEC (20*PA_USEC_PER_MSEC) /* 20ms */
+#define TSCHED_MIN_SLEEP_USEC (3*PA_USEC_PER_MSEC) /* 3ms */
+#define TSCHED_MIN_WAKEUP_USEC (3*PA_USEC_PER_MSEC) /* 3ms */
struct userdata {
pa_core *core;
@@ -84,244 +113,369 @@ struct userdata {
snd_mixer_t *mixer_handle;
snd_mixer_elem_t *mixer_elem;
long hw_volume_max, hw_volume_min;
+ long hw_dB_max, hw_dB_min;
+ pa_bool_t hw_dB_supported;
+ pa_bool_t mixer_seperate_channels;
- size_t frame_size, fragment_size, hwbuf_size;
+ pa_cvolume hardware_volume;
+
+ size_t frame_size, fragment_size, hwbuf_size, tsched_watermark;
unsigned nfragments;
char *device_name;
- pa_bool_t use_mmap;
+ pa_bool_t use_mmap, use_tsched;
pa_rtpoll_item *alsa_rtpoll_item;
snd_mixer_selem_channel_id_t mixer_map[SND_MIXER_SCHN_LAST];
-};
-static const char* const valid_modargs[] = {
- "device",
- "device_id",
- "source_name",
- "channels",
- "rate",
- "format",
- "fragments",
- "fragment_size",
- "channel_map",
- "mmap",
- NULL
+ pa_smoother *smoother;
+ int64_t frame_index;
+
+ snd_pcm_sframes_t hwbuf_unused_frames;
};
-static int mmap_read(struct userdata *u) {
+static void fix_tsched_watermark(struct userdata *u) {
+ size_t max_use;
+ size_t min_sleep, min_wakeup;
+ pa_assert(u);
+
+ max_use = u->hwbuf_size - (size_t) u->hwbuf_unused_frames * u->frame_size;
+
+ min_sleep = pa_usec_to_bytes(TSCHED_MIN_SLEEP_USEC, &u->source->sample_spec);
+ min_wakeup = pa_usec_to_bytes(TSCHED_MIN_WAKEUP_USEC, &u->source->sample_spec);
+
+ if (min_sleep > max_use/2)
+ min_sleep = pa_frame_align(max_use/2, &u->source->sample_spec);
+ if (min_sleep < u->frame_size)
+ min_sleep = u->frame_size;
+
+ if (min_wakeup > max_use/2)
+ min_wakeup = pa_frame_align(max_use/2, &u->source->sample_spec);
+ if (min_wakeup < u->frame_size)
+ min_wakeup = u->frame_size;
+
+ if (u->tsched_watermark > max_use-min_sleep)
+ u->tsched_watermark = max_use-min_sleep;
+
+ if (u->tsched_watermark < min_wakeup)
+ u->tsched_watermark = min_wakeup;
+}
+
+static pa_usec_t hw_sleep_time(struct userdata *u, pa_usec_t *sleep_usec, pa_usec_t*process_usec) {
+ pa_usec_t wm, usec;
+
+ pa_assert(u);
+
+ usec = pa_source_get_requested_latency_within_thread(u->source);
+
+ if (usec == (pa_usec_t) -1)
+ usec = pa_bytes_to_usec(u->hwbuf_size, &u->source->sample_spec);
+
+/* pa_log_debug("hw buffer time: %u ms", (unsigned) (usec / PA_USEC_PER_MSEC)); */
+
+ wm = pa_bytes_to_usec(u->tsched_watermark, &u->source->sample_spec);
+
+ if (usec >= wm) {
+ *sleep_usec = usec - wm;
+ *process_usec = wm;
+ } else
+ *process_usec = *sleep_usec = usec /= 2;
+
+/* pa_log_debug("after watermark: %u ms", (unsigned) (*sleep_usec / PA_USEC_PER_MSEC)); */
+
+ return usec;
+}
+
+static int try_recover(struct userdata *u, const char *call, int err) {
+ pa_assert(u);
+ pa_assert(call);
+ pa_assert(err < 0);
+
+ pa_log_debug("%s: %s", call, snd_strerror(err));
+
+ pa_assert(err != -EAGAIN);
+
+ if (err == -EPIPE)
+ pa_log_debug("%s: Buffer overrun!", call);
+
+ if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) == 0) {
+ snd_pcm_start(u->pcm_handle);
+ return 0;
+ }
+
+ pa_log("%s: %s", call, snd_strerror(err));
+ return -1;
+}
+
+static size_t check_left_to_record(struct userdata *u, snd_pcm_sframes_t n) {
+ size_t left_to_record;
+ size_t rec_space = u->hwbuf_size - (size_t) u->hwbuf_unused_frames*u->frame_size;
+
+ if ((size_t) n*u->frame_size < rec_space)
+ left_to_record = rec_space - ((size_t) n*u->frame_size);
+ else
+ left_to_record = 0;
+
+ if (left_to_record > 0) {
+/* pa_log_debug("%0.2f ms left to record", (double) pa_bytes_to_usec(left_to_record, &u->source->sample_spec) / PA_USEC_PER_MSEC); */
+ } else {
+ pa_log_info("Overrun!");
+
+ if (u->use_tsched) {
+ size_t old_watermark = u->tsched_watermark;
+
+ u->tsched_watermark *= 2;
+ fix_tsched_watermark(u);
+
+ if (old_watermark != u->tsched_watermark)
+ pa_log_notice("Increasing wakeup watermark to %0.2f ms",
+ (double) pa_bytes_to_usec(u->tsched_watermark, &u->source->sample_spec) / PA_USEC_PER_MSEC);
+ }
+ }
+
+ return left_to_record;
+}
+
+static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec) {
int work_done = 0;
+ pa_usec_t max_sleep_usec = 0, process_usec = 0;
+ size_t left_to_record;
pa_assert(u);
pa_source_assert_ref(u->source);
+ if (u->use_tsched)
+ hw_sleep_time(u, &max_sleep_usec, &process_usec);
+
for (;;) {
snd_pcm_sframes_t n;
- int err;
- const snd_pcm_channel_area_t *areas;
- snd_pcm_uframes_t offset, frames;
- pa_memchunk chunk;
- void *p;
+ int r;
- if ((n = snd_pcm_avail_update(u->pcm_handle)) < 0) {
+ snd_pcm_hwsync(u->pcm_handle);
- if (n == -EPIPE)
- pa_log_debug("snd_pcm_avail_update: Buffer underrun!");
+ if (PA_UNLIKELY((n = snd_pcm_avail_update(u->pcm_handle)) < 0)) {
- if ((err = snd_pcm_recover(u->pcm_handle, n, 1)) == 0)
+ if ((r = try_recover(u, "snd_pcm_avail_update", (int) n)) == 0)
continue;
- if (err == -EAGAIN)
- return work_done;
-
- pa_log("snd_pcm_avail_update: %s", snd_strerror(err));
- return -1;
+ return r;
}
-/* pa_log("Got request for %i samples", (int) n); */
+ left_to_record = check_left_to_record(u, n);
- if (n <= 0)
- return work_done;
+ if (u->use_tsched)
+ if (pa_bytes_to_usec(left_to_record, &u->source->sample_spec) > process_usec+max_sleep_usec/2)
+ break;
+
+ if (PA_UNLIKELY(n <= 0))
+ break;
- frames = n;
+ for (;;) {
+ int err;
+ const snd_pcm_channel_area_t *areas;
+ snd_pcm_uframes_t offset, frames = (snd_pcm_uframes_t) n;
+ pa_memchunk chunk;
+ void *p;
+ snd_pcm_sframes_t sframes;
- if ((err = snd_pcm_mmap_begin(u->pcm_handle, &areas, &offset, &frames)) < 0) {
+/* pa_log_debug("%lu frames to read", (unsigned long) frames); */
- if (err == -EPIPE)
- pa_log_debug("snd_pcm_mmap_begin: Buffer underrun!");
+ if (PA_UNLIKELY((err = snd_pcm_mmap_begin(u->pcm_handle, &areas, &offset, &frames)) < 0)) {
- if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) == 0)
- continue;
+ if ((r = try_recover(u, "snd_pcm_mmap_begin", err)) == 0)
+ continue;
- if (err == -EAGAIN)
- return work_done;
+ return r;
+ }
- pa_log("Failed to write data to DSP: %s", snd_strerror(err));
- return -1;
- }
+ /* Make sure that if these memblocks need to be copied they will fit into one slot */
+ if (frames > pa_mempool_block_size_max(u->source->core->mempool)/u->frame_size)
+ frames = pa_mempool_block_size_max(u->source->core->mempool)/u->frame_size;
- /* Check these are multiples of 8 bit */
- pa_assert((areas[0].first & 7) == 0);
- pa_assert((areas[0].step & 7)== 0);
+ /* Check these are multiples of 8 bit */
+ pa_assert((areas[0].first & 7) == 0);
+ pa_assert((areas[0].step & 7)== 0);
- /* We assume a single interleaved memory buffer */
- pa_assert((areas[0].first >> 3) == 0);
- pa_assert((areas[0].step >> 3) == u->frame_size);
+ /* We assume a single interleaved memory buffer */
+ pa_assert((areas[0].first >> 3) == 0);
+ pa_assert((areas[0].step >> 3) == u->frame_size);
- p = (uint8_t*) areas[0].addr + (offset * u->frame_size);
+ p = (uint8_t*) areas[0].addr + (offset * u->frame_size);
- chunk.memblock = pa_memblock_new_fixed(u->core->mempool, p, frames * u->frame_size, 1);
- chunk.length = pa_memblock_get_length(chunk.memblock);
- chunk.index = 0;
+ chunk.memblock = pa_memblock_new_fixed(u->core->mempool, p, frames * u->frame_size, TRUE);
+ chunk.length = pa_memblock_get_length(chunk.memblock);
+ chunk.index = 0;
- pa_source_post(u->source, &chunk);
+ pa_source_post(u->source, &chunk);
+ pa_memblock_unref_fixed(chunk.memblock);
- /* FIXME: Maybe we can do something to keep this memory block
- * a little bit longer around? */
- pa_memblock_unref_fixed(chunk.memblock);
+ if (PA_UNLIKELY((sframes = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0)) {
- if ((err = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0) {
+ if ((r = try_recover(u, "snd_pcm_mmap_commit", (int) sframes)) == 0)
+ continue;
- if (err == -EPIPE)
- pa_log_debug("snd_pcm_mmap_commit: Buffer underrun!");
+ return r;
+ }
- if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) == 0)
- continue;
+ work_done = 1;
- if (err == -EAGAIN)
- return work_done;
+ u->frame_index += (int64_t) frames;
- pa_log("Failed to write data to DSP: %s", snd_strerror(err));
- return -1;
- }
+/* pa_log_debug("read %lu frames", (unsigned long) frames); */
- work_done = 1;
+ if (frames >= (snd_pcm_uframes_t) n)
+ break;
-/* pa_log("wrote %i samples", (int) frames); */
+ n -= (snd_pcm_sframes_t) frames;
+ }
}
+
+ *sleep_usec = pa_bytes_to_usec(left_to_record, &u->source->sample_spec) - process_usec;
+ return work_done;
}
-static int unix_read(struct userdata *u) {
- snd_pcm_status_t *status;
+static int unix_read(struct userdata *u, pa_usec_t *sleep_usec) {
int work_done = 0;
-
- snd_pcm_status_alloca(&status);
+ pa_usec_t max_sleep_usec = 0, process_usec = 0;
+ size_t left_to_record;
pa_assert(u);
pa_source_assert_ref(u->source);
+ if (u->use_tsched)
+ hw_sleep_time(u, &max_sleep_usec, &process_usec);
+
for (;;) {
- void *p;
- snd_pcm_sframes_t t, k;
- ssize_t l;
- int err;
- pa_memchunk chunk;
-
- if ((err = snd_pcm_status(u->pcm_handle, status)) < 0) {
- pa_log("Failed to query DSP status data: %s", snd_strerror(err));
- return -1;
+ snd_pcm_sframes_t n;
+ int r;
+
+ snd_pcm_hwsync(u->pcm_handle);
+
+ if (PA_UNLIKELY((n = snd_pcm_avail_update(u->pcm_handle)) < 0)) {
+
+ if ((r = try_recover(u, "snd_pcm_avail_update", (int) n)) == 0)
+ continue;
+
+ return r;
}
- if (snd_pcm_status_get_avail_max(status)*u->frame_size >= u->hwbuf_size)
- pa_log_debug("Buffer overrun!");
+ left_to_record = check_left_to_record(u, n);
- l = snd_pcm_status_get_avail(status) * u->frame_size;
+ if (u->use_tsched)
+ if (pa_bytes_to_usec(left_to_record, &u->source->sample_spec) > process_usec+max_sleep_usec/2)
+ break;
- if (l <= 0)
+ if (PA_UNLIKELY(n <= 0))
return work_done;
- chunk.memblock = pa_memblock_new(u->core->mempool, (size_t) -1);
+ for (;;) {
+ void *p;
+ snd_pcm_sframes_t frames;
+ pa_memchunk chunk;
- k = pa_memblock_get_length(chunk.memblock);
+ chunk.memblock = pa_memblock_new(u->core->mempool, (size_t) -1);
- if (k > l)
- k = l;
+ frames = (snd_pcm_sframes_t) (pa_memblock_get_length(chunk.memblock) / u->frame_size);
- k = (k/u->frame_size)*u->frame_size;
+ if (frames > n)
+ frames = n;
- p = pa_memblock_acquire(chunk.memblock);
- t = snd_pcm_readi(u->pcm_handle, (uint8_t*) p, k / u->frame_size);
- pa_memblock_release(chunk.memblock);
+/* pa_log_debug("%lu frames to read", (unsigned long) n); */
-/* pa_log("wrote %i bytes of %u (%u)", t*u->frame_size, u->memchunk.length, l); */
+ p = pa_memblock_acquire(chunk.memblock);
+ frames = snd_pcm_readi(u->pcm_handle, (uint8_t*) p, (snd_pcm_uframes_t) frames);
+ pa_memblock_release(chunk.memblock);
- pa_assert(t != 0);
+ pa_assert(frames != 0);
- if (t < 0) {
- pa_memblock_unref(chunk.memblock);
+ if (PA_UNLIKELY(frames < 0)) {
+ pa_memblock_unref(chunk.memblock);
- if ((t = snd_pcm_recover(u->pcm_handle, t, 1)) == 0)
- continue;
+ if ((r = try_recover(u, "snd_pcm_readi", (int) (frames))) == 0)
+ continue;
- if (t == -EAGAIN) {
- pa_log_debug("EAGAIN");
- return work_done;
- } else {
- pa_log("Failed to read data from DSP: %s", snd_strerror(t));
- return -1;
+ return r;
}
+
+ chunk.index = 0;
+ chunk.length = (size_t) frames * u->frame_size;
+
+ pa_source_post(u->source, &chunk);
+ pa_memblock_unref(chunk.memblock);
+
+ work_done = 1;
+
+ u->frame_index += frames;
+
+/* pa_log_debug("read %lu frames", (unsigned long) frames); */
+
+ if (frames >= n)
+ break;
+
+ n -= frames;
}
+ }
- chunk.index = 0;
- chunk.length = t * u->frame_size;
+ *sleep_usec = pa_bytes_to_usec(left_to_record, &u->source->sample_spec) - process_usec;
+ return work_done;
+}
- pa_source_post(u->source, &chunk);
- pa_memblock_unref(chunk.memblock);
+static void update_smoother(struct userdata *u) {
+ snd_pcm_sframes_t delay = 0;
+ int64_t frames;
+ int err;
+ pa_usec_t now1, now2;
- work_done = 1;
+ pa_assert(u);
+ pa_assert(u->pcm_handle);
- if (t * u->frame_size >= (unsigned) l)
- return work_done;
+ /* Let's update the time smoother */
+
+ snd_pcm_hwsync(u->pcm_handle);
+ snd_pcm_avail_update(u->pcm_handle);
+
+ if (PA_UNLIKELY((err = snd_pcm_delay(u->pcm_handle, &delay)) < 0)) {
+ pa_log_warn("Failed to get delay: %s", snd_strerror(err));
+ return;
}
+
+ frames = u->frame_index + delay;
+
+ now1 = pa_rtclock_usec();
+ now2 = pa_bytes_to_usec((uint64_t) frames * u->frame_size, &u->source->sample_spec);
+
+ pa_smoother_put(u->smoother, now1, now2);
}
static pa_usec_t source_get_latency(struct userdata *u) {
pa_usec_t r = 0;
- snd_pcm_status_t *status;
- snd_pcm_sframes_t frames = 0;
- int err;
-
- snd_pcm_status_alloca(&status);
+ int64_t delay;
+ pa_usec_t now1, now2;
pa_assert(u);
- pa_assert(u->pcm_handle);
- if ((err = snd_pcm_status(u->pcm_handle, status)) < 0)
- pa_log("Failed to get delay: %s", snd_strerror(err));
- else
- frames = snd_pcm_status_get_delay(status);
+ now1 = pa_rtclock_usec();
+ now2 = pa_smoother_get(u->smoother, now1);
- if (frames > 0)
- r = pa_bytes_to_usec(frames * u->frame_size, &u->source->sample_spec);
+ delay = (int64_t) now2 - (int64_t) pa_bytes_to_usec((uint64_t) u->frame_index * u->frame_size, &u->source->sample_spec);
+
+ if (delay > 0)
+ r = (pa_usec_t) delay;
return r;
}
static int build_pollfd(struct userdata *u) {
- int err;
- struct pollfd *pollfd;
- int n;
-
pa_assert(u);
pa_assert(u->pcm_handle);
- if ((n = snd_pcm_poll_descriptors_count(u->pcm_handle)) < 0) {
- pa_log("snd_pcm_poll_descriptors_count() failed: %s", snd_strerror(n));
- return -1;
- }
-
if (u->alsa_rtpoll_item)
pa_rtpoll_item_free(u->alsa_rtpoll_item);
- u->alsa_rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, n);
- pollfd = pa_rtpoll_item_get_pollfd(u->alsa_rtpoll_item, NULL);
-
- if ((err = snd_pcm_poll_descriptors(u->pcm_handle, pollfd, n)) < 0) {
- pa_log("snd_pcm_poll_descriptors() failed: %s", snd_strerror(err));
+ if (!(u->alsa_rtpoll_item = pa_alsa_build_pollfd(u->pcm_handle, u->rtpoll)))
return -1;
- }
return 0;
}
@@ -330,6 +484,8 @@ static int suspend(struct userdata *u) {
pa_assert(u);
pa_assert(u->pcm_handle);
+ pa_smoother_pause(u->smoother, pa_rtclock_usec());
+
/* Let's suspend */
snd_pcm_close(u->pcm_handle);
u->pcm_handle = NULL;
@@ -344,10 +500,63 @@ static int suspend(struct userdata *u) {
return 0;
}
+static int update_sw_params(struct userdata *u) {
+ snd_pcm_uframes_t avail_min;
+ int err;
+
+ pa_assert(u);
+
+ /* Use the full buffer if noone asked us for anything specific */
+ u->hwbuf_unused_frames = 0;
+
+ if (u->use_tsched) {
+ pa_usec_t latency;
+
+ if ((latency = pa_source_get_requested_latency_within_thread(u->source)) != (pa_usec_t) -1) {
+ size_t b;
+
+ pa_log_debug("latency set to %0.2fms", (double) latency / PA_USEC_PER_MSEC);
+
+ b = pa_usec_to_bytes(latency, &u->source->sample_spec);
+
+ /* We need at least one sample in our buffer */
+
+ if (PA_UNLIKELY(b < u->frame_size))
+ b = u->frame_size;
+
+ u->hwbuf_unused_frames = (snd_pcm_sframes_t)
+ (PA_LIKELY(b < u->hwbuf_size) ?
+ ((u->hwbuf_size - b) / u->frame_size) : 0);
+
+ fix_tsched_watermark(u);
+ }
+ }
+
+ pa_log_debug("hwbuf_unused_frames=%lu", (unsigned long) u->hwbuf_unused_frames);
+
+ avail_min = 1;
+
+ if (u->use_tsched) {
+ pa_usec_t sleep_usec, process_usec;
+
+ hw_sleep_time(u, &sleep_usec, &process_usec);
+ avail_min += pa_usec_to_bytes(sleep_usec, &u->source->sample_spec);
+ }
+
+ pa_log_debug("setting avail_min=%lu", (unsigned long) avail_min);
+
+ if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min)) < 0) {
+ pa_log("Failed to set software parameters: %s", snd_strerror(err));
+ return err;
+ }
+
+ return 0;
+}
+
static int unsuspend(struct userdata *u) {
pa_sample_spec ss;
int err;
- pa_bool_t b;
+ pa_bool_t b, d;
unsigned nfrags;
snd_pcm_uframes_t period_size;
@@ -357,7 +566,12 @@ static int unsuspend(struct userdata *u) {
pa_log_info("Trying resume...");
snd_config_update_free_global();
- if ((err = snd_pcm_open(&u->pcm_handle, u->device_name, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK)) < 0) {
+
+ if ((err = snd_pcm_open(&u->pcm_handle, u->device_name, SND_PCM_STREAM_CAPTURE,
+ /*SND_PCM_NONBLOCK|*/
+ SND_PCM_NO_AUTO_RESAMPLE|
+ SND_PCM_NO_AUTO_CHANNELS|
+ SND_PCM_NO_AUTO_FORMAT)) < 0) {
pa_log("Error opening PCM device %s: %s", u->device_name, snd_strerror(err));
goto fail;
}
@@ -366,13 +580,14 @@ static int unsuspend(struct userdata *u) {
nfrags = u->nfragments;
period_size = u->fragment_size / u->frame_size;
b = u->use_mmap;
+ d = u->use_tsched;
- if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &nfrags, &period_size, &b, TRUE)) < 0) {
+ if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &nfrags, &period_size, u->hwbuf_size / u->frame_size, &b, &d, TRUE)) < 0) {
pa_log("Failed to set hardware parameters: %s", snd_strerror(err));
goto fail;
}
- if (b != u->use_mmap) {
+ if (b != u->use_mmap || d != u->use_tsched) {
pa_log_warn("Resume failed, couldn't get original access mode.");
goto fail;
}
@@ -383,22 +598,23 @@ static int unsuspend(struct userdata *u) {
}
if (nfrags != u->nfragments || period_size*u->frame_size != u->fragment_size) {
- pa_log_warn("Resume failed, couldn't restore original fragment settings.");
+ pa_log_warn("Resume failed, couldn't restore original fragment settings. (Old: %lu*%lu, New %lu*%lu)",
+ (unsigned long) u->nfragments, (unsigned long) u->fragment_size,
+ (unsigned long) nfrags, period_size * u->frame_size);
goto fail;
}
- if ((err = pa_alsa_set_sw_params(u->pcm_handle)) < 0) {
- pa_log("Failed to set software parameters: %s", snd_strerror(err));
+ if (update_sw_params(u) < 0)
goto fail;
- }
if (build_pollfd(u) < 0)
goto fail;
- snd_pcm_start(u->pcm_handle);
-
/* FIXME: We need to reload the volume somehow */
+ snd_pcm_start(u->pcm_handle);
+ pa_smoother_resume(u->smoother, pa_rtclock_usec());
+
pa_log_info("Resumed successfully...");
return 0;
@@ -433,7 +649,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
switch ((pa_source_state_t) PA_PTR_TO_UINT(data)) {
case PA_SOURCE_SUSPENDED:
- pa_assert(PA_SOURCE_OPENED(u->source->thread_info.state));
+ pa_assert(PA_SOURCE_IS_OPENED(u->source->thread_info.state));
if (suspend(u) < 0)
return -1;
@@ -478,34 +694,101 @@ static int mixer_callback(snd_mixer_elem_t *elem, unsigned int mask) {
return 0;
if (mask & SND_CTL_EVENT_MASK_VALUE) {
- pa_source_get_volume(u->source);
- pa_source_get_mute(u->source);
+ pa_source_get_volume(u->source, TRUE);
+ pa_source_get_mute(u->source, TRUE);
}
return 0;
}
+static pa_volume_t from_alsa_volume(struct userdata *u, long alsa_vol) {
+
+ return (pa_volume_t) round(((double) (alsa_vol - u->hw_volume_min) * PA_VOLUME_NORM) /
+ (double) (u->hw_volume_max - u->hw_volume_min));
+}
+
+static long to_alsa_volume(struct userdata *u, pa_volume_t vol) {
+ long alsa_vol;
+
+ alsa_vol = (long) round(((double) vol * (double) (u->hw_volume_max - u->hw_volume_min))
+ / PA_VOLUME_NORM) + u->hw_volume_min;
+
+ return PA_CLAMP_UNLIKELY(alsa_vol, u->hw_volume_min, u->hw_volume_max);
+}
+
static int source_get_volume_cb(pa_source *s) {
struct userdata *u = s->userdata;
int err;
- int i;
+ unsigned i;
+ pa_cvolume r;
+ char t[PA_CVOLUME_SNPRINT_MAX];
pa_assert(u);
pa_assert(u->mixer_elem);
- for (i = 0; i < s->sample_spec.channels; i++) {
- long set_vol, vol;
+ if (u->mixer_seperate_channels) {
- pa_assert(snd_mixer_selem_has_capture_channel(u->mixer_elem, u->mixer_map[i]));
+ r.channels = s->sample_spec.channels;
- if ((err = snd_mixer_selem_get_capture_volume(u->mixer_elem, u->mixer_map[i], &vol)) < 0)
- goto fail;
+ for (i = 0; i < s->sample_spec.channels; i++) {
+ long alsa_vol;
+
+ if (u->hw_dB_supported) {
+
+ if ((err = snd_mixer_selem_get_capture_dB(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
+ goto fail;
+
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&alsa_vol, sizeof(alsa_vol));
+#endif
+
+ r.values[i] = pa_sw_volume_from_dB((double) alsa_vol / 100.0);
+ } else {
+
+ if ((err = snd_mixer_selem_get_capture_volume(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
+ goto fail;
+
+ r.values[i] = from_alsa_volume(u, alsa_vol);
+ }
+ }
+
+ } else {
+ long alsa_vol;
+
+ if (u->hw_dB_supported) {
+
+ if ((err = snd_mixer_selem_get_capture_dB(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
+ goto fail;
+
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&alsa_vol, sizeof(alsa_vol));
+#endif
+
+ pa_cvolume_set(&r, s->sample_spec.channels, pa_sw_volume_from_dB((double) alsa_vol / 100.0));
+
+ } else {
+
+ if ((err = snd_mixer_selem_get_capture_volume(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
+ goto fail;
+
+ pa_cvolume_set(&r, s->sample_spec.channels, from_alsa_volume(u, alsa_vol));
+ }
+ }
+
+ pa_log_debug("Read hardware volume: %s", pa_cvolume_snprint(t, sizeof(t), &r));
+
+ if (!pa_cvolume_equal(&u->hardware_volume, &r)) {
+
+ u->hardware_volume = s->volume = r;
- set_vol = (long) roundf(((float) s->volume.values[i] * (u->hw_volume_max - u->hw_volume_min)) / PA_VOLUME_NORM) + u->hw_volume_min;
+ if (u->hw_dB_supported) {
+ pa_cvolume reset;
- /* Try to avoid superfluous volume changes */
- if (set_vol != vol)
- s->volume.values[i] = (pa_volume_t) roundf(((float) (vol - u->hw_volume_min) * PA_VOLUME_NORM) / (u->hw_volume_max - u->hw_volume_min));
+ /* Hmm, so the hardware volume changed, let's reset our software volume */
+
+ pa_cvolume_reset(&reset, s->sample_spec.channels);
+ pa_source_set_soft_volume(s, &reset);
+ }
}
return 0;
@@ -513,43 +796,111 @@ static int source_get_volume_cb(pa_source *s) {
fail:
pa_log_error("Unable to read volume: %s", snd_strerror(err));
- s->get_volume = NULL;
- s->set_volume = NULL;
return -1;
}
static int source_set_volume_cb(pa_source *s) {
struct userdata *u = s->userdata;
int err;
- int i;
+ unsigned i;
+ pa_cvolume r;
pa_assert(u);
pa_assert(u->mixer_elem);
- for (i = 0; i < s->sample_spec.channels; i++) {
- long alsa_vol;
+ if (u->mixer_seperate_channels) {
+
+ r.channels = s->sample_spec.channels;
+
+ for (i = 0; i < s->sample_spec.channels; i++) {
+ long alsa_vol;
+ pa_volume_t vol;
+
+ vol = s->volume.values[i];
+
+ if (u->hw_dB_supported) {
+
+ alsa_vol = (long) (pa_sw_volume_to_dB(vol) * 100);
+ alsa_vol = PA_CLAMP_UNLIKELY(alsa_vol, u->hw_dB_min, u->hw_dB_max);
+
+ if ((err = snd_mixer_selem_set_capture_dB(u->mixer_elem, u->mixer_map[i], alsa_vol, 1)) < 0)
+ goto fail;
+
+ if ((err = snd_mixer_selem_get_capture_dB(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
+ goto fail;
+
+ r.values[i] = pa_sw_volume_from_dB((double) alsa_vol / 100.0);
+
+ } else {
+ alsa_vol = to_alsa_volume(u, vol);
+
+ if ((err = snd_mixer_selem_set_capture_volume(u->mixer_elem, u->mixer_map[i], alsa_vol)) < 0)
+ goto fail;
+
+ if ((err = snd_mixer_selem_get_capture_volume(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
+ goto fail;
+
+ r.values[i] = from_alsa_volume(u, alsa_vol);
+ }
+ }
+
+ } else {
pa_volume_t vol;
+ long alsa_vol;
- pa_assert(snd_mixer_selem_has_capture_channel(u->mixer_elem, u->mixer_map[i]));
+ vol = pa_cvolume_max(&s->volume);
- vol = s->volume.values[i];
+ if (u->hw_dB_supported) {
+ alsa_vol = (long) (pa_sw_volume_to_dB(vol) * 100);
+ alsa_vol = PA_CLAMP_UNLIKELY(alsa_vol, u->hw_dB_min, u->hw_dB_max);
- if (vol > PA_VOLUME_NORM)
- vol = PA_VOLUME_NORM;
+ if ((err = snd_mixer_selem_set_capture_dB_all(u->mixer_elem, alsa_vol, 1)) < 0)
+ goto fail;
- alsa_vol = (long) roundf(((float) vol * (u->hw_volume_max - u->hw_volume_min)) / PA_VOLUME_NORM) + u->hw_volume_min;
+ if ((err = snd_mixer_selem_get_capture_dB(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
+ goto fail;
- if ((err = snd_mixer_selem_set_capture_volume(u->mixer_elem, u->mixer_map[i], alsa_vol)) < 0)
- goto fail;
+ pa_cvolume_set(&r, s->volume.channels, pa_sw_volume_from_dB((double) alsa_vol / 100.0));
+
+ } else {
+ alsa_vol = to_alsa_volume(u, vol);
+
+ if ((err = snd_mixer_selem_set_capture_volume_all(u->mixer_elem, alsa_vol)) < 0)
+ goto fail;
+
+ if ((err = snd_mixer_selem_get_capture_volume(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
+ goto fail;
+
+ pa_cvolume_set(&r, s->sample_spec.channels, from_alsa_volume(u, alsa_vol));
+ }
}
+ u->hardware_volume = r;
+
+ if (u->hw_dB_supported) {
+ char t[PA_CVOLUME_SNPRINT_MAX];
+
+ /* Match exactly what the user requested by software */
+
+ pa_sw_cvolume_divide(&r, &s->volume, &r);
+ pa_source_set_soft_volume(s, &r);
+
+ pa_log_debug("Requested volume: %s", pa_cvolume_snprint(t, sizeof(t), &s->volume));
+ pa_log_debug("Got hardware volume: %s", pa_cvolume_snprint(t, sizeof(t), &u->hardware_volume));
+ pa_log_debug("Calculated software volume: %s", pa_cvolume_snprint(t, sizeof(t), &r));
+
+ } else
+
+ /* We can't match exactly what the user requested, hence let's
+ * at least tell the user about it */
+
+ s->volume = r;
+
return 0;
fail:
pa_log_error("Unable to set volume: %s", snd_strerror(err));
- s->get_volume = NULL;
- s->set_volume = NULL;
return -1;
}
@@ -562,9 +913,6 @@ static int source_get_mute_cb(pa_source *s) {
if ((err = snd_mixer_selem_get_capture_switch(u->mixer_elem, 0, &sw)) < 0) {
pa_log_error("Unable to get switch: %s", snd_strerror(err));
-
- s->get_mute = NULL;
- s->set_mute = NULL;
return -1;
}
@@ -582,15 +930,22 @@ static int source_set_mute_cb(pa_source *s) {
if ((err = snd_mixer_selem_set_capture_switch_all(u->mixer_elem, !s->muted)) < 0) {
pa_log_error("Unable to set switch: %s", snd_strerror(err));
-
- s->get_mute = NULL;
- s->set_mute = NULL;
return -1;
}
return 0;
}
+static void source_update_requested_latency_cb(pa_source *s) {
+ struct userdata *u = s->userdata;
+ pa_assert(u);
+
+ if (!u->pcm_handle)
+ return;
+
+ update_sw_params(u);
+}
+
static void thread_func(void *userdata) {
struct userdata *u = userdata;
@@ -607,28 +962,57 @@ static void thread_func(void *userdata) {
for (;;) {
int ret;
+/* pa_log_debug("loop"); */
+
/* Read some data and pass it to the sources */
- if (PA_SOURCE_OPENED(u->source->thread_info.state)) {
+ if (PA_SOURCE_IS_OPENED(u->source->thread_info.state)) {
+ int work_done = 0;
+ pa_usec_t sleep_usec = 0;
- if (u->use_mmap) {
- if (mmap_read(u) < 0)
- goto fail;
+ if (u->use_mmap)
+ work_done = mmap_read(u, &sleep_usec);
+ else
+ work_done = unix_read(u, &sleep_usec);
- } else {
- if (unix_read(u) < 0)
- goto fail;
+ if (work_done < 0)
+ goto fail;
+
+/* pa_log_debug("work_done = %i", work_done); */
+
+ if (work_done)
+ update_smoother(u);
+
+ if (u->use_tsched) {
+ pa_usec_t cusec;
+
+ /* OK, the capture buffer is now empty, let's
+ * calculate when to wake up next */
+
+/* pa_log_debug("Waking up in %0.2fms (sound card clock).", (double) sleep_usec / PA_USEC_PER_MSEC); */
+
+ /* Convert from the sound card time domain to the
+ * system time domain */
+ cusec = pa_smoother_translate(u->smoother, pa_rtclock_usec(), sleep_usec);
+
+/* pa_log_debug("Waking up in %0.2fms (system clock).", (double) cusec / PA_USEC_PER_MSEC); */
+
+ /* We don't trust the conversion, so we wake up whatever comes first */
+ pa_rtpoll_set_timer_relative(u->rtpoll, PA_MIN(sleep_usec, cusec));
}
- }
+ } else if (u->use_tsched)
+
+ /* OK, we're in an invalid state, let's disable our timers */
+ pa_rtpoll_set_timer_disabled(u->rtpoll);
/* Hmm, nothing to do. Let's sleep */
- if ((ret = pa_rtpoll_run(u->rtpoll, 1)) < 0)
+ if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
goto fail;
if (ret == 0)
goto finish;
/* Tell ALSA about this and process its response */
- if (PA_SOURCE_OPENED(u->source->thread_info.state)) {
+ if (PA_SOURCE_IS_OPENED(u->source->thread_info.state)) {
struct pollfd *pollfd;
unsigned short revents = 0;
int err;
@@ -641,44 +1025,15 @@ static void thread_func(void *userdata) {
goto fail;
}
- if (revents & (POLLERR|POLLNVAL|POLLHUP)) {
-
- if (revents & POLLERR)
- pa_log_warn("Got POLLERR from ALSA");
- if (revents & POLLNVAL)
- pa_log_warn("Got POLLNVAL from ALSA");
- if (revents & POLLHUP)
- pa_log_warn("Got POLLHUP from ALSA");
-
- /* Try to recover from this error */
-
- switch (snd_pcm_state(u->pcm_handle)) {
-
- case SND_PCM_STATE_XRUN:
- if ((err = snd_pcm_recover(u->pcm_handle, -EPIPE, 1)) != 0) {
- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and XRUN: %s", snd_strerror(err));
- goto fail;
- }
- break;
-
- case SND_PCM_STATE_SUSPENDED:
- if ((err = snd_pcm_recover(u->pcm_handle, -ESTRPIPE, 1)) != 0) {
- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and SUSPENDED: %s", snd_strerror(err));
- goto fail;
- }
- break;
-
- default:
-
- snd_pcm_drop(u->pcm_handle);
+ if (revents & (POLLERR|POLLNVAL|POLLHUP|POLLPRI)) {
+ if (pa_alsa_recover_from_poll(u->pcm_handle, revents) < 0)
+ goto fail;
- if ((err = snd_pcm_prepare(u->pcm_handle)) < 0) {
- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): %s", snd_strerror(err));
- goto fail;
- }
- break;
- }
+ snd_pcm_start(u->pcm_handle);
}
+
+ if (revents && u->use_tsched)
+ pa_log_debug("Wakeup from ALSA!%s%s", (revents & POLLIN) ? " INPUT" : "", (revents & POLLOUT) ? " OUTPUT" : "");
}
}
@@ -699,21 +1054,23 @@ int pa__init(pa_module*m) {
const char *dev_id;
pa_sample_spec ss;
pa_channel_map map;
- uint32_t nfrags, frag_size;
- snd_pcm_uframes_t period_size;
+ uint32_t nfrags, hwbuf_size, frag_size, tsched_size, tsched_watermark;
+ snd_pcm_uframes_t period_frames, tsched_frames;
size_t frame_size;
snd_pcm_info_t *pcm_info = NULL;
int err;
- char *t;
const char *name;
char *name_buf = NULL;
- int namereg_fail;
- pa_bool_t use_mmap = TRUE, b;
+ pa_bool_t namereg_fail;
+ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d;
+ pa_source_new_data data;
snd_pcm_info_alloca(&pcm_info);
pa_assert(m);
+ pa_alsa_redirect_errors_inc();
+
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
pa_log("Failed to parse module arguments");
goto fail;
@@ -728,34 +1085,56 @@ int pa__init(pa_module*m) {
frame_size = pa_frame_size(&ss);
nfrags = m->core->default_n_fragments;
- frag_size = pa_usec_to_bytes(m->core->default_fragment_size_msec*1000, &ss);
+ frag_size = (uint32_t) pa_usec_to_bytes(m->core->default_fragment_size_msec*PA_USEC_PER_MSEC, &ss);
if (frag_size <= 0)
- frag_size = frame_size;
-
- if (pa_modargs_get_value_u32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_u32(ma, "fragment_size", &frag_size) < 0) {
+ frag_size = (uint32_t) frame_size;
+ tsched_size = (uint32_t) pa_usec_to_bytes(DEFAULT_TSCHED_BUFFER_USEC, &ss);
+ tsched_watermark = (uint32_t) pa_usec_to_bytes(DEFAULT_TSCHED_WATERMARK_USEC, &ss);
+
+ if (pa_modargs_get_value_u32(ma, "fragments", &nfrags) < 0 ||
+ pa_modargs_get_value_u32(ma, "fragment_size", &frag_size) < 0 ||
+ pa_modargs_get_value_u32(ma, "tsched_buffer_size", &tsched_size) < 0 ||
+ pa_modargs_get_value_u32(ma, "tsched_buffer_watermark", &tsched_watermark) < 0) {
pa_log("Failed to parse buffer metrics");
goto fail;
}
- period_size = frag_size/frame_size;
+
+ hwbuf_size = frag_size * nfrags;
+ period_frames = frag_size/frame_size;
+ tsched_frames = tsched_size/frame_size;
if (pa_modargs_get_value_boolean(ma, "mmap", &use_mmap) < 0) {
pa_log("Failed to parse mmap argument.");
goto fail;
}
+ if (pa_modargs_get_value_boolean(ma, "tsched", &use_tsched) < 0) {
+ pa_log("Failed to parse timer_scheduling argument.");
+ goto fail;
+ }
+
+ if (use_tsched && !pa_rtclock_hrtimer()) {
+ pa_log_notice("Disabling timer-based scheduling because high-resolution timers are not available from the kernel.");
+ use_tsched = FALSE;
+ }
+
u = pa_xnew0(struct userdata, 1);
u->core = m->core;
u->module = m;
m->userdata = u;
u->use_mmap = use_mmap;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
+ u->use_tsched = use_tsched;
u->rtpoll = pa_rtpoll_new();
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
u->alsa_rtpoll_item = NULL;
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+
+ u->smoother = pa_smoother_new(DEFAULT_TSCHED_WATERMARK_USEC, DEFAULT_TSCHED_WATERMARK_USEC, TRUE, 5);
+ pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec());
snd_config_update_free_global();
b = use_mmap;
+ d = use_tsched;
if ((dev_id = pa_modargs_get_value(ma, "device_id", NULL))) {
@@ -764,8 +1143,8 @@ int pa__init(pa_module*m) {
&u->device_name,
&ss, &map,
SND_PCM_STREAM_CAPTURE,
- &nfrags, &period_size,
- &b)))
+ &nfrags, &period_frames, tsched_frames,
+ &b, &d)))
goto fail;
} else {
@@ -775,8 +1154,8 @@ int pa__init(pa_module*m) {
&u->device_name,
&ss, &map,
SND_PCM_STREAM_CAPTURE,
- &nfrags, &period_size,
- &b)))
+ &nfrags, &period_frames, tsched_frames,
+ &b, &d)))
goto fail;
}
@@ -785,22 +1164,25 @@ int pa__init(pa_module*m) {
if (use_mmap && !b) {
pa_log_info("Device doesn't support mmap(), falling back to UNIX read/write mode.");
- u->use_mmap = use_mmap = b;
+ u->use_mmap = use_mmap = FALSE;
+ }
+
+ if (use_tsched && (!b || !d)) {
+ pa_log_info("Cannot enabled timer-based scheduling, falling back to sound IRQ scheduling.");
+ u->use_tsched = use_tsched = FALSE;
}
if (u->use_mmap)
pa_log_info("Successfully enabled mmap() mode.");
+ if (u->use_tsched)
+ pa_log_info("Successfully enabled timer-based scheduling mode.");
+
if ((err = snd_pcm_info(u->pcm_handle, pcm_info)) < 0) {
pa_log("Error fetching PCM info: %s", snd_strerror(err));
goto fail;
}
- if ((err = pa_alsa_set_sw_params(u->pcm_handle)) < 0) {
- pa_log("Failed to set software parameters: %s", snd_strerror(err));
- goto fail;
- }
-
/* ALSA might tweak the sample spec, so recalculate the frame size */
frame_size = pa_frame_size(&ss);
@@ -812,13 +1194,24 @@ int pa__init(pa_module*m) {
if (pa_alsa_prepare_mixer(u->mixer_handle, u->device_name) >= 0)
found = TRUE;
else {
- char *md = pa_sprintf_malloc("hw:%s", dev_id);
+ snd_pcm_info_t* info;
- if (strcmp(u->device_name, md))
- if (pa_alsa_prepare_mixer(u->mixer_handle, md) >= 0)
- found = TRUE;
+ snd_pcm_info_alloca(&info);
- pa_xfree(md);
+ if (snd_pcm_info(u->pcm_handle, info) >= 0) {
+ char *md;
+ int card;
+
+ if ((card = snd_pcm_info_get_card(info)) >= 0) {
+
+ md = pa_sprintf_malloc("hw:%i", card);
+
+ if (strcmp(u->device_name, md))
+ if (pa_alsa_prepare_mixer(u->mixer_handle, md) >= 0)
+ found = TRUE;
+ pa_xfree(md);
+ }
+ }
}
if (found)
@@ -832,13 +1225,28 @@ int pa__init(pa_module*m) {
}
if ((name = pa_modargs_get_value(ma, "source_name", NULL)))
- namereg_fail = 1;
+ namereg_fail = TRUE;
else {
name = name_buf = pa_sprintf_malloc("alsa_input.%s", u->device_name);
- namereg_fail = 0;
+ namereg_fail = FALSE;
}
- u->source = pa_source_new(m->core, __FILE__, name, namereg_fail, &ss, &map);
+ pa_source_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_source_new_data_set_name(&data, name);
+ data.namereg_fail = namereg_fail;
+ pa_source_new_data_set_sample_spec(&data, &ss);
+ pa_source_new_data_set_channel_map(&data, &map);
+
+ pa_alsa_init_proplist(data.proplist, pcm_info);
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->device_name);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE, "%lu", (unsigned long) (period_frames * frame_size * nfrags));
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE, "%lu", (unsigned long) (period_frames * frame_size));
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_ACCESS_MODE, u->use_tsched ? "mmap+timer" : (u->use_mmap ? "mmap" : "serial"));
+
+ u->source = pa_source_new(m->core, &data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY);
+ pa_source_new_data_done(&data);
pa_xfree(name_buf);
if (!u->source) {
@@ -847,43 +1255,99 @@ int pa__init(pa_module*m) {
}
u->source->parent.process_msg = source_process_msg;
+ u->source->update_requested_latency = source_update_requested_latency_cb;
u->source->userdata = u;
- pa_source_set_module(u->source, m);
pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
pa_source_set_rtpoll(u->source, u->rtpoll);
- pa_source_set_description(u->source, t = pa_sprintf_malloc(
- "ALSA PCM on %s (%s)%s",
- u->device_name,
- snd_pcm_info_get_name(pcm_info),
- use_mmap ? " via DMA" : ""));
- pa_xfree(t);
-
- u->source->flags = PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY;
u->frame_size = frame_size;
- u->fragment_size = frag_size = period_size * frame_size;
+ u->fragment_size = frag_size = (uint32_t) (period_frames * frame_size);
u->nfragments = nfrags;
u->hwbuf_size = u->fragment_size * nfrags;
-
- pa_log_info("Using %u fragments of size %lu bytes.", nfrags, (long unsigned) u->fragment_size);
+ u->hwbuf_unused_frames = 0;
+ u->tsched_watermark = tsched_watermark;
+ u->frame_index = 0;
+ u->hw_dB_supported = FALSE;
+ u->hw_dB_min = u->hw_dB_max = 0;
+ u->hw_volume_min = u->hw_volume_max = 0;
+ u->mixer_seperate_channels = FALSE;
+ pa_cvolume_mute(&u->hardware_volume, u->source->sample_spec.channels);
+
+ if (use_tsched)
+ fix_tsched_watermark(u);
+
+ pa_source_set_latency_range(u->source,
+ !use_tsched ? pa_bytes_to_usec(u->hwbuf_size, &ss) : (pa_usec_t) -1,
+ pa_bytes_to_usec(u->hwbuf_size, &ss));
+
+ pa_log_info("Using %u fragments of size %lu bytes, buffer time is %0.2fms",
+ nfrags, (long unsigned) u->fragment_size,
+ (double) pa_bytes_to_usec(u->hwbuf_size, &ss) / PA_USEC_PER_MSEC);
+
+ if (use_tsched)
+ pa_log_info("Time scheduling watermark is %0.2fms",
+ (double) pa_bytes_to_usec(u->tsched_watermark, &ss) / PA_USEC_PER_MSEC);
+
+ if (update_sw_params(u) < 0)
+ goto fail;
if (u->mixer_handle) {
pa_assert(u->mixer_elem);
- if (snd_mixer_selem_has_capture_volume(u->mixer_elem))
- if (pa_alsa_calc_mixer_map(u->mixer_elem, &map, u->mixer_map, FALSE) >= 0) {
+ if (snd_mixer_selem_has_capture_volume(u->mixer_elem)) {
+ pa_bool_t suitable = FALSE;
+
+ if (snd_mixer_selem_get_capture_volume_range(u->mixer_elem, &u->hw_volume_min, &u->hw_volume_max) < 0)
+ pa_log_info("Failed to get volume range. Falling back to software volume control.");
+ else if (u->hw_volume_min >= u->hw_volume_max)
+ pa_log_warn("Your kernel driver is broken: it reports a volume range from %li to %li which makes no sense.", u->hw_volume_min, u->hw_volume_max);
+ else {
+ pa_log_info("Volume ranges from %li to %li.", u->hw_volume_min, u->hw_volume_max);
+ suitable = TRUE;
+ }
+
+ if (snd_mixer_selem_get_capture_dB_range(u->mixer_elem, &u->hw_dB_min, &u->hw_dB_max) < 0)
+ pa_log_info("Mixer doesn't support dB information.");
+ else {
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_min, sizeof(u->hw_dB_min));
+ VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_max, sizeof(u->hw_dB_max));
+#endif
+
+ if (u->hw_dB_min >= u->hw_dB_max)
+ pa_log_warn("Your kernel driver is broken: it reports a volume range from %0.2f dB to %0.2f dB which makes no sense.", (double) u->hw_dB_min/100.0, (double) u->hw_dB_max/100.0);
+ else {
+ pa_log_info("Volume ranges from %0.2f dB to %0.2f dB.", (double) u->hw_dB_min/100.0, (double) u->hw_dB_max/100.0);
+ u->hw_dB_supported = TRUE;
+ }
+ }
+
+ if (suitable &&
+ !u->hw_dB_supported &&
+ u->hw_volume_max - u->hw_volume_min < 3) {
+
+ pa_log_info("Device has less than 4 volume levels. Falling back to software volume control.");
+ suitable = FALSE;
+ }
+
+ if (suitable) {
+ u->mixer_seperate_channels = pa_alsa_calc_mixer_map(u->mixer_elem, &map, u->mixer_map, FALSE) >= 0;
+
u->source->get_volume = source_get_volume_cb;
u->source->set_volume = source_set_volume_cb;
- snd_mixer_selem_get_capture_volume_range(u->mixer_elem, &u->hw_volume_min, &u->hw_volume_max);
- u->source->flags |= PA_SOURCE_HW_VOLUME_CTRL;
- }
+ u->source->flags |= PA_SOURCE_HW_VOLUME_CTRL | (u->hw_dB_supported ? PA_SOURCE_DECIBEL_VOLUME : 0);
+ pa_log_info("Using hardware volume control. Hardware dB scale %s.", u->hw_dB_supported ? "supported" : "not supported");
+ } else
+ pa_log_info("Using software volume control.");
+ }
if (snd_mixer_selem_has_capture_switch(u->mixer_elem)) {
u->source->get_mute = source_get_mute_cb;
u->source->set_mute = source_set_mute_cb;
- u->source->flags |= PA_SOURCE_HW_VOLUME_CTRL;
- }
+ u->source->flags |= PA_SOURCE_HW_MUTE_CTRL;
+ } else
+ pa_log_info("Using software mute control.");
u->mixer_fdl = pa_alsa_fdlist_new();
@@ -897,15 +1361,28 @@ int pa__init(pa_module*m) {
} else
u->mixer_fdl = NULL;
+ pa_alsa_dump(u->pcm_handle);
+
if (!(u->thread = pa_thread_new(thread_func, u))) {
pa_log("Failed to create thread.");
goto fail;
}
/* Get initial mixer settings */
- if (u->source->get_volume)
- u->source->get_volume(u->source);
- if (u->source->get_mute)
- u->source->get_mute(u->source);
+ if (data.volume_is_set) {
+ if (u->source->set_volume)
+ u->source->set_volume(u->source);
+ } else {
+ if (u->source->get_volume)
+ u->source->get_volume(u->source);
+ }
+
+ if (data.muted_is_set) {
+ if (u->source->set_mute)
+ u->source->set_mute(u->source);
+ } else {
+ if (u->source->get_mute)
+ u->source->get_mute(u->source);
+ }
pa_source_put(u->source);
@@ -928,8 +1405,10 @@ void pa__done(pa_module*m) {
pa_assert(m);
- if (!(u = m->userdata))
+ if (!(u = m->userdata)) {
+ pa_alsa_redirect_errors_dec();
return;
+ }
if (u->source)
pa_source_unlink(u->source);
@@ -961,8 +1440,12 @@ void pa__done(pa_module*m) {
snd_pcm_close(u->pcm_handle);
}
+ if (u->smoother)
+ pa_smoother_free(u->smoother);
+
pa_xfree(u->device_name);
pa_xfree(u);
snd_config_update_free_global();
+ pa_alsa_redirect_errors_dec();
}
diff --git a/src/modules/module-always-sink-symdef.h b/src/modules/module-always-sink-symdef.h
new file mode 100644
index 0000000..7247e48
--- /dev/null
+++ b/src/modules/module-always-sink-symdef.h
@@ -0,0 +1,25 @@
+#ifndef foomodulealwayssinksymdeffoo
+#define foomodulealwayssinksymdeffoo
+
+#include <pulsecore/core.h>
+#include <pulsecore/module.h>
+#include <pulsecore/macro.h>
+
+#define pa__init module_always_sink_LTX_pa__init
+#define pa__done module_always_sink_LTX_pa__done
+#define pa__get_author module_always_sink_LTX_pa__get_author
+#define pa__get_description module_always_sink_LTX_pa__get_description
+#define pa__get_usage module_always_sink_LTX_pa__get_usage
+#define pa__get_version module_always_sink_LTX_pa__get_version
+#define pa__load_once module_always_sink_LTX_pa__load_once
+
+int pa__init(pa_module*m);
+void pa__done(pa_module*m);
+
+const char* pa__get_author(void);
+const char* pa__get_description(void);
+const char* pa__get_usage(void);
+const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
+
+#endif
diff --git a/src/modules/module-always-sink.c b/src/modules/module-always-sink.c
new file mode 100644
index 0000000..9d60c29
--- /dev/null
+++ b/src/modules/module-always-sink.c
@@ -0,0 +1,178 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Colin Guthrie
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulse/xmalloc.h>
+
+#include <pulsecore/core.h>
+#include <pulsecore/sink-input.h>
+#include <pulsecore/modargs.h>
+#include <pulsecore/log.h>
+#include <pulsecore/namereg.h>
+#include <pulsecore/core-util.h>
+
+#include "module-always-sink-symdef.h"
+
+PA_MODULE_AUTHOR("Colin Guthrie");
+PA_MODULE_DESCRIPTION("Always keeps at least one sink loaded even if it's a null one");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE(
+ "sink_name=<name of sink>");
+
+#define DEFAULT_SINK_NAME "auto_null"
+
+static const char* const valid_modargs[] = {
+ "sink_name",
+ NULL,
+};
+
+struct userdata {
+ pa_hook_slot *put_slot, *unlink_slot;
+ pa_module* null_module;
+ pa_bool_t ignore;
+ char *sink_name;
+};
+
+static void load_null_sink_if_needed(pa_core *c, pa_sink *sink, struct userdata* u) {
+ pa_sink *target;
+ uint32_t idx;
+ char *t;
+
+ pa_assert(c);
+ pa_assert(u);
+ pa_assert(!u->null_module);
+
+ /* Loop through all sinks and check to see if we have *any*
+ * sinks. Ignore the sink passed in (if it's not null) */
+ for (target = pa_idxset_first(c->sinks, &idx); target; target = pa_idxset_next(c->sinks, &idx))
+ if (!sink || target != sink)
+ break;
+
+ if (target)
+ return;
+
+ pa_log_debug("Autoloading null-sink as no other sinks detected.");
+
+ u->ignore = TRUE;
+
+ t = pa_sprintf_malloc("sink_name=%s", u->sink_name);
+ u->null_module = pa_module_load(c, "module-null-sink", t);
+ pa_xfree(t);
+
+ u->ignore = FALSE;
+
+ if (!u->null_module)
+ pa_log_warn("Unable to load module-null-sink");
+}
+
+static pa_hook_result_t put_hook_callback(pa_core *c, pa_sink *sink, void* userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(c);
+ pa_assert(sink);
+ pa_assert(u);
+
+ /* This is us detecting ourselves on load... just ignore this. */
+ if (u->ignore)
+ return PA_HOOK_OK;
+
+ /* Auto-loaded null-sink not active, so ignoring newly detected sink. */
+ if (!u->null_module)
+ return PA_HOOK_OK;
+
+ /* This is us detecting ourselves on load in a different way... just ignore this too. */
+ if (sink->module == u->null_module)
+ return PA_HOOK_OK;
+
+ pa_log_info("A new sink has been discovered. Unloading null-sink.");
+
+ pa_module_unload_request(u->null_module, TRUE);
+ u->null_module = NULL;
+
+ return PA_HOOK_OK;
+}
+
+static pa_hook_result_t unlink_hook_callback(pa_core *c, pa_sink *sink, void* userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(c);
+ pa_assert(sink);
+ pa_assert(u);
+
+ /* First check to see if it's our own null-sink that's been removed... */
+ if (u->null_module && sink->module == u->null_module) {
+ pa_log_debug("Autoloaded null-sink removed");
+ u->null_module = NULL;
+ return PA_HOOK_OK;
+ }
+
+ load_null_sink_if_needed(c, sink, u);
+
+ return PA_HOOK_OK;
+}
+
+int pa__init(pa_module*m) {
+ pa_modargs *ma = NULL;
+ struct userdata *u;
+
+ pa_assert(m);
+
+ if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
+ pa_log("Failed to parse module arguments");
+ return -1;
+ }
+
+ m->userdata = u = pa_xnew(struct userdata, 1);
+ u->sink_name = pa_xstrdup(pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME));
+ u->put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_LATE, (pa_hook_cb_t) put_hook_callback, u);
+ u->unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK], PA_HOOK_EARLY, (pa_hook_cb_t) unlink_hook_callback, u);
+ u->null_module = NULL;
+ u->ignore = FALSE;
+
+ pa_modargs_free(ma);
+
+ load_null_sink_if_needed(m->core, NULL, u);
+
+ return 0;
+}
+
+void pa__done(pa_module*m) {
+ struct userdata *u;
+
+ pa_assert(m);
+
+ if (!(u = m->userdata))
+ return;
+
+ if (u->put_slot)
+ pa_hook_slot_free(u->put_slot);
+ if (u->unlink_slot)
+ pa_hook_slot_free(u->unlink_slot);
+ if (u->null_module)
+ pa_module_unload_request(u->null_module, TRUE);
+
+ pa_xfree(u->sink_name);
+ pa_xfree(u);
+}
diff --git a/src/modules/module-bt-proximity-symdef.h b/src/modules/module-bt-proximity-symdef.h
deleted file mode 100644
index 3260a8d..0000000
--- a/src/modules/module-bt-proximity-symdef.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef foomodulebtproximitysymdeffoo
-#define foomodulebtproximitysymdeffoo
-
-#include <pulsecore/core.h>
-#include <pulsecore/module.h>
-#include <pulsecore/macro.h>
-
-#define pa__init module_bt_proximity_LTX_pa__init
-#define pa__done module_bt_proximity_LTX_pa__done
-#define pa__get_author module_bt_proximity_LTX_pa__get_author
-#define pa__get_description module_bt_proximity_LTX_pa__get_description
-#define pa__get_usage module_bt_proximity_LTX_pa__get_usage
-#define pa__get_version module_bt_proximity_LTX_pa__get_version
-#define pa__load_once module_bt_proximity_LTX_pa__load_once
-
-int pa__init(pa_module*m);
-void pa__done(pa_module*m);
-
-const char* pa__get_author(void);
-const char* pa__get_description(void);
-const char* pa__get_usage(void);
-const char* pa__get_version(void);
-pa_bool_t pa__load_once(void);
-
-#endif
diff --git a/src/modules/module-cli.c b/src/modules/module-cli.c
index 1dff625..439aa8b 100644
--- a/src/modules/module-cli.c
+++ b/src/modules/module-cli.c
@@ -1,5 +1,3 @@
-/* $Id: module-cli.c 2050 2007-11-13 17:37:44Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -55,7 +53,7 @@ static void eof_and_unload_cb(pa_cli*c, void *userdata) {
pa_assert(c);
pa_assert(m);
- pa_module_unload_request(m);
+ pa_module_unload_request(m, TRUE);
}
static void eof_and_exit_cb(pa_cli*c, void *userdata) {
@@ -64,7 +62,7 @@ static void eof_and_exit_cb(pa_cli*c, void *userdata) {
pa_assert(c);
pa_assert(m);
- m->core->mainloop->quit(m->core->mainloop, 0);
+ pa_core_exit(m->core, FALSE, 0);
}
int pa__init(pa_module*m) {
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index fc86298..d61d127 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -1,9 +1,7 @@
-/* $Id: module-combine.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -47,6 +45,7 @@
#include <pulsecore/rtpoll.h>
#include <pulsecore/rtclock.h>
#include <pulsecore/core-error.h>
+#include <pulsecore/time-smoother.h>
#include "module-combine-symdef.h"
@@ -56,7 +55,6 @@ PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
- "master=<master sink> "
"slaves=<slave sinks> "
"adjust_time=<seconds> "
"resample_method=<method> "
@@ -66,13 +64,15 @@ PA_MODULE_USAGE(
"channel_map=<channel map>");
#define DEFAULT_SINK_NAME "combined"
-#define MEMBLOCKQ_MAXLENGTH (1024*170)
+
+#define MEMBLOCKQ_MAXLENGTH (1024*1024*16)
#define DEFAULT_ADJUST_TIME 10
+#define REQUEST_LATENCY_USEC (PA_USEC_PER_MSEC * 200)
+
static const char* const valid_modargs[] = {
"sink_name",
- "master",
"slaves",
"adjust_time",
"resample_method",
@@ -91,12 +91,15 @@ struct output {
pa_asyncmsgq *inq, /* Message queue from the sink thread to this sink input */
*outq; /* Message queue from this sink input to the sink thread */
- pa_rtpoll_item *inq_rtpoll_item, *outq_rtpoll_item;
+ pa_rtpoll_item *inq_rtpoll_item_read, *inq_rtpoll_item_write;
+ pa_rtpoll_item *outq_rtpoll_item_read, *outq_rtpoll_item_write;
pa_memblockq *memblockq;
pa_usec_t total_latency;
+ pa_atomic_t max_request;
+
PA_LLIST_FIELDS(struct output);
};
@@ -113,45 +116,48 @@ struct userdata {
uint32_t adjust_time;
pa_bool_t automatic;
- size_t block_size;
- pa_hook_slot *sink_new_slot, *sink_unlink_slot, *sink_state_changed_slot;
+ pa_hook_slot *sink_put_slot, *sink_unlink_slot, *sink_state_changed_slot;
pa_resample_method_t resample_method;
struct timeval adjust_timestamp;
- struct output *master;
+ pa_usec_t block_usec;
+
pa_idxset* outputs; /* managed in main context */
struct {
PA_LLIST_HEAD(struct output, active_outputs); /* managed in IO thread context */
pa_atomic_t running; /* we cache that value here, so that every thread can query it cheaply */
- struct timeval timestamp;
+ pa_usec_t timestamp;
pa_bool_t in_null_mode;
+ pa_smoother *smoother;
+ uint64_t counter;
} thread_info;
};
enum {
SINK_MESSAGE_ADD_OUTPUT = PA_SINK_MESSAGE_MAX,
SINK_MESSAGE_REMOVE_OUTPUT,
- SINK_MESSAGE_NEED
+ SINK_MESSAGE_NEED,
+ SINK_MESSAGE_UPDATE_LATENCY,
+ SINK_MESSAGE_UPDATE_MAX_REQUEST
};
enum {
- SINK_INPUT_MESSAGE_POST = PA_SINK_INPUT_MESSAGE_MAX
+ SINK_INPUT_MESSAGE_POST = PA_SINK_INPUT_MESSAGE_MAX,
};
static void output_free(struct output *o);
static int output_create_sink_input(struct output *o);
-static void update_master(struct userdata *u, struct output *o);
-static void pick_master(struct userdata *u, struct output *except);
static void adjust_rates(struct userdata *u) {
struct output *o;
- pa_usec_t max_sink_latency = 0, min_total_latency = (pa_usec_t) -1, target_latency;
+ pa_usec_t max_sink_latency = 0, min_total_latency = (pa_usec_t) -1, target_latency, avg_total_latency = 0;
uint32_t base_rate;
uint32_t idx;
+ unsigned n = 0;
pa_assert(u);
pa_sink_assert_ref(u->sink);
@@ -159,57 +165,61 @@ static void adjust_rates(struct userdata *u) {
if (pa_idxset_size(u->outputs) <= 0)
return;
- if (!u->master)
- return;
-
- if (!PA_SINK_OPENED(pa_sink_get_state(u->sink)))
+ if (!PA_SINK_IS_OPENED(pa_sink_get_state(u->sink)))
return;
for (o = pa_idxset_first(u->outputs, &idx); o; o = pa_idxset_next(u->outputs, &idx)) {
pa_usec_t sink_latency;
- if (!o->sink_input || !PA_SINK_OPENED(pa_sink_get_state(o->sink)))
+ if (!o->sink_input || !PA_SINK_IS_OPENED(pa_sink_get_state(o->sink)))
continue;
- sink_latency = pa_sink_get_latency(o->sink);
- o->total_latency = sink_latency + pa_sink_input_get_latency(o->sink_input);
+ o->total_latency = pa_sink_input_get_latency(o->sink_input, &sink_latency);
+ o->total_latency += sink_latency;
if (sink_latency > max_sink_latency)
max_sink_latency = sink_latency;
if (min_total_latency == (pa_usec_t) -1 || o->total_latency < min_total_latency)
min_total_latency = o->total_latency;
+
+ avg_total_latency += o->total_latency;
+ n++;
}
if (min_total_latency == (pa_usec_t) -1)
return;
+ avg_total_latency /= n;
+
target_latency = max_sink_latency > min_total_latency ? max_sink_latency : min_total_latency;
- pa_log_info("[%s] target latency is %0.0f usec.", u->sink->name, (float) target_latency);
- pa_log_info("[%s] master %s latency %0.0f usec.", u->sink->name, u->master->sink->name, (float) u->master->total_latency);
+ pa_log_info("[%s] avg total latency is %0.2f msec.", u->sink->name, (double) avg_total_latency / PA_USEC_PER_MSEC);
+ pa_log_info("[%s] target latency is %0.2f msec.", u->sink->name, (double) target_latency / PA_USEC_PER_MSEC);
base_rate = u->sink->sample_spec.rate;
for (o = pa_idxset_first(u->outputs, &idx); o; o = pa_idxset_next(u->outputs, &idx)) {
uint32_t r = base_rate;
- if (!o->sink_input || !PA_SINK_OPENED(pa_sink_get_state(o->sink)))
+ if (!o->sink_input || !PA_SINK_IS_OPENED(pa_sink_get_state(o->sink)))
continue;
if (o->total_latency < target_latency)
- r -= (uint32_t) (((((double) target_latency - o->total_latency))/u->adjust_time)*r/PA_USEC_PER_SEC);
+ r -= (uint32_t) ((((double) (target_latency - o->total_latency))/(double)u->adjust_time)*(double)r/PA_USEC_PER_SEC);
else if (o->total_latency > target_latency)
- r += (uint32_t) (((((double) o->total_latency - target_latency))/u->adjust_time)*r/PA_USEC_PER_SEC);
+ r += (uint32_t) ((((double) (o->total_latency - target_latency))/(double)u->adjust_time)*(double)r/PA_USEC_PER_SEC);
if (r < (uint32_t) (base_rate*0.9) || r > (uint32_t) (base_rate*1.1)) {
- pa_log_warn("[%s] sample rates too different, not adjusting (%u vs. %u).", o->sink_input->name, base_rate, r);
+ pa_log_warn("[%s] sample rates too different, not adjusting (%u vs. %u).", pa_proplist_gets(o->sink_input->proplist, PA_PROP_MEDIA_NAME), base_rate, r);
pa_sink_input_set_rate(o->sink_input, base_rate);
} else {
- pa_log_info("[%s] new rate is %u Hz; ratio is %0.3f; latency is %0.0f usec.", o->sink_input->name, r, (double) r / base_rate, (float) o->total_latency);
+ pa_log_info("[%s] new rate is %u Hz; ratio is %0.3f; latency is %0.0f usec.", pa_proplist_gets(o->sink_input->proplist, PA_PROP_MEDIA_NAME), r, (double) r / base_rate, (float) o->total_latency);
pa_sink_input_set_rate(o->sink_input, r);
}
}
+
+ pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_UPDATE_LATENCY, NULL, (int64_t) avg_total_latency, NULL);
}
static void time_callback(pa_mainloop_api*a, pa_time_event* e, const struct timeval *tv, void *userdata) {
@@ -223,10 +233,40 @@ static void time_callback(pa_mainloop_api*a, pa_time_event* e, const struct time
adjust_rates(u);
pa_gettimeofday(&n);
- n.tv_sec += u->adjust_time;
+ n.tv_sec += (time_t) u->adjust_time;
u->sink->core->mainloop->time_restart(e, &n);
}
+static void process_render_null(struct userdata *u, pa_usec_t now) {
+ size_t ate = 0;
+ pa_assert(u);
+
+ if (u->thread_info.in_null_mode)
+ u->thread_info.timestamp = now;
+
+ while (u->thread_info.timestamp < now + u->block_usec) {
+ pa_memchunk chunk;
+
+ pa_sink_render(u->sink, u->sink->thread_info.max_request, &chunk);
+ pa_memblock_unref(chunk.memblock);
+
+ u->thread_info.counter += chunk.length;
+
+/* pa_log_debug("Ate %lu bytes.", (unsigned long) chunk.length); */
+ u->thread_info.timestamp += pa_bytes_to_usec(chunk.length, &u->sink->sample_spec);
+
+ ate += chunk.length;
+
+ if (ate >= u->sink->thread_info.max_request)
+ break;
+ }
+
+/* pa_log_debug("Ate in sum %lu bytes (of %lu)", (unsigned long) ate, (unsigned long) nbytes); */
+
+ pa_smoother_put(u->thread_info.smoother, now,
+ pa_bytes_to_usec(u->thread_info.counter, &u->sink->sample_spec) - (u->thread_info.timestamp - now));
+}
+
static void thread_func(void *userdata) {
struct userdata *u = userdata;
@@ -240,30 +280,27 @@ static void thread_func(void *userdata) {
pa_thread_mq_install(&u->thread_mq);
pa_rtpoll_install(u->rtpoll);
- pa_rtclock_get(&u->thread_info.timestamp);
+ u->thread_info.timestamp = pa_rtclock_usec();
u->thread_info.in_null_mode = FALSE;
for (;;) {
int ret;
- /* If no outputs are connected, render some data and drop it immediately. */
- if (u->sink->thread_info.state == PA_SINK_RUNNING && !u->thread_info.active_outputs) {
- struct timeval now;
-
- pa_rtclock_get(&now);
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
- if (!u->thread_info.in_null_mode || pa_timeval_cmp(&u->thread_info.timestamp, &now) <= 0) {
- pa_sink_skip(u->sink, u->block_size);
+ /* If no outputs are connected, render some data and drop it immediately. */
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && !u->thread_info.active_outputs) {
+ pa_usec_t now;
- if (!u->thread_info.in_null_mode)
- u->thread_info.timestamp = now;
+ now = pa_rtclock_usec();
- pa_timeval_add(&u->thread_info.timestamp, pa_bytes_to_usec(u->block_size, &u->sink->sample_spec));
- }
+ if (!u->thread_info.in_null_mode || u->thread_info.timestamp <= now)
+ process_render_null(u, now);
- pa_rtpoll_set_timer_absolute(u->rtpoll, &u->thread_info.timestamp);
+ pa_rtpoll_set_timer_absolute(u->rtpoll, u->thread_info.timestamp);
u->thread_info.in_null_mode = TRUE;
-
} else {
pa_rtpoll_set_timer_disabled(u->rtpoll);
u->thread_info.in_null_mode = FALSE;
@@ -295,7 +332,7 @@ static void render_memblock(struct userdata *u, struct output *o, size_t length)
pa_assert(o);
/* We are run by the sink thread, on behalf of an output (o). The
- * other output is waiting for us, hence it is safe to access its
+ * output is waiting for us, hence it is safe to access its
* mainblockq and asyncmsgq directly. */
/* If we are not running, we cannot produce any data */
@@ -315,6 +352,8 @@ static void render_memblock(struct userdata *u, struct output *o, size_t length)
/* Render data! */
pa_sink_render(u->sink, length, &chunk);
+ u->thread_info.counter += chunk.length;
+
/* OK, let's send this data to the other threads */
for (j = u->thread_info.active_outputs; j; j = j->next)
@@ -350,31 +389,59 @@ static void request_memblock(struct output *o, size_t length) {
/* OK, we need to prepare new data, but only if the sink is actually running */
if (pa_atomic_load(&o->userdata->thread_info.running))
- pa_asyncmsgq_send(o->outq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_NEED, o, length, NULL);
+ pa_asyncmsgq_send(o->outq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_NEED, o, (int64_t) length, NULL);
}
/* Called from I/O thread context */
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) {
struct output *o;
pa_sink_input_assert_ref(i);
pa_assert_se(o = i->userdata);
/* If necessary, get some new data */
- request_memblock(o, length);
+ request_memblock(o, nbytes);
+
+ if (pa_memblockq_peek(o->memblockq, chunk) < 0)
+ return -1;
+
+ pa_memblockq_drop(o->memblockq, chunk->length);
+ return 0;
+}
- return pa_memblockq_peek(o->memblockq, chunk);
+/* Called from I/O thread context */
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ struct output *o;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(o = i->userdata);
+
+ pa_memblockq_rewind(o->memblockq, nbytes);
}
/* Called from I/O thread context */
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
struct output *o;
pa_sink_input_assert_ref(i);
- pa_assert(length > 0);
pa_assert_se(o = i->userdata);
- pa_memblockq_drop(o->memblockq, length);
+ pa_memblockq_set_maxrewind(o->memblockq, nbytes);
+}
+
+/* Called from I/O thread context */
+static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
+ struct output *o;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(o = i->userdata);
+
+ if (pa_atomic_load(&o->max_request) == (int) nbytes)
+ return;
+
+ pa_atomic_store(&o->max_request, (int) nbytes);
+
+ pa_asyncmsgq_post(o->outq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_UPDATE_MAX_REQUEST, NULL, 0, NULL, NULL);
}
/* Called from I/O thread context */
@@ -385,11 +452,17 @@ static void sink_input_attach_cb(pa_sink_input *i) {
pa_assert_se(o = i->userdata);
/* Set up the queue from the sink thread to us */
- pa_assert(!o->inq_rtpoll_item);
- o->inq_rtpoll_item = pa_rtpoll_item_new_asyncmsgq(
+ pa_assert(!o->inq_rtpoll_item_read && !o->outq_rtpoll_item_write);
+
+ o->inq_rtpoll_item_read = pa_rtpoll_item_new_asyncmsgq_read(
i->sink->rtpoll,
PA_RTPOLL_LATE, /* This one is not that important, since we check for data in _peek() anyway. */
o->inq);
+
+ o->outq_rtpoll_item_write = pa_rtpoll_item_new_asyncmsgq_write(
+ i->sink->rtpoll,
+ PA_RTPOLL_EARLY,
+ o->outq);
}
/* Called from I/O thread context */
@@ -400,9 +473,13 @@ static void sink_input_detach_cb(pa_sink_input *i) {
pa_assert_se(o = i->userdata);
/* Shut down the queue from the sink thread to us */
- pa_assert(o->inq_rtpoll_item);
- pa_rtpoll_item_free(o->inq_rtpoll_item);
- o->inq_rtpoll_item = NULL;
+ pa_assert(o->inq_rtpoll_item_read && o->outq_rtpoll_item_write);
+
+ pa_rtpoll_item_free(o->inq_rtpoll_item_read);
+ o->inq_rtpoll_item_read = NULL;
+
+ pa_rtpoll_item_free(o->outq_rtpoll_item_write);
+ o->outq_rtpoll_item_write = NULL;
}
/* Called from main context */
@@ -412,10 +489,24 @@ static void sink_input_kill_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert(o = i->userdata);
- pa_module_unload_request(o->userdata->module);
+ pa_module_unload_request(o->userdata->module, TRUE);
output_free(o);
}
+/* Called from IO thread context */
+static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
+
+ /* If we are added for the first time, ask for a rewinding so that
+ * we are heard right-away. */
+ if (PA_SINK_INPUT_IS_LINKED(state) &&
+ i->thread_info.state == PA_SINK_INPUT_INIT)
+ pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
+}
+
/* Called from thread context */
static int sink_input_process_msg(pa_msgobject *obj, int code, void *data, int64_t offset, pa_memchunk *chunk) {
struct output *o = PA_SINK_INPUT(obj)->userdata;
@@ -434,12 +525,12 @@ static int sink_input_process_msg(pa_msgobject *obj, int code, void *data, int64
case SINK_INPUT_MESSAGE_POST:
- if (PA_SINK_OPENED(o->sink_input->sink->thread_info.state))
+ if (PA_SINK_IS_OPENED(o->sink_input->sink->thread_info.state))
pa_memblockq_push_align(o->memblockq, chunk);
else
- pa_memblockq_flush(o->memblockq);
+ pa_memblockq_flush_write(o->memblockq);
- break;
+ return 0;
}
return pa_sink_input_process_msg(obj, code, data, offset, chunk);
@@ -452,11 +543,10 @@ static void disable_output(struct output *o) {
if (!o->sink_input)
return;
- pa_asyncmsgq_send(o->userdata->sink->asyncmsgq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_REMOVE_OUTPUT, o, 0, NULL);
pa_sink_input_unlink(o->sink_input);
+ pa_asyncmsgq_send(o->userdata->sink->asyncmsgq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_REMOVE_OUTPUT, o, 0, NULL);
pa_sink_input_unref(o->sink_input);
o->sink_input = NULL;
-
}
/* Called from main context */
@@ -468,11 +558,11 @@ static void enable_output(struct output *o) {
if (output_create_sink_input(o) >= 0) {
- pa_memblockq_flush(o->memblockq);
+ pa_memblockq_flush_write(o->memblockq);
pa_sink_input_put(o->sink_input);
- if (o->userdata->sink && PA_SINK_LINKED(pa_sink_get_state(o->userdata->sink)))
+ if (o->userdata->sink && PA_SINK_IS_LINKED(pa_sink_get_state(o->userdata->sink)))
pa_asyncmsgq_send(o->userdata->sink->asyncmsgq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_ADD_OUTPUT, o, 0, NULL);
}
}
@@ -488,8 +578,6 @@ static void suspend(struct userdata *u) {
for (o = pa_idxset_first(u->outputs, &idx); o; o = pa_idxset_next(u->outputs, &idx))
disable_output(o);
- pick_master(u, NULL);
-
pa_log_info("Device suspended...");
}
@@ -505,12 +593,10 @@ static void unsuspend(struct userdata *u) {
pa_sink_suspend(o->sink, FALSE);
- if (PA_SINK_OPENED(pa_sink_get_state(o->sink)))
+ if (PA_SINK_IS_OPENED(pa_sink_get_state(o->sink)))
enable_output(o);
}
- pick_master(u, NULL);
-
pa_log_info("Resumed successfully...");
}
@@ -526,7 +612,7 @@ static int sink_set_state(pa_sink *sink, pa_sink_state_t state) {
switch (state) {
case PA_SINK_SUSPENDED:
- pa_assert(PA_SINK_OPENED(pa_sink_get_state(u->sink)));
+ pa_assert(PA_SINK_IS_OPENED(pa_sink_get_state(u->sink)));
suspend(u);
break;
@@ -547,7 +633,25 @@ static int sink_set_state(pa_sink *sink, pa_sink_state_t state) {
return 0;
}
-/* Called from thread context of the master */
+/* Called from IO context */
+static void update_max_request(struct userdata *u) {
+ size_t max_request = 0;
+ struct output *o;
+
+ for (o = u->thread_info.active_outputs; o; o = o->next) {
+ size_t mr = (size_t) pa_atomic_load(&o->max_request);
+
+ if (mr > max_request)
+ max_request = mr;
+ }
+
+ if (max_request <= 0)
+ max_request = pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec);
+
+ pa_sink_set_max_request(u->sink, max_request);
+}
+
+/* Called from thread context of the io thread */
static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
struct userdata *u = PA_SINK(o)->userdata;
@@ -555,41 +659,47 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
case PA_SINK_MESSAGE_SET_STATE:
pa_atomic_store(&u->thread_info.running, PA_PTR_TO_UINT(data) == PA_SINK_RUNNING);
- break;
- case PA_SINK_MESSAGE_GET_LATENCY:
+ if (PA_PTR_TO_UINT(data) == PA_SINK_SUSPENDED)
+ pa_smoother_pause(u->thread_info.smoother, pa_rtclock_usec());
+ else
+ pa_smoother_resume(u->thread_info.smoother, pa_rtclock_usec());
- /* This code will only be called when running in NULL
- * mode, i.e. when no output is attached. See
- * sink_get_latency_cb() below */
+ break;
- if (u->thread_info.in_null_mode) {
- struct timeval now;
+ case PA_SINK_MESSAGE_GET_LATENCY: {
+ pa_usec_t x, y, c, *delay = data;
- if (pa_timeval_cmp(&u->thread_info.timestamp, pa_rtclock_get(&now)) > 0) {
- *((pa_usec_t*) data) = pa_timeval_diff(&u->thread_info.timestamp, &now);
- break;
- }
- }
+ x = pa_rtclock_usec();
+ y = pa_smoother_get(u->thread_info.smoother, x);
- *((pa_usec_t*) data) = 0;
+ c = pa_bytes_to_usec(u->thread_info.counter, &u->sink->sample_spec);
- break;
+ if (y < c)
+ *delay = c - y;
+ else
+ *delay = 0;
+
+ return 0;
+ }
case SINK_MESSAGE_ADD_OUTPUT: {
struct output *op = data;
PA_LLIST_PREPEND(struct output, u->thread_info.active_outputs, op);
- pa_assert(!op->outq_rtpoll_item);
-
- /* Create pa_asyncmsgq to the sink thread */
+ pa_assert(!op->outq_rtpoll_item_read && !op->inq_rtpoll_item_write);
- op->outq_rtpoll_item = pa_rtpoll_item_new_asyncmsgq(
+ op->outq_rtpoll_item_read = pa_rtpoll_item_new_asyncmsgq_read(
u->rtpoll,
PA_RTPOLL_EARLY-1, /* This item is very important */
op->outq);
+ op->inq_rtpoll_item_write = pa_rtpoll_item_new_asyncmsgq_write(
+ u->rtpoll,
+ PA_RTPOLL_EARLY,
+ op->inq);
+ update_max_request(u);
return 0;
}
@@ -598,56 +708,48 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
PA_LLIST_REMOVE(struct output, u->thread_info.active_outputs, op);
- /* Remove the q that leads from this output to the sink thread */
+ pa_assert(op->outq_rtpoll_item_read && op->inq_rtpoll_item_write);
- pa_assert(op->outq_rtpoll_item);
- pa_rtpoll_item_free(op->outq_rtpoll_item);
- op->outq_rtpoll_item = NULL;
+ pa_rtpoll_item_free(op->outq_rtpoll_item_read);
+ op->outq_rtpoll_item_read = NULL;
+ pa_rtpoll_item_free(op->inq_rtpoll_item_write);
+ op->inq_rtpoll_item_write = NULL;
+
+ update_max_request(u);
return 0;
}
case SINK_MESSAGE_NEED:
- render_memblock(u, data, (size_t) offset);
+ render_memblock(u, (struct output*) data, (size_t) offset);
return 0;
- }
- return pa_sink_process_msg(o, code, data, offset, chunk);
-}
+ case SINK_MESSAGE_UPDATE_LATENCY: {
+ pa_usec_t x, y, latency = (pa_usec_t) offset;
-/* Called from main context */
-static pa_usec_t sink_get_latency_cb(pa_sink *s) {
- struct userdata *u;
+ x = pa_rtclock_usec();
+ y = pa_bytes_to_usec(u->thread_info.counter, &u->sink->sample_spec);
- pa_sink_assert_ref(s);
- pa_assert_se(u = s->userdata);
-
- if (u->master) {
- /* If we have a master sink, we just return the latency of it
- * and add our own buffering on top */
+ if (y > latency)
+ y -= latency;
+ else
+ y = 0;
- if (!u->master->sink_input)
+ pa_smoother_put(u->thread_info.smoother, x, y);
return 0;
+ }
- return
- pa_sink_input_get_latency(u->master->sink_input) +
- pa_sink_get_latency(u->master->sink);
-
- } else {
- pa_usec_t usec = 0;
-
- /* We have no master, hence let's ask our own thread which
- * implements the NULL sink */
-
- if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
- return 0;
+ case SINK_MESSAGE_UPDATE_MAX_REQUEST:
- return usec;
+ update_max_request(u);
+ break;
}
+
+ return pa_sink_process_msg(o, code, data, offset, chunk);
}
static void update_description(struct userdata *u) {
- int first = 1;
+ pa_bool_t first = TRUE;
char *t;
struct output *o;
uint32_t idx;
@@ -665,10 +767,10 @@ static void update_description(struct userdata *u) {
char *e;
if (first) {
- e = pa_sprintf_malloc("%s %s", t, o->sink->description);
- first = 0;
+ e = pa_sprintf_malloc("%s %s", t, pa_strnull(pa_proplist_gets(o->sink->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+ first = FALSE;
} else
- e = pa_sprintf_malloc("%s, %s", t, o->sink->description);
+ e = pa_sprintf_malloc("%s, %s", t, pa_strnull(pa_proplist_gets(o->sink->proplist, PA_PROP_DEVICE_DESCRIPTION)));
pa_xfree(t);
t = e;
@@ -678,57 +780,19 @@ static void update_description(struct userdata *u) {
pa_xfree(t);
}
-static void update_master(struct userdata *u, struct output *o) {
- pa_assert(u);
-
- if (u->master == o)
- return;
-
- if ((u->master = o))
- pa_log_info("Master sink is now '%s'", o->sink_input->sink->name);
- else
- pa_log_info("No master selected, lacking suitable outputs.");
-}
-
-static void pick_master(struct userdata *u, struct output *except) {
- struct output *o;
- uint32_t idx;
- pa_assert(u);
-
- if (u->master &&
- u->master != except &&
- u->master->sink_input &&
- PA_SINK_OPENED(pa_sink_get_state(u->master->sink))) {
- update_master(u, u->master);
- return;
- }
-
- for (o = pa_idxset_first(u->outputs, &idx); o; o = pa_idxset_next(u->outputs, &idx))
- if (o != except &&
- o->sink_input &&
- PA_SINK_OPENED(pa_sink_get_state(o->sink))) {
- update_master(u, o);
- return;
- }
-
- update_master(u, NULL);
-}
-
static int output_create_sink_input(struct output *o) {
pa_sink_input_new_data data;
- char *t;
pa_assert(o);
if (o->sink_input)
return 0;
- t = pa_sprintf_malloc("Simultaneous output on %s", o->sink->description);
-
pa_sink_input_new_data_init(&data);
data.sink = o->sink;
data.driver = __FILE__;
- data.name = t;
+ pa_proplist_setf(data.proplist, PA_PROP_MEDIA_NAME, "Simultaneous output on %s", pa_strnull(pa_proplist_gets(o->sink->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+ pa_proplist_sets(data.proplist, PA_PROP_MEDIA_ROLE, "filter");
pa_sink_input_new_data_set_sample_spec(&data, &o->userdata->sink->sample_spec);
pa_sink_input_new_data_set_channel_map(&data, &o->userdata->sink->channel_map);
data.module = o->userdata->module;
@@ -736,25 +800,30 @@ static int output_create_sink_input(struct output *o) {
o->sink_input = pa_sink_input_new(o->userdata->core, &data, PA_SINK_INPUT_VARIABLE_RATE|PA_SINK_INPUT_DONT_MOVE);
- pa_xfree(t);
+ pa_sink_input_new_data_done(&data);
if (!o->sink_input)
return -1;
o->sink_input->parent.process_msg = sink_input_process_msg;
- o->sink_input->peek = sink_input_peek_cb;
- o->sink_input->drop = sink_input_drop_cb;
+ o->sink_input->pop = sink_input_pop_cb;
+ o->sink_input->process_rewind = sink_input_process_rewind_cb;
+ o->sink_input->state_change = sink_input_state_change_cb;
+ o->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
+ o->sink_input->update_max_request = sink_input_update_max_request_cb;
o->sink_input->attach = sink_input_attach_cb;
o->sink_input->detach = sink_input_detach_cb;
o->sink_input->kill = sink_input_kill_cb;
o->sink_input->userdata = o;
+ pa_sink_input_set_requested_latency(o->sink_input, REQUEST_LATENCY_USEC);
return 0;
}
static struct output *output_new(struct userdata *u, pa_sink *sink) {
struct output *o;
+ pa_sink_state_t state;
pa_assert(u);
pa_assert(sink);
@@ -764,8 +833,8 @@ static struct output *output_new(struct userdata *u, pa_sink *sink) {
o->userdata = u;
o->inq = pa_asyncmsgq_new(0);
o->outq = pa_asyncmsgq_new(0);
- o->inq_rtpoll_item = NULL;
- o->outq_rtpoll_item = NULL;
+ o->inq_rtpoll_item_write = o->inq_rtpoll_item_read = NULL;
+ o->outq_rtpoll_item_write = o->outq_rtpoll_item_read = NULL;
o->sink = sink;
o->sink_input = NULL;
o->memblockq = pa_memblockq_new(
@@ -775,31 +844,39 @@ static struct output *output_new(struct userdata *u, pa_sink *sink) {
pa_frame_size(&u->sink->sample_spec),
1,
0,
+ 0,
NULL);
+ pa_atomic_store(&o->max_request, 0);
+ PA_LLIST_INIT(struct output, o);
pa_assert_se(pa_idxset_put(u->outputs, o, NULL) == 0);
- if (u->sink && PA_SINK_LINKED(pa_sink_get_state(u->sink)))
+ state = pa_sink_get_state(u->sink);
+
+ if (state != PA_SINK_INIT)
pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_ADD_OUTPUT, o, 0, NULL);
else {
/* If the sink is not yet started, we need to do the activation ourselves */
PA_LLIST_PREPEND(struct output, u->thread_info.active_outputs, o);
- o->outq_rtpoll_item = pa_rtpoll_item_new_asyncmsgq(
+ o->outq_rtpoll_item_read = pa_rtpoll_item_new_asyncmsgq_read(
u->rtpoll,
PA_RTPOLL_EARLY-1, /* This item is very important */
o->outq);
+ o->inq_rtpoll_item_write = pa_rtpoll_item_new_asyncmsgq_write(
+ u->rtpoll,
+ PA_RTPOLL_EARLY,
+ o->inq);
}
- if (PA_SINK_OPENED(pa_sink_get_state(u->sink)) || pa_sink_get_state(u->sink) == PA_SINK_INIT) {
+ if (PA_SINK_IS_OPENED(state) || state == PA_SINK_INIT) {
pa_sink_suspend(sink, FALSE);
- if (PA_SINK_OPENED(pa_sink_get_state(sink)))
+ if (PA_SINK_IS_OPENED(pa_sink_get_state(sink)))
if (output_create_sink_input(o) < 0)
goto fail;
}
-
update_description(u);
return o;
@@ -829,7 +906,25 @@ fail:
return NULL;
}
-static pa_hook_result_t sink_new_hook_cb(pa_core *c, pa_sink *s, struct userdata* u) {
+static pa_bool_t is_suitable_sink(struct userdata *u, pa_sink *s) {
+ const char *t;
+
+ pa_sink_assert_ref(s);
+
+ if (!(s->flags & PA_SINK_HARDWARE))
+ return FALSE;
+
+ if (s == u->sink)
+ return FALSE;
+
+ if ((t = pa_proplist_gets(s->proplist, PA_PROP_DEVICE_CLASS)))
+ if (strcmp(t, "sound"))
+ return FALSE;
+
+ return TRUE;
+}
+
+static pa_hook_result_t sink_put_hook_cb(pa_core *c, pa_sink *s, struct userdata* u) {
struct output *o;
pa_core_assert_ref(c);
@@ -837,7 +932,7 @@ static pa_hook_result_t sink_new_hook_cb(pa_core *c, pa_sink *s, struct userdata
pa_assert(u);
pa_assert(u->automatic);
- if (!(s->flags & PA_SINK_HARDWARE) || s == u->sink)
+ if (!is_suitable_sink(u, s))
return PA_HOOK_OK;
pa_log_info("Configuring new sink: %s", s->name);
@@ -850,27 +945,34 @@ static pa_hook_result_t sink_new_hook_cb(pa_core *c, pa_sink *s, struct userdata
if (o->sink_input)
pa_sink_input_put(o->sink_input);
- pick_master(u, NULL);
-
return PA_HOOK_OK;
}
-static pa_hook_result_t sink_unlink_hook_cb(pa_core *c, pa_sink *s, struct userdata* u) {
+static struct output* find_output(struct userdata *u, pa_sink *s) {
struct output *o;
uint32_t idx;
- pa_assert(c);
- pa_sink_assert_ref(s);
pa_assert(u);
+ pa_assert(s);
- if (s == u->sink)
- return PA_HOOK_OK;
+ if (u->sink == s)
+ return NULL;
for (o = pa_idxset_first(u->outputs, &idx); o; o = pa_idxset_next(u->outputs, &idx))
if (o->sink == s)
- break;
+ return o;
+
+ return NULL;
+}
+
+static pa_hook_result_t sink_unlink_hook_cb(pa_core *c, pa_sink *s, struct userdata* u) {
+ struct output *o;
- if (!o)
+ pa_assert(c);
+ pa_sink_assert_ref(s);
+ pa_assert(u);
+
+ if (!(o = find_output(u, s)))
return PA_HOOK_OK;
pa_log_info("Unconfiguring sink: %s", s->name);
@@ -882,30 +984,18 @@ static pa_hook_result_t sink_unlink_hook_cb(pa_core *c, pa_sink *s, struct userd
static pa_hook_result_t sink_state_changed_hook_cb(pa_core *c, pa_sink *s, struct userdata* u) {
struct output *o;
- uint32_t idx;
pa_sink_state_t state;
- if (s == u->sink)
- return PA_HOOK_OK;
-
- for (o = pa_idxset_first(u->outputs, &idx); o; o = pa_idxset_next(u->outputs, &idx))
- if (o->sink == s)
- break;
-
- if (!o)
+ if (!(o = find_output(u, s)))
return PA_HOOK_OK;
state = pa_sink_get_state(s);
- if (PA_SINK_OPENED(state) && PA_SINK_OPENED(pa_sink_get_state(u->sink)) && !o->sink_input) {
+ if (PA_SINK_IS_OPENED(state) && PA_SINK_IS_OPENED(pa_sink_get_state(u->sink)) && !o->sink_input)
enable_output(o);
- pick_master(u, NULL);
- }
- if (state == PA_SINK_SUSPENDED && o->sink_input) {
+ if (state == PA_SINK_SUSPENDED && o->sink_input)
disable_output(o);
- pick_master(u, o);
- }
return PA_HOOK_OK;
}
@@ -913,13 +1003,13 @@ static pa_hook_result_t sink_state_changed_hook_cb(pa_core *c, pa_sink *s, struc
int pa__init(pa_module*m) {
struct userdata *u;
pa_modargs *ma = NULL;
- const char *master_name, *slaves, *rm;
- pa_sink *master_sink = NULL;
+ const char *slaves, *rm;
int resample_method = PA_RESAMPLER_TRIVIAL;
pa_sample_spec ss;
pa_channel_map map;
struct output *o;
uint32_t idx;
+ pa_sink_new_data data;
pa_assert(m);
@@ -935,111 +1025,85 @@ int pa__init(pa_module*m) {
}
}
- u = pa_xnew(struct userdata, 1);
+ m->userdata = u = pa_xnew(struct userdata, 1);
u->core = m->core;
u->module = m;
- m->userdata = u;
u->sink = NULL;
- u->master = NULL;
u->time_event = NULL;
u->adjust_time = DEFAULT_ADJUST_TIME;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
u->thread = NULL;
u->resample_method = resample_method;
u->outputs = pa_idxset_new(NULL, NULL);
memset(&u->adjust_timestamp, 0, sizeof(u->adjust_timestamp));
- u->sink_new_slot = u->sink_unlink_slot = u->sink_state_changed_slot = NULL;
+ u->sink_put_slot = u->sink_unlink_slot = u->sink_state_changed_slot = NULL;
PA_LLIST_HEAD_INIT(struct output, u->thread_info.active_outputs);
pa_atomic_store(&u->thread_info.running, FALSE);
u->thread_info.in_null_mode = FALSE;
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ u->thread_info.counter = 0;
+ u->thread_info.smoother = pa_smoother_new(PA_USEC_PER_SEC, PA_USEC_PER_SEC*2, TRUE, 10);
if (pa_modargs_get_value_u32(ma, "adjust_time", &u->adjust_time) < 0) {
pa_log("Failed to parse adjust_time value");
goto fail;
}
- master_name = pa_modargs_get_value(ma, "master", NULL);
slaves = pa_modargs_get_value(ma, "slaves", NULL);
- if (!master_name != !slaves) {
- pa_log("No master or slave sinks specified");
- goto fail;
- }
-
- if (master_name) {
- if (!(master_sink = pa_namereg_get(m->core, master_name, PA_NAMEREG_SINK, 1))) {
- pa_log("Invalid master sink '%s'", master_name);
- goto fail;
- }
-
- ss = master_sink->sample_spec;
- u->automatic = FALSE;
- } else {
- master_sink = NULL;
- ss = m->core->default_sample_spec;
- u->automatic = TRUE;
- }
+ u->automatic = !slaves;
+ ss = m->core->default_sample_spec;
- if ((pa_modargs_get_sample_spec(ma, &ss) < 0)) {
+ if ((pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0)) {
pa_log("Invalid sample specification.");
goto fail;
}
- if (master_sink && ss.channels == master_sink->sample_spec.channels)
- map = master_sink->channel_map;
- else {
- pa_assert_se(pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_AUX));
- pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_DEFAULT);
- }
+ pa_sink_new_data_init(&data);
+ data.namereg_fail = FALSE;
+ data.driver = __FILE__;
+ data.module = m;
+ pa_sink_new_data_set_name(&data, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME));
+ pa_sink_new_data_set_sample_spec(&data, &ss);
+ pa_sink_new_data_set_channel_map(&data, &map);
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Simultaneous Output");
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_CLASS, "filter");
- if ((pa_modargs_get_channel_map(ma, NULL, &map) < 0)) {
- pa_log("Invalid channel map.");
- goto fail;
- }
+ if (slaves)
+ pa_proplist_sets(data.proplist, "combine.slaves", slaves);
- if (ss.channels != map.channels) {
- pa_log("Channel map and sample specification don't match.");
- goto fail;
- }
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY);
+ pa_sink_new_data_done(&data);
- if (!(u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) {
+ if (!u->sink) {
pa_log("Failed to create sink");
goto fail;
}
u->sink->parent.process_msg = sink_process_msg;
- u->sink->get_latency = sink_get_latency_cb;
u->sink->set_state = sink_set_state;
u->sink->userdata = u;
- u->sink->flags = PA_SINK_LATENCY;
- pa_sink_set_module(u->sink, m);
- pa_sink_set_description(u->sink, "Simultaneous output");
pa_sink_set_rtpoll(u->sink, u->rtpoll);
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
- u->block_size = pa_bytes_per_second(&ss) / 20; /* 50 ms */
- if (u->block_size <= 0)
- u->block_size = pa_frame_size(&ss);
+ pa_sink_set_latency_range(u->sink, REQUEST_LATENCY_USEC, REQUEST_LATENCY_USEC);
+ u->block_usec = u->sink->thread_info.max_latency;
+
+ u->sink->thread_info.max_request =
+ pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec);
if (!u->automatic) {
const char*split_state;
char *n = NULL;
pa_assert(slaves);
- /* The master and slaves have been specified manually */
-
- if (!(u->master = output_new(u, master_sink))) {
- pa_log("Failed to create master sink input on sink '%s'.", master_sink->name);
- goto fail;
- }
+ /* The slaves have been specified manually */
split_state = NULL;
while ((n = pa_split(slaves, ",", &split_state))) {
pa_sink *slave_sink;
- if (!(slave_sink = pa_namereg_get(m->core, n, PA_NAMEREG_SINK, 1)) || slave_sink == u->sink) {
+ if (!(slave_sink = pa_namereg_get(m->core, n, PA_NAMEREG_SINK, TRUE)) || slave_sink == u->sink) {
pa_log("Invalid slave sink '%s'", n);
pa_xfree(n);
goto fail;
@@ -1056,17 +1120,16 @@ int pa__init(pa_module*m) {
if (pa_idxset_size(u->outputs) <= 1)
pa_log_warn("No slave sinks specified.");
- u->sink_new_slot = NULL;
+ u->sink_put_slot = NULL;
} else {
pa_sink *s;
- /* We're in automatic mode, we elect one hw sink to the master
- * and attach all other hw sinks as slaves to it */
+ /* We're in automatic mode, we add every sink that matches our needs */
for (s = pa_idxset_first(m->core->sinks, &idx); s; s = pa_idxset_next(m->core->sinks, &idx)) {
- if (!(s->flags & PA_SINK_HARDWARE) || s == u->sink)
+ if (!is_suitable_sink(u, s))
continue;
if (!output_new(u, s)) {
@@ -1075,13 +1138,11 @@ int pa__init(pa_module*m) {
}
}
- u->sink_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_NEW_POST], (pa_hook_cb_t) sink_new_hook_cb, u);
+ u->sink_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_LATE, (pa_hook_cb_t) sink_put_hook_cb, u);
}
- u->sink_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK], (pa_hook_cb_t) sink_unlink_hook_cb, u);
- u->sink_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_STATE_CHANGED], (pa_hook_cb_t) sink_state_changed_hook_cb, u);
-
- pick_master(u, NULL);
+ u->sink_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK], PA_HOOK_EARLY, (pa_hook_cb_t) sink_unlink_hook_cb, u);
+ u->sink_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_STATE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) sink_state_changed_hook_cb, u);
if (!(u->thread = pa_thread_new(thread_func, u))) {
pa_log("Failed to create thread.");
@@ -1098,7 +1159,7 @@ int pa__init(pa_module*m) {
if (u->adjust_time > 0) {
struct timeval tv;
pa_gettimeofday(&tv);
- tv.tv_sec += u->adjust_time;
+ tv.tv_sec += (time_t) u->adjust_time;
u->time_event = m->core->mainloop->time_new(m->core->mainloop, &tv, time_callback, u);
}
@@ -1119,19 +1180,21 @@ fail:
static void output_free(struct output *o) {
pa_assert(o);
- pick_master(o->userdata, o);
-
disable_output(o);
pa_assert_se(pa_idxset_remove_by_data(o->userdata->outputs, o, NULL));
update_description(o->userdata);
- if (o->inq_rtpoll_item)
- pa_rtpoll_item_free(o->inq_rtpoll_item);
+ if (o->inq_rtpoll_item_read)
+ pa_rtpoll_item_free(o->inq_rtpoll_item_read);
+ if (o->inq_rtpoll_item_write)
+ pa_rtpoll_item_free(o->inq_rtpoll_item_write);
- if (o->outq_rtpoll_item)
- pa_rtpoll_item_free(o->outq_rtpoll_item);
+ if (o->outq_rtpoll_item_read)
+ pa_rtpoll_item_free(o->outq_rtpoll_item_read);
+ if (o->outq_rtpoll_item_write)
+ pa_rtpoll_item_free(o->outq_rtpoll_item_write);
if (o->inq)
pa_asyncmsgq_unref(o->inq);
@@ -1154,8 +1217,8 @@ void pa__done(pa_module*m) {
if (!(u = m->userdata))
return;
- if (u->sink_new_slot)
- pa_hook_slot_free(u->sink_new_slot);
+ if (u->sink_put_slot)
+ pa_hook_slot_free(u->sink_put_slot);
if (u->sink_unlink_slot)
pa_hook_slot_free(u->sink_unlink_slot);
@@ -1189,5 +1252,8 @@ void pa__done(pa_module*m) {
if (u->time_event)
u->core->mainloop->time_free(u->time_event);
+ if (u->thread_info.smoother)
+ pa_smoother_free(u->thread_info.smoother);
+
pa_xfree(u);
}
diff --git a/src/modules/module-console-kit-symdef.h b/src/modules/module-console-kit-symdef.h
new file mode 100644
index 0000000..693aa5b
--- /dev/null
+++ b/src/modules/module-console-kit-symdef.h
@@ -0,0 +1,25 @@
+#ifndef foomoduleconsolekitsymdeffoo
+#define foomoduleconsolekitsymdeffoo
+
+#include <pulsecore/core.h>
+#include <pulsecore/module.h>
+#include <pulsecore/macro.h>
+
+#define pa__init module_console_kit_LTX_pa__init
+#define pa__done module_console_kit_LTX_pa__done
+#define pa__get_author module_console_kit_LTX_pa__get_author
+#define pa__get_description module_console_kit_LTX_pa__get_description
+#define pa__get_usage module_console_kit_LTX_pa__get_usage
+#define pa__get_version module_console_kit_LTX_pa__get_version
+#define pa__load_once module_console_kit_LTX_pa__load_once
+
+int pa__init(pa_module*m);
+void pa__done(pa_module*m);
+
+const char* pa__get_author(void);
+const char* pa__get_description(void);
+const char* pa__get_usage(void);
+const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
+
+#endif
diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
new file mode 100644
index 0000000..e1933c2
--- /dev/null
+++ b/src/modules/module-console-kit.c
@@ -0,0 +1,359 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <pulse/xmalloc.h>
+#include <pulse/timeval.h>
+
+#include <pulsecore/core-error.h>
+#include <pulsecore/module.h>
+#include <pulsecore/log.h>
+#include <pulsecore/hashmap.h>
+#include <pulsecore/idxset.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/namereg.h>
+#include <pulsecore/core-scache.h>
+#include <pulsecore/modargs.h>
+
+#include "dbus-util.h"
+#include "module-console-kit-symdef.h"
+
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Create a client for each ConsoleKit session of this user");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+
+static const char* const valid_modargs[] = {
+ NULL
+};
+
+struct session {
+ char *id;
+ pa_client *client;
+};
+
+struct userdata {
+ pa_core *core;
+ pa_dbus_connection *connection;
+ pa_hashmap *sessions;
+};
+
+static void add_session(struct userdata *u, const char *id) {
+ DBusError error;
+ DBusMessage *m = NULL, *reply = NULL;
+ uint32_t uid;
+ struct session *session;
+ char *t;
+
+ dbus_error_init (&error);
+
+ if (pa_hashmap_get(u->sessions, id)) {
+ pa_log_warn("Duplicate session %s, ignoring.", id);
+ return;
+ }
+
+ if (!(m = dbus_message_new_method_call("org.freedesktop.ConsoleKit", id, "org.freedesktop.ConsoleKit.Session", "GetUnixUser"))) {
+ pa_log("Failed to allocate GetUnixUser() method call.");
+ goto fail;
+ }
+
+ if (!(reply = dbus_connection_send_with_reply_and_block(pa_dbus_connection_get(u->connection), m, -1, &error))) {
+ pa_log("GetUnixUser() call failed: %s: %s", error.name, error.message);
+ goto fail;
+ }
+
+ /* CK 0.3 this changed from int32 to uint32 */
+ if (!dbus_message_get_args(reply, &error, DBUS_TYPE_UINT32, &uid, DBUS_TYPE_INVALID)) {
+ dbus_error_free(&error);
+
+ if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &uid, DBUS_TYPE_INVALID)) {
+ pa_log("Failed to parse GetUnixUser() result: %s: %s", error.name, error.message);
+ goto fail;
+ }
+ }
+
+ /* We only care about our own sessions */
+ if ((uid_t) uid != getuid())
+ goto fail;
+
+ session = pa_xnew(struct session, 1);
+ session->id = pa_xstrdup(id);
+
+ t = pa_sprintf_malloc("ConsoleKit Session %s", id);
+ session->client = pa_client_new(u->core, __FILE__, t);
+ pa_xfree(t);
+
+ pa_proplist_sets(session->client->proplist, "console-kit.session", id);
+
+ pa_hashmap_put(u->sessions, session->id, session);
+
+ pa_log_debug("Added new session %s", id);
+
+fail:
+
+ if (m)
+ dbus_message_unref(m);
+
+ if (reply)
+ dbus_message_unref(reply);
+
+ dbus_error_free(&error);
+}
+
+static void free_session(struct session *session) {
+ pa_assert(session);
+
+ pa_log_debug("Removing session %s", session->id);
+
+ pa_client_free(session->client);
+ pa_xfree(session->id);
+ pa_xfree(session);
+}
+
+static void remove_session(struct userdata *u, const char *id) {
+ struct session *session;
+
+ if (!(session = pa_hashmap_remove(u->sessions, id)))
+ return;
+
+ free_session(session);
+}
+
+static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, void *userdata) {
+ struct userdata *u = userdata;
+ DBusError error;
+ const char *path;
+
+ pa_assert(bus);
+ pa_assert(message);
+ pa_assert(u);
+
+ dbus_error_init(&error);
+
+ pa_log_debug("dbus: interface=%s, path=%s, member=%s\n",
+ dbus_message_get_interface(message),
+ dbus_message_get_path(message),
+ dbus_message_get_member(message));
+
+ if (dbus_message_is_signal(message, "org.freedesktop.ConsoleKit.Seat", "SessionAdded")) {
+
+ /* CK API changed to match spec in 0.3 */
+ if (!dbus_message_get_args(message, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) {
+ dbus_error_free(&error);
+
+ if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID)) {
+ pa_log_error("Failed to parse SessionAdded message: %s: %s", error.name, error.message);
+ goto finish;
+ }
+ }
+
+ add_session(u, path);
+ return DBUS_HANDLER_RESULT_HANDLED;
+
+ } else if (dbus_message_is_signal(message, "org.freedesktop.ConsoleKit.Seat", "SessionRemoved")) {
+
+ /* CK API changed to match spec in 0.3 */
+ if (!dbus_message_get_args(message, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) {
+ dbus_error_free(&error);
+
+ if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID)) {
+ pa_log_error("Failed to parse SessionRemoved message: %s: %s", error.name, error.message);
+ goto finish;
+ }
+ }
+
+ remove_session(u, path);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+finish:
+ dbus_error_free(&error);
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static int get_session_list(struct userdata *u) {
+ DBusError error;
+ DBusMessage *m = NULL, *reply = NULL;
+ uint32_t uid;
+ DBusMessageIter iter, sub;
+ int ret = -1;
+
+ pa_assert(u);
+
+ dbus_error_init(&error);
+
+ if (!(m = dbus_message_new_method_call("org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit.Manager", "GetSessionsForUnixUser"))) {
+ pa_log("Failed to allocate GetSessionsForUnixUser() method call.");
+ goto fail;
+ }
+
+ uid = (uint32_t) getuid();
+ if (!(dbus_message_append_args(m, DBUS_TYPE_UINT32, &uid, DBUS_TYPE_INVALID))) {
+ pa_log("Failed to append arguments to GetSessionsForUnixUser() method call.");
+ goto fail;
+ }
+
+ if (!(reply = dbus_connection_send_with_reply_and_block(pa_dbus_connection_get(u->connection), m, -1, &error))) {
+ pa_log("GetSessionsForUnixUser() call failed: %s: %s", error.name, error.message);
+ goto fail;
+ }
+
+ dbus_message_iter_init(reply, &iter);
+
+ if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
+ dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_OBJECT_PATH) {
+ pa_log("Failed to parse GetSessionsForUnixUser() result.");
+ goto fail;
+ }
+
+ dbus_message_iter_recurse(&iter, &sub);
+
+ for (;;) {
+ int at;
+ const char *id;
+
+ if ((at = dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_INVALID)
+ break;
+
+ assert(at == DBUS_TYPE_OBJECT_PATH);
+ dbus_message_iter_get_basic(&sub, &id);
+
+ add_session(u, id);
+
+ dbus_message_iter_next(&sub);
+ }
+
+ ret = 0;
+
+fail:
+
+ if (m)
+ dbus_message_unref(m);
+
+ if (reply)
+ dbus_message_unref(reply);
+
+ dbus_error_free(&error);
+
+ return ret;
+}
+
+int pa__init(pa_module*m) {
+ DBusError error;
+ pa_dbus_connection *connection;
+ struct userdata *u = NULL;
+ pa_modargs *ma;
+
+ pa_assert(m);
+
+ dbus_error_init(&error);
+
+ if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
+ pa_log("Failed to parse module arguments");
+ goto fail;
+ }
+
+ if (!(connection = pa_dbus_bus_get(m->core, DBUS_BUS_SYSTEM, &error)) || dbus_error_is_set(&error)) {
+
+ if (connection)
+ pa_dbus_connection_unref(connection);
+
+ pa_log_error("Unable to contact D-Bus system bus: %s: %s", error.name, error.message);
+ goto fail;
+ }
+
+ m->userdata = u = pa_xnew(struct userdata, 1);
+ u->core = m->core;
+ u->connection = connection;
+ u->sessions = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
+
+ if (!dbus_connection_add_filter(pa_dbus_connection_get(connection), filter_cb, u, NULL)) {
+ pa_log_error("Failed to add filter function");
+ goto fail;
+ }
+
+ dbus_bus_add_match(pa_dbus_connection_get(connection), "type='signal',sender='org.freedesktop.ConsoleKit', interface='org.freedesktop.ConsoleKit.Seat'", &error);
+ if (dbus_error_is_set(&error)) {
+ pa_log_error("Unable to subscribe to ConsoleKit signals: %s: %s", error.name, error.message);
+ goto fail;
+ }
+
+ if (get_session_list(u) < 0)
+ goto fail;
+
+ pa_modargs_free(ma);
+
+ return 0;
+
+fail:
+ if (ma)
+ pa_modargs_free(ma);
+
+ dbus_error_free(&error);
+ pa__done(m);
+
+ return -1;
+}
+
+
+void pa__done(pa_module *m) {
+ struct userdata *u;
+ struct session *session;
+
+ pa_assert(m);
+
+ if (!(u = m->userdata))
+ return;
+
+ if (u->sessions) {
+ while ((session = pa_hashmap_steal_first(u->sessions)))
+ free_session(session);
+
+ pa_hashmap_free(u->sessions, NULL, NULL);
+ }
+
+ if (u->connection) {
+ DBusError error;
+ dbus_error_init(&error);
+
+ dbus_bus_remove_match(pa_dbus_connection_get(u->connection), "type='signal',sender='org.freedesktop.ConsoleKit', interface='org.freedesktop.ConsoleKit.Seat'", &error);
+ dbus_error_free(&error);
+
+ dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u);
+
+ pa_dbus_connection_unref(u->connection);
+ }
+
+ pa_xfree(u);
+}
diff --git a/src/modules/module-default-device-restore.c b/src/modules/module-default-device-restore.c
index fa7e0ad..d2cc24f 100644
--- a/src/modules/module-default-device-restore.c
+++ b/src/modules/module-default-device-restore.c
@@ -1,9 +1,7 @@
-/* $Id: module-default-device-restore.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2006 Lennart Poettering
+ Copyright 2006-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -25,10 +23,17 @@
#include <config.h>
#endif
+#include <errno.h>
+#include <stdio.h>
+
+#include <pulse/timeval.h>
+#include <pulse/util.h>
+
#include <pulsecore/core-util.h>
#include <pulsecore/module.h>
#include <pulsecore/log.h>
#include <pulsecore/namereg.h>
+#include <pulsecore/core-error.h>
#include "module-default-device-restore-symdef.h"
@@ -37,17 +42,24 @@ PA_MODULE_DESCRIPTION("Automatically restore the default sink and source");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(TRUE);
-#define DEFAULT_SINK_FILE "default-sink"
-#define DEFAULT_SOURCE_FILE "default-source"
+#define DEFAULT_SAVE_INTERVAL 5
-int pa__init(pa_module *m) {
+struct userdata {
+ pa_core *core;
+ pa_subscription *subscription;
+ pa_time_event *time_event;
+ char *sink_filename, *source_filename;
+ pa_bool_t modified;
+};
+
+static void load(struct userdata *u) {
FILE *f;
/* We never overwrite manually configured settings */
- if (m->core->default_sink_name)
+ if (u->core->default_sink_name)
pa_log_info("Manually configured default sink, not overwriting.");
- else if ((f = pa_open_config_file(NULL, DEFAULT_SINK_FILE, NULL, NULL, "r"))) {
+ else if ((f = fopen(u->sink_filename, "r"))) {
char ln[256] = "";
fgets(ln, sizeof(ln)-1, f);
@@ -55,17 +67,19 @@ int pa__init(pa_module *m) {
fclose(f);
if (!ln[0])
- pa_log_debug("No previous default sink setting, ignoring.");
- else if (pa_namereg_get(m->core, ln, PA_NAMEREG_SINK, 1)) {
- pa_namereg_set_default(m->core, ln, PA_NAMEREG_SINK);
- pa_log_debug("Restored default sink '%s'.", ln);
+ pa_log_info("No previous default sink setting, ignoring.");
+ else if (pa_namereg_get(u->core, ln, PA_NAMEREG_SINK, TRUE)) {
+ pa_namereg_set_default(u->core, ln, PA_NAMEREG_SINK);
+ pa_log_info("Restored default sink '%s'.", ln);
} else
pa_log_info("Saved default sink '%s' not existant, not restoring default sink setting.", ln);
- }
- if (m->core->default_source_name)
+ } else if (errno != ENOENT)
+ pa_log("Failed to load default sink: %s", pa_cstrerror(errno));
+
+ if (u->core->default_source_name)
pa_log_info("Manually configured default source, not overwriting.");
- else if ((f = pa_open_config_file(NULL, DEFAULT_SOURCE_FILE, NULL, NULL, "r"))) {
+ else if ((f = fopen(u->source_filename, "r"))) {
char ln[256] = "";
fgets(ln, sizeof(ln)-1, f);
@@ -73,29 +87,114 @@ int pa__init(pa_module *m) {
fclose(f);
if (!ln[0])
- pa_log_debug("No previous default source setting, ignoring.");
- else if (pa_namereg_get(m->core, ln, PA_NAMEREG_SOURCE, 1)) {
- pa_namereg_set_default(m->core, ln, PA_NAMEREG_SOURCE);
- pa_log_debug("Restored default source '%s'.", ln);
+ pa_log_info("No previous default source setting, ignoring.");
+ else if (pa_namereg_get(u->core, ln, PA_NAMEREG_SOURCE, TRUE)) {
+ pa_namereg_set_default(u->core, ln, PA_NAMEREG_SOURCE);
+ pa_log_info("Restored default source '%s'.", ln);
} else
pa_log_info("Saved default source '%s' not existant, not restoring default source setting.", ln);
- }
- return 0;
+ } else if (errno != ENOENT)
+ pa_log("Failed to load default sink: %s", pa_cstrerror(errno));
}
-void pa__done(pa_module*m) {
+static void save(struct userdata *u) {
FILE *f;
- if ((f = pa_open_config_file(NULL, DEFAULT_SINK_FILE, NULL, NULL, "w"))) {
- const char *n = pa_namereg_get_default_sink_name(m->core);
- fprintf(f, "%s\n", n ? n : "");
- fclose(f);
+ if (!u->modified)
+ return;
+
+ if (u->sink_filename) {
+ if ((f = fopen(u->sink_filename, "w"))) {
+ const char *n = pa_namereg_get_default_sink_name(u->core);
+ fprintf(f, "%s\n", pa_strempty(n));
+ fclose(f);
+ } else
+ pa_log("Failed to save default sink: %s", pa_cstrerror(errno));
}
- if ((f = pa_open_config_file(NULL, DEFAULT_SOURCE_FILE, NULL, NULL, "w"))) {
- const char *n = pa_namereg_get_default_source_name(m->core);
- fprintf(f, "%s\n", n ? n : "");
- fclose(f);
+ if (u->source_filename) {
+ if ((f = fopen(u->source_filename, "w"))) {
+ const char *n = pa_namereg_get_default_source_name(u->core);
+ fprintf(f, "%s\n", pa_strempty(n));
+ fclose(f);
+ } else
+ pa_log("Failed to save default source: %s", pa_cstrerror(errno));
+ }
+
+ u->modified = FALSE;
+}
+
+static void time_cb(pa_mainloop_api *a, pa_time_event *e, const struct timeval *tv, void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(u);
+ save(u);
+
+ if (u->time_event) {
+ u->core->mainloop->time_free(u->time_event);
+ u->time_event = NULL;
}
}
+
+static void subscribe_cb(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(u);
+
+ u->modified = TRUE;
+
+ if (!u->time_event) {
+ struct timeval tv;
+ pa_gettimeofday(&tv);
+ pa_timeval_add(&tv, DEFAULT_SAVE_INTERVAL*PA_USEC_PER_SEC);
+ u->time_event = u->core->mainloop->time_new(u->core->mainloop, &tv, time_cb, u);
+ }
+}
+
+int pa__init(pa_module *m) {
+ struct userdata *u;
+
+ pa_assert(m);
+
+ m->userdata = u = pa_xnew0(struct userdata, 1);
+ u->core = m->core;
+
+ if (!(u->sink_filename = pa_state_path("default-sink", TRUE)))
+ goto fail;
+
+ if (!(u->source_filename = pa_state_path("default-source", TRUE)))
+ goto fail;
+
+ load(u);
+
+ u->subscription = pa_subscription_new(u->core, PA_SUBSCRIPTION_MASK_SERVER, subscribe_cb, u);
+
+ return 0;
+
+fail:
+ pa__done(m);
+
+ return -1;
+}
+
+void pa__done(pa_module*m) {
+ struct userdata *u;
+
+ pa_assert(m);
+
+ if (!(u = m->userdata))
+ return;
+
+ save(u);
+
+ if (u->subscription)
+ pa_subscription_free(u->subscription);
+
+ if (u->time_event)
+ m->core->mainloop->time_free(u->time_event);
+
+ pa_xfree(u->sink_filename);
+ pa_xfree(u->source_filename);
+ pa_xfree(u);
+}
diff --git a/src/modules/module-defs.h.m4 b/src/modules/module-defs.h.m4
index 8858f59..64ce192 100644
--- a/src/modules/module-defs.h.m4
+++ b/src/modules/module-defs.h.m4
@@ -1,4 +1,3 @@
-dnl $Id: module-defs.h.m4 2043 2007-11-09 18:25:40Z lennart $
changecom(`/*', `*/')dnl
define(`module_name', patsubst(patsubst(patsubst(fname, `-symdef.h$'), `^.*/'), `[^0-9a-zA-Z]', `_'))dnl
define(`c_symbol', patsubst(module_name, `[^0-9a-zA-Z]', `_'))dnl
diff --git a/src/modules/module-detect.c b/src/modules/module-detect.c
index 435fc25..1616d47 100644
--- a/src/modules/module-detect.c
+++ b/src/modules/module-detect.c
@@ -1,5 +1,3 @@
-/* $Id: module-detect.c 2050 2007-11-13 17:37:44Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -238,16 +236,16 @@ int pa__init(pa_module*m) {
goto fail;
}
-#if HAVE_ALSA
+#ifdef HAVE_ALSA
if ((n = detect_alsa(m->core, just_one)) <= 0)
#endif
#if HAVE_OSS
if ((n = detect_oss(m->core, just_one)) <= 0)
#endif
-#if HAVE_SOLARIS
+#ifdef HAVE_SOLARIS
if ((n = detect_solaris(m->core, just_one)) <= 0)
#endif
-#if OS_IS_WIN32
+#ifdef OS_IS_WIN32
if ((n = detect_waveout(m->core, just_one)) <= 0)
#endif
{
@@ -258,7 +256,7 @@ int pa__init(pa_module*m) {
pa_log_info("loaded %i modules.", n);
/* We were successful and can unload ourselves now. */
- pa_module_unload_request(m);
+ pa_module_unload_request(m, TRUE);
pa_modargs_free(ma);
diff --git a/src/modules/module-device-restore-symdef.h b/src/modules/module-device-restore-symdef.h
new file mode 100644
index 0000000..0d742ce
--- /dev/null
+++ b/src/modules/module-device-restore-symdef.h
@@ -0,0 +1,25 @@
+#ifndef foomoduledevicerestoresymdeffoo
+#define foomoduledevicerestoresymdeffoo
+
+#include <pulsecore/core.h>
+#include <pulsecore/module.h>
+#include <pulsecore/macro.h>
+
+#define pa__init module_device_restore_LTX_pa__init
+#define pa__done module_device_restore_LTX_pa__done
+#define pa__get_author module_device_restore_LTX_pa__get_author
+#define pa__get_description module_device_restore_LTX_pa__get_description
+#define pa__get_usage module_device_restore_LTX_pa__get_usage
+#define pa__get_version module_device_restore_LTX_pa__get_version
+#define pa__load_once module_device_restore_LTX_pa__load_once
+
+int pa__init(pa_module*m);
+void pa__done(pa_module*m);
+
+const char* pa__get_author(void);
+const char* pa__get_description(void);
+const char* pa__get_usage(void);
+const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
+
+#endif
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
new file mode 100644
index 0000000..86a7881
--- /dev/null
+++ b/src/modules/module-device-restore.c
@@ -0,0 +1,389 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2006-2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <gdbm.h>
+
+#include <pulse/xmalloc.h>
+#include <pulse/volume.h>
+#include <pulse/timeval.h>
+#include <pulse/util.h>
+
+#include <pulsecore/core-error.h>
+#include <pulsecore/module.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/modargs.h>
+#include <pulsecore/log.h>
+#include <pulsecore/core-subscribe.h>
+#include <pulsecore/sink-input.h>
+#include <pulsecore/source-output.h>
+#include <pulsecore/namereg.h>
+
+#include "module-device-restore-symdef.h"
+
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Automatically restore the volume/mute state of devices");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+
+#define SAVE_INTERVAL 10
+
+static const char* const valid_modargs[] = {
+ "restore_volume",
+ "restore_muted",
+ NULL
+};
+
+struct userdata {
+ pa_core *core;
+ pa_module *module;
+ pa_subscription *subscription;
+ pa_hook_slot
+ *sink_fixate_hook_slot,
+ *source_fixate_hook_slot;
+ pa_time_event *save_time_event;
+ GDBM_FILE gdbm_file;
+
+ pa_bool_t restore_volume:1;
+ pa_bool_t restore_muted:1;
+};
+
+struct entry {
+ pa_channel_map channel_map;
+ pa_cvolume volume;
+ pa_bool_t muted:1;
+};
+
+static void save_time_callback(pa_mainloop_api*a, pa_time_event* e, const struct timeval *tv, void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(a);
+ pa_assert(e);
+ pa_assert(tv);
+ pa_assert(u);
+
+ pa_assert(e == u->save_time_event);
+ u->core->mainloop->time_free(u->save_time_event);
+ u->save_time_event = NULL;
+
+ gdbm_sync(u->gdbm_file);
+ pa_log_info("Synced.");
+}
+
+static struct entry* read_entry(struct userdata *u, char *name) {
+ datum key, data;
+ struct entry *e;
+
+ pa_assert(u);
+ pa_assert(name);
+
+ key.dptr = name;
+ key.dsize = (int) strlen(name);
+
+ data = gdbm_fetch(u->gdbm_file, key);
+
+ if (!data.dptr)
+ goto fail;
+
+ if (data.dsize != sizeof(struct entry)) {
+ pa_log_warn("Database contains entry for device %s of wrong size %lu != %lu", name, (unsigned long) data.dsize, (unsigned long) sizeof(struct entry));
+ goto fail;
+ }
+
+ e = (struct entry*) data.dptr;
+
+ if (!(pa_cvolume_valid(&e->volume))) {
+ pa_log_warn("Invalid volume stored in database for device %s", name);
+ goto fail;
+ }
+
+ if (!(pa_channel_map_valid(&e->channel_map))) {
+ pa_log_warn("Invalid channel map stored in database for device %s", name);
+ goto fail;
+ }
+
+ if (e->volume.channels != e->channel_map.channels) {
+ pa_log_warn("Volume and channel map don't match in database entry for device %s", name);
+ goto fail;
+ }
+
+ return e;
+
+fail:
+
+ pa_xfree(data.dptr);
+ return NULL;
+}
+
+static void trigger_save(struct userdata *u) {
+ struct timeval tv;
+
+ if (u->save_time_event)
+ return;
+
+ pa_gettimeofday(&tv);
+ tv.tv_sec += SAVE_INTERVAL;
+ u->save_time_event = u->core->mainloop->time_new(u->core->mainloop, &tv, save_time_callback, u);
+}
+
+static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata) {
+ struct userdata *u = userdata;
+ struct entry entry, *old;
+ char *name;
+ datum key, data;
+
+ pa_assert(c);
+ pa_assert(u);
+
+ if (t != (PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_NEW) &&
+ t != (PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE) &&
+ t != (PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_NEW) &&
+ t != (PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE))
+ return;
+
+ memset(&entry, 0, sizeof(entry));
+
+ if ((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SINK) {
+ pa_sink *sink;
+
+ if (!(sink = pa_idxset_get_by_index(c->sinks, idx)))
+ return;
+
+ name = pa_sprintf_malloc("sink:%s", sink->name);
+ entry.channel_map = sink->channel_map;
+ entry.volume = *pa_sink_get_volume(sink, FALSE);
+ entry.muted = pa_sink_get_mute(sink, FALSE);
+
+ } else {
+ pa_source *source;
+
+ pa_assert((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SOURCE);
+
+ if (!(source = pa_idxset_get_by_index(c->sources, idx)))
+ return;
+
+ name = pa_sprintf_malloc("source:%s", source->name);
+ entry.channel_map = source->channel_map;
+ entry.volume = *pa_source_get_volume(source, FALSE);
+ entry.muted = pa_source_get_mute(source, FALSE);
+ }
+
+ if ((old = read_entry(u, name))) {
+
+ if (pa_cvolume_equal(pa_cvolume_remap(&old->volume, &old->channel_map, &entry.channel_map), &entry.volume) &&
+ !old->muted == !entry.muted) {
+
+ pa_xfree(old);
+ pa_xfree(name);
+ return;
+ }
+
+ pa_xfree(old);
+ }
+
+ key.dptr = name;
+ key.dsize = (int) strlen(name);
+
+ data.dptr = (void*) &entry;
+ data.dsize = sizeof(entry);
+
+ pa_log_info("Storing volume/mute for device %s.", name);
+
+ gdbm_store(u->gdbm_file, key, data, GDBM_REPLACE);
+
+ pa_xfree(name);
+
+ trigger_save(u);
+}
+
+static pa_hook_result_t sink_fixate_hook_callback(pa_core *c, pa_sink_new_data *new_data, struct userdata *u) {
+ char *name;
+ struct entry *e;
+
+ pa_assert(new_data);
+
+ name = pa_sprintf_malloc("sink:%s", new_data->name);
+
+ if ((e = read_entry(u, name))) {
+
+ if (u->restore_volume) {
+ pa_log_info("Restoring volume for sink %s.", new_data->name);
+ pa_sink_new_data_set_volume(new_data, pa_cvolume_remap(&e->volume, &e->channel_map, &new_data->channel_map));
+ }
+
+ if (u->restore_muted) {
+ pa_log_info("Restoring mute state for sink %s.", new_data->name);
+ pa_sink_new_data_set_muted(new_data, e->muted);
+ }
+
+ pa_xfree(e);
+ }
+
+ pa_xfree(name);
+
+ return PA_HOOK_OK;
+}
+
+static pa_hook_result_t source_fixate_hook_callback(pa_core *c, pa_source_new_data *new_data, struct userdata *u) {
+ char *name;
+ struct entry *e;
+
+ pa_assert(new_data);
+
+ name = pa_sprintf_malloc("source:%s", new_data->name);
+
+ if ((e = read_entry(u, name))) {
+
+ if (u->restore_volume) {
+ pa_log_info("Restoring volume for source %s.", new_data->name);
+ pa_source_new_data_set_volume(new_data, pa_cvolume_remap(&e->volume, &e->channel_map, &new_data->channel_map));
+ }
+
+ if (u->restore_muted) {
+ pa_log_info("Restoring mute state for source %s.", new_data->name);
+ pa_source_new_data_set_muted(new_data, e->muted);
+ }
+
+ pa_xfree(e);
+ }
+
+ pa_xfree(name);
+
+ return PA_HOOK_OK;
+}
+
+int pa__init(pa_module*m) {
+ pa_modargs *ma = NULL;
+ struct userdata *u;
+ char *fname, *fn;
+ pa_sink *sink;
+ pa_source *source;
+ uint32_t idx;
+ pa_bool_t restore_volume = TRUE, restore_muted = TRUE;
+ int gdbm_cache_size;
+
+ pa_assert(m);
+
+ if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
+ pa_log("Failed to parse module arguments");
+ goto fail;
+ }
+
+ if (pa_modargs_get_value_boolean(ma, "restore_volume", &restore_volume) < 0 ||
+ pa_modargs_get_value_boolean(ma, "restore_muted", &restore_muted) < 0) {
+ pa_log("restore_volume= and restore_muted= expect boolean arguments");
+ goto fail;
+ }
+
+ if (!restore_muted && !restore_volume)
+ pa_log_warn("Neither restoring volume nor restoring muted enabled!");
+
+ m->userdata = u = pa_xnew(struct userdata, 1);
+ u->core = m->core;
+ u->module = m;
+ u->save_time_event = NULL;
+ u->restore_volume = restore_volume;
+ u->restore_muted = restore_muted;
+ u->gdbm_file = NULL;
+
+ u->subscription = pa_subscription_new(m->core, PA_SUBSCRIPTION_MASK_SINK|PA_SUBSCRIPTION_MASK_SOURCE, subscribe_callback, u);
+
+ if (restore_muted || restore_volume) {
+ u->sink_fixate_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_FIXATE], PA_HOOK_EARLY, (pa_hook_cb_t) sink_fixate_hook_callback, u);
+ u->source_fixate_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_FIXATE], PA_HOOK_EARLY, (pa_hook_cb_t) source_fixate_hook_callback, u);
+ }
+
+ /* We include the host identifier in the file name because gdbm
+ * files are CPU dependant, and we don't want things to go wrong
+ * if we are on a multiarch system. */
+
+ fn = pa_sprintf_malloc("device-volumes."CANONICAL_HOST".gdbm");
+ fname = pa_state_path(fn, TRUE);
+ pa_xfree(fn);
+
+ if (!fname)
+ goto fail;
+
+ if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT, 0600, NULL))) {
+ pa_log("Failed to open volume database '%s': %s", fname, gdbm_strerror(gdbm_errno));
+ pa_xfree(fname);
+ goto fail;
+ }
+
+ /* By default the cache of gdbm is rather large, let's reduce it a bit to save memory */
+ gdbm_cache_size = 10;
+ gdbm_setopt(u->gdbm_file, GDBM_CACHESIZE, &gdbm_cache_size, sizeof(gdbm_cache_size));
+
+ pa_log_info("Sucessfully opened database file '%s'.", fname);
+ pa_xfree(fname);
+
+ for (sink = pa_idxset_first(m->core->sinks, &idx); sink; sink = pa_idxset_next(m->core->sinks, &idx))
+ subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_NEW, sink->index, u);
+
+ for (source = pa_idxset_first(m->core->sources, &idx); source; source = pa_idxset_next(m->core->sources, &idx))
+ subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_NEW, source->index, u);
+
+ pa_modargs_free(ma);
+ return 0;
+
+fail:
+ pa__done(m);
+
+ if (ma)
+ pa_modargs_free(ma);
+
+ return -1;
+}
+
+void pa__done(pa_module*m) {
+ struct userdata* u;
+
+ pa_assert(m);
+
+ if (!(u = m->userdata))
+ return;
+
+ if (u->subscription)
+ pa_subscription_free(u->subscription);
+
+ if (u->sink_fixate_hook_slot)
+ pa_hook_slot_free(u->sink_fixate_hook_slot);
+ if (u->source_fixate_hook_slot)
+ pa_hook_slot_free(u->source_fixate_hook_slot);
+
+ if (u->save_time_event)
+ u->core->mainloop->time_free(u->save_time_event);
+
+ if (u->gdbm_file)
+ gdbm_close(u->gdbm_file);
+
+ pa_xfree(u);
+}
diff --git a/src/modules/module-esound-compat-spawnfd.c b/src/modules/module-esound-compat-spawnfd.c
index c5001cf..578ad3b 100644
--- a/src/modules/module-esound-compat-spawnfd.c
+++ b/src/modules/module-esound-compat-spawnfd.c
@@ -1,5 +1,3 @@
-/* $Id: module-esound-compat-spawnfd.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -68,7 +66,7 @@ int pa__init(pa_module*m) {
pa_assert_se(pa_close(fd) == 0);
- pa_module_unload_request(m);
+ pa_module_unload_request(m, TRUE);
ret = 0;
diff --git a/src/modules/module-esound-compat-spawnpid.c b/src/modules/module-esound-compat-spawnpid.c
index 67f0a23..882dba8 100644
--- a/src/modules/module-esound-compat-spawnpid.c
+++ b/src/modules/module-esound-compat-spawnpid.c
@@ -62,10 +62,10 @@ int pa__init(pa_module*m) {
goto finish;
}
- if (kill(pid, SIGUSR1) < 0)
+ if (kill((pid_t) pid, SIGUSR1) < 0)
pa_log_warn("kill(%u) failed: %s", pid, pa_cstrerror(errno));
- pa_module_unload_request(m);
+ pa_module_unload_request(m, TRUE);
ret = 0;
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 92014b7..14f1810 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -1,5 +1,3 @@
-/* $Id: module-esound-sink.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -143,7 +141,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
switch ((pa_sink_state_t) PA_PTR_TO_UINT(data)) {
case PA_SINK_SUSPENDED:
- pa_assert(PA_SINK_OPENED(u->sink->thread_info.state));
+ pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
pa_smoother_pause(u->smoother, pa_rtclock_usec());
break;
@@ -167,7 +165,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
pa_usec_t w, r;
r = pa_smoother_get(u->smoother, pa_rtclock_usec());
- w = pa_bytes_to_usec(u->offset + u->memchunk.length, &u->sink->sample_spec);
+ w = pa_bytes_to_usec((uint64_t) u->offset + u->memchunk.length, &u->sink->sample_spec);
*((pa_usec_t*) data) = w > r ? w - r : 0;
break;
@@ -206,12 +204,16 @@ static void thread_func(void *userdata) {
for (;;) {
int ret;
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
+
if (u->rtpoll_item) {
struct pollfd *pollfd;
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
/* Render some data and write it to the fifo */
- if (PA_SINK_OPENED(u->sink->thread_info.state) && pollfd->revents) {
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && pollfd->revents) {
pa_usec_t usec;
int64_t n;
@@ -248,8 +250,8 @@ static void thread_func(void *userdata) {
} else {
u->offset += l;
- u->memchunk.index += l;
- u->memchunk.length -= l;
+ u->memchunk.index += (size_t) l;
+ u->memchunk.length -= (size_t) l;
if (u->memchunk.length <= 0) {
pa_memblock_unref(u->memchunk.memblock);
@@ -283,7 +285,7 @@ static void thread_func(void *userdata) {
}
#endif
- usec = pa_bytes_to_usec(n, &u->sink->sample_spec);
+ usec = pa_bytes_to_usec((uint64_t) n, &u->sink->sample_spec);
if (usec > u->latency)
usec -= u->latency;
@@ -294,7 +296,7 @@ static void thread_func(void *userdata) {
}
/* Hmm, nothing to do. Let's sleep */
- pollfd->events = PA_SINK_OPENED(u->sink->thread_info.state) ? POLLOUT : 0;
+ pollfd->events = (short) (PA_SINK_IS_OPENED(u->sink->thread_info.state) ? POLLOUT : 0);
}
if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
@@ -340,7 +342,7 @@ static int do_write(struct userdata *u) {
return -1;
}
- u->write_index += r;
+ u->write_index += (size_t) r;
pa_assert(u->write_index <= u->write_length);
if (u->write_index == u->write_length) {
@@ -456,7 +458,7 @@ static int do_read(struct userdata *u) {
return -1;
}
- u->read_index += r;
+ u->read_index += (size_t) r;
pa_assert(u->read_index <= u->read_length);
if (u->read_index == u->read_length)
@@ -466,7 +468,7 @@ static int do_read(struct userdata *u) {
return 0;
}
-static void io_callback(PA_GCC_UNUSED pa_iochannel *io, void*userdata) {
+static void io_callback(pa_iochannel *io, void*userdata) {
struct userdata *u = userdata;
pa_assert(u);
@@ -477,11 +479,11 @@ static void io_callback(PA_GCC_UNUSED pa_iochannel *io, void*userdata) {
u->io = NULL;
}
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
-static void on_connection(PA_GCC_UNUSED pa_socket_client *c, pa_iochannel*io, void *userdata) {
+static void on_connection(pa_socket_client *c, pa_iochannel*io, void *userdata) {
struct userdata *u = userdata;
pa_socket_client_unref(u->client);
@@ -489,7 +491,7 @@ static void on_connection(PA_GCC_UNUSED pa_socket_client *c, pa_iochannel*io, vo
if (!io) {
pa_log("Connection failed: %s", pa_cstrerror(errno));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
return;
}
@@ -502,12 +504,11 @@ static void on_connection(PA_GCC_UNUSED pa_socket_client *c, pa_iochannel*io, vo
int pa__init(pa_module*m) {
struct userdata *u = NULL;
- const char *p;
pa_sample_spec ss;
pa_modargs *ma = NULL;
- char *t;
const char *espeaker;
uint32_t key;
+ pa_sink_new_data data;
pa_assert(m);
@@ -533,19 +534,18 @@ int pa__init(pa_module*m) {
u->module = m;
m->userdata = u;
u->fd = -1;
- u->smoother = pa_smoother_new(PA_USEC_PER_SEC, PA_USEC_PER_SEC*2, TRUE);
+ u->smoother = pa_smoother_new(PA_USEC_PER_SEC, PA_USEC_PER_SEC*2, TRUE, 10);
pa_memchunk_reset(&u->memchunk);
u->offset = 0;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
u->rtpoll_item = NULL;
u->format =
(ss.format == PA_SAMPLE_U8 ? ESD_BITS8 : ESD_BITS16) |
(ss.channels == 2 ? ESD_STEREO : ESD_MONO);
- u->rate = ss.rate;
+ u->rate = (int32_t) ss.rate;
u->block_size = pa_usec_to_bytes(PA_USEC_PER_SEC/20, &ss);
u->read_data = u->write_data = NULL;
@@ -554,30 +554,38 @@ int pa__init(pa_module*m) {
u->state = STATE_AUTH;
u->latency = 0;
- if (!(u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, NULL))) {
+ if (!(espeaker = getenv("ESPEAKER")))
+ espeaker = ESD_UNIX_SOCKET_NAME;
+
+ espeaker = pa_modargs_get_value(ma, "server", espeaker);
+
+ pa_sink_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_sink_new_data_set_name(&data, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME));
+ pa_sink_new_data_set_sample_spec(&data, &ss);
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, espeaker);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Esound sink '%s'", espeaker);
+
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY|PA_SINK_NETWORK);
+ pa_sink_new_data_done(&data);
+
+ if (!u->sink) {
pa_log("Failed to create sink.");
goto fail;
}
u->sink->parent.process_msg = sink_process_msg;
u->sink->userdata = u;
- u->sink->flags = PA_SINK_LATENCY|PA_SINK_NETWORK;
- pa_sink_set_module(u->sink, m);
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
- if (!(espeaker = getenv("ESPEAKER")))
- espeaker = ESD_UNIX_SOCKET_NAME;
-
- if (!(u->client = pa_socket_client_new_string(u->core->mainloop, p = pa_modargs_get_value(ma, "server", espeaker), ESD_DEFAULT_PORT))) {
+ if (!(u->client = pa_socket_client_new_string(u->core->mainloop, espeaker, ESD_DEFAULT_PORT))) {
pa_log("Failed to connect to server.");
goto fail;
}
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc("Esound sink '%s'", p));
- pa_xfree(t);
-
pa_socket_client_set_callback(u->client, on_connection, u);
/* Prepare the initial request */
diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c
index 1533552..c76a366 100644
--- a/src/modules/module-hal-detect.c
+++ b/src/modules/module-hal-detect.c
@@ -1,5 +1,3 @@
-/* $Id: module-hal-detect.c 2050 2007-11-13 17:37:44Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -58,9 +56,11 @@ PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(TRUE);
#if defined(HAVE_ALSA) && defined(HAVE_OSS)
-PA_MODULE_USAGE("api=<alsa or oss>");
+PA_MODULE_USAGE("api=<alsa or oss> "
+ "tsched=<enable system timer based scheduling mode?>");
#elif defined(HAVE_ALSA)
-PA_MODULE_USAGE("api=<alsa>");
+PA_MODULE_USAGE("api=<alsa> "
+ "tsched=<enable system timer based scheduling mode?>");
#elif defined(HAVE_OSS)
PA_MODULE_USAGE("api=<oss>");
#endif
@@ -69,7 +69,7 @@ struct device {
uint32_t index;
char *udi;
char *sink_name, *source_name;
- int acl_race_fix;
+ pa_bool_t acl_race_fix;
};
struct userdata {
@@ -78,6 +78,9 @@ struct userdata {
pa_dbus_connection *connection;
pa_hashmap *devices;
const char *capability;
+#ifdef HAVE_ALSA
+ pa_bool_t use_tsched;
+#endif
};
struct timerdata {
@@ -90,6 +93,9 @@ struct timerdata {
static const char* const valid_modargs[] = {
"api",
+#ifdef HAVE_ALSA
+ "tsched",
+#endif
NULL
};
@@ -102,7 +108,7 @@ static void hal_device_free(struct device* d) {
pa_xfree(d);
}
-static void hal_device_free_cb(void *d, PA_GCC_UNUSED void *data) {
+static void hal_device_free_cb(void *d, void *data) {
hal_device_free(d);
}
@@ -191,12 +197,12 @@ static pa_module* hal_device_load_alsa(struct userdata *u, const char *udi, char
*sink_name = pa_sprintf_malloc("alsa_output.%s", strip_udi(udi));
module_name = "module-alsa-sink";
- args = pa_sprintf_malloc("device_id=%u sink_name=%s", card, *sink_name);
+ args = pa_sprintf_malloc("device_id=%u sink_name=%s tsched=%i", card, *sink_name, (int) u->use_tsched);
} else {
*source_name = pa_sprintf_malloc("alsa_input.%s", strip_udi(udi));
module_name = "module-alsa-source";
- args = pa_sprintf_malloc("device_id=%u source_name=%s", card, *source_name);
+ args = pa_sprintf_malloc("device_id=%u source_name=%s tsched=%i", card, *source_name, (int) u->use_tsched);
}
pa_log_debug("Loading %s with arguments '%s'", module_name, args);
@@ -331,7 +337,7 @@ static struct device* hal_device_add(struct userdata *u, const char *udi) {
return NULL;
d = pa_xnew(struct device, 1);
- d->acl_race_fix = 0;
+ d->acl_race_fix = FALSE;
d->udi = pa_xstrdup(udi);
d->index = m->index;
d->sink_name = sink_name;
@@ -372,7 +378,7 @@ static int hal_device_add_all(struct userdata *u, const char *capability) {
pa_log_debug("Not loaded device %s", udis[i]);
else {
if (d->sink_name)
- pa_scache_play_item_by_name(u->core, "pulse-coldplug", d->sink_name, PA_VOLUME_NORM, 0);
+ pa_scache_play_item_by_name(u->core, "pulse-coldplug", d->sink_name, FALSE, PA_VOLUME_NORM, NULL, NULL);
count++;
}
}
@@ -399,7 +405,7 @@ static void device_added_time_cb(pa_mainloop_api *ea, pa_time_event *ev, const s
dbus_error_init(&error);
if (!pa_hashmap_get(td->u->devices, td->udi)) {
- int b;
+ dbus_bool_t b;
struct device *d;
b = libhal_device_exists(td->u->context, td->udi, &error);
@@ -412,7 +418,7 @@ static void device_added_time_cb(pa_mainloop_api *ea, pa_time_event *ev, const s
pa_log_debug("Not loaded device %s", td->udi);
else {
if (d->sink_name)
- pa_scache_play_item_by_name(td->u->core, "pulse-hotplug", d->sink_name, PA_VOLUME_NORM, 0);
+ pa_scache_play_item_by_name(td->u->core, "pulse-hotplug", d->sink_name, FALSE, PA_VOLUME_NORM, NULL, NULL);
}
}
}
@@ -427,7 +433,7 @@ static void device_added_cb(LibHalContext *context, const char *udi) {
struct timeval tv;
struct timerdata *t;
struct userdata *u;
- int good = 0;
+ pa_bool_t good = FALSE;
pa_assert_se(u = libhal_ctx_get_user_data(context));
@@ -505,7 +511,7 @@ static void device_removed_cb(LibHalContext* context, const char *udi) {
pa_log_debug("Device removed: %s", udi);
if ((d = pa_hashmap_remove(u->devices, udi))) {
- pa_module_unload_by_index(u->core, d->index);
+ pa_module_unload_by_index(u->core, d->index, TRUE);
hal_device_free(d);
}
}
@@ -562,9 +568,9 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
udi = dbus_message_get_path(message);
if ((d = pa_hashmap_get(u->devices, udi))) {
- int send_acl_race_fix_message = 0;
+ pa_bool_t send_acl_race_fix_message = FALSE;
- d->acl_race_fix = 0;
+ d->acl_race_fix = FALSE;
if (d->sink_name) {
pa_sink *sink;
@@ -575,14 +581,14 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
if (prev_suspended && !suspend) {
/* resume */
if (pa_sink_suspend(sink, 0) >= 0)
- pa_scache_play_item_by_name(u->core, "pulse-access", d->sink_name, PA_VOLUME_NORM, 0);
+ pa_scache_play_item_by_name(u->core, "pulse-access", d->sink_name, FALSE, PA_VOLUME_NORM, NULL, NULL);
else
- d->acl_race_fix = 1;
+ d->acl_race_fix = TRUE;
} else if (!prev_suspended && suspend) {
/* suspend */
if (pa_sink_suspend(sink, 1) >= 0)
- send_acl_race_fix_message = 1;
+ send_acl_race_fix_message = TRUE;
}
}
}
@@ -596,12 +602,12 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
if (prev_suspended && !suspend) {
/* resume */
if (pa_source_suspend(source, 0) < 0)
- d->acl_race_fix = 1;
+ d->acl_race_fix = TRUE;
} else if (!prev_suspended && suspend) {
/* suspend */
if (pa_source_suspend(source, 0) >= 0)
- send_acl_race_fix_message = 1;
+ send_acl_race_fix_message = TRUE;
}
}
}
@@ -617,6 +623,8 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
device_added_cb(u->context, udi);
}
+ return DBUS_HANDLER_RESULT_HANDLED;
+
} else if (dbus_message_is_signal(message, "org.pulseaudio.Server", "DirtyGiveUpMessage")) {
/* We use this message to avoid a dirty race condition when we
get an ACLAdded message before the previously owning PA
@@ -631,7 +639,7 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
if ((d = pa_hashmap_get(u->devices, udi)) && d->acl_race_fix) {
pa_log_debug("Got dirty give up message for '%s', trying resume ...", udi);
- d->acl_race_fix = 0;
+ d->acl_race_fix = FALSE;
if (d->sink_name) {
pa_sink *sink;
@@ -643,7 +651,7 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
if (prev_suspended) {
/* resume */
if (pa_sink_suspend(sink, 0) >= 0)
- pa_scache_play_item_by_name(u->core, "pulse-access", d->sink_name, PA_VOLUME_NORM, 0);
+ pa_scache_play_item_by_name(u->core, "pulse-access", d->sink_name, FALSE, PA_VOLUME_NORM, NULL, NULL);
}
}
}
@@ -663,12 +671,14 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
} else
/* Yes, we don't check the UDI for validity, but hopefully HAL will */
device_added_cb(u->context, udi);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
}
finish:
dbus_error_free(&error);
- return DBUS_HANDLER_RESULT_HANDLED;
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static void hal_context_free(LibHalContext* hal_context) {
@@ -722,6 +732,7 @@ int pa__init(pa_module*m) {
int n = 0;
pa_modargs *ma;
const char *api;
+ pa_bool_t use_tsched = TRUE;
pa_assert(m);
@@ -732,18 +743,23 @@ int pa__init(pa_module*m) {
goto fail;
}
+ if (pa_modargs_get_value_boolean(ma, "tsched", &use_tsched) < 0) {
+ pa_log("Failed to parse tsched argument.");
+ goto fail;
+ }
+
if ((api = pa_modargs_get_value(ma, "api", NULL))) {
- int good = 0;
+ pa_bool_t good = FALSE;
#ifdef HAVE_ALSA
if (strcmp(api, CAPABILITY_ALSA) == 0) {
- good = 1;
+ good = TRUE;
api = CAPABILITY_ALSA;
}
#endif
#ifdef HAVE_OSS
if (strcmp(api, CAPABILITY_OSS) == 0) {
- good = 1;
+ good = TRUE;
api = CAPABILITY_OSS;
}
#endif
@@ -773,6 +789,9 @@ int pa__init(pa_module*m) {
u->connection = conn;
u->devices = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
u->capability = api;
+#ifdef HAVE_ALSA
+ u->use_tsched = use_tsched;
+#endif
m->userdata = u;
#ifdef HAVE_ALSA
@@ -844,8 +863,20 @@ void pa__done(pa_module *m) {
if (u->devices)
pa_hashmap_free(u->devices, hal_device_free_cb, NULL);
- if (u->connection)
+ if (u->connection) {
+ DBusError error;
+ dbus_error_init(&error);
+
+ dbus_bus_remove_match(pa_dbus_connection_get(u->connection), "type='signal',sender='org.freedesktop.Hal', interface='org.freedesktop.Hal.Device.AccessControl'", &error);
+ dbus_error_free(&error);
+
+ dbus_bus_remove_match(pa_dbus_connection_get(u->connection), "type='signal',interface='org.pulseaudio.Server'", &error);
+ dbus_error_free(&error);
+
+ dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u);
+
pa_dbus_connection_unref(u->connection);
+ }
pa_xfree(u);
}
diff --git a/src/modules/module-jack-sink.c b/src/modules/module-jack-sink.c
index 7270118..555cb82 100644
--- a/src/modules/module-jack-sink.c
+++ b/src/modules/module-jack-sink.c
@@ -1,5 +1,3 @@
-/* $Id: module-jack-sink.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -53,7 +51,7 @@
/* General overview:
*
- * Because JACK has a very unflexible event loop management, which
+ * Because JACK has a very unflexible event loop management which
* doesn't allow us to add our own event sources to the event thread
* we cannot use the JACK real-time thread for dispatching our PA
* work. Instead, we run an additional RT thread which does most of
@@ -132,12 +130,12 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
void *p;
pa_assert(offset > 0);
- nbytes = offset * pa_frame_size(&u->sink->sample_spec);
+ nbytes = (size_t) offset * pa_frame_size(&u->sink->sample_spec);
pa_sink_render_full(u->sink, nbytes, &chunk);
p = (uint8_t*) pa_memblock_acquire(chunk.memblock) + chunk.index;
- pa_deinterleave(p, u->buffer, u->channels, sizeof(float), offset);
+ pa_deinterleave(p, u->buffer, u->channels, sizeof(float), (unsigned) offset);
pa_memblock_release(chunk.memblock);
pa_memblock_unref(chunk.memblock);
@@ -151,10 +149,10 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
ss.channels = 1;
for (c = 0; c < u->channels; c++)
- pa_silence_memory(u->buffer[c], offset * pa_sample_size(&ss), &ss);
+ pa_silence_memory(u->buffer[c], (size_t) offset * pa_sample_size(&ss), &ss);
}
- u->frames_in_buffer = offset;
+ u->frames_in_buffer = (jack_nframes_t) offset;
u->saved_frame_time = * (jack_nframes_t*) data;
u->saved_frame_time_valid = TRUE;
@@ -224,6 +222,10 @@ static void thread_func(void *userdata) {
for (;;) {
int ret;
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
+
if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
goto fail;
@@ -276,7 +278,7 @@ int pa__init(pa_module*m) {
pa_bool_t do_connect = TRUE;
unsigned i;
const char **ports = NULL, **p;
- char *t;
+ pa_sink_new_data data;
pa_assert(m);
@@ -300,9 +302,8 @@ int pa__init(pa_module*m) {
u->module = m;
m->userdata = u;
u->saved_frame_time_valid = FALSE;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
/* The queue linking the JACK thread and our RT thread */
u->jack_msgq = pa_asyncmsgq_new(0);
@@ -312,7 +313,7 @@ int pa__init(pa_module*m) {
* all other drivers make: supplying the audio device with data is
* the top priority -- and as long as that is possible we don't do
* anything else */
- u->rtpoll_item = pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY-1, u->jack_msgq);
+ u->rtpoll_item = pa_rtpoll_item_new_asyncmsgq_read(u->rtpoll, PA_RTPOLL_EARLY-1, u->jack_msgq);
if (!(u->client = jack_client_open(client_name, server_name ? JackServerName : JackNullOption, &status, server_name))) {
pa_log("jack_client_open() failed.");
@@ -333,8 +334,7 @@ int pa__init(pa_module*m) {
goto fail;
}
- pa_assert_se(pa_channel_map_init_auto(&map, channels, PA_CHANNEL_MAP_AUX));
- pa_channel_map_init_auto(&map, channels, PA_CHANNEL_MAP_ALSA);
+ pa_channel_map_init_extend(&map, channels, PA_CHANNEL_MAP_ALSA);
if (pa_modargs_get_channel_map(ma, NULL, &map) < 0 || map.channels != channels) {
pa_log("Failed to parse channel_map= argument.");
goto fail;
@@ -342,7 +342,7 @@ int pa__init(pa_module*m) {
pa_log_info("Successfully connected as '%s'", jack_get_client_name(u->client));
- ss.channels = u->channels = channels;
+ u->channels = ss.channels = (uint8_t) channels;
ss.rate = jack_get_sample_rate(u->client);
ss.format = PA_SAMPLE_FLOAT32NE;
@@ -355,20 +355,31 @@ int pa__init(pa_module*m) {
}
}
- if (!(u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) {
- pa_log("failed to create sink.");
+ pa_sink_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_sink_new_data_set_name(&data, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME));
+ pa_sink_new_data_set_sample_spec(&data, &ss);
+ pa_sink_new_data_set_channel_map(&data, &map);
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_API, "jack");
+ if (server_name)
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, server_name);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Jack sink (%s)", jack_get_client_name(u->client));
+ pa_proplist_sets(data.proplist, "jack.client_name", jack_get_client_name(u->client));
+
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY);
+ pa_sink_new_data_done(&data);
+
+ if (!u->sink) {
+ pa_log("Failed to create sink.");
goto fail;
}
u->sink->parent.process_msg = sink_process_msg;
u->sink->userdata = u;
- u->sink->flags = PA_SINK_LATENCY;
- pa_sink_set_module(u->sink, m);
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc("Jack sink (%s)", jack_get_client_name(u->client)));
- pa_xfree(t);
jack_set_process_callback(u->client, jack_process, u);
jack_on_shutdown(u->client, jack_shutdown, u);
diff --git a/src/modules/module-jack-source.c b/src/modules/module-jack-source.c
index 394afcf..9eccbbf 100644
--- a/src/modules/module-jack-source.c
+++ b/src/modules/module-jack-source.c
@@ -1,5 +1,3 @@
-/* $Id: module-jack-source.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -118,7 +116,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
if (u->source->thread_info.state == PA_SOURCE_RUNNING)
pa_source_post(u->source, chunk);
- u->saved_frame_time = offset;
+ u->saved_frame_time = (jack_nframes_t) offset;
u->saved_frame_time_valid = TRUE;
return 0;
@@ -253,7 +251,7 @@ int pa__init(pa_module*m) {
pa_bool_t do_connect = TRUE;
unsigned i;
const char **ports = NULL, **p;
- char *t;
+ pa_source_new_data data;
pa_assert(m);
@@ -278,12 +276,11 @@ int pa__init(pa_module*m) {
m->userdata = u;
u->saved_frame_time_valid = FALSE;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
u->jack_msgq = pa_asyncmsgq_new(0);
- u->rtpoll_item = pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY-1, u->jack_msgq);
+ u->rtpoll_item = pa_rtpoll_item_new_asyncmsgq_read(u->rtpoll, PA_RTPOLL_EARLY-1, u->jack_msgq);
if (!(u->client = jack_client_open(client_name, server_name ? JackServerName : JackNullOption, &status, server_name))) {
pa_log("jack_client_open() failed.");
@@ -304,8 +301,7 @@ int pa__init(pa_module*m) {
goto fail;
}
- pa_assert_se(pa_channel_map_init_auto(&map, channels, PA_CHANNEL_MAP_AUX));
- pa_channel_map_init_auto(&map, channels, PA_CHANNEL_MAP_ALSA);
+ pa_channel_map_init_extend(&map, channels, PA_CHANNEL_MAP_ALSA);
if (pa_modargs_get_channel_map(ma, NULL, &map) < 0 || map.channels != channels) {
pa_log("failed to parse channel_map= argument.");
goto fail;
@@ -313,7 +309,7 @@ int pa__init(pa_module*m) {
pa_log_info("Successfully connected as '%s'", jack_get_client_name(u->client));
- ss.channels = u->channels = channels;
+ u->channels = ss.channels = (uint8_t) channels;
ss.rate = jack_get_sample_rate(u->client);
ss.format = PA_SAMPLE_FLOAT32NE;
@@ -326,20 +322,31 @@ int pa__init(pa_module*m) {
}
}
- if (!(u->source = pa_source_new(m->core, __FILE__, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME), 0, &ss, &map))) {
- pa_log("failed to create source.");
+ pa_source_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_source_new_data_set_name(&data, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME));
+ pa_source_new_data_set_sample_spec(&data, &ss);
+ pa_source_new_data_set_channel_map(&data, &map);
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_API, "jack");
+ if (server_name)
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, server_name);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Jack source (%s)", jack_get_client_name(u->client));
+ pa_proplist_sets(data.proplist, "jack.client_name", jack_get_client_name(u->client));
+
+ u->source = pa_source_new(m->core, &data, PA_SOURCE_LATENCY);
+ pa_source_new_data_done(&data);
+
+ if (!u->source) {
+ pa_log("Failed to create source.");
goto fail;
}
u->source->parent.process_msg = source_process_msg;
u->source->userdata = u;
- u->source->flags = PA_SOURCE_LATENCY;
- pa_source_set_module(u->source, m);
pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
pa_source_set_rtpoll(u->source, u->rtpoll);
- pa_source_set_description(u->source, t = pa_sprintf_malloc("Jack source (%s)", jack_get_client_name(u->client)));
- pa_xfree(t);
jack_set_process_callback(u->client, jack_process, u);
jack_on_shutdown(u->client, jack_shutdown, u);
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index f9bd7a8..9127af0 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -1,9 +1,7 @@
-/* $Id: module-ladspa-sink.c 2153 2008-03-27 23:22:57Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -41,6 +39,7 @@
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
#include <pulsecore/sample-util.h>
+#include <pulsecore/ltdl-helper.h>
#include "module-ladspa-sink-symdef.h"
#include "ladspa.h"
@@ -60,6 +59,8 @@ PA_MODULE_USAGE(
"label=<ladspa plugin label> "
"control=<comma seperated list of input control values>");
+#define MEMBLOCKQ_MAXLENGTH (16*1024*1024)
+
struct userdata {
pa_core *core;
pa_module *module;
@@ -79,7 +80,7 @@ struct userdata {
about control out ports. We connect them all to this single buffer. */
LADSPA_Data control_out;
- pa_memchunk memchunk;
+ pa_memblockq *memblockq;
};
static const char* const valid_modargs[] = {
@@ -104,10 +105,14 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
case PA_SINK_MESSAGE_GET_LATENCY: {
pa_usec_t usec = 0;
+ /* Get the latency of the master sink */
if (PA_MSGOBJECT(u->master)->process_msg(PA_MSGOBJECT(u->master), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
usec = 0;
- *((pa_usec_t*) data) = usec + pa_bytes_to_usec(u->memchunk.length, &u->sink->sample_spec);
+ /* Add the latency internal to our sink input on top */
+ usec += pa_bytes_to_usec(pa_memblockq_get_length(u->sink_input->thread_info.render_memblockq), &u->master->sample_spec);
+
+ *((pa_usec_t*) data) = usec;
return 0;
}
}
@@ -122,110 +127,170 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
pa_sink_assert_ref(s);
pa_assert_se(u = s->userdata);
- if (PA_SINK_LINKED(state) && u->sink_input && PA_SINK_INPUT_LINKED(pa_sink_input_get_state(u->sink_input)))
+ if (PA_SINK_IS_LINKED(state) &&
+ u->sink_input &&
+ PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
+
pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
return 0;
}
/* Called from I/O thread context */
-static int sink_input_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
- struct userdata *u = PA_SINK_INPUT(o)->userdata;
+static void sink_request_rewind(pa_sink *s) {
+ struct userdata *u;
- switch (code) {
- case PA_SINK_INPUT_MESSAGE_GET_LATENCY:
- *((pa_usec_t*) data) = pa_bytes_to_usec(u->memchunk.length, &u->sink_input->sample_spec);
+ pa_sink_assert_ref(s);
+ pa_assert_se(u = s->userdata);
- /* Fall through, the default handler will add in the extra
- * latency added by the resampler */
- break;
- }
+ /* Just hand this one over to the master sink */
+ pa_sink_input_request_rewind(u->sink_input, s->thread_info.rewind_nbytes + pa_memblockq_get_length(u->memblockq), TRUE, FALSE);
+}
+
+/* Called from I/O thread context */
+static void sink_update_requested_latency(pa_sink *s) {
+ struct userdata *u;
+
+ pa_sink_assert_ref(s);
+ pa_assert_se(u = s->userdata);
- return pa_sink_input_process_msg(o, code, data, offset, chunk);
+ /* Just hand this one over to the master sink */
+ pa_sink_input_set_requested_latency_within_thread(
+ u->sink_input,
+ pa_sink_get_requested_latency_within_thread(s));
}
/* Called from I/O thread context */
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) {
struct userdata *u;
+ float *src, *dst;
+ size_t fs;
+ unsigned n, c;
+ pa_memchunk tchunk;
pa_sink_input_assert_ref(i);
+ pa_assert(chunk);
pa_assert_se(u = i->userdata);
- if (!u->memchunk.memblock) {
- pa_memchunk tchunk;
- float *src, *dst;
- size_t fs;
- unsigned n, c;
-
- pa_sink_render(u->sink, length, &tchunk);
+ if (!u->sink || !PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ return -1;
- fs = pa_frame_size(&i->sample_spec);
- n = tchunk.length / fs;
+ while (pa_memblockq_peek(u->memblockq, &tchunk) < 0) {
+ pa_memchunk nchunk;
- pa_assert(n > 0);
-
- u->memchunk.memblock = pa_memblock_new(i->sink->core->mempool, tchunk.length);
- u->memchunk.index = 0;
- u->memchunk.length = tchunk.length;
+ pa_sink_render(u->sink, nbytes, &nchunk);
+ pa_memblockq_push(u->memblockq, &nchunk);
+ pa_memblock_unref(nchunk.memblock);
+ }
- src = (float*) ((uint8_t*) pa_memblock_acquire(tchunk.memblock) + tchunk.index);
- dst = (float*) pa_memblock_acquire(u->memchunk.memblock);
+ tchunk.length = PA_MIN(nbytes, tchunk.length);
+ pa_assert(tchunk.length > 0);
- for (c = 0; c < u->channels; c++) {
- unsigned j;
- float *p, *q;
+ fs = pa_frame_size(&i->sample_spec);
+ n = (unsigned) (PA_MIN(tchunk.length, u->block_size) / fs);
- p = src + c;
- q = u->input;
- for (j = 0; j < n; j++, p += u->channels, q++)
- *q = PA_CLAMP_UNLIKELY(*p, -1.0, 1.0);
+ pa_assert(n > 0);
- u->descriptor->run(u->handle[c], n);
+ chunk->index = 0;
+ chunk->length = n*fs;
+ chunk->memblock = pa_memblock_new(i->sink->core->mempool, chunk->length);
- q = u->output;
- p = dst + c;
- for (j = 0; j < n; j++, q++, p += u->channels)
- *p = PA_CLAMP_UNLIKELY(*q, -1.0, 1.0);
- }
+ pa_memblockq_drop(u->memblockq, chunk->length);
- pa_memblock_release(tchunk.memblock);
- pa_memblock_release(u->memchunk.memblock);
+ src = (float*) ((uint8_t*) pa_memblock_acquire(tchunk.memblock) + tchunk.index);
+ dst = (float*) pa_memblock_acquire(chunk->memblock);
- pa_memblock_unref(tchunk.memblock);
+ for (c = 0; c < u->channels; c++) {
+ pa_sample_clamp(PA_SAMPLE_FLOAT32NE, u->input, sizeof(float), src+c, u->channels*sizeof(float), n);
+ u->descriptor->run(u->handle[c], n);
+ pa_sample_clamp(PA_SAMPLE_FLOAT32NE, dst+c, u->channels*sizeof(float), u->output, sizeof(float), n);
}
- pa_assert(u->memchunk.length > 0);
- pa_assert(u->memchunk.memblock);
+ pa_memblock_release(tchunk.memblock);
+ pa_memblock_release(chunk->memblock);
- *chunk = u->memchunk;
- pa_memblock_ref(chunk->memblock);
+ pa_memblock_unref(tchunk.memblock);
return 0;
}
/* Called from I/O thread context */
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
struct userdata *u;
+ size_t amount = 0;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- pa_assert(length > 0);
- if (u->memchunk.memblock) {
+ if (!u->sink || !PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ return;
- if (length < u->memchunk.length) {
- u->memchunk.index += length;
- u->memchunk.length -= length;
- return;
- }
+ if (u->sink->thread_info.rewind_nbytes > 0) {
+ size_t max_rewrite;
+
+ max_rewrite = nbytes + pa_memblockq_get_length(u->memblockq);
+ amount = PA_MIN(u->sink->thread_info.rewind_nbytes, max_rewrite);
+ u->sink->thread_info.rewind_nbytes = 0;
- pa_memblock_unref(u->memchunk.memblock);
- length -= u->memchunk.length;
- pa_memchunk_reset(&u->memchunk);
+ if (amount > 0) {
+ unsigned c;
+
+ pa_memblockq_seek(u->memblockq, - (int64_t) amount, PA_SEEK_RELATIVE);
+
+ pa_log_debug("Resetting plugin");
+
+ /* Reset the plugin */
+ if (u->descriptor->deactivate)
+ for (c = 0; c < u->channels; c++)
+ u->descriptor->deactivate(u->handle[c]);
+ if (u->descriptor->activate)
+ for (c = 0; c < u->channels; c++)
+ u->descriptor->activate(u->handle[c]);
+ }
}
- if (length > 0)
- pa_sink_skip(u->sink, length);
+ pa_sink_process_rewind(u->sink, amount);
+ pa_memblockq_rewind(u->memblockq, nbytes);
+}
+
+/* Called from I/O thread context */
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
+
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
+ pa_memblockq_set_maxrewind(u->memblockq, nbytes);
+ pa_sink_set_max_rewind(u->sink, nbytes);
+}
+
+/* Called from I/O thread context */
+static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
+
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
+ pa_sink_set_max_request(u->sink, nbytes);
+}
+
+/* Called from I/O thread context */
+static void sink_input_update_sink_latency_range_cb(pa_sink_input *i) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
+
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
+ pa_sink_update_latency_range(u->sink, i->sink->thread_info.min_latency, i->sink->thread_info.max_latency);
}
/* Called from I/O thread context */
@@ -235,7 +300,12 @@ static void sink_input_detach_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
pa_sink_detach_within_thread(u->sink);
+ pa_sink_set_asyncmsgq(u->sink, NULL);
+ pa_sink_set_rtpoll(u->sink, NULL);
}
/* Called from I/O thread context */
@@ -245,10 +315,14 @@ static void sink_input_attach_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
pa_sink_set_asyncmsgq(u->sink, i->sink->asyncmsgq);
pa_sink_set_rtpoll(u->sink, i->sink->rtpoll);
-
pa_sink_attach_within_thread(u->sink);
+
+ pa_sink_update_latency_range(u->sink, u->master->thread_info.min_latency, u->master->thread_info.max_latency);
}
/* Called from main context */
@@ -258,15 +332,31 @@ static void sink_input_kill_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ pa_sink_unlink(u->sink);
pa_sink_input_unlink(u->sink_input);
- pa_sink_input_unref(u->sink_input);
- u->sink_input = NULL;
- pa_sink_unlink(u->sink);
pa_sink_unref(u->sink);
u->sink = NULL;
+ pa_sink_input_unref(u->sink_input);
+ u->sink_input = NULL;
+
+ pa_module_unload_request(u->module, TRUE);
+}
+
+/* Called from IO thread context */
+static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
- pa_module_unload_request(u->module);
+ /* If we are added for the first time, ask for a rewinding so that
+ * we are heard right-away. */
+ if (PA_SINK_INPUT_IS_LINKED(state) &&
+ i->thread_info.state == PA_SINK_INPUT_INIT) {
+ pa_log_debug("Requesting rewind due to state change.");
+ pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
+ }
}
int pa__init(pa_module*m) {
@@ -275,8 +365,10 @@ int pa__init(pa_module*m) {
pa_channel_map map;
pa_modargs *ma;
char *t;
+ const char *z;
pa_sink *master;
- pa_sink_input_new_data data;
+ pa_sink_input_new_data sink_input_data;
+ pa_sink_new_data sink_data;
const char *plugin, *label;
LADSPA_Descriptor_Function descriptor_func;
const char *e, *cdata;
@@ -284,7 +376,6 @@ int pa__init(pa_module*m) {
unsigned long input_port, output_port, p, j, n_control;
unsigned c;
pa_bool_t *use_default = NULL;
- char *default_sink_name = NULL;
pa_assert(m);
@@ -325,7 +416,9 @@ int pa__init(pa_module*m) {
u->module = m;
m->userdata = u;
u->master = master;
- pa_memchunk_reset(&u->memchunk);
+ u->sink = NULL;
+ u->sink_input = NULL;
+ u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL);
if (!(e = getenv("LADSPA_PATH")))
e = LADSPA_PATH;
@@ -342,7 +435,7 @@ int pa__init(pa_module*m) {
goto fail;
}
- if (!(descriptor_func = (LADSPA_Descriptor_Function) lt_dlsym(m->dl, "ladspa_descriptor"))) {
+ if (!(descriptor_func = (LADSPA_Descriptor_Function) pa_load_sym(m->dl, NULL, "ladspa_descriptor"))) {
pa_log("LADSPA module lacks ladspa_descriptor() symbol.");
goto fail;
}
@@ -350,7 +443,7 @@ int pa__init(pa_module*m) {
for (j = 0;; j++) {
if (!(d = descriptor_func(j))) {
- pa_log("Failed to find plugin label '%s' in plugin '%s'.", plugin, label);
+ pa_log("Failed to find plugin label '%s' in plugin '%s'.", label, plugin);
goto fail;
}
@@ -409,9 +502,9 @@ int pa__init(pa_module*m) {
u->block_size = pa_frame_align(pa_mempool_block_size_max(m->core->mempool), &ss);
- u->input = (LADSPA_Data*) pa_xnew(uint8_t, u->block_size);
+ u->input = (LADSPA_Data*) pa_xnew(uint8_t, (unsigned) u->block_size);
if (LADSPA_IS_INPLACE_BROKEN(d->Properties))
- u->output = (LADSPA_Data*) pa_xnew(uint8_t, u->block_size);
+ u->output = (LADSPA_Data*) pa_xnew(uint8_t, (unsigned) u->block_size);
else
u->output = u->input;
@@ -437,12 +530,12 @@ int pa__init(pa_module*m) {
char *k;
unsigned long h;
- u->control = pa_xnew(LADSPA_Data, n_control);
- use_default = pa_xnew(pa_bool_t, n_control);
+ u->control = pa_xnew(LADSPA_Data, (unsigned) n_control);
+ use_default = pa_xnew(pa_bool_t, (unsigned) n_control);
p = 0;
while ((k = pa_split(cdata, ",", &state)) && p < n_control) {
- float f;
+ double f;
if (*k == 0) {
use_default[p++] = TRUE;
@@ -450,7 +543,7 @@ int pa__init(pa_module*m) {
continue;
}
- if (pa_atof(k, &f) < 0) {
+ if (pa_atod(k, &f) < 0) {
pa_log("Failed to parse control value '%s'", k);
pa_xfree(k);
goto fail;
@@ -459,7 +552,7 @@ int pa__init(pa_module*m) {
pa_xfree(k);
use_default[p] = FALSE;
- u->control[p++] = f;
+ u->control[p++] = (LADSPA_Data) f;
}
/* The previous loop doesn't take the last control value into account
@@ -508,8 +601,8 @@ int pa__init(pa_module*m) {
upper = d->PortRangeHints[p].UpperBound;
if (LADSPA_IS_HINT_SAMPLE_RATE(hint)) {
- lower *= ss.rate;
- upper *= ss.rate;
+ lower *= (LADSPA_Data) ss.rate;
+ upper *= (LADSPA_Data) ss.rate;
}
switch (hint & LADSPA_HINT_DEFAULT_MASK) {
@@ -524,23 +617,23 @@ int pa__init(pa_module*m) {
case LADSPA_HINT_DEFAULT_LOW:
if (LADSPA_IS_HINT_LOGARITHMIC(hint))
- u->control[h] = exp(log(lower) * 0.75 + log(upper) * 0.25);
+ u->control[h] = (LADSPA_Data) exp(log(lower) * 0.75 + log(upper) * 0.25);
else
- u->control[h] = lower * 0.75 + upper * 0.25;
+ u->control[h] = (LADSPA_Data) (lower * 0.75 + upper * 0.25);
break;
case LADSPA_HINT_DEFAULT_MIDDLE:
if (LADSPA_IS_HINT_LOGARITHMIC(hint))
- u->control[h] = exp(log(lower) * 0.5 + log(upper) * 0.5);
+ u->control[h] = (LADSPA_Data) exp(log(lower) * 0.5 + log(upper) * 0.5);
else
- u->control[h] = lower * 0.5 + upper * 0.5;
+ u->control[h] = (LADSPA_Data) (lower * 0.5 + upper * 0.5);
break;
case LADSPA_HINT_DEFAULT_HIGH:
if (LADSPA_IS_HINT_LOGARITHMIC(hint))
- u->control[h] = exp(log(lower) * 0.25 + log(upper) * 0.75);
+ u->control[h] = (LADSPA_Data) exp(log(lower) * 0.25 + log(upper) * 0.75);
else
- u->control[h] = lower * 0.25 + upper * 0.75;
+ u->control[h] = (LADSPA_Data) (lower * 0.25 + upper * 0.75);
break;
case LADSPA_HINT_DEFAULT_0:
@@ -582,43 +675,68 @@ int pa__init(pa_module*m) {
for (c = 0; c < u->channels; c++)
d->activate(u->handle[c]);
- default_sink_name = pa_sprintf_malloc("%s.ladspa", master->name);
-
/* Create sink */
- if (!(u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", default_sink_name), 0, &ss, &map))) {
+ pa_sink_new_data_init(&sink_data);
+ sink_data.driver = __FILE__;
+ sink_data.module = m;
+ if (!(sink_data.name = pa_xstrdup(pa_modargs_get_value(ma, "sink_name", NULL))))
+ sink_data.name = pa_sprintf_malloc("%s.ladspa", master->name);
+ sink_data.namereg_fail = FALSE;
+ pa_sink_new_data_set_sample_spec(&sink_data, &ss);
+ pa_sink_new_data_set_channel_map(&sink_data, &map);
+ z = pa_proplist_gets(master->proplist, PA_PROP_DEVICE_DESCRIPTION);
+ pa_proplist_setf(sink_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "LADSPA Plugin %s on %s", label, z ? z : master->name);
+ pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_MASTER_DEVICE, master->name);
+ pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_CLASS, "filter");
+ pa_proplist_sets(sink_data.proplist, "device.ladspa.module", plugin);
+ pa_proplist_sets(sink_data.proplist, "device.ladspa.label", d->Label);
+ pa_proplist_sets(sink_data.proplist, "device.ladspa.name", d->Name);
+ pa_proplist_sets(sink_data.proplist, "device.ladspa.maker", d->Maker);
+ pa_proplist_sets(sink_data.proplist, "device.ladspa.copyright", d->Copyright);
+ pa_proplist_setf(sink_data.proplist, "device.ladspa.unique_id", "%lu", (unsigned long) d->UniqueID);
+
+ u->sink = pa_sink_new(m->core, &sink_data, PA_SINK_LATENCY);
+ pa_sink_new_data_done(&sink_data);
+
+ if (!u->sink) {
pa_log("Failed to create sink.");
goto fail;
}
u->sink->parent.process_msg = sink_process_msg;
u->sink->set_state = sink_set_state;
+ u->sink->update_requested_latency = sink_update_requested_latency;
+ u->sink->request_rewind = sink_request_rewind;
u->sink->userdata = u;
- u->sink->flags = PA_SINK_LATENCY;
- pa_sink_set_module(u->sink, m);
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc("LADSPA plugin '%s' on '%s'", label, master->description));
- pa_xfree(t);
pa_sink_set_asyncmsgq(u->sink, master->asyncmsgq);
pa_sink_set_rtpoll(u->sink, master->rtpoll);
/* Create sink input */
- pa_sink_input_new_data_init(&data);
- data.sink = u->master;
- data.driver = __FILE__;
- data.name = "LADSPA Stream";
- pa_sink_input_new_data_set_sample_spec(&data, &ss);
- pa_sink_input_new_data_set_channel_map(&data, &map);
- data.module = m;
-
- if (!(u->sink_input = pa_sink_input_new(m->core, &data, PA_SINK_INPUT_DONT_MOVE)))
+ pa_sink_input_new_data_init(&sink_input_data);
+ sink_input_data.driver = __FILE__;
+ sink_input_data.module = m;
+ sink_input_data.sink = u->master;
+ pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_NAME, "LADSPA Stream");
+ pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, "filter");
+ pa_sink_input_new_data_set_sample_spec(&sink_input_data, &ss);
+ pa_sink_input_new_data_set_channel_map(&sink_input_data, &map);
+
+ u->sink_input = pa_sink_input_new(m->core, &sink_input_data, PA_SINK_INPUT_DONT_MOVE);
+ pa_sink_input_new_data_done(&sink_input_data);
+
+ if (!u->sink_input)
goto fail;
- u->sink_input->parent.process_msg = sink_input_process_msg;
- u->sink_input->peek = sink_input_peek_cb;
- u->sink_input->drop = sink_input_drop_cb;
+ u->sink_input->pop = sink_input_pop_cb;
+ u->sink_input->process_rewind = sink_input_process_rewind_cb;
+ u->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
+ u->sink_input->update_max_request = sink_input_update_max_request_cb;
+ u->sink_input->update_sink_latency_range = sink_input_update_sink_latency_range_cb;
u->sink_input->kill = sink_input_kill_cb;
u->sink_input->attach = sink_input_attach_cb;
u->sink_input->detach = sink_input_detach_cb;
+ u->sink_input->state_change = sink_input_state_change_cb;
u->sink_input->userdata = u;
pa_sink_put(u->sink);
@@ -627,7 +745,6 @@ int pa__init(pa_module*m) {
pa_modargs_free(ma);
pa_xfree(use_default);
- pa_xfree(default_sink_name);
return 0;
@@ -636,7 +753,6 @@ fail:
pa_modargs_free(ma);
pa_xfree(use_default);
- pa_xfree(default_sink_name);
pa__done(m);
@@ -652,18 +768,15 @@ void pa__done(pa_module*m) {
if (!(u = m->userdata))
return;
- if (u->sink_input) {
- pa_sink_input_unlink(u->sink_input);
- pa_sink_input_unref(u->sink_input);
- }
-
if (u->sink) {
pa_sink_unlink(u->sink);
pa_sink_unref(u->sink);
}
- if (u->memchunk.memblock)
- pa_memblock_unref(u->memchunk.memblock);
+ if (u->sink_input) {
+ pa_sink_input_unlink(u->sink_input);
+ pa_sink_input_unref(u->sink_input);
+ }
for (c = 0; c < u->channels; c++)
if (u->handle[c]) {
@@ -675,6 +788,9 @@ void pa__done(pa_module*m) {
if (u->output != u->input)
pa_xfree(u->output);
+ if (u->memblockq)
+ pa_memblockq_free(u->memblockq);
+
pa_xfree(u->input);
pa_xfree(u->control);
diff --git a/src/modules/module-lirc.c b/src/modules/module-lirc.c
index 0448d5b..97e97dc 100644
--- a/src/modules/module-lirc.c
+++ b/src/modules/module-lirc.c
@@ -1,5 +1,3 @@
-/* $Id: module-lirc.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -67,7 +65,7 @@ struct userdata {
static int lirc_in_use = 0;
-static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GCC_UNUSED int fd, pa_io_event_flags_t events, void*userdata) {
+static void io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_io_event_flags_t events, void*userdata) {
struct userdata *u = userdata;
char *name = NULL, *code = NULL;
@@ -124,7 +122,7 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC
pa_log("Failed to get sink '%s'", u->sink_name);
else {
int i;
- pa_cvolume cv = *pa_sink_get_volume(s);
+ pa_cvolume cv = *pa_sink_get_volume(s, FALSE);
#define DELTA (PA_VOLUME_NORM/20)
@@ -161,7 +159,7 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC
case MUTE_TOGGLE:
- pa_sink_set_mute(s, !pa_sink_get_mute(s));
+ pa_sink_set_mute(s, !pa_sink_get_mute(s, FALSE));
break;
case INVALID:
@@ -180,7 +178,7 @@ fail:
u->module->core->mainloop->io_free(u->io);
u->io = NULL;
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
pa_xfree(code);
}
diff --git a/src/modules/module-match.c b/src/modules/module-match.c
index 8fb20b3..769a6b5 100644
--- a/src/modules/module-match.c
+++ b/src/modules/module-match.c
@@ -1,5 +1,3 @@
-/* $Id: module-match.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -82,12 +80,14 @@ static int load_rules(struct userdata *u, const char *filename) {
pa_assert(u);
- f = filename ?
- fopen(fn = pa_xstrdup(filename), "r") :
- pa_open_config_file(DEFAULT_MATCH_TABLE_FILE, DEFAULT_MATCH_TABLE_FILE_USER, NULL, &fn, "r");
+ if (filename)
+ f = fopen(fn = pa_xstrdup(filename), "r");
+ else
+ f = pa_open_config_file(DEFAULT_MATCH_TABLE_FILE, DEFAULT_MATCH_TABLE_FILE_USER, NULL, &fn);
if (!f) {
- pa_log("failed to open file '%s': %s", fn, pa_cstrerror(errno));
+ pa_xfree(fn);
+ pa_log("Failed to open file config file: %s", pa_cstrerror(errno));
goto finish;
}
@@ -166,6 +166,7 @@ static void callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, v
struct userdata *u = userdata;
pa_sink_input *si;
struct rule *r;
+ const char *n;
pa_assert(c);
pa_assert(u);
@@ -176,13 +177,13 @@ static void callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, v
if (!(si = pa_idxset_get_by_index(c->sink_inputs, idx)))
return;
- if (!si->name)
+ if (!(n = pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)))
return;
for (r = u->rules; r; r = r->next) {
- if (!regexec(&r->regex, si->name, 0, NULL, 0)) {
+ if (!regexec(&r->regex, n, 0, NULL, 0)) {
pa_cvolume cv;
- pa_log_debug("changing volume of sink input '%s' to 0x%03x", si->name, r->volume);
+ pa_log_debug("changing volume of sink input '%s' to 0x%03x", n, r->volume);
pa_cvolume_set(&cv, si->sample_spec.channels, r->volume);
pa_sink_input_set_volume(si, &cv);
}
diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c
index dff2b39..21f176a 100644
--- a/src/modules/module-mmkbd-evdev.c
+++ b/src/modules/module-mmkbd-evdev.c
@@ -1,5 +1,3 @@
-/* $Id: module-mmkbd-evdev.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -78,7 +76,7 @@ struct userdata {
pa_module *module;
};
-static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GCC_UNUSED int fd, pa_io_event_flags_t events, void*userdata) {
+static void io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_io_event_flags_t events, void*userdata) {
struct userdata *u = userdata;
pa_assert(io);
@@ -115,7 +113,7 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC
pa_log("Failed to get sink '%s'", u->sink_name);
else {
int i;
- pa_cvolume cv = *pa_sink_get_volume(s);
+ pa_cvolume cv = *pa_sink_get_volume(s, FALSE);
#define DELTA (PA_VOLUME_NORM/20)
@@ -144,7 +142,7 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC
case MUTE_TOGGLE:
- pa_sink_set_mute(s, !pa_sink_get_mute(s));
+ pa_sink_set_mute(s, !pa_sink_get_mute(s, FALSE));
break;
case INVALID:
@@ -161,7 +159,7 @@ fail:
u->module->core->mainloop->io_free(u->io);
u->io = NULL;
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
#define test_bit(bit, array) (array[bit/8] & (1<<(bit%8)))
diff --git a/src/modules/module-native-protocol-fd.c b/src/modules/module-native-protocol-fd.c
index 776a311..f17f435 100644
--- a/src/modules/module-native-protocol-fd.c
+++ b/src/modules/module-native-protocol-fd.c
@@ -1,5 +1,3 @@
-/* $Id: module-native-protocol-fd.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -44,15 +42,15 @@ PA_MODULE_LOAD_ONCE(TRUE);
static const char* const valid_modargs[] = {
"fd",
- "public",
- "cookie",
NULL,
};
int pa__init(pa_module*m) {
pa_iochannel *io;
pa_modargs *ma;
- int fd, r = -1;
+ int32_t fd;
+ int r = -1;
+ pa_native_options *options = NULL;
pa_assert(m);
@@ -66,12 +64,15 @@ int pa__init(pa_module*m) {
goto finish;
}
+ m->userdata = pa_native_protocol_get(m->core);
+
io = pa_iochannel_new(m->core->mainloop, fd, fd);
- if (!(m->userdata = pa_protocol_native_new_iochannel(m->core, io, m, ma))) {
- pa_iochannel_free(io);
- goto finish;
- }
+ options = pa_native_options_new();
+ options->module = m;
+ options->auth_anonymous = TRUE;
+
+ pa_native_protocol_connect(m->userdata, io, options);
r = 0;
@@ -79,11 +80,17 @@ finish:
if (ma)
pa_modargs_free(ma);
+ if (options)
+ pa_native_options_unref(options);
+
return r;
}
void pa__done(pa_module*m) {
pa_assert(m);
- pa_protocol_native_free(m->userdata);
+ if (m->userdata) {
+ pa_native_protocol_disconnect(m->userdata, m);
+ pa_native_protocol_unref(m->userdata);
+ }
}
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 5b9a15c..470c622 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -1,9 +1,7 @@
-/* $Id: module-null-sink.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -59,11 +57,12 @@ PA_MODULE_USAGE(
"format=<sample format> "
"channels=<number of channels> "
"rate=<sample rate> "
- "sink_name=<name of sink>"
- "channel_map=<channel map>"
+ "sink_name=<name of sink> "
+ "channel_map=<channel map> "
"description=<description for the sink>");
#define DEFAULT_SINK_NAME "null"
+#define MAX_LATENCY_USEC (PA_USEC_PER_SEC * 2)
struct userdata {
pa_core *core;
@@ -76,7 +75,8 @@ struct userdata {
size_t block_size;
- struct timeval timestamp;
+ pa_usec_t block_usec;
+ pa_usec_t timestamp;
};
static const char* const valid_modargs[] = {
@@ -96,26 +96,98 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
case PA_SINK_MESSAGE_SET_STATE:
if (PA_PTR_TO_UINT(data) == PA_SINK_RUNNING)
- pa_rtclock_get(&u->timestamp);
+ u->timestamp = pa_rtclock_usec();
break;
case PA_SINK_MESSAGE_GET_LATENCY: {
- struct timeval now;
+ pa_usec_t now;
- pa_rtclock_get(&now);
+ now = pa_rtclock_usec();
+ *((pa_usec_t*) data) = u->timestamp > now ? u->timestamp - now : 0;
- if (pa_timeval_cmp(&u->timestamp, &now) > 0)
- *((pa_usec_t*) data) = 0;
- else
- *((pa_usec_t*) data) = pa_timeval_diff(&u->timestamp, &now);
- break;
+ return 0;
}
}
return pa_sink_process_msg(o, code, data, offset, chunk);
}
+static void sink_update_requested_latency_cb(pa_sink *s) {
+ struct userdata *u;
+
+ pa_sink_assert_ref(s);
+ u = s->userdata;
+ pa_assert(u);
+
+ u->block_usec = pa_sink_get_requested_latency_within_thread(s);
+}
+
+static void process_rewind(struct userdata *u, pa_usec_t now) {
+ size_t rewind_nbytes, in_buffer;
+ pa_usec_t delay;
+
+ pa_assert(u);
+
+ /* Figure out how much we shall rewind and reset the counter */
+ rewind_nbytes = u->sink->thread_info.rewind_nbytes;
+ u->sink->thread_info.rewind_nbytes = 0;
+
+ pa_assert(rewind_nbytes > 0);
+ pa_log_debug("Requested to rewind %lu bytes.", (unsigned long) rewind_nbytes);
+
+ if (u->timestamp <= now)
+ goto do_nothing;
+
+ delay = u->timestamp - now;
+ in_buffer = pa_usec_to_bytes(delay, &u->sink->sample_spec);
+
+ if (in_buffer <= 0)
+ goto do_nothing;
+
+ if (rewind_nbytes > in_buffer)
+ rewind_nbytes = in_buffer;
+
+ pa_sink_process_rewind(u->sink, rewind_nbytes);
+ u->timestamp -= pa_bytes_to_usec(rewind_nbytes, &u->sink->sample_spec);
+
+ pa_log_debug("Rewound %lu bytes.", (unsigned long) rewind_nbytes);
+ return;
+
+do_nothing:
+
+ pa_sink_process_rewind(u->sink, 0);
+}
+
+static void process_render(struct userdata *u, pa_usec_t now) {
+ size_t ate = 0;
+
+ pa_assert(u);
+
+ /* This is the configured latency. Sink inputs connected to us
+ might not have a single frame more than the maxrequest value
+ queed. Hence: at maximum read this many bytes from the sink
+ inputs. */
+
+ /* Fill the buffer up the the latency size */
+ while (u->timestamp < now + u->block_usec) {
+ pa_memchunk chunk;
+
+ pa_sink_render(u->sink, u->sink->thread_info.max_request, &chunk);
+ pa_memblock_unref(chunk.memblock);
+
+/* pa_log_debug("Ate %lu bytes.", (unsigned long) chunk.length); */
+ u->timestamp += pa_bytes_to_usec(chunk.length, &u->sink->sample_spec);
+
+ ate += chunk.length;
+
+ if (ate >= u->sink->thread_info.max_request)
+ break;
+ }
+
+/* pa_log_debug("Ate in sum %lu bytes (of %lu)", (unsigned long) ate, (unsigned long) nbytes); */
+}
+
static void thread_func(void *userdata) {
struct userdata *u = userdata;
@@ -126,28 +198,33 @@ static void thread_func(void *userdata) {
pa_thread_mq_install(&u->thread_mq);
pa_rtpoll_install(u->rtpoll);
- pa_rtclock_get(&u->timestamp);
+ u->timestamp = pa_rtclock_usec();
for (;;) {
int ret;
/* Render some data and drop it immediately */
- if (u->sink->thread_info.state == PA_SINK_RUNNING) {
- struct timeval now;
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
+ pa_usec_t now;
- pa_rtclock_get(&now);
+ now = pa_rtclock_usec();
- if (pa_timeval_cmp(&u->timestamp, &now) <= 0) {
- pa_sink_skip(u->sink, u->block_size);
- pa_timeval_add(&u->timestamp, pa_bytes_to_usec(u->block_size, &u->sink->sample_spec));
+ if (u->sink->thread_info.rewind_requested) {
+ if (u->sink->thread_info.rewind_nbytes > 0)
+ process_rewind(u, now);
+ else
+ pa_sink_process_rewind(u->sink, 0);
}
- pa_rtpoll_set_timer_absolute(u->rtpoll, &u->timestamp);
+ if (u->timestamp <= now)
+ process_render(u, now);
+
+ pa_rtpoll_set_timer_absolute(u->rtpoll, u->timestamp);
} else
pa_rtpoll_set_timer_disabled(u->rtpoll);
/* Hmm, nothing to do. Let's sleep */
- if ((ret = pa_rtpoll_run(u->rtpoll, 1)) < 0)
+ if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
goto fail;
if (ret == 0)
@@ -169,6 +246,7 @@ int pa__init(pa_module*m) {
pa_sample_spec ss;
pa_channel_map map;
pa_modargs *ma = NULL;
+ pa_sink_new_data data;
pa_assert(m);
@@ -183,31 +261,42 @@ int pa__init(pa_module*m) {
goto fail;
}
- u = pa_xnew0(struct userdata, 1);
+ m->userdata = u = pa_xnew0(struct userdata, 1);
u->core = m->core;
u->module = m;
- m->userdata = u;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
-
- if (!(u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) {
- pa_log("Failed to create sink.");
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
+
+ pa_sink_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_sink_new_data_set_name(&data, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME));
+ pa_sink_new_data_set_sample_spec(&data, &ss);
+ pa_sink_new_data_set_channel_map(&data, &map);
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, pa_modargs_get_value(ma, "description", "Null Output"));
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_CLASS, "abstract");
+
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY);
+ pa_sink_new_data_done(&data);
+
+ if (!u->sink) {
+ pa_log("Failed to create sink object.");
goto fail;
}
u->sink->parent.process_msg = sink_process_msg;
+ u->sink->update_requested_latency = sink_update_requested_latency_cb;
u->sink->userdata = u;
- u->sink->flags = PA_SINK_LATENCY;
- pa_sink_set_module(u->sink, m);
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
- pa_sink_set_description(u->sink, pa_modargs_get_value(ma, "description", "NULL sink"));
- u->block_size = pa_bytes_per_second(&ss) / 20; /* 50 ms */
- if (u->block_size <= 0)
- u->block_size = pa_frame_size(&ss);
+ pa_sink_set_latency_range(u->sink, (pa_usec_t) -1, MAX_LATENCY_USEC);
+ u->block_usec = u->sink->thread_info.max_latency;
+
+ u->sink->thread_info.max_rewind =
+ u->sink->thread_info.max_request =
+ pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec);
if (!(u->thread = pa_thread_new(thread_func, u))) {
pa_log("Failed to create thread.");
diff --git a/src/modules/module-oss.c b/src/modules/module-oss.c
index 795f27d..23a3254 100644
--- a/src/modules/module-oss.c
+++ b/src/modules/module-oss.c
@@ -1,5 +1,3 @@
-/* $Id: module-oss.c 2066 2007-11-21 01:21:53Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -161,10 +159,10 @@ static void trigger(struct userdata *u, pa_bool_t quick) {
pa_log_debug("trigger");
- if (u->source && PA_SOURCE_OPENED(u->source->thread_info.state))
+ if (u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state))
enable_bits |= PCM_ENABLE_INPUT;
- if (u->sink && PA_SINK_OPENED(u->sink->thread_info.state))
+ if (u->sink && PA_SINK_IS_OPENED(u->sink->thread_info.state))
enable_bits |= PCM_ENABLE_OUTPUT;
pa_log_debug("trigger: %i", enable_bits);
@@ -202,7 +200,7 @@ static void trigger(struct userdata *u, pa_bool_t quick) {
* register the fd as ready.
*/
- if (u->source && PA_SOURCE_OPENED(u->source->thread_info.state)) {
+ if (u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state)) {
uint8_t *buf = pa_xnew(uint8_t, u->in_fragment_size);
pa_read(u->fd, buf, u->in_fragment_size, NULL);
pa_xfree(buf);
@@ -260,7 +258,7 @@ static int mmap_write(struct userdata *u) {
u->out_mmap_saved_nfrags = 0;
if (info.blocks > 0)
- mmap_fill_memblocks(u, info.blocks);
+ mmap_fill_memblocks(u, (unsigned) info.blocks);
return info.blocks;
}
@@ -338,7 +336,7 @@ static int mmap_read(struct userdata *u) {
u->in_mmap_saved_nfrags = 0;
if (info.blocks > 0) {
- mmap_post_memblocks(u, info.blocks);
+ mmap_post_memblocks(u, (unsigned) info.blocks);
mmap_clear_memblocks(u, u->in_nfrags/2);
}
@@ -358,12 +356,12 @@ static pa_usec_t mmap_sink_get_latency(struct userdata *u) {
u->out_mmap_saved_nfrags += info.blocks;
- bpos = ((u->out_mmap_current + u->out_mmap_saved_nfrags) * u->out_fragment_size) % u->out_hwbuf_size;
+ bpos = ((u->out_mmap_current + (unsigned) u->out_mmap_saved_nfrags) * u->out_fragment_size) % u->out_hwbuf_size;
if (bpos <= (size_t) info.ptr)
- n = u->out_hwbuf_size - (info.ptr - bpos);
+ n = u->out_hwbuf_size - ((size_t) info.ptr - bpos);
else
- n = bpos - info.ptr;
+ n = bpos - (size_t) info.ptr;
/* pa_log("n = %u, bpos = %u, ptr = %u, total=%u, fragsize = %u, n_frags = %u\n", n, bpos, (unsigned) info.ptr, total, u->out_fragment_size, u->out_fragments); */
@@ -382,12 +380,12 @@ static pa_usec_t mmap_source_get_latency(struct userdata *u) {
}
u->in_mmap_saved_nfrags += info.blocks;
- bpos = ((u->in_mmap_current + u->in_mmap_saved_nfrags) * u->in_fragment_size) % u->in_hwbuf_size;
+ bpos = ((u->in_mmap_current + (unsigned) u->in_mmap_saved_nfrags) * u->in_fragment_size) % u->in_hwbuf_size;
if (bpos <= (size_t) info.ptr)
- n = info.ptr - bpos;
+ n = (size_t) info.ptr - bpos;
else
- n = u->in_hwbuf_size - bpos + info.ptr;
+ n = u->in_hwbuf_size - bpos + (size_t) info.ptr;
/* pa_log("n = %u, bpos = %u, ptr = %u, total=%u, fragsize = %u, n_frags = %u\n", n, bpos, (unsigned) info.ptr, total, u->in_fragment_size, u->in_fragments); */
@@ -406,7 +404,7 @@ static pa_usec_t io_sink_get_latency(struct userdata *u) {
pa_log_info("Device doesn't support SNDCTL_DSP_GETODELAY: %s", pa_cstrerror(errno));
u->use_getodelay = 0;
} else
- r = pa_bytes_to_usec(arg, &u->sink->sample_spec);
+ r = pa_bytes_to_usec((size_t) arg, &u->sink->sample_spec);
}
@@ -417,7 +415,7 @@ static pa_usec_t io_sink_get_latency(struct userdata *u) {
pa_log_info("Device doesn't support SNDCTL_DSP_GETOSPACE: %s", pa_cstrerror(errno));
u->use_getospace = 0;
} else
- r = pa_bytes_to_usec(info.bytes, &u->sink->sample_spec);
+ r = pa_bytes_to_usec((size_t) info.bytes, &u->sink->sample_spec);
}
if (u->memchunk.memblock)
@@ -439,7 +437,7 @@ static pa_usec_t io_source_get_latency(struct userdata *u) {
pa_log_info("Device doesn't support SNDCTL_DSP_GETISPACE: %s", pa_cstrerror(errno));
u->use_getispace = 0;
} else
- r = pa_bytes_to_usec(info.bytes, &u->source->sample_spec);
+ r = pa_bytes_to_usec((size_t) info.bytes, &u->source->sample_spec);
}
return r;
@@ -510,6 +508,9 @@ static int suspend(struct userdata *u) {
return 0;
}
+static int sink_get_volume(pa_sink *s);
+static int source_get_volume(pa_source *s);
+
static int unsuspend(struct userdata *u) {
int m;
pa_sample_spec ss, *ss_original;
@@ -527,8 +528,9 @@ static int unsuspend(struct userdata *u) {
if ((u->fd = pa_oss_open(u->device_name, &m, NULL)) < 0) {
pa_log_warn("Resume failed, device busy (%s)", pa_cstrerror(errno));
return -1;
+ }
- if (m != u->mode)
+ if (m != u->mode) {
pa_log_warn("Resume failed, couldn't open device with original access mode.");
goto fail;
}
@@ -600,9 +602,9 @@ static int unsuspend(struct userdata *u) {
build_pollfd(u);
if (u->sink)
- pa_sink_get_volume(u->sink);
+ sink_get_volume(u->sink);
if (u->source)
- pa_source_get_volume(u->source);
+ source_get_volume(u->source);
pa_log_info("Resumed successfully...");
@@ -641,7 +643,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
switch ((pa_sink_state_t) PA_PTR_TO_UINT(data)) {
case PA_SINK_SUSPENDED:
- pa_assert(PA_SINK_OPENED(u->sink->thread_info.state));
+ pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
if (!u->source || u->source_suspended) {
if (suspend(u) < 0)
@@ -658,7 +660,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
if (u->sink->thread_info.state == PA_SINK_INIT) {
do_trigger = TRUE;
- quick = u->source && PA_SOURCE_OPENED(u->source->thread_info.state);
+ quick = u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state);
}
if (u->sink->thread_info.state == PA_SINK_SUSPENDED) {
@@ -721,7 +723,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
switch ((pa_source_state_t) PA_PTR_TO_UINT(data)) {
case PA_SOURCE_SUSPENDED:
- pa_assert(PA_SOURCE_OPENED(u->source->thread_info.state));
+ pa_assert(PA_SOURCE_IS_OPENED(u->source->thread_info.state));
if (!u->sink || u->sink_suspended) {
if (suspend(u) < 0)
@@ -738,7 +740,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
if (u->source->thread_info.state == PA_SOURCE_INIT) {
do_trigger = TRUE;
- quick = u->sink && PA_SINK_OPENED(u->sink->thread_info.state);
+ quick = u->sink && PA_SINK_IS_OPENED(u->sink->thread_info.state);
}
if (u->source->thread_info.state == PA_SOURCE_SUSPENDED) {
@@ -858,7 +860,7 @@ static int source_set_volume(pa_source *s) {
static void thread_func(void *userdata) {
struct userdata *u = userdata;
int write_type = 0, read_type = 0;
- unsigned short revents = 0;
+ short revents = 0;
pa_assert(u);
@@ -875,9 +877,13 @@ static void thread_func(void *userdata) {
/* pa_log("loop"); */
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
+
/* Render some data and write it to the dsp */
- if (u->sink && PA_SINK_OPENED(u->sink->thread_info.state) && ((revents & POLLOUT) || u->use_mmap || u->use_getospace)) {
+ if (u->sink && PA_SINK_IS_OPENED(u->sink->thread_info.state) && ((revents & POLLOUT) || u->use_mmap || u->use_getospace)) {
if (u->use_mmap) {
@@ -893,7 +899,7 @@ static void thread_func(void *userdata) {
ssize_t l;
pa_bool_t loop = FALSE, work_done = FALSE;
- l = u->out_fragment_size;
+ l = (ssize_t) u->out_fragment_size;
if (u->use_getospace) {
audio_buf_info info;
@@ -914,14 +920,14 @@ static void thread_func(void *userdata) {
/* Round down to multiples of the fragment size,
* because OSS needs that (at least some versions
* do) */
- l = (l/u->out_fragment_size) * u->out_fragment_size;
+ l = (l/(ssize_t) u->out_fragment_size) * (ssize_t) u->out_fragment_size;
/* Hmm, so poll() signalled us that we can read
* something, but GETOSPACE told us there was nothing?
* Hmm, make the best of it, try to read some data, to
* avoid spinning forever. */
if (l <= 0 && (revents & POLLOUT)) {
- l = u->out_fragment_size;
+ l = (ssize_t) u->out_fragment_size;
loop = FALSE;
}
@@ -930,7 +936,7 @@ static void thread_func(void *userdata) {
ssize_t t;
if (u->memchunk.length <= 0)
- pa_sink_render(u->sink, l, &u->memchunk);
+ pa_sink_render(u->sink, (size_t) l, &u->memchunk);
pa_assert(u->memchunk.length > 0);
@@ -960,8 +966,8 @@ static void thread_func(void *userdata) {
} else {
- u->memchunk.index += t;
- u->memchunk.length -= t;
+ u->memchunk.index += (size_t) t;
+ u->memchunk.length -= (size_t) t;
if (u->memchunk.length <= 0) {
pa_memblock_unref(u->memchunk.memblock);
@@ -985,7 +991,7 @@ static void thread_func(void *userdata) {
/* Try to read some data and pass it on to the source driver. */
- if (u->source && PA_SOURCE_OPENED(u->source->thread_info.state) && ((revents & POLLIN) || u->use_mmap || u->use_getispace)) {
+ if (u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state) && ((revents & POLLIN) || u->use_mmap || u->use_getispace)) {
if (u->use_mmap) {
@@ -1004,7 +1010,7 @@ static void thread_func(void *userdata) {
pa_memchunk memchunk;
pa_bool_t loop = FALSE, work_done = FALSE;
- l = u->in_fragment_size;
+ l = (ssize_t) u->in_fragment_size;
if (u->use_getispace) {
audio_buf_info info;
@@ -1018,15 +1024,16 @@ static void thread_func(void *userdata) {
}
}
- l = (l/u->in_fragment_size) * u->in_fragment_size;
+ l = (l/(ssize_t) u->in_fragment_size) * (ssize_t) u->in_fragment_size;
if (l <= 0 && (revents & POLLIN)) {
- l = u->in_fragment_size;
+ l = (ssize_t) u->in_fragment_size;
loop = FALSE;
}
while (l > 0) {
- ssize_t t, k;
+ ssize_t t;
+ size_t k;
pa_assert(l > 0);
@@ -1034,8 +1041,8 @@ static void thread_func(void *userdata) {
k = pa_memblock_get_length(memchunk.memblock);
- if (k > l)
- k = l;
+ if (k > (size_t) l)
+ k = (size_t) l;
k = (k/u->frame_size)*u->frame_size;
@@ -1066,7 +1073,7 @@ static void thread_func(void *userdata) {
} else {
memchunk.index = 0;
- memchunk.length = t;
+ memchunk.length = (size_t) t;
pa_source_post(u->source, &memchunk);
pa_memblock_unref(memchunk.memblock);
@@ -1094,9 +1101,9 @@ static void thread_func(void *userdata) {
pa_assert(u->fd >= 0);
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
- pollfd->events =
- ((u->source && PA_SOURCE_OPENED(u->source->thread_info.state)) ? POLLIN : 0) |
- ((u->sink && PA_SINK_OPENED(u->sink->thread_info.state)) ? POLLOUT : 0);
+ pollfd->events = (short)
+ (((u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state)) ? POLLIN : 0) |
+ ((u->sink && PA_SINK_IS_OPENED(u->sink->thread_info.state)) ? POLLOUT : 0));
}
/* Hmm, nothing to do. Let's sleep */
@@ -1143,9 +1150,11 @@ int pa__init(pa_module*m) {
pa_sample_spec ss;
pa_channel_map map;
pa_modargs *ma = NULL;
- char hwdesc[64], *t;
+ char hwdesc[64];
const char *name;
- int namereg_fail;
+ pa_bool_t namereg_fail;
+ pa_sink_new_data sink_new_data;
+ pa_source_new_data source_new_data;
pa_assert(m);
@@ -1172,10 +1181,10 @@ int pa__init(pa_module*m) {
goto fail;
}
- nfrags = m->core->default_n_fragments;
- frag_size = pa_usec_to_bytes(m->core->default_fragment_size_msec*1000, &ss);
+ nfrags = (int) m->core->default_n_fragments;
+ frag_size = (int) pa_usec_to_bytes(m->core->default_fragment_size_msec*1000, &ss);
if (frag_size <= 0)
- frag_size = pa_frame_size(&ss);
+ frag_size = (int) pa_frame_size(&ss);
if (pa_modargs_get_value_s32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_s32(ma, "fragment_size", &frag_size) < 0) {
pa_log("Failed to parse fragments arguments");
@@ -1226,32 +1235,31 @@ int pa__init(pa_module*m) {
m->userdata = u;
u->fd = fd;
u->mixer_fd = -1;
- u->use_getospace = u->use_getispace = 1;
- u->use_getodelay = 1;
+ u->use_getospace = u->use_getispace = TRUE;
+ u->use_getodelay = TRUE;
u->mode = mode;
u->frame_size = pa_frame_size(&ss);
u->device_name = pa_xstrdup(dev);
- u->in_nfrags = u->out_nfrags = u->nfrags = nfrags;
- u->out_fragment_size = u->in_fragment_size = u->frag_size = frag_size;
+ u->in_nfrags = u->out_nfrags = (uint32_t) (u->nfrags = nfrags);
+ u->out_fragment_size = u->in_fragment_size = (uint32_t) (u->frag_size = frag_size);
u->use_mmap = use_mmap;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
u->rtpoll_item = NULL;
build_pollfd(u);
if (ioctl(fd, SNDCTL_DSP_GETISPACE, &info) >= 0) {
pa_log_info("Input -- %u fragments of size %u.", info.fragstotal, info.fragsize);
- u->in_fragment_size = info.fragsize;
- u->in_nfrags = info.fragstotal;
- u->use_getispace = 1;
+ u->in_fragment_size = (uint32_t) info.fragsize;
+ u->in_nfrags = (uint32_t) info.fragstotal;
+ u->use_getispace = TRUE;
}
if (ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) >= 0) {
pa_log_info("Output -- %u fragments of size %u.", info.fragstotal, info.fragsize);
- u->out_fragment_size = info.fragsize;
- u->out_nfrags = info.fragstotal;
- u->use_getospace = 1;
+ u->out_fragment_size = (uint32_t) info.fragsize;
+ u->out_nfrags = (uint32_t) info.fragstotal;
+ u->use_getospace = TRUE;
}
u->in_hwbuf_size = u->in_nfrags * u->in_fragment_size;
@@ -1263,21 +1271,37 @@ int pa__init(pa_module*m) {
if (use_mmap) {
if ((u->in_mmap = mmap(NULL, u->in_hwbuf_size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) {
pa_log_warn("mmap(PROT_READ) failed, reverting to non-mmap mode: %s", pa_cstrerror(errno));
- use_mmap = u->use_mmap = 0;
+ use_mmap = u->use_mmap = FALSE;
u->in_mmap = NULL;
} else
pa_log_debug("Successfully mmap()ed input buffer.");
}
if ((name = pa_modargs_get_value(ma, "source_name", NULL)))
- namereg_fail = 1;
+ namereg_fail = TRUE;
else {
name = name_buf = pa_sprintf_malloc("oss_input.%s", pa_path_get_filename(dev));
- namereg_fail = 0;
+ namereg_fail = FALSE;
}
- u->source = pa_source_new(m->core, __FILE__, name, namereg_fail, &ss, &map);
+ pa_source_new_data_init(&source_new_data);
+ source_new_data.driver = __FILE__;
+ source_new_data.module = m;
+ pa_source_new_data_set_name(&source_new_data, name);
+ source_new_data.namereg_fail = namereg_fail;
+ pa_source_new_data_set_sample_spec(&source_new_data, &ss);
+ pa_source_new_data_set_channel_map(&source_new_data, &map);
+ pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_STRING, dev);
+ pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_API, "oss");
+ pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_DESCRIPTION, hwdesc[0] ? hwdesc : dev);
+ pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_ACCESS_MODE, use_mmap ? "mmap" : "serial");
+ pa_proplist_setf(source_new_data.proplist, PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE, "%lu", (unsigned long) (u->in_hwbuf_size));
+ pa_proplist_setf(source_new_data.proplist, PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE, "%lu", (unsigned long) (u->in_fragment_size));
+
+ u->source = pa_source_new(m->core, &source_new_data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY);
+ pa_source_new_data_done(&source_new_data);
pa_xfree(name_buf);
+
if (!u->source) {
pa_log("Failed to create source object");
goto fail;
@@ -1286,18 +1310,8 @@ int pa__init(pa_module*m) {
u->source->parent.process_msg = source_process_msg;
u->source->userdata = u;
- pa_source_set_module(u->source, m);
pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
pa_source_set_rtpoll(u->source, u->rtpoll);
- pa_source_set_description(u->source, t = pa_sprintf_malloc(
- "OSS PCM on %s%s%s%s%s",
- dev,
- hwdesc[0] ? " (" : "",
- hwdesc[0] ? hwdesc : "",
- hwdesc[0] ? ")" : "",
- use_mmap ? " via DMA" : ""));
- pa_xfree(t);
- u->source->flags = PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY;
u->source->refresh_volume = TRUE;
if (use_mmap)
@@ -1315,7 +1329,7 @@ int pa__init(pa_module*m) {
goto go_on;
} else {
pa_log_warn("mmap(PROT_WRITE) failed, reverting to non-mmap mode: %s", pa_cstrerror(errno));
- u->use_mmap = (use_mmap = FALSE);
+ u->use_mmap = use_mmap = FALSE;
u->out_mmap = NULL;
}
} else {
@@ -1325,14 +1339,30 @@ int pa__init(pa_module*m) {
}
if ((name = pa_modargs_get_value(ma, "sink_name", NULL)))
- namereg_fail = 1;
+ namereg_fail = TRUE;
else {
name = name_buf = pa_sprintf_malloc("oss_output.%s", pa_path_get_filename(dev));
- namereg_fail = 0;
+ namereg_fail = FALSE;
}
- u->sink = pa_sink_new(m->core, __FILE__, name, namereg_fail, &ss, &map);
+ pa_sink_new_data_init(&sink_new_data);
+ sink_new_data.driver = __FILE__;
+ sink_new_data.module = m;
+ pa_sink_new_data_set_name(&sink_new_data, name);
+ sink_new_data.namereg_fail = namereg_fail;
+ pa_sink_new_data_set_sample_spec(&sink_new_data, &ss);
+ pa_sink_new_data_set_channel_map(&sink_new_data, &map);
+ pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_STRING, dev);
+ pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_API, "oss");
+ pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_DESCRIPTION, hwdesc[0] ? hwdesc : dev);
+ pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_ACCESS_MODE, use_mmap ? "mmap" : "serial");
+ pa_proplist_setf(sink_new_data.proplist, PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE, "%lu", (unsigned long) (u->out_hwbuf_size));
+ pa_proplist_setf(sink_new_data.proplist, PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE, "%lu", (unsigned long) (u->out_fragment_size));
+
+ u->sink = pa_sink_new(m->core, &sink_new_data, PA_SINK_HARDWARE|PA_SINK_LATENCY);
+ pa_sink_new_data_done(&sink_new_data);
pa_xfree(name_buf);
+
if (!u->sink) {
pa_log("Failed to create sink object");
goto fail;
@@ -1341,26 +1371,18 @@ int pa__init(pa_module*m) {
u->sink->parent.process_msg = sink_process_msg;
u->sink->userdata = u;
- pa_sink_set_module(u->sink, m);
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc(
- "OSS PCM on %s%s%s%s%s",
- dev,
- hwdesc[0] ? " (" : "",
- hwdesc[0] ? hwdesc : "",
- hwdesc[0] ? ")" : "",
- use_mmap ? " via DMA" : ""));
- pa_xfree(t);
- u->sink->flags = PA_SINK_HARDWARE|PA_SINK_LATENCY;
u->sink->refresh_volume = TRUE;
+ u->sink->thread_info.max_request = u->out_hwbuf_size;
+
if (use_mmap)
u->out_mmap_memblocks = pa_xnew0(pa_memblock*, u->out_nfrags);
}
if ((u->mixer_fd = pa_oss_open_mixer_for_device(u->device_name)) >= 0) {
- int do_close = 1;
+ pa_bool_t do_close = TRUE;
u->mixer_devmask = 0;
if (ioctl(fd, SOUND_MIXER_READ_DEVMASK, &u->mixer_devmask) < 0)
@@ -1372,7 +1394,7 @@ int pa__init(pa_module*m) {
u->sink->flags |= PA_SINK_HW_VOLUME_CTRL;
u->sink->get_volume = sink_get_volume;
u->sink->set_volume = sink_set_volume;
- do_close = 0;
+ do_close = FALSE;
}
if (u->source && (u->mixer_devmask & (SOUND_MASK_RECLEV|SOUND_MASK_IGAIN))) {
@@ -1380,7 +1402,7 @@ int pa__init(pa_module*m) {
u->source->flags |= PA_SOURCE_HW_VOLUME_CTRL;
u->source->get_volume = source_get_volume;
u->source->set_volume = source_set_volume;
- do_close = 0;
+ do_close = FALSE;
}
}
@@ -1402,10 +1424,25 @@ go_on:
}
/* Read mixer settings */
- if (u->sink && u->sink->get_volume)
- sink_get_volume(u->sink);
- if (u->source && u->source->get_volume)
- source_get_volume(u->source);
+ if (u->sink) {
+ if (sink_new_data.volume_is_set) {
+ if (u->sink->set_volume)
+ u->sink->set_volume(u->sink);
+ } else {
+ if (u->sink->get_volume)
+ u->sink->get_volume(u->sink);
+ }
+ }
+
+ if (u->source) {
+ if (source_new_data.volume_is_set) {
+ if (u->source->set_volume)
+ u->source->set_volume(u->source);
+ } else {
+ if (u->source->get_volume)
+ u->source->get_volume(u->source);
+ }
+ }
if (u->sink)
pa_sink_put(u->sink);
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 7c66b2b..ae230b2 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -1,5 +1,3 @@
-/* $Id: module-pipe-sink.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -62,7 +60,7 @@ PA_MODULE_USAGE(
"rate=<sample rate>"
"channel_map=<channel map>");
-#define DEFAULT_FILE_NAME "/tmp/music.output"
+#define DEFAULT_FILE_NAME "fifo_output"
#define DEFAULT_SINK_NAME "fifo_output"
struct userdata {
@@ -80,6 +78,8 @@ struct userdata {
pa_memchunk memchunk;
pa_rtpoll_item *rtpoll_item;
+
+ int write_type;
};
static const char* const valid_modargs[] = {
@@ -109,16 +109,57 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
n += u->memchunk.length;
*((pa_usec_t*) data) = pa_bytes_to_usec(n, &u->sink->sample_spec);
- break;
+ return 0;
}
}
return pa_sink_process_msg(o, code, data, offset, chunk);
}
+static int process_render(struct userdata *u) {
+ pa_assert(u);
+
+ if (u->memchunk.length <= 0)
+ pa_sink_render(u->sink, PIPE_BUF, &u->memchunk);
+
+ pa_assert(u->memchunk.length > 0);
+
+ for (;;) {
+ ssize_t l;
+ void *p;
+
+ p = pa_memblock_acquire(u->memchunk.memblock);
+ l = pa_write(u->fd, (uint8_t*) p + u->memchunk.index, u->memchunk.length, &u->write_type);
+ pa_memblock_release(u->memchunk.memblock);
+
+ pa_assert(l != 0);
+
+ if (l < 0) {
+
+ if (errno == EINTR)
+ continue;
+ else if (errno != EAGAIN) {
+ pa_log("Failed to write data to FIFO: %s", pa_cstrerror(errno));
+ return -1;
+ }
+
+ } else {
+
+ u->memchunk.index += (size_t) l;
+ u->memchunk.length -= (size_t) l;
+
+ if (u->memchunk.length <= 0) {
+ pa_memblock_unref(u->memchunk.memblock);
+ pa_memchunk_reset(&u->memchunk);
+ }
+ }
+
+ return 0;
+ }
+}
+
static void thread_func(void *userdata) {
struct userdata *u = userdata;
- int write_type = 0;
pa_assert(u);
@@ -134,46 +175,21 @@ static void thread_func(void *userdata) {
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
/* Render some data and write it to the fifo */
- if (u->sink->thread_info.state == PA_SINK_RUNNING && pollfd->revents) {
- ssize_t l;
- void *p;
-
- if (u->memchunk.length <= 0)
- pa_sink_render(u->sink, PIPE_BUF, &u->memchunk);
-
- pa_assert(u->memchunk.length > 0);
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
- p = pa_memblock_acquire(u->memchunk.memblock);
- l = pa_write(u->fd, (uint8_t*) p + u->memchunk.index, u->memchunk.length, &write_type);
- pa_memblock_release(u->memchunk.memblock);
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
- pa_assert(l != 0);
-
- if (l < 0) {
-
- if (errno == EINTR)
- continue;
- else if (errno != EAGAIN) {
- pa_log("Failed to write data to FIFO: %s", pa_cstrerror(errno));
+ if (pollfd->revents) {
+ if (process_render(u) < 0)
goto fail;
- }
-
- } else {
-
- u->memchunk.index += l;
- u->memchunk.length -= l;
-
- if (u->memchunk.length <= 0) {
- pa_memblock_unref(u->memchunk.memblock);
- pa_memchunk_reset(&u->memchunk);
- }
pollfd->revents = 0;
}
}
/* Hmm, nothing to do. Let's sleep */
- pollfd->events = u->sink->thread_info.state == PA_SINK_RUNNING ? POLLOUT : 0;
+ pollfd->events = (short) (u->sink->thread_info.state == PA_SINK_RUNNING ? POLLOUT : 0);
if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
goto fail;
@@ -205,8 +221,8 @@ int pa__init(pa_module*m) {
pa_sample_spec ss;
pa_channel_map map;
pa_modargs *ma;
- char *t;
struct pollfd *pollfd;
+ pa_sink_new_data data;
pa_assert(m);
@@ -226,11 +242,11 @@ int pa__init(pa_module*m) {
u->module = m;
m->userdata = u;
pa_memchunk_reset(&u->memchunk);
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
+ u->write_type = 0;
- u->filename = pa_xstrdup(pa_modargs_get_value(ma, "file", DEFAULT_FILE_NAME));
+ u->filename = pa_runtime_path(pa_modargs_get_value(ma, "file", DEFAULT_FILE_NAME));
mkfifo(u->filename, 0666);
if ((u->fd = open(u->filename, O_RDWR|O_NOCTTY)) < 0) {
@@ -251,20 +267,28 @@ int pa__init(pa_module*m) {
goto fail;
}
- if (!(u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) {
+ pa_sink_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_sink_new_data_set_name(&data, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME));
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->filename);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Unix FIFO sink %s", u->filename);
+ pa_sink_new_data_set_sample_spec(&data, &ss);
+ pa_sink_new_data_set_channel_map(&data, &map);
+
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY);
+ pa_sink_new_data_done(&data);
+
+ if (!u->sink) {
pa_log("Failed to create sink.");
goto fail;
}
u->sink->parent.process_msg = sink_process_msg;
u->sink->userdata = u;
- u->sink->flags = PA_SINK_LATENCY;
- pa_sink_set_module(u->sink, m);
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc("Unix FIFO sink '%s'", u->filename));
- pa_xfree(t);
u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index 9aaf138..25151d9 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -1,5 +1,3 @@
-/* $Id: module-pipe-source.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -137,9 +135,9 @@ static void thread_func(void *userdata) {
} else {
- u->memchunk.length = l;
+ u->memchunk.length = (size_t) l;
pa_source_post(u->source, &u->memchunk);
- u->memchunk.index += l;
+ u->memchunk.index += (size_t) l;
if (u->memchunk.index >= pa_memblock_get_length(u->memchunk.memblock)) {
pa_memblock_unref(u->memchunk.memblock);
@@ -151,15 +149,16 @@ static void thread_func(void *userdata) {
}
/* Hmm, nothing to do. Let's sleep */
- pollfd->events = u->source->thread_info.state == PA_SOURCE_RUNNING ? POLLIN : 0;
+ pollfd->events = (short) (u->source->thread_info.state == PA_SOURCE_RUNNING ? POLLIN : 0);
- if ((ret = pa_rtpoll_run(u->rtpoll, 1)) < 0)
+ if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
goto fail;
if (ret == 0)
goto finish;
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
+
if (pollfd->revents & ~POLLIN) {
pa_log("FIFO shutdown.");
goto fail;
@@ -182,8 +181,8 @@ int pa__init(pa_module*m) {
pa_sample_spec ss;
pa_channel_map map;
pa_modargs *ma;
- char *t;
struct pollfd *pollfd;
+ pa_source_new_data data;
pa_assert(m);
@@ -203,11 +202,10 @@ int pa__init(pa_module*m) {
u->module = m;
m->userdata = u;
pa_memchunk_reset(&u->memchunk);
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
- u->filename = pa_xstrdup(pa_modargs_get_value(ma, "file", DEFAULT_FILE_NAME));
+ u->filename = pa_runtime_path(pa_modargs_get_value(ma, "file", DEFAULT_FILE_NAME));
mkfifo(u->filename, 0666);
if ((u->fd = open(u->filename, O_RDWR|O_NOCTTY)) < 0) {
@@ -228,19 +226,27 @@ int pa__init(pa_module*m) {
goto fail;
}
- if (!(u->source = pa_source_new(m->core, __FILE__, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME), 0, &ss, &map))) {
+ pa_source_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ pa_source_new_data_set_name(&data, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME));
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->filename);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Unix FIFO source %s", u->filename);
+ pa_source_new_data_set_sample_spec(&data, &ss);
+ pa_source_new_data_set_channel_map(&data, &map);
+
+ u->source = pa_source_new(m->core, &data, 0);
+ pa_source_new_data_done(&data);
+
+ if (!u->source) {
pa_log("Failed to create source.");
goto fail;
}
u->source->userdata = u;
- u->source->flags = 0;
- pa_source_set_module(u->source, m);
pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
pa_source_set_rtpoll(u->source, u->rtpoll);
- pa_source_set_description(u->source, t = pa_sprintf_malloc("Unix FIFO source '%s'", u->filename));
- pa_xfree(t);
u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
diff --git a/src/modules/module-position-event-sounds-symdef.h b/src/modules/module-position-event-sounds-symdef.h
new file mode 100644
index 0000000..94a8716
--- /dev/null
+++ b/src/modules/module-position-event-sounds-symdef.h
@@ -0,0 +1,25 @@
+#ifndef foomodulepositioneventsoundssymdeffoo
+#define foomodulepositioneventsoundssymdeffoo
+
+#include <pulsecore/core.h>
+#include <pulsecore/module.h>
+#include <pulsecore/macro.h>
+
+#define pa__init module_position_event_sounds_LTX_pa__init
+#define pa__done module_position_event_sounds_LTX_pa__done
+#define pa__get_author module_position_event_sounds_LTX_pa__get_author
+#define pa__get_description module_position_event_sounds_LTX_pa__get_description
+#define pa__get_usage module_position_event_sounds_LTX_pa__get_usage
+#define pa__get_version module_position_event_sounds_LTX_pa__get_version
+#define pa__load_once module_position_event_sounds_LTX_pa__load_once
+
+int pa__init(pa_module*m);
+void pa__done(pa_module*m);
+
+const char* pa__get_author(void);
+const char* pa__get_description(void);
+const char* pa__get_usage(void);
+const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
+
+#endif
diff --git a/src/modules/module-position-event-sounds.c b/src/modules/module-position-event-sounds.c
new file mode 100644
index 0000000..90e693a
--- /dev/null
+++ b/src/modules/module-position-event-sounds.c
@@ -0,0 +1,165 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2006 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+#include <pulse/xmalloc.h>
+#include <pulse/volume.h>
+#include <pulse/channelmap.h>
+
+#include <pulsecore/core-error.h>
+#include <pulsecore/module.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/modargs.h>
+#include <pulsecore/log.h>
+#include <pulsecore/sink-input.h>
+
+#include "module-position-event-sounds-symdef.h"
+
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Position event sounds between L and R depending on the position on screen of the widget triggering them.");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+
+static const char* const valid_modargs[] = {
+ NULL
+};
+
+struct userdata {
+ pa_core *core;
+ pa_hook_slot *sink_input_fixate_hook_slot;
+};
+
+static pa_bool_t is_left(pa_channel_position_t p) {
+ return
+ p == PA_CHANNEL_POSITION_FRONT_LEFT ||
+ p == PA_CHANNEL_POSITION_REAR_LEFT ||
+ p == PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER ||
+ p == PA_CHANNEL_POSITION_SIDE_LEFT ||
+ p == PA_CHANNEL_POSITION_TOP_FRONT_LEFT ||
+ p == PA_CHANNEL_POSITION_TOP_REAR_LEFT;
+}
+
+static pa_bool_t is_right(pa_channel_position_t p) {
+ return
+ p == PA_CHANNEL_POSITION_FRONT_RIGHT ||
+ p == PA_CHANNEL_POSITION_REAR_RIGHT||
+ p == PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER ||
+ p == PA_CHANNEL_POSITION_SIDE_RIGHT ||
+ p == PA_CHANNEL_POSITION_TOP_FRONT_RIGHT ||
+ p == PA_CHANNEL_POSITION_TOP_REAR_RIGHT;
+}
+
+static pa_hook_result_t sink_input_fixate_hook_callback(pa_core *core, pa_sink_input_new_data *data, struct userdata *u) {
+ const char *hpos;
+ double f;
+ unsigned c;
+ char t[PA_CVOLUME_SNPRINT_MAX];
+
+ pa_assert(data);
+
+ if (!(hpos = pa_proplist_gets(data->proplist, PA_PROP_EVENT_MOUSE_HPOS)))
+ return PA_HOOK_OK;
+
+ if (pa_atod(hpos, &f) < 0) {
+ pa_log_warn("Failed to parse "PA_PROP_EVENT_MOUSE_HPOS" property '%s'.", hpos);
+ return PA_HOOK_OK;
+ }
+
+ if (f < 0.0 || f > 1.0) {
+ pa_log_warn("Property "PA_PROP_EVENT_MOUSE_HPOS" out of range %0.2f", f);
+ return PA_HOOK_OK;
+ }
+
+ pa_log_debug("Positioning event sound '%s' at %0.2f.", pa_strnull(pa_proplist_gets(data->proplist, PA_PROP_EVENT_ID)), f);
+
+ if (!data->volume_is_set) {
+ pa_cvolume_reset(&data->volume, data->sample_spec.channels);
+ data->volume_is_set = TRUE;
+ }
+
+ for (c = 0; c < data->sample_spec.channels; c++) {
+
+ if (is_left(data->channel_map.map[c]))
+ data->volume.values[c] =
+ pa_sw_volume_multiply(data->volume.values[c], (pa_volume_t) (PA_VOLUME_NORM * (1.0 - f)));
+
+ if (is_right(data->channel_map.map[c]))
+ data->volume.values[c] =
+ pa_sw_volume_multiply(data->volume.values[c], (pa_volume_t) (PA_VOLUME_NORM * f));
+ }
+
+ pa_log_debug("Final volume %s.", pa_cvolume_snprint(t, sizeof(t), &data->volume));
+
+ return PA_HOOK_OK;
+}
+
+int pa__init(pa_module*m) {
+ pa_modargs *ma = NULL;
+ struct userdata *u;
+
+ pa_assert(m);
+
+ if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
+ pa_log("Failed to parse module arguments");
+ goto fail;
+ }
+
+ m->userdata = u = pa_xnew(struct userdata, 1);
+ u->core = m->core;
+ u->sink_input_fixate_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_FIXATE], PA_HOOK_EARLY, (pa_hook_cb_t) sink_input_fixate_hook_callback, u);
+
+ pa_modargs_free(ma);
+
+ return 0;
+
+fail:
+ pa__done(m);
+
+ if (ma)
+ pa_modargs_free(ma);
+
+ return -1;
+}
+
+void pa__done(pa_module*m) {
+ struct userdata* u;
+
+ pa_assert(m);
+
+ if (!(u = m->userdata))
+ return;
+
+ if (u->sink_input_fixate_hook_slot)
+ pa_hook_slot_free(u->sink_input_fixate_hook_slot);
+
+ pa_xfree(u);
+}
diff --git a/src/modules/module-protocol-stub.c b/src/modules/module-protocol-stub.c
index 237c476..aefd402 100644
--- a/src/modules/module-protocol-stub.c
+++ b/src/modules/module-protocol-stub.c
@@ -1,5 +1,3 @@
-/* $Id: module-protocol-stub.c 2148 2008-03-27 23:17:13Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -64,19 +62,19 @@
#endif
#if defined(USE_PROTOCOL_SIMPLE)
- #include <pulsecore/protocol-simple.h>
- #define protocol_new pa_protocol_simple_new
- #define protocol_free pa_protocol_simple_free
- #define TCPWRAP_SERVICE "pulseaudio-simple"
- #define IPV4_PORT 4711
- #define UNIX_SOCKET "simple"
- #define MODULE_ARGUMENTS "rate", "format", "channels", "sink", "source", "playback", "record",
- #if defined(USE_TCP_SOCKETS)
- #include "module-simple-protocol-tcp-symdef.h"
- #else
- #include "module-simple-protocol-unix-symdef.h"
- #endif
-PA_MODULE_DESCRIPTION("Simple protocol "SOCKET_DESCRIPTION);
+# include <pulsecore/protocol-simple.h>
+# define TCPWRAP_SERVICE "pulseaudio-simple"
+# define IPV4_PORT 4711
+# define UNIX_SOCKET "simple"
+# define MODULE_ARGUMENTS "rate", "format", "channels", "sink", "source", "playback", "record",
+
+# if defined(USE_TCP_SOCKETS)
+# include "module-simple-protocol-tcp-symdef.h"
+# else
+# include "module-simple-protocol-unix-symdef.h"
+# endif
+
+ PA_MODULE_DESCRIPTION("Simple protocol "SOCKET_DESCRIPTION);
PA_MODULE_USAGE("rate=<sample rate> "
"format=<sample format> "
"channels=<number of channels> "
@@ -86,96 +84,96 @@ PA_MODULE_DESCRIPTION("Simple protocol "SOCKET_DESCRIPTION);
"record=<enable record?> "
SOCKET_USAGE);
#elif defined(USE_PROTOCOL_CLI)
- #include <pulsecore/protocol-cli.h>
- #define protocol_new pa_protocol_cli_new
- #define protocol_free pa_protocol_cli_free
- #define TCPWRAP_SERVICE "pulseaudio-cli"
- #define IPV4_PORT 4712
- #define UNIX_SOCKET "cli"
- #define MODULE_ARGUMENTS
- #ifdef USE_TCP_SOCKETS
- #include "module-cli-protocol-tcp-symdef.h"
- #else
- #include "module-cli-protocol-unix-symdef.h"
- #endif
+# include <pulsecore/protocol-cli.h>
+# define TCPWRAP_SERVICE "pulseaudio-cli"
+# define IPV4_PORT 4712
+# define UNIX_SOCKET "cli"
+# define MODULE_ARGUMENTS
+
+# ifdef USE_TCP_SOCKETS
+# include "module-cli-protocol-tcp-symdef.h"
+# else
+# include "module-cli-protocol-unix-symdef.h"
+# endif
+
PA_MODULE_DESCRIPTION("Command line interface protocol "SOCKET_DESCRIPTION);
PA_MODULE_USAGE(SOCKET_USAGE);
#elif defined(USE_PROTOCOL_HTTP)
- #include <pulsecore/protocol-http.h>
- #define protocol_new pa_protocol_http_new
- #define protocol_free pa_protocol_http_free
- #define TCPWRAP_SERVICE "pulseaudio-http"
- #define IPV4_PORT 4714
- #define UNIX_SOCKET "http"
- #define MODULE_ARGUMENTS
- #ifdef USE_TCP_SOCKETS
- #include "module-http-protocol-tcp-symdef.h"
- #else
- #include "module-http-protocol-unix-symdef.h"
- #endif
+# include <pulsecore/protocol-http.h>
+# define TCPWRAP_SERVICE "pulseaudio-http"
+# define IPV4_PORT 4714
+# define UNIX_SOCKET "http"
+# define MODULE_ARGUMENTS
+
+# ifdef USE_TCP_SOCKETS
+# include "module-http-protocol-tcp-symdef.h"
+# else
+# include "module-http-protocol-unix-symdef.h"
+# endif
+
PA_MODULE_DESCRIPTION("HTTP "SOCKET_DESCRIPTION);
PA_MODULE_USAGE(SOCKET_USAGE);
#elif defined(USE_PROTOCOL_NATIVE)
- #include <pulsecore/protocol-native.h>
- #define protocol_new pa_protocol_native_new
- #define protocol_free pa_protocol_native_free
- #define TCPWRAP_SERVICE "pulseaudio-native"
- #define IPV4_PORT PA_NATIVE_DEFAULT_PORT
- #define UNIX_SOCKET PA_NATIVE_DEFAULT_UNIX_SOCKET
- #define MODULE_ARGUMENTS_COMMON "cookie", "auth-anonymous",
- #ifdef USE_TCP_SOCKETS
- #include "module-native-protocol-tcp-symdef.h"
- #else
- #include "module-native-protocol-unix-symdef.h"
- #endif
-
- #if defined(HAVE_CREDS) && !defined(USE_TCP_SOCKETS)
- #define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-group", "auth-group-enable",
- #define AUTH_USAGE "auth-group=<system group to allow access> auth-group-enable=<enable auth by UNIX group?> "
- #elif defined(USE_TCP_SOCKETS)
- #define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-ip-acl",
- #define AUTH_USAGE "auth-ip-acl=<IP address ACL to allow access> "
- #else
- #define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON
- #define AUTH_USAGE
- #endif
+# include <pulsecore/protocol-native.h>
+# define TCPWRAP_SERVICE "pulseaudio-native"
+# define IPV4_PORT PA_NATIVE_DEFAULT_PORT
+# define UNIX_SOCKET PA_NATIVE_DEFAULT_UNIX_SOCKET
+# define MODULE_ARGUMENTS_COMMON "cookie", "auth-cookie", "auth-cookie-enabled", "auth-anonymous",
+
+# ifdef USE_TCP_SOCKETS
+# include "module-native-protocol-tcp-symdef.h"
+# else
+# include "module-native-protocol-unix-symdef.h"
+# endif
+
+# if defined(HAVE_CREDS) && !defined(USE_TCP_SOCKETS)
+# define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-group", "auth-group-enable",
+# define AUTH_USAGE "auth-group=<system group to allow access> auth-group-enable=<enable auth by UNIX group?> "
+# elif defined(USE_TCP_SOCKETS)
+# define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-ip-acl",
+# define AUTH_USAGE "auth-ip-acl=<IP address ACL to allow access> "
+# else
+# define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON
+# define AUTH_USAGE
+# endif
PA_MODULE_DESCRIPTION("Native protocol "SOCKET_DESCRIPTION);
PA_MODULE_USAGE("auth-anonymous=<don't check for cookies?> "
- "cookie=<path to cookie file> "
+ "auth-cookie=<path to cookie file> "
+ "auth-cookie-enabled=<enable cookie authentification? "
AUTH_USAGE
SOCKET_USAGE);
#elif defined(USE_PROTOCOL_ESOUND)
- #include <pulsecore/protocol-esound.h>
- #include <pulsecore/esound.h>
- #define protocol_new pa_protocol_esound_new
- #define protocol_free pa_protocol_esound_free
- #define TCPWRAP_SERVICE "esound"
- #define IPV4_PORT ESD_DEFAULT_PORT
- #define MODULE_ARGUMENTS_COMMON "sink", "source", "auth-anonymous", "cookie",
- #ifdef USE_TCP_SOCKETS
- #include "module-esound-protocol-tcp-symdef.h"
- #else
- #include "module-esound-protocol-unix-symdef.h"
- #endif
-
- #if defined(USE_TCP_SOCKETS)
- #define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-ip-acl",
- #define AUTH_USAGE "auth-ip-acl=<IP address ACL to allow access> "
- #else
- #define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON
- #define AUTH_USAGE
- #endif
+# include <pulsecore/protocol-esound.h>
+# include <pulsecore/esound.h>
+# define TCPWRAP_SERVICE "esound"
+# define IPV4_PORT ESD_DEFAULT_PORT
+# define MODULE_ARGUMENTS_COMMON "sink", "source", "auth-anonymous", "cookie", "auth-cookie", "auth-cookie-enabled",
+
+# ifdef USE_TCP_SOCKETS
+# include "module-esound-protocol-tcp-symdef.h"
+# else
+# include "module-esound-protocol-unix-symdef.h"
+# endif
+
+# if defined(USE_TCP_SOCKETS)
+# define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-ip-acl",
+# define AUTH_USAGE "auth-ip-acl=<IP address ACL to allow access> "
+# else
+# define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON
+# define AUTH_USAGE
+# endif
PA_MODULE_DESCRIPTION("ESOUND protocol "SOCKET_DESCRIPTION);
PA_MODULE_USAGE("sink=<sink to connect to> "
"source=<source to connect to> "
"auth-anonymous=<don't verify cookies?> "
- "cookie=<path to cookie file> "
+ "auth-cookie=<path to cookie file> "
+ "auth-cookie-enabled=<enable cookie authentification? "
AUTH_USAGE
SOCKET_USAGE);
#else
- #error "Broken build system"
+# error "Broken build system"
#endif
PA_MODULE_LOAD_ONCE(FALSE);
@@ -194,46 +192,103 @@ static const char* const valid_modargs[] = {
};
struct userdata {
+ pa_module *module;
+
+#if defined(USE_PROTOCOL_SIMPLE)
+ pa_simple_protocol *simple_protocol;
+ pa_simple_options *simple_options;
+#elif defined(USE_PROTOCOL_CLI)
+ pa_cli_protocol *cli_protocol;
+#elif defined(USE_PROTOCOL_HTTP)
+ pa_http_protocol *http_protocol;
+#elif defined(USE_PROTOCOL_NATIVE)
+ pa_native_protocol *native_protocol;
+ pa_native_options *native_options;
+#else
+ pa_esound_protocol *esound_protocol;
+ pa_esound_options *esound_options;
+#endif
+
#if defined(USE_TCP_SOCKETS)
- void *protocol_ipv4;
- void *protocol_ipv6;
+ pa_socket_server *socket_server_ipv4;
+ pa_socket_server *socket_server_ipv6;
#else
- void *protocol_unix;
+ pa_socket_server *socket_server_unix;
char *socket_path;
#endif
};
+static void socket_server_on_connection_cb(pa_socket_server*s, pa_iochannel *io, void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(s);
+ pa_assert(io);
+ pa_assert(u);
+
+#if defined(USE_PROTOCOL_SIMPLE)
+ pa_simple_protocol_connect(u->simple_protocol, io, u->simple_options);
+#elif defined(USE_PROTOCOL_CLI)
+ pa_cli_protocol_connect(u->cli_protocol, io, u->module);
+#elif defined(USE_PROTOCOL_HTTP)
+ pa_http_protocol_connect(u->http_protocol, io, u->module);
+#elif defined(USE_PROTOCOL_NATIVE)
+ pa_native_protocol_connect(u->native_protocol, io, u->native_options);
+#else
+ pa_esound_protocol_connect(u->esound_protocol, io, u->esound_options);
+#endif
+}
+
int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
- int ret = -1;
struct userdata *u = NULL;
#if defined(USE_TCP_SOCKETS)
- pa_socket_server *s_ipv4 = NULL, *s_ipv6 = NULL;
uint32_t port = IPV4_PORT;
const char *listen_on;
#else
- pa_socket_server *s;
int r;
- char tmp[PATH_MAX];
-
-#if defined(USE_PROTOCOL_ESOUND)
-#if defined(USE_PER_USER_ESOUND_SOCKET)
- char esdsocketpath[PATH_MAX];
-#else
- const char esdsocketpath[] = "/tmp/.esd/socket";
-#endif
#endif
+
+#if defined(USE_PROTOCOL_NATIVE)
+ char t[256];
#endif
pa_assert(m);
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
pa_log("Failed to parse module arguments");
- goto finish;
+ goto fail;
}
- u = pa_xnew0(struct userdata, 1);
+ m->userdata = u = pa_xnew0(struct userdata, 1);
+ u->module = m;
+
+#if defined(USE_PROTOCOL_SIMPLE)
+ u->simple_protocol = pa_simple_protocol_get(m->core);
+
+ u->simple_options = pa_simple_options_new();
+ if (pa_simple_options_parse(u->simple_options, m->core, ma) < 0)
+ goto fail;
+ u->simple_options->module = m;
+#elif defined(USE_PROTOCOL_CLI)
+ u->cli_protocol = pa_cli_protocol_get(m->core);
+#elif defined(USE_PROTOCOL_HTTP)
+ u->http_protocol = pa_http_protocol_get(m->core);
+#elif defined(USE_PROTOCOL_NATIVE)
+ u->native_protocol = pa_native_protocol_get(m->core);
+
+ u->native_options = pa_native_options_new();
+ if (pa_native_options_parse(u->native_options, m->core, ma) < 0)
+ goto fail;
+ u->native_options->module = m;
+#else
+ u->esound_protocol = pa_esound_protocol_get(m->core);
+
+ u->esound_options = pa_esound_options_new();
+ if (pa_esound_options_parse(u->esound_options, m->core, ma) < 0)
+ goto fail;
+ u->esound_options->module = m;
+#endif
#if defined(USE_TCP_SOCKETS)
if (pa_modargs_get_value_u32(ma, "port", &port) < 0 || port < 1 || port > 0xFFFF) {
@@ -244,106 +299,88 @@ int pa__init(pa_module*m) {
listen_on = pa_modargs_get_value(ma, "listen", NULL);
if (listen_on) {
- s_ipv6 = pa_socket_server_new_ipv6_string(m->core->mainloop, listen_on, port, TCPWRAP_SERVICE);
- s_ipv4 = pa_socket_server_new_ipv4_string(m->core->mainloop, listen_on, port, TCPWRAP_SERVICE);
+ u->socket_server_ipv6 = pa_socket_server_new_ipv6_string(m->core->mainloop, listen_on, (uint16_t) port, TCPWRAP_SERVICE);
+ u->socket_server_ipv4 = pa_socket_server_new_ipv4_string(m->core->mainloop, listen_on, (uint16_t) port, TCPWRAP_SERVICE);
} else {
- s_ipv6 = pa_socket_server_new_ipv6_any(m->core->mainloop, port, TCPWRAP_SERVICE);
- s_ipv4 = pa_socket_server_new_ipv4_any(m->core->mainloop, port, TCPWRAP_SERVICE);
+ u->socket_server_ipv6 = pa_socket_server_new_ipv6_any(m->core->mainloop, (uint16_t) port, TCPWRAP_SERVICE);
+ u->socket_server_ipv4 = pa_socket_server_new_ipv4_any(m->core->mainloop, (uint16_t) port, TCPWRAP_SERVICE);
}
- if (!s_ipv4 && !s_ipv6)
+ if (!u->socket_server_ipv4 && !u->socket_server_ipv6)
goto fail;
- if (s_ipv4)
- if (!(u->protocol_ipv4 = protocol_new(m->core, s_ipv4, m, ma)))
- pa_socket_server_unref(s_ipv4);
-
- if (s_ipv6)
- if (!(u->protocol_ipv6 = protocol_new(m->core, s_ipv6, m, ma)))
- pa_socket_server_unref(s_ipv6);
-
- if (!u->protocol_ipv4 && !u->protocol_ipv6)
- goto fail;
+ if (u->socket_server_ipv4)
+ pa_socket_server_set_callback(u->socket_server_ipv4, socket_server_on_connection_cb, u);
+ if (u->socket_server_ipv6)
+ pa_socket_server_set_callback(u->socket_server_ipv6, socket_server_on_connection_cb, u);
#else
-#if defined(USE_PROTOCOL_ESOUND)
+# if defined(USE_PROTOCOL_ESOUND)
-#if defined(USE_PER_USER_ESOUND_SOCKET)
- snprintf(esdsocketpath, sizeof(esdsocketpath), "/tmp/.esd-%lu/socket", (unsigned long) getuid());
-#endif
-
- pa_runtime_path(pa_modargs_get_value(ma, "socket", esdsocketpath), tmp, sizeof(tmp));
- u->socket_path = pa_xstrdup(tmp);
+# if defined(USE_PER_USER_ESOUND_SOCKET)
+ u->socket_path = pa_sprintf_malloc("/tmp/.esd-%lu/socket", (unsigned long) getuid());
+# else
+ u->socket_path = pa_xstrdup("/tmp/.esd/socket");
+# endif
/* This socket doesn't reside in our own runtime dir but in
* /tmp/.esd/, hence we have to create the dir first */
- if (pa_make_secure_parent_dir(u->socket_path, m->core->is_system_instance ? 0755 : 0700, (uid_t)-1, (gid_t)-1) < 0) {
+ if (pa_make_secure_parent_dir(u->socket_path, pa_in_system_mode() ? 0755U : 0700U, (uid_t)-1, (gid_t)-1) < 0) {
pa_log("Failed to create socket directory '%s': %s\n", u->socket_path, pa_cstrerror(errno));
goto fail;
}
-#else
- pa_runtime_path(pa_modargs_get_value(ma, "socket", UNIX_SOCKET), tmp, sizeof(tmp));
- u->socket_path = pa_xstrdup(tmp);
-#endif
-
- if ((r = pa_unix_socket_remove_stale(tmp)) < 0) {
- pa_log("Failed to remove stale UNIX socket '%s': %s", tmp, pa_cstrerror(errno));
+# else
+ if (!(u->socket_path = pa_runtime_path(pa_modargs_get_value(ma, "socket", UNIX_SOCKET)))) {
+ pa_log("Failed to generate socket path.");
goto fail;
}
+# endif
- if (r)
- pa_log("Removed stale UNIX socket '%s'.", tmp);
-
- if (!(s = pa_socket_server_new_unix(m->core->mainloop, tmp)))
+ if ((r = pa_unix_socket_remove_stale(u->socket_path)) < 0) {
+ pa_log("Failed to remove stale UNIX socket '%s': %s", u->socket_path, pa_cstrerror(errno));
goto fail;
+ } else if (r > 0)
+ pa_log_info("Removed stale UNIX socket '%s'.", u->socket_path);
- if (!(u->protocol_unix = protocol_new(m->core, s, m, ma)))
+ if (!(u->socket_server_unix = pa_socket_server_new_unix(m->core->mainloop, u->socket_path)))
goto fail;
+ pa_socket_server_set_callback(u->socket_server_unix, socket_server_on_connection_cb, u);
+
#endif
- m->userdata = u;
+#if defined(USE_PROTOCOL_NATIVE)
+# if defined(USE_TCP_SOCKETS)
+ if (u->socket_server_ipv4)
+ if (pa_socket_server_get_address(u->socket_server_ipv4, t, sizeof(t)))
+ pa_native_protocol_add_server_string(u->native_protocol, t);
- ret = 0;
+ if (u->socket_server_ipv6)
+ if (pa_socket_server_get_address(u->socket_server_ipv6, t, sizeof(t)))
+ pa_native_protocol_add_server_string(u->native_protocol, t);
+# else
+ if (pa_socket_server_get_address(u->socket_server_unix, t, sizeof(t)))
+ pa_native_protocol_add_server_string(u->native_protocol, t);
+
+# endif
+#endif
-finish:
if (ma)
pa_modargs_free(ma);
- return ret;
+ return 0;
fail:
- if (u) {
-#if defined(USE_TCP_SOCKETS)
- if (u->protocol_ipv4)
- protocol_free(u->protocol_ipv4);
- if (u->protocol_ipv6)
- protocol_free(u->protocol_ipv6);
-#else
- if (u->protocol_unix)
- protocol_free(u->protocol_unix);
- if (u->socket_path)
- pa_xfree(u->socket_path);
-#endif
+ if (ma)
+ pa_modargs_free(ma);
- pa_xfree(u);
- } else {
-#if defined(USE_TCP_SOCKETS)
- if (s_ipv4)
- pa_socket_server_unref(s_ipv4);
- if (s_ipv6)
- pa_socket_server_unref(s_ipv6);
-#else
- if (s)
- pa_socket_server_unref(s);
-#endif
- }
+ pa__done(m);
- goto finish;
+ return -1;
}
void pa__done(pa_module*m) {
@@ -351,24 +388,75 @@ void pa__done(pa_module*m) {
pa_assert(m);
- u = m->userdata;
+ if (!(u = m->userdata))
+ return;
+
+#if defined(USE_PROTOCOL_SIMPLE)
+ if (u->simple_protocol) {
+ pa_simple_protocol_disconnect(u->simple_protocol, u->module);
+ pa_simple_protocol_unref(u->simple_protocol);
+ }
+ if (u->simple_options)
+ pa_simple_options_unref(u->simple_options);
+#elif defined(USE_PROTOCOL_CLI)
+ if (u->cli_protocol) {
+ pa_cli_protocol_disconnect(u->cli_protocol, u->module);
+ pa_cli_protocol_unref(u->cli_protocol);
+ }
+#elif defined(USE_PROTOCOL_HTTP)
+ if (u->http_protocol) {
+ pa_http_protocol_disconnect(u->http_protocol, u->module);
+ pa_http_protocol_unref(u->http_protocol);
+ }
+#elif defined(USE_PROTOCOL_NATIVE)
+ if (u->native_protocol) {
+
+ char t[256];
+
+# if defined(USE_TCP_SOCKETS)
+ if (u->socket_server_ipv4)
+ if (pa_socket_server_get_address(u->socket_server_ipv4, t, sizeof(t)))
+ pa_native_protocol_remove_server_string(u->native_protocol, t);
+
+ if (u->socket_server_ipv6)
+ if (pa_socket_server_get_address(u->socket_server_ipv6, t, sizeof(t)))
+ pa_native_protocol_remove_server_string(u->native_protocol, t);
+# else
+ if (u->socket_server_unix)
+ if (pa_socket_server_get_address(u->socket_server_unix, t, sizeof(t)))
+ pa_native_protocol_remove_server_string(u->native_protocol, t);
+# endif
+
+ pa_native_protocol_disconnect(u->native_protocol, u->module);
+ pa_native_protocol_unref(u->native_protocol);
+ }
+ if (u->native_options)
+ pa_native_options_unref(u->native_options);
+#else
+ if (u->esound_protocol) {
+ pa_esound_protocol_disconnect(u->esound_protocol, u->module);
+ pa_esound_protocol_unref(u->esound_protocol);
+ }
+ if (u->esound_options)
+ pa_esound_options_unref(u->esound_options);
+#endif
#if defined(USE_TCP_SOCKETS)
- if (u->protocol_ipv4)
- protocol_free(u->protocol_ipv4);
- if (u->protocol_ipv6)
- protocol_free(u->protocol_ipv6);
+ if (u->socket_server_ipv4)
+ pa_socket_server_unref(u->socket_server_ipv4);
+ if (u->socket_server_ipv6)
+ pa_socket_server_unref(u->socket_server_ipv6);
#else
- if (u->protocol_unix)
- protocol_free(u->protocol_unix);
+ if (u->socket_server_unix)
+ pa_socket_server_unref(u->socket_server_unix);
-#if defined(USE_PROTOCOL_ESOUND)
+# if defined(USE_PROTOCOL_ESOUND) && !defined(USE_PER_USER_ESOUND_SOCKET)
if (u->socket_path) {
char *p = pa_parent_dir(u->socket_path);
rmdir(p);
pa_xfree(p);
}
-#endif
+# endif
pa_xfree(u->socket_path);
#endif
diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
index a8afa84..5b2be11 100644
--- a/src/modules/module-remap-sink.c
+++ b/src/modules/module-remap-sink.c
@@ -1,9 +1,7 @@
-/* $Id: module-remap-sink.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -51,7 +49,8 @@ PA_MODULE_USAGE(
"format=<sample format> "
"channels=<number of channels> "
"rate=<sample rate> "
- "channel_map=<channel map>");
+ "channel_map=<channel map> "
+ "remix=<remix channels?>");
struct userdata {
pa_core *core;
@@ -59,8 +58,6 @@ struct userdata {
pa_sink *sink, *master;
pa_sink_input *sink_input;
-
- pa_memchunk memchunk;
};
static const char* const valid_modargs[] = {
@@ -71,6 +68,7 @@ static const char* const valid_modargs[] = {
"format",
"channels",
"channel_map",
+ "remix",
NULL
};
@@ -83,10 +81,14 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
case PA_SINK_MESSAGE_GET_LATENCY: {
pa_usec_t usec = 0;
+ /* Get the latency of the master sink */
if (PA_MSGOBJECT(u->master)->process_msg(PA_MSGOBJECT(u->master), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
usec = 0;
- *((pa_usec_t*) data) = usec + pa_bytes_to_usec(u->memchunk.length, &u->sink->sample_spec);
+ /* Add the latency internal to our sink input on top */
+ usec += pa_bytes_to_usec(pa_memblockq_get_length(u->sink_input->thread_info.render_memblockq), &u->master->sample_spec);
+
+ *((pa_usec_t*) data) = usec;
return 0;
}
}
@@ -101,67 +103,109 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
pa_sink_assert_ref(s);
pa_assert_se(u = s->userdata);
- if (PA_SINK_LINKED(state) && u->sink_input && PA_SINK_INPUT_LINKED(pa_sink_input_get_state(u->sink_input)))
+ if (PA_SINK_IS_LINKED(state) &&
+ u->sink_input &&
+ PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
+
pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
return 0;
}
/* Called from I/O thread context */
-static int sink_input_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
- struct userdata *u = PA_SINK_INPUT(o)->userdata;
+static void sink_request_rewind(pa_sink *s) {
+ struct userdata *u;
- switch (code) {
- case PA_SINK_INPUT_MESSAGE_GET_LATENCY:
- *((pa_usec_t*) data) = pa_bytes_to_usec(u->memchunk.length, &u->sink_input->sample_spec);
+ pa_sink_assert_ref(s);
+ pa_assert_se(u = s->userdata);
- /* Fall through, the default handler will add in the extra
- * latency added by the resampler */
- break;
- }
+ pa_sink_input_request_rewind(u->sink_input, s->thread_info.rewind_nbytes, TRUE, FALSE);
+}
+
+/* Called from I/O thread context */
+static void sink_update_requested_latency(pa_sink *s) {
+ struct userdata *u;
+
+ pa_sink_assert_ref(s);
+ pa_assert_se(u = s->userdata);
- return pa_sink_input_process_msg(o, code, data, offset, chunk);
+ /* Just hand this one over to the master sink */
+ pa_sink_input_set_requested_latency_within_thread(
+ u->sink_input,
+ pa_sink_get_requested_latency_within_thread(s));
}
/* Called from I/O thread context */
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) {
struct userdata *u;
pa_sink_input_assert_ref(i);
+ pa_assert(chunk);
pa_assert_se(u = i->userdata);
- if (!u->memchunk.memblock)
- pa_sink_render(u->sink, length, &u->memchunk);
+ if (!u->sink || !PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ return -1;
- pa_assert(u->memchunk.memblock);
- *chunk = u->memchunk;
- pa_memblock_ref(chunk->memblock);
+ pa_sink_render(u->sink, nbytes, chunk);
return 0;
}
/* Called from I/O thread context */
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ size_t amount = 0;
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- pa_assert(length > 0);
-
- if (u->memchunk.memblock) {
- if (length < u->memchunk.length) {
- u->memchunk.index += length;
- u->memchunk.length -= length;
- return;
- }
+ if (!u->sink || !PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ return;
- pa_memblock_unref(u->memchunk.memblock);
- length -= u->memchunk.length;
- pa_memchunk_reset(&u->memchunk);
+ if (u->sink->thread_info.rewind_nbytes > 0) {
+ amount = PA_MIN(u->sink->thread_info.rewind_nbytes, nbytes);
+ u->sink->thread_info.rewind_nbytes = 0;
}
- if (length > 0)
- pa_sink_skip(u->sink, length);
+ pa_sink_process_rewind(u->sink, amount);
+}
+
+/* Called from I/O thread context */
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
+
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
+ pa_sink_set_max_rewind(u->sink, nbytes);
+}
+
+/* Called from I/O thread context */
+static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
+
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
+ pa_sink_set_max_request(u->sink, nbytes);
+}
+
+/* Called from I/O thread context */
+static void sink_input_update_sink_latency_range_cb(pa_sink_input *i) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
+
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
+ pa_sink_update_latency_range(u->sink, i->sink->thread_info.min_latency, i->sink->thread_info.max_latency);
}
/* Called from I/O thread context */
@@ -171,7 +215,12 @@ static void sink_input_detach_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
pa_sink_detach_within_thread(u->sink);
+ pa_sink_set_asyncmsgq(u->sink, NULL);
+ pa_sink_set_rtpoll(u->sink, NULL);
}
/* Called from I/O thread context */
@@ -181,10 +230,14 @@ static void sink_input_attach_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
+ return;
+
pa_sink_set_asyncmsgq(u->sink, i->sink->asyncmsgq);
pa_sink_set_rtpoll(u->sink, i->sink->rtpoll);
-
pa_sink_attach_within_thread(u->sink);
+
+ pa_sink_update_latency_range(u->sink, u->master->thread_info.min_latency, u->master->thread_info.max_latency);
}
/* Called from main context */
@@ -194,15 +247,31 @@ static void sink_input_kill_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ pa_sink_unlink(u->sink);
pa_sink_input_unlink(u->sink_input);
- pa_sink_input_unref(u->sink_input);
- u->sink_input = NULL;
- pa_sink_unlink(u->sink);
pa_sink_unref(u->sink);
u->sink = NULL;
+ pa_sink_input_unref(u->sink_input);
+ u->sink_input = NULL;
+
+ pa_module_unload_request(u->module, TRUE);
+}
+
+/* Called from IO thread context */
+static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
- pa_module_unload_request(u->module);
+ /* If we are added for the first time, ask for a rewinding so that
+ * we are heard right-away. */
+ if (PA_SINK_INPUT_IS_LINKED(state) &&
+ i->thread_info.state == PA_SINK_INPUT_INIT) {
+ pa_log_debug("Requesting rewind due to state change.");
+ pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
+ }
}
int pa__init(pa_module*m) {
@@ -210,10 +279,11 @@ int pa__init(pa_module*m) {
pa_sample_spec ss;
pa_channel_map sink_map, stream_map;
pa_modargs *ma;
- char *t;
+ const char *k;
pa_sink *master;
- pa_sink_input_new_data data;
- char *default_sink_name = NULL;
+ pa_sink_input_new_data sink_input_data;
+ pa_sink_new_data sink_data;
+ pa_bool_t remix = TRUE;
pa_assert(m);
@@ -236,7 +306,7 @@ int pa__init(pa_module*m) {
stream_map = sink_map;
if (pa_modargs_get_channel_map(ma, "master_channel_map", &stream_map) < 0) {
- pa_log("Invalid master hannel map");
+ pa_log("Invalid master channel map");
goto fail;
}
@@ -245,57 +315,83 @@ int pa__init(pa_module*m) {
goto fail;
}
+ if (pa_channel_map_equal(&stream_map, &master->channel_map))
+ pa_log_warn("No remapping configured, proceeding nonetheless!");
+
+ if (pa_modargs_get_value_boolean(ma, "remix", &remix) < 0) {
+ pa_log("Invalid boolean remix parameter");
+ goto fail;
+ }
+
u = pa_xnew0(struct userdata, 1);
u->core = m->core;
u->module = m;
m->userdata = u;
u->master = master;
- pa_memchunk_reset(&u->memchunk);
-
- default_sink_name = pa_sprintf_malloc("%s.remapped", master->name);
+ u->sink = NULL;
+ u->sink_input = NULL;
/* Create sink */
- if (!(u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", default_sink_name), 0, &ss, &sink_map))) {
+ pa_sink_new_data_init(&sink_data);
+ sink_data.driver = __FILE__;
+ sink_data.module = m;
+ if (!(sink_data.name = pa_xstrdup(pa_modargs_get_value(ma, "sink_name", NULL))))
+ sink_data.name = pa_sprintf_malloc("%s.remapped", master->name);
+ pa_sink_new_data_set_sample_spec(&sink_data, &ss);
+ pa_sink_new_data_set_channel_map(&sink_data, &sink_map);
+ k = pa_proplist_gets(master->proplist, PA_PROP_DEVICE_DESCRIPTION);
+ pa_proplist_setf(sink_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Remapped %s", k ? k : master->name);
+ pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_MASTER_DEVICE, master->name);
+ pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_CLASS, "filter");
+
+ u->sink = pa_sink_new(m->core, &sink_data, PA_SINK_LATENCY);
+ pa_sink_new_data_done(&sink_data);
+
+ if (!u->sink) {
pa_log("Failed to create sink.");
goto fail;
}
u->sink->parent.process_msg = sink_process_msg;
u->sink->set_state = sink_set_state;
+ u->sink->update_requested_latency = sink_update_requested_latency;
+ u->sink->request_rewind = sink_request_rewind;
u->sink->userdata = u;
- u->sink->flags = PA_SINK_LATENCY;
- pa_sink_set_module(u->sink, m);
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc("Remapped %s", master->description));
- pa_xfree(t);
pa_sink_set_asyncmsgq(u->sink, master->asyncmsgq);
pa_sink_set_rtpoll(u->sink, master->rtpoll);
/* Create sink input */
- pa_sink_input_new_data_init(&data);
- data.sink = u->master;
- data.driver = __FILE__;
- data.name = "Remapped Stream";
- pa_sink_input_new_data_set_sample_spec(&data, &ss);
- pa_sink_input_new_data_set_channel_map(&data, &stream_map);
- data.module = m;
-
- if (!(u->sink_input = pa_sink_input_new(m->core, &data, PA_SINK_INPUT_DONT_MOVE)))
+ pa_sink_input_new_data_init(&sink_input_data);
+ sink_input_data.driver = __FILE__;
+ sink_input_data.module = m;
+ sink_input_data.sink = u->master;
+ pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_NAME, "Remapped Stream");
+ pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, "filter");
+ pa_sink_input_new_data_set_sample_spec(&sink_input_data, &ss);
+ pa_sink_input_new_data_set_channel_map(&sink_input_data, &stream_map);
+
+ u->sink_input = pa_sink_input_new(m->core, &sink_input_data, PA_SINK_INPUT_DONT_MOVE | (remix ? 0 : PA_SINK_INPUT_NO_REMIX));
+ pa_sink_input_new_data_done(&sink_input_data);
+
+ if (!u->sink_input)
goto fail;
- u->sink_input->parent.process_msg = sink_input_process_msg;
- u->sink_input->peek = sink_input_peek_cb;
- u->sink_input->drop = sink_input_drop_cb;
- u->sink_input->kill = sink_input_kill_cb;
+ u->sink_input->pop = sink_input_pop_cb;
+ u->sink_input->process_rewind = sink_input_process_rewind_cb;
+ u->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
+ u->sink_input->update_max_request = sink_input_update_max_request_cb;
+ u->sink_input->update_sink_latency_range = sink_input_update_sink_latency_range_cb;
u->sink_input->attach = sink_input_attach_cb;
u->sink_input->detach = sink_input_detach_cb;
+ u->sink_input->kill = sink_input_kill_cb;
+ u->sink_input->state_change = sink_input_state_change_cb;
u->sink_input->userdata = u;
pa_sink_put(u->sink);
pa_sink_input_put(u->sink_input);
pa_modargs_free(ma);
- pa_xfree(default_sink_name);
return 0;
@@ -305,8 +401,6 @@ fail:
pa__done(m);
- pa_xfree(default_sink_name);
-
return -1;
}
@@ -318,18 +412,15 @@ void pa__done(pa_module*m) {
if (!(u = m->userdata))
return;
- if (u->sink_input) {
- pa_sink_input_unlink(u->sink_input);
- pa_sink_input_unref(u->sink_input);
- }
-
if (u->sink) {
pa_sink_unlink(u->sink);
pa_sink_unref(u->sink);
}
- if (u->memchunk.memblock)
- pa_memblock_unref(u->memchunk.memblock);
+ if (u->sink_input) {
+ pa_sink_input_unlink(u->sink_input);
+ pa_sink_input_unref(u->sink_input);
+ }
pa_xfree(u);
}
diff --git a/src/modules/module-rescue-streams.c b/src/modules/module-rescue-streams.c
index a54d460..cc6717c 100644
--- a/src/modules/module-rescue-streams.c
+++ b/src/modules/module-rescue-streams.c
@@ -1,5 +1,3 @@
-/* $Id: module-rescue-streams.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -75,12 +73,12 @@ static pa_hook_result_t sink_hook_callback(pa_core *c, pa_sink *sink, void* user
}
while ((i = pa_idxset_first(sink->inputs, NULL))) {
- if (pa_sink_input_move_to(i, target, 1) < 0) {
- pa_log_warn("Failed to move sink input %u \"%s\" to %s.", i->index, i->name, target->name);
+ if (pa_sink_input_move_to(i, target) < 0) {
+ pa_log_warn("Failed to move sink input %u \"%s\" to %s.", i->index, pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME), target->name);
return PA_HOOK_OK;
}
- pa_log_info("Sucessfully moved sink input %u \"%s\" to %s.", i->index, i->name, target->name);
+ pa_log_info("Sucessfully moved sink input %u \"%s\" to %s.", i->index, pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME), target->name);
}
@@ -116,11 +114,11 @@ static pa_hook_result_t source_hook_callback(pa_core *c, pa_source *source, void
while ((o = pa_idxset_first(source->outputs, NULL))) {
if (pa_source_output_move_to(o, target) < 0) {
- pa_log_warn("Failed to move source output %u \"%s\" to %s.", o->index, o->name, target->name);
+ pa_log_warn("Failed to move source output %u \"%s\" to %s.", o->index, pa_proplist_gets(o->proplist, PA_PROP_APPLICATION_NAME), target->name);
return PA_HOOK_OK;
}
- pa_log_info("Sucessfully moved source output %u \"%s\" to %s.", o->index, o->name, target->name);
+ pa_log_info("Sucessfully moved source output %u \"%s\" to %s.", o->index, pa_proplist_gets(o->proplist, PA_PROP_APPLICATION_NAME), target->name);
}
@@ -139,8 +137,8 @@ int pa__init(pa_module*m) {
}
m->userdata = u = pa_xnew(struct userdata, 1);
- u->sink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK], (pa_hook_cb_t) sink_hook_callback, NULL);
- u->source_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK], (pa_hook_cb_t) source_hook_callback, NULL);
+ u->sink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK], PA_HOOK_LATE, (pa_hook_cb_t) sink_hook_callback, NULL);
+ u->source_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK], PA_HOOK_LATE, (pa_hook_cb_t) source_hook_callback, NULL);
pa_modargs_free(ma);
return 0;
diff --git a/src/modules/module-sine.c b/src/modules/module-sine.c
index 0938af0..21565cc 100644
--- a/src/modules/module-sine.c
+++ b/src/modules/module-sine.c
@@ -1,5 +1,3 @@
-/* $Id: module-sine.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -59,59 +57,72 @@ static const char* const valid_modargs[] = {
NULL,
};
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) {
struct userdata *u;
- pa_assert(i);
- u = i->userdata;
- pa_assert(u);
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
pa_assert(chunk);
chunk->memblock = pa_memblock_ref(u->memblock);
- chunk->index = u->peek_index;
chunk->length = pa_memblock_get_length(u->memblock) - u->peek_index;
+ chunk->index = u->peek_index;
+
+ u->peek_index = 0;
return 0;
}
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
- struct userdata *u;
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
size_t l;
+ struct userdata *u;
- pa_assert(i);
- u = i->userdata;
- pa_assert(u);
- pa_assert(length > 0);
-
- u->peek_index += length;
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
l = pa_memblock_get_length(u->memblock);
+ nbytes %= l;
- while (u->peek_index >= l)
- u->peek_index -= l;
+ if (u->peek_index >= nbytes)
+ u->peek_index -= nbytes;
+ else
+ u->peek_index = l + u->peek_index - nbytes;
}
static void sink_input_kill_cb(pa_sink_input *i) {
struct userdata *u;
- pa_assert(i);
- u = i->userdata;
- pa_assert(u);
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
pa_sink_input_unlink(u->sink_input);
pa_sink_input_unref(u->sink_input);
u->sink_input = NULL;
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
-static void calc_sine(float *f, size_t l, float freq) {
+/* Called from IO thread context */
+static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
+ struct userdata *u;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(u = i->userdata);
+
+ /* If we are added for the first time, ask for a rewinding so that
+ * we are heard right-away. */
+ if (PA_SINK_INPUT_IS_LINKED(state) &&
+ i->thread_info.state == PA_SINK_INPUT_INIT)
+ pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
+}
+
+static void calc_sine(float *f, size_t l, double freq) {
size_t i;
l /= sizeof(float);
for (i = 0; i < l; i++)
- f[i] = (float) sin((double) i/l*M_PI*2*freq)/2;
+ f[i] = (float) sin((double) i/(double)l*M_PI*2*freq)/2;
}
int pa__init(pa_module*m) {
@@ -120,7 +131,6 @@ int pa__init(pa_module*m) {
pa_sink *sink;
pa_sample_spec ss;
uint32_t frequency;
- char t[256];
void *p;
pa_sink_input_new_data data;
@@ -153,24 +163,28 @@ int pa__init(pa_module*m) {
u->memblock = pa_memblock_new(m->core->mempool, pa_bytes_per_second(&ss));
p = pa_memblock_acquire(u->memblock);
- calc_sine(p, pa_memblock_get_length(u->memblock), frequency);
+ calc_sine(p, pa_memblock_get_length(u->memblock), (double) frequency);
pa_memblock_release(u->memblock);
- pa_snprintf(t, sizeof(t), "Sine Generator at %u Hz", frequency);
-
pa_sink_input_new_data_init(&data);
data.sink = sink;
data.driver = __FILE__;
- data.name = t;
+ pa_proplist_setf(data.proplist, PA_PROP_MEDIA_NAME, "%u Hz Sine", frequency);
+ pa_proplist_sets(data.proplist, PA_PROP_MEDIA_ROLE, "abstract");
+ pa_proplist_setf(data.proplist, "sine.hz", "%u", frequency);
pa_sink_input_new_data_set_sample_spec(&data, &ss);
data.module = m;
- if (!(u->sink_input = pa_sink_input_new(m->core, &data, 0)))
+ u->sink_input = pa_sink_input_new(m->core, &data, 0);
+ pa_sink_input_new_data_done(&data);
+
+ if (!u->sink_input)
goto fail;
- u->sink_input->peek = sink_input_peek_cb;
- u->sink_input->drop = sink_input_drop_cb;
+ u->sink_input->pop = sink_input_pop_cb;
+ u->sink_input->process_rewind = sink_input_process_rewind_cb;
u->sink_input->kill = sink_input_kill_cb;
+ u->sink_input->state_change = sink_input_state_change_cb;
u->sink_input->userdata = u;
pa_sink_input_put(u->sink_input);
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 38a6e44..6f50543 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -1,5 +1,3 @@
-/* $Id: module-solaris.c 1986 2007-10-29 20:32:53Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/modules/module-stream-restore-symdef.h b/src/modules/module-stream-restore-symdef.h
new file mode 100644
index 0000000..497c2e3
--- /dev/null
+++ b/src/modules/module-stream-restore-symdef.h
@@ -0,0 +1,25 @@
+#ifndef foomodulestreamrestoresymdeffoo
+#define foomodulestreamrestoresymdeffoo
+
+#include <pulsecore/core.h>
+#include <pulsecore/module.h>
+#include <pulsecore/macro.h>
+
+#define pa__init module_stream_restore_LTX_pa__init
+#define pa__done module_stream_restore_LTX_pa__done
+#define pa__get_author module_stream_restore_LTX_pa__get_author
+#define pa__get_description module_stream_restore_LTX_pa__get_description
+#define pa__get_usage module_stream_restore_LTX_pa__get_usage
+#define pa__get_version module_stream_restore_LTX_pa__get_version
+#define pa__load_once module_stream_restore_LTX_pa__load_once
+
+int pa__init(pa_module*m);
+void pa__done(pa_module*m);
+
+const char* pa__get_author(void);
+const char* pa__get_description(void);
+const char* pa__get_usage(void);
+const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
+
+#endif
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
new file mode 100644
index 0000000..fe79291
--- /dev/null
+++ b/src/modules/module-stream-restore.c
@@ -0,0 +1,811 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <gdbm.h>
+
+#include <pulse/xmalloc.h>
+#include <pulse/volume.h>
+#include <pulse/timeval.h>
+#include <pulse/util.h>
+
+#include <pulsecore/core-error.h>
+#include <pulsecore/module.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/modargs.h>
+#include <pulsecore/log.h>
+#include <pulsecore/core-subscribe.h>
+#include <pulsecore/sink-input.h>
+#include <pulsecore/source-output.h>
+#include <pulsecore/namereg.h>
+#include <pulsecore/protocol-native.h>
+#include <pulsecore/pstream.h>
+#include <pulsecore/pstream-util.h>
+
+#include "module-stream-restore-symdef.h"
+
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Automatically restore the volume/mute/device state of streams");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+
+#define SAVE_INTERVAL 10
+
+static const char* const valid_modargs[] = {
+ "restore_device",
+ "restore_volume",
+ "restore_muted",
+ NULL
+};
+
+struct userdata {
+ pa_core *core;
+ pa_module *module;
+ pa_subscription *subscription;
+ pa_hook_slot
+ *sink_input_new_hook_slot,
+ *sink_input_fixate_hook_slot,
+ *source_output_new_hook_slot,
+ *connection_unlink_hook_slot;
+ pa_time_event *save_time_event;
+ GDBM_FILE gdbm_file;
+
+ pa_bool_t restore_device:1;
+ pa_bool_t restore_volume:1;
+ pa_bool_t restore_muted:1;
+
+ pa_native_protocol *protocol;
+ pa_idxset *subscribed;
+};
+
+struct entry {
+ char device[PA_NAME_MAX];
+ pa_channel_map channel_map;
+ pa_cvolume volume;
+ pa_bool_t muted:1;
+};
+
+
+enum {
+ SUBCOMMAND_TEST,
+ SUBCOMMAND_READ,
+ SUBCOMMAND_WRITE,
+ SUBCOMMAND_DELETE,
+ SUBCOMMAND_SUBSCRIBE,
+ SUBCOMMAND_EVENT
+};
+
+static void save_time_callback(pa_mainloop_api*a, pa_time_event* e, const struct timeval *tv, void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(a);
+ pa_assert(e);
+ pa_assert(tv);
+ pa_assert(u);
+
+ pa_assert(e == u->save_time_event);
+ u->core->mainloop->time_free(u->save_time_event);
+ u->save_time_event = NULL;
+
+ gdbm_sync(u->gdbm_file);
+ pa_log_info("Synced.");
+}
+
+static char *get_name(pa_proplist *p, const char *prefix) {
+ const char *r;
+
+ if (!p)
+ return NULL;
+
+ if ((r = pa_proplist_gets(p, PA_PROP_MEDIA_ROLE)))
+ return pa_sprintf_malloc("%s-by-media-role:%s", prefix, r);
+ else if ((r = pa_proplist_gets(p, PA_PROP_APPLICATION_ID)))
+ return pa_sprintf_malloc("%s-by-application-id:%s", prefix, r);
+ else if ((r = pa_proplist_gets(p, PA_PROP_APPLICATION_NAME)))
+ return pa_sprintf_malloc("%s-by-application-name:%s", prefix, r);
+ else if ((r = pa_proplist_gets(p, PA_PROP_MEDIA_NAME)))
+ return pa_sprintf_malloc("%s-by-media-name:%s", prefix, r);
+
+ return NULL;
+}
+
+static struct entry* read_entry(struct userdata *u, char *name) {
+ datum key, data;
+ struct entry *e;
+
+ pa_assert(u);
+ pa_assert(name);
+
+ key.dptr = name;
+ key.dsize = (int) strlen(name);
+
+ data = gdbm_fetch(u->gdbm_file, key);
+
+ if (!data.dptr)
+ goto fail;
+
+ if (data.dsize != sizeof(struct entry)) {
+ pa_log_warn("Database contains entry for stream %s of wrong size %lu != %lu", name, (unsigned long) data.dsize, (unsigned long) sizeof(struct entry));
+ goto fail;
+ }
+
+ e = (struct entry*) data.dptr;
+
+ if (!memchr(e->device, 0, sizeof(e->device))) {
+ pa_log_warn("Database contains entry for stream %s with missing NUL byte in device name", name);
+ goto fail;
+ }
+
+ if (!(pa_cvolume_valid(&e->volume))) {
+ pa_log_warn("Invalid volume stored in database for stream %s", name);
+ goto fail;
+ }
+
+ if (!(pa_channel_map_valid(&e->channel_map))) {
+ pa_log_warn("Invalid channel map stored in database for stream %s", name);
+ goto fail;
+ }
+
+ if (e->volume.channels != e->channel_map.channels) {
+ pa_log_warn("Volume and channel map don't match in database entry for stream %s", name);
+ goto fail;
+ }
+
+ return e;
+
+fail:
+
+ pa_xfree(data.dptr);
+ return NULL;
+}
+
+static void trigger_save(struct userdata *u) {
+ struct timeval tv;
+ pa_native_connection *c;
+ uint32_t idx;
+
+ for (c = pa_idxset_first(u->subscribed, &idx); c; c = pa_idxset_next(u->subscribed, &idx)) {
+ pa_tagstruct *t;
+
+ t = pa_tagstruct_new(NULL, 0);
+ pa_tagstruct_putu32(t, PA_COMMAND_EXTENSION);
+ pa_tagstruct_putu32(t, 0);
+ pa_tagstruct_putu32(t, u->module->index);
+ pa_tagstruct_puts(t, u->module->name);
+ pa_tagstruct_putu32(t, SUBCOMMAND_EVENT);
+
+ pa_pstream_send_tagstruct(pa_native_connection_get_pstream(c), t);
+ }
+
+ if (u->save_time_event)
+ return;
+
+ pa_gettimeofday(&tv);
+ tv.tv_sec += SAVE_INTERVAL;
+ u->save_time_event = u->core->mainloop->time_new(u->core->mainloop, &tv, save_time_callback, u);
+}
+
+static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata) {
+ struct userdata *u = userdata;
+ struct entry entry, *old;
+ char *name;
+ datum key, data;
+
+ pa_assert(c);
+ pa_assert(u);
+
+ if (t != (PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW) &&
+ t != (PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE) &&
+ t != (PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_NEW) &&
+ t != (PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE))
+ return;
+
+ memset(&entry, 0, sizeof(entry));
+
+ if ((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SINK_INPUT) {
+ pa_sink_input *sink_input;
+
+ if (!(sink_input = pa_idxset_get_by_index(c->sink_inputs, idx)))
+ return;
+
+ if (!(name = get_name(sink_input->proplist, "sink-input")))
+ return;
+
+ entry.channel_map = sink_input->channel_map;
+ entry.volume = *pa_sink_input_get_volume(sink_input);
+ entry.muted = pa_sink_input_get_mute(sink_input);
+ pa_strlcpy(entry.device, sink_input->sink->name, sizeof(entry.device));
+
+ } else {
+ pa_source_output *source_output;
+
+ pa_assert((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT);
+
+ if (!(source_output = pa_idxset_get_by_index(c->source_outputs, idx)))
+ return;
+
+ if (!(name = get_name(source_output->proplist, "source-output")))
+ return;
+
+ /* The following fields are filled in to make the entry valid
+ * according to read_entry(). They are otherwise useless */
+ entry.channel_map = source_output->channel_map;
+ pa_cvolume_reset(&entry.volume, entry.channel_map.channels);
+ pa_strlcpy(entry.device, source_output->source->name, sizeof(entry.device));
+ }
+
+ if ((old = read_entry(u, name))) {
+
+ if (pa_cvolume_equal(pa_cvolume_remap(&old->volume, &old->channel_map, &entry.channel_map), &entry.volume) &&
+ !old->muted == !entry.muted &&
+ strcmp(old->device, entry.device) == 0) {
+
+ pa_xfree(old);
+ pa_xfree(name);
+ return;
+ }
+
+ pa_xfree(old);
+ }
+
+ key.dptr = name;
+ key.dsize = (int) strlen(name);
+
+ data.dptr = (void*) &entry;
+ data.dsize = sizeof(entry);
+
+ pa_log_info("Storing volume/mute/device for stream %s.", name);
+
+ gdbm_store(u->gdbm_file, key, data, GDBM_REPLACE);
+
+ pa_xfree(name);
+
+ trigger_save(u);
+}
+
+static pa_hook_result_t sink_input_new_hook_callback(pa_core *c, pa_sink_input_new_data *new_data, struct userdata *u) {
+ char *name;
+ struct entry *e;
+
+ pa_assert(new_data);
+
+ if (!(name = get_name(new_data->proplist, "sink-input")))
+ return PA_HOOK_OK;
+
+ if ((e = read_entry(u, name))) {
+ pa_sink *s;
+
+ if (u->restore_device &&
+ (s = pa_namereg_get(c, e->device, PA_NAMEREG_SINK, TRUE))) {
+
+ if (!new_data->sink) {
+ pa_log_info("Restoring device for stream %s.", name);
+ new_data->sink = s;
+ } else
+ pa_log_info("Not restore device for stream %s, because already set.", name);
+ }
+
+ pa_xfree(e);
+ }
+
+ pa_xfree(name);
+
+ return PA_HOOK_OK;
+}
+
+static pa_hook_result_t sink_input_fixate_hook_callback(pa_core *c, pa_sink_input_new_data *new_data, struct userdata *u) {
+ char *name;
+ struct entry *e;
+
+ pa_assert(new_data);
+
+ if (!(name = get_name(new_data->proplist, "sink-input")))
+ return PA_HOOK_OK;
+
+ if ((e = read_entry(u, name))) {
+
+ if (u->restore_volume) {
+
+ if (!new_data->volume_is_set) {
+ pa_log_info("Restoring volume for sink input %s.", name);
+ pa_sink_input_new_data_set_volume(new_data, pa_cvolume_remap(&e->volume, &e->channel_map, &new_data->channel_map));
+ } else
+ pa_log_debug("Not restoring volume for sink input %s, because already set.", name);
+ }
+
+ if (u->restore_muted) {
+ if (!new_data->muted_is_set) {
+ pa_log_info("Restoring mute state for sink input %s.", name);
+ pa_sink_input_new_data_set_muted(new_data, e->muted);
+ } else
+ pa_log_debug("Not restoring mute state for sink input %s, because already set.", name);
+ }
+
+ pa_xfree(e);
+ }
+
+ pa_xfree(name);
+
+ return PA_HOOK_OK;
+}
+
+static pa_hook_result_t source_output_new_hook_callback(pa_core *c, pa_source_output_new_data *new_data, struct userdata *u) {
+ char *name;
+ struct entry *e;
+
+ pa_assert(new_data);
+
+ if (!(name = get_name(new_data->proplist, "source-output")))
+ return PA_HOOK_OK;
+
+ if ((e = read_entry(u, name))) {
+ pa_source *s;
+
+ if (u->restore_device &&
+ !new_data->direct_on_input &&
+ (s = pa_namereg_get(c, e->device, PA_NAMEREG_SOURCE, TRUE))) {
+
+ if (!new_data->source) {
+ pa_log_info("Restoring device for stream %s.", name);
+ new_data->source = s;
+ } else
+ pa_log_info("Not restoring device for stream %s, because already set", name);
+ }
+
+ pa_xfree(e);
+ }
+
+ pa_xfree(name);
+
+ return PA_HOOK_OK;
+}
+
+#define EXT_VERSION 1
+
+static void clear_db(struct userdata *u) {
+ datum key;
+
+ pa_assert(u);
+
+ key = gdbm_firstkey(u->gdbm_file);
+ while (key.dptr) {
+ datum next_key;
+ next_key = gdbm_nextkey(u->gdbm_file, key);
+
+ gdbm_delete(u->gdbm_file, key);
+ pa_xfree(key.dptr);
+
+ key = next_key;
+ }
+
+ gdbm_reorganize(u->gdbm_file);
+}
+
+static void apply_entry(struct userdata *u, const char *name, struct entry *e) {
+ pa_sink_input *si;
+ pa_source_output *so;
+ uint32_t idx;
+
+ pa_assert(u);
+ pa_assert(name);
+ pa_assert(e);
+
+ for (si = pa_idxset_first(u->core->sink_inputs, &idx); si; si = pa_idxset_next(u->core->sink_inputs, &idx)) {
+ char *n;
+ pa_sink *s;
+
+ if (!(n = get_name(si->proplist, "sink-input")))
+ continue;
+
+ if (strcmp(name, n)) {
+ pa_xfree(n);
+ continue;
+ }
+
+ if (u->restore_volume) {
+ pa_cvolume v = e->volume;
+ pa_log_info("Restoring volume for sink input %s.", name);
+ pa_sink_input_set_volume(si, pa_cvolume_remap(&v, &e->channel_map, &si->channel_map));
+ }
+
+ if (u->restore_muted) {
+ pa_log_info("Restoring mute state for sink input %s.", name);
+ pa_sink_input_set_mute(si, e->muted);
+ }
+
+ if (u->restore_device &&
+ (s = pa_namereg_get(u->core, e->device, PA_NAMEREG_SOURCE, TRUE))) {
+
+ pa_log_info("Restoring device for stream %s.", name);
+ pa_sink_input_move_to(si, s);
+ }
+ }
+
+ for (so = pa_idxset_first(u->core->source_outputs, &idx); so; so = pa_idxset_next(u->core->source_outputs, &idx)) {
+ char *n;
+ pa_source *s;
+
+ if (!(n = get_name(so->proplist, "source-output")))
+ continue;
+
+ if (strcmp(name, n)) {
+ pa_xfree(n);
+ continue;
+ }
+
+ if (u->restore_device &&
+ (s = pa_namereg_get(u->core, e->device, PA_NAMEREG_SOURCE, TRUE))) {
+
+ pa_log_info("Restoring device for stream %s.", name);
+ pa_source_output_move_to(so, s);
+ }
+ }
+}
+
+#if 0
+static void dump_database(struct userdata *u) {
+ datum key;
+
+ key = gdbm_firstkey(u->gdbm_file);
+ while (key.dptr) {
+ datum next_key;
+ struct entry *e;
+ char *name;
+
+ next_key = gdbm_nextkey(u->gdbm_file, key);
+
+ name = pa_xstrndup(key.dptr, key.dsize);
+ pa_xfree(key.dptr);
+
+ if ((e = read_entry(u, name))) {
+ char t[256];
+ pa_log("name=%s", name);
+ pa_log("device=%s", e->device);
+ pa_log("channel_map=%s", pa_channel_map_snprint(t, sizeof(t), &e->channel_map));
+ pa_log("volume=%s", pa_cvolume_snprint(t, sizeof(t), &e->volume));
+ pa_log("mute=%s", pa_yes_no(e->muted));
+ pa_xfree(e);
+ }
+
+ pa_xfree(name);
+
+ key = next_key;
+ }
+}
+#endif
+
+static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connection *c, uint32_t tag, pa_tagstruct *t) {
+ struct userdata *u;
+ uint32_t command;
+ pa_tagstruct *reply = NULL;
+
+ pa_assert(p);
+ pa_assert(m);
+ pa_assert(c);
+ pa_assert(t);
+
+ u = m->userdata;
+
+ if (pa_tagstruct_getu32(t, &command) < 0)
+ goto fail;
+
+ reply = pa_tagstruct_new(NULL, 0);
+ pa_tagstruct_putu32(reply, PA_COMMAND_REPLY);
+ pa_tagstruct_putu32(reply, tag);
+
+ switch (command) {
+ case SUBCOMMAND_TEST: {
+ if (!pa_tagstruct_eof(t))
+ goto fail;
+
+ pa_tagstruct_putu32(reply, EXT_VERSION);
+ break;
+ }
+
+ case SUBCOMMAND_READ: {
+ datum key;
+
+ if (!pa_tagstruct_eof(t))
+ goto fail;
+
+ key = gdbm_firstkey(u->gdbm_file);
+ while (key.dptr) {
+ datum next_key;
+ struct entry *e;
+ char *name;
+
+ next_key = gdbm_nextkey(u->gdbm_file, key);
+
+ name = pa_xstrndup(key.dptr, (size_t) key.dsize);
+ pa_xfree(key.dptr);
+
+ if ((e = read_entry(u, name))) {
+ pa_tagstruct_puts(reply, name);
+ pa_tagstruct_put_channel_map(reply, &e->channel_map);
+ pa_tagstruct_put_cvolume(reply, &e->volume);
+ pa_tagstruct_puts(reply, e->device);
+ pa_tagstruct_put_boolean(reply, e->muted);
+
+ pa_xfree(e);
+ }
+
+ pa_xfree(name);
+
+ key = next_key;
+ }
+
+ break;
+ }
+
+ case SUBCOMMAND_WRITE: {
+ uint32_t mode;
+ pa_bool_t apply_immediately = FALSE;
+
+ if (pa_tagstruct_getu32(t, &mode) < 0 ||
+ pa_tagstruct_get_boolean(t, &apply_immediately) < 0)
+ goto fail;
+
+ if (mode != PA_UPDATE_MERGE &&
+ mode != PA_UPDATE_REPLACE &&
+ mode != PA_UPDATE_SET)
+ goto fail;
+
+ if (mode == PA_UPDATE_SET)
+ clear_db(u);
+
+ while (!pa_tagstruct_eof(t)) {
+ const char *name, *device;
+ pa_bool_t muted;
+ struct entry entry;
+ datum key, data;
+ int k;
+
+ memset(&entry, 0, sizeof(entry));
+
+ if (pa_tagstruct_gets(t, &name) < 0 ||
+ pa_tagstruct_get_channel_map(t, &entry.channel_map) ||
+ pa_tagstruct_get_cvolume(t, &entry.volume) < 0 ||
+ pa_tagstruct_gets(t, &device) < 0 ||
+ pa_tagstruct_get_boolean(t, &muted) < 0)
+ goto fail;
+
+ if (entry.channel_map.channels != entry.volume.channels)
+ goto fail;
+
+ entry.muted = muted;
+ pa_strlcpy(entry.device, device, sizeof(entry.device));
+
+ key.dptr = (void*) name;
+ key.dsize = (int) strlen(name);
+
+ data.dptr = (void*) &entry;
+ data.dsize = sizeof(entry);
+
+ if ((k = gdbm_store(u->gdbm_file, key, data, mode == PA_UPDATE_REPLACE ? GDBM_REPLACE : GDBM_INSERT)) == 0)
+ if (apply_immediately)
+ apply_entry(u, name, &entry);
+ }
+
+ trigger_save(u);
+
+ break;
+ }
+
+ case SUBCOMMAND_DELETE:
+
+ while (!pa_tagstruct_eof(t)) {
+ const char *name;
+ datum key;
+
+ if (pa_tagstruct_gets(t, &name) < 0)
+ goto fail;
+
+ key.dptr = (void*) name;
+ key.dsize = (int) strlen(name);
+
+ gdbm_delete(u->gdbm_file, key);
+ }
+
+ trigger_save(u);
+
+ break;
+
+ case SUBCOMMAND_SUBSCRIBE: {
+
+ pa_bool_t enabled;
+
+ if (pa_tagstruct_get_boolean(t, &enabled) < 0 ||
+ !pa_tagstruct_eof(t))
+ goto fail;
+
+ if (enabled)
+ pa_idxset_put(u->subscribed, c, NULL);
+ else
+ pa_idxset_remove_by_data(u->subscribed, c, NULL);
+
+ break;
+ }
+
+ default:
+ goto fail;
+ }
+
+ pa_pstream_send_tagstruct(pa_native_connection_get_pstream(c), reply);
+ return 0;
+
+fail:
+
+ if (reply)
+ pa_tagstruct_free(reply);
+
+ return -1;
+}
+
+static pa_hook_result_t connection_unlink_hook_cb(pa_native_protocol *p, pa_native_connection *c, struct userdata *u) {
+ pa_assert(p);
+ pa_assert(c);
+ pa_assert(u);
+
+ pa_idxset_remove_by_data(u->subscribed, c, NULL);
+ return PA_HOOK_OK;
+}
+
+int pa__init(pa_module*m) {
+ pa_modargs *ma = NULL;
+ struct userdata *u;
+ char *fname, *fn;
+ pa_sink_input *si;
+ pa_source_output *so;
+ uint32_t idx;
+ pa_bool_t restore_device = TRUE, restore_volume = TRUE, restore_muted = TRUE;
+ int gdbm_cache_size;
+
+ pa_assert(m);
+
+ if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
+ pa_log("Failed to parse module arguments");
+ goto fail;
+ }
+
+ if (pa_modargs_get_value_boolean(ma, "restore_device", &restore_device) < 0 ||
+ pa_modargs_get_value_boolean(ma, "restore_volume", &restore_volume) < 0 ||
+ pa_modargs_get_value_boolean(ma, "restore_muted", &restore_muted) < 0) {
+ pa_log("restore_device=, restore_volume= and restore_muted= expect boolean arguments");
+ goto fail;
+ }
+
+ if (!restore_muted && !restore_volume && !restore_device)
+ pa_log_warn("Neither restoring volume, nor restoring muted, nor restoring device enabled!");
+
+ m->userdata = u = pa_xnew(struct userdata, 1);
+ u->core = m->core;
+ u->module = m;
+ u->save_time_event = NULL;
+ u->restore_device = restore_device;
+ u->restore_volume = restore_volume;
+ u->restore_muted = restore_muted;
+ u->gdbm_file = NULL;
+ u->subscribed = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
+
+ u->protocol = pa_native_protocol_get(m->core);
+ pa_native_protocol_install_ext(u->protocol, m, extension_cb);
+
+ u->connection_unlink_hook_slot = pa_hook_connect(&pa_native_protocol_hooks(u->protocol)[PA_NATIVE_HOOK_CONNECTION_UNLINK], PA_HOOK_NORMAL, (pa_hook_cb_t) connection_unlink_hook_cb, u);
+
+ u->subscription = pa_subscription_new(m->core, PA_SUBSCRIPTION_MASK_SINK_INPUT|PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT, subscribe_callback, u);
+
+ if (restore_device) {
+ u->sink_input_new_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_NEW], PA_HOOK_EARLY, (pa_hook_cb_t) sink_input_new_hook_callback, u);
+ u->source_output_new_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_NEW], PA_HOOK_EARLY, (pa_hook_cb_t) source_output_new_hook_callback, u);
+ }
+
+ if (restore_volume || restore_muted)
+ u->sink_input_fixate_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_FIXATE], PA_HOOK_EARLY, (pa_hook_cb_t) sink_input_fixate_hook_callback, u);
+
+ /* We include the host identifier in the file name because gdbm
+ * files are CPU dependant, and we don't want things to go wrong
+ * if we are on a multiarch system. */
+
+ fn = pa_sprintf_malloc("stream-volumes."CANONICAL_HOST".gdbm");
+ fname = pa_state_path(fn, TRUE);
+ pa_xfree(fn);
+
+ if (!fname)
+ goto fail;
+
+ if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT, 0600, NULL))) {
+ pa_log("Failed to open volume database '%s': %s", fname, gdbm_strerror(gdbm_errno));
+ pa_xfree(fname);
+ goto fail;
+ }
+
+ /* By default the cache of gdbm is rather large, let's reduce it a bit to save memory */
+ gdbm_cache_size = 10;
+ gdbm_setopt(u->gdbm_file, GDBM_CACHESIZE, &gdbm_cache_size, sizeof(gdbm_cache_size));
+
+ pa_log_info("Sucessfully opened database file '%s'.", fname);
+ pa_xfree(fname);
+
+ for (si = pa_idxset_first(m->core->sink_inputs, &idx); si; si = pa_idxset_next(m->core->sink_inputs, &idx))
+ subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, si->index, u);
+
+ for (so = pa_idxset_first(m->core->source_outputs, &idx); so; so = pa_idxset_next(m->core->source_outputs, &idx))
+ subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_NEW, so->index, u);
+
+ pa_modargs_free(ma);
+ return 0;
+
+fail:
+ pa__done(m);
+
+ if (ma)
+ pa_modargs_free(ma);
+
+ return -1;
+}
+
+void pa__done(pa_module*m) {
+ struct userdata* u;
+
+ pa_assert(m);
+
+ if (!(u = m->userdata))
+ return;
+
+ if (u->subscription)
+ pa_subscription_free(u->subscription);
+
+ if (u->sink_input_new_hook_slot)
+ pa_hook_slot_free(u->sink_input_new_hook_slot);
+ if (u->sink_input_fixate_hook_slot)
+ pa_hook_slot_free(u->sink_input_fixate_hook_slot);
+ if (u->source_output_new_hook_slot)
+ pa_hook_slot_free(u->source_output_new_hook_slot);
+
+ if (u->connection_unlink_hook_slot)
+ pa_hook_slot_free(u->connection_unlink_hook_slot);
+
+ if (u->save_time_event)
+ u->core->mainloop->time_free(u->save_time_event);
+
+ if (u->gdbm_file)
+ gdbm_close(u->gdbm_file);
+
+ if (u->protocol) {
+ pa_native_protocol_remove_ext(u->protocol, m);
+ pa_native_protocol_unref(u->protocol);
+ }
+
+ if (u->subscribed)
+ pa_idxset_free(u->subscribed, NULL, NULL);
+
+ pa_xfree(u);
+}
diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
index dc6cf07..6cc28ec 100644
--- a/src/modules/module-suspend-on-idle.c
+++ b/src/modules/module-suspend-on-idle.c
@@ -1,5 +1,3 @@
-/* $Id: module-suspend-on-idle.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -317,7 +315,7 @@ static pa_hook_result_t device_state_changed_hook_cb(pa_core *c, pa_object *o, s
if (pa_sink_used_by(s) <= 0) {
- if (PA_SINK_OPENED(state))
+ if (PA_SINK_IS_OPENED(state))
restart(d);
}
@@ -328,7 +326,7 @@ static pa_hook_result_t device_state_changed_hook_cb(pa_core *c, pa_object *o, s
if (pa_source_used_by(s) <= 0) {
- if (PA_SOURCE_OPENED(state))
+ if (PA_SOURCE_IS_OPENED(state))
restart(d);
}
}
@@ -339,7 +337,7 @@ static pa_hook_result_t device_state_changed_hook_cb(pa_core *c, pa_object *o, s
int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
struct userdata *u;
- uint32_t timeout = 1;
+ uint32_t timeout = 5;
uint32_t idx;
pa_sink *sink;
pa_source *source;
@@ -367,21 +365,21 @@ int pa__init(pa_module*m) {
for (source = pa_idxset_first(m->core->sources, &idx); source; source = pa_idxset_next(m->core->sources, &idx))
device_new_hook_cb(m->core, PA_OBJECT(source), u);
- u->sink_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_NEW_POST], (pa_hook_cb_t) device_new_hook_cb, u);
- u->source_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_NEW_POST], (pa_hook_cb_t) device_new_hook_cb, u);
- u->sink_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK_POST], (pa_hook_cb_t) device_unlink_hook_cb, u);
- u->source_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK_POST], (pa_hook_cb_t) device_unlink_hook_cb, u);
- u->sink_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_STATE_CHANGED], (pa_hook_cb_t) device_state_changed_hook_cb, u);
- u->source_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_STATE_CHANGED], (pa_hook_cb_t) device_state_changed_hook_cb, u);
-
- u->sink_input_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_FIXATE], (pa_hook_cb_t) sink_input_fixate_hook_cb, u);
- u->source_output_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_FIXATE], (pa_hook_cb_t) source_output_fixate_hook_cb, u);
- u->sink_input_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_UNLINK_POST], (pa_hook_cb_t) sink_input_unlink_hook_cb, u);
- u->source_output_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK_POST], (pa_hook_cb_t) source_output_unlink_hook_cb, u);
- u->sink_input_move_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_MOVE], (pa_hook_cb_t) sink_input_move_hook_cb, u);
- u->source_output_move_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_MOVE], (pa_hook_cb_t) source_output_move_hook_cb, u);
- u->sink_input_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED], (pa_hook_cb_t) sink_input_state_changed_hook_cb, u);
- u->source_output_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], (pa_hook_cb_t) source_output_state_changed_hook_cb, u);
+ u->sink_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) device_new_hook_cb, u);
+ u->source_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) device_new_hook_cb, u);
+ u->sink_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK_POST], PA_HOOK_NORMAL, (pa_hook_cb_t) device_unlink_hook_cb, u);
+ u->source_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK_POST], PA_HOOK_NORMAL, (pa_hook_cb_t) device_unlink_hook_cb, u);
+ u->sink_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_STATE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) device_state_changed_hook_cb, u);
+ u->source_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_STATE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) device_state_changed_hook_cb, u);
+
+ u->sink_input_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_FIXATE], PA_HOOK_NORMAL, (pa_hook_cb_t) sink_input_fixate_hook_cb, u);
+ u->source_output_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_FIXATE], PA_HOOK_NORMAL, (pa_hook_cb_t) source_output_fixate_hook_cb, u);
+ u->sink_input_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_UNLINK_POST], PA_HOOK_NORMAL, (pa_hook_cb_t) sink_input_unlink_hook_cb, u);
+ u->source_output_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK_POST], PA_HOOK_NORMAL, (pa_hook_cb_t) source_output_unlink_hook_cb, u);
+ u->sink_input_move_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_MOVE], PA_HOOK_NORMAL, (pa_hook_cb_t) sink_input_move_hook_cb, u);
+ u->source_output_move_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_MOVE], PA_HOOK_NORMAL, (pa_hook_cb_t) source_output_move_hook_cb, u);
+ u->sink_input_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) sink_input_state_changed_hook_cb, u);
+ u->source_output_state_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) source_output_state_changed_hook_cb, u);
pa_modargs_free(ma);
return 0;
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 35ec560..4bbb11a 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -1,5 +1,3 @@
-/* $Id: module-tunnel.c 2186 2008-03-28 18:01:01Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -47,20 +45,24 @@
#include <pulsecore/pdispatch.h>
#include <pulsecore/pstream.h>
#include <pulsecore/pstream-util.h>
-#include <pulsecore/authkey.h>
#include <pulsecore/socket-client.h>
#include <pulsecore/socket-util.h>
-#include <pulsecore/authkey-prop.h>
#include <pulsecore/time-smoother.h>
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtclock.h>
#include <pulsecore/core-error.h>
+#include <pulsecore/proplist-util.h>
+#include <pulsecore/auth-cookie.h>
#ifdef TUNNEL_SINK
#include "module-tunnel-sink-symdef.h"
+#else
+#include "module-tunnel-source-symdef.h"
+#endif
+
+#ifdef TUNNEL_SINK
PA_MODULE_DESCRIPTION("Tunnel module for sinks");
-PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"server=<address> "
"sink=<remote sink name> "
@@ -71,7 +73,6 @@ PA_MODULE_USAGE(
"sink_name=<name for the local sink> "
"channel_map=<channel map>");
#else
-#include "module-tunnel-source-symdef.h"
PA_MODULE_DESCRIPTION("Tunnel module for sources");
PA_MODULE_USAGE(
"server=<address> "
@@ -86,15 +87,7 @@ PA_MODULE_USAGE(
PA_MODULE_AUTHOR("Lennart Poettering");
PA_MODULE_VERSION(PACKAGE_VERSION);
-
-#define DEFAULT_TLENGTH_MSEC 100
-#define DEFAULT_MINREQ_MSEC 10
-#define DEFAULT_MAXLENGTH_MSEC ((DEFAULT_TLENGTH_MSEC*3)/2)
-#define DEFAULT_FRAGSIZE_MSEC 10
-
-#define DEFAULT_TIMEOUT 5
-
-#define LATENCY_INTERVAL 10
+PA_MODULE_LOAD_ONCE(FALSE);
static const char* const valid_modargs[] = {
"server",
@@ -113,38 +106,60 @@ static const char* const valid_modargs[] = {
NULL,
};
-enum {
- SOURCE_MESSAGE_POST = PA_SOURCE_MESSAGE_MAX
-};
+#define DEFAULT_TIMEOUT 5
+
+#define LATENCY_INTERVAL 10
+
+#define MIN_NETWORK_LATENCY_USEC (8*PA_USEC_PER_MSEC)
+
+#ifdef TUNNEL_SINK
enum {
SINK_MESSAGE_REQUEST = PA_SINK_MESSAGE_MAX,
+ SINK_MESSAGE_REMOTE_SUSPEND,
+ SINK_MESSAGE_UPDATE_LATENCY,
SINK_MESSAGE_POST
};
+#define DEFAULT_TLENGTH_MSEC 150
+#define DEFAULT_MINREQ_MSEC 25
+
+#else
+
+enum {
+ SOURCE_MESSAGE_POST = PA_SOURCE_MESSAGE_MAX,
+ SOURCE_MESSAGE_REMOTE_SUSPEND,
+ SOURCE_MESSAGE_UPDATE_LATENCY
+};
+
+#define DEFAULT_FRAGSIZE_MSEC 25
+
+#endif
+
#ifdef TUNNEL_SINK
static void command_request(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_started(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
#endif
static void command_subscribe_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static void command_stream_killed(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
-static void command_overflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
-static void command_underflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
-static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_suspended(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static void command_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
#ifdef TUNNEL_SINK
[PA_COMMAND_REQUEST] = command_request,
+ [PA_COMMAND_STARTED] = command_started,
#endif
[PA_COMMAND_SUBSCRIBE_EVENT] = command_subscribe_event,
- [PA_COMMAND_OVERFLOW] = command_overflow,
- [PA_COMMAND_UNDERFLOW] = command_underflow,
+ [PA_COMMAND_OVERFLOW] = command_overflow_or_underflow,
+ [PA_COMMAND_UNDERFLOW] = command_overflow_or_underflow,
[PA_COMMAND_PLAYBACK_STREAM_KILLED] = command_stream_killed,
[PA_COMMAND_RECORD_STREAM_KILLED] = command_stream_killed,
- [PA_COMMAND_PLAYBACK_STREAM_SUSPENDED] = command_suspend,
- [PA_COMMAND_RECORD_STREAM_SUSPENDED] = command_suspend,
+ [PA_COMMAND_PLAYBACK_STREAM_SUSPENDED] = command_suspended,
+ [PA_COMMAND_RECORD_STREAM_SUSPENDED] = command_suspended,
[PA_COMMAND_PLAYBACK_STREAM_MOVED] = command_moved,
- [PA_COMMAND_RECORD_STREAM_MOVED] = command_moved,
+ [PA_COMMAND_RECORD_STREAM_MOVED] = command_moved
};
struct userdata {
@@ -163,13 +178,13 @@ struct userdata {
#ifdef TUNNEL_SINK
char *sink_name;
pa_sink *sink;
- uint32_t requested_bytes;
+ size_t requested_bytes;
#else
char *source_name;
pa_source *source;
#endif
- uint8_t auth_cookie[PA_NATIVE_COOKIE_LENGTH];
+ pa_auth_cookie *auth_cookie;
uint32_t version;
uint32_t ctag;
@@ -178,9 +193,15 @@ struct userdata {
int64_t counter, counter_delta;
- pa_time_event *time_event;
+ pa_bool_t remote_corked:1;
+ pa_bool_t remote_suspended:1;
- pa_bool_t auth_cookie_in_property;
+ pa_usec_t transport_usec;
+ pa_bool_t transport_usec_valid;
+
+ uint32_t ignore_latency_before;
+
+ pa_time_event *time_event;
pa_smoother *smoother;
@@ -198,7 +219,10 @@ struct userdata {
#endif
};
-static void command_stream_killed(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void request_latency(struct userdata *u);
+
+/* Called from main context */
+static void command_stream_killed(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
pa_assert(pd);
@@ -207,10 +231,11 @@ static void command_stream_killed(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t comma
pa_assert(u->pdispatch == pd);
pa_log_warn("Stream killed");
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
-static void command_overflow(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
pa_assert(pd);
@@ -218,21 +243,40 @@ static void command_overflow(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, P
pa_assert(u);
pa_assert(u->pdispatch == pd);
- pa_log_warn("Server signalled buffer overrun.");
+ pa_log_info("Server signalled buffer overrun/underrun.");
+ request_latency(u);
}
-static void command_underflow(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void command_suspended(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
+ uint32_t channel;
+ pa_bool_t suspended;
pa_assert(pd);
pa_assert(t);
pa_assert(u);
pa_assert(u->pdispatch == pd);
- pa_log_warn("Server signalled buffer underrun.");
+ if (pa_tagstruct_getu32(t, &channel) < 0 ||
+ pa_tagstruct_get_boolean(t, &suspended) < 0 ||
+ !pa_tagstruct_eof(t)) {
+ pa_log("Invalid packet");
+ pa_module_unload_request(u->module, TRUE);
+ return;
+ }
+
+#ifdef TUNNEL_SINK
+ pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
+#else
+ pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
+#endif
+
+ request_latency(u);
}
-static void command_suspend(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void command_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
pa_assert(pd);
@@ -240,28 +284,54 @@ static void command_suspend(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA
pa_assert(u);
pa_assert(u->pdispatch == pd);
- pa_log_debug("Server reports a stream suspension.");
+ pa_log_debug("Server reports a stream move.");
+ request_latency(u);
}
-static void command_moved(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
- struct userdata *u = userdata;
+#ifdef TUNNEL_SINK
+
+/* Called from main context */
+static void command_started(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ struct userdata *u = userdata;
pa_assert(pd);
pa_assert(t);
pa_assert(u);
pa_assert(u->pdispatch == pd);
- pa_log_debug("Server reports a stream move.");
+ pa_log_debug("Server reports playback started.");
+ request_latency(u);
}
-static void stream_cork(struct userdata *u, pa_bool_t cork) {
- pa_tagstruct *t;
+#endif
+
+/* Called from IO thread context */
+static void stream_cork_within_thread(struct userdata *u, pa_bool_t cork) {
+ pa_usec_t x;
pa_assert(u);
- if (cork)
- pa_smoother_pause(u->smoother, pa_rtclock_usec());
+ if (u->remote_corked == cork)
+ return;
+
+ u->remote_corked = cork;
+ x = pa_rtclock_usec();
+
+ /* Correct by the time this needs to travel to the other side.
+ * This is a valid thread-safe access, because the main thread is
+ * waiting for us */
+ if (u->transport_usec_valid)
+ x += u->transport_usec;
+
+ if (u->remote_suspended || u->remote_corked)
+ pa_smoother_pause(u->smoother, x);
else
- pa_smoother_resume(u->smoother, pa_rtclock_usec());
+ pa_smoother_resume(u->smoother, x);
+}
+
+/* Called from main context */
+static void stream_cork(struct userdata *u, pa_bool_t cork) {
+ pa_tagstruct *t;
+ pa_assert(u);
if (!u->pstream)
return;
@@ -276,19 +346,50 @@ static void stream_cork(struct userdata *u, pa_bool_t cork) {
pa_tagstruct_putu32(t, u->channel);
pa_tagstruct_put_boolean(t, !!cork);
pa_pstream_send_tagstruct(u->pstream, t);
+
+ request_latency(u);
+}
+
+/* Called from IO thread context */
+static void stream_suspend_within_thread(struct userdata *u, pa_bool_t suspend) {
+ pa_usec_t x;
+ pa_assert(u);
+
+ if (u->remote_suspended == suspend)
+ return;
+
+ u->remote_suspended = suspend;
+
+ x = pa_rtclock_usec();
+
+ /* Correct by the time this needed to travel from the other side.
+ * This is a valid thread-safe access, because the main thread is
+ * waiting for us */
+ if (u->transport_usec_valid)
+ x -= u->transport_usec;
+
+ if (u->remote_suspended || u->remote_corked)
+ pa_smoother_pause(u->smoother, x);
+ else
+ pa_smoother_resume(u->smoother, x);
}
#ifdef TUNNEL_SINK
+/* Called from IO thread context */
static void send_data(struct userdata *u) {
pa_assert(u);
while (u->requested_bytes > 0) {
pa_memchunk memchunk;
+
pa_sink_render(u->sink, u->requested_bytes, &memchunk);
pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_POST, NULL, 0, &memchunk, NULL);
pa_memblock_unref(memchunk.memblock);
+
u->requested_bytes -= memchunk.length;
+
+ u->counter += (int64_t) memchunk.length;
}
}
@@ -302,23 +403,59 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
int r;
/* First, change the state, because otherwide pa_sink_render() would fail */
- if ((r = pa_sink_process_msg(o, code, data, offset, chunk)) >= 0)
- if (PA_SINK_OPENED((pa_sink_state_t) PA_PTR_TO_UINT(data)))
+ if ((r = pa_sink_process_msg(o, code, data, offset, chunk)) >= 0) {
+
+ stream_cork_within_thread(u, u->sink->state == PA_SINK_SUSPENDED);
+
+ if (PA_SINK_IS_OPENED(u->sink->state))
send_data(u);
+ }
return r;
}
+ case PA_SINK_MESSAGE_GET_LATENCY: {
+ pa_usec_t yl, yr, *usec = data;
+
+ yl = pa_bytes_to_usec((uint64_t) u->counter, &u->sink->sample_spec);
+ yr = pa_smoother_get(u->smoother, pa_rtclock_usec());
+
+ *usec = yl > yr ? yl - yr : 0;
+ return 0;
+ }
+
case SINK_MESSAGE_REQUEST:
pa_assert(offset > 0);
u->requested_bytes += (size_t) offset;
- if (PA_SINK_OPENED(u->sink->thread_info.state))
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
send_data(u);
return 0;
+
+ case SINK_MESSAGE_REMOTE_SUSPEND:
+
+ stream_suspend_within_thread(u, !!PA_PTR_TO_UINT(data));
+ return 0;
+
+
+ case SINK_MESSAGE_UPDATE_LATENCY: {
+ pa_usec_t y;
+
+ y = pa_bytes_to_usec((uint64_t) u->counter, &u->sink->sample_spec);
+
+ if (y > (pa_usec_t) offset || offset < 0)
+ y -= (pa_usec_t) offset;
+ else
+ y = 0;
+
+ pa_smoother_put(u->smoother, pa_rtclock_usec(), y);
+
+ return 0;
+ }
+
case SINK_MESSAGE_POST:
/* OK, This might be a bit confusing. This message is
@@ -327,14 +464,16 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
* dispatched. Yeah, ugly, but I am a lazy bastard. */
pa_pstream_send_memblock(u->pstream, u->channel, 0, PA_SEEK_RELATIVE, chunk);
- u->counter += chunk->length;
- u->counter_delta += chunk->length;
+
+ u->counter_delta += (int64_t) chunk->length;
+
return 0;
}
return pa_sink_process_msg(o, code, data, offset, chunk);
}
+/* Called from main context */
static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
struct userdata *u;
pa_sink_assert_ref(s);
@@ -343,7 +482,7 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
switch ((pa_sink_state_t) state) {
case PA_SINK_SUSPENDED:
- pa_assert(PA_SINK_OPENED(s->state));
+ pa_assert(PA_SINK_IS_OPENED(s->state));
stream_cork(u, TRUE);
break;
@@ -363,20 +502,65 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
#else
+/* This function is called from IO context -- except when it is not. */
static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
struct userdata *u = PA_SOURCE(o)->userdata;
switch (code) {
+
+ case PA_SINK_MESSAGE_SET_STATE: {
+ int r;
+
+ if ((r = pa_source_process_msg(o, code, data, offset, chunk)) >= 0)
+ stream_cork_within_thread(u, u->source->state == PA_SOURCE_SUSPENDED);
+
+ return r;
+ }
+
+ case PA_SOURCE_MESSAGE_GET_LATENCY: {
+ pa_usec_t yr, yl, *usec = data;
+
+ yl = pa_bytes_to_usec((uint64_t) u->counter, &PA_SINK(o)->sample_spec);
+ yr = pa_smoother_get(u->smoother, pa_rtclock_usec());
+
+ *usec = yr > yl ? yr - yl : 0;
+ return 0;
+ }
+
case SOURCE_MESSAGE_POST:
- if (PA_SOURCE_OPENED(u->source->thread_info.state))
+ if (PA_SOURCE_IS_OPENED(u->source->thread_info.state))
pa_source_post(u->source, chunk);
+
+ u->counter += (int64_t) chunk->length;
+
return 0;
+
+ case SOURCE_MESSAGE_REMOTE_SUSPEND:
+
+ stream_suspend_within_thread(u, !!PA_PTR_TO_UINT(data));
+ return 0;
+
+ case SOURCE_MESSAGE_UPDATE_LATENCY: {
+ pa_usec_t y;
+
+ y = pa_bytes_to_usec((uint64_t) u->counter, &u->source->sample_spec);
+
+ if (offset >= 0 || y > (pa_usec_t) -offset)
+ y += (pa_usec_t) offset;
+ else
+ y = 0;
+
+ pa_smoother_put(u->smoother, pa_rtclock_usec(), y);
+
+ return 0;
+ }
}
return pa_source_process_msg(o, code, data, offset, chunk);
}
+/* Called from main context */
static int source_set_state(pa_source *s, pa_source_state_t state) {
struct userdata *u;
pa_source_assert_ref(s);
@@ -385,7 +569,7 @@ static int source_set_state(pa_source *s, pa_source_state_t state) {
switch ((pa_source_state_t) state) {
case PA_SOURCE_SUSPENDED:
- pa_assert(PA_SOURCE_OPENED(s->state));
+ pa_assert(PA_SOURCE_IS_OPENED(s->state));
stream_cork(u, TRUE);
break;
@@ -418,6 +602,12 @@ static void thread_func(void *userdata) {
for (;;) {
int ret;
+#ifdef TUNNEL_SINK
+ if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
+#endif
+
if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
goto fail;
@@ -436,7 +626,8 @@ finish:
}
#ifdef TUNNEL_SINK
-static void command_request(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void command_request(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
uint32_t bytes, channel;
@@ -457,21 +648,24 @@ static void command_request(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED ui
goto fail;
}
- pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REQUEST, NULL, bytes, NULL);
+ pa_asyncmsgq_post(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REQUEST, NULL, bytes, NULL, NULL);
return;
fail:
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
#endif
-static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
- pa_usec_t sink_usec, source_usec, transport_usec, host_usec, k;
- int playing;
+ pa_usec_t sink_usec, source_usec, transport_usec;
+ pa_bool_t playing;
int64_t write_index, read_index;
struct timeval local, remote, now;
+ pa_sample_spec *ss;
+ int64_t delay;
pa_assert(pd);
pa_assert(u);
@@ -480,7 +674,7 @@ static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, PA_G
if (command == PA_COMMAND_ERROR)
pa_log("Failed to get latency.");
else
- pa_log("Protocol error 1.");
+ pa_log("Protocol error.");
goto fail;
}
@@ -491,52 +685,90 @@ static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, PA_G
pa_tagstruct_get_timeval(t, &remote) < 0 ||
pa_tagstruct_gets64(t, &write_index) < 0 ||
pa_tagstruct_gets64(t, &read_index) < 0) {
- pa_log("Invalid reply. (latency)");
+ pa_log("Invalid reply.");
goto fail;
}
+#ifdef TUNNEL_SINK
+ if (u->version >= 13) {
+ uint64_t underrun_for = 0, playing_for = 0;
+
+ if (pa_tagstruct_getu64(t, &underrun_for) < 0 ||
+ pa_tagstruct_getu64(t, &playing_for) < 0) {
+ pa_log("Invalid reply.");
+ goto fail;
+ }
+ }
+#endif
+
+ if (!pa_tagstruct_eof(t)) {
+ pa_log("Invalid reply.");
+ goto fail;
+ }
+
+ if (tag < u->ignore_latency_before) {
+ request_latency(u);
+ return;
+ }
+
pa_gettimeofday(&now);
+ /* Calculate transport usec */
if (pa_timeval_cmp(&local, &remote) < 0 && pa_timeval_cmp(&remote, &now)) {
/* local and remote seem to have synchronized clocks */
#ifdef TUNNEL_SINK
- transport_usec = pa_timeval_diff(&remote, &local);
+ u->transport_usec = pa_timeval_diff(&remote, &local);
#else
- transport_usec = pa_timeval_diff(&now, &remote);
+ u->transport_usec = pa_timeval_diff(&now, &remote);
#endif
} else
- transport_usec = pa_timeval_diff(&now, &local)/2;
+ u->transport_usec = pa_timeval_diff(&now, &local)/2;
+ u->transport_usec_valid = TRUE;
+ /* First, take the device's delay */
#ifdef TUNNEL_SINK
- host_usec = sink_usec + transport_usec;
+ delay = (int64_t) sink_usec;
+ ss = &u->sink->sample_spec;
#else
- host_usec = source_usec + transport_usec;
- if (host_usec > sink_usec)
- host_usec -= sink_usec;
- else
- host_usec = 0;
+ delay = (int64_t) source_usec;
+ ss = &u->source->sample_spec;
#endif
+ /* Add the length of our server-side buffer */
+ if (write_index >= read_index)
+ delay += (int64_t) pa_bytes_to_usec((uint64_t) (write_index-read_index), ss);
+ else
+ delay -= (int64_t) pa_bytes_to_usec((uint64_t) (read_index-write_index), ss);
+
+ /* Our measurements are already out of date, hence correct by the *
+ * transport latency */
#ifdef TUNNEL_SINK
- k = pa_bytes_to_usec(u->counter - u->counter_delta, &u->sink->sample_spec);
+ delay -= (int64_t) transport_usec;
+#else
+ delay += (int64_t) transport_usec;
+#endif
- if (k > host_usec)
- k -= host_usec;
- else
- k = 0;
+ /* Now correct by what we have have read/written since we requested the update */
+#ifdef TUNNEL_SINK
+ delay += (int64_t) pa_bytes_to_usec((uint64_t) u->counter_delta, ss);
#else
- k = pa_bytes_to_usec(u->counter - u->counter_delta, &u->source->sample_spec);
- k += host_usec;
+ delay -= (int64_t) pa_bytes_to_usec((uint64_t) u->counter_delta, ss);
#endif
- pa_smoother_put(u->smoother, pa_rtclock_usec(), k);
+#ifdef TUNNEL_SINK
+ pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_UPDATE_LATENCY, 0, delay, NULL);
+#else
+ pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_UPDATE_LATENCY, 0, delay, NULL);
+#endif
return;
fail:
- pa_module_unload_request(u->module);
+
+ pa_module_unload_request(u->module, TRUE);
}
+/* Called from main context */
static void request_latency(struct userdata *u) {
pa_tagstruct *t;
struct timeval now;
@@ -558,10 +790,12 @@ static void request_latency(struct userdata *u) {
pa_pstream_send_tagstruct(u->pstream, t);
pa_pdispatch_register_reply(u->pdispatch, tag, DEFAULT_TIMEOUT, stream_get_latency_callback, u, NULL);
+ u->ignore_latency_before = tag;
u->counter_delta = 0;
}
-static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+/* Called from main context */
+static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, const struct timeval *tv, void *userdata) {
struct userdata *u = userdata;
struct timeval ntv;
@@ -576,32 +810,7 @@ static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED
m->time_restart(e, &ntv);
}
-#ifdef TUNNEL_SINK
-static pa_usec_t sink_get_latency(pa_sink *s) {
- pa_usec_t t, c;
- struct userdata *u = s->userdata;
-
- pa_sink_assert_ref(s);
-
- c = pa_bytes_to_usec(u->counter, &s->sample_spec);
- t = pa_smoother_get(u->smoother, pa_rtclock_usec());
-
- return c > t ? c - t : 0;
-}
-#else
-static pa_usec_t source_get_latency(pa_source *s) {
- pa_usec_t t, c;
- struct userdata *u = s->userdata;
-
- pa_source_assert_ref(s);
-
- c = pa_bytes_to_usec(u->counter, &s->sample_spec);
- t = pa_smoother_get(u->smoother, pa_rtclock_usec());
-
- return t > c ? t - c : 0;
-}
-#endif
-
+/* Called from main context */
static void update_description(struct userdata *u) {
char *d;
char un[128], hn[128];
@@ -616,8 +825,14 @@ static void update_description(struct userdata *u) {
#ifdef TUNNEL_SINK
pa_sink_set_description(u->sink, d);
+ pa_proplist_sets(u->sink->proplist, "tunnel.remote.user", u->user_name);
+ pa_proplist_sets(u->sink->proplist, "tunnel.remote.fqdn", u->server_fqdn);
+ pa_proplist_sets(u->sink->proplist, "tunnel.remote.description", u->device_description);
#else
pa_source_set_description(u->source, d);
+ pa_proplist_sets(u->source->proplist, "tunnel.remote.user", u->user_name);
+ pa_proplist_sets(u->source->proplist, "tunnel.remote.fqdn", u->server_fqdn);
+ pa_proplist_sets(u->source->proplist, "tunnel.remote.description", u->device_description);
#endif
pa_xfree(d);
@@ -640,7 +855,8 @@ static void update_description(struct userdata *u) {
pa_xfree(d);
}
-static void server_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void server_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
pa_sample_spec ss;
const char *server_name, *server_version, *user_name, *host_name, *default_sink_name, *default_source_name;
@@ -653,7 +869,7 @@ static void server_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uin
if (command == PA_COMMAND_ERROR)
pa_log("Failed to get info.");
else
- pa_log("Protocol error 6.");
+ pa_log("Protocol error.");
goto fail;
}
@@ -665,7 +881,13 @@ static void server_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uin
pa_tagstruct_gets(t, &default_sink_name) < 0 ||
pa_tagstruct_gets(t, &default_source_name) < 0 ||
pa_tagstruct_getu32(t, &cookie) < 0) {
- pa_log("Invalid reply. (get_server_info)");
+
+ pa_log("Parse failure");
+ goto fail;
+ }
+
+ if (!pa_tagstruct_eof(t)) {
+ pa_log("Packet too long");
goto fail;
}
@@ -680,29 +902,33 @@ static void server_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uin
return;
fail:
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
#ifdef TUNNEL_SINK
-static void sink_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void sink_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
uint32_t idx, owner_module, monitor_source, flags;
const char *name, *description, *monitor_source_name, *driver;
pa_sample_spec ss;
pa_channel_map cm;
pa_cvolume volume;
- int mute;
+ pa_bool_t mute;
pa_usec_t latency;
+ pa_proplist *pl;
pa_assert(pd);
pa_assert(u);
+ pl = pa_proplist_new();
+
if (command != PA_COMMAND_REPLY) {
if (command == PA_COMMAND_ERROR)
pa_log("Failed to get info.");
else
- pa_log("Protocol error 5.");
+ pa_log("Protocol error.");
goto fail;
}
@@ -719,10 +945,29 @@ static void sink_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint3
pa_tagstruct_get_usec(t, &latency) < 0 ||
pa_tagstruct_gets(t, &driver) < 0 ||
pa_tagstruct_getu32(t, &flags) < 0) {
- pa_log("Invalid reply. (get_sink_info)");
+
+ pa_log("Parse failure");
goto fail;
}
+ if (u->version >= 13) {
+ pa_usec_t configured_latency;
+
+ if (pa_tagstruct_get_proplist(t, pl) < 0 ||
+ pa_tagstruct_get_usec(t, &configured_latency) < 0) {
+
+ pa_log("Parse failure");
+ goto fail;
+ }
+ }
+
+ if (!pa_tagstruct_eof(t)) {
+ pa_log("Packet too long");
+ goto fail;
+ }
+
+ pa_proplist_free(pl);
+
if (!u->sink_name || strcmp(name, u->sink_name))
return;
@@ -734,27 +979,32 @@ static void sink_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint3
return;
fail:
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
+ pa_proplist_free(pl);
}
-static void sink_input_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void sink_input_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
uint32_t idx, owner_module, client, sink;
pa_usec_t buffer_usec, sink_usec;
const char *name, *driver, *resample_method;
- int mute;
+ pa_bool_t mute;
pa_sample_spec sample_spec;
pa_channel_map channel_map;
pa_cvolume volume;
+ pa_proplist *pl;
pa_assert(pd);
pa_assert(u);
+ pl = pa_proplist_new();
+
if (command != PA_COMMAND_REPLY) {
if (command == PA_COMMAND_ERROR)
pa_log("Failed to get info.");
else
- pa_log("Protocol error 2.");
+ pa_log("Protocol error.");
goto fail;
}
@@ -769,12 +1019,35 @@ static void sink_input_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
pa_tagstruct_get_usec(t, &buffer_usec) < 0 ||
pa_tagstruct_get_usec(t, &sink_usec) < 0 ||
pa_tagstruct_gets(t, &resample_method) < 0 ||
- pa_tagstruct_gets(t, &driver) < 0 ||
- (u->version >= 11 && pa_tagstruct_get_boolean(t, &mute) < 0)) {
- pa_log("Invalid reply. (get_info)");
+ pa_tagstruct_gets(t, &driver) < 0) {
+
+ pa_log("Parse failure");
goto fail;
}
+ if (u->version >= 11) {
+ if (pa_tagstruct_get_boolean(t, &mute) < 0) {
+
+ pa_log("Parse failure");
+ goto fail;
+ }
+ }
+
+ if (u->version >= 13) {
+ if (pa_tagstruct_get_proplist(t, pl) < 0) {
+
+ pa_log("Parse failure");
+ goto fail;
+ }
+ }
+
+ if (!pa_tagstruct_eof(t)) {
+ pa_log("Packet too long");
+ goto fail;
+ }
+
+ pa_proplist_free(pl);
+
if (idx != u->device_index)
return;
@@ -793,29 +1066,34 @@ static void sink_input_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
return;
fail:
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
+ pa_proplist_free(pl);
}
#else
-static void source_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void source_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
uint32_t idx, owner_module, monitor_of_sink, flags;
const char *name, *description, *monitor_of_sink_name, *driver;
pa_sample_spec ss;
pa_channel_map cm;
pa_cvolume volume;
- int mute;
- pa_usec_t latency;
+ pa_bool_t mute;
+ pa_usec_t latency, configured_latency;
+ pa_proplist *pl;
pa_assert(pd);
pa_assert(u);
+ pl = pa_proplist_new();
+
if (command != PA_COMMAND_REPLY) {
if (command == PA_COMMAND_ERROR)
pa_log("Failed to get info.");
else
- pa_log("Protocol error 5.");
+ pa_log("Protocol error.");
goto fail;
}
@@ -832,10 +1110,27 @@ static void source_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uin
pa_tagstruct_get_usec(t, &latency) < 0 ||
pa_tagstruct_gets(t, &driver) < 0 ||
pa_tagstruct_getu32(t, &flags) < 0) {
- pa_log("Invalid reply. (get_source_info)");
+
+ pa_log("Parse failure");
+ goto fail;
+ }
+
+ if (u->version >= 13) {
+ if (pa_tagstruct_get_proplist(t, pl) < 0 ||
+ pa_tagstruct_get_usec(t, &configured_latency) < 0) {
+
+ pa_log("Parse failure");
+ goto fail;
+ }
+ }
+
+ if (!pa_tagstruct_eof(t)) {
+ pa_log("Packet too long");
goto fail;
}
+ pa_proplist_free(pl);
+
if (!u->source_name || strcmp(name, u->source_name))
return;
@@ -847,11 +1142,13 @@ static void source_info_cb(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uin
return;
fail:
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
+ pa_proplist_free(pl);
}
#endif
+/* Called from main context */
static void request_info(struct userdata *u) {
pa_tagstruct *t;
uint32_t tag;
@@ -871,25 +1168,30 @@ static void request_info(struct userdata *u) {
pa_pstream_send_tagstruct(u->pstream, t);
pa_pdispatch_register_reply(u->pdispatch, tag, DEFAULT_TIMEOUT, sink_input_info_cb, u, NULL);
- t = pa_tagstruct_new(NULL, 0);
- pa_tagstruct_putu32(t, PA_COMMAND_GET_SINK_INFO);
- pa_tagstruct_putu32(t, tag = u->ctag++);
- pa_tagstruct_putu32(t, PA_INVALID_INDEX);
- pa_tagstruct_puts(t, u->sink_name);
- pa_pstream_send_tagstruct(u->pstream, t);
- pa_pdispatch_register_reply(u->pdispatch, tag, DEFAULT_TIMEOUT, sink_info_cb, u, NULL);
+ if (u->sink_name) {
+ t = pa_tagstruct_new(NULL, 0);
+ pa_tagstruct_putu32(t, PA_COMMAND_GET_SINK_INFO);
+ pa_tagstruct_putu32(t, tag = u->ctag++);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, u->sink_name);
+ pa_pstream_send_tagstruct(u->pstream, t);
+ pa_pdispatch_register_reply(u->pdispatch, tag, DEFAULT_TIMEOUT, sink_info_cb, u, NULL);
+ }
#else
- t = pa_tagstruct_new(NULL, 0);
- pa_tagstruct_putu32(t, PA_COMMAND_GET_SOURCE_INFO);
- pa_tagstruct_putu32(t, tag = u->ctag++);
- pa_tagstruct_putu32(t, PA_INVALID_INDEX);
- pa_tagstruct_puts(t, u->source_name);
- pa_pstream_send_tagstruct(u->pstream, t);
- pa_pdispatch_register_reply(u->pdispatch, tag, DEFAULT_TIMEOUT, source_info_cb, u, NULL);
+ if (u->source_name) {
+ t = pa_tagstruct_new(NULL, 0);
+ pa_tagstruct_putu32(t, PA_COMMAND_GET_SOURCE_INFO);
+ pa_tagstruct_putu32(t, tag = u->ctag++);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, u->source_name);
+ pa_pstream_send_tagstruct(u->pstream, t);
+ pa_pdispatch_register_reply(u->pdispatch, tag, DEFAULT_TIMEOUT, source_info_cb, u, NULL);
+ }
#endif
}
-static void command_subscribe_event(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void command_subscribe_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
pa_subscription_event_type_t e;
uint32_t idx;
@@ -902,7 +1204,7 @@ static void command_subscribe_event(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t com
if (pa_tagstruct_getu32(t, &e) < 0 ||
pa_tagstruct_getu32(t, &idx) < 0) {
pa_log("Invalid protocol reply");
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
return;
}
@@ -919,6 +1221,7 @@ static void command_subscribe_event(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t com
request_info(u);
}
+/* Called from main context */
static void start_subscribe(struct userdata *u) {
pa_tagstruct *t;
uint32_t tag;
@@ -938,7 +1241,8 @@ static void start_subscribe(struct userdata *u) {
pa_pstream_send_tagstruct(u->pstream, t);
}
-static void create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+/* Called from main context */
+static void create_stream_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
struct timeval ntv;
#ifdef TUNNEL_SINK
@@ -953,7 +1257,7 @@ static void create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UN
if (command == PA_COMMAND_ERROR)
pa_log("Failed to create stream.");
else
- pa_log("Protocol error 3.");
+ pa_log("Protocol error.");
goto fail;
}
@@ -967,22 +1271,57 @@ static void create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UN
if (u->version >= 9) {
#ifdef TUNNEL_SINK
- uint32_t maxlength, tlength, prebuf, minreq;
+ if (pa_tagstruct_getu32(t, &u->maxlength) < 0 ||
+ pa_tagstruct_getu32(t, &u->tlength) < 0 ||
+ pa_tagstruct_getu32(t, &u->prebuf) < 0 ||
+ pa_tagstruct_getu32(t, &u->minreq) < 0)
+ goto parse_error;
+#else
+ if (pa_tagstruct_getu32(t, &u->maxlength) < 0 ||
+ pa_tagstruct_getu32(t, &u->fragsize) < 0)
+ goto parse_error;
+#endif
+ }
- if (pa_tagstruct_getu32(t, &maxlength) < 0 ||
- pa_tagstruct_getu32(t, &tlength) < 0 ||
- pa_tagstruct_getu32(t, &prebuf) < 0 ||
- pa_tagstruct_getu32(t, &minreq) < 0)
+ if (u->version >= 12) {
+ pa_sample_spec ss;
+ pa_channel_map cm;
+ uint32_t device_index;
+ const char *dn;
+ pa_bool_t suspended;
+
+ if (pa_tagstruct_get_sample_spec(t, &ss) < 0 ||
+ pa_tagstruct_get_channel_map(t, &cm) < 0 ||
+ pa_tagstruct_getu32(t, &device_index) < 0 ||
+ pa_tagstruct_gets(t, &dn) < 0 ||
+ pa_tagstruct_get_boolean(t, &suspended) < 0)
goto parse_error;
+
+#ifdef TUNNEL_SINK
+ pa_xfree(u->sink_name);
+ u->sink_name = pa_xstrdup(dn);
#else
- uint32_t maxlength, fragsize;
+ pa_xfree(u->source_name);
+ u->source_name = pa_xstrdup(dn);
+#endif
+ }
+
+ if (u->version >= 13) {
+ pa_usec_t usec;
- if (pa_tagstruct_getu32(t, &maxlength) < 0 ||
- pa_tagstruct_getu32(t, &fragsize) < 0)
+ if (pa_tagstruct_get_usec(t, &usec) < 0)
goto parse_error;
+
+#ifdef TUNNEL_SINK
+ pa_sink_set_latency_range(u->sink, usec + MIN_NETWORK_LATENCY_USEC, 0);
+#else
+ pa_source_set_latency_range(u->source, usec + MIN_NETWORK_LATENCY_USEC, 0);
#endif
}
+ if (!pa_tagstruct_eof(t))
+ goto parse_error;
+
start_subscribe(u);
request_info(u);
@@ -1005,9 +1344,11 @@ parse_error:
pa_log("Invalid reply. (Create stream)");
fail:
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
+
}
+/* Called from main context */
static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
struct userdata *u = userdata;
pa_tagstruct *reply;
@@ -1021,11 +1362,13 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
pa_assert(u->pdispatch == pd);
if (command != PA_COMMAND_REPLY ||
- pa_tagstruct_getu32(t, &u->version) < 0) {
+ pa_tagstruct_getu32(t, &u->version) < 0 ||
+ !pa_tagstruct_eof(t)) {
+
if (command == PA_COMMAND_ERROR)
pa_log("Failed to authenticate");
else
- pa_log("Protocol error 4.");
+ pa_log("Protocol error.");
goto fail;
}
@@ -1036,6 +1379,15 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
goto fail;
}
+ /* Starting with protocol version 13 the MSB of the version tag
+ reflects if shm is enabled for this connection or not. We don't
+ support SHM here at all, so we just ignore this. */
+
+ if (u->version >= 13)
+ u->version &= 0x7FFFFFFFU;
+
+ pa_log_debug("Protocol version: remote %u, local %u", u->version, PA_PROTOCOL_VERSION);
+
#ifdef TUNNEL_SINK
pa_snprintf(name, sizeof(name), "%s for %s@%s",
u->sink_name,
@@ -1051,22 +1403,48 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
reply = pa_tagstruct_new(NULL, 0);
pa_tagstruct_putu32(reply, PA_COMMAND_SET_CLIENT_NAME);
pa_tagstruct_putu32(reply, tag = u->ctag++);
- pa_tagstruct_puts(reply, "PulseAudio");
+
+ if (u->version >= 13) {
+ pa_proplist *pl;
+ pl = pa_proplist_new();
+ pa_init_proplist(pl);
+ pa_proplist_sets(pl, PA_PROP_APPLICATION_ID, "org.PulseAudio.PulseAudio");
+ pa_proplist_sets(pl, PA_PROP_APPLICATION_VERSION, PACKAGE_VERSION);
+ pa_tagstruct_put_proplist(reply, pl);
+ pa_proplist_free(pl);
+ } else
+ pa_tagstruct_puts(reply, "PulseAudio");
+
pa_pstream_send_tagstruct(u->pstream, reply);
/* We ignore the server's reply here */
reply = pa_tagstruct_new(NULL, 0);
+ if (u->version < 13)
+ /* Only for older PA versions we need to fill in the maxlength */
+ u->maxlength = 4*1024*1024;
+
+#ifdef TUNNEL_SINK
+ u->tlength = (uint32_t) pa_usec_to_bytes(PA_USEC_PER_MSEC * DEFAULT_TLENGTH_MSEC, &u->sink->sample_spec);
+ u->minreq = (uint32_t) pa_usec_to_bytes(PA_USEC_PER_MSEC * DEFAULT_MINREQ_MSEC, &u->sink->sample_spec);
+ u->prebuf = u->tlength;
+#else
+ u->fragsize = (uint32_t) pa_usec_to_bytes(PA_USEC_PER_MSEC * DEFAULT_FRAGSIZE_MSEC, &u->source->sample_spec);
+#endif
+
#ifdef TUNNEL_SINK
pa_tagstruct_putu32(reply, PA_COMMAND_CREATE_PLAYBACK_STREAM);
pa_tagstruct_putu32(reply, tag = u->ctag++);
- pa_tagstruct_puts(reply, name);
+
+ if (u->version < 13)
+ pa_tagstruct_puts(reply, name);
+
pa_tagstruct_put_sample_spec(reply, &u->sink->sample_spec);
pa_tagstruct_put_channel_map(reply, &u->sink->channel_map);
pa_tagstruct_putu32(reply, PA_INVALID_INDEX);
pa_tagstruct_puts(reply, u->sink_name);
pa_tagstruct_putu32(reply, u->maxlength);
- pa_tagstruct_put_boolean(reply, !PA_SINK_OPENED(pa_sink_get_state(u->sink)));
+ pa_tagstruct_put_boolean(reply, !PA_SINK_IS_OPENED(pa_sink_get_state(u->sink)));
pa_tagstruct_putu32(reply, u->tlength);
pa_tagstruct_putu32(reply, u->prebuf);
pa_tagstruct_putu32(reply, u->minreq);
@@ -1076,26 +1454,51 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
#else
pa_tagstruct_putu32(reply, PA_COMMAND_CREATE_RECORD_STREAM);
pa_tagstruct_putu32(reply, tag = u->ctag++);
- pa_tagstruct_puts(reply, name);
+
+ if (u->version < 13)
+ pa_tagstruct_puts(reply, name);
+
pa_tagstruct_put_sample_spec(reply, &u->source->sample_spec);
pa_tagstruct_put_channel_map(reply, &u->source->channel_map);
pa_tagstruct_putu32(reply, PA_INVALID_INDEX);
pa_tagstruct_puts(reply, u->source_name);
pa_tagstruct_putu32(reply, u->maxlength);
- pa_tagstruct_put_boolean(reply, !PA_SOURCE_OPENED(pa_source_get_state(u->source)));
+ pa_tagstruct_put_boolean(reply, !PA_SOURCE_IS_OPENED(pa_source_get_state(u->source)));
pa_tagstruct_putu32(reply, u->fragsize);
#endif
- /* New flags added in 0.9.8 */
if (u->version >= 12) {
- /* TODO: set these to useful values */
- pa_tagstruct_put_boolean(reply, FALSE); /*no_remap*/
- pa_tagstruct_put_boolean(reply, FALSE); /*no_remix*/
- pa_tagstruct_put_boolean(reply, FALSE); /*fix_format*/
- pa_tagstruct_put_boolean(reply, FALSE); /*fix_rate*/
- pa_tagstruct_put_boolean(reply, FALSE); /*fix_channels*/
- pa_tagstruct_put_boolean(reply, FALSE); /*no_move*/
- pa_tagstruct_put_boolean(reply, FALSE); /*variable_rate*/
+ pa_tagstruct_put_boolean(reply, FALSE); /* no_remap */
+ pa_tagstruct_put_boolean(reply, FALSE); /* no_remix */
+ pa_tagstruct_put_boolean(reply, FALSE); /* fix_format */
+ pa_tagstruct_put_boolean(reply, FALSE); /* fix_rate */
+ pa_tagstruct_put_boolean(reply, FALSE); /* fix_channels */
+ pa_tagstruct_put_boolean(reply, TRUE); /* no_move */
+ pa_tagstruct_put_boolean(reply, FALSE); /* variable_rate */
+ }
+
+ if (u->version >= 13) {
+ pa_proplist *pl;
+
+ pa_tagstruct_put_boolean(reply, FALSE); /* start muted/peak detect*/
+ pa_tagstruct_put_boolean(reply, TRUE); /* adjust_latency */
+
+ pl = pa_proplist_new();
+ pa_proplist_sets(pl, PA_PROP_MEDIA_NAME, name);
+ pa_proplist_sets(pl, PA_PROP_MEDIA_ROLE, "abstract");
+ pa_tagstruct_put_proplist(reply, pl);
+ pa_proplist_free(pl);
+
+#ifndef TUNNEL_SINK
+ pa_tagstruct_putu32(reply, PA_INVALID_INDEX); /* direct on input */
+#endif
+ }
+
+ if (u->version >= 14) {
+#ifdef TUNNEL_SINK
+ pa_tagstruct_put_boolean(reply, FALSE); /* volume_set */
+#endif
+ pa_tagstruct_put_boolean(reply, TRUE); /* early rquests */
}
pa_pstream_send_tagstruct(u->pstream, reply);
@@ -1106,9 +1509,10 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
return;
fail:
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
+/* Called from main context */
static void pstream_die_callback(pa_pstream *p, void *userdata) {
struct userdata *u = userdata;
@@ -1116,9 +1520,10 @@ static void pstream_die_callback(pa_pstream *p, void *userdata) {
pa_assert(u);
pa_log_warn("Stream died.");
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
+/* Called from main context */
static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_creds *creds, void *userdata) {
struct userdata *u = userdata;
@@ -1128,12 +1533,13 @@ static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_c
if (pa_pdispatch_run(u->pdispatch, packet, creds, u) < 0) {
pa_log("Invalid packet");
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
return;
}
}
#ifndef TUNNEL_SINK
+/* Called from main context */
static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata) {
struct userdata *u = userdata;
@@ -1143,18 +1549,18 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o
if (channel != u->channel) {
pa_log("Recieved memory block on bad channel.");
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
return;
}
pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_POST, PA_UINT_TO_PTR(seek), offset, chunk);
- u->counter += chunk->length;
- u->counter_delta += chunk->length;
+ u->counter_delta += (int64_t) chunk->length;
}
#endif
+/* Called from main context */
static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata) {
struct userdata *u = userdata;
pa_tagstruct *t;
@@ -1169,7 +1575,7 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
if (!io) {
pa_log("Connection failed: %s", pa_cstrerror(errno));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
return;
}
@@ -1186,7 +1592,8 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
pa_tagstruct_putu32(t, PA_COMMAND_AUTH);
pa_tagstruct_putu32(t, tag = u->ctag++);
pa_tagstruct_putu32(t, PA_PROTOCOL_VERSION);
- pa_tagstruct_put_arbitrary(t, u->auth_cookie, sizeof(u->auth_cookie));
+
+ pa_tagstruct_put_arbitrary(t, pa_auth_cookie_read(u->auth_cookie, PA_NATIVE_COOKIE_LENGTH), PA_NATIVE_COOKIE_LENGTH);
#ifdef HAVE_CREDS
{
@@ -1211,10 +1618,7 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
#ifdef TUNNEL_SINK
-static int sink_get_volume(pa_sink *sink) {
- return 0;
-}
-
+/* Called from main context */
static int sink_set_volume(pa_sink *sink) {
struct userdata *u;
pa_tagstruct *t;
@@ -1234,10 +1638,7 @@ static int sink_set_volume(pa_sink *sink) {
return 0;
}
-static int sink_get_mute(pa_sink *sink) {
- return 0;
-}
-
+/* Called from main context */
static int sink_set_mute(pa_sink *sink) {
struct userdata *u;
pa_tagstruct *t;
@@ -1262,50 +1663,28 @@ static int sink_set_mute(pa_sink *sink) {
#endif
-static int load_key(struct userdata *u, const char*fn) {
- pa_assert(u);
-
- u->auth_cookie_in_property = FALSE;
-
- if (!fn && pa_authkey_prop_get(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME, u->auth_cookie, sizeof(u->auth_cookie)) >= 0) {
- pa_log_debug("Using already loaded auth cookie.");
- pa_authkey_prop_ref(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
- u->auth_cookie_in_property = 1;
- return 0;
- }
-
- if (!fn)
- fn = PA_NATIVE_COOKIE_FILE;
-
- if (pa_authkey_load_auto(fn, u->auth_cookie, sizeof(u->auth_cookie)) < 0)
- return -1;
-
- pa_log_debug("Loading cookie from disk.");
-
- if (pa_authkey_prop_put(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME, u->auth_cookie, sizeof(u->auth_cookie)) >= 0)
- u->auth_cookie_in_property = TRUE;
-
- return 0;
-}
-
int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
struct userdata *u = NULL;
pa_sample_spec ss;
pa_channel_map map;
- char *t, *dn = NULL;
+ char *dn = NULL;
+#ifdef TUNNEL_SINK
+ pa_sink_new_data data;
+#else
+ pa_source_new_data data;
+#endif
pa_assert(m);
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
- pa_log("failed to parse module arguments");
+ pa_log("Failed to parse module arguments");
goto fail;
}
- u = pa_xnew0(struct userdata, 1);
- m->userdata = u;
- u->module = m;
+ m->userdata = u = pa_xnew0(struct userdata, 1);
u->core = m->core;
+ u->module = m;
u->client = NULL;
u->pdispatch = NULL;
u->pstream = NULL;
@@ -1318,32 +1697,35 @@ int pa__init(pa_module*m) {
u->source_name = pa_xstrdup(pa_modargs_get_value(ma, "source", NULL));;
u->source = NULL;
#endif
- u->smoother = pa_smoother_new(PA_USEC_PER_SEC, PA_USEC_PER_SEC*2, TRUE);
+ u->smoother = pa_smoother_new(PA_USEC_PER_SEC, PA_USEC_PER_SEC*2, TRUE, 10);
u->ctag = 1;
u->device_index = u->channel = PA_INVALID_INDEX;
- u->auth_cookie_in_property = FALSE;
u->time_event = NULL;
+ u->ignore_latency_before = 0;
+ u->transport_usec = 0;
+ u->transport_usec_valid = FALSE;
+ u->remote_suspended = u->remote_corked = FALSE;
+ u->counter = u->counter_delta = 0;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
- if (load_key(u, pa_modargs_get_value(ma, "cookie", NULL)) < 0)
+ if (!(u->auth_cookie = pa_auth_cookie_get(u->core, pa_modargs_get_value(ma, "cookie", PA_NATIVE_COOKIE_FILE), PA_NATIVE_COOKIE_LENGTH)))
goto fail;
if (!(u->server_name = pa_xstrdup(pa_modargs_get_value(ma, "server", NULL)))) {
- pa_log("no server specified.");
+ pa_log("No server specified.");
goto fail;
}
ss = m->core->default_sample_spec;
if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) {
- pa_log("invalid sample format specification");
+ pa_log("Invalid sample format specification");
goto fail;
}
if (!(u->client = pa_socket_client_new_string(m->core->mainloop, u->server_name, PA_NATIVE_DEFAULT_PORT))) {
- pa_log("failed to connect to server '%s'", u->server_name);
+ pa_log("Failed to connect to server '%s'", u->server_name);
goto fail;
}
@@ -1354,7 +1736,22 @@ int pa__init(pa_module*m) {
if (!(dn = pa_xstrdup(pa_modargs_get_value(ma, "sink_name", NULL))))
dn = pa_sprintf_malloc("tunnel.%s", u->server_name);
- if (!(u->sink = pa_sink_new(m->core, __FILE__, dn, 1, &ss, &map))) {
+ pa_sink_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ data.namereg_fail = TRUE;
+ pa_sink_new_data_set_name(&data, dn);
+ pa_sink_new_data_set_sample_spec(&data, &ss);
+ pa_sink_new_data_set_channel_map(&data, &map);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "%s%s%s", pa_strempty(u->sink_name), u->sink_name ? " on " : "", u->server_name);
+ pa_proplist_sets(data.proplist, "tunnel.remote.server", u->server_name);
+ if (u->sink_name)
+ pa_proplist_sets(data.proplist, "tunnel.remote.sink", u->sink_name);
+
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_NETWORK|PA_SINK_LATENCY|PA_SINK_HW_VOLUME_CTRL);
+ pa_sink_new_data_done(&data);
+
+ if (!u->sink) {
pa_log("Failed to create sink.");
goto fail;
}
@@ -1362,56 +1759,62 @@ int pa__init(pa_module*m) {
u->sink->parent.process_msg = sink_process_msg;
u->sink->userdata = u;
u->sink->set_state = sink_set_state;
- u->sink->get_latency = sink_get_latency;
- u->sink->get_volume = sink_get_volume;
- u->sink->get_mute = sink_get_mute;
u->sink->set_volume = sink_set_volume;
u->sink->set_mute = sink_set_mute;
- u->sink->flags = PA_SINK_NETWORK|PA_SINK_LATENCY|PA_SINK_HW_VOLUME_CTRL;
- pa_sink_set_module(u->sink, m);
+ u->sink->refresh_volume = u->sink->refresh_muted = FALSE;
+
+ pa_sink_set_latency_range(u->sink, MIN_NETWORK_LATENCY_USEC, 0);
+
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc("%s%s%s", u->sink_name ? u->sink_name : "", u->sink_name ? " on " : "", u->server_name));
- pa_xfree(t);
#else
if (!(dn = pa_xstrdup(pa_modargs_get_value(ma, "source_name", NULL))))
dn = pa_sprintf_malloc("tunnel.%s", u->server_name);
- if (!(u->source = pa_source_new(m->core, __FILE__, dn, 1, &ss, &map))) {
+ pa_source_new_data_init(&data);
+ data.driver = __FILE__;
+ data.module = m;
+ data.namereg_fail = TRUE;
+ pa_source_new_data_set_name(&data, dn);
+ pa_source_new_data_set_sample_spec(&data, &ss);
+ pa_source_new_data_set_channel_map(&data, &map);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "%s%s%s", pa_strempty(u->source_name), u->source_name ? " on " : "", u->server_name);
+ pa_proplist_sets(data.proplist, "tunnel.remote.server", u->server_name);
+ if (u->source_name)
+ pa_proplist_sets(data.proplist, "tunnel.remote.source", u->source_name);
+
+ u->source = pa_source_new(m->core, &data, PA_SOURCE_NETWORK|PA_SOURCE_LATENCY);
+ pa_source_new_data_done(&data);
+
+ if (!u->source) {
pa_log("Failed to create source.");
goto fail;
}
u->source->parent.process_msg = source_process_msg;
- u->source->userdata = u;
u->source->set_state = source_set_state;
- u->source->get_latency = source_get_latency;
- u->source->flags = PA_SOURCE_NETWORK|PA_SOURCE_LATENCY;
+ u->source->userdata = u;
+
+ pa_source_set_latency_range(u->source, MIN_NETWORK_LATENCY_USEC, 0);
- pa_source_set_module(u->source, m);
pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
pa_source_set_rtpoll(u->source, u->rtpoll);
- pa_source_set_description(u->source, t = pa_sprintf_malloc("%s%s%s", u->source_name ? u->source_name : "", u->source_name ? " on " : "", u->server_name));
- pa_xfree(t);
#endif
pa_xfree(dn);
u->time_event = NULL;
- u->maxlength = pa_usec_to_bytes(PA_USEC_PER_MSEC * DEFAULT_MAXLENGTH_MSEC, &ss);
+ u->maxlength = 0;
#ifdef TUNNEL_SINK
- u->tlength = pa_usec_to_bytes(PA_USEC_PER_MSEC * DEFAULT_TLENGTH_MSEC, &ss);
- u->minreq = pa_usec_to_bytes(PA_USEC_PER_MSEC * DEFAULT_MINREQ_MSEC, &ss);
- u->prebuf = u->tlength;
+ u->tlength = u->minreq = u->prebuf = 0;
#else
- u->fragsize = pa_usec_to_bytes(PA_USEC_PER_MSEC * DEFAULT_FRAGSIZE_MSEC, &ss);
+ u->fragsize = 0;
#endif
- u->counter = u->counter_delta = 0;
pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec());
if (!(u->thread = pa_thread_new(thread_func, u))) {
@@ -1485,8 +1888,8 @@ void pa__done(pa_module*m) {
if (u->client)
pa_socket_client_unref(u->client);
- if (u->auth_cookie_in_property)
- pa_authkey_prop_unref(m->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
+ if (u->auth_cookie)
+ pa_auth_cookie_unref(u->auth_cookie);
if (u->smoother)
pa_smoother_free(u->smoother);
diff --git a/src/modules/module-volume-restore.c b/src/modules/module-volume-restore.c
index 3e5e062..aac0d04 100644
--- a/src/modules/module-volume-restore.c
+++ b/src/modules/module-volume-restore.c
@@ -1,5 +1,3 @@
-/* $Id: module-volume-restore.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -102,10 +100,10 @@ static pa_cvolume* parse_volume(const char *s, pa_cvolume *v) {
return NULL;
k = strtol(s, &p, 0);
- if (k <= 0 || k > PA_CHANNELS_MAX)
+ if (k <= 0 || k > (long) PA_CHANNELS_MAX)
return NULL;
- v->channels = (unsigned) k;
+ v->channels = (uint8_t) k;
for (i = 0; i < v->channels; i++) {
p += strspn(p, WHITESPACE);
@@ -115,7 +113,7 @@ static pa_cvolume* parse_volume(const char *s, pa_cvolume *v) {
k = strtol(p, &p, 0);
- if (k < PA_VOLUME_MUTED)
+ if (k < (long) PA_VOLUME_MUTED)
return NULL;
v->values[i] = (pa_volume_t) k;
@@ -134,16 +132,12 @@ static int load_rules(struct userdata *u) {
char buf_name[256], buf_volume[256], buf_sink[256], buf_source[256];
char *ln = buf_name;
- f = u->table_file ?
- fopen(u->table_file, "r") :
- pa_open_config_file(NULL, DEFAULT_VOLUME_TABLE_FILE, NULL, &u->table_file, "r");
-
- if (!f) {
+ if (!(f = fopen(u->table_file, "r"))) {
if (errno == ENOENT) {
- pa_log_info("starting with empty ruleset.");
+ pa_log_info("Starting with empty ruleset.");
ret = 0;
} else
- pa_log("failed to open file '%s': %s", u->table_file, pa_cstrerror(errno));
+ pa_log("Failed to open file '%s': %s", u->table_file, pa_cstrerror(errno));
goto finish;
}
@@ -236,11 +230,7 @@ static int save_rules(struct userdata *u) {
pa_log_info("Saving rules...");
- f = u->table_file ?
- fopen(u->table_file, "w") :
- pa_open_config_file(NULL, DEFAULT_VOLUME_TABLE_FILE, NULL, &u->table_file, "w");
-
- if (!f) {
+ if (!(f = fopen(u->table_file, "w"))) {
pa_log("Failed to open file '%s': %s", u->table_file, pa_cstrerror(errno));
goto finish;
}
@@ -280,10 +270,10 @@ finish:
static char* client_name(pa_client *c) {
char *t, *e;
- if (!c->name || !c->driver)
+ if (!pa_proplist_gets(c->proplist, PA_PROP_APPLICATION_NAME) || !c->driver)
return NULL;
- t = pa_sprintf_malloc("%s$%s", c->driver, c->name);
+ t = pa_sprintf_malloc("%s$%s", c->driver, pa_proplist_gets(c->proplist, PA_PROP_APPLICATION_NAME));
t[strcspn(t, "\n\r#")] = 0;
if (!*t) {
@@ -496,7 +486,6 @@ int pa__init(pa_module*m) {
u = pa_xnew(struct userdata, 1);
u->core = m->core;
u->hashmap = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
- u->table_file = pa_xstrdup(pa_modargs_get_value(ma, "table", NULL));
u->modified = FALSE;
u->subscription = NULL;
u->sink_input_new_hook_slot = u->sink_input_fixate_hook_slot = u->source_output_new_hook_slot = NULL;
@@ -504,6 +493,9 @@ int pa__init(pa_module*m) {
m->userdata = u;
+ if (!(u->table_file = pa_state_path(pa_modargs_get_value(ma, "table", DEFAULT_VOLUME_TABLE_FILE), TRUE)))
+ goto fail;
+
if (pa_modargs_get_value_boolean(ma, "restore_device", &restore_device) < 0 ||
pa_modargs_get_value_boolean(ma, "restore_volume", &restore_volume) < 0) {
pa_log("restore_volume= and restore_device= expect boolean arguments");
@@ -521,12 +513,12 @@ int pa__init(pa_module*m) {
u->subscription = pa_subscription_new(m->core, PA_SUBSCRIPTION_MASK_SINK_INPUT|PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT, subscribe_callback, u);
if (restore_device) {
- u->sink_input_new_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_NEW], (pa_hook_cb_t) sink_input_new_hook_callback, u);
- u->source_output_new_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_NEW], (pa_hook_cb_t) source_output_new_hook_callback, u);
+ u->sink_input_new_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_NEW], PA_HOOK_EARLY, (pa_hook_cb_t) sink_input_new_hook_callback, u);
+ u->source_output_new_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_NEW], PA_HOOK_EARLY, (pa_hook_cb_t) source_output_new_hook_callback, u);
}
if (restore_volume)
- u->sink_input_fixate_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_FIXATE], (pa_hook_cb_t) sink_input_fixate_hook_callback, u);
+ u->sink_input_fixate_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_FIXATE], PA_HOOK_EARLY, (pa_hook_cb_t) sink_input_fixate_hook_callback, u);
pa_modargs_free(ma);
return 0;
diff --git a/src/modules/module-x11-bell.c b/src/modules/module-x11-bell.c
index e565b6f..e93721c 100644
--- a/src/modules/module-x11-bell.c
+++ b/src/modules/module-x11-bell.c
@@ -1,5 +1,3 @@
-/* $Id: module-x11-bell.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -45,14 +43,24 @@
#include "module-x11-bell-symdef.h"
PA_MODULE_AUTHOR("Lennart Poettering");
-PA_MODULE_DESCRIPTION("X11 Bell interceptor");
+PA_MODULE_DESCRIPTION("X11 bell interceptor");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE("sink=<sink to connect to> sample=<sample name> display=<X11 display>");
+static const char* const valid_modargs[] = {
+ "sink",
+ "sample",
+ "display",
+ NULL
+};
+
struct userdata {
pa_core *core;
+ pa_module *module;
+
int xkb_event_base;
+
char *sink_name;
char *scache_item;
@@ -60,14 +68,7 @@ struct userdata {
pa_x11_client *x11_client;
};
-static const char* const valid_modargs[] = {
- "sink",
- "sample",
- "display",
- NULL
-};
-
-static int x11_event_callback(pa_x11_wrapper *w, XEvent *e, void *userdata) {
+static int x11_event_cb(pa_x11_wrapper *w, XEvent *e, void *userdata) {
XkbBellNotifyEvent *bne;
struct userdata *u = userdata;
@@ -81,7 +82,7 @@ static int x11_event_callback(pa_x11_wrapper *w, XEvent *e, void *userdata) {
bne = (XkbBellNotifyEvent*) e;
- if (pa_scache_play_item_by_name(u->core, u->scache_item, u->sink_name, (bne->percent*PA_VOLUME_NORM)/100, 1) < 0) {
+ if (pa_scache_play_item_by_name(u->core, u->scache_item, u->sink_name, TRUE, ((pa_volume_t) bne->percent*PA_VOLUME_NORM)/100U, NULL, NULL) < 0) {
pa_log_info("Ringing bell failed, reverting to X11 device bell.");
XkbForceDeviceBell(pa_x11_wrapper_get_display(w), bne->device, bne->bell_class, bne->bell_id, bne->percent);
}
@@ -89,6 +90,25 @@ static int x11_event_callback(pa_x11_wrapper *w, XEvent *e, void *userdata) {
return 1;
}
+static void x11_kill_cb(pa_x11_wrapper *w, void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(w);
+ pa_assert(u);
+ pa_assert(u->x11_wrapper == w);
+
+ if (u->x11_client)
+ pa_x11_client_free(u->x11_client);
+
+ if (u->x11_wrapper)
+ pa_x11_wrapper_unref(u->x11_wrapper);
+
+ u->x11_client = NULL;
+ u->x11_wrapper = NULL;
+
+ pa_module_unload_request(u->module, TRUE);
+}
+
int pa__init(pa_module*m) {
struct userdata *u = NULL;
@@ -105,7 +125,8 @@ int pa__init(pa_module*m) {
m->userdata = u = pa_xnew(struct userdata, 1);
u->core = m->core;
- u->scache_item = pa_xstrdup(pa_modargs_get_value(ma, "sample", "x11-bell"));
+ u->module = m;
+ u->scache_item = pa_xstrdup(pa_modargs_get_value(ma, "sample", "bell-window-system"));
u->sink_name = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
u->x11_client = NULL;
@@ -133,7 +154,7 @@ int pa__init(pa_module*m) {
XkbSetAutoResetControls(pa_x11_wrapper_get_display(u->x11_wrapper), XkbAudibleBellMask, &auto_ctrls, &auto_values);
XkbChangeEnabledControls(pa_x11_wrapper_get_display(u->x11_wrapper), XkbUseCoreKbd, XkbAudibleBellMask, 0);
- u->x11_client = pa_x11_client_new(u->x11_wrapper, x11_event_callback, u);
+ u->x11_client = pa_x11_client_new(u->x11_wrapper, x11_event_cb, x11_kill_cb, u);
pa_modargs_free(ma);
@@ -153,11 +174,9 @@ void pa__done(pa_module*m) {
pa_assert(m);
- if (!m->userdata)
+ if (!(u = m->userdata))
return;
- u = m->userdata;
-
pa_xfree(u->scache_item);
pa_xfree(u->sink_name);
diff --git a/src/modules/module-x11-publish.c b/src/modules/module-x11-publish.c
index 56d0596..c6c5bac 100644
--- a/src/modules/module-x11-publish.c
+++ b/src/modules/module-x11-publish.c
@@ -1,5 +1,3 @@
-/* $Id: module-x11-publish.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -45,16 +43,16 @@
#include <pulsecore/x11wrap.h>
#include <pulsecore/core-util.h>
#include <pulsecore/native-common.h>
-#include <pulsecore/authkey-prop.h>
-#include <pulsecore/authkey.h>
+#include <pulsecore/auth-cookie.h>
#include <pulsecore/x11prop.h>
#include <pulsecore/strlist.h>
-#include <pulsecore/props.h>
+#include <pulsecore/shared.h>
+#include <pulsecore/protocol-native.h>
#include "module-x11-publish-symdef.h"
PA_MODULE_AUTHOR("Lennart Poettering");
-PA_MODULE_DESCRIPTION("X11 Credential Publisher");
+PA_MODULE_DESCRIPTION("X11 credential publisher");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE("display=<X11 display>");
@@ -69,36 +67,66 @@ static const char* const valid_modargs[] = {
struct userdata {
pa_core *core;
- pa_x11_wrapper *x11_wrapper;
+ pa_module *module;
+ pa_native_protocol *protocol;
+
char *id;
- uint8_t auth_cookie[PA_NATIVE_COOKIE_LENGTH];
- int auth_cookie_in_property;
+ pa_auth_cookie *auth_cookie;
+
+ pa_x11_wrapper *x11_wrapper;
+ pa_x11_client *x11_client;
+
+ pa_hook_slot *hook_slot;
};
-static int load_key(struct userdata *u, const char*fn) {
- pa_assert(u);
+static void publish_servers(struct userdata *u, pa_strlist *l) {
+
+ if (l) {
+ char *s;
+
+ l = pa_strlist_reverse(l);
+ s = pa_strlist_tostring(l);
+ l = pa_strlist_reverse(l);
- u->auth_cookie_in_property = 0;
+ pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SERVER", s);
+ pa_xfree(s);
+ } else
+ pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SERVER");
+}
+
+static pa_hook_result_t servers_changed_cb(void *hook_data, void *call_data, void *slot_data) {
+ pa_strlist *servers = call_data;
+ struct userdata *u = slot_data;
+ char t[256];
- if (!fn && pa_authkey_prop_get(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME, u->auth_cookie, sizeof(u->auth_cookie)) >= 0) {
- pa_log_debug("using already loaded auth cookie.");
- pa_authkey_prop_ref(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
- u->auth_cookie_in_property = 1;
- return 0;
+ pa_assert(u);
+
+ if (!pa_x11_get_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_ID", t, sizeof(t)) || strcmp(t, u->id)) {
+ pa_log_warn("PulseAudio information vanished from X11!");
+ return PA_HOOK_OK;
}
- if (!fn)
- fn = PA_NATIVE_COOKIE_FILE;
+ publish_servers(u, servers);
+ return PA_HOOK_OK;
+}
- if (pa_authkey_load_auto(fn, u->auth_cookie, sizeof(u->auth_cookie)) < 0)
- return -1;
+static void x11_kill_cb(pa_x11_wrapper *w, void *userdata) {
+ struct userdata *u = userdata;
- pa_log_debug("Loading cookie from disk.");
+ pa_assert(w);
+ pa_assert(u);
+ pa_assert(u->x11_wrapper == w);
- if (pa_authkey_prop_put(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME, u->auth_cookie, sizeof(u->auth_cookie)) >= 0)
- u->auth_cookie_in_property = 1;
+ if (u->x11_client)
+ pa_x11_client_free(u->x11_client);
- return 0;
+ if (u->x11_wrapper)
+ pa_x11_wrapper_unref(u->x11_wrapper);
+
+ u->x11_client = NULL;
+ u->x11_wrapper = NULL;
+
+ pa_module_unload_request(u->module, TRUE);
}
int pa__init(pa_module*m) {
@@ -107,8 +135,6 @@ int pa__init(pa_module*m) {
char hn[256], un[128];
char hx[PA_NATIVE_COOKIE_LENGTH*2+1];
const char *t;
- char *s;
- pa_strlist *l;
pa_assert(m);
@@ -117,42 +143,44 @@ int pa__init(pa_module*m) {
goto fail;
}
- m->userdata = u = pa_xmalloc(sizeof(struct userdata));
+ m->userdata = u = pa_xnew(struct userdata, 1);
u->core = m->core;
+ u->module = m;
+ u->protocol = pa_native_protocol_get(m->core);
u->id = NULL;
- u->auth_cookie_in_property = 0;
+ u->auth_cookie = NULL;
+ u->x11_client = NULL;
+ u->x11_wrapper = NULL;
- if (load_key(u, pa_modargs_get_value(ma, "cookie", NULL)) < 0)
- goto fail;
+ u->hook_slot = pa_hook_connect(&pa_native_protocol_hooks(u->protocol)[PA_NATIVE_HOOK_SERVERS_CHANGED], PA_HOOK_NORMAL, servers_changed_cb, u);
- if (!(u->x11_wrapper = pa_x11_wrapper_get(m->core, pa_modargs_get_value(ma, "display", NULL))))
+ if (!(u->auth_cookie = pa_auth_cookie_get(m->core, pa_modargs_get_value(ma, "cookie", PA_NATIVE_COOKIE_FILE), PA_NATIVE_COOKIE_LENGTH)))
goto fail;
- if (!(l = pa_property_get(m->core, PA_NATIVE_SERVER_PROPERTY_NAME)))
+ if (!(u->x11_wrapper = pa_x11_wrapper_get(m->core, pa_modargs_get_value(ma, "display", NULL))))
goto fail;
- l = pa_strlist_reverse(l);
- s = pa_strlist_tostring(l);
- l = pa_strlist_reverse(l);
-
- pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SERVER", s);
- pa_xfree(s);
-
if (!pa_get_fqdn(hn, sizeof(hn)) || !pa_get_user_name(un, sizeof(un)))
goto fail;
u->id = pa_sprintf_malloc("%s@%s/%u", un, hn, (unsigned) getpid());
pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_ID", u->id);
+ publish_servers(u, pa_native_protocol_servers(u->protocol));
+
if ((t = pa_modargs_get_value(ma, "source", NULL)))
pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SOURCE", t);
if ((t = pa_modargs_get_value(ma, "sink", NULL)))
pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SINK", t);
- pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_COOKIE", pa_hexstr(u->auth_cookie, sizeof(u->auth_cookie), hx, sizeof(hx)));
+ pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_COOKIE",
+ pa_hexstr(pa_auth_cookie_read(u->auth_cookie, PA_NATIVE_COOKIE_LENGTH), PA_NATIVE_COOKIE_LENGTH, hx, sizeof(hx)));
+
+ u->x11_client = pa_x11_client_new(u->x11_wrapper, NULL, x11_kill_cb, u);
pa_modargs_free(ma);
+
return 0;
fail:
@@ -160,6 +188,7 @@ fail:
pa_modargs_free(ma);
pa__done(m);
+
return -1;
}
@@ -171,6 +200,9 @@ void pa__done(pa_module*m) {
if (!(u = m->userdata))
return;
+ if (u->x11_client)
+ pa_x11_client_free(u->x11_client);
+
if (u->x11_wrapper) {
char t[256];
@@ -185,13 +217,18 @@ void pa__done(pa_module*m) {
pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_COOKIE");
XSync(pa_x11_wrapper_get_display(u->x11_wrapper), False);
}
- }
- if (u->x11_wrapper)
pa_x11_wrapper_unref(u->x11_wrapper);
+ }
+
+ if (u->auth_cookie)
+ pa_auth_cookie_unref(u->auth_cookie);
+
+ if (u->hook_slot)
+ pa_hook_slot_free(u->hook_slot);
- if (u->auth_cookie_in_property)
- pa_authkey_prop_unref(m->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
+ if (u->protocol)
+ pa_native_protocol_unref(u->protocol);
pa_xfree(u->id);
pa_xfree(u);
diff --git a/src/modules/module-x11-xsmp.c b/src/modules/module-x11-xsmp.c
index 97abbfe..57d182f 100644
--- a/src/modules/module-x11-xsmp.c
+++ b/src/modules/module-x11-xsmp.c
@@ -1,5 +1,3 @@
-/* $Id: module-x11-xsmp.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -42,27 +40,44 @@
#include <pulsecore/namereg.h>
#include <pulsecore/log.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/x11wrap.h>
#include "module-x11-xsmp-symdef.h"
PA_MODULE_AUTHOR("Lennart Poettering");
PA_MODULE_DESCRIPTION("X11 session management");
PA_MODULE_VERSION(PACKAGE_VERSION);
-PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_LOAD_ONCE(FALSE);
+PA_MODULE_USAGE("session_manager=<session manager string> display=<X11 display>");
-static int ice_in_use = 0;
+static pa_bool_t ice_in_use = FALSE;
static const char* const valid_modargs[] = {
+ "session_manager",
+ "display",
NULL
};
+struct userdata {
+ pa_core *core;
+ pa_module *module;
+ pa_client *client;
+ SmcConn connection;
+ pa_x11_wrapper *x11;
+};
+
static void die_cb(SmcConn connection, SmPointer client_data){
- pa_core *c = PA_CORE(client_data);
+ struct userdata *u = client_data;
+ pa_assert(u);
+
+ pa_log_debug("Got die message from XSMP.");
- pa_log_debug("Got die message from XSM. Exiting...");
+ pa_x11_wrapper_kill(u->x11);
- pa_core_assert_ref(c);
- c->mainloop->quit(c->mainloop, 0);
+ pa_x11_wrapper_unref(u->x11);
+ u->x11 = NULL;
+
+ pa_module_unload_request(u->module, TRUE);
}
static void save_complete_cb(SmcConn connection, SmPointer client_data) {
@@ -86,12 +101,15 @@ static void ice_io_cb(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_event_fla
}
static void new_ice_connection(IceConn connection, IcePointer client_data, Bool opening, IcePointer *watch_data) {
- pa_core *c = client_data;
-
- pa_assert(c);
+ struct pa_core *c = client_data;
if (opening)
- *watch_data = c->mainloop->io_new(c->mainloop, IceConnectionNumber(connection), PA_IO_EVENT_INPUT, ice_io_cb, connection);
+ *watch_data = c->mainloop->io_new(
+ c->mainloop,
+ IceConnectionNumber(connection),
+ PA_IO_EVENT_INPUT,
+ ice_io_cb,
+ connection);
else
c->mainloop->io_free(*watch_data);
}
@@ -99,12 +117,13 @@ static void new_ice_connection(IceConn connection, IcePointer client_data, Bool
int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
- char t[256], *vendor, *client_id;
+ char t[256], *vendor, *client_id, *k;
SmcCallbacks callbacks;
SmProp prop_program, prop_user;
SmProp *prop_list[2];
SmPropValue val_program, val_user;
- SmcConn connection;
+ struct userdata *u;
+ const char *e;
pa_assert(m);
@@ -114,21 +133,33 @@ int pa__init(pa_module*m) {
}
IceAddConnectionWatch(new_ice_connection, m->core);
- ice_in_use = 1;
+ ice_in_use = TRUE;
+
+ m->userdata = u = pa_xnew(struct userdata, 1);
+ u->core = m->core;
+ u->module = m;
+ u->client = NULL;
+ u->connection = NULL;
+ u->x11 = NULL;
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
pa_log("Failed to parse module arguments");
goto fail;
}
- if (!getenv("SESSION_MANAGER")) {
+ if (!(u->x11 = pa_x11_wrapper_get(m->core, pa_modargs_get_value(ma, "display", NULL))))
+ goto fail;
+
+ e = pa_modargs_get_value(ma, "session_manager", NULL);
+
+ if (!e && !getenv("SESSION_MANAGER")) {
pa_log("X11 session manager not running.");
goto fail;
}
memset(&callbacks, 0, sizeof(callbacks));
callbacks.die.callback = die_cb;
- callbacks.die.client_data = m->core;
+ callbacks.die.client_data = u;
callbacks.save_yourself.callback = save_yourself_cb;
callbacks.save_yourself.client_data = m->core;
callbacks.save_complete.callback = save_complete_cb;
@@ -136,8 +167,8 @@ int pa__init(pa_module*m) {
callbacks.shutdown_cancelled.callback = shutdown_cancelled_cb;
callbacks.shutdown_cancelled.client_data = m->core;
- if (!(m->userdata = connection = SmcOpenConnection(
- NULL, m->core,
+ if (!(u->connection = SmcOpenConnection(
+ (char*) e, m->core,
SmProtoMajor, SmProtoMinor,
SmcSaveYourselfProcMask | SmcDieProcMask | SmcSaveCompleteProcMask | SmcShutdownCancelledProcMask,
&callbacks, NULL, &client_id,
@@ -150,7 +181,7 @@ int pa__init(pa_module*m) {
prop_program.name = (char*) SmProgram;
prop_program.type = (char*) SmARRAY8;
val_program.value = (char*) PACKAGE_NAME;
- val_program.length = strlen(val_program.value);
+ val_program.length = (int) strlen(val_program.value);
prop_program.num_vals = 1;
prop_program.vals = &val_program;
prop_list[0] = &prop_program;
@@ -159,14 +190,21 @@ int pa__init(pa_module*m) {
prop_user.type = (char*) SmARRAY8;
pa_get_user_name(t, sizeof(t));
val_user.value = t;
- val_user.length = strlen(val_user.value);
+ val_user.length = (int) strlen(val_user.value);
prop_user.num_vals = 1;
prop_user.vals = &val_user;
prop_list[1] = &prop_user;
- SmcSetProperties(connection, PA_ELEMENTSOF(prop_list), prop_list);
+ SmcSetProperties(u->connection, PA_ELEMENTSOF(prop_list), prop_list);
+
+ pa_log_info("Connected to session manager '%s' as '%s'.", vendor = SmcVendor(u->connection), client_id);
+ k = pa_sprintf_malloc("XSMP Session on %s as %s", vendor, client_id);
+ u->client = pa_client_new(u->core, __FILE__, k);
+ pa_xfree(k);
+
+ pa_proplist_sets(u->client->proplist, "xsmp.vendor", vendor);
+ pa_proplist_sets(u->client->proplist, "xsmp.client.id", client_id);
- pa_log_info("Connected to session manager '%s' as '%s'.", vendor = SmcVendor(connection), client_id);
free(vendor);
free(client_id);
@@ -184,13 +222,26 @@ fail:
}
void pa__done(pa_module*m) {
+ struct userdata *u;
+
pa_assert(m);
- if (m->userdata)
- SmcCloseConnection(m->userdata, 0, NULL);
+ if ((u = m->userdata)) {
+
+ if (u->connection)
+ SmcCloseConnection(u->connection, 0, NULL);
+
+ if (u->client)
+ pa_client_free(u->client);
+
+ if (u->x11)
+ pa_x11_wrapper_unref(u->x11);
+
+ pa_xfree(u);
+ }
if (ice_in_use) {
IceRemoveConnectionWatch(new_ice_connection, m->core);
- ice_in_use = 0;
+ ice_in_use = FALSE;
}
}
diff --git a/src/modules/module-zeroconf-discover.c b/src/modules/module-zeroconf-discover.c
index 575aefe..c8087ab 100644
--- a/src/modules/module-zeroconf-discover.c
+++ b/src/modules/module-zeroconf-discover.c
@@ -1,5 +1,3 @@
-/* $Id: module-zeroconf-discover.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -164,8 +162,7 @@ static void resolver_cb(
pa_module *m;
ss = u->core->default_sample_spec;
- pa_assert_se(pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_AUX));
- pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
+ pa_channel_map_init_extend(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
for (l = txt; l; l = l->next) {
char *key, *value;
@@ -176,9 +173,9 @@ static void resolver_cb(
device = value;
value = NULL;
} else if (strcmp(key, "rate") == 0)
- ss.rate = atoi(value);
+ ss.rate = (uint32_t) atoi(value);
else if (strcmp(key, "channels") == 0)
- ss.channels = atoi(value);
+ ss.channels = (uint8_t) atoi(value);
else if (strcmp(key, "format") == 0)
ss.format = pa_parse_sample_format(value);
else if (strcmp(key, "channel_map") == 0) {
@@ -190,10 +187,8 @@ static void resolver_cb(
avahi_free(value);
}
- if (!channel_map_set && cm.channels != ss.channels) {
- pa_assert_se(pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_AUX));
- pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
- }
+ if (!channel_map_set && cm.channels != ss.channels)
+ pa_channel_map_init_extend(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
if (!pa_sample_spec_valid(&ss)) {
pa_log("Service '%s' contains an invalid sample specification.", name);
@@ -237,7 +232,7 @@ static void resolver_cb(
t, dname,
pa_channel_map_snprint(cmt, sizeof(cmt), &cm));
- pa_log_debug("Loading module-tunnel-%s with arguments '%s'", module_name, args);
+ pa_log_debug("Loading %s with arguments '%s'", module_name, args);
if ((m = pa_module_load(u->core, module_name, args))) {
tnl->module_index = m->index;
@@ -291,7 +286,7 @@ static void browser_cb(
struct tunnel *t2;
if ((t2 = pa_hashmap_get(u->tunnels, t))) {
- pa_module_unload_by_index(u->core, t2->module_index);
+ pa_module_unload_by_index(u->core, t2->module_index, TRUE);
pa_hashmap_remove(u->tunnels, t2);
tunnel_free(t2);
}
@@ -324,7 +319,7 @@ static void client_callback(AvahiClient *c, AvahiClientState state, void *userda
browser_cb, u))) {
pa_log("avahi_service_browser_new() failed: %s", avahi_strerror(avahi_client_errno(c)));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
@@ -339,7 +334,7 @@ static void client_callback(AvahiClient *c, AvahiClientState state, void *userda
browser_cb, u))) {
pa_log("avahi_service_browser_new() failed: %s", avahi_strerror(avahi_client_errno(c)));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
@@ -353,7 +348,7 @@ static void client_callback(AvahiClient *c, AvahiClientState state, void *userda
if (!(u->client = avahi_client_new(u->avahi_poll, AVAHI_CLIENT_NO_FAIL, client_callback, u, &error))) {
pa_log("avahi_client_new() failed: %s", avahi_strerror(error));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
@@ -432,7 +427,7 @@ void pa__done(pa_module*m) {
struct tunnel *t;
while ((t = pa_hashmap_steal_first(u->tunnels))) {
- pa_module_unload_by_index(u->core, t->module_index);
+ pa_module_unload_by_index(u->core, t->module_index, TRUE);
tunnel_free(t);
}
diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
index c11ff6e..985564f 100644
--- a/src/modules/module-zeroconf-publish.c
+++ b/src/modules/module-zeroconf-publish.c
@@ -1,5 +1,3 @@
-/* $Id: module-zeroconf-publish.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -115,7 +113,7 @@ static void get_service_data(struct service *s, pa_sample_spec *ret_ss, pa_chann
*ret_ss = sink->sample_spec;
*ret_map = sink->channel_map;
*ret_name = sink->name;
- *ret_description = sink->description;
+ *ret_description = pa_strnull(pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_DESCRIPTION));
*ret_subtype = sink->flags & PA_SINK_HARDWARE ? SUBTYPE_HARDWARE : SUBTYPE_VIRTUAL;
} else if (pa_source_isinstance(s->device)) {
@@ -124,7 +122,7 @@ static void get_service_data(struct service *s, pa_sample_spec *ret_ss, pa_chann
*ret_ss = source->sample_spec;
*ret_map = source->channel_map;
*ret_name = source->name;
- *ret_description = source->description;
+ *ret_description = pa_strnull(pa_proplist_gets(source->proplist, PA_PROP_DEVICE_DESCRIPTION));
*ret_subtype = source->monitor_of ? SUBTYPE_MONITOR : (source->flags & PA_SOURCE_HARDWARE ? SUBTYPE_HARDWARE : SUBTYPE_VIRTUAL);
} else
@@ -304,10 +302,10 @@ static struct service *get_service(struct userdata *u, pa_object *device) {
s->device = device;
if (pa_sink_isinstance(device)) {
- if (!(n = PA_SINK(device)->description))
+ if (!(n = pa_proplist_gets(PA_SINK(device)->proplist, PA_PROP_DEVICE_DESCRIPTION)))
n = PA_SINK(device)->name;
} else {
- if (!(n = PA_SOURCE(device)->description))
+ if (!(n = pa_proplist_gets(PA_SOURCE(device)->proplist, PA_PROP_DEVICE_DESCRIPTION)))
n = PA_SOURCE(device)->name;
}
@@ -541,7 +539,7 @@ static void client_callback(AvahiClient *c, AvahiClientState state, void *userda
if (!(u->client = avahi_client_new(u->avahi_poll, AVAHI_CLIENT_NO_FAIL, client_callback, u, &error))) {
pa_log("avahi_client_new() failed: %s", avahi_strerror(error));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
@@ -578,12 +576,12 @@ int pa__init(pa_module*m) {
u->services = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
- u->sink_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_NEW_POST], (pa_hook_cb_t) device_new_or_changed_cb, u);
- u->sink_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_DESCRIPTION_CHANGED], (pa_hook_cb_t) device_new_or_changed_cb, u);
- u->sink_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK], (pa_hook_cb_t) device_unlink_cb, u);
- u->source_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_NEW_POST], (pa_hook_cb_t) device_new_or_changed_cb, u);
- u->source_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_DESCRIPTION_CHANGED], (pa_hook_cb_t) device_new_or_changed_cb, u);
- u->source_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK], (pa_hook_cb_t) device_unlink_cb, u);
+ u->sink_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_LATE, (pa_hook_cb_t) device_new_or_changed_cb, u);
+ u->sink_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PROPLIST_CHANGED], PA_HOOK_LATE, (pa_hook_cb_t) device_new_or_changed_cb, u);
+ u->sink_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_UNLINK], PA_HOOK_LATE, (pa_hook_cb_t) device_unlink_cb, u);
+ u->source_new_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PUT], PA_HOOK_LATE, (pa_hook_cb_t) device_new_or_changed_cb, u);
+ u->source_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PROPLIST_CHANGED], PA_HOOK_LATE, (pa_hook_cb_t) device_new_or_changed_cb, u);
+ u->source_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK], PA_HOOK_LATE, (pa_hook_cb_t) device_unlink_cb, u);
u->main_entry_group = NULL;
@@ -617,7 +615,7 @@ void pa__done(pa_module*m) {
if (u->services) {
struct service *s;
- while ((s = pa_hashmap_get_first(u->services)))
+ while ((s = pa_hashmap_first(u->services)))
service_free(s);
pa_hashmap_free(u->services, NULL, NULL);
diff --git a/src/modules/oss-util.c b/src/modules/oss-util.c
index a58cb07..f766030 100644
--- a/src/modules/oss-util.c
+++ b/src/modules/oss-util.c
@@ -1,5 +1,3 @@
-/* $Id: oss-util.c 2037 2007-11-09 02:45:07Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -206,10 +204,10 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
if (ss->channels != channels) {
pa_log_warn("device doesn't support %i channels, using %i channels.", ss->channels, channels);
- ss->channels = channels;
+ ss->channels = (uint8_t) channels;
}
- speed = ss->rate;
+ speed = (int) ss->rate;
if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) < 0) {
pa_log("SNDCTL_DSP_SPEED: %s", pa_cstrerror(errno));
return -1;
@@ -221,7 +219,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
/* If the sample rate deviates too much, we need to resample */
if (speed < ss->rate*.95 || speed > ss->rate*1.05)
- ss->rate = speed;
+ ss->rate = (uint32_t) speed;
}
return 0;
@@ -251,7 +249,7 @@ int pa_oss_set_fragments(int fd, int nfrags, int frag_size) {
return 0;
}
-int pa_oss_get_volume(int fd, int mixer, const pa_sample_spec *ss, pa_cvolume *volume) {
+int pa_oss_get_volume(int fd, unsigned long mixer, const pa_sample_spec *ss, pa_cvolume *volume) {
char cv[PA_CVOLUME_SNPRINT_MAX];
unsigned vol;
@@ -273,7 +271,7 @@ int pa_oss_get_volume(int fd, int mixer, const pa_sample_spec *ss, pa_cvolume *v
return 0;
}
-int pa_oss_set_volume(int fd, long mixer, const pa_sample_spec *ss, const pa_cvolume *volume) {
+int pa_oss_set_volume(int fd, unsigned long mixer, const pa_sample_spec *ss, const pa_cvolume *volume) {
char cv[PA_CVOLUME_SNPRINT_MAX];
unsigned vol;
pa_volume_t l, r;
diff --git a/src/modules/oss-util.h b/src/modules/oss-util.h
index 2d4662b..654f7bb 100644
--- a/src/modules/oss-util.h
+++ b/src/modules/oss-util.h
@@ -1,8 +1,6 @@
#ifndef fooossutilhfoo
#define fooossutilhfoo
-/* $Id: oss-util.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,8 +31,8 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss);
int pa_oss_set_fragments(int fd, int frags, int frag_size);
-int pa_oss_set_volume(int fd, long mixer, const pa_sample_spec *ss, const pa_cvolume *volume);
-int pa_oss_get_volume(int fd, int mixer, const pa_sample_spec *ss, pa_cvolume *volume);
+int pa_oss_set_volume(int fd, unsigned long mixer, const pa_sample_spec *ss, const pa_cvolume *volume);
+int pa_oss_get_volume(int fd, unsigned long mixer, const pa_sample_spec *ss, pa_cvolume *volume);
int pa_oss_get_hw_description(const char *dev, char *name, size_t l);
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index d8e7a78..e35773c 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -51,6 +51,7 @@
#include <pulsecore/atomic.h>
#include <pulsecore/rtclock.h>
#include <pulsecore/atomic.h>
+#include <pulsecore/time-smoother.h>
#include "module-rtp-recv-symdef.h"
@@ -69,9 +70,11 @@ PA_MODULE_USAGE(
#define SAP_PORT 9875
#define DEFAULT_SAP_ADDRESS "224.0.0.56"
-#define MEMBLOCKQ_MAXLENGTH (1024*170)
+#define MEMBLOCKQ_MAXLENGTH (1024*1024*40)
#define MAX_SESSIONS 16
#define DEATH_TIMEOUT 20
+#define RATE_UPDATE_INTERVAL (5*PA_USEC_PER_SEC)
+#define LATENCY_USEC (500*PA_USEC_PER_MSEC)
static const char* const valid_modargs[] = {
"sink",
@@ -97,6 +100,12 @@ struct session {
pa_rtpoll_item *rtpoll_item;
pa_atomic_t timestamp;
+
+ pa_smoother *smoother;
+ pa_usec_t intended_latency;
+ pa_usec_t sink_latency;
+
+ pa_usec_t last_rate_update;
};
struct userdata {
@@ -133,21 +142,37 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *data, int64_t
}
/* Called from I/O thread context */
-static int sink_input_peek(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
struct session *s;
pa_sink_input_assert_ref(i);
pa_assert_se(s = i->userdata);
- return pa_memblockq_peek(s->memblockq, chunk);
+ if (pa_memblockq_peek(s->memblockq, chunk) < 0)
+ return -1;
+
+ pa_memblockq_drop(s->memblockq, chunk->length);
+
+ return 0;
}
/* Called from I/O thread context */
-static void sink_input_drop(pa_sink_input *i, size_t length) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ struct session *s;
+
+ pa_sink_input_assert_ref(i);
+ pa_assert_se(s = i->userdata);
+
+ pa_memblockq_rewind(s->memblockq, nbytes);
+}
+
+/* Called from thread context */
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
struct session *s;
+
pa_sink_input_assert_ref(i);
pa_assert_se(s = i->userdata);
- pa_memblockq_drop(s->memblockq, length);
+ pa_memblockq_set_maxrewind(s->memblockq, nbytes);
}
/* Called from main context */
@@ -213,21 +238,83 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) {
else
delta = j;
- pa_memblockq_seek(s->memblockq, delta * s->rtp_context.frame_size, PA_SEEK_RELATIVE);
+ pa_memblockq_seek(s->memblockq, delta * (int64_t) s->rtp_context.frame_size, PA_SEEK_RELATIVE);
+
+ pa_rtclock_get(&now);
+
+ pa_smoother_put(s->smoother, pa_timeval_load(&now), pa_bytes_to_usec((uint64_t) pa_memblockq_get_write_index(s->memblockq), &s->sink_input->sample_spec));
if (pa_memblockq_push(s->memblockq, &chunk) < 0) {
- /* queue overflow, let's flush it and try again */
- pa_memblockq_flush(s->memblockq);
- pa_memblockq_push(s->memblockq, &chunk);
+ pa_log_warn("Queue overrun");
+ pa_memblockq_seek(s->memblockq, (int64_t) chunk.length, PA_SEEK_RELATIVE);
}
- /* The next timestamp we expect */
- s->offset = s->rtp_context.timestamp + (chunk.length / s->rtp_context.frame_size);
+/* pa_log("blocks in q: %u", pa_memblockq_get_nblocks(s->memblockq)); */
pa_memblock_unref(chunk.memblock);
- pa_rtclock_get(&now);
- pa_atomic_store(&s->timestamp, now.tv_sec);
+ /* The next timestamp we expect */
+ s->offset = s->rtp_context.timestamp + (uint32_t) (chunk.length / s->rtp_context.frame_size);
+
+ pa_atomic_store(&s->timestamp, (int) now.tv_sec);
+
+ if (s->last_rate_update + RATE_UPDATE_INTERVAL < pa_timeval_load(&now)) {
+ pa_usec_t wi, ri, render_delay, sink_delay = 0, latency, fix;
+ unsigned fix_samples;
+
+ pa_log("Updating sample rate");
+
+ wi = pa_smoother_get(s->smoother, pa_timeval_load(&now));
+ ri = pa_bytes_to_usec((uint64_t) pa_memblockq_get_read_index(s->memblockq), &s->sink_input->sample_spec);
+
+ if (PA_MSGOBJECT(s->sink_input->sink)->process_msg(PA_MSGOBJECT(s->sink_input->sink), PA_SINK_MESSAGE_GET_LATENCY, &sink_delay, 0, NULL) < 0)
+ sink_delay = 0;
+
+ render_delay = pa_bytes_to_usec(pa_memblockq_get_length(s->sink_input->thread_info.render_memblockq), &s->sink_input->sink->sample_spec);
+
+ if (ri > render_delay+sink_delay)
+ ri -= render_delay+sink_delay;
+ else
+ ri = 0;
+
+ if (wi < ri)
+ latency = 0;
+ else
+ latency = wi - ri;
+
+ pa_log_debug("Write index deviates by %0.2f ms, expected %0.2f ms", (double) latency/PA_USEC_PER_MSEC, (double) s->intended_latency/PA_USEC_PER_MSEC);
+
+ /* Calculate deviation */
+ if (latency < s->intended_latency)
+ fix = s->intended_latency - latency;
+ else
+ fix = latency - s->intended_latency;
+
+ /* How many samples is this per second? */
+ fix_samples = (unsigned) (fix * (pa_usec_t) s->sink_input->thread_info.sample_spec.rate / (pa_usec_t) RATE_UPDATE_INTERVAL);
+
+ /* Check if deviation is in bounds */
+ if (fix_samples > s->sink_input->sample_spec.rate*.20)
+ pa_log_debug("Hmmm, rate fix is too large (%lu Hz), not applying.", (unsigned long) fix_samples);
+
+ /* Fix up rate */
+ if (latency < s->intended_latency)
+ s->sink_input->sample_spec.rate -= fix_samples;
+ else
+ s->sink_input->sample_spec.rate += fix_samples;
+
+ pa_resampler_set_input_rate(s->sink_input->thread_info.resampler, s->sink_input->sample_spec.rate);
+
+ pa_log_debug("Updated sampling rate to %lu Hz.", (unsigned long) s->sink_input->sample_spec.rate);
+
+ s->last_rate_update = pa_timeval_load(&now);
+ }
+
+ if (pa_memblockq_is_readable(s->memblockq) &&
+ s->sink_input->thread_info.underrun_for > 0) {
+ pa_log_debug("Requesting rewind due to end of underrun");
+ pa_sink_input_request_rewind(s->sink_input, 0, FALSE, TRUE);
+ }
return 1;
}
@@ -314,10 +401,9 @@ fail:
static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_info) {
struct session *s = NULL;
- char *c;
pa_sink *sink;
int fd = -1;
- pa_memblock *silence;
+ pa_memchunk silence;
pa_sink_input_new_data data;
struct timeval now;
@@ -329,37 +415,46 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
goto fail;
}
- if (!(sink = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK, 1))) {
+ if (!(sink = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK, TRUE))) {
pa_log("Sink does not exist.");
goto fail;
}
+ pa_rtclock_get(&now);
+
s = pa_xnew0(struct session, 1);
s->userdata = u;
s->first_packet = FALSE;
s->sdp_info = *sdp_info;
s->rtpoll_item = NULL;
-
- pa_rtclock_get(&now);
- pa_atomic_store(&s->timestamp, now.tv_sec);
+ s->intended_latency = LATENCY_USEC;
+ s->smoother = pa_smoother_new(PA_USEC_PER_SEC*5, PA_USEC_PER_SEC*2, TRUE, 10);
+ pa_smoother_set_time_offset(s->smoother, pa_timeval_load(&now));
+ s->last_rate_update = pa_timeval_load(&now);
+ pa_atomic_store(&s->timestamp, (int) now.tv_sec);
if ((fd = mcast_socket((const struct sockaddr*) &sdp_info->sa, sdp_info->salen)) < 0)
goto fail;
- c = pa_sprintf_malloc("RTP Stream%s%s%s",
- sdp_info->session_name ? " (" : "",
- sdp_info->session_name ? sdp_info->session_name : "",
- sdp_info->session_name ? ")" : "");
-
pa_sink_input_new_data_init(&data);
data.sink = sink;
data.driver = __FILE__;
- data.name = c;
+ pa_proplist_sets(data.proplist, PA_PROP_MEDIA_ROLE, "stream");
+ pa_proplist_setf(data.proplist, PA_PROP_MEDIA_NAME,
+ "RTP Stream%s%s%s",
+ sdp_info->session_name ? " (" : "",
+ sdp_info->session_name ? sdp_info->session_name : "",
+ sdp_info->session_name ? ")" : "");
+
+ if (sdp_info->session_name)
+ pa_proplist_sets(data.proplist, "rtp.session", sdp_info->session_name);
+ pa_proplist_sets(data.proplist, "rtp.origin", sdp_info->origin);
+ pa_proplist_setf(data.proplist, "rtp.payload", "%u", (unsigned) sdp_info->payload);
data.module = u->module;
pa_sink_input_new_data_set_sample_spec(&data, &sdp_info->sample_spec);
s->sink_input = pa_sink_input_new(u->module->core, &data, 0);
- pa_xfree(c);
+ pa_sink_input_new_data_done(&data);
if (!s->sink_input) {
pa_log("Failed to create sink input.");
@@ -369,27 +464,31 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
s->sink_input->userdata = s;
s->sink_input->parent.process_msg = sink_input_process_msg;
- s->sink_input->peek = sink_input_peek;
- s->sink_input->drop = sink_input_drop;
+ s->sink_input->pop = sink_input_pop_cb;
+ s->sink_input->process_rewind = sink_input_process_rewind_cb;
+ s->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
s->sink_input->kill = sink_input_kill;
s->sink_input->attach = sink_input_attach;
s->sink_input->detach = sink_input_detach;
- silence = pa_silence_memblock_new(
- s->userdata->module->core->mempool,
- &s->sink_input->sample_spec,
- pa_frame_align(pa_bytes_per_second(&s->sink_input->sample_spec)/128, &s->sink_input->sample_spec));
+ pa_sink_input_get_silence(s->sink_input, &silence);
+
+ s->sink_latency = pa_sink_input_set_requested_latency(s->sink_input, s->intended_latency/2);
+
+ if (s->intended_latency < s->sink_latency*2)
+ s->intended_latency = s->sink_latency*2;
s->memblockq = pa_memblockq_new(
0,
MEMBLOCKQ_MAXLENGTH,
MEMBLOCKQ_MAXLENGTH,
pa_frame_size(&s->sink_input->sample_spec),
- pa_bytes_per_second(&s->sink_input->sample_spec)/10+1,
+ pa_usec_to_bytes(s->intended_latency - s->sink_latency, &s->sink_input->sample_spec),
+ 0,
0,
- silence);
+ &silence);
- pa_memblock_unref(silence);
+ pa_memblock_unref(silence.memblock);
pa_rtp_context_init_recv(&s->rtp_context, fd, pa_frame_size(&s->sdp_info.sample_spec));
@@ -429,12 +528,14 @@ static void session_free(struct session *s) {
pa_sdp_info_destroy(&s->sdp_info);
pa_rtp_context_destroy(&s->rtp_context);
+ pa_smoother_free(s->smoother);
+
pa_xfree(s);
}
static void sap_event_cb(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event_flags_t flags, void *userdata) {
struct userdata *u = userdata;
- int goodbye;
+ pa_bool_t goodbye = FALSE;
pa_sdp_info info;
struct session *s;
@@ -465,7 +566,7 @@ static void sap_event_cb(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event
} else {
struct timeval now;
pa_rtclock_get(&now);
- pa_atomic_store(&s->timestamp, now.tv_sec);
+ pa_atomic_store(&s->timestamp, (int) now.tv_sec);
pa_sdp_info_destroy(&info);
}
@@ -589,7 +690,7 @@ void pa__done(pa_module*m) {
pa_sap_context_destroy(&u->sap_context);
if (u->by_origin) {
- while ((s = pa_hashmap_get_first(u->by_origin)))
+ while ((s = pa_hashmap_first(u->by_origin)))
session_free(s);
pa_hashmap_free(u->by_origin, NULL, NULL);
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index 86afc4d..280067a 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -1,5 +1,3 @@
-/* $Id: module-rtp-send.c 2050 2007-11-13 17:37:44Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -69,10 +67,12 @@ PA_MODULE_USAGE(
"destination=<destination IP address> "
"port=<port number> "
"mtu=<maximum transfer unit> "
- "loop=<loopback to local host?>"
+ "loop=<loopback to local host?> "
+ "ttl=<ttl value>"
);
#define DEFAULT_PORT 46000
+#define DEFAULT_TTL 1
#define SAP_PORT 9875
#define DEFAULT_DESTINATION "224.0.0.56"
#define MEMBLOCKQ_MAXLENGTH (1024*170)
@@ -88,6 +88,7 @@ static const char* const valid_modargs[] = {
"port",
"mtu" ,
"loop",
+ "ttl",
NULL
};
@@ -141,7 +142,7 @@ static void source_output_kill(pa_source_output* o) {
pa_source_output_assert_ref(o);
pa_assert_se(u = o->userdata);
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
pa_source_output_unlink(u->source_output);
pa_source_output_unref(u->source_output);
@@ -169,7 +170,9 @@ int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
const char *dest;
uint32_t port = DEFAULT_PORT, mtu;
- int af, fd = -1, sap_fd = -1;
+ uint32_t ttl = DEFAULT_TTL;
+ sa_family_t af;
+ int fd = -1, sap_fd = -1;
pa_source *s;
pa_sample_spec ss;
pa_channel_map cm;
@@ -221,14 +224,14 @@ int pa__init(pa_module*m) {
payload = pa_rtp_payload_from_sample_spec(&ss);
- mtu = pa_frame_align(DEFAULT_MTU, &ss);
+ mtu = (uint32_t) pa_frame_align(DEFAULT_MTU, &ss);
if (pa_modargs_get_value_u32(ma, "mtu", &mtu) < 0 || mtu < 1 || mtu % pa_frame_size(&ss) != 0) {
pa_log("Invalid MTU.");
goto fail;
}
- port = DEFAULT_PORT + ((rand() % 512) << 1);
+ port = DEFAULT_PORT + ((uint32_t) (rand() % 512) << 1);
if (pa_modargs_get_value_u32(ma, "port", &port) < 0 || port < 1 || port > 0xFFFF) {
pa_log("port= expects a numerical argument between 1 and 65535.");
goto fail;
@@ -237,16 +240,21 @@ int pa__init(pa_module*m) {
if (port & 1)
pa_log_warn("Port number not even as suggested in RFC3550!");
+ if (pa_modargs_get_value_u32(ma, "ttl", &ttl) < 0 || ttl < 1 || ttl > 0xFF) {
+ pa_log("ttl= expects a numerical argument between 1 and 255.");
+ goto fail;
+ }
+
dest = pa_modargs_get_value(ma, "destination", DEFAULT_DESTINATION);
if (inet_pton(AF_INET6, dest, &sa6.sin6_addr) > 0) {
sa6.sin6_family = af = AF_INET6;
- sa6.sin6_port = htons(port);
+ sa6.sin6_port = htons((uint16_t) port);
sap_sa6 = sa6;
sap_sa6.sin6_port = htons(SAP_PORT);
} else if (inet_pton(AF_INET, dest, &sa4.sin_addr) > 0) {
sa4.sin_family = af = AF_INET;
- sa4.sin_port = htons(port);
+ sa4.sin_port = htons((uint16_t) port);
sap_sa4 = sa4;
sap_sa4.sin_port = htons(SAP_PORT);
} else {
@@ -259,7 +267,7 @@ int pa__init(pa_module*m) {
goto fail;
}
- if (connect(fd, af == AF_INET ? (struct sockaddr*) &sa4 : (struct sockaddr*) &sa6, af == AF_INET ? sizeof(sa4) : sizeof(sa6)) < 0) {
+ if (connect(fd, af == AF_INET ? (struct sockaddr*) &sa4 : (struct sockaddr*) &sa6, (socklen_t) (af == AF_INET ? sizeof(sa4) : sizeof(sa6))) < 0) {
pa_log("connect() failed: %s", pa_cstrerror(errno));
goto fail;
}
@@ -269,7 +277,7 @@ int pa__init(pa_module*m) {
goto fail;
}
- if (connect(sap_fd, af == AF_INET ? (struct sockaddr*) &sap_sa4 : (struct sockaddr*) &sap_sa6, af == AF_INET ? sizeof(sap_sa4) : sizeof(sap_sa6)) < 0) {
+ if (connect(sap_fd, af == AF_INET ? (struct sockaddr*) &sap_sa4 : (struct sockaddr*) &sap_sa6, (socklen_t) (af == AF_INET ? sizeof(sap_sa4) : sizeof(sap_sa6))) < 0) {
pa_log("connect() failed: %s", pa_cstrerror(errno));
goto fail;
}
@@ -281,6 +289,15 @@ int pa__init(pa_module*m) {
goto fail;
}
+ if (ttl != DEFAULT_TTL) {
+ int _ttl = (int) ttl;
+
+ if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &_ttl, sizeof(_ttl)) < 0) {
+ pa_log("IP_MULTICAST_TTL failed: %s", pa_cstrerror(errno));
+ goto fail;
+ }
+ }
+
/* If the socket queue is full, let's drop packets */
pa_make_fd_nonblock(fd);
pa_make_udp_socket_low_delay(fd);
@@ -288,14 +305,21 @@ int pa__init(pa_module*m) {
pa_make_fd_cloexec(sap_fd);
pa_source_output_new_data_init(&data);
- data.name = "RTP Monitor Stream";
+ pa_proplist_sets(data.proplist, PA_PROP_MEDIA_NAME, "RTP Monitor Stream");
+ pa_proplist_sets(data.proplist, "rtp.destination", dest);
+ pa_proplist_setf(data.proplist, "rtp.mtu", "%lu", (unsigned long) mtu);
+ pa_proplist_setf(data.proplist, "rtp.port", "%lu", (unsigned long) port);
+ pa_proplist_setf(data.proplist, "rtp.ttl", "%lu", (unsigned long) ttl);
data.driver = __FILE__;
data.module = m;
data.source = s;
pa_source_output_new_data_set_sample_spec(&data, &ss);
pa_source_output_new_data_set_channel_map(&data, &cm);
- if (!(o = pa_source_output_new(m->core, &data, 0))) {
+ o = pa_source_output_new(m->core, &data, 0);
+ pa_source_output_new_data_done(&data);
+
+ if (!o) {
pa_log("failed to create source output.");
goto fail;
}
@@ -318,6 +342,7 @@ int pa__init(pa_module*m) {
pa_frame_size(&ss),
1,
0,
+ 0,
NULL);
u->mtu = mtu;
@@ -330,14 +355,14 @@ int pa__init(pa_module*m) {
p = pa_sdp_build(af,
af == AF_INET ? (void*) &((struct sockaddr_in*) &sa_dst)->sin_addr : (void*) &((struct sockaddr_in6*) &sa_dst)->sin6_addr,
af == AF_INET ? (void*) &sa4.sin_addr : (void*) &sa6.sin6_addr,
- n, port, payload, &ss);
+ n, (uint16_t) port, payload, &ss);
pa_xfree(n);
pa_rtp_context_init_send(&u->rtp_context, fd, m->core->cookie, payload, pa_frame_size(&ss));
pa_sap_context_init_send(&u->sap_context, sap_fd, p);
- pa_log_info("RTP stream initialized with mtu %u on %s:%u, SSRC=0x%08x, payload=%u, initial sequence #%u", mtu, dest, port, u->rtp_context.ssrc, payload, u->rtp_context.sequence);
+ pa_log_info("RTP stream initialized with mtu %u on %s:%u ttl=%u, SSRC=0x%08x, payload=%u, initial sequence #%u", mtu, dest, port, ttl, u->rtp_context.ssrc, payload, u->rtp_context.sequence);
pa_log_info("SDP-Data:\n%s\nEOF", p);
pa_sap_send(&u->sap_context, 0);
diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
index 060f3ba..8835101 100644
--- a/src/modules/rtp/rtp.c
+++ b/src/modules/rtp/rtp.c
@@ -1,5 +1,3 @@
-/* $Id: rtp.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -52,9 +50,11 @@ pa_rtp_context* pa_rtp_context_init_send(pa_rtp_context *c, int fd, uint32_t ssr
c->sequence = (uint16_t) (rand()*rand());
c->timestamp = 0;
c->ssrc = ssrc ? ssrc : (uint32_t) (rand()*rand());
- c->payload = payload & 127;
+ c->payload = (uint8_t) (payload & 127U);
c->frame_size = frame_size;
+ pa_memchunk_reset(&c->memchunk);
+
return c;
}
@@ -99,7 +99,8 @@ int pa_rtp_send(pa_rtp_context *c, size_t size, pa_memblockq *q) {
if (r < 0 || n >= size || iov_idx >= MAX_IOVECS) {
uint32_t header[3];
struct msghdr m;
- int k, i;
+ ssize_t k;
+ int i;
if (n > 0) {
header[0] = htonl(((uint32_t) 2 << 30) | ((uint32_t) c->payload << 16) | ((uint32_t) c->sequence));
@@ -112,7 +113,7 @@ int pa_rtp_send(pa_rtp_context *c, size_t size, pa_memblockq *q) {
m.msg_name = NULL;
m.msg_namelen = 0;
m.msg_iov = iov;
- m.msg_iovlen = iov_idx;
+ m.msg_iovlen = (size_t) iov_idx;
m.msg_control = NULL;
m.msg_controllen = 0;
m.msg_flags = 0;
@@ -128,7 +129,7 @@ int pa_rtp_send(pa_rtp_context *c, size_t size, pa_memblockq *q) {
} else
k = 0;
- c->timestamp += n/c->frame_size;
+ c->timestamp += (unsigned) (n/c->frame_size);
if (k < 0) {
if (errno != EAGAIN && errno != EINTR) /* If the queue is full, just ignore it */
@@ -152,6 +153,8 @@ pa_rtp_context* pa_rtp_context_init_recv(pa_rtp_context *c, int fd, size_t frame
c->fd = fd;
c->frame_size = frame_size;
+
+ pa_memchunk_reset(&c->memchunk);
return c;
}
@@ -160,7 +163,7 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool) {
struct msghdr m;
struct iovec iov;
uint32_t header;
- int cc;
+ unsigned cc;
ssize_t r;
pa_assert(c);
@@ -173,13 +176,29 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool) {
goto fail;
}
- if (!size)
+ if (size <= 0)
return 0;
- chunk->memblock = pa_memblock_new(pool, size);
+ if (c->memchunk.length < (unsigned) size) {
+ size_t l;
+
+ if (c->memchunk.memblock)
+ pa_memblock_unref(c->memchunk.memblock);
+
+ l = PA_MAX((size_t) size, pa_mempool_block_size_max(pool));
+
+ c->memchunk.memblock = pa_memblock_new(pool, l);
+ c->memchunk.index = 0;
+ c->memchunk.length = pa_memblock_get_length(c->memchunk.memblock);
+ }
+
+ pa_assert(c->memchunk.length >= (size_t) size);
+
+ chunk->memblock = pa_memblock_ref(c->memchunk.memblock);
+ chunk->index = c->memchunk.index;
- iov.iov_base = pa_memblock_acquire(chunk->memblock);
- iov.iov_len = size;
+ iov.iov_base = (uint8_t*) pa_memblock_acquire(chunk->memblock) + chunk->index;
+ iov.iov_len = (size_t) size;
m.msg_name = NULL;
m.msg_namelen = 0;
@@ -228,22 +247,30 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool) {
}
cc = (header >> 24) & 0xF;
- c->payload = (header >> 16) & 127;
- c->sequence = header & 0xFFFF;
+ c->payload = (uint8_t) ((header >> 16) & 127U);
+ c->sequence = (uint16_t) (header & 0xFFFFU);
- if (12 + cc*4 > size) {
+ if (12 + cc*4 > (unsigned) size) {
pa_log_warn("RTP packet too short. (CSRC)");
goto fail;
}
- chunk->index = 12 + cc*4;
- chunk->length = size - chunk->index;
+ chunk->index += 12 + cc*4;
+ chunk->length = (size_t) size - 12 + cc*4;
if (chunk->length % c->frame_size != 0) {
pa_log_warn("Bad RTP packet size.");
goto fail;
}
+ c->memchunk.index = chunk->index + chunk->length;
+ c->memchunk.length = pa_memblock_get_length(c->memchunk.memblock) - c->memchunk.index;
+
+ if (c->memchunk.length <= 0) {
+ pa_memblock_unref(c->memchunk.memblock);
+ pa_memchunk_reset(&c->memchunk);
+ }
+
return 0;
fail:
@@ -329,7 +356,10 @@ int pa_rtp_sample_spec_valid(const pa_sample_spec *ss) {
void pa_rtp_context_destroy(pa_rtp_context *c) {
pa_assert(c);
- pa_close(c->fd);
+ pa_assert_se(pa_close(c->fd) == 0);
+
+ if (c->memchunk.memblock)
+ pa_memblock_unref(c->memchunk.memblock);
}
const char* pa_rtp_format_to_string(pa_sample_format_t f) {
@@ -361,4 +391,3 @@ pa_sample_format_t pa_rtp_string_to_format(const char *s) {
else
return PA_SAMPLE_INVALID;
}
-
diff --git a/src/modules/rtp/rtp.h b/src/modules/rtp/rtp.h
index d1841fe..a2728f0 100644
--- a/src/modules/rtp/rtp.h
+++ b/src/modules/rtp/rtp.h
@@ -1,8 +1,6 @@
#ifndef foortphfoo
#define foortphfoo
-/* $Id: rtp.h 1465 2007-05-29 17:24:48Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -37,6 +35,8 @@ typedef struct pa_rtp_context {
uint32_t ssrc;
uint8_t payload;
size_t frame_size;
+
+ pa_memchunk memchunk;
} pa_rtp_context;
pa_rtp_context* pa_rtp_context_init_send(pa_rtp_context *c, int fd, uint32_t ssrc, uint8_t payload, size_t frame_size);
diff --git a/src/modules/rtp/sap.c b/src/modules/rtp/sap.c
index 4e68a20..b0c95aa 100644
--- a/src/modules/rtp/sap.c
+++ b/src/modules/rtp/sap.c
@@ -1,5 +1,3 @@
-/* $Id: sap.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -71,14 +69,14 @@ void pa_sap_context_destroy(pa_sap_context *c) {
pa_xfree(c->sdp_data);
}
-int pa_sap_send(pa_sap_context *c, int goodbye) {
+int pa_sap_send(pa_sap_context *c, pa_bool_t goodbye) {
uint32_t header;
struct sockaddr_storage sa_buf;
struct sockaddr *sa = (struct sockaddr*) &sa_buf;
socklen_t salen = sizeof(sa_buf);
struct iovec iov[4];
struct msghdr m;
- int k;
+ ssize_t k;
if (getsockname(c->fd, sa, &salen) < 0) {
pa_log("getsockname() failed: %s\n", pa_cstrerror(errno));
@@ -96,7 +94,7 @@ int pa_sap_send(pa_sap_context *c, int goodbye) {
iov[0].iov_len = sizeof(header);
iov[1].iov_base = sa->sa_family == AF_INET ? (void*) &((struct sockaddr_in*) sa)->sin_addr : (void*) &((struct sockaddr_in6*) sa)->sin6_addr;
- iov[1].iov_len = sa->sa_family == AF_INET ? 4 : 16;
+ iov[1].iov_len = sa->sa_family == AF_INET ? 4U : 16U;
iov[2].iov_base = (char*) MIME_TYPE;
iov[2].iov_len = sizeof(MIME_TYPE);
@@ -115,7 +113,7 @@ int pa_sap_send(pa_sap_context *c, int goodbye) {
if ((k = sendmsg(c->fd, &m, MSG_DONTWAIT)) < 0)
pa_log_warn("sendmsg() failed: %s\n", pa_cstrerror(errno));
- return k;
+ return (int) k;
}
pa_sap_context* pa_sap_context_init_recv(pa_sap_context *c, int fd) {
@@ -127,13 +125,13 @@ pa_sap_context* pa_sap_context_init_recv(pa_sap_context *c, int fd) {
return c;
}
-int pa_sap_recv(pa_sap_context *c, int *goodbye) {
+int pa_sap_recv(pa_sap_context *c, pa_bool_t *goodbye) {
struct msghdr m;
struct iovec iov;
- int size, k;
+ int size;
char *buf = NULL, *e;
uint32_t header;
- int six, ac;
+ unsigned six, ac, k;
ssize_t r;
pa_assert(c);
@@ -144,11 +142,11 @@ int pa_sap_recv(pa_sap_context *c, int *goodbye) {
goto fail;
}
- buf = pa_xnew(char, size+1);
+ buf = pa_xnew(char, (unsigned) size+1);
buf[size] = 0;
iov.iov_base = buf;
- iov.iov_len = size;
+ iov.iov_len = (size_t) size;
m.msg_name = NULL;
m.msg_namelen = 0;
@@ -186,21 +184,21 @@ int pa_sap_recv(pa_sap_context *c, int *goodbye) {
goto fail;
}
- six = (header >> 28) & 1;
- ac = (header >> 16) & 0xFF;
+ six = (header >> 28) & 1U;
+ ac = (header >> 16) & 0xFFU;
- k = 4 + (six ? 16 : 4) + ac*4;
- if (size < k) {
+ k = 4 + (six ? 16U : 4U) + ac*4U;
+ if ((unsigned) size < k) {
pa_log_warn("SAP packet too short (AD).");
goto fail;
}
e = buf + k;
- size -= k;
+ size -= (int) k;
if ((unsigned) size >= sizeof(MIME_TYPE) && !strcmp(e, MIME_TYPE)) {
e += sizeof(MIME_TYPE);
- size -= sizeof(MIME_TYPE);
+ size -= (int) sizeof(MIME_TYPE);
} else if ((unsigned) size < sizeof(PA_SDP_HEADER)-1 || strncmp(e, PA_SDP_HEADER, sizeof(PA_SDP_HEADER)-1)) {
pa_log_warn("Invalid SDP header.");
goto fail;
@@ -209,7 +207,7 @@ int pa_sap_recv(pa_sap_context *c, int *goodbye) {
if (c->sdp_data)
pa_xfree(c->sdp_data);
- c->sdp_data = pa_xstrndup(e, size);
+ c->sdp_data = pa_xstrndup(e, (unsigned) size);
pa_xfree(buf);
*goodbye = !!((header >> 26) & 1);
diff --git a/src/modules/rtp/sap.h b/src/modules/rtp/sap.h
index 66ca9b8..69c757c 100644
--- a/src/modules/rtp/sap.h
+++ b/src/modules/rtp/sap.h
@@ -1,8 +1,6 @@
#ifndef foosaphfoo
#define foosaphfoo
-/* $Id: sap.h 1465 2007-05-29 17:24:48Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -40,9 +38,9 @@ typedef struct pa_sap_context {
pa_sap_context* pa_sap_context_init_send(pa_sap_context *c, int fd, char *sdp_data);
void pa_sap_context_destroy(pa_sap_context *c);
-int pa_sap_send(pa_sap_context *c, int goodbye);
+int pa_sap_send(pa_sap_context *c, pa_bool_t goodbye);
pa_sap_context* pa_sap_context_init_recv(pa_sap_context *c, int fd);
-int pa_sap_recv(pa_sap_context *c, int *goodbye);
+int pa_sap_recv(pa_sap_context *c, pa_bool_t *goodbye);
#endif
diff --git a/src/modules/rtp/sdp.c b/src/modules/rtp/sdp.c
index f131a39..59989e1 100644
--- a/src/modules/rtp/sdp.c
+++ b/src/modules/rtp/sdp.c
@@ -1,5 +1,3 @@
-/* $Id: sdp.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -57,7 +55,7 @@ char *pa_sdp_build(int af, const void *src, const void *dst, const char *name, u
if (!(u = pa_get_user_name(un, sizeof(un))))
u = "-";
- ntp = time(NULL) + 2208988800U;
+ ntp = (uint32_t) time(NULL) + 2208988800U;
pa_assert_se(a = inet_ntop(af, src, buf_src, sizeof(buf_src)));
pa_assert_se(a = inet_ntop(af, dst, buf_dst, sizeof(buf_dst)));
@@ -101,10 +99,10 @@ static pa_sample_spec *parse_sdp_sample_spec(pa_sample_spec *ss, char *c) {
return NULL;
if (sscanf(c, "%u/%u", &rate, &channels) == 2) {
- ss->rate = rate;
- ss->channels = channels;
+ ss->rate = (uint32_t) rate;
+ ss->channels = (uint8_t) channels;
} else if (sscanf(c, "%u", &rate) == 2) {
- ss->rate = rate;
+ ss->rate = (uint32_t) rate;
ss->channels = 1;
} else
return NULL;
@@ -117,7 +115,7 @@ static pa_sample_spec *parse_sdp_sample_spec(pa_sample_spec *ss, char *c) {
pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) {
uint16_t port = 0;
- int ss_valid = 0;
+ pa_bool_t ss_valid = FALSE;
pa_assert(t);
pa_assert(i);
@@ -202,7 +200,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) {
i->payload = (uint8_t) _payload;
if (pa_rtp_sample_spec_from_payload(i->payload, &i->sample_spec))
- ss_valid = 1;
+ ss_valid = TRUE;
}
}
} else if (pa_startswith(t, "a=rtpmap:")) {
@@ -222,7 +220,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) {
c[strcspn(c, "\n")] = 0;
if (parse_sdp_sample_spec(&i->sample_spec, c))
- ss_valid = 1;
+ ss_valid = TRUE;
}
}
}
diff --git a/src/modules/rtp/sdp.h b/src/modules/rtp/sdp.h
index 360c76e..933a602 100644
--- a/src/modules/rtp/sdp.h
+++ b/src/modules/rtp/sdp.h
@@ -1,8 +1,6 @@
#ifndef foosdphfoo
#define foosdphfoo
-/* $Id: sdp.h 1465 2007-05-29 17:24:48Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/browser.c b/src/pulse/browser.c
index 3128f1d..1a3f657 100644
--- a/src/pulse/browser.c
+++ b/src/pulse/browser.c
@@ -1,5 +1,3 @@
-/* $Id: browser.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -313,10 +311,15 @@ static void client_callback(AvahiClient *s, AvahiClientState state, void *userda
static void browser_free(pa_browser *b);
+
+PA_WARN_REFERENCE(pa_browser_new, "libpulse-browse is being phased out.");
+
pa_browser *pa_browser_new(pa_mainloop_api *mainloop) {
return pa_browser_new_full(mainloop, PA_BROWSE_FOR_SERVERS|PA_BROWSE_FOR_SINKS|PA_BROWSE_FOR_SOURCES, NULL);
}
+PA_WARN_REFERENCE(pa_browser_new_full, "libpulse-browse is being phased out.");
+
pa_browser *pa_browser_new_full(pa_mainloop_api *mainloop, pa_browse_flags_t flags, const char **error_string) {
pa_browser *b;
int error;
@@ -420,6 +423,8 @@ static void browser_free(pa_browser *b) {
pa_xfree(b);
}
+PA_WARN_REFERENCE(pa_browser_ref, "libpulse-browse is being phased out.");
+
pa_browser *pa_browser_ref(pa_browser *b) {
pa_assert(b);
pa_assert(PA_REFCNT_VALUE(b) >= 1);
@@ -428,6 +433,8 @@ pa_browser *pa_browser_ref(pa_browser *b) {
return b;
}
+PA_WARN_REFERENCE(pa_browser_unref, "libpulse-browse is being phased out.");
+
void pa_browser_unref(pa_browser *b) {
pa_assert(b);
pa_assert(PA_REFCNT_VALUE(b) >= 1);
@@ -436,6 +443,8 @@ void pa_browser_unref(pa_browser *b) {
browser_free(b);
}
+PA_WARN_REFERENCE(pa_browser_set_callback, "libpulse-browse is being phased out.");
+
void pa_browser_set_callback(pa_browser *b, pa_browse_cb_t cb, void *userdata) {
pa_assert(b);
pa_assert(PA_REFCNT_VALUE(b) >= 1);
@@ -444,6 +453,8 @@ void pa_browser_set_callback(pa_browser *b, pa_browse_cb_t cb, void *userdata) {
b->userdata = userdata;
}
+PA_WARN_REFERENCE(pa_browser_set_error_callback, "libpulse-browse is being phased out.");
+
void pa_browser_set_error_callback(pa_browser *b, pa_browser_error_cb_t cb, void *userdata) {
pa_assert(b);
pa_assert(PA_REFCNT_VALUE(b) >= 1);
diff --git a/src/pulse/browser.h b/src/pulse/browser.h
index c83d33a..c4e0a17 100644
--- a/src/pulse/browser.h
+++ b/src/pulse/browser.h
@@ -1,8 +1,6 @@
#ifndef foobrowserhfoo
#define foobrowserhfoo
-/* $Id: browser.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/cdecl.h b/src/pulse/cdecl.h
index bef191e..8c5b2d0 100644
--- a/src/pulse/cdecl.h
+++ b/src/pulse/cdecl.h
@@ -1,8 +1,6 @@
#ifndef foopulsecdeclhfoo
#define foopulsecdeclhfoo
-/* $Id: cdecl.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -41,22 +39,4 @@
#endif
-#ifndef PA_GCC_PURE
-#ifdef __GNUCC__
-#define PA_GCC_PURE __attribute__ ((pure))
-#else
-/** This function's return value depends only the arguments list and global state **/
-#define PA_GCC_PURE
-#endif
-#endif
-
-#ifndef PA_GCC_CONST
-#ifdef __GNUCC__
-#define PA_GCC_CONST __attribute__ ((pure))
-#else
-/** This function's return value depends only the arguments list (stricter version of PA_GCC_CONST) **/
-#define PA_GCC_CONST
-#endif
-#endif
-
#endif
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 69760e7..fd313bd 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -1,5 +1,3 @@
-/* $Id: channelmap.c 2054 2007-11-13 23:41:17Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -31,6 +29,7 @@
#include <string.h>
#include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/macro.h>
@@ -100,66 +99,66 @@ const char *const table[PA_CHANNEL_POSITION_MAX] = {
};
const char *const pretty_table[PA_CHANNEL_POSITION_MAX] = {
- [PA_CHANNEL_POSITION_MONO] = "Mono",
-
- [PA_CHANNEL_POSITION_FRONT_CENTER] = "Front Center",
- [PA_CHANNEL_POSITION_FRONT_LEFT] = "Front Left",
- [PA_CHANNEL_POSITION_FRONT_RIGHT] = "Front Right",
-
- [PA_CHANNEL_POSITION_REAR_CENTER] = "Rear Center",
- [PA_CHANNEL_POSITION_REAR_LEFT] = "Rear Left",
- [PA_CHANNEL_POSITION_REAR_RIGHT] = "Rear Right",
-
- [PA_CHANNEL_POSITION_LFE] = "Low Frequency Emmiter",
-
- [PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER] = "Front Left-of-center",
- [PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER] = "Front Right-of-center",
-
- [PA_CHANNEL_POSITION_SIDE_LEFT] = "Side Left",
- [PA_CHANNEL_POSITION_SIDE_RIGHT] = "Side Right",
-
- [PA_CHANNEL_POSITION_AUX0] = "Auxiliary 0",
- [PA_CHANNEL_POSITION_AUX1] = "Auxiliary 1",
- [PA_CHANNEL_POSITION_AUX2] = "Auxiliary 2",
- [PA_CHANNEL_POSITION_AUX3] = "Auxiliary 3",
- [PA_CHANNEL_POSITION_AUX4] = "Auxiliary 4",
- [PA_CHANNEL_POSITION_AUX5] = "Auxiliary 5",
- [PA_CHANNEL_POSITION_AUX6] = "Auxiliary 6",
- [PA_CHANNEL_POSITION_AUX7] = "Auxiliary 7",
- [PA_CHANNEL_POSITION_AUX8] = "Auxiliary 8",
- [PA_CHANNEL_POSITION_AUX9] = "Auxiliary 9",
- [PA_CHANNEL_POSITION_AUX10] = "Auxiliary 10",
- [PA_CHANNEL_POSITION_AUX11] = "Auxiliary 11",
- [PA_CHANNEL_POSITION_AUX12] = "Auxiliary 12",
- [PA_CHANNEL_POSITION_AUX13] = "Auxiliary 13",
- [PA_CHANNEL_POSITION_AUX14] = "Auxiliary 14",
- [PA_CHANNEL_POSITION_AUX15] = "Auxiliary 15",
- [PA_CHANNEL_POSITION_AUX16] = "Auxiliary 16",
- [PA_CHANNEL_POSITION_AUX17] = "Auxiliary 17",
- [PA_CHANNEL_POSITION_AUX18] = "Auxiliary 18",
- [PA_CHANNEL_POSITION_AUX19] = "Auxiliary 19",
- [PA_CHANNEL_POSITION_AUX20] = "Auxiliary 20",
- [PA_CHANNEL_POSITION_AUX21] = "Auxiliary 21",
- [PA_CHANNEL_POSITION_AUX22] = "Auxiliary 22",
- [PA_CHANNEL_POSITION_AUX23] = "Auxiliary 23",
- [PA_CHANNEL_POSITION_AUX24] = "Auxiliary 24",
- [PA_CHANNEL_POSITION_AUX25] = "Auxiliary 25",
- [PA_CHANNEL_POSITION_AUX26] = "Auxiliary 26",
- [PA_CHANNEL_POSITION_AUX27] = "Auxiliary 27",
- [PA_CHANNEL_POSITION_AUX28] = "Auxiliary 28",
- [PA_CHANNEL_POSITION_AUX29] = "Auxiliary 29",
- [PA_CHANNEL_POSITION_AUX30] = "Auxiliary 30",
- [PA_CHANNEL_POSITION_AUX31] = "Auxiliary 31",
-
- [PA_CHANNEL_POSITION_TOP_CENTER] = "Top Center",
-
- [PA_CHANNEL_POSITION_TOP_FRONT_CENTER] = "Top Front Center",
- [PA_CHANNEL_POSITION_TOP_FRONT_LEFT] = "Top Front Left",
- [PA_CHANNEL_POSITION_TOP_FRONT_RIGHT] = "Top Front Right",
-
- [PA_CHANNEL_POSITION_TOP_REAR_CENTER] = "Top Rear Center",
- [PA_CHANNEL_POSITION_TOP_REAR_LEFT] = "Top Rear left",
- [PA_CHANNEL_POSITION_TOP_REAR_RIGHT] = "Top Rear Right"
+ [PA_CHANNEL_POSITION_MONO] = N_("Mono"),
+
+ [PA_CHANNEL_POSITION_FRONT_CENTER] = N_("Front Center"),
+ [PA_CHANNEL_POSITION_FRONT_LEFT] = N_("Front Left"),
+ [PA_CHANNEL_POSITION_FRONT_RIGHT] = N_("Front Right"),
+
+ [PA_CHANNEL_POSITION_REAR_CENTER] = N_("Rear Center"),
+ [PA_CHANNEL_POSITION_REAR_LEFT] = N_("Rear Left"),
+ [PA_CHANNEL_POSITION_REAR_RIGHT] = N_("Rear Right"),
+
+ [PA_CHANNEL_POSITION_LFE] = N_("Low Frequency Emmiter"),
+
+ [PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER] = N_("Front Left-of-center"),
+ [PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER] = N_("Front Right-of-center"),
+
+ [PA_CHANNEL_POSITION_SIDE_LEFT] = N_("Side Left"),
+ [PA_CHANNEL_POSITION_SIDE_RIGHT] = N_("Side Right"),
+
+ [PA_CHANNEL_POSITION_AUX0] = N_("Auxiliary 0"),
+ [PA_CHANNEL_POSITION_AUX1] = N_("Auxiliary 1"),
+ [PA_CHANNEL_POSITION_AUX2] = N_("Auxiliary 2"),
+ [PA_CHANNEL_POSITION_AUX3] = N_("Auxiliary 3"),
+ [PA_CHANNEL_POSITION_AUX4] = N_("Auxiliary 4"),
+ [PA_CHANNEL_POSITION_AUX5] = N_("Auxiliary 5"),
+ [PA_CHANNEL_POSITION_AUX6] = N_("Auxiliary 6"),
+ [PA_CHANNEL_POSITION_AUX7] = N_("Auxiliary 7"),
+ [PA_CHANNEL_POSITION_AUX8] = N_("Auxiliary 8"),
+ [PA_CHANNEL_POSITION_AUX9] = N_("Auxiliary 9"),
+ [PA_CHANNEL_POSITION_AUX10] = N_("Auxiliary 10"),
+ [PA_CHANNEL_POSITION_AUX11] = N_("Auxiliary 11"),
+ [PA_CHANNEL_POSITION_AUX12] = N_("Auxiliary 12"),
+ [PA_CHANNEL_POSITION_AUX13] = N_("Auxiliary 13"),
+ [PA_CHANNEL_POSITION_AUX14] = N_("Auxiliary 14"),
+ [PA_CHANNEL_POSITION_AUX15] = N_("Auxiliary 15"),
+ [PA_CHANNEL_POSITION_AUX16] = N_("Auxiliary 16"),
+ [PA_CHANNEL_POSITION_AUX17] = N_("Auxiliary 17"),
+ [PA_CHANNEL_POSITION_AUX18] = N_("Auxiliary 18"),
+ [PA_CHANNEL_POSITION_AUX19] = N_("Auxiliary 19"),
+ [PA_CHANNEL_POSITION_AUX20] = N_("Auxiliary 20"),
+ [PA_CHANNEL_POSITION_AUX21] = N_("Auxiliary 21"),
+ [PA_CHANNEL_POSITION_AUX22] = N_("Auxiliary 22"),
+ [PA_CHANNEL_POSITION_AUX23] = N_("Auxiliary 23"),
+ [PA_CHANNEL_POSITION_AUX24] = N_("Auxiliary 24"),
+ [PA_CHANNEL_POSITION_AUX25] = N_("Auxiliary 25"),
+ [PA_CHANNEL_POSITION_AUX26] = N_("Auxiliary 26"),
+ [PA_CHANNEL_POSITION_AUX27] = N_("Auxiliary 27"),
+ [PA_CHANNEL_POSITION_AUX28] = N_("Auxiliary 28"),
+ [PA_CHANNEL_POSITION_AUX29] = N_("Auxiliary 29"),
+ [PA_CHANNEL_POSITION_AUX30] = N_("Auxiliary 30"),
+ [PA_CHANNEL_POSITION_AUX31] = N_("Auxiliary 31"),
+
+ [PA_CHANNEL_POSITION_TOP_CENTER] = N_("Top Center"),
+
+ [PA_CHANNEL_POSITION_TOP_FRONT_CENTER] = N_("Top Front Center"),
+ [PA_CHANNEL_POSITION_TOP_FRONT_LEFT] = N_("Top Front Left"),
+ [PA_CHANNEL_POSITION_TOP_FRONT_RIGHT] = N_("Top Front Right"),
+
+ [PA_CHANNEL_POSITION_TOP_REAR_CENTER] = N_("Top Rear Center"),
+ [PA_CHANNEL_POSITION_TOP_REAR_LEFT] = N_("Top Rear Left"),
+ [PA_CHANNEL_POSITION_TOP_REAR_RIGHT] = N_("Top Rear Right")
};
pa_channel_map* pa_channel_map_init(pa_channel_map *m) {
@@ -199,10 +198,11 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
pa_assert(m);
pa_assert(channels > 0);
pa_assert(channels <= PA_CHANNELS_MAX);
+ pa_assert(def < PA_CHANNEL_MAP_DEF_MAX);
pa_channel_map_init(m);
- m->channels = channels;
+ m->channels = (uint8_t) channels;
switch (def) {
case PA_CHANNEL_MAP_AIFF:
@@ -288,9 +288,6 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
case PA_CHANNEL_MAP_AUX: {
unsigned i;
- if (channels >= PA_CHANNELS_MAX)
- return NULL;
-
for (i = 0; i < channels; i++)
m->map[i] = PA_CHANNEL_POSITION_AUX0 + i;
@@ -392,10 +389,39 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
default:
- return NULL;
+ pa_assert_not_reached();
}
}
+pa_channel_map* pa_channel_map_init_extend(pa_channel_map *m, unsigned channels, pa_channel_map_def_t def) {
+ unsigned c;
+
+ pa_assert(m);
+ pa_assert(channels > 0);
+ pa_assert(channels <= PA_CHANNELS_MAX);
+ pa_assert(def < PA_CHANNEL_MAP_DEF_MAX);
+
+ pa_channel_map_init(m);
+
+ for (c = channels; c > 0; c--) {
+
+ if (pa_channel_map_init_auto(m, c, def)) {
+ unsigned i = 0;
+
+ for (; c < channels; c++) {
+
+ m->map[c] = PA_CHANNEL_POSITION_AUX0 + i;
+ i++;
+ }
+
+ m->channels = (uint8_t) channels;
+
+ return m;
+ }
+ }
+
+ return NULL;
+}
const char* pa_channel_position_to_string(pa_channel_position_t pos) {
@@ -406,10 +432,13 @@ const char* pa_channel_position_to_string(pa_channel_position_t pos) {
}
const char* pa_channel_position_to_pretty_string(pa_channel_position_t pos) {
+
+ pa_init_i18n();
+
if (pos < 0 || pos >= PA_CHANNEL_POSITION_MAX)
return NULL;
- return pretty_table[pos];
+ return _(pretty_table[pos]);
}
int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b) {
@@ -430,13 +459,20 @@ int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b) {
char* pa_channel_map_snprint(char *s, size_t l, const pa_channel_map *map) {
unsigned channel;
- int first = 1;
+ pa_bool_t first = TRUE;
char *e;
pa_assert(s);
pa_assert(l > 0);
pa_assert(map);
+ pa_init_i18n();
+
+ if (!pa_channel_map_valid(map)) {
+ pa_snprintf(s, l, _("(invalid)"));
+ return s;
+ }
+
*(e = s) = 0;
for (channel = 0; channel < map->channels && l > 1; channel++) {
@@ -445,7 +481,7 @@ char* pa_channel_map_snprint(char *s, size_t l, const pa_channel_map *map) {
pa_channel_position_to_string(map->map[channel]));
e = strchr(e, 0);
- first = 0;
+ first = FALSE;
}
return s;
@@ -459,7 +495,7 @@ pa_channel_map *pa_channel_map_parse(pa_channel_map *rmap, const char *s) {
pa_assert(rmap);
pa_assert(s);
- memset(&map, 0, sizeof(map));
+ pa_channel_map_init(&map);
if (strcmp(s, "stereo") == 0) {
map.channels = 2;
@@ -522,12 +558,22 @@ int pa_channel_map_valid(const pa_channel_map *map) {
if (map->channels <= 0 || map->channels > PA_CHANNELS_MAX)
return 0;
- for (c = 0; c < map->channels; c++) {
-
- if (map->map[c] < 0 ||map->map[c] >= PA_CHANNEL_POSITION_MAX)
+ for (c = 0; c < map->channels; c++)
+ if (map->map[c] < 0 || map->map[c] >= PA_CHANNEL_POSITION_MAX)
return 0;
- }
-
return 1;
}
+
+int pa_channel_map_compatible(const pa_channel_map *map, const pa_sample_spec *ss) {
+ pa_assert(map);
+ pa_assert(ss);
+
+ if (!pa_channel_map_valid(map))
+ return 0;
+
+ if (!pa_sample_spec_valid(ss))
+ return 0;
+
+ return map->channels == ss->channels;
+}
diff --git a/src/pulse/channelmap.h b/src/pulse/channelmap.h
index 9b8d2f9..d7d19d7 100644
--- a/src/pulse/channelmap.h
+++ b/src/pulse/channelmap.h
@@ -1,8 +1,6 @@
#ifndef foochannelmaphfoo
#define foochannelmaphfoo
-/* $Id: channelmap.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -27,6 +25,7 @@
#include <pulse/sample.h>
#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
/** \page channelmap Channel Maps
*
@@ -48,8 +47,10 @@
*
* \li pa_channel_map_init_mono() - Create a channel map with only mono audio.
* \li pa_channel_map_init_stereo() - Create a standard stereo mapping.
- * \li pa_channel_map_init_auto() - Create a standard channel map for up to
- * six channels.
+ * \li pa_channel_map_init_auto() - Create a standard channel map for a specific number of channels
+ * \li pa_channel_map_init_extend() - Similar to
+ * pa_channel_map_init_auto() but synthesize a channel map if noone
+ * predefined one is known for the specified number of channels.
*
* \section conv_sec Convenience Functions
*
@@ -141,24 +142,42 @@ typedef enum pa_channel_position {
/** A list of channel mapping definitions for pa_channel_map_init_auto() */
typedef enum pa_channel_map_def {
- PA_CHANNEL_MAP_AIFF, /**< The mapping from RFC3551, which is based on AIFF-C */
- PA_CHANNEL_MAP_ALSA, /**< The default mapping used by ALSA */
- PA_CHANNEL_MAP_AUX, /**< Only aux channels */
- PA_CHANNEL_MAP_WAVEEX, /**< Microsoft's WAVEFORMATEXTENSIBLE mapping */
- PA_CHANNEL_MAP_OSS, /**< The default channel mapping used by OSS as defined in the OSS 4.0 API specs */
+ PA_CHANNEL_MAP_AIFF,
+ /**< The mapping from RFC3551, which is based on AIFF-C */
+
+ PA_CHANNEL_MAP_ALSA,
+ /**< The default mapping used by ALSA */
+
+ PA_CHANNEL_MAP_AUX,
+ /**< Only aux channels */
+
+ PA_CHANNEL_MAP_WAVEEX,
+ /**< Microsoft's WAVEFORMATEXTENSIBLE mapping */
+
+ PA_CHANNEL_MAP_OSS,
+ /**< The default channel mapping used by OSS as defined in the OSS 4.0 API specs */
- PA_CHANNEL_MAP_DEFAULT = PA_CHANNEL_MAP_AIFF /**< The default channel map */
+ /**< Upper limit of valid channel mapping definitions */
+ PA_CHANNEL_MAP_DEF_MAX,
+
+ PA_CHANNEL_MAP_DEFAULT = PA_CHANNEL_MAP_AIFF
+ /**< The default channel map */
} pa_channel_map_def_t;
/** A channel map which can be used to attach labels to specific
* channels of a stream. These values are relevant for conversion and
* mixing of streams */
typedef struct pa_channel_map {
- uint8_t channels; /**< Number of channels */
- pa_channel_position_t map[PA_CHANNELS_MAX]; /**< Channel labels */
+ uint8_t channels;
+ /**< Number of channels */
+
+ pa_channel_position_t map[PA_CHANNELS_MAX];
+ /**< Channel labels */
} pa_channel_map;
-/** Initialize the specified channel map and return a pointer to it */
+/** Initialize the specified channel map and return a pointer to
+ * it. The channel map will have a defined state but
+ * pa_channel_map_valid() will fail for it. */
pa_channel_map* pa_channel_map_init(pa_channel_map *m);
/** Initialize the specified channel map for monoaural audio and return a pointer to it */
@@ -167,31 +186,47 @@ pa_channel_map* pa_channel_map_init_mono(pa_channel_map *m);
/** Initialize the specified channel map for stereophonic audio and return a pointer to it */
pa_channel_map* pa_channel_map_init_stereo(pa_channel_map *m);
-/** Initialize the specified channel map for the specified number
- * of channels using default labels and return a pointer to it. */
+/** Initialize the specified channel map for the specified number of
+ * channels using default labels and return a pointer to it. This call
+ * will fail (return NULL) if there is no default channel map known for this
+ * specific number of channels and mapping. */
pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, pa_channel_map_def_t def);
+/** Similar to pa_channel_map_init_auto() but instead of failing if no
+ * default mapping is known with the specified parameters it will
+ * synthesize a mapping based on a known mapping with fewer channels
+ * and fill up the rest with AUX0...AUX31 channels \since 0.9.11 */
+pa_channel_map* pa_channel_map_init_extend(pa_channel_map *m, unsigned channels, pa_channel_map_def_t def);
+
/** Return a text label for the specified channel position */
const char* pa_channel_position_to_string(pa_channel_position_t pos) PA_GCC_PURE;
/** Return a human readable text label for the specified channel position. \since 0.9.7 */
const char* pa_channel_position_to_pretty_string(pa_channel_position_t pos);
-/** The maximum length of strings returned by pa_channel_map_snprint() */
+/** The maximum length of strings returned by
+ * pa_channel_map_snprint(). Please note that this value can change
+ * with any release without warning and without being considered API
+ * or ABI breakage. You should not use this definition anywhere where
+ * it might become part of an ABI. */
#define PA_CHANNEL_MAP_SNPRINT_MAX 336
/** Make a humand readable string from the specified channel map */
char* pa_channel_map_snprint(char *s, size_t l, const pa_channel_map *map);
-/** Parse a channel position list into a channel map structure. \since 0.8.1 */
+/** Parse a channel position list into a channel map structure. */
pa_channel_map *pa_channel_map_parse(pa_channel_map *map, const char *s);
/** Compare two channel maps. Return 1 if both match. */
int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b) PA_GCC_PURE;
-/** Return non-zero of the specified channel map is considered valid */
+/** Return non-zero if the specified channel map is considered valid */
int pa_channel_map_valid(const pa_channel_map *map) PA_GCC_PURE;
+/** Return non-zero if the specified channel map is compatible with
+ * the specified sample spec. \since 0.9.12 */
+int pa_channel_map_compatible(const pa_channel_map *map, const pa_sample_spec *ss) PA_GCC_PURE;
+
PA_C_DECL_END
#endif
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c
index bd3c1d3..a8a90fb 100644
--- a/src/pulse/client-conf-x11.c
+++ b/src/pulse/client-conf-x11.c
@@ -1,5 +1,3 @@
-/* $Id: client-conf-x11.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -31,6 +29,7 @@
#include <X11/Xatom.h>
#include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
#include <pulsecore/x11prop.h>
#include <pulsecore/log.h>
@@ -46,11 +45,14 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) {
pa_assert(c);
- if (!dname && (!(dname = getenv("DISPLAY")) || *dname == '\0'))
+ if (!dname && !(dname = getenv("DISPLAY")))
+ goto finish;
+
+ if (*dname == 0)
goto finish;
if (!(d = XOpenDisplay(dname))) {
- pa_log("XOpenDisplay() failed");
+ pa_log(_("XOpenDisplay() failed"));
goto finish;
}
@@ -73,14 +75,14 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) {
uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
if (pa_parsehex(t, cookie, sizeof(cookie)) != sizeof(cookie)) {
- pa_log("failed to parse cookie data");
+ pa_log(_("Failed to parse cookie data"));
goto finish;
}
pa_assert(sizeof(cookie) == sizeof(c->cookie));
memcpy(c->cookie, cookie, sizeof(cookie));
- c->cookie_valid = 1;
+ c->cookie_valid = TRUE;
pa_xfree(c->cookie_file);
c->cookie_file = NULL;
diff --git a/src/pulse/client-conf-x11.h b/src/pulse/client-conf-x11.h
index be189aa..f2f40e0 100644
--- a/src/pulse/client-conf-x11.h
+++ b/src/pulse/client-conf-x11.h
@@ -1,8 +1,6 @@
#ifndef fooclientconfx11hfoo
#define fooclientconfx11hfoo
-/* $Id: client-conf-x11.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index 4ce8ecd..58d6464 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -1,5 +1,3 @@
-/* $Id: client-conf.c 2009 2007-11-01 00:33:14Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -32,6 +30,7 @@
#include <string.h>
#include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-error.h>
@@ -58,17 +57,18 @@ static const pa_client_conf default_conf = {
.default_sink = NULL,
.default_source = NULL,
.default_server = NULL,
- .autospawn = FALSE,
+ .autospawn = TRUE,
.disable_shm = FALSE,
.cookie_file = NULL,
.cookie_valid = FALSE,
+ .shm_size = 0
};
pa_client_conf *pa_client_conf_new(void) {
pa_client_conf *c = pa_xmemdup(&default_conf, sizeof(default_conf));
c->daemon_binary = pa_xstrdup(PA_BINARY);
- c->extra_arguments = pa_xstrdup("--log-target=syslog --exit-idle-time=5");
+ c->extra_arguments = pa_xstrdup("--log-target=syslog");
c->cookie_file = pa_xstrdup(PA_NATIVE_COOKIE_FILE);
return c;
@@ -100,6 +100,7 @@ int pa_client_conf_load(pa_client_conf *c, const char *filename) {
{ "autospawn", pa_config_parse_bool, NULL },
{ "cookie-file", pa_config_parse_string, NULL },
{ "disable-shm", pa_config_parse_bool, NULL },
+ { "shm-size-bytes", pa_config_parse_size, NULL },
{ NULL, NULL, NULL },
};
@@ -111,14 +112,22 @@ int pa_client_conf_load(pa_client_conf *c, const char *filename) {
table[5].data = &c->autospawn;
table[6].data = &c->cookie_file;
table[7].data = &c->disable_shm;
+ table[8].data = &c->shm_size;
+
+ if (filename) {
+
+ if (!(f = fopen(filename, "r"))) {
+ pa_log(_("Failed to open configuration file '%s': %s"), fn, pa_cstrerror(errno));
+ goto finish;
+ }
- f = filename ?
- fopen((fn = pa_xstrdup(filename)), "r") :
- pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER, ENV_CLIENT_CONFIG_FILE, &fn, "r");
+ fn = pa_xstrdup(fn);
- if (!f && errno != EINTR) {
- pa_log_warn("Failed to open configuration file '%s': %s", fn, pa_cstrerror(errno));
- goto finish;
+ } else {
+
+ if (!(f = pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER, ENV_CLIENT_CONFIG_FILE, &fn)))
+ if (errno != ENOENT)
+ goto finish;
}
r = f ? pa_config_parse(fn, f, table, NULL) : 0;
@@ -126,7 +135,6 @@ int pa_client_conf_load(pa_client_conf *c, const char *filename) {
if (!r)
r = pa_client_conf_load_cookie(c);
-
finish:
pa_xfree(fn);
@@ -172,11 +180,11 @@ int pa_client_conf_env(pa_client_conf *c) {
int pa_client_conf_load_cookie(pa_client_conf* c) {
pa_assert(c);
- c->cookie_valid = FALSE;
-
if (!c->cookie_file)
return -1;
+ c->cookie_valid = FALSE;
+
if (pa_authkey_load_auto(c->cookie_file, c->cookie, sizeof(c->cookie)) < 0)
return -1;
diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h
index 882ec5e..4eac467 100644
--- a/src/pulse/client-conf.h
+++ b/src/pulse/client-conf.h
@@ -1,8 +1,6 @@
#ifndef fooclientconfhfoo
#define fooclientconfhfoo
-/* $Id: client-conf.h 2009 2007-11-01 00:33:14Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,6 +31,7 @@ typedef struct pa_client_conf {
pa_bool_t autospawn, disable_shm;
uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
pa_bool_t cookie_valid; /* non-zero, when cookie is valid */
+ size_t shm_size;
} pa_client_conf;
/* Create a new configuration data object and reset it to defaults */
diff --git a/src/pulse/client.conf.in b/src/pulse/client.conf.in
index 141087f..579bcc2 100644
--- a/src/pulse/client.conf.in
+++ b/src/pulse/client.conf.in
@@ -1,5 +1,3 @@
-# $Id: client.conf.in 2030 2007-11-08 22:31:30Z lennart $
-#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
@@ -25,10 +23,11 @@
; default-source =
; default-server =
-; autospawn = no
+; autospawn = yes
; daemon-binary = @PA_BINARY@
-; extra-arguments = --log-target=syslog --exit-idle-time=5
+; extra-arguments = --log-target=syslog
; cookie-file =
; disable-shm = no
+; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 51536ad..3145d9c 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -1,9 +1,7 @@
-/* $Id: context.c 2144 2008-03-27 21:24:48Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio is free software; you can redistribute it and/or modify
@@ -35,6 +33,7 @@
#include <errno.h>
#include <signal.h>
#include <limits.h>
+#include <locale.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -52,6 +51,9 @@
#include <pulse/version.h>
#include <pulse/xmalloc.h>
+#include <pulse/utf8.h>
+#include <pulse/util.h>
+#include <pulse/i18n.h>
#include <pulsecore/winsock.h>
#include <pulsecore/core-error.h>
@@ -67,6 +69,7 @@
#include <pulsecore/socket-util.h>
#include <pulsecore/creds.h>
#include <pulsecore/macro.h>
+#include <pulsecore/proplist-util.h>
#include "internal.h"
@@ -78,7 +81,7 @@
#include "context.h"
-#define AUTOSPAWN_LOCK "autospawn.lock"
+void pa_command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
[PA_COMMAND_REQUEST] = pa_command_request,
@@ -90,38 +93,54 @@ static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
[PA_COMMAND_RECORD_STREAM_MOVED] = pa_command_stream_moved,
[PA_COMMAND_PLAYBACK_STREAM_SUSPENDED] = pa_command_stream_suspended,
[PA_COMMAND_RECORD_STREAM_SUSPENDED] = pa_command_stream_suspended,
- [PA_COMMAND_SUBSCRIBE_EVENT] = pa_command_subscribe_event
+ [PA_COMMAND_STARTED] = pa_command_stream_started,
+ [PA_COMMAND_SUBSCRIBE_EVENT] = pa_command_subscribe_event,
+ [PA_COMMAND_EXTENSION] = pa_command_extension
};
+static void context_free(pa_context *c);
+
+pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
+ return pa_context_new_with_proplist(mainloop, name, NULL);
+}
-static void unlock_autospawn_lock_file(pa_context *c) {
+static void reset_callbacks(pa_context *c) {
pa_assert(c);
- if (c->autospawn_lock_fd >= 0) {
- char lf[PATH_MAX];
- pa_runtime_path(AUTOSPAWN_LOCK, lf, sizeof(lf));
+ c->state_callback = NULL;
+ c->state_userdata = NULL;
- pa_unlock_lockfile(lf, c->autospawn_lock_fd);
- c->autospawn_lock_fd = -1;
- }
-}
+ c->subscribe_callback = NULL;
+ c->subscribe_userdata = NULL;
-static void context_free(pa_context *c);
+ c->ext_stream_restore.callback = NULL;
+ c->ext_stream_restore.userdata = NULL;
+}
-pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
+pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *name, pa_proplist *p) {
pa_context *c;
pa_assert(mainloop);
- pa_assert(name);
+
+ pa_init_i18n();
+
+ if (!name && !pa_proplist_contains(p, PA_PROP_APPLICATION_NAME))
+ return NULL;
c = pa_xnew(pa_context, 1);
PA_REFCNT_INIT(c);
- c->name = pa_xstrdup(name);
+
+ c->proplist = p ? pa_proplist_copy(p) : pa_proplist_new();
+
+ if (name)
+ pa_proplist_sets(c->proplist, PA_PROP_APPLICATION_NAME, name);
+
c->mainloop = mainloop;
c->client = NULL;
c->pstream = NULL;
c->pdispatch = NULL;
c->playback_streams = pa_dynarray_new();
c->record_streams = pa_dynarray_new();
+ c->client_index = PA_INVALID_INDEX;
PA_LLIST_HEAD_INIT(pa_stream, c->streams);
PA_LLIST_HEAD_INIT(pa_operation, c->operations);
@@ -131,18 +150,16 @@ pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
c->ctag = 0;
c->csyncid = 0;
- c->state_callback = NULL;
- c->state_userdata = NULL;
-
- c->subscribe_callback = NULL;
- c->subscribe_userdata = NULL;
+ reset_callbacks(c);
- c->is_local = -1;
+ c->is_local = FALSE;
c->server_list = NULL;
c->server = NULL;
- c->autospawn_lock_fd = -1;
+
+ c->do_shm = FALSE;
+
+ c->do_autospawn = FALSE;
memset(&c->spawn_api, 0, sizeof(c->spawn_api));
- c->do_autospawn = 0;
#ifndef MSG_NOSIGNAL
#ifdef SIGPIPE
@@ -151,16 +168,16 @@ pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
#endif
c->conf = pa_client_conf_new();
- pa_client_conf_load(c->conf, NULL);
#ifdef HAVE_X11
pa_client_conf_from_x11(c->conf, NULL);
#endif
+ pa_client_conf_load(c->conf, NULL);
pa_client_conf_env(c->conf);
- if (!(c->mempool = pa_mempool_new(!c->conf->disable_shm))) {
+ if (!(c->mempool = pa_mempool_new(!c->conf->disable_shm, c->conf->shm_size))) {
if (!c->conf->disable_shm)
- c->mempool = pa_mempool_new(0);
+ c->mempool = pa_mempool_new(FALSE, c->conf->shm_size);
if (!c->mempool) {
context_free(c);
@@ -171,26 +188,46 @@ pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
return c;
}
-static void context_free(pa_context *c) {
+static void context_unlink(pa_context *c) {
+ pa_stream *s;
+
pa_assert(c);
- unlock_autospawn_lock_file(c);
+ s = c->streams ? pa_stream_ref(c->streams) : NULL;
+ while (s) {
+ pa_stream *n = s->next ? pa_stream_ref(s->next) : NULL;
+ pa_stream_set_state(s, c->state == PA_CONTEXT_FAILED ? PA_STREAM_FAILED : PA_STREAM_TERMINATED);
+ pa_stream_unref(s);
+ s = n;
+ }
while (c->operations)
pa_operation_cancel(c->operations);
- while (c->streams)
- pa_stream_set_state(c->streams, PA_STREAM_TERMINATED);
-
- if (c->client)
- pa_socket_client_unref(c->client);
- if (c->pdispatch)
+ if (c->pdispatch) {
pa_pdispatch_unref(c->pdispatch);
+ c->pdispatch = NULL;
+ }
+
if (c->pstream) {
pa_pstream_unlink(c->pstream);
pa_pstream_unref(c->pstream);
+ c->pstream = NULL;
}
+ if (c->client) {
+ pa_socket_client_unref(c->client);
+ c->client = NULL;
+ }
+
+ reset_callbacks(c);
+}
+
+static void context_free(pa_context *c) {
+ pa_assert(c);
+
+ context_unlink(c);
+
if (c->record_streams)
pa_dynarray_free(c->record_streams, NULL, NULL);
if (c->playback_streams)
@@ -204,7 +241,9 @@ static void context_free(pa_context *c) {
pa_strlist_free(c->server_list);
- pa_xfree(c->name);
+ if (c->proplist)
+ pa_proplist_free(c->proplist);
+
pa_xfree(c->server);
pa_xfree(c);
}
@@ -235,46 +274,16 @@ void pa_context_set_state(pa_context *c, pa_context_state_t st) {
pa_context_ref(c);
c->state = st;
+
if (c->state_callback)
c->state_callback(c, c->state_userdata);
- if (st == PA_CONTEXT_FAILED || st == PA_CONTEXT_TERMINATED) {
- pa_stream *s;
-
- s = c->streams ? pa_stream_ref(c->streams) : NULL;
- while (s) {
- pa_stream *n = s->next ? pa_stream_ref(s->next) : NULL;
- pa_stream_set_state(s, st == PA_CONTEXT_FAILED ? PA_STREAM_FAILED : PA_STREAM_TERMINATED);
- pa_stream_unref(s);
- s = n;
- }
-
- if (c->pdispatch)
- pa_pdispatch_unref(c->pdispatch);
- c->pdispatch = NULL;
-
- if (c->pstream) {
- pa_pstream_unlink(c->pstream);
- pa_pstream_unref(c->pstream);
- }
- c->pstream = NULL;
-
- if (c->client)
- pa_socket_client_unref(c->client);
- c->client = NULL;
- }
+ if (st == PA_CONTEXT_FAILED || st == PA_CONTEXT_TERMINATED)
+ context_unlink(c);
pa_context_unref(c);
}
-void pa_context_fail(pa_context *c, int error) {
- pa_assert(c);
- pa_assert(PA_REFCNT_VALUE(c) >= 1);
-
- pa_context_set_error(c, error);
- pa_context_set_state(c, PA_CONTEXT_FAILED);
-}
-
int pa_context_set_error(pa_context *c, int error) {
pa_assert(error >= 0);
pa_assert(error < PA_ERR_MAX);
@@ -285,6 +294,14 @@ int pa_context_set_error(pa_context *c, int error) {
return error;
}
+void pa_context_fail(pa_context *c, int error) {
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ pa_context_set_error(c, error);
+ pa_context_set_state(c, PA_CONTEXT_FAILED);
+}
+
static void pstream_die_callback(pa_pstream *p, void *userdata) {
pa_context *c = userdata;
@@ -341,25 +358,41 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o
pa_context_unref(c);
}
-int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t) {
+int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t, pa_bool_t fail) {
+ uint32_t err;
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
if (command == PA_COMMAND_ERROR) {
pa_assert(t);
- if (pa_tagstruct_getu32(t, &c->error) < 0) {
+ if (pa_tagstruct_getu32(t, &err) < 0) {
pa_context_fail(c, PA_ERR_PROTOCOL);
return -1;
-
}
+
} else if (command == PA_COMMAND_TIMEOUT)
- c->error = PA_ERR_TIMEOUT;
+ err = PA_ERR_TIMEOUT;
else {
pa_context_fail(c, PA_ERR_PROTOCOL);
return -1;
}
+ if (err == PA_OK) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ return -1;
+ }
+
+ if (err >= PA_ERR_MAX)
+ err = PA_ERR_UNKNOWN;
+
+ if (fail) {
+ pa_context_fail(c, (int) err);
+ return -1;
+ }
+
+ pa_context_set_error(c, (int) err);
+
return 0;
}
@@ -373,17 +406,14 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
pa_context_ref(c);
if (command != PA_COMMAND_REPLY) {
-
- if (pa_context_handle_error(c, command, t) < 0)
- pa_context_fail(c, PA_ERR_PROTOCOL);
-
- pa_context_fail(c, c->error);
+ pa_context_handle_error(c, command, t, TRUE);
goto finish;
}
switch(c->state) {
case PA_CONTEXT_AUTHORIZING: {
pa_tagstruct *reply;
+ pa_bool_t shm_on_remote = FALSE;
if (pa_tagstruct_getu32(t, &c->version) < 0 ||
!pa_tagstruct_eof(t)) {
@@ -397,10 +427,22 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
goto finish;
}
+ /* Starting with protocol version 13 the MSB of the version
+ tag reflects if shm is available for this connection or
+ not. */
+ if (c->version >= 13) {
+ shm_on_remote = !!(c->version & 0x80000000U);
+ c->version &= 0x7FFFFFFFU;
+ }
+
+ pa_log_debug("Protocol version: remote %u, local %u", c->version, PA_PROTOCOL_VERSION);
+
/* Enable shared memory support if possible */
- if (c->version >= 10 &&
- pa_mempool_is_shared(c->mempool) &&
- c->is_local > 0) {
+ if (c->do_shm)
+ if (c->version < 10 || (c->version >= 13 && !shm_on_remote))
+ c->do_shm = FALSE;
+
+ if (c->do_shm) {
/* Only enable SHM if both sides are owned by the same
* user. This is a security measure because otherwise
@@ -408,14 +450,22 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
#ifdef HAVE_CREDS
const pa_creds *creds;
- if ((creds = pa_pdispatch_creds(pd)))
- if (getuid() == creds->uid)
- pa_pstream_use_shm(c->pstream, 1);
+ if (!(creds = pa_pdispatch_creds(pd)) || getuid() != creds->uid)
+ c->do_shm = FALSE;
#endif
}
+ pa_log_debug("Negotiated SHM: %s", pa_yes_no(c->do_shm));
+ pa_pstream_enable_shm(c->pstream, c->do_shm);
+
reply = pa_tagstruct_command(c, PA_COMMAND_SET_CLIENT_NAME, &tag);
- pa_tagstruct_puts(reply, c->name);
+
+ if (c->version >= 13) {
+ pa_init_proplist(c->proplist);
+ pa_tagstruct_put_proplist(reply, c->proplist);
+ } else
+ pa_tagstruct_puts(reply, pa_proplist_gets(c->proplist, PA_PROP_APPLICATION_NAME));
+
pa_pstream_send_tagstruct(c->pstream, reply);
pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, setup_complete_callback, c, NULL);
@@ -424,11 +474,19 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
}
case PA_CONTEXT_SETTING_NAME :
+
+ if ((c->version >= 13 && (pa_tagstruct_getu32(t, &c->client_index) < 0 ||
+ c->client_index == PA_INVALID_INDEX)) ||
+ !pa_tagstruct_eof(t)) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
pa_context_set_state(c, PA_CONTEXT_READY);
break;
default:
- pa_assert(0);
+ pa_assert_not_reached();
}
finish:
@@ -455,10 +513,19 @@ static void setup_context(pa_context *c, pa_iochannel *io) {
c->pdispatch = pa_pdispatch_new(c->mainloop, command_table, PA_COMMAND_MAX);
if (!c->conf->cookie_valid)
- pa_log_warn("No cookie loaded. Attempting to connect without.");
+ pa_log_info(_("No cookie loaded. Attempting to connect without."));
t = pa_tagstruct_command(c, PA_COMMAND_AUTH, &tag);
- pa_tagstruct_putu32(t, PA_PROTOCOL_VERSION);
+
+ c->do_shm =
+ pa_mempool_is_shared(c->mempool) &&
+ c->is_local;
+
+ pa_log_debug("SHM possible: %s", pa_yes_no(c->do_shm));
+
+ /* Starting with protocol version 13 we use the MSB of the version
+ * tag for informing the other side if we could do SHM or not */
+ pa_tagstruct_putu32(t, PA_PROTOCOL_VERSION | (c->do_shm ? 0x80000000U : 0));
pa_tagstruct_put_arbitrary(t, c->conf->cookie, sizeof(c->conf->cookie));
#ifdef HAVE_CREDS
@@ -484,34 +551,95 @@ static void setup_context(pa_context *c, pa_iochannel *io) {
pa_context_unref(c);
}
-static void on_connection(pa_socket_client *client, pa_iochannel*io, void *userdata);
+static char *get_old_legacy_runtime_dir(void) {
+ char *p, u[128];
+ struct stat st;
-#ifndef OS_IS_WIN32
+ if (!pa_get_user_name(u, sizeof(u)))
+ return NULL;
-static int context_connect_spawn(pa_context *c) {
- pid_t pid;
- int status, r;
- int fds[2] = { -1, -1} ;
- pa_iochannel *io;
+ p = pa_sprintf_malloc("/tmp/pulse-%s", u);
- pa_context_ref(c);
+ if (stat(p, &st) < 0) {
+ pa_xfree(p);
+ return NULL;
+ }
- if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
- pa_log("socketpair(): %s", pa_cstrerror(errno));
- pa_context_fail(c, PA_ERR_INTERNAL);
- goto fail;
+ if (st.st_uid != getuid()) {
+ pa_xfree(p);
+ return NULL;
+ }
+
+ return p;
+}
+
+static char *get_very_old_legacy_runtime_dir(void) {
+ char *p, h[128];
+ struct stat st;
+
+ if (!pa_get_home_dir(h, sizeof(h)))
+ return NULL;
+
+ p = pa_sprintf_malloc("%s/.pulse", h);
+
+ if (stat(p, &st) < 0) {
+ pa_xfree(p);
+ return NULL;
+ }
+
+ if (st.st_uid != getuid()) {
+ pa_xfree(p);
+ return NULL;
+ }
+
+ return p;
+}
+
+
+static pa_strlist *prepend_per_user(pa_strlist *l) {
+ char *ufn;
+ static char *legacy_dir;
+
+ /* The very old per-user instance path (< 0.9.11). This is supported only to ease upgrades */
+ if ((legacy_dir = get_very_old_legacy_runtime_dir())) {
+ char *p = pa_sprintf_malloc("%s" PA_PATH_SEP PA_NATIVE_DEFAULT_UNIX_SOCKET, legacy_dir);
+ l = pa_strlist_prepend(l, p);
+ pa_xfree(p);
+ pa_xfree(legacy_dir);
}
- pa_make_fd_cloexec(fds[0]);
+ /* The old per-user instance path (< 0.9.12). This is supported only to ease upgrades */
+ if ((legacy_dir = get_old_legacy_runtime_dir())) {
+ char *p = pa_sprintf_malloc("%s" PA_PATH_SEP PA_NATIVE_DEFAULT_UNIX_SOCKET, legacy_dir);
+ l = pa_strlist_prepend(l, p);
+ pa_xfree(p);
+ pa_xfree(legacy_dir);
+ }
- pa_make_socket_low_delay(fds[0]);
- pa_make_socket_low_delay(fds[1]);
+ /* The per-user instance */
+ if ((ufn = pa_runtime_path(PA_NATIVE_DEFAULT_UNIX_SOCKET))) {
+ l = pa_strlist_prepend(l, ufn);
+ pa_xfree(ufn);
+ }
+
+ return l;
+}
+
+#ifndef OS_IS_WIN32
+
+static int context_autospawn(pa_context *c) {
+ pid_t pid;
+ int status, r;
+
+ pa_log_debug("Trying to autospawn...");
+
+ pa_context_ref(c);
if (c->spawn_api.prefork)
c->spawn_api.prefork();
if ((pid = fork()) < 0) {
- pa_log("fork(): %s", pa_cstrerror(errno));
+ pa_log_error(_("fork(): %s"), pa_cstrerror(errno));
pa_context_fail(c, PA_ERR_INTERNAL);
if (c->spawn_api.postfork)
@@ -521,27 +649,22 @@ static int context_connect_spawn(pa_context *c) {
} else if (!pid) {
/* Child */
- char t[128];
const char *state = NULL;
#define MAX_ARGS 64
const char * argv[MAX_ARGS+1];
int n;
- /* Not required, since fds[0] has CLOEXEC enabled anyway */
- pa_assert_se(pa_close(fds[0]) == 0);
-
if (c->spawn_api.atfork)
c->spawn_api.atfork();
+ pa_close_all(-1);
+
/* Setup argv */
n = 0;
argv[n++] = c->conf->daemon_binary;
- argv[n++] = "--daemonize=yes";
-
- pa_snprintf(t, sizeof(t), "-Lmodule-native-protocol-fd fd=%i", fds[1]);
- argv[n++] = strdup(t);
+ argv[n++] = "--start";
while (n < MAX_ARGS) {
char *a;
@@ -561,13 +684,15 @@ static int context_connect_spawn(pa_context *c) {
/* Parent */
- r = waitpid(pid, &status, 0);
-
if (c->spawn_api.postfork)
c->spawn_api.postfork();
+ do {
+ r = waitpid(pid, &status, 0);
+ } while (r < 0 && errno == EINTR);
+
if (r < 0) {
- pa_log("waitpid(): %s", pa_cstrerror(errno));
+ pa_log(_("waitpid(): %s"), pa_cstrerror(errno));
pa_context_fail(c, PA_ERR_INTERNAL);
goto fail;
} else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
@@ -575,23 +700,11 @@ static int context_connect_spawn(pa_context *c) {
goto fail;
}
- pa_assert_se(pa_close(fds[1]) == 0);
-
- c->is_local = 1;
-
- io = pa_iochannel_new(c->mainloop, fds[0], fds[0]);
-
- setup_context(c, io);
- unlock_autospawn_lock_file(c);
-
pa_context_unref(c);
return 0;
fail:
- pa_close_pipe(fds);
-
- unlock_autospawn_lock_file(c);
pa_context_unref(c);
@@ -600,6 +713,8 @@ fail:
#endif /* OS_IS_WIN32 */
+static void on_connection(pa_socket_client *client, pa_iochannel*io, void *userdata);
+
static int try_next_connection(pa_context *c) {
char *u = NULL;
int r = -1;
@@ -617,8 +732,18 @@ static int try_next_connection(pa_context *c) {
#ifndef OS_IS_WIN32
if (c->do_autospawn) {
- r = context_connect_spawn(c);
- goto finish;
+
+ if ((r = context_autospawn(c)) < 0)
+ goto finish;
+
+ /* Autospawn only once */
+ c->do_autospawn = FALSE;
+
+ /* Connect only to per-user sockets this time */
+ c->server_list = prepend_per_user(c->server_list);
+
+ /* Retry connection */
+ continue;
}
#endif
@@ -634,7 +759,7 @@ static int try_next_connection(pa_context *c) {
if (!(c->client = pa_socket_client_new_string(c->mainloop, u, PA_NATIVE_DEFAULT_PORT)))
continue;
- c->is_local = pa_socket_client_is_local(c->client);
+ c->is_local = !!pa_socket_client_is_local(c->client);
pa_socket_client_set_callback(c->client, on_connection, c);
break;
}
@@ -649,6 +774,7 @@ finish:
static void on_connection(pa_socket_client *client, pa_iochannel*io, void *userdata) {
pa_context *c = userdata;
+ int saved_errno = errno;
pa_assert(client);
pa_assert(c);
@@ -661,7 +787,9 @@ static void on_connection(pa_socket_client *client, pa_iochannel*io, void *userd
if (!io) {
/* Try the item in the list */
- if (errno == ECONNREFUSED || errno == ETIMEDOUT || errno == EHOSTUNREACH) {
+ if (saved_errno == ECONNREFUSED ||
+ saved_errno == ETIMEDOUT ||
+ saved_errno == EHOSTUNREACH) {
try_next_connection(c);
goto finish;
}
@@ -670,7 +798,6 @@ static void on_connection(pa_socket_client *client, pa_iochannel*io, void *userd
goto finish;
}
- unlock_autospawn_lock_file(c);
setup_context(c, io);
finish:
@@ -704,12 +831,13 @@ int pa_context_connect(
pa_context_fail(c, PA_ERR_INVALIDSERVER);
goto finish;
}
+
} else {
char *d;
- char ufn[PATH_MAX];
/* Prepend in reverse order */
+ /* Follow the X display */
if ((d = getenv("DISPLAY"))) {
char *e;
d = pa_xstrdup(d);
@@ -722,29 +850,28 @@ int pa_context_connect(
pa_xfree(d);
}
- c->server_list = pa_strlist_prepend(c->server_list, "tcp6:localhost");
- c->server_list = pa_strlist_prepend(c->server_list, "tcp4:localhost");
+ /* Add TCP/IP on the localhost */
+ c->server_list = pa_strlist_prepend(c->server_list, "tcp6:[::1]");
+ c->server_list = pa_strlist_prepend(c->server_list, "tcp4:127.0.0.1");
- /* The system wide instance */
- c->server_list = pa_strlist_prepend(c->server_list, PA_SYSTEM_RUNTIME_PATH "/" PA_NATIVE_DEFAULT_UNIX_SOCKET);
+ /* The system wide instance via PF_LOCAL */
+ c->server_list = pa_strlist_prepend(c->server_list, PA_SYSTEM_RUNTIME_PATH PA_PATH_SEP PA_NATIVE_DEFAULT_UNIX_SOCKET);
- /* The per-user instance */
- c->server_list = pa_strlist_prepend(c->server_list, pa_runtime_path(PA_NATIVE_DEFAULT_UNIX_SOCKET, ufn, sizeof(ufn)));
+ /* The user instance via PF_LOCAL */
+ c->server_list = prepend_per_user(c->server_list);
- /* Wrap the connection attempts in a single transaction for sane autospawn locking */
+ /* Set up autospawning */
if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
- char lf[PATH_MAX];
- pa_runtime_path(AUTOSPAWN_LOCK, lf, sizeof(lf));
- pa_make_secure_parent_dir(lf, 0700, (uid_t)-1, (gid_t)-1);
- pa_assert(c->autospawn_lock_fd <= 0);
- c->autospawn_lock_fd = pa_lock_lockfile(lf);
+ if (getuid() == 0)
+ pa_log_debug("Not doing autospawn since we are root.");
+ else {
+ c->do_autospawn = TRUE;
- if (api)
- c->spawn_api = *api;
- c->do_autospawn = 1;
+ if (api)
+ c->spawn_api = *api;
+ }
}
-
}
pa_context_set_state(c, PA_CONTEXT_CONNECTING);
@@ -760,7 +887,8 @@ void pa_context_disconnect(pa_context *c) {
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
- pa_context_set_state(c, PA_CONTEXT_TERMINATED);
+ if (PA_CONTEXT_IS_GOOD(c->state))
+ pa_context_set_state(c, PA_CONTEXT_TERMINATED);
}
pa_context_state_t pa_context_get_state(pa_context *c) {
@@ -781,6 +909,9 @@ void pa_context_set_state_callback(pa_context *c, pa_context_notify_cb_t cb, voi
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ if (c->state == PA_CONTEXT_TERMINATED || c->state == PA_CONTEXT_FAILED)
+ return;
+
c->state_callback = cb;
c->state_userdata = userdata;
}
@@ -789,11 +920,7 @@ int pa_context_is_pending(pa_context *c) {
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
- PA_CHECK_VALIDITY(c,
- c->state == PA_CONTEXT_CONNECTING ||
- c->state == PA_CONTEXT_AUTHORIZING ||
- c->state == PA_CONTEXT_SETTING_NAME ||
- c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY(c, PA_CONTEXT_IS_GOOD(c->state), PA_ERR_BADSTATE);
return (c->pstream && pa_pstream_is_pending(c->pstream)) ||
(c->pdispatch && pa_pdispatch_is_pending(c->pdispatch)) ||
@@ -802,11 +929,11 @@ int pa_context_is_pending(pa_context *c) {
static void set_dispatch_callbacks(pa_operation *o);
-static void pdispatch_drain_callback(PA_GCC_UNUSED pa_pdispatch*pd, void *userdata) {
+static void pdispatch_drain_callback(pa_pdispatch*pd, void *userdata) {
set_dispatch_callbacks(userdata);
}
-static void pstream_drain_callback(PA_GCC_UNUSED pa_pstream *s, void *userdata) {
+static void pstream_drain_callback(pa_pstream *s, void *userdata) {
set_dispatch_callbacks(userdata);
}
@@ -858,7 +985,7 @@ pa_operation* pa_context_drain(pa_context *c, pa_context_notify_cb_t cb, void *u
return o;
}
-void pa_context_simple_ack_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+void pa_context_simple_ack_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int success = 1;
@@ -870,7 +997,7 @@ void pa_context_simple_ack_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_U
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
success = 0;
@@ -889,7 +1016,7 @@ finish:
pa_operation_unref(o);
}
-pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb, void *userdata) {
+pa_operation* pa_context_send_simple_command(pa_context *c, uint32_t command, pa_pdispatch_cb_t internal_cb, pa_operation_cb_t cb, void *userdata) {
pa_tagstruct *t;
pa_operation *o;
uint32_t tag;
@@ -899,32 +1026,20 @@ pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb,
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
- o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+ o = pa_operation_new(c, NULL, cb, userdata);
- t = pa_tagstruct_command(c, PA_COMMAND_EXIT, &tag);
+ t = pa_tagstruct_command(c, command, &tag);
pa_pstream_send_tagstruct(c->pstream, t);
- pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, internal_cb, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
return o;
}
-pa_operation* pa_context_send_simple_command(pa_context *c, uint32_t command, pa_pdispatch_cb_t internal_cb, pa_operation_cb_t cb, void *userdata) {
- pa_tagstruct *t;
- pa_operation *o;
- uint32_t tag;
-
+pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb, void *userdata) {
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
- PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
-
- o = pa_operation_new(c, NULL, cb, userdata);
-
- t = pa_tagstruct_command(c, command, &tag);
- pa_pstream_send_tagstruct(c->pstream, t);
- pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, internal_cb, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
-
- return o;
+ return pa_context_send_simple_command(c, PA_COMMAND_EXIT, pa_context_simple_ack_callback, (pa_operation_cb_t) cb, userdata);
}
pa_operation* pa_context_set_default_sink(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata) {
@@ -938,7 +1053,6 @@ pa_operation* pa_context_set_default_sink(pa_context *c, const char *name, pa_co
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
-
t = pa_tagstruct_command(c, PA_COMMAND_SET_DEFAULT_SINK, &tag);
pa_tagstruct_puts(t, name);
pa_pstream_send_tagstruct(c->pstream, t);
@@ -958,7 +1072,6 @@ pa_operation* pa_context_set_default_source(pa_context *c, const char *name, pa_
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
-
t = pa_tagstruct_command(c, PA_COMMAND_SET_DEFAULT_SOURCE, &tag);
pa_tagstruct_puts(t, name);
pa_pstream_send_tagstruct(c->pstream, t);
@@ -971,15 +1084,13 @@ int pa_context_is_local(pa_context *c) {
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
- PA_CHECK_VALIDITY(c, c->is_local >= 0, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_ANY(c, PA_CONTEXT_IS_GOOD(c->state), PA_ERR_BADSTATE, -1);
- return c->is_local;
+ return !!c->is_local;
}
pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata) {
- pa_tagstruct *t;
pa_operation *o;
- uint32_t tag;
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
@@ -987,12 +1098,22 @@ pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_su
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
- o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+ if (c->version >= 13) {
+ pa_proplist *p = pa_proplist_new();
- t = pa_tagstruct_command(c, PA_COMMAND_SET_CLIENT_NAME, &tag);
- pa_tagstruct_puts(t, name);
- pa_pstream_send_tagstruct(c->pstream, t);
- pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+ pa_proplist_sets(p, PA_PROP_APPLICATION_NAME, name);
+ o = pa_context_proplist_update(c, PA_UPDATE_REPLACE, p, cb, userdata);
+ pa_proplist_free(p);
+ } else {
+ pa_tagstruct *t;
+ uint32_t tag;
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+ t = pa_tagstruct_command(c, PA_COMMAND_SET_CLIENT_NAME, &tag);
+ pa_tagstruct_puts(t, name);
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+ }
return o;
}
@@ -1016,7 +1137,7 @@ const char* pa_context_get_server(pa_context *c) {
return c->server;
}
-uint32_t pa_context_get_protocol_version(PA_GCC_UNUSED pa_context *c) {
+uint32_t pa_context_get_protocol_version(pa_context *c) {
return PA_PROTOCOL_VERSION;
}
@@ -1024,6 +1145,8 @@ uint32_t pa_context_get_server_protocol_version(pa_context *c) {
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ PA_CHECK_VALIDITY_RETURN_ANY(c, PA_CONTEXT_IS_GOOD(c->state), PA_ERR_BADSTATE, PA_INVALID_INDEX);
+
return c->version;
}
@@ -1039,3 +1162,99 @@ pa_tagstruct *pa_tagstruct_command(pa_context *c, uint32_t command, uint32_t *ta
return t;
}
+
+uint32_t pa_context_get_index(pa_context *c) {
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_ANY(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE, PA_INVALID_INDEX);
+ PA_CHECK_VALIDITY_RETURN_ANY(c, c->version >= 13, PA_ERR_NOTSUPPORTED, PA_INVALID_INDEX);
+
+ return c->client_index;
+}
+
+pa_operation *pa_context_proplist_update(pa_context *c, pa_update_mode_t mode, pa_proplist *p, pa_context_success_cb_t cb, void *userdata) {
+ pa_operation *o;
+ pa_tagstruct *t;
+ uint32_t tag;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, mode == PA_UPDATE_SET || mode == PA_UPDATE_MERGE || mode == PA_UPDATE_REPLACE, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 13, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_UPDATE_CLIENT_PROPLIST, &tag);
+ pa_tagstruct_putu32(t, (uint32_t) mode);
+ pa_tagstruct_put_proplist(t, p);
+
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ /* Please note that we don't update c->proplist here, because we
+ * don't export that field */
+
+ return o;
+}
+
+pa_operation *pa_context_proplist_remove(pa_context *c, const char *const keys[], pa_context_success_cb_t cb, void *userdata) {
+ pa_operation *o;
+ pa_tagstruct *t;
+ uint32_t tag;
+ const char * const *k;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, keys && keys[0], PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 13, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_REMOVE_CLIENT_PROPLIST, &tag);
+
+ for (k = keys; *k; k++)
+ pa_tagstruct_puts(t, *k);
+
+ pa_tagstruct_puts(t, NULL);
+
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ /* Please note that we don't update c->proplist here, because we
+ * don't export that field */
+
+ return o;
+}
+
+void pa_command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_context *c = userdata;
+ uint32_t idx;
+ const char *name;
+
+ pa_assert(pd);
+ pa_assert(command == PA_COMMAND_EXTENSION);
+ pa_assert(t);
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ pa_context_ref(c);
+
+ if (pa_tagstruct_getu32(t, &idx) < 0 ||
+ pa_tagstruct_gets(t, &name) < 0) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
+ if (!strcmp(name, "module-stream-restore"))
+ pa_ext_stream_restore_command(c, tag, t);
+ else
+ pa_log(_("Received message for unknown extension '%s'"), name);
+
+finish:
+ pa_context_unref(c);
+}
diff --git a/src/pulse/context.h b/src/pulse/context.h
index c959926..3b51397 100644
--- a/src/pulse/context.h
+++ b/src/pulse/context.h
@@ -1,8 +1,6 @@
#ifndef foocontexthfoo
#define foocontexthfoo
-/* $Id: context.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -30,13 +28,14 @@
#include <pulse/mainloop-api.h>
#include <pulse/cdecl.h>
#include <pulse/operation.h>
+#include <pulse/proplist.h>
/** \page async Asynchronous API
*
* \section overv_sec Overview
*
* The asynchronous API is the native interface to the PulseAudio library.
- * It allows full access to all available functions. This also means that
+ * It allows full access to all available functionality. This however means that
* it is rather complex and can take some time to fully master.
*
* \section mainloop_sec Main Loop Abstraction
@@ -65,8 +64,7 @@
* implementation where all of PulseAudio's
* internal handling runs in a separate
* thread.
- * \li \subpage glib-mainloop - A wrapper around GLIB's main loop. Available
- * for both GLIB 1.2 and GLIB 2.x.
+ * \li \subpage glib-mainloop - A wrapper around GLib's main loop.
*
* UNIX signals may be hooked to a main loop using the functions from
* \ref mainloop-signal.h. These rely only on the main loop abstraction
@@ -166,9 +164,15 @@ typedef void (*pa_context_notify_cb_t)(pa_context *c, void *userdata);
typedef void (*pa_context_success_cb_t) (pa_context *c, int success, void *userdata);
/** Instantiate a new connection context with an abstract mainloop API
- * and an application name */
+ * and an application name. It is recommended to use pa_context_new_with_proplist()
+ * instead and specify some initial properties.*/
pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name);
+/** Instantiate a new connection context with an abstract mainloop API
+ * and an application name, and specify the the initial client property
+ * list. \since 0.9.11 */
+pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *name, pa_proplist *proplist);
+
/** Decrease the reference counter of the context by one */
void pa_context_unref(pa_context *c);
@@ -207,27 +211,42 @@ pa_operation* pa_context_drain(pa_context *c, pa_context_notify_cb_t cb, void *u
* returning a success notification */
pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb, void *userdata);
-/** Set the name of the default sink. \since 0.4 */
+/** Set the name of the default sink. */
pa_operation* pa_context_set_default_sink(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
-/** Set the name of the default source. \since 0.4 */
+/** Set the name of the default source. */
pa_operation* pa_context_set_default_source(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
-/** Returns 1 when the connection is to a local daemon. Returns negative when no connection has been made yet. \since 0.5 */
+/** Returns 1 when the connection is to a local daemon. Returns negative when no connection has been made yet. */
int pa_context_is_local(pa_context *c);
-/** Set a different application name for context on the server. \since 0.5 */
+/** Set a different application name for context on the server. */
pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
-/** Return the server name this context is connected to. \since 0.7 */
+/** Return the server name this context is connected to. */
const char* pa_context_get_server(pa_context *c);
-/** Return the protocol version of the library. \since 0.8 */
+/** Return the protocol version of the library. */
uint32_t pa_context_get_protocol_version(pa_context *c);
-/** Return the protocol version of the connected server. \since 0.8 */
+/** Return the protocol version of the connected server. */
uint32_t pa_context_get_server_protocol_version(pa_context *c);
+/* Update the property list of the client, adding new entries. Please
+ * note that it is highly recommended to set as much properties
+ * initially via pa_context_new_with_proplist() as possible instead a
+ * posteriori with this function, since that information may then be
+ * used to route streams of the client to the right device. \since 0.9.11 */
+pa_operation *pa_context_proplist_update(pa_context *c, pa_update_mode_t mode, pa_proplist *p, pa_context_success_cb_t cb, void *userdata);
+
+/* Update the property list of the client, remove entries. \since 0.9.11 */
+pa_operation *pa_context_proplist_remove(pa_context *c, const char *const keys[], pa_context_success_cb_t cb, void *userdata);
+
+/** Return the client index this context is
+ * identified in the server with. This is useful for usage with the
+ * introspection functions, such as pa_context_get_client_info(). \since 0.9.11 */
+uint32_t pa_context_get_index(pa_context *s);
+
PA_C_DECL_END
#endif
diff --git a/src/pulse/def.h b/src/pulse/def.h
index f2ad860..66d9aff 100644
--- a/src/pulse/def.h
+++ b/src/pulse/def.h
@@ -1,8 +1,6 @@
#ifndef foodefhfoo
#define foodefhfoo
-/* $Id: def.h 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -48,15 +46,31 @@ typedef enum pa_context_state {
PA_CONTEXT_TERMINATED /**< The connection was terminated cleanly */
} pa_context_state_t;
+/** Return non-zero if the passed state is one of the connected states */
+static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
+ return
+ x == PA_CONTEXT_CONNECTING ||
+ x == PA_CONTEXT_AUTHORIZING ||
+ x == PA_CONTEXT_SETTING_NAME ||
+ x == PA_CONTEXT_READY;
+}
+
/** The state of a stream */
typedef enum pa_stream_state {
- PA_STREAM_UNCONNECTED, /**< The stream is not yet connected to any sink or source */
+ PA_STREAM_UNCONNECTED, /**< The stream is not yet connected to any sink or source */
PA_STREAM_CREATING, /**< The stream is being created */
PA_STREAM_READY, /**< The stream is established, you may pass audio data to it now */
PA_STREAM_FAILED, /**< An error occured that made the stream invalid */
PA_STREAM_TERMINATED /**< The stream has been terminated cleanly */
} pa_stream_state_t;
+/** Return non-zero if the passed state is one of the connected states */
+static inline int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
+ return
+ x == PA_STREAM_CREATING ||
+ x == PA_STREAM_READY;
+}
+
/** The state of an operation */
typedef enum pa_operation_state {
PA_OPERATION_RUNNING, /**< The operation is still running */
@@ -67,11 +81,17 @@ typedef enum pa_operation_state {
/** An invalid index */
#define PA_INVALID_INDEX ((uint32_t) -1)
-/** Some special flags for contexts. \since 0.8 */
+/** Some special flags for contexts. */
typedef enum pa_context_flags {
- PA_CONTEXT_NOAUTOSPAWN = 1 /**< Disabled autospawning of the PulseAudio daemon if required */
+ PA_CONTEXT_NOAUTOSPAWN = 1
+ /**< Disabled autospawning of the PulseAudio daemon if required */
} pa_context_flags_t;
+/** \cond fulldocs */
+/* Allow clients to check with #ifdef for those flags */
+#define PA_CONTEXT_NOAUTOSPAWN PA_CONTEXT_NOAUTOSPAWN
+/** \endcond */
+
/** The direction of a pa_stream object */
typedef enum pa_stream_direction {
PA_STREAM_NODIRECTION, /**< Invalid direction */
@@ -80,144 +100,212 @@ typedef enum pa_stream_direction {
PA_STREAM_UPLOAD /**< Sample upload stream */
} pa_stream_direction_t;
-/** Some special flags for stream connections. \since 0.6 */
+/** Some special flags for stream connections. */
typedef enum pa_stream_flags {
- PA_STREAM_START_CORKED = 1, /**< Create the stream corked, requiring an explicit pa_stream_cork() call to uncork it. */
- PA_STREAM_INTERPOLATE_TIMING = 2, /**< Interpolate the latency for
- * this stream. When enabled,
- * pa_stream_get_latency() and
- * pa_stream_get_time() will try
- * to estimate the current
- * record/playback time based on
- * the local time that passed
- * since the last timing info
- * update. Using this option
- * has the advantage of not
- * requiring a whole roundtrip
- * when the current
- * playback/recording time is
- * needed. Consider using this
- * option when requesting
- * latency information
- * frequently. This is
- * especially useful on long
- * latency network
- * connections. It makes a lot
- * of sense to combine this
- * option with
- * PA_STREAM_AUTO_TIMING_UPDATE. */
- PA_STREAM_NOT_MONOTONOUS = 4, /**< Don't force the time to
- * increase monotonically. If
- * this option is enabled,
- * pa_stream_get_time() will not
- * necessarily return always
- * monotonically increasing time
- * values on each call. This may
- * confuse applications which
- * cannot deal with time going
- * 'backwards', but has the
- * advantage that bad transport
- * latency estimations that
- * caused the time to to jump
- * ahead can be corrected
- * quickly, without the need to
- * wait. */
- PA_STREAM_AUTO_TIMING_UPDATE = 8, /**< If set timing update requests
- * are issued periodically
- * automatically. Combined with
- * PA_STREAM_INTERPOLATE_TIMING
- * you will be able to query the
- * current time and latency with
- * pa_stream_get_time() and
- * pa_stream_get_latency() at
- * all times without a packet
- * round trip.*/
- PA_STREAM_NO_REMAP_CHANNELS = 16, /**< Don't remap channels by
- * their name, instead map them
- * simply by their
- * index. Implies
- * PA_STREAM_NO_REMIX_CHANNELS. Only
- * supported when the server is
- * at least PA 0.9.8. It is
- * ignored on older
- * servers.\since 0.9.8 */
- PA_STREAM_NO_REMIX_CHANNELS = 32, /**< When remapping channels by
- * name, don't upmix or downmix
- * them to related
- * channels. Copy them into
- * matching channels of the
- * device 1:1. Only supported
- * when the server is at least
- * PA 0.9.8. It is ignored on
- * older servers. \since
- * 0.9.8 */
- PA_STREAM_FIX_FORMAT = 64, /**< Use the sample format of the
- * sink/device this stream is being
- * connected to, and possibly ignore
- * the format the sample spec contains
- * -- but you still have to pass a
- * valid value in it as a hint to
- * PulseAudio what would suit your
- * stream best. If this is used you
- * should query the used sample format
- * after creating the stream by using
- * pa_stream_get_sample_spec(). Also,
- * if you specified manual buffer
- * metrics it is recommended to update
- * them with
- * pa_stream_set_buffer_attr() to
- * compensate for the changed frame
- * sizes. Only supported when the
- * server is at least PA 0.9.8. It is
- * ignored on older servers. \since
- * 0.9.8 */
-
- PA_STREAM_FIX_RATE = 128, /**< Use the sample rate of the sink,
- * and possibly ignore the rate the
- * sample spec contains. Usage similar
- * to PA_STREAM_FIX_FORMAT.Only
- * supported when the server is at least
- * PA 0.9.8. It is ignored on older
- * servers. \since 0.9.8 */
-
- PA_STREAM_FIX_CHANNELS = 256, /**< Use the number of channels and
- * the channel map of the sink, and
- * possibly ignore the number of
- * channels and the map the sample spec
- * and the passed channel map
- * contains. Usage similar to
- * PA_STREAM_FIX_FORMAT. Only supported
- * when the server is at least PA
- * 0.9.8. It is ignored on older
- * servers. \since 0.9.8 */
- PA_STREAM_DONT_MOVE = 512, /**< Don't allow moving of this stream to
- * another sink/device. Useful if you use
- * any of the PA_STREAM_FIX_ flags and
- * want to make sure that resampling
- * never takes place -- which might
- * happen if the stream is moved to
- * another sink/source whith a different
- * sample spec/channel map. Only
- * supported when the server is at least
- * PA 0.9.8. It is ignored on older
- * servers. \since 0.9.8 */
- PA_STREAM_VARIABLE_RATE = 1024, /**< Allow dynamic changing of the
- * sampling rate during playback
- * with
- * pa_stream_update_sample_rate(). Only
- * supported when the server is at
- * least PA 0.9.8. It is ignored
- * on older servers. \since
- * 0.9.8 */
+
+ PA_STREAM_START_CORKED = 0x0001U,
+ /**< Create the stream corked, requiring an explicit
+ * pa_stream_cork() call to uncork it. */
+
+ PA_STREAM_INTERPOLATE_TIMING = 0x0002U,
+ /**< Interpolate the latency for this stream. When enabled,
+ * pa_stream_get_latency() and pa_stream_get_time() will try to
+ * estimate the current record/playback time based on the local
+ * time that passed since the last timing info update. Using this
+ * option has the advantage of not requiring a whole roundtrip
+ * when the current playback/recording time is needed. Consider
+ * using this option when requesting latency information
+ * frequently. This is especially useful on long latency network
+ * connections. It makes a lot of sense to combine this option
+ * with PA_STREAM_AUTO_TIMING_UPDATE. */
+
+ PA_STREAM_NOT_MONOTONIC = 0x0004U,
+ /**< Don't force the time to increase monotonically. If this
+ * option is enabled, pa_stream_get_time() will not necessarily
+ * return always monotonically increasing time values on each
+ * call. This may confuse applications which cannot deal with time
+ * going 'backwards', but has the advantage that bad transport
+ * latency estimations that caused the time to to jump ahead can
+ * be corrected quickly, without the need to wait. (Please note
+ * that this flag was named PA_STREAM_NOT_MONOTONOUS in releases
+ * prior to 0.9.11. The old name is still defined too, for
+ * compatibility reasons. */
+
+ PA_STREAM_AUTO_TIMING_UPDATE = 0x0008U,
+ /**< If set timing update requests are issued periodically
+ * automatically. Combined with PA_STREAM_INTERPOLATE_TIMING you
+ * will be able to query the current time and latency with
+ * pa_stream_get_time() and pa_stream_get_latency() at all times
+ * without a packet round trip.*/
+
+ PA_STREAM_NO_REMAP_CHANNELS = 0x0010U,
+ /**< Don't remap channels by their name, instead map them simply
+ * by their index. Implies PA_STREAM_NO_REMIX_CHANNELS. Only
+ * supported when the server is at least PA 0.9.8. It is ignored
+ * on older servers.\since 0.9.8 */
+
+ PA_STREAM_NO_REMIX_CHANNELS = 0x0020U,
+ /**< When remapping channels by name, don't upmix or downmix them
+ * to related channels. Copy them into matching channels of the
+ * device 1:1. Only supported when the server is at least PA
+ * 0.9.8. It is ignored on older servers. \since 0.9.8 */
+
+ PA_STREAM_FIX_FORMAT = 0x0040U,
+ /**< Use the sample format of the sink/device this stream is being
+ * connected to, and possibly ignore the format the sample spec
+ * contains -- but you still have to pass a valid value in it as a
+ * hint to PulseAudio what would suit your stream best. If this is
+ * used you should query the used sample format after creating the
+ * stream by using pa_stream_get_sample_spec(). Also, if you
+ * specified manual buffer metrics it is recommended to update
+ * them with pa_stream_set_buffer_attr() to compensate for the
+ * changed frame sizes. Only supported when the server is at least
+ * PA 0.9.8. It is ignored on older servers. \since 0.9.8 */
+
+ PA_STREAM_FIX_RATE = 0x0080U,
+ /**< Use the sample rate of the sink, and possibly ignore the rate
+ * the sample spec contains. Usage similar to
+ * PA_STREAM_FIX_FORMAT.Only supported when the server is at least
+ * PA 0.9.8. It is ignored on older servers. \since 0.9.8 */
+
+ PA_STREAM_FIX_CHANNELS = 0x0100,
+ /**< Use the number of channels and the channel map of the sink,
+ * and possibly ignore the number of channels and the map the
+ * sample spec and the passed channel map contains. Usage similar
+ * to PA_STREAM_FIX_FORMAT. Only supported when the server is at
+ * least PA 0.9.8. It is ignored on older servers. \since 0.9.8 */
+
+ PA_STREAM_DONT_MOVE = 0x0200U,
+ /**< Don't allow moving of this stream to another
+ * sink/device. Useful if you use any of the PA_STREAM_FIX_ flags
+ * and want to make sure that resampling never takes place --
+ * which might happen if the stream is moved to another
+ * sink/source whith a different sample spec/channel map. Only
+ * supported when the server is at least PA 0.9.8. It is ignored
+ * on older servers. \since 0.9.8 */
+
+ PA_STREAM_VARIABLE_RATE = 0x0400U,
+ /**< Allow dynamic changing of the sampling rate during playback
+ * with pa_stream_update_sample_rate(). Only supported when the
+ * server is at least PA 0.9.8. It is ignored on older
+ * servers. \since 0.9.8 */
+
+ PA_STREAM_PEAK_DETECT = 0x0800U,
+ /**< Find peaks instead of resampling. \since 0.9.11 */
+
+ PA_STREAM_START_MUTED = 0x1000U,
+ /**< Create in muted state. \since 0.9.11 */
+
+ PA_STREAM_ADJUST_LATENCY = 0x2000U,
+ /**< Try to adjust the latency of the sink/source based on the
+ * requested buffer metrics and adjust buffer metrics
+ * accordingly. Also see pa_buffer_attr. This option may not be
+ * specified at the same time as PA_STREAM_EARLY_REQUESTS. \since
+ * 0.9.11 */
+
+ PA_STREAM_EARLY_REQUESTS = 0x4000U
+ /**< Enable compatibility mode for legacy clients that rely on a
+ * "classic" hardware device fragment-style playback model. If
+ * this option is set, the minreq value of the buffer metrics gets
+ * a new meaning: instead of just specifying that no requests
+ * asking for less new data than this value will be made to the
+ * client it will also guarantee that requests are generated as
+ * early as this limit is reached. This flag should only be set in
+ * very few situations where compatiblity with a fragment-based
+ * playback model needs to be kept and the client applications
+ * cannot deal with data requests that are delayed to the latest
+ * moment possible. (Usually these are programs that use usleep()
+ * or a similar call in their playback loops instead of sleeping
+ * on the device itself.) Also see pa_buffer_attr. This option may
+ * not be specified at the same time as
+ * PA_STREAM_ADJUST_LATENCY. \since 0.9.12 */
+
} pa_stream_flags_t;
+/** \cond fulldocs */
+
+/* English is an evil language */
+#define PA_STREAM_NOT_MONOTONOUS PA_STREAM_NOT_MONOTONIC
+
+/* Allow clients to check with #ifdef for those flags */
+#define PA_STREAM_START_CORKED PA_STREAM_START_CORKED
+#define PA_STREAM_INTERPOLATE_TIMING PA_STREAM_INTERPOLATE_TIMING
+#define PA_STREAM_NOT_MONOTONIC PA_STREAM_NOT_MONOTONIC
+#define PA_STREAM_AUTO_TIMING_UPDATE PA_STREAM_AUTO_TIMING_UPDATE
+#define PA_STREAM_NO_REMAP_CHANNELS PA_STREAM_NO_REMAP_CHANNELS
+#define PA_STREAM_NO_REMIX_CHANNELS PA_STREAM_NO_REMIX_CHANNELS
+#define PA_STREAM_FIX_FORMAT PA_STREAM_FIX_FORMAT
+#define PA_STREAM_FIX_RATE PA_STREAM_FIX_RATE
+#define PA_STREAM_FIX_CHANNELS PA_STREAM_FIX_CHANNELS
+#define PA_STREAM_DONT_MOVE PA_STREAM_DONT_MOVE
+#define PA_STREAM_VARIABLE_RATE PA_STREAM_VARIABLE_RATE
+#define PA_STREAM_PEAK_DETECT PA_STREAM_PEAK_DETECT
+#define PA_STREAM_START_MUTED PA_STREAM_START_MUTED
+#define PA_STREAM_ADJUST_LATENCY PA_STREAM_ADJUST_LATENCY
+#define PA_STREAM_EARLY_REQUESTS PA_STREAM_EARLY_REQUESTS
+
+/** \endcond */
+
/** Playback and record buffer metrics */
typedef struct pa_buffer_attr {
- uint32_t maxlength; /**< Maximum length of the buffer */
- uint32_t tlength; /**< Playback only: target length of the buffer. The server tries to assure that at least tlength bytes are always available in the buffer */
- uint32_t prebuf; /**< Playback only: pre-buffering. The server does not start with playback before at least prebug bytes are available in the buffer */
- uint32_t minreq; /**< Playback only: minimum request. The server does not request less than minreq bytes from the client, instead waints until the buffer is free enough to request more bytes at once */
- uint32_t fragsize; /**< Recording only: fragment size. The server sends data in blocks of fragsize bytes size. Large values deminish interactivity with other operations on the connection context but decrease control overhead. */
+ uint32_t maxlength;
+ /**< Maximum length of the buffer. Setting this to (uint32_t) -1
+ * will initialize this to the maximum value supported by server,
+ * which is recommended. */
+
+ uint32_t tlength;
+ /**< Playback only: target length of the buffer. The server tries
+ * to assure that at least tlength bytes are always available in
+ * the per-stream server-side playback buffer. It is recommended
+ * to set this to (uint32_t) -1, which will initialize this to a
+ * value that is deemed sensible by the server. However, this
+ * value will default to something like 2s, i.e. for applications
+ * that have specific latency requirements this value should be
+ * set to the maximum latency that the application can deal
+ * with. When PA_STREAM_ADJUST_LATENCY is not set this value will
+ * influence only the per-stream playback buffer size. When
+ * PA_STREAM_ADJUST_LATENCY is set the overall latency of the sink
+ * plus the playback buffer size is configured to this value. Set
+ * PA_STREAM_ADJUST_LATENCY if you are interested in adjusting the
+ * overall latency. Don't set it if you are interested in
+ * configuring the server-sider per-stream playback buffer
+ * size. */
+
+ uint32_t prebuf;
+ /**< Playback only: pre-buffering. The server does not start with
+ * playback before at least prebug bytes are available in the
+ * buffer. It is recommended to set this to (uint32_t) -1, which
+ * will initialize this to the same value as tlength, whatever
+ * that may be. Initialize to 0 to enable manual start/stop
+ * control of the stream. This means that playback will not stop
+ * on underrun and playback will not start automatically. Instead
+ * pa_stream_corked() needs to be called explicitly. If you set
+ * this value to 0 you should also set PA_STREAM_START_CORKED. */
+
+ uint32_t minreq;
+ /**< Playback only: minimum request. The server does not request
+ * less than minreq bytes from the client, instead waits until the
+ * buffer is free enough to request more bytes at once. It is
+ * recommended to set this to (uint32_t) -1, which will initialize
+ * this to a value that is deemed sensible by the server. This
+ * should be set to a value that gives PulseAudio enough time to
+ * move the data from the per-stream playback buffer into the
+ * hardware playback buffer. */
+
+ uint32_t fragsize;
+ /**< Recording only: fragment size. The server sends data in
+ * blocks of fragsize bytes size. Large values deminish
+ * interactivity with other operations on the connection context
+ * but decrease control overhead. It is recommended to set this to
+ * (uint32_t) -1, which will initialize this to a value that is
+ * deemed sensible by the server. However, this value will default
+ * to something like 2s, i.e. for applications that have specific
+ * latency requirements this value should be set to the maximum
+ * latency that the application can deal with. If
+ * PA_STREAM_ADJUST_LATENCY is set the overall source latency will
+ * be adjusted according to this value. If it is not set the
+ * source latency is left unmodified. */
+
} pa_buffer_attr;
/** Error values as used by pa_context_errno(). Use pa_strerror() to convert these values to human readable strings */
@@ -239,44 +327,94 @@ enum {
PA_ERR_MODINITFAILED, /**< Module initialization failed */
PA_ERR_BADSTATE, /**< Bad state */
PA_ERR_NODATA, /**< No data */
- PA_ERR_VERSION, /**< Incompatible protocol version \since 0.8 */
- PA_ERR_TOOLARGE, /**< Data too large \since 0.8.1 */
+ PA_ERR_VERSION, /**< Incompatible protocol version */
+ PA_ERR_TOOLARGE, /**< Data too large */
PA_ERR_NOTSUPPORTED, /**< Operation not supported \since 0.9.5 */
+ PA_ERR_UNKNOWN, /**< The error code was unknown to the client */
+ PA_ERR_NOEXTENSION, /**< Extension does not exist. \since 0.9.12 */
PA_ERR_MAX /**< Not really an error but the first invalid error code */
};
/** Subscription event mask, as used by pa_context_subscribe() */
typedef enum pa_subscription_mask {
- PA_SUBSCRIPTION_MASK_NULL = 0, /**< No events */
- PA_SUBSCRIPTION_MASK_SINK = 1, /**< Sink events */
- PA_SUBSCRIPTION_MASK_SOURCE = 2, /**< Source events */
- PA_SUBSCRIPTION_MASK_SINK_INPUT = 4, /**< Sink input events */
- PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT = 8, /**< Source output events */
- PA_SUBSCRIPTION_MASK_MODULE = 16, /**< Module events */
- PA_SUBSCRIPTION_MASK_CLIENT = 32, /**< Client events */
- PA_SUBSCRIPTION_MASK_SAMPLE_CACHE = 64, /**< Sample cache events */
- PA_SUBSCRIPTION_MASK_SERVER = 128, /**< Other global server changes. \since 0.4 */
- PA_SUBSCRIPTION_MASK_AUTOLOAD = 256, /**< Autoload table events. \since 0.5 */
- PA_SUBSCRIPTION_MASK_ALL = 511 /**< Catch all events \since 0.8 */
+ PA_SUBSCRIPTION_MASK_NULL = 0x0000U,
+ /**< No events */
+
+ PA_SUBSCRIPTION_MASK_SINK = 0x0001U,
+ /**< Sink events */
+
+ PA_SUBSCRIPTION_MASK_SOURCE = 0x0002U,
+ /**< Source events */
+
+ PA_SUBSCRIPTION_MASK_SINK_INPUT = 0x0004U,
+ /**< Sink input events */
+
+ PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT = 0x0008U,
+ /**< Source output events */
+
+ PA_SUBSCRIPTION_MASK_MODULE = 0x0010U,
+ /**< Module events */
+
+ PA_SUBSCRIPTION_MASK_CLIENT = 0x0020U,
+ /**< Client events */
+
+ PA_SUBSCRIPTION_MASK_SAMPLE_CACHE = 0x0040U,
+ /**< Sample cache events */
+
+ PA_SUBSCRIPTION_MASK_SERVER = 0x0080U,
+ /**< Other global server changes. */
+
+ PA_SUBSCRIPTION_MASK_AUTOLOAD = 0x0100U,
+ /**< Autoload table events. */
+
+ PA_SUBSCRIPTION_MASK_ALL = 0x01ffU
+ /**< Catch all events */
} pa_subscription_mask_t;
/** Subscription event types, as used by pa_context_subscribe() */
typedef enum pa_subscription_event_type {
- PA_SUBSCRIPTION_EVENT_SINK = 0, /**< Event type: Sink */
- PA_SUBSCRIPTION_EVENT_SOURCE = 1, /**< Event type: Source */
- PA_SUBSCRIPTION_EVENT_SINK_INPUT = 2, /**< Event type: Sink input */
- PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT = 3, /**< Event type: Source output */
- PA_SUBSCRIPTION_EVENT_MODULE = 4, /**< Event type: Module */
- PA_SUBSCRIPTION_EVENT_CLIENT = 5, /**< Event type: Client */
- PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE = 6, /**< Event type: Sample cache item */
- PA_SUBSCRIPTION_EVENT_SERVER = 7, /**< Event type: Global server change, only occuring with PA_SUBSCRIPTION_EVENT_CHANGE. \since 0.4 */
- PA_SUBSCRIPTION_EVENT_AUTOLOAD = 8, /**< Event type: Autoload table changes. \since 0.5 */
- PA_SUBSCRIPTION_EVENT_FACILITY_MASK = 15, /**< A mask to extract the event type from an event value */
-
- PA_SUBSCRIPTION_EVENT_NEW = 0, /**< A new object was created */
- PA_SUBSCRIPTION_EVENT_CHANGE = 16, /**< A property of the object was modified */
- PA_SUBSCRIPTION_EVENT_REMOVE = 32, /**< An object was removed */
- PA_SUBSCRIPTION_EVENT_TYPE_MASK = 16+32 /**< A mask to extract the event operation from an event value */
+ PA_SUBSCRIPTION_EVENT_SINK = 0x0000U,
+ /**< Event type: Sink */
+
+ PA_SUBSCRIPTION_EVENT_SOURCE = 0x0001U,
+ /**< Event type: Source */
+
+ PA_SUBSCRIPTION_EVENT_SINK_INPUT = 0x0002U,
+ /**< Event type: Sink input */
+
+ PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT = 0x0003U,
+ /**< Event type: Source output */
+
+ PA_SUBSCRIPTION_EVENT_MODULE = 0x0004U,
+ /**< Event type: Module */
+
+ PA_SUBSCRIPTION_EVENT_CLIENT = 0x0005U,
+ /**< Event type: Client */
+
+ PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE = 0x0006U,
+ /**< Event type: Sample cache item */
+
+ PA_SUBSCRIPTION_EVENT_SERVER = 0x0007U,
+ /**< Event type: Global server change, only occuring with PA_SUBSCRIPTION_EVENT_CHANGE. */
+
+ PA_SUBSCRIPTION_EVENT_AUTOLOAD = 0x0008U,
+ /**< Event type: Autoload table changes. */
+
+ PA_SUBSCRIPTION_EVENT_FACILITY_MASK = 0x000FU,
+ /**< A mask to extract the event type from an event value */
+
+ PA_SUBSCRIPTION_EVENT_NEW = 0x0000U,
+ /**< A new object was created */
+
+ PA_SUBSCRIPTION_EVENT_CHANGE = 0x0010U,
+ /**< A property of the object was modified */
+
+ PA_SUBSCRIPTION_EVENT_REMOVE = 0x0020U,
+ /**< An object was removed */
+
+ PA_SUBSCRIPTION_EVENT_TYPE_MASK = 0x0030U,
+ /**< A mask to extract the event operation from an event value */
+
} pa_subscription_event_type_t;
/** Return one if an event type t matches an event mask bitfield */
@@ -297,53 +435,76 @@ typedef enum pa_subscription_event_type {
* source_usec+buffer_usec+transport_usec-sink_usec. (Take care of
* sign issues!) When connected to a monitor source sink_usec contains
* the latency of the owning sink. The two latency estimations
- * described here are implemented in pa_stream_get_latency().*/
+ * described here are implemented in pa_stream_get_latency(). Please
+ * note that this structure can be extended as part of evolutionary
+ * API updates at any time in any new release.*/
typedef struct pa_timing_info {
- struct timeval timestamp; /**< The time when this timing info structure was current */
- int synchronized_clocks; /**< Non-zero if the local and the
- * remote machine have synchronized
- * clocks. If synchronized clocks are
- * detected transport_usec becomes much
- * more reliable. However, the code that
- * detects synchronized clocks is very
- * limited und unreliable itself. \since
- * 0.5 */
-
- pa_usec_t sink_usec; /**< Time in usecs a sample takes to be played on the sink. For playback streams and record streams connected to a monitor source. */
- pa_usec_t source_usec; /**< Time in usecs a sample takes from being recorded to being delivered to the application. Only for record streams. \since 0.5*/
- pa_usec_t transport_usec; /**< Estimated time in usecs a sample takes to be transferred to/from the daemon. For both playback and record streams. \since 0.5 */
-
- int playing; /**< Non-zero when the stream is currently playing. Only for playback streams. */
-
- int write_index_corrupt; /**< Non-zero if write_index is not
- * up-to-date because a local write
- * command that corrupted it has been
- * issued in the time since this latency
- * info was current . Only write
- * commands with SEEK_RELATIVE_ON_READ
- * and SEEK_RELATIVE_END can corrupt
- * write_index. \since 0.8 */
- int64_t write_index; /**< Current write index into the
- * playback buffer in bytes. Think twice before
- * using this for seeking purposes: it
- * might be out of date a the time you
- * want to use it. Consider using
- * PA_SEEK_RELATIVE instead. \since
- * 0.8 */
-
- int read_index_corrupt; /**< Non-zero if read_index is not
- * up-to-date because a local pause or
- * flush request that corrupted it has
- * been issued in the time since this
- * latency info was current. \since 0.8 */
-
- int64_t read_index; /**< Current read index into the
- * playback buffer in bytes. Think twice before
- * using this for seeking purposes: it
- * might be out of date a the time you
- * want to use it. Consider using
- * PA_SEEK_RELATIVE_ON_READ
- * instead. \since 0.8 */
+ struct timeval timestamp;
+ /**< The time when this timing info structure was current */
+
+ int synchronized_clocks;
+ /**< Non-zero if the local and the remote machine have
+ * synchronized clocks. If synchronized clocks are detected
+ * transport_usec becomes much more reliable. However, the code
+ * that detects synchronized clocks is very limited und unreliable
+ * itself. */
+
+ pa_usec_t sink_usec;
+ /**< Time in usecs a sample takes to be played on the sink. For
+ * playback streams and record streams connected to a monitor
+ * source. */
+
+ pa_usec_t source_usec;
+ /**< Time in usecs a sample takes from being recorded to being
+ * delivered to the application. Only for record streams. */
+
+ pa_usec_t transport_usec;
+ /**< Estimated time in usecs a sample takes to be transferred
+ * to/from the daemon. For both playback and record streams. */
+
+ int playing;
+ /**< Non-zero when the stream is currently not underrun and data
+ * is being passed on to the device. Only for playback
+ * streams. This field does not say whether the data is actually
+ * already being played. To determine this check whether
+ * since_underrun (converted to usec) is larger than sink_usec.*/
+
+ int write_index_corrupt;
+ /**< Non-zero if write_index is not up-to-date because a local
+ * write command that corrupted it has been issued in the time
+ * since this latency info was current . Only write commands with
+ * SEEK_RELATIVE_ON_READ and SEEK_RELATIVE_END can corrupt
+ * write_index. */
+
+ int64_t write_index;
+ /**< Current write index into the playback buffer in bytes. Think
+ * twice before using this for seeking purposes: it might be out
+ * of date a the time you want to use it. Consider using
+ * PA_SEEK_RELATIVE instead. */
+
+ int read_index_corrupt;
+ /**< Non-zero if read_index is not up-to-date because a local
+ * pause or flush request that corrupted it has been issued in the
+ * time since this latency info was current. */
+
+ int64_t read_index;
+ /**< Current read index into the playback buffer in bytes. Think
+ * twice before using this for seeking purposes: it might be out
+ * of date a the time you want to use it. Consider using
+ * PA_SEEK_RELATIVE_ON_READ instead. */
+
+ pa_usec_t configured_sink_usec;
+ /**< The configured latency for the sink. \since 0.9.11 */
+
+ pa_usec_t configured_source_usec;
+ /**< The configured latency for * the source. \since 0.9.11 */
+
+ int64_t since_underrun;
+ /**< Bytes that were handed to the sink since the last underrun
+ * happened, or since playback started again after the last
+ * underrun. playing will tell you which case it is. \since
+ * 0.9.11 */
+
} pa_timing_info;
/** A structure for the spawn api. This may be used to integrate auto
@@ -352,43 +513,103 @@ typedef struct pa_timing_info {
* waitpid() is used on the child's PID. The spawn routine will not
* block or ignore SIGCHLD signals, since this cannot be done in a
* thread compatible way. You might have to do this in
- * prefork/postfork. \since 0.4 */
+ * prefork/postfork. */
typedef struct pa_spawn_api {
- void (*prefork)(void); /**< Is called just before the fork in the parent process. May be NULL. */
- void (*postfork)(void); /**< Is called immediately after the fork in the parent process. May be NULL.*/
- void (*atfork)(void); /**< Is called immediately after the
- * fork in the child process. May be
- * NULL. It is not safe to close all
- * file descriptors in this function
- * unconditionally, since a UNIX socket
- * (created using socketpair()) is
- * passed to the new process. */
+ void (*prefork)(void);
+ /**< Is called just before the fork in the parent process. May be
+ * NULL. */
+
+ void (*postfork)(void);
+ /**< Is called immediately after the fork in the parent
+ * process. May be NULL.*/
+
+ void (*atfork)(void);
+ /**< Is called immediately after the fork in the child
+ * process. May be NULL. It is not safe to close all file
+ * descriptors in this function unconditionally, since a UNIX
+ * socket (created using socketpair()) is passed to the new
+ * process. */
} pa_spawn_api;
-/** Seek type for pa_stream_write(). \since 0.8*/
+/** Seek type for pa_stream_write(). */
typedef enum pa_seek_mode {
- PA_SEEK_RELATIVE = 0, /**< Seek relatively to the write index */
- PA_SEEK_ABSOLUTE = 1, /**< Seek relatively to the start of the buffer queue */
- PA_SEEK_RELATIVE_ON_READ = 2, /**< Seek relatively to the read index. */
- PA_SEEK_RELATIVE_END = 3 /**< Seek relatively to the current end of the buffer queue. */
+ PA_SEEK_RELATIVE = 0,
+ /**< Seek relatively to the write index */
+
+ PA_SEEK_ABSOLUTE = 1,
+ /**< Seek relatively to the start of the buffer queue */
+
+ PA_SEEK_RELATIVE_ON_READ = 2,
+ /**< Seek relatively to the read index. */
+
+ PA_SEEK_RELATIVE_END = 3
+ /**< Seek relatively to the current end of the buffer queue. */
} pa_seek_mode_t;
-/** Special sink flags. \since 0.8 */
+/** Special sink flags. */
typedef enum pa_sink_flags {
- PA_SINK_HW_VOLUME_CTRL = 1, /**< Supports hardware volume control */
- PA_SINK_LATENCY = 2, /**< Supports latency querying */
- PA_SINK_HARDWARE = 4, /**< Is a hardware sink of some kind, in contrast to "virtual"/software sinks \since 0.9.3 */
- PA_SINK_NETWORK = 8 /**< Is a networked sink of some kind. \since 0.9.7 */
+ PA_SINK_HW_VOLUME_CTRL = 0x0001U,
+ /**< Supports hardware volume control */
+
+ PA_SINK_LATENCY = 0x0002U,
+ /**< Supports latency querying */
+
+ PA_SINK_HARDWARE = 0x0004U,
+ /**< Is a hardware sink of some kind, in contrast to
+ * "virtual"/software sinks \since 0.9.3 */
+
+ PA_SINK_NETWORK = 0x0008U,
+ /**< Is a networked sink of some kind. \since 0.9.7 */
+
+ PA_SINK_HW_MUTE_CTRL = 0x0010U,
+ /**< Supports hardware mute control \since 0.9.11 */
+
+ PA_SINK_DECIBEL_VOLUME = 0x0020U
+ /**< Volume can be translated to dB with pa_sw_volume_to_dB()
+ * \since 0.9.11 */
} pa_sink_flags_t;
-/** Special source flags. \since 0.8 */
+/** \cond fulldocs */
+#define PA_SINK_HW_VOLUME_CTRL PA_SINK_HW_VOLUME_CTRL
+#define PA_SINK_LATENCY PA_SINK_LATENCY
+#define PA_SINK_HARDWARE PA_SINK_HARDWARE
+#define PA_SINK_NETWORK PA_SINK_NETWORK
+#define PA_SINK_HW_VOLUME_CTRL PA_SINK_HW_VOLUME_CTRL
+#define PA_SINK_DECIBEL_VOLUME PA_SINK_DECIBEL_VOLUME
+/** \endcond */
+
+/** Special source flags. */
typedef enum pa_source_flags {
- PA_SOURCE_HW_VOLUME_CTRL = 1, /**< Supports hardware volume control */
- PA_SOURCE_LATENCY = 2, /**< Supports latency querying */
- PA_SOURCE_HARDWARE = 4, /**< Is a hardware source of some kind, in contrast to "virtual"/software source \since 0.9.3 */
- PA_SOURCE_NETWORK = 8 /**< Is a networked sink of some kind. \since 0.9.7 */
+ PA_SOURCE_HW_VOLUME_CTRL = 0x0001U,
+ /**< Supports hardware volume control */
+
+ PA_SOURCE_LATENCY = 0x0002U,
+ /**< Supports latency querying */
+
+ PA_SOURCE_HARDWARE = 0x0004U,
+ /**< Is a hardware source of some kind, in contrast to
+ * "virtual"/software source \since 0.9.3 */
+
+ PA_SOURCE_NETWORK = 0x0008U,
+ /**< Is a networked sink of some kind. \since 0.9.7 */
+
+ PA_SOURCE_HW_MUTE_CTRL = 0x0010U,
+ /**< Supports hardware mute control \since 0.9.11 */
+
+ PA_SOURCE_DECIBEL_VOLUME = 0x0020U
+ /**< Volume can be translated to dB with pa_sw_volume_to_dB()
+ * \since 0.9.11 */
} pa_source_flags_t;
+/** \cond fulldocs */
+#define PA_SOURCE_HW_VOLUME_CTRL PA_SOURCE_HW_VOLUME_CTRL
+#define PA_SOURCE_LATENCY PA_SOURCE_LATENCY
+#define PA_SOURCE_HARDWARE PA_SOURCE_HARDWARE
+#define PA_SOURCE_NETWORK PA_SOURCE_NETWORK
+#define PA_SOURCE_HW_VOLUME_CTRL PA_SOURCE_HW_VOLUME_CTRL
+#define PA_SOURCE_DECIBEL_VOLUME PA_SOURCE_DECIBEL_VOLUME
+/** \endcond */
+
/** A generic free() like callback prototype */
typedef void (*pa_free_cb_t)(void *p);
diff --git a/src/pulse/error.c b/src/pulse/error.c
index cb0044f..d9d0a8c 100644
--- a/src/pulse/error.c
+++ b/src/pulse/error.c
@@ -1,5 +1,3 @@
-/* $Id: error.c 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -32,6 +30,7 @@
#include <string.h>
#include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/native-common.h>
@@ -41,29 +40,34 @@
const char*pa_strerror(int error) {
static const char* const errortab[PA_ERR_MAX] = {
- [PA_OK] = "OK",
- [PA_ERR_ACCESS] = "Access denied",
- [PA_ERR_COMMAND] = "Unknown command",
- [PA_ERR_INVALID] = "Invalid argument",
- [PA_ERR_EXIST] = "Entity exists",
- [PA_ERR_NOENTITY] = "No such entity",
- [PA_ERR_CONNECTIONREFUSED] = "Connection refused",
- [PA_ERR_PROTOCOL] = "Protocol error",
- [PA_ERR_TIMEOUT] = "Timeout",
- [PA_ERR_AUTHKEY] = "No authorization key",
- [PA_ERR_INTERNAL] = "Internal error",
- [PA_ERR_CONNECTIONTERMINATED] = "Connection terminated",
- [PA_ERR_KILLED] = "Entity killed",
- [PA_ERR_INVALIDSERVER] = "Invalid server",
- [PA_ERR_MODINITFAILED] = "Module initalization failed",
- [PA_ERR_BADSTATE] = "Bad state",
- [PA_ERR_NODATA] = "No data",
- [PA_ERR_VERSION] = "Incompatible protocol version",
- [PA_ERR_TOOLARGE] = "Too large"
+ [PA_OK] = N_("OK"),
+ [PA_ERR_ACCESS] = N_("Access denied"),
+ [PA_ERR_COMMAND] = N_("Unknown command"),
+ [PA_ERR_INVALID] = N_("Invalid argument"),
+ [PA_ERR_EXIST] = N_("Entity exists"),
+ [PA_ERR_NOENTITY] = N_("No such entity"),
+ [PA_ERR_CONNECTIONREFUSED] = N_("Connection refused"),
+ [PA_ERR_PROTOCOL] = N_("Protocol error"),
+ [PA_ERR_TIMEOUT] = N_("Timeout"),
+ [PA_ERR_AUTHKEY] = N_("No authorization key"),
+ [PA_ERR_INTERNAL] = N_("Internal error"),
+ [PA_ERR_CONNECTIONTERMINATED] = N_("Connection terminated"),
+ [PA_ERR_KILLED] = N_("Entity killed"),
+ [PA_ERR_INVALIDSERVER] = N_("Invalid server"),
+ [PA_ERR_MODINITFAILED] = N_("Module initalization failed"),
+ [PA_ERR_BADSTATE] = N_("Bad state"),
+ [PA_ERR_NODATA] = N_("No data"),
+ [PA_ERR_VERSION] = N_("Incompatible protocol version"),
+ [PA_ERR_TOOLARGE] = N_("Too large"),
+ [PA_ERR_NOTSUPPORTED] = N_("Not supported"),
+ [PA_ERR_UNKNOWN] = N_("Unknown error code"),
+ [PA_ERR_NOEXTENSION] = N_("No such extension")
};
+ pa_init_i18n();
+
if (error < 0 || error >= PA_ERR_MAX)
return NULL;
- return errortab[error];
+ return _(errortab[error]);
}
diff --git a/src/pulse/error.h b/src/pulse/error.h
index 2ee4156..9f9e3d3 100644
--- a/src/pulse/error.h
+++ b/src/pulse/error.h
@@ -1,8 +1,6 @@
#ifndef fooerrorhfoo
#define fooerrorhfoo
-/* $Id: error.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/ext-stream-restore.c b/src/pulse/ext-stream-restore.c
new file mode 100644
index 0000000..703179c
--- /dev/null
+++ b/src/pulse/ext-stream-restore.c
@@ -0,0 +1,326 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulse/context.h>
+#include <pulse/gccmacro.h>
+
+#include <pulsecore/macro.h>
+#include <pulsecore/pstream-util.h>
+
+#include "internal.h"
+
+#include "ext-stream-restore.h"
+
+enum {
+ SUBCOMMAND_TEST,
+ SUBCOMMAND_READ,
+ SUBCOMMAND_WRITE,
+ SUBCOMMAND_DELETE,
+ SUBCOMMAND_SUBSCRIBE,
+ SUBCOMMAND_EVENT
+};
+
+static void ext_stream_restore_test_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_operation *o = userdata;
+ uint32_t version = PA_INVALID_INDEX;
+
+ pa_assert(pd);
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ if (!o->context)
+ goto finish;
+
+ if (command != PA_COMMAND_REPLY) {
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
+ goto finish;
+
+ } else if (pa_tagstruct_getu32(t, &version) < 0 ||
+ !pa_tagstruct_eof(t)) {
+
+ pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
+ if (o->callback) {
+ pa_ext_stream_restore_test_cb_t cb = (pa_ext_stream_restore_test_cb_t) o->callback;
+ cb(o->context, version, o->userdata);
+ }
+
+finish:
+ pa_operation_done(o);
+ pa_operation_unref(o);
+}
+
+pa_operation *pa_ext_stream_restore_test(
+ pa_context *c,
+ pa_ext_stream_restore_test_cb_t cb,
+ void *userdata) {
+
+ uint32_t tag;
+ pa_operation *o;
+ pa_tagstruct *t;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 14, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_EXTENSION, &tag);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, "module-stream-restore");
+ pa_tagstruct_putu32(t, SUBCOMMAND_TEST);
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, ext_stream_restore_test_cb, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
+
+static void ext_stream_restore_read_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_operation *o = userdata;
+ int eol = 1;
+
+ pa_assert(pd);
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ if (!o->context)
+ goto finish;
+
+ if (command != PA_COMMAND_REPLY) {
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
+ goto finish;
+
+ eol = -1;
+ } else {
+
+ while (!pa_tagstruct_eof(t)) {
+ pa_ext_stream_restore_info i;
+ pa_bool_t mute = FALSE;
+
+ memset(&i, 0, sizeof(i));
+
+ if (pa_tagstruct_gets(t, &i.name) < 0 ||
+ pa_tagstruct_get_channel_map(t, &i.channel_map) < 0 ||
+ pa_tagstruct_get_cvolume(t, &i.volume) < 0 ||
+ pa_tagstruct_gets(t, &i.device) < 0 ||
+ pa_tagstruct_get_boolean(t, &mute) < 0) {
+
+ pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
+ i.mute = (int) mute;
+
+ if (o->callback) {
+ pa_ext_stream_restore_read_cb_t cb = (pa_ext_stream_restore_read_cb_t) o->callback;
+ cb(o->context, &i, 0, o->userdata);
+ }
+ }
+ }
+
+ if (o->callback) {
+ pa_ext_stream_restore_read_cb_t cb = (pa_ext_stream_restore_read_cb_t) o->callback;
+ cb(o->context, NULL, eol, o->userdata);
+ }
+
+finish:
+ pa_operation_done(o);
+ pa_operation_unref(o);
+}
+
+pa_operation *pa_ext_stream_restore_read(
+ pa_context *c,
+ pa_ext_stream_restore_read_cb_t cb,
+ void *userdata) {
+
+ uint32_t tag;
+ pa_operation *o;
+ pa_tagstruct *t;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 14, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_EXTENSION, &tag);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, "module-stream-restore");
+ pa_tagstruct_putu32(t, SUBCOMMAND_READ);
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, ext_stream_restore_read_cb, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
+
+pa_operation *pa_ext_stream_restore_write(
+ pa_context *c,
+ pa_update_mode_t mode,
+ const pa_ext_stream_restore_info data[],
+ unsigned n,
+ int apply_immediately,
+ pa_context_success_cb_t cb,
+ void *userdata) {
+
+ uint32_t tag;
+ pa_operation *o;
+ pa_tagstruct *t;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ pa_assert(mode == PA_UPDATE_MERGE || mode == PA_UPDATE_REPLACE || mode == PA_UPDATE_SET);
+ pa_assert(data);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 14, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_EXTENSION, &tag);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, "module-stream-restore");
+ pa_tagstruct_putu32(t, SUBCOMMAND_WRITE);
+
+ pa_tagstruct_putu32(t, mode);
+ pa_tagstruct_put_boolean(t, apply_immediately);
+
+ for (; n > 0; n--, data++) {
+ pa_tagstruct_puts(t, data->name);
+ pa_tagstruct_put_channel_map(t, &data->channel_map);
+ pa_tagstruct_put_cvolume(t, &data->volume);
+ pa_tagstruct_puts(t, data->device);
+ pa_tagstruct_put_boolean(t, data->mute);
+ }
+
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
+
+pa_operation *pa_ext_stream_restore_delete(
+ pa_context *c,
+ const char *const s[],
+ pa_context_success_cb_t cb,
+ void *userdata) {
+
+ uint32_t tag;
+ pa_operation *o;
+ pa_tagstruct *t;
+ const char *const *k;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ pa_assert(s);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 14, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_EXTENSION, &tag);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, "module-stream-restore");
+ pa_tagstruct_putu32(t, SUBCOMMAND_DELETE);
+
+ for (k = s; *k; k++)
+ pa_tagstruct_puts(t, *k);
+
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
+
+pa_operation *pa_ext_stream_restore_subscribe(
+ pa_context *c,
+ int enable,
+ pa_context_success_cb_t cb,
+ void *userdata) {
+
+ uint32_t tag;
+ pa_operation *o;
+ pa_tagstruct *t;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 14, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_EXTENSION, &tag);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, "module-stream-restore");
+ pa_tagstruct_putu32(t, SUBCOMMAND_SUBSCRIBE);
+ pa_tagstruct_put_boolean(t, enable);
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
+
+void pa_ext_stream_restore_set_subscribe_cb(
+ pa_context *c,
+ pa_ext_stream_restore_subscribe_cb_t cb,
+ void *userdata) {
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ c->ext_stream_restore.callback = cb;
+ c->ext_stream_restore.userdata = userdata;
+}
+
+void pa_ext_stream_restore_command(pa_context *c, uint32_t tag, pa_tagstruct *t) {
+ uint32_t subcommand;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ pa_assert(t);
+
+ if (pa_tagstruct_getu32(t, &subcommand) < 0 ||
+ !pa_tagstruct_eof(t)) {
+
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ return;
+ }
+
+ if (subcommand != SUBCOMMAND_EVENT) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ return;
+ }
+
+ if (c->ext_stream_restore.callback)
+ c->ext_stream_restore.callback(c, c->ext_stream_restore.userdata);
+
+}
diff --git a/src/pulse/ext-stream-restore.h b/src/pulse/ext-stream-restore.h
new file mode 100644
index 0000000..2038eb4
--- /dev/null
+++ b/src/pulse/ext-stream-restore.h
@@ -0,0 +1,107 @@
+#ifndef foopulseextstreamrestorehfoo
+#define foopulseextstreamrestorehfoo
+
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#include <pulse/context.h>
+
+/** \file
+ *
+ * Routines for controlling module-stream-restore
+ */
+
+PA_C_DECL_BEGIN
+
+/** Stores information about one entry in the stream database that is
+ * maintained by module-stream-restore. \since 0.9.12 */
+typedef struct pa_ext_stream_restore_info {
+ const char *name; /**< Identifier string of the stream. A string like "sink-input-by-role:" or similar followed by some arbitrary property value. */
+ pa_channel_map channel_map; /**< The channel map for the volume field */
+ pa_cvolume volume; /**< The volume of the stream when it was seen last, if applicable */
+ const char *device; /**< The sink/source of the stream when it was last seen */
+ int mute; /**< The boolean mute state of the stream when it was last seen, if applicable */
+} pa_ext_stream_restore_info;
+
+/** Callback prototype for pa_ext_stream_restore_test(). \since 0.9.12 */
+typedef void (*pa_ext_stream_restore_test_cb_t)(
+ pa_context *c,
+ uint32_t version,
+ void *userdata);
+
+/** Test if this extension module is available in the server. \since 0.9.12 */
+pa_operation *pa_ext_stream_restore_test(
+ pa_context *c,
+ pa_ext_stream_restore_test_cb_t cb,
+ void *userdata);
+
+/** Callback prototype for pa_ext_stream_restore_read(). \since 0.9.12 */
+typedef void (*pa_ext_stream_restore_read_cb_t)(
+ pa_context *c,
+ const pa_ext_stream_restore_info *info,
+ int eol,
+ void *userdata);
+
+/** Read all entries from the stream database. \since 0.9.12 */
+pa_operation *pa_ext_stream_restore_read(
+ pa_context *c,
+ pa_ext_stream_restore_read_cb_t cb,
+ void *userdata);
+
+/** Store entries in the stream database. \since 0.9.12 */
+pa_operation *pa_ext_stream_restore_write(
+ pa_context *c,
+ pa_update_mode_t mode,
+ const pa_ext_stream_restore_info data[],
+ unsigned n,
+ int apply_immediately,
+ pa_context_success_cb_t cb,
+ void *userdata);
+
+/** Delete entries from the stream database. \since 0.9.12 */
+pa_operation *pa_ext_stream_restore_delete(
+ pa_context *c,
+ const char *const s[],
+ pa_context_success_cb_t cb,
+ void *userdata);
+
+/** Subscribe to changes in the stream database. \since 0.9.12 */
+pa_operation *pa_ext_stream_restore_subscribe(
+ pa_context *c,
+ int enable,
+ pa_context_success_cb_t cb,
+ void *userdata);
+
+/** Callback prototype for pa_ext_stream_restore_set_subscribe_cb(). \since 0.9.12 */
+typedef void (*pa_ext_stream_restore_subscribe_cb_t)(
+ pa_context *c,
+ void *userdata);
+
+/** Set the subscription callback that is called when
+ * pa_ext_stream_restore_subscribe() was called. \since 0.9.12 */
+void pa_ext_stream_restore_set_subscribe_cb(
+ pa_context *c,
+ pa_ext_stream_restore_subscribe_cb_t cb,
+ void *userdata);
+
+PA_C_DECL_END
+
+#endif
diff --git a/src/pulsecore/gccmacro.h b/src/pulse/gccmacro.h
index 02a4a24..0533b10 100644
--- a/src/pulsecore/gccmacro.h
+++ b/src/pulse/gccmacro.h
@@ -1,8 +1,6 @@
#ifndef foopulsegccmacrohfoo
#define foopulsegccmacrohfoo
-/* $Id: gccmacro.h 2150 2008-03-27 23:18:27Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -77,13 +75,41 @@
#endif
#endif
-#ifndef PA_LIKELY
+#ifndef PA_GCC_DEPRECATED
#ifdef __GNUC__
-#define PA_LIKELY(x) (__builtin_expect(!!(x),1))
-#define PA_UNLIKELY(x) (__builtin_expect((x),0))
+#define PA_GCC_DEPRECATED __attribute__ ((deprecated))
+#else
+/** This function is deprecated **/
+#define PA_GCC_DEPRECATED
+#endif
+#endif
+
+#ifndef PA_GCC_PACKED
+#ifdef __GNUCC__
+#define PA_GCC_PACKED __attribute__ ((packed))
+#else
+/** Structure shall be packed in memory **/
+#define PA_GCC_PACKED
+#endif
+#endif
+
+#ifndef PA_GCC_ALLOC_SIZE
+#if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
+#define PA_GCC_ALLOC_SIZE(x) __attribute__ ((__alloc_size__(x)))
+#define PA_GCC_ALLOC_SIZE2(x,y) __attribute__ ((__alloc_size__(x,y)))
+#else
+/** Macro for usage of GCC's alloc_size attribute */
+#define PA_GCC_ALLOC_SIZE(x)
+#define PA_GCC_ALLOC_SIZE2(x,y)
+#endif
+#endif
+
+#ifndef PA_GCC_MALLOC
+#ifdef __GNUCC__
+#define PA_GCC_MALLOC __attribute__ ((malloc))
#else
-#define PA_LIKELY(x) (x)
-#define PA_UNLIKELY(x) (x)
+/** Macro for usage of GCC's malloc attribute */
+#define PA_GCC_MALLOC
#endif
#endif
diff --git a/src/pulse/glib-mainloop.c b/src/pulse/glib-mainloop.c
index 4316ebd..5f5dc49 100644
--- a/src/pulse/glib-mainloop.c
+++ b/src/pulse/glib-mainloop.c
@@ -1,5 +1,3 @@
-/* $Id: glib-mainloop.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -197,11 +195,11 @@ static void cleanup_defer_events(pa_glib_mainloop *g, int force) {
}
static gushort map_flags_to_glib(pa_io_event_flags_t flags) {
- return
- (flags & PA_IO_EVENT_INPUT ? G_IO_IN : 0) |
- (flags & PA_IO_EVENT_OUTPUT ? G_IO_OUT : 0) |
- (flags & PA_IO_EVENT_ERROR ? G_IO_ERR : 0) |
- (flags & PA_IO_EVENT_HANGUP ? G_IO_HUP : 0);
+ return (gushort)
+ ((flags & PA_IO_EVENT_INPUT ? G_IO_IN : 0) |
+ (flags & PA_IO_EVENT_OUTPUT ? G_IO_OUT : 0) |
+ (flags & PA_IO_EVENT_ERROR ? G_IO_ERR : 0) |
+ (flags & PA_IO_EVENT_HANGUP ? G_IO_HUP : 0));
}
static pa_io_event_flags_t map_flags_from_glib(gushort flags) {
@@ -427,7 +425,7 @@ static void glib_defer_set_destroy(pa_defer_event *e, pa_defer_event_destroy_cb_
/* quit() */
-static void glib_quit(pa_mainloop_api*a, PA_GCC_UNUSED int retval) {
+static void glib_quit(pa_mainloop_api*a, int retval) {
g_warning("quit() ignored");
@@ -538,7 +536,7 @@ static gboolean check_func(GSource *source) {
return FALSE;
}
-static gboolean dispatch_func(GSource *source, PA_GCC_UNUSED GSourceFunc callback, PA_GCC_UNUSED gpointer userdata) {
+static gboolean dispatch_func(GSource *source, GSourceFunc callback, gpointer userdata) {
pa_glib_mainloop *g = (pa_glib_mainloop*) source;
pa_io_event *e;
diff --git a/src/pulse/glib-mainloop.h b/src/pulse/glib-mainloop.h
index 4a4c0ad..60fd61a 100644
--- a/src/pulse/glib-mainloop.h
+++ b/src/pulse/glib-mainloop.h
@@ -1,8 +1,6 @@
#ifndef fooglibmainloophfoo
#define fooglibmainloophfoo
-/* $Id: glib-mainloop.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/i18n.c b/src/pulse/i18n.c
new file mode 100644
index 0000000..7f25b20
--- /dev/null
+++ b/src/pulse/i18n.c
@@ -0,0 +1,38 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulsecore/once.h>
+
+#include "i18n.h"
+
+void pa_init_i18n(void) {
+
+ PA_ONCE_BEGIN {
+
+ bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+
+ } PA_ONCE_END;
+}
diff --git a/src/pulse/i18n.h b/src/pulse/i18n.h
new file mode 100644
index 0000000..4c0ef9d
--- /dev/null
+++ b/src/pulse/i18n.h
@@ -0,0 +1,62 @@
+#ifndef foopulsei18nhfoo
+#define foopulsei18nhfoo
+
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
+
+PA_C_DECL_BEGIN
+
+#if !defined(GETTEXT_PACKAGE)
+#error "Something is very wrong here, config.h needs to be included first"
+#endif
+
+#ifdef ENABLE_NLS
+
+#include <libintl.h>
+
+#define _(String) dgettext(GETTEXT_PACKAGE, String)
+#ifdef gettext_noop
+#define N_(String) gettext_noop(String)
+#else
+#define N_(String) (String)
+#endif
+
+#else /* NLS is disabled */
+
+#define _(String) (String)
+#define N_(String) (String)
+#define textdomain(String) (String)
+#define gettext(String) (String)
+#define dgettext(Domain,String) (String)
+#define dcgettext(Domain,String,Type) (String)
+#define bindtextdomain(Domain,Directory) (Domain)
+#define bind_textdomain_codeset(Domain,Codeset) (Codeset)
+
+#endif /* ENABLE_NLS */
+
+void pa_init_i18n(void);
+
+PA_C_DECL_END
+
+#endif
diff --git a/src/pulse/internal.h b/src/pulse/internal.h
index 1d3e319..5fe4210 100644
--- a/src/pulse/internal.h
+++ b/src/pulse/internal.h
@@ -1,8 +1,6 @@
#ifndef foointernalhfoo
#define foointernalhfoo
-/* $Id: internal.h 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,6 +28,7 @@
#include <pulse/stream.h>
#include <pulse/operation.h>
#include <pulse/subscribe.h>
+#include <pulse/ext-stream-restore.h>
#include <pulsecore/socket-client.h>
#include <pulsecore/pstream.h>
@@ -42,6 +41,7 @@
#include <pulsecore/memblockq.h>
#include <pulsecore/hashmap.h>
#include <pulsecore/refcnt.h>
+#include <pulsecore/time-smoother.h>
#include "client-conf.h"
@@ -50,7 +50,7 @@
struct pa_context {
PA_REFCNT_DECLARE;
- char *name;
+ pa_proplist *proplist;
pa_mainloop_api* mainloop;
pa_socket_client *client;
@@ -64,20 +64,20 @@ struct pa_context {
uint32_t version;
uint32_t ctag;
uint32_t csyncid;
- uint32_t error;
+ int error;
pa_context_state_t state;
pa_context_notify_cb_t state_callback;
void *state_userdata;
-
pa_context_subscribe_cb_t subscribe_callback;
void *subscribe_userdata;
pa_mempool *mempool;
- int is_local;
- int do_autospawn;
- int autospawn_lock_fd;
+ pa_bool_t is_local:1;
+ pa_bool_t do_shm:1;
+
+ pa_bool_t do_autospawn:1;
pa_spawn_api spawn_api;
pa_strlist *server_list;
@@ -85,52 +85,66 @@ struct pa_context {
char *server;
pa_client_conf *conf;
+
+ uint32_t client_index;
+
+ /* Extension specific data */
+ struct {
+ pa_ext_stream_restore_subscribe_cb_t callback;
+ void *userdata;
+ } ext_stream_restore;
};
-#define PA_MAX_WRITE_INDEX_CORRECTIONS 10
+#define PA_MAX_WRITE_INDEX_CORRECTIONS 32
typedef struct pa_index_correction {
uint32_t tag;
- int valid;
int64_t value;
- int absolute, corrupt;
+ pa_bool_t valid:1;
+ pa_bool_t absolute:1;
+ pa_bool_t corrupt:1;
} pa_index_correction;
struct pa_stream {
PA_REFCNT_DECLARE;
+ PA_LLIST_FIELDS(pa_stream);
+
pa_context *context;
pa_mainloop_api *mainloop;
- PA_LLIST_FIELDS(pa_stream);
- char *name;
- pa_bool_t manual_buffer_attr;
- pa_buffer_attr buffer_attr;
+ uint32_t direct_on_input;
+
+ pa_stream_direction_t direction;
+ pa_stream_state_t state;
+ pa_stream_flags_t flags;
+
pa_sample_spec sample_spec;
pa_channel_map channel_map;
- pa_stream_flags_t flags;
+
+ pa_proplist *proplist;
+
+ pa_bool_t channel_valid:1;
+ pa_bool_t suspended:1;
+ pa_bool_t corked:1;
+ pa_bool_t timing_info_valid:1;
+ pa_bool_t auto_timing_update_requested:1;
+
uint32_t channel;
uint32_t syncid;
- int channel_valid;
uint32_t stream_index;
- pa_stream_direction_t direction;
- pa_stream_state_t state;
- pa_bool_t buffer_attr_not_ready, timing_info_not_ready;
uint32_t requested_bytes;
+ pa_buffer_attr buffer_attr;
uint32_t device_index;
char *device_name;
- pa_bool_t suspended;
pa_memchunk peek_memchunk;
void *peek_data;
pa_memblockq *record_memblockq;
- int corked;
-
/* Store latest latency info */
pa_timing_info timing_info;
- int timing_info_valid;
/* Use to make sure that time advances monotonically */
pa_usec_t previous_time;
@@ -145,10 +159,8 @@ struct pa_stream {
/* Latency interpolation stuff */
pa_time_event *auto_timing_update_event;
- int auto_timing_update_requested;
- pa_usec_t cached_time;
- int cached_time_valid;
+ pa_smoother *smoother;
/* Callbacks */
pa_stream_notify_cb_t state_callback;
@@ -167,6 +179,8 @@ struct pa_stream {
void *moved_userdata;
pa_stream_notify_cb_t suspended_callback;
void *suspended_userdata;
+ pa_stream_notify_cb_t started_callback;
+ void *started_userdata;
};
typedef void (*pa_operation_cb_t)(void);
@@ -192,7 +206,7 @@ void pa_command_subscribe_event(pa_pdispatch *pd, uint32_t command, uint32_t tag
void pa_command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
void pa_command_stream_suspended(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
void pa_command_stream_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
-
+void pa_command_stream_started(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t callback, void *userdata);
void pa_operation_done(pa_operation *o);
@@ -204,7 +218,7 @@ void pa_stream_simple_ack_callback(pa_pdispatch *pd, uint32_t command, uint32_t
void pa_context_fail(pa_context *c, int error);
int pa_context_set_error(pa_context *c, int error);
void pa_context_set_state(pa_context *c, pa_context_state_t st);
-int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t);
+int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t, pa_bool_t fail);
pa_operation* pa_context_send_simple_command(pa_context *c, uint32_t command, void (*internal_callback)(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata), void (*cb)(void), void *userdata);
void pa_stream_set_state(pa_stream *s, pa_stream_state_t st);
@@ -226,5 +240,6 @@ pa_tagstruct *pa_tagstruct_command(pa_context *c, uint32_t command, uint32_t *ta
#define PA_CHECK_VALIDITY_RETURN_NULL(context, expression, error) PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, NULL)
+void pa_ext_stream_restore_command(pa_context *c, uint32_t tag, pa_tagstruct *t);
#endif
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 0e93659..3809158 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -1,5 +1,3 @@
-/* $Id: introspect.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,9 +24,11 @@
#include <config.h>
#endif
+#include <string.h>
+
#include <pulse/context.h>
+#include <pulse/gccmacro.h>
-#include <pulsecore/gccmacro.h>
#include <pulsecore/macro.h>
#include <pulsecore/pstream-util.h>
@@ -38,7 +38,7 @@
/*** Statistics ***/
-static void context_stat_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_stat_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
pa_stat_info i, *p = &i;
@@ -52,7 +52,7 @@ static void context_stat_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNU
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
p = NULL;
@@ -81,7 +81,7 @@ pa_operation* pa_context_stat(pa_context *c, pa_stat_info_cb_t cb, void *userdat
/*** Server Info ***/
-static void context_get_server_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_server_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
pa_server_info i, *p = &i;
@@ -95,7 +95,7 @@ static void context_get_server_info_callback(pa_pdispatch *pd, uint32_t command,
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
p = NULL;
@@ -106,7 +106,8 @@ static void context_get_server_info_callback(pa_pdispatch *pd, uint32_t command,
pa_tagstruct_get_sample_spec(t, &i.sample_spec) < 0 ||
pa_tagstruct_gets(t, &i.default_sink_name) < 0 ||
pa_tagstruct_gets(t, &i.default_source_name) < 0 ||
- pa_tagstruct_getu32(t, &i.cookie) < 0) {
+ pa_tagstruct_getu32(t, &i.cookie) < 0 ||
+ !pa_tagstruct_eof(t)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
goto finish;
@@ -128,7 +129,7 @@ pa_operation* pa_context_get_server_info(pa_context *c, pa_server_info_cb_t cb,
/*** Sink Info ***/
-static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -140,7 +141,7 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, P
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
eol = -1;
@@ -149,7 +150,10 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, P
while (!pa_tagstruct_eof(t)) {
pa_sink_info i;
+ pa_bool_t mute = FALSE;
+
memset(&i, 0, sizeof(i));
+ i.proplist = pa_proplist_new();
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
@@ -158,23 +162,30 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, P
pa_tagstruct_get_channel_map(t, &i.channel_map) < 0 ||
pa_tagstruct_getu32(t, &i.owner_module) < 0 ||
pa_tagstruct_get_cvolume(t, &i.volume) < 0 ||
- pa_tagstruct_get_boolean(t, &i.mute) < 0 ||
+ pa_tagstruct_get_boolean(t, &mute) < 0 ||
pa_tagstruct_getu32(t, &i.monitor_source) < 0 ||
pa_tagstruct_gets(t, &i.monitor_source_name) < 0 ||
pa_tagstruct_get_usec(t, &i.latency) < 0 ||
pa_tagstruct_gets(t, &i.driver) < 0 ||
- pa_tagstruct_getu32(t, &flags) < 0) {
+ pa_tagstruct_getu32(t, &flags) < 0 ||
+ (o->context->version >= 13 &&
+ (pa_tagstruct_get_proplist(t, i.proplist) < 0 ||
+ pa_tagstruct_get_usec(t, &i.configured_latency) < 0))) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ pa_proplist_free(i.proplist);
goto finish;
}
+ i.mute = (int) mute;
i.flags = (pa_sink_flags_t) flags;
if (o->callback) {
pa_sink_info_cb_t cb = (pa_sink_info_cb_t) o->callback;
cb(o->context, &i, 0, o->userdata);
}
+
+ pa_proplist_free(i.proplist);
}
}
@@ -239,7 +250,7 @@ pa_operation* pa_context_get_sink_info_by_name(pa_context *c, const char *name,
/*** Source info ***/
-static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -251,7 +262,7 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
eol = -1;
@@ -260,7 +271,10 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
while (!pa_tagstruct_eof(t)) {
pa_source_info i;
uint32_t flags;
+ pa_bool_t mute = FALSE;
+
memset(&i, 0, sizeof(i));
+ i.proplist = pa_proplist_new();
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
@@ -269,23 +283,30 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
pa_tagstruct_get_channel_map(t, &i.channel_map) < 0 ||
pa_tagstruct_getu32(t, &i.owner_module) < 0 ||
pa_tagstruct_get_cvolume(t, &i.volume) < 0 ||
- pa_tagstruct_get_boolean(t, &i.mute) < 0 ||
+ pa_tagstruct_get_boolean(t, &mute) < 0 ||
pa_tagstruct_getu32(t, &i.monitor_of_sink) < 0 ||
pa_tagstruct_gets(t, &i.monitor_of_sink_name) < 0 ||
pa_tagstruct_get_usec(t, &i.latency) < 0 ||
pa_tagstruct_gets(t, &i.driver) < 0 ||
- pa_tagstruct_getu32(t, &flags) < 0) {
+ pa_tagstruct_getu32(t, &flags) < 0 ||
+ (o->context->version >= 13 &&
+ (pa_tagstruct_get_proplist(t, i.proplist) < 0 ||
+ pa_tagstruct_get_usec(t, &i.configured_latency) < 0))) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ pa_proplist_free(i.proplist);
goto finish;
}
+ i.mute = (int) mute;
i.flags = (pa_source_flags_t) flags;
if (o->callback) {
pa_source_info_cb_t cb = (pa_source_info_cb_t) o->callback;
cb(o->context, &i, 0, o->userdata);
}
+
+ pa_proplist_free(i.proplist);
}
}
@@ -350,7 +371,7 @@ pa_operation* pa_context_get_source_info_by_name(pa_context *c, const char *name
/*** Client info ***/
-static void context_get_client_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_client_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -362,7 +383,7 @@ static void context_get_client_info_callback(pa_pdispatch *pd, uint32_t command,
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
eol = -1;
@@ -370,13 +391,18 @@ static void context_get_client_info_callback(pa_pdispatch *pd, uint32_t command,
while (!pa_tagstruct_eof(t)) {
pa_client_info i;
+
memset(&i, 0, sizeof(i));
+ i.proplist = pa_proplist_new();
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
pa_tagstruct_getu32(t, &i.owner_module) < 0 ||
- pa_tagstruct_gets(t, &i.driver) < 0 ) {
+ pa_tagstruct_gets(t, &i.driver) < 0 ||
+ (o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0)) {
+
pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ pa_proplist_free(i.proplist);
goto finish;
}
@@ -384,6 +410,8 @@ static void context_get_client_info_callback(pa_pdispatch *pd, uint32_t command,
pa_client_info_cb_t cb = (pa_client_info_cb_t) o->callback;
cb(o->context, &i, 0, o->userdata);
}
+
+ pa_proplist_free(i.proplist);
}
}
@@ -425,7 +453,7 @@ pa_operation* pa_context_get_client_info_list(pa_context *c, pa_client_info_cb_t
/*** Module info ***/
-static void context_get_module_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_module_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -437,7 +465,7 @@ static void context_get_module_info_callback(pa_pdispatch *pd, uint32_t command,
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
eol = -1;
@@ -445,17 +473,20 @@ static void context_get_module_info_callback(pa_pdispatch *pd, uint32_t command,
while (!pa_tagstruct_eof(t)) {
pa_module_info i;
+ pa_bool_t auto_unload = FALSE;
memset(&i, 0, sizeof(i));
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
pa_tagstruct_gets(t, &i.argument) < 0 ||
pa_tagstruct_getu32(t, &i.n_used) < 0 ||
- pa_tagstruct_get_boolean(t, &i.auto_unload) < 0) {
+ pa_tagstruct_get_boolean(t, &auto_unload) < 0) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
goto finish;
}
+ i.auto_unload = (int) auto_unload;
+
if (o->callback) {
pa_module_info_cb_t cb = (pa_module_info_cb_t) o->callback;
cb(o->context, &i, 0, o->userdata);
@@ -501,7 +532,7 @@ pa_operation* pa_context_get_module_info_list(pa_context *c, pa_module_info_cb_t
/*** Sink input info ***/
-static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -513,7 +544,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
eol = -1;
@@ -521,7 +552,10 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
while (!pa_tagstruct_eof(t)) {
pa_sink_input_info i;
+ pa_bool_t mute = FALSE;
+
memset(&i, 0, sizeof(i));
+ i.proplist = pa_proplist_new();
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
@@ -535,16 +569,22 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
pa_tagstruct_get_usec(t, &i.sink_usec) < 0 ||
pa_tagstruct_gets(t, &i.resample_method) < 0 ||
pa_tagstruct_gets(t, &i.driver) < 0 ||
- (o->context->version >= 11 && pa_tagstruct_get_boolean(t, &i.mute) < 0)) {
+ (o->context->version >= 11 && pa_tagstruct_get_boolean(t, &mute) < 0) ||
+ (o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ pa_proplist_free(i.proplist);
goto finish;
}
+ i.mute = (int) mute;
+
if (o->callback) {
pa_sink_input_info_cb_t cb = (pa_sink_input_info_cb_t) o->callback;
cb(o->context, &i, 0, o->userdata);
}
+
+ pa_proplist_free(i.proplist);
}
}
@@ -586,7 +626,7 @@ pa_operation* pa_context_get_sink_input_info_list(pa_context *c, void (*cb)(pa_c
/*** Source output info ***/
-static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -598,7 +638,7 @@ static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t c
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
eol = -1;
@@ -608,6 +648,7 @@ static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t c
pa_source_output_info i;
memset(&i, 0, sizeof(i));
+ i.proplist = pa_proplist_new();
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
@@ -619,9 +660,11 @@ static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t c
pa_tagstruct_get_usec(t, &i.buffer_usec) < 0 ||
pa_tagstruct_get_usec(t, &i.source_usec) < 0 ||
pa_tagstruct_gets(t, &i.resample_method) < 0 ||
- pa_tagstruct_gets(t, &i.driver) < 0) {
+ pa_tagstruct_gets(t, &i.driver) < 0 ||
+ (o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ pa_proplist_free(i.proplist);
goto finish;
}
@@ -629,6 +672,8 @@ static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t c
pa_source_output_info_cb_t cb = (pa_source_output_info_cb_t) o->callback;
cb(o->context, &i, 0, o->userdata);
}
+
+ pa_proplist_free(i.proplist);
}
}
@@ -911,7 +956,7 @@ pa_operation* pa_context_set_source_mute_by_name(pa_context *c, const char *name
/** Sample Cache **/
-static void context_get_sample_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_sample_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -923,7 +968,7 @@ static void context_get_sample_info_callback(pa_pdispatch *pd, uint32_t command,
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
eol = -1;
@@ -931,8 +976,10 @@ static void context_get_sample_info_callback(pa_pdispatch *pd, uint32_t command,
while (!pa_tagstruct_eof(t)) {
pa_sample_info i;
+ pa_bool_t lazy = FALSE;
memset(&i, 0, sizeof(i));
+ i.proplist = pa_proplist_new();
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
@@ -941,17 +988,22 @@ static void context_get_sample_info_callback(pa_pdispatch *pd, uint32_t command,
pa_tagstruct_get_sample_spec(t, &i.sample_spec) < 0 ||
pa_tagstruct_get_channel_map(t, &i.channel_map) < 0 ||
pa_tagstruct_getu32(t, &i.bytes) < 0 ||
- pa_tagstruct_get_boolean(t, &i.lazy) < 0 ||
- pa_tagstruct_gets(t, &i.filename) < 0) {
+ pa_tagstruct_get_boolean(t, &lazy) < 0 ||
+ pa_tagstruct_gets(t, &i.filename) < 0 ||
+ (o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
goto finish;
}
+ i.lazy = (int) lazy;
+
if (o->callback) {
pa_sample_info_cb_t cb = (pa_sample_info_cb_t) o->callback;
cb(o->context, &i, 0, o->userdata);
}
+
+ pa_proplist_free(i.proplist);
}
}
@@ -1048,7 +1100,7 @@ pa_operation* pa_context_kill_source_output(pa_context *c, uint32_t idx, pa_cont
return command_kill(c, PA_COMMAND_KILL_SOURCE_OUTPUT, idx, cb, userdata);
}
-static void context_index_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_index_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
uint32_t idx;
@@ -1060,7 +1112,7 @@ static void context_index_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UN
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
idx = PA_INVALID_INDEX;
@@ -1109,7 +1161,7 @@ pa_operation* pa_context_unload_module(pa_context *c, uint32_t idx, pa_context_s
/*** Autoload stuff ***/
-static void context_get_autoload_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void context_get_autoload_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -1121,7 +1173,7 @@ static void context_get_autoload_info_callback(pa_pdispatch *pd, uint32_t comman
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
eol = -1;
@@ -1158,6 +1210,8 @@ finish:
pa_operation_unref(o);
}
+PA_WARN_REFERENCE(pa_context_get_autoload_info_by_name, "Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
pa_operation* pa_context_get_autoload_info_by_name(pa_context *c, const char *name, pa_autoload_type_t type, pa_autoload_info_cb_t cb, void *userdata) {
pa_tagstruct *t;
pa_operation *o;
@@ -1182,6 +1236,8 @@ pa_operation* pa_context_get_autoload_info_by_name(pa_context *c, const char *na
return o;
}
+PA_WARN_REFERENCE(pa_context_get_autoload_info_by_index, "Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
pa_operation* pa_context_get_autoload_info_by_index(pa_context *c, uint32_t idx, pa_autoload_info_cb_t cb, void *userdata) {
pa_tagstruct *t;
pa_operation *o;
@@ -1204,10 +1260,15 @@ pa_operation* pa_context_get_autoload_info_by_index(pa_context *c, uint32_t idx,
return o;
}
+
+PA_WARN_REFERENCE(pa_context_get_autoload_info_list, "Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
pa_operation* pa_context_get_autoload_info_list(pa_context *c, pa_autoload_info_cb_t cb, void *userdata) {
return pa_context_send_simple_command(c, PA_COMMAND_GET_AUTOLOAD_INFO_LIST, context_get_autoload_info_callback, (pa_operation_cb_t) cb, userdata);
}
+PA_WARN_REFERENCE(pa_context_add_autoload, "Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
pa_operation* pa_context_add_autoload(pa_context *c, const char *name, pa_autoload_type_t type, const char *module, const char*argument, pa_context_index_cb_t cb, void* userdata) {
pa_operation *o;
pa_tagstruct *t;
@@ -1234,6 +1295,8 @@ pa_operation* pa_context_add_autoload(pa_context *c, const char *name, pa_autolo
return o;
}
+PA_WARN_REFERENCE(pa_context_remove_autoload_by_name, "Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
pa_operation* pa_context_remove_autoload_by_name(pa_context *c, const char *name, pa_autoload_type_t type, pa_context_success_cb_t cb, void* userdata) {
pa_operation *o;
pa_tagstruct *t;
@@ -1257,6 +1320,8 @@ pa_operation* pa_context_remove_autoload_by_name(pa_context *c, const char *name
return o;
}
+PA_WARN_REFERENCE(pa_context_remove_autoload_by_index, "Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
pa_operation* pa_context_remove_autoload_by_index(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void* userdata) {
pa_operation *o;
pa_tagstruct *t;
@@ -1278,7 +1343,7 @@ pa_operation* pa_context_remove_autoload_by_index(pa_context *c, uint32_t idx, p
return o;
}
-pa_operation* pa_context_move_sink_input_by_name(pa_context *c, uint32_t idx, char *sink_name, pa_context_success_cb_t cb, void* userdata) {
+pa_operation* pa_context_move_sink_input_by_name(pa_context *c, uint32_t idx, const char *sink_name, pa_context_success_cb_t cb, void* userdata) {
pa_operation *o;
pa_tagstruct *t;
uint32_t tag;
@@ -1328,7 +1393,7 @@ pa_operation* pa_context_move_sink_input_by_index(pa_context *c, uint32_t idx, u
return o;
}
-pa_operation* pa_context_move_source_output_by_name(pa_context *c, uint32_t idx, char *source_name, pa_context_success_cb_t cb, void* userdata) {
+pa_operation* pa_context_move_source_output_by_name(pa_context *c, uint32_t idx, const char *source_name, pa_context_success_cb_t cb, void* userdata) {
pa_operation *o;
pa_tagstruct *t;
uint32_t tag;
@@ -1378,7 +1443,7 @@ pa_operation* pa_context_move_source_output_by_index(pa_context *c, uint32_t idx
return o;
}
-pa_operation* pa_context_suspend_sink_by_name(pa_context *c, char *sink_name, int suspend, pa_context_success_cb_t cb, void* userdata) {
+pa_operation* pa_context_suspend_sink_by_name(pa_context *c, const char *sink_name, int suspend, pa_context_success_cb_t cb, void* userdata) {
pa_operation *o;
pa_tagstruct *t;
uint32_t tag;
@@ -1425,7 +1490,7 @@ pa_operation* pa_context_suspend_sink_by_index(pa_context *c, uint32_t idx, int
return o;
}
-pa_operation* pa_context_suspend_source_by_name(pa_context *c, char *source_name, int suspend, pa_context_success_cb_t cb, void* userdata) {
+pa_operation* pa_context_suspend_source_by_name(pa_context *c, const char *source_name, int suspend, pa_context_success_cb_t cb, void* userdata) {
pa_operation *o;
pa_tagstruct *t;
uint32_t tag;
diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h
index ecb3643..087bd9f 100644
--- a/src/pulse/introspect.h
+++ b/src/pulse/introspect.h
@@ -1,8 +1,6 @@
#ifndef foointrospecthfoo
#define foointrospecthfoo
-/* $Id: introspect.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,8 +28,10 @@
#include <pulse/operation.h>
#include <pulse/context.h>
#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
#include <pulse/channelmap.h>
#include <pulse/volume.h>
+#include <pulse/proplist.h>
/** \page introspect Server Query and Control
*
@@ -52,14 +52,14 @@
* Some objects can have multiple entries at the server. When requesting all
* of these at once, the callback will be called multiple times, once for
* each object. When the list has been exhausted, the callback will be called
- * without an information structure and the eol parameter set to a non-zero
+ * without an information structure and the eol parameter set to a positive
* value.
*
* Note that even if a single object is requested, and not the entire list,
* the terminating call will still be made.
*
* If an error occurs, the callback will be called without and information
- * structure and eol set to zero.
+ * structure and eol set to a negative value..
*
* Data members in the information structures are only valid during the
* duration of the callback. If they are required after the callback is
@@ -130,8 +130,10 @@
*
* \subsection autoload_subsec Autoload Entries
*
- * Modules can be autoloaded as a result of a client requesting a certain
- * sink or source. This mapping between sink/source names and modules can be
+ * Modules can be autoloaded as a result of a client requesting a
+ * certain sink or source. Please note that autoloading is deprecated
+ * in 0.9.11. and is likely to be removed from the API in a later
+ * version. This mapping between sink/source names and modules can be
* queried from the server:
*
* \li By index - pa_context_get_autoload_info_by_index()
@@ -191,7 +193,9 @@
*
* New module autoloading rules can be added, and existing can be removed
* using pa_context_add_autoload() and pa_context_remove_autoload_by_index()
- * / pa_context_remove_autoload_by_name().
+ * / pa_context_remove_autoload_by_name(). Please note that autoloading is deprecated
+ * in 0.9.11. and is likely to be removed from the API in a later
+ * version.
*
* \subsection client_subsec Clients
*
@@ -206,21 +210,27 @@
PA_C_DECL_BEGIN
-/** Stores information about sinks */
+/** @{ \name Sinks */
+
+/** Stores information about sinks. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_sink_info {
const char *name; /**< Name of the sink */
uint32_t index; /**< Index of the sink */
const char *description; /**< Description of this sink */
pa_sample_spec sample_spec; /**< Sample spec of this sink */
- pa_channel_map channel_map; /**< Channel map \since 0.8 */
+ pa_channel_map channel_map; /**< Channel map */
uint32_t owner_module; /**< Index of the owning module of this sink, or PA_INVALID_INDEX */
pa_cvolume volume; /**< Volume of the sink */
- int mute; /**< Mute switch of the sink \since 0.8 */
+ int mute; /**< Mute switch of the sink */
uint32_t monitor_source; /**< Index of the monitor source connected to this sink */
const char *monitor_source_name; /**< The name of the monitor source */
- pa_usec_t latency; /**< Length of filled playback buffer of this sink */
- const char *driver; /**< Driver name. \since 0.8 */
- pa_sink_flags_t flags; /**< Flags \since 0.8 */
+ pa_usec_t latency; /**< Length of queued audio in the output buffer. */
+ const char *driver; /**< Driver name. */
+ pa_sink_flags_t flags; /**< Flags */
+ pa_proplist *proplist; /**< Property list \since 0.9.11 */
+ pa_usec_t configured_latency; /**< The latency this device has been configured to. \since 0.9.11 */
} pa_sink_info;
/** Callback prototype for pa_context_get_sink_info_by_name() and friends */
@@ -235,21 +245,47 @@ pa_operation* pa_context_get_sink_info_by_index(pa_context *c, uint32_t id, pa_s
/** Get the complete sink list */
pa_operation* pa_context_get_sink_info_list(pa_context *c, pa_sink_info_cb_t cb, void *userdata);
-/** Stores information about sources */
+/** Set the volume of a sink device specified by its index */
+pa_operation* pa_context_set_sink_volume_by_index(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+
+/** Set the volume of a sink device specified by its name */
+pa_operation* pa_context_set_sink_volume_by_name(pa_context *c, const char *name, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+
+/** Set the mute switch of a sink device specified by its index */
+pa_operation* pa_context_set_sink_mute_by_index(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata);
+
+/** Set the mute switch of a sink device specified by its name */
+pa_operation* pa_context_set_sink_mute_by_name(pa_context *c, const char *name, int mute, pa_context_success_cb_t cb, void *userdata);
+
+/** Suspend/Resume a sink. \since 0.9.7 */
+pa_operation* pa_context_suspend_sink_by_name(pa_context *c, const char *sink_name, int suspend, pa_context_success_cb_t cb, void* userdata);
+
+/** Suspend/Resume a sink. If idx is PA_INVALID_INDEX all sinks will be suspended. \since 0.9.7 */
+pa_operation* pa_context_suspend_sink_by_index(pa_context *c, uint32_t idx, int suspend, pa_context_success_cb_t cb, void* userdata);
+
+/** @} */
+
+/** @{ \name Sources */
+
+/** Stores information about sources. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_source_info {
- const char *name ; /**< Name of the source */
+ const char *name; /**< Name of the source */
uint32_t index; /**< Index of the source */
const char *description; /**< Description of this source */
pa_sample_spec sample_spec; /**< Sample spec of this source */
- pa_channel_map channel_map; /**< Channel map \since 0.8 */
+ pa_channel_map channel_map; /**< Channel map */
uint32_t owner_module; /**< Owning module index, or PA_INVALID_INDEX */
- pa_cvolume volume; /**< Volume of the source \since 0.8 */
- int mute; /**< Mute switch of the sink \since 0.8 */
+ pa_cvolume volume; /**< Volume of the source */
+ int mute; /**< Mute switch of the sink */
uint32_t monitor_of_sink; /**< If this is a monitor source the index of the owning sink, otherwise PA_INVALID_INDEX */
const char *monitor_of_sink_name; /**< Name of the owning sink, or PA_INVALID_INDEX */
- pa_usec_t latency; /**< Length of filled record buffer of this source. \since 0.5 */
- const char *driver; /**< Driver name \since 0.8 */
- pa_source_flags_t flags; /**< Flags \since 0.8 */
+ pa_usec_t latency; /**< Length of filled record buffer of this source. */
+ const char *driver; /**< Driver name */
+ pa_source_flags_t flags; /**< Flags */
+ pa_proplist *proplist; /**< Property list \since 0.9.11 */
+ pa_usec_t configured_latency; /**< The latency this device has been configured to. \since 0.9.11 */
} pa_source_info;
/** Callback prototype for pa_context_get_source_info_by_name() and friends */
@@ -264,16 +300,34 @@ pa_operation* pa_context_get_source_info_by_index(pa_context *c, uint32_t id, pa
/** Get the complete source list */
pa_operation* pa_context_get_source_info_list(pa_context *c, pa_source_info_cb_t cb, void *userdata);
-/** Server information */
+/** Set the volume of a source device specified by its index */
+pa_operation* pa_context_set_source_volume_by_index(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+
+/** Set the volume of a source device specified by its name */
+pa_operation* pa_context_set_source_volume_by_name(pa_context *c, const char *name, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+
+/** Set the mute switch of a source device specified by its index */
+pa_operation* pa_context_set_source_mute_by_index(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata);
+
+/** Set the mute switch of a source device specified by its name */
+pa_operation* pa_context_set_source_mute_by_name(pa_context *c, const char *name, int mute, pa_context_success_cb_t cb, void *userdata);
+
+/** @} */
+
+/** @{ \name Server */
+
+/** Server information. Please note that this structure can be
+ * extended as part of evolutionary API updates at any time in any new
+ * release. */
typedef struct pa_server_info {
const char *user_name; /**< User name of the daemon process */
const char *host_name; /**< Host name the daemon is running on */
const char *server_version; /**< Version string of the daemon */
const char *server_name; /**< Server package name (usually "pulseaudio") */
pa_sample_spec sample_spec; /**< Default sample specification */
- const char *default_sink_name; /**< Name of default sink. \since 0.4 */
- const char *default_source_name; /**< Name of default sink. \since 0.4*/
- uint32_t cookie; /**< A random cookie for identifying this instance of PulseAudio. \since 0.8 */
+ const char *default_sink_name; /**< Name of default sink. */
+ const char *default_source_name; /**< Name of default sink. */
+ uint32_t cookie; /**< A random cookie for identifying this instance of PulseAudio. */
} pa_server_info;
/** Callback prototype for pa_context_get_server_info() */
@@ -282,7 +336,13 @@ typedef void (*pa_server_info_cb_t) (pa_context *c, const pa_server_info*i, void
/** Get some information about the server */
pa_operation* pa_context_get_server_info(pa_context *c, pa_server_info_cb_t cb, void *userdata);
-/** Stores information about modules */
+/** @} */
+
+/** @{ \name Modules */
+
+/** Stores information about modules. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_module_info {
uint32_t index; /**< Index of the module */
const char*name, /**< Name of the module */
@@ -300,12 +360,28 @@ pa_operation* pa_context_get_module_info(pa_context *c, uint32_t idx, pa_module_
/** Get the complete list of currently loaded modules */
pa_operation* pa_context_get_module_info_list(pa_context *c, pa_module_info_cb_t cb, void *userdata);
-/** Stores information about clients */
+/** Callback prototype for pa_context_load_module() */
+typedef void (*pa_context_index_cb_t)(pa_context *c, uint32_t idx, void *userdata);
+
+/** Load a module. */
+pa_operation* pa_context_load_module(pa_context *c, const char*name, const char *argument, pa_context_index_cb_t cb, void *userdata);
+
+/** Unload a module. */
+pa_operation* pa_context_unload_module(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);
+
+/** @} */
+
+/** @{ \name Clients */
+
+/** Stores information about clients. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_client_info {
uint32_t index; /**< Index of this client */
const char *name; /**< Name of this client */
uint32_t owner_module; /**< Index of the owning module, or PA_INVALID_INDEX */
- const char *driver; /**< Driver name \since 0.8 */
+ const char *driver; /**< Driver name */
+ pa_proplist *proplist; /**< Property list \since 0.9.11 */
} pa_client_info;
/** Callback prototype for pa_context_get_client_info() and firends*/
@@ -317,7 +393,16 @@ pa_operation* pa_context_get_client_info(pa_context *c, uint32_t idx, pa_client_
/** Get the complete client list */
pa_operation* pa_context_get_client_info_list(pa_context *c, pa_client_info_cb_t cb, void *userdata);
-/** Stores information about sink inputs */
+/** Kill a client. */
+pa_operation* pa_context_kill_client(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);
+
+/** @} */
+
+/** @{ \name Sink Inputs */
+
+/** Stores information about sink inputs. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_sink_input_info {
uint32_t index; /**< Index of the sink input */
const char *name; /**< Name of the sink input */
@@ -329,9 +414,10 @@ typedef struct pa_sink_input_info {
pa_cvolume volume; /**< The volume of this sink input */
pa_usec_t buffer_usec; /**< Latency due to buffering in sink input, see pa_latency_info for details */
pa_usec_t sink_usec; /**< Latency of the sink device, see pa_latency_info for details */
- const char *resample_method; /**< Thre resampling method used by this sink input. \since 0.7 */
- const char *driver; /**< Driver name \since 0.8 */
+ const char *resample_method; /**< Thre resampling method used by this sink input. */
+ const char *driver; /**< Driver name */
int mute; /**< Stream muted \since 0.9.7 */
+ pa_proplist *proplist; /**< Property list \since 0.9.11 */
} pa_sink_input_info;
/** Callback prototype for pa_context_get_sink_input_info() and firends*/
@@ -343,7 +429,28 @@ pa_operation* pa_context_get_sink_input_info(pa_context *c, uint32_t idx, pa_sin
/** Get the complete sink input list */
pa_operation* pa_context_get_sink_input_info_list(pa_context *c, pa_sink_input_info_cb_t cb, void *userdata);
-/** Stores information about source outputs */
+/** Move the specified sink input to a different sink. \since 0.9.5 */
+pa_operation* pa_context_move_sink_input_by_name(pa_context *c, uint32_t idx, const char *sink_name, pa_context_success_cb_t cb, void* userdata);
+
+/** Move the specified sink input to a different sink. \since 0.9.5 */
+pa_operation* pa_context_move_sink_input_by_index(pa_context *c, uint32_t idx, uint32_t sink_idx, pa_context_success_cb_t cb, void* userdata);
+
+/** Set the volume of a sink input stream */
+pa_operation* pa_context_set_sink_input_volume(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+
+/** Set the mute switch of a sink input stream \since 0.9.7 */
+pa_operation* pa_context_set_sink_input_mute(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata);
+
+/** Kill a sink input. */
+pa_operation* pa_context_kill_sink_input(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);
+
+/** @} */
+
+/** @{ \name Source Outputs */
+
+/** Stores information about source outputs. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_source_output_info {
uint32_t index; /**< Index of the sink input */
const char *name; /**< Name of the sink input */
@@ -352,10 +459,11 @@ typedef struct pa_source_output_info {
uint32_t source; /**< Index of the connected source */
pa_sample_spec sample_spec; /**< The sample specification of the source output */
pa_channel_map channel_map; /**< Channel map */
- pa_usec_t buffer_usec; /**< Latency due to buffering in the source output, see pa_latency_info for details. \since 0.5 */
- pa_usec_t source_usec; /**< Latency of the source device, see pa_latency_info for details. \since 0.5 */
- const char *resample_method; /**< Thre resampling method used by this source output. \since 0.7 */
- const char *driver; /**< Driver name \since 0.8 */
+ pa_usec_t buffer_usec; /**< Latency due to buffering in the source output, see pa_latency_info for details. */
+ pa_usec_t source_usec; /**< Latency of the source device, see pa_latency_info for details. */
+ const char *resample_method; /**< Thre resampling method used by this source output. */
+ const char *driver; /**< Driver name */
+ pa_proplist *proplist; /**< Property list \since 0.9.11 */
} pa_source_output_info;
/** Callback prototype for pa_context_get_source_output_info() and firends*/
@@ -367,43 +475,34 @@ pa_operation* pa_context_get_source_output_info(pa_context *c, uint32_t idx, pa_
/** Get the complete list of source outputs */
pa_operation* pa_context_get_source_output_info_list(pa_context *c, pa_source_output_info_cb_t cb, void *userdata);
-/** Set the volume of a sink device specified by its index */
-pa_operation* pa_context_set_sink_volume_by_index(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
-
-/** Set the volume of a sink device specified by its name */
-pa_operation* pa_context_set_sink_volume_by_name(pa_context *c, const char *name, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
-
-/** Set the mute switch of a sink device specified by its index \since 0.8 */
-pa_operation* pa_context_set_sink_mute_by_index(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata);
-
-/** Set the mute switch of a sink device specified by its name \since 0.8 */
-pa_operation* pa_context_set_sink_mute_by_name(pa_context *c, const char *name, int mute, pa_context_success_cb_t cb, void *userdata);
+/** Move the specified source output to a different source. \since 0.9.5 */
+pa_operation* pa_context_move_source_output_by_name(pa_context *c, uint32_t idx, const char *source_name, pa_context_success_cb_t cb, void* userdata);
-/** Set the volume of a sink input stream */
-pa_operation* pa_context_set_sink_input_volume(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+/** Move the specified source output to a different source. \since 0.9.5 */
+pa_operation* pa_context_move_source_output_by_index(pa_context *c, uint32_t idx, uint32_t source_idx, pa_context_success_cb_t cb, void* userdata);
-/** Set the mute switch of a sink input stream \since 0.9.7 */
-pa_operation* pa_context_set_sink_input_mute(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata);
+/** Suspend/Resume a source. \since 0.9.7 */
+pa_operation* pa_context_suspend_source_by_name(pa_context *c, const char *source_name, int suspend, pa_context_success_cb_t cb, void* userdata);
-/** Set the volume of a source device specified by its index \since 0.8 */
-pa_operation* pa_context_set_source_volume_by_index(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+/** Suspend/Resume a source. If idx is PA_INVALID_INDEX all sources will be suspended. \since 0.9.7 */
+pa_operation* pa_context_suspend_source_by_index(pa_context *c, uint32_t idx, int suspend, pa_context_success_cb_t cb, void* userdata);
-/** Set the volume of a source device specified by its name \since 0.8 */
-pa_operation* pa_context_set_source_volume_by_name(pa_context *c, const char *name, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+/** Kill a source output. */
+pa_operation* pa_context_kill_source_output(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);
-/** Set the mute switch of a source device specified by its index \since 0.8 */
-pa_operation* pa_context_set_source_mute_by_index(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata);
+/** @} */
-/** Set the mute switch of a source device specified by its name \since 0.8 */
-pa_operation* pa_context_set_source_mute_by_name(pa_context *c, const char *name, int mute, pa_context_success_cb_t cb, void *userdata);
+/** @{ \name Statistics */
-/** Memory block statistics */
+/** Memory block statistics. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_stat_info {
uint32_t memblock_total; /**< Currently allocated memory blocks */
uint32_t memblock_total_size; /**< Currentl total size of allocated memory blocks */
uint32_t memblock_allocated; /**< Allocated memory blocks during the whole lifetime of the daemon */
uint32_t memblock_allocated_size; /**< Total size of all memory blocks allocated during the whole lifetime of the daemon */
- uint32_t scache_size; /**< Total size of all sample cache entries. \since 0.4 */
+ uint32_t scache_size; /**< Total size of all sample cache entries. */
} pa_stat_info;
/** Callback prototype for pa_context_stat() */
@@ -412,7 +511,13 @@ typedef void (*pa_stat_info_cb_t) (pa_context *c, const pa_stat_info *i, void *u
/** Get daemon memory block statistics */
pa_operation* pa_context_stat(pa_context *c, pa_stat_info_cb_t cb, void *userdata);
-/** Stores information about sample cache entries */
+/** @} */
+
+/** @{ \name Cached Samples */
+
+/** Stores information about sample cache entries. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_sample_info {
uint32_t index; /**< Index of this entry */
const char *name; /**< Name of this entry */
@@ -420,9 +525,10 @@ typedef struct pa_sample_info {
pa_sample_spec sample_spec; /**< Sample specification of the sample */
pa_channel_map channel_map; /**< The channel map */
pa_usec_t duration; /**< Duration of this entry */
- uint32_t bytes; /**< Length of this sample in bytes. \since 0.4 */
- int lazy; /**< Non-zero when this is a lazy cache entry. \since 0.5 */
- const char *filename; /**< In case this is a lazy cache entry, the filename for the sound file to be loaded on demand. \since 0.5 */
+ uint32_t bytes; /**< Length of this sample in bytes. */
+ int lazy; /**< Non-zero when this is a lazy cache entry. */
+ const char *filename; /**< In case this is a lazy cache entry, the filename for the sound file to be loaded on demand. */
+ pa_proplist *proplist; /**< Property list for this sample. \since 0.9.11 */
} pa_sample_info;
/** Callback prototype for pa_context_get_sample_info_by_name() and firends */
@@ -437,35 +543,25 @@ pa_operation* pa_context_get_sample_info_by_index(pa_context *c, uint32_t idx, p
/** Get the complete list of samples stored in the daemon. */
pa_operation* pa_context_get_sample_info_list(pa_context *c, pa_sample_info_cb_t cb, void *userdata);
-/** Kill a client. \since 0.5 */
-pa_operation* pa_context_kill_client(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);
-
-/** Kill a sink input. \since 0.5 */
-pa_operation* pa_context_kill_sink_input(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);
-
-/** Kill a source output. \since 0.5 */
-pa_operation* pa_context_kill_source_output(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);
-
-/** Callback prototype for pa_context_load_module() and pa_context_add_autoload() */
-typedef void (*pa_context_index_cb_t)(pa_context *c, uint32_t idx, void *userdata);
+/** @} */
-/** Load a module. \since 0.5 */
-pa_operation* pa_context_load_module(pa_context *c, const char*name, const char *argument, pa_context_index_cb_t cb, void *userdata);
+/** \cond fulldocs */
-/** Unload a module. \since 0.5 */
-pa_operation* pa_context_unload_module(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);
+/** @{ \name Autoload Entries */
-/** Type of an autoload entry. \since 0.5 */
+/** Type of an autoload entry. */
typedef enum pa_autoload_type {
PA_AUTOLOAD_SINK = 0,
PA_AUTOLOAD_SOURCE = 1
} pa_autoload_type_t;
-/** Stores information about autoload entries. \since 0.5 */
+/** Stores information about autoload entries. Please note that this structure
+ * can be extended as part of evolutionary API updates at any time in
+ * any new release. */
typedef struct pa_autoload_info {
uint32_t index; /**< Index of this autoload entry */
const char *name; /**< Name of the sink or source */
- pa_autoload_type_t type; /**< Type of the autoload entry */
+ pa_autoload_type_t type; /**< Type of the autoload entry */
const char *module; /**< Module name to load */
const char *argument; /**< Argument string for module */
} pa_autoload_info;
@@ -473,47 +569,27 @@ typedef struct pa_autoload_info {
/** Callback prototype for pa_context_get_autoload_info_by_name() and firends */
typedef void (*pa_autoload_info_cb_t)(pa_context *c, const pa_autoload_info *i, int eol, void *userdata);
-/** Get info about a specific autoload entry. \since 0.6 */
-pa_operation* pa_context_get_autoload_info_by_name(pa_context *c, const char *name, pa_autoload_type_t type, pa_autoload_info_cb_t cb, void *userdata);
+/** Get info about a specific autoload entry. */
+pa_operation* pa_context_get_autoload_info_by_name(pa_context *c, const char *name, pa_autoload_type_t type, pa_autoload_info_cb_t cb, void *userdata) PA_GCC_DEPRECATED;
-/** Get info about a specific autoload entry. \since 0.6 */
-pa_operation* pa_context_get_autoload_info_by_index(pa_context *c, uint32_t idx, pa_autoload_info_cb_t cb, void *userdata);
+/** Get info about a specific autoload entry. */
+pa_operation* pa_context_get_autoload_info_by_index(pa_context *c, uint32_t idx, pa_autoload_info_cb_t cb, void *userdata) PA_GCC_DEPRECATED;
-/** Get the complete list of autoload entries. \since 0.5 */
-pa_operation* pa_context_get_autoload_info_list(pa_context *c, pa_autoload_info_cb_t cb, void *userdata);
+/** Get the complete list of autoload entries. */
+pa_operation* pa_context_get_autoload_info_list(pa_context *c, pa_autoload_info_cb_t cb, void *userdata) PA_GCC_DEPRECATED;
-/** Add a new autoload entry. \since 0.5 */
-pa_operation* pa_context_add_autoload(pa_context *c, const char *name, pa_autoload_type_t type, const char *module, const char*argument, pa_context_index_cb_t, void* userdata);
+/** Add a new autoload entry. */
+pa_operation* pa_context_add_autoload(pa_context *c, const char *name, pa_autoload_type_t type, const char *module, const char*argument, pa_context_index_cb_t, void* userdata) PA_GCC_DEPRECATED;
-/** Remove an autoload entry. \since 0.6 */
-pa_operation* pa_context_remove_autoload_by_name(pa_context *c, const char *name, pa_autoload_type_t type, pa_context_success_cb_t cb, void* userdata);
+/** Remove an autoload entry. */
+pa_operation* pa_context_remove_autoload_by_name(pa_context *c, const char *name, pa_autoload_type_t type, pa_context_success_cb_t cb, void* userdata) PA_GCC_DEPRECATED;
-/** Remove an autoload entry. \since 0.6 */
-pa_operation* pa_context_remove_autoload_by_index(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void* userdata);
+/** Remove an autoload entry. */
+pa_operation* pa_context_remove_autoload_by_index(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void* userdata) PA_GCC_DEPRECATED;
-/** Move the specified sink input to a different sink. \since 0.9.5 */
-pa_operation* pa_context_move_sink_input_by_name(pa_context *c, uint32_t idx, char *sink_name, pa_context_success_cb_t cb, void* userdata);
+/** @} */
-/** Move the specified sink input to a different sink. \since 0.9.5 */
-pa_operation* pa_context_move_sink_input_by_index(pa_context *c, uint32_t idx, uint32_t sink_idx, pa_context_success_cb_t cb, void* userdata);
-
-/** Move the specified source output to a different source. \since 0.9.5 */
-pa_operation* pa_context_move_source_output_by_name(pa_context *c, uint32_t idx, char *source_name, pa_context_success_cb_t cb, void* userdata);
-
-/** Move the specified source output to a different source. \since 0.9.5 */
-pa_operation* pa_context_move_source_output_by_index(pa_context *c, uint32_t idx, uint32_t source_idx, pa_context_success_cb_t cb, void* userdata);
-
-/** Suspend/Resume a sink. \since 0.9.7 */
-pa_operation* pa_context_suspend_sink_by_name(pa_context *c, char *sink_name, int suspend, pa_context_success_cb_t cb, void* userdata);
-
-/** Suspend/Resume a sink. If idx is PA_INVALID_INDEX all sinks will be suspended. \since 0.9.7 */
-pa_operation* pa_context_suspend_sink_by_index(pa_context *c, uint32_t idx, int suspend, pa_context_success_cb_t cb, void* userdata);
-
-/** Suspend/Resume a source. \since 0.9.7 */
-pa_operation* pa_context_suspend_source_by_name(pa_context *c, char *source_name, int suspend, pa_context_success_cb_t cb, void* userdata);
-
-/** Suspend/Resume a source. If idx is PA_INVALID_INDEX all sources will be suspended. \since 0.9.7 */
-pa_operation* pa_context_suspend_source_by_index(pa_context *c, uint32_t idx, int suspend, pa_context_success_cb_t cb, void* userdata);
+/** \endcond */
PA_C_DECL_END
diff --git a/src/pulse/mainloop-api.c b/src/pulse/mainloop-api.c
index b4b7f07..4b862f9 100644
--- a/src/pulse/mainloop-api.c
+++ b/src/pulse/mainloop-api.c
@@ -1,5 +1,3 @@
-/* $Id: mainloop-api.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -28,8 +26,9 @@
#include <stdlib.h>
#include <pulse/xmalloc.h>
+#include <pulse/gccmacro.h>
+#include <pulse/i18n.h>
-#include <pulsecore/gccmacro.h>
#include <pulsecore/macro.h>
#include "mainloop-api.h"
@@ -52,7 +51,7 @@ static void once_callback(pa_mainloop_api *m, pa_defer_event *e, void *userdata)
m->defer_free(e);
}
-static void free_callback(pa_mainloop_api *m, PA_GCC_UNUSED pa_defer_event *e, void *userdata) {
+static void free_callback(pa_mainloop_api *m, pa_defer_event *e, void *userdata) {
struct once_info *i = userdata;
pa_assert(m);
@@ -67,6 +66,8 @@ void pa_mainloop_api_once(pa_mainloop_api* m, void (*callback)(pa_mainloop_api *
pa_assert(m);
pa_assert(callback);
+ pa_init_i18n();
+
i = pa_xnew(struct once_info, 1);
i->callback = callback;
i->userdata = userdata;
@@ -75,4 +76,3 @@ void pa_mainloop_api_once(pa_mainloop_api* m, void (*callback)(pa_mainloop_api *
pa_assert_se(e = m->defer_new(m, once_callback, i));
m->defer_set_destroy(e, free_callback);
}
-
diff --git a/src/pulse/mainloop-api.h b/src/pulse/mainloop-api.h
index 9a21e0b..53c7411 100644
--- a/src/pulse/mainloop-api.h
+++ b/src/pulse/mainloop-api.h
@@ -1,8 +1,6 @@
#ifndef foomainloopapihfoo
#define foomainloopapihfoo
-/* $Id: mainloop-api.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c
index 5be995d..d09f4b0 100644
--- a/src/pulse/mainloop-signal.c
+++ b/src/pulse/mainloop-signal.c
@@ -1,9 +1,7 @@
-/* $Id: mainloop-signal.c 2004 2007-10-30 18:35:08Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio is free software; you can redistribute it and/or modify
@@ -39,11 +37,12 @@
#endif
#include <pulse/xmalloc.h>
+#include <pulse/gccmacro.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core-util.h>
#include <pulsecore/log.h>
-#include <pulsecore/gccmacro.h>
#include <pulsecore/macro.h>
#include "mainloop-signal.h"
@@ -55,9 +54,9 @@ struct pa_signal_event {
#else
void (*saved_handler)(int sig);
#endif
- void (*callback) (pa_mainloop_api*a, pa_signal_event *e, int sig, void *userdata);
void *userdata;
- void (*destroy_callback) (pa_mainloop_api*a, pa_signal_event*e, void *userdata);
+ pa_signal_cb_t callback;
+ pa_signal_destroy_cb_t destroy_callback;
pa_signal_event *previous, *next;
};
@@ -74,6 +73,7 @@ static void signal_handler(int sig) {
#ifndef HAVE_SIGACTION
signal(sig, signal_handler);
#endif
+
pa_write(signal_pipe[1], &sig, sizeof(sig), NULL);
errno = saved_errno;
@@ -90,7 +90,7 @@ static void dispatch(pa_mainloop_api*a, int sig) {
}
}
-static void callback(pa_mainloop_api*a, pa_io_event*e, int fd, pa_io_event_flags_t f, PA_GCC_UNUSED void *userdata) {
+static void callback(pa_mainloop_api*a, pa_io_event*e, int fd, pa_io_event_flags_t f, void *userdata) {
ssize_t r;
int sig;
@@ -142,23 +142,21 @@ int pa_signal_init(pa_mainloop_api *a) {
}
void pa_signal_done(void) {
- pa_assert(api);
- pa_assert(signal_pipe[0] >= 0);
- pa_assert(signal_pipe[1] >= 0);
- pa_assert(io_event);
-
while (signals)
pa_signal_free(signals);
- api->io_free(io_event);
- io_event = NULL;
+ if (io_event) {
+ pa_assert(api);
+ api->io_free(io_event);
+ io_event = NULL;
+ }
pa_close_pipe(signal_pipe);
api = NULL;
}
-pa_signal_event* pa_signal_new(int sig, void (*_callback) (pa_mainloop_api *api, pa_signal_event*e, int sig, void *userdata), void *userdata) {
+pa_signal_event* pa_signal_new(int sig, pa_signal_cb_t _callback, void *userdata) {
pa_signal_event *e = NULL;
#ifdef HAVE_SIGACTION
@@ -168,6 +166,8 @@ pa_signal_event* pa_signal_new(int sig, void (*_callback) (pa_mainloop_api *api,
pa_assert(sig > 0);
pa_assert(_callback);
+ pa_init_i18n();
+
for (e = signals; e; e = e->next)
if (e->sig == sig)
goto fail;
@@ -223,7 +223,7 @@ void pa_signal_free(pa_signal_event *e) {
pa_xfree(e);
}
-void pa_signal_set_destroy(pa_signal_event *e, void (*_callback) (pa_mainloop_api *api, pa_signal_event*e, void *userdata)) {
+void pa_signal_set_destroy(pa_signal_event *e, pa_signal_destroy_cb_t _callback) {
pa_assert(e);
e->destroy_callback = _callback;
diff --git a/src/pulse/mainloop-signal.h b/src/pulse/mainloop-signal.h
index fc2f6ff..a6c16f2 100644
--- a/src/pulse/mainloop-signal.h
+++ b/src/pulse/mainloop-signal.h
@@ -1,12 +1,10 @@
#ifndef foomainloopsignalhfoo
#define foomainloopsignalhfoo
-/* $Id: mainloop-signal.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio is free software; you can redistribute it and/or modify
@@ -39,23 +37,27 @@ PA_C_DECL_BEGIN
* signals. However, you may hook signal support into an abstract main loop via the routines defined herein.
*/
+/** An opaque UNIX signal event source object */
+typedef struct pa_signal_event pa_signal_event;
+
+typedef void (*pa_signal_cb_t) (pa_mainloop_api *api, pa_signal_event*e, int sig, void *userdata);
+
+typedef void (*pa_signal_destroy_cb_t) (pa_mainloop_api *api, pa_signal_event*e, void *userdata);
+
/** Initialize the UNIX signal subsystem and bind it to the specified main loop */
int pa_signal_init(pa_mainloop_api *api);
/** Cleanup the signal subsystem */
void pa_signal_done(void);
-/** An opaque UNIX signal event source object */
-typedef struct pa_signal_event pa_signal_event;
-
/** Create a new UNIX signal event source object */
-pa_signal_event* pa_signal_new(int sig, void (*callback) (pa_mainloop_api *api, pa_signal_event*e, int sig, void *userdata), void *userdata);
+pa_signal_event* pa_signal_new(int sig, pa_signal_cb_t callback, void *userdata);
/** Free a UNIX signal event source object */
void pa_signal_free(pa_signal_event *e);
/** Set a function that is called when the signal event source is destroyed. Use this to free the userdata argument if required */
-void pa_signal_set_destroy(pa_signal_event *e, void (*callback) (pa_mainloop_api *api, pa_signal_event*e, void *userdata));
+void pa_signal_set_destroy(pa_signal_event *e, pa_signal_destroy_cb_t callback);
PA_C_DECL_END
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 11bed97..60e5d1f 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -1,5 +1,3 @@
-/* $Id: mainloop.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -46,6 +44,7 @@
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/llist.h>
@@ -58,7 +57,7 @@
struct pa_io_event {
pa_mainloop *mainloop;
- int dead;
+ pa_bool_t dead:1;
int fd;
pa_io_event_flags_t events;
@@ -73,9 +72,9 @@ struct pa_io_event {
struct pa_time_event {
pa_mainloop *mainloop;
- int dead;
+ pa_bool_t dead:1;
- int enabled;
+ pa_bool_t enabled:1;
struct timeval timeval;
pa_time_event_cb_t callback;
@@ -87,9 +86,9 @@ struct pa_time_event {
struct pa_defer_event {
pa_mainloop *mainloop;
- int dead;
+ pa_bool_t dead:1;
- int enabled;
+ pa_bool_t enabled:1;
pa_defer_event_cb_t callback;
void *userdata;
@@ -103,22 +102,24 @@ struct pa_mainloop {
PA_LLIST_HEAD(pa_time_event, time_events);
PA_LLIST_HEAD(pa_defer_event, defer_events);
- int n_enabled_defer_events, n_enabled_time_events, n_io_events;
- int io_events_please_scan, time_events_please_scan, defer_events_please_scan;
+ unsigned n_enabled_defer_events, n_enabled_time_events, n_io_events;
+ unsigned io_events_please_scan, time_events_please_scan, defer_events_please_scan;
+ pa_bool_t rebuild_pollfds:1;
struct pollfd *pollfds;
unsigned max_pollfds, n_pollfds;
- int rebuild_pollfds;
int prepared_timeout;
pa_time_event *cached_next_time_event;
- int quit, retval;
pa_mainloop_api api;
+ int retval;
+ pa_bool_t quit:1;
+
+ pa_bool_t wakeup_requested:1;
int wakeup_pipe[2];
int wakeup_pipe_type;
- int wakeup_requested;
enum {
STATE_PASSIVE,
@@ -134,11 +135,11 @@ struct pa_mainloop {
};
static short map_flags_to_libc(pa_io_event_flags_t flags) {
- return
- (flags & PA_IO_EVENT_INPUT ? POLLIN : 0) |
- (flags & PA_IO_EVENT_OUTPUT ? POLLOUT : 0) |
- (flags & PA_IO_EVENT_ERROR ? POLLERR : 0) |
- (flags & PA_IO_EVENT_HANGUP ? POLLHUP : 0);
+ return (short)
+ ((flags & PA_IO_EVENT_INPUT ? POLLIN : 0) |
+ (flags & PA_IO_EVENT_OUTPUT ? POLLOUT : 0) |
+ (flags & PA_IO_EVENT_ERROR ? POLLERR : 0) |
+ (flags & PA_IO_EVENT_HANGUP ? POLLHUP : 0));
}
static pa_io_event_flags_t map_flags_from_libc(short flags) {
@@ -170,7 +171,7 @@ static pa_io_event* mainloop_io_new(
e = pa_xnew(pa_io_event, 1);
e->mainloop = m;
- e->dead = 0;
+ e->dead = FALSE;
e->fd = fd;
e->events = events;
@@ -195,13 +196,13 @@ static pa_io_event* mainloop_io_new(
SELECT_TYPE_ARG5 &tv) == -1) &&
(WSAGetLastError() == WSAENOTSOCK)) {
pa_log_warn("Cannot monitor non-socket file descriptors.");
- e->dead = 1;
+ e->dead = TRUE;
}
}
#endif
PA_LLIST_PREPEND(pa_io_event, m->io_events, e);
- m->rebuild_pollfds = 1;
+ m->rebuild_pollfds = TRUE;
m->n_io_events ++;
pa_mainloop_wakeup(m);
@@ -221,7 +222,7 @@ static void mainloop_io_enable(pa_io_event *e, pa_io_event_flags_t events) {
if (e->pollfd)
e->pollfd->events = map_flags_to_libc(events);
else
- e->mainloop->rebuild_pollfds = 1;
+ e->mainloop->rebuild_pollfds = TRUE;
pa_mainloop_wakeup(e->mainloop);
}
@@ -230,11 +231,11 @@ static void mainloop_io_free(pa_io_event *e) {
pa_assert(e);
pa_assert(!e->dead);
- e->dead = 1;
+ e->dead = TRUE;
e->mainloop->io_events_please_scan ++;
e->mainloop->n_io_events --;
- e->mainloop->rebuild_pollfds = 1;
+ e->mainloop->rebuild_pollfds = TRUE;
pa_mainloop_wakeup(e->mainloop);
}
@@ -263,9 +264,9 @@ static pa_defer_event* mainloop_defer_new(
e = pa_xnew(pa_defer_event, 1);
e->mainloop = m;
- e->dead = 0;
+ e->dead = FALSE;
- e->enabled = 1;
+ e->enabled = TRUE;
m->n_enabled_defer_events++;
e->callback = callback;
@@ -298,13 +299,13 @@ static void mainloop_defer_free(pa_defer_event *e) {
pa_assert(e);
pa_assert(!e->dead);
- e->dead = 1;
+ e->dead = TRUE;
e->mainloop->defer_events_please_scan ++;
if (e->enabled) {
pa_assert(e->mainloop->n_enabled_defer_events > 0);
e->mainloop->n_enabled_defer_events--;
- e->enabled = 0;
+ e->enabled = FALSE;
}
}
@@ -334,7 +335,7 @@ static pa_time_event* mainloop_time_new(
e = pa_xnew(pa_time_event, 1);
e->mainloop = m;
- e->dead = 0;
+ e->dead = FALSE;
if ((e->enabled = !!tv)) {
e->timeval = *tv;
@@ -389,13 +390,13 @@ static void mainloop_time_free(pa_time_event *e) {
pa_assert(e);
pa_assert(!e->dead);
- e->dead = 1;
+ e->dead = TRUE;
e->mainloop->time_events_please_scan ++;
if (e->enabled) {
pa_assert(e->mainloop->n_enabled_time_events > 0);
e->mainloop->n_enabled_time_events--;
- e->enabled = 0;
+ e->enabled = FALSE;
}
if (e->mainloop->cached_next_time_event == e)
@@ -448,6 +449,8 @@ static const pa_mainloop_api vtable = {
pa_mainloop *pa_mainloop_new(void) {
pa_mainloop *m;
+ pa_init_i18n();
+
m = pa_xnew(pa_mainloop, 1);
m->wakeup_pipe_type = 0;
@@ -461,7 +464,7 @@ pa_mainloop *pa_mainloop_new(void) {
pa_make_fd_nonblock(m->wakeup_pipe[1]);
pa_make_fd_cloexec(m->wakeup_pipe[0]);
pa_make_fd_cloexec(m->wakeup_pipe[1]);
- m->wakeup_requested = 0;
+ m->wakeup_requested = FALSE;
PA_LLIST_HEAD_INIT(pa_io_event, m->io_events);
PA_LLIST_HEAD_INIT(pa_time_event, m->time_events);
@@ -475,9 +478,10 @@ pa_mainloop *pa_mainloop_new(void) {
m->pollfds = NULL;
m->max_pollfds = m->n_pollfds = 0;
- m->rebuild_pollfds = 1;
+ m->rebuild_pollfds = TRUE;
- m->quit = m->retval = 0;
+ m->quit = FALSE;
+ m->retval = 0;
m->api = vtable;
m->api.userdata = m;
@@ -491,7 +495,7 @@ pa_mainloop *pa_mainloop_new(void) {
return m;
}
-static void cleanup_io_events(pa_mainloop *m, int force) {
+static void cleanup_io_events(pa_mainloop *m, pa_bool_t force) {
pa_io_event *e;
e = m->io_events;
@@ -514,7 +518,7 @@ static void cleanup_io_events(pa_mainloop *m, int force) {
pa_xfree(e);
- m->rebuild_pollfds = 1;
+ m->rebuild_pollfds = TRUE;
}
e = n;
@@ -523,7 +527,7 @@ static void cleanup_io_events(pa_mainloop *m, int force) {
pa_assert(m->io_events_please_scan == 0);
}
-static void cleanup_time_events(pa_mainloop *m, int force) {
+static void cleanup_time_events(pa_mainloop *m, pa_bool_t force) {
pa_time_event *e;
e = m->time_events;
@@ -544,7 +548,7 @@ static void cleanup_time_events(pa_mainloop *m, int force) {
if (!e->dead && e->enabled) {
pa_assert(m->n_enabled_time_events > 0);
m->n_enabled_time_events--;
- e->enabled = 0;
+ e->enabled = FALSE;
}
if (e->destroy_callback)
@@ -559,7 +563,7 @@ static void cleanup_time_events(pa_mainloop *m, int force) {
pa_assert(m->time_events_please_scan == 0);
}
-static void cleanup_defer_events(pa_mainloop *m, int force) {
+static void cleanup_defer_events(pa_mainloop *m, pa_bool_t force) {
pa_defer_event *e;
e = m->defer_events;
@@ -580,7 +584,7 @@ static void cleanup_defer_events(pa_mainloop *m, int force) {
if (!e->dead && e->enabled) {
pa_assert(m->n_enabled_defer_events > 0);
m->n_enabled_defer_events--;
- e->enabled = 0;
+ e->enabled = FALSE;
}
if (e->destroy_callback)
@@ -599,9 +603,9 @@ static void cleanup_defer_events(pa_mainloop *m, int force) {
void pa_mainloop_free(pa_mainloop* m) {
pa_assert(m);
- cleanup_io_events(m, 1);
- cleanup_defer_events(m, 1);
- cleanup_time_events(m, 1);
+ cleanup_io_events(m, TRUE);
+ cleanup_defer_events(m, TRUE);
+ cleanup_time_events(m, TRUE);
pa_xfree(m->pollfds);
@@ -614,13 +618,13 @@ static void scan_dead(pa_mainloop *m) {
pa_assert(m);
if (m->io_events_please_scan)
- cleanup_io_events(m, 0);
+ cleanup_io_events(m, FALSE);
if (m->time_events_please_scan)
- cleanup_time_events(m, 0);
+ cleanup_time_events(m, FALSE);
if (m->defer_events_please_scan)
- cleanup_defer_events(m, 0);
+ cleanup_defer_events(m, FALSE);
}
static void rebuild_pollfds(pa_mainloop *m) {
@@ -661,7 +665,7 @@ static void rebuild_pollfds(pa_mainloop *m) {
m->n_pollfds++;
}
- m->rebuild_pollfds = 0;
+ m->rebuild_pollfds = FALSE;
}
static int dispatch_pollfds(pa_mainloop *m) {
@@ -947,7 +951,7 @@ int pa_mainloop_run(pa_mainloop *m, int *retval) {
void pa_mainloop_quit(pa_mainloop *m, int retval) {
pa_assert(m);
- m->quit = 1;
+ m->quit = TRUE;
m->retval = retval;
pa_mainloop_wakeup(m);
}
diff --git a/src/pulse/mainloop.h b/src/pulse/mainloop.h
index 16ee85a..907e94a 100644
--- a/src/pulse/mainloop.h
+++ b/src/pulse/mainloop.h
@@ -1,8 +1,6 @@
#ifndef foomainloophfoo
#define foomainloophfoo
-/* $Id: mainloop.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/operation.c b/src/pulse/operation.c
index f347c81..13b470a 100644
--- a/src/pulse/operation.c
+++ b/src/pulse/operation.c
@@ -1,5 +1,3 @@
-/* $Id: operation.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -77,6 +75,23 @@ void pa_operation_unref(pa_operation *o) {
}
}
+static void operation_unlink(pa_operation *o) {
+ pa_assert(o);
+
+ if (o->context) {
+ pa_assert(PA_REFCNT_VALUE(o) >= 2);
+
+ PA_LLIST_REMOVE(pa_operation, o->context->operations, o);
+ pa_operation_unref(o);
+
+ o->context = NULL;
+ }
+
+ o->stream = NULL;
+ o->callback = NULL;
+ o->userdata = NULL;
+}
+
static void operation_set_state(pa_operation *o, pa_operation_state_t st) {
pa_assert(o);
pa_assert(PA_REFCNT_VALUE(o) >= 1);
@@ -88,20 +103,8 @@ static void operation_set_state(pa_operation *o, pa_operation_state_t st) {
o->state = st;
- if ((o->state == PA_OPERATION_DONE) || (o->state == PA_OPERATION_CANCELED)) {
-
- if (o->context) {
- pa_assert(PA_REFCNT_VALUE(o) >= 2);
-
- PA_LLIST_REMOVE(pa_operation, o->context->operations, o);
- pa_operation_unref(o);
- }
-
- o->context = NULL;
- o->stream = NULL;
- o->callback = NULL;
- o->userdata = NULL;
- }
+ if ((o->state == PA_OPERATION_DONE) || (o->state == PA_OPERATION_CANCELED))
+ operation_unlink(o);
pa_operation_unref(o);
}
diff --git a/src/pulse/operation.h b/src/pulse/operation.h
index 406d047..188e2cb 100644
--- a/src/pulse/operation.h
+++ b/src/pulse/operation.h
@@ -1,8 +1,6 @@
#ifndef foooperationhfoo
#define foooperationhfoo
-/* $Id: operation.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/proplist.c b/src/pulse/proplist.c
new file mode 100644
index 0000000..93bc003
--- /dev/null
+++ b/src/pulse/proplist.c
@@ -0,0 +1,324 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2007 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <pulse/xmalloc.h>
+#include <pulse/utf8.h>
+#include <pulse/i18n.h>
+
+#include <pulsecore/hashmap.h>
+#include <pulsecore/strbuf.h>
+#include <pulsecore/core-util.h>
+
+#include "proplist.h"
+
+struct property {
+ char *key;
+ void *value;
+ size_t nbytes;
+};
+
+#define MAKE_HASHMAP(p) ((pa_hashmap*) (p))
+#define MAKE_PROPLIST(p) ((pa_proplist*) (p))
+
+static pa_bool_t property_name_valid(const char *key) {
+
+ if (!pa_utf8_valid(key))
+ return FALSE;
+
+ if (strlen(key) <= 0)
+ return FALSE;
+
+ return TRUE;
+}
+
+static void property_free(struct property *prop) {
+ pa_assert(prop);
+
+ pa_xfree(prop->key);
+ pa_xfree(prop->value);
+ pa_xfree(prop);
+}
+
+pa_proplist* pa_proplist_new(void) {
+ pa_init_i18n();
+
+ return MAKE_PROPLIST(pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func));
+}
+
+void pa_proplist_free(pa_proplist* p) {
+ pa_assert(p);
+
+ pa_proplist_clear(p);
+ pa_hashmap_free(MAKE_HASHMAP(p), NULL, NULL);
+}
+
+/** Will accept only valid UTF-8 */
+int pa_proplist_sets(pa_proplist *p, const char *key, const char *value) {
+ struct property *prop;
+ pa_bool_t add = FALSE;
+
+ pa_assert(p);
+ pa_assert(key);
+
+ if (!property_name_valid(key) || !pa_utf8_valid(value))
+ return -1;
+
+ if (!(prop = pa_hashmap_get(MAKE_HASHMAP(p), key))) {
+ prop = pa_xnew(struct property, 1);
+ prop->key = pa_xstrdup(key);
+ add = TRUE;
+ } else
+ pa_xfree(prop->value);
+
+ prop->value = pa_xstrdup(value);
+ prop->nbytes = strlen(value)+1;
+
+ if (add)
+ pa_hashmap_put(MAKE_HASHMAP(p), prop->key, prop);
+
+ return 0;
+}
+
+/** Will accept only valid UTF-8 */
+int pa_proplist_setf(pa_proplist *p, const char *key, const char *format, ...) {
+ va_list ap;
+ int r;
+ char *t;
+
+ pa_assert(p);
+ pa_assert(key);
+
+ if (!property_name_valid(key) || !pa_utf8_valid(format))
+ return -1;
+
+ va_start(ap, format);
+ t = pa_vsprintf_malloc(format, ap);
+ va_end(ap);
+
+ r = pa_proplist_sets(p, key, t);
+
+ pa_xfree(t);
+ return r;
+}
+
+int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes) {
+ struct property *prop;
+ pa_bool_t add = FALSE;
+
+ pa_assert(p);
+ pa_assert(key);
+
+ if (!property_name_valid(key))
+ return -1;
+
+ if (!(prop = pa_hashmap_get(MAKE_HASHMAP(p), key))) {
+ prop = pa_xnew(struct property, 1);
+ prop->key = pa_xstrdup(key);
+ add = TRUE;
+ } else
+ pa_xfree(prop->value);
+
+ prop->value = pa_xmemdup(data, nbytes);
+ prop->nbytes = nbytes;
+
+ if (add)
+ pa_hashmap_put(MAKE_HASHMAP(p), prop->key, prop);
+
+ return 0;
+}
+
+const char *pa_proplist_gets(pa_proplist *p, const char *key) {
+ struct property *prop;
+
+ pa_assert(p);
+ pa_assert(key);
+
+ if (!property_name_valid(key))
+ return NULL;
+
+ if (!(prop = pa_hashmap_get(MAKE_HASHMAP(p), key)))
+ return NULL;
+
+ if (prop->nbytes <= 0)
+ return NULL;
+
+ if (((char*) prop->value)[prop->nbytes-1] != 0)
+ return NULL;
+
+ if (strlen((char*) prop->value) != prop->nbytes-1)
+ return NULL;
+
+ if (!pa_utf8_valid((char*) prop->value))
+ return NULL;
+
+ return (char*) prop->value;
+}
+
+int pa_proplist_get(pa_proplist *p, const char *key, const void **data, size_t *nbytes) {
+ struct property *prop;
+
+ pa_assert(p);
+ pa_assert(key);
+
+ if (!property_name_valid(key))
+ return -1;
+
+ if (!(prop = pa_hashmap_get(MAKE_HASHMAP(p), key)))
+ return -1;
+
+ *data = prop->value;
+ *nbytes = prop->nbytes;
+
+ return 0;
+}
+
+void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, pa_proplist *other) {
+ struct property *prop;
+ void *state = NULL;
+
+ pa_assert(p);
+ pa_assert(mode == PA_UPDATE_SET || mode == PA_UPDATE_MERGE || mode == PA_UPDATE_REPLACE);
+ pa_assert(other);
+
+ if (mode == PA_UPDATE_SET)
+ pa_proplist_clear(p);
+
+ while ((prop = pa_hashmap_iterate(MAKE_HASHMAP(other), &state, NULL))) {
+
+ if (mode == PA_UPDATE_MERGE && pa_proplist_contains(p, prop->key))
+ continue;
+
+ pa_assert_se(pa_proplist_set(p, prop->key, prop->value, prop->nbytes) == 0);
+ }
+}
+
+int pa_proplist_unset(pa_proplist *p, const char *key) {
+ struct property *prop;
+
+ pa_assert(p);
+ pa_assert(key);
+
+ if (!property_name_valid(key))
+ return -1;
+
+ if (!(prop = pa_hashmap_remove(MAKE_HASHMAP(p), key)))
+ return -2;
+
+ property_free(prop);
+ return 0;
+}
+
+int pa_proplist_unset_many(pa_proplist *p, const char * const keys[]) {
+ const char * const * k;
+ int n = 0;
+
+ pa_assert(p);
+ pa_assert(keys);
+
+ for (k = keys; *k; k++)
+ if (!property_name_valid(*k))
+ return -1;
+
+ for (k = keys; *k; k++)
+ if (pa_proplist_unset(p, *k) >= 0)
+ n++;
+
+ return n;
+}
+
+const char *pa_proplist_iterate(pa_proplist *p, void **state) {
+ struct property *prop;
+
+ if (!(prop = pa_hashmap_iterate(MAKE_HASHMAP(p), state, NULL)))
+ return NULL;
+
+ return prop->key;
+}
+
+char *pa_proplist_to_string(pa_proplist *p) {
+ const char *key;
+ void *state = NULL;
+ pa_strbuf *buf;
+
+ pa_assert(p);
+
+ buf = pa_strbuf_new();
+
+ while ((key = pa_proplist_iterate(p, &state))) {
+
+ const char *v;
+
+ if ((v = pa_proplist_gets(p, key)))
+ pa_strbuf_printf(buf, "%s = \"%s\"\n", key, v);
+ else {
+ const void *value;
+ size_t nbytes;
+ char *c;
+
+ pa_assert_se(pa_proplist_get(p, key, &value, &nbytes) == 0);
+ c = pa_xmalloc(nbytes*2+1);
+ pa_hexstr((const uint8_t*) value, nbytes, c, nbytes*2+1);
+
+ pa_strbuf_printf(buf, "%s = hex:%s\n", key, c);
+ pa_xfree(c);
+ }
+ }
+
+ return pa_strbuf_tostring_free(buf);
+}
+
+int pa_proplist_contains(pa_proplist *p, const char *key) {
+ pa_assert(p);
+ pa_assert(key);
+
+ if (!property_name_valid(key))
+ return -1;
+
+ if (!(pa_hashmap_get(MAKE_HASHMAP(p), key)))
+ return 0;
+
+ return 1;
+}
+
+void pa_proplist_clear(pa_proplist *p) {
+ struct property *prop;
+ pa_assert(p);
+
+ while ((prop = pa_hashmap_steal_first(MAKE_HASHMAP(p))))
+ property_free(prop);
+}
+
+pa_proplist* pa_proplist_copy(pa_proplist *template) {
+ pa_proplist *p;
+
+ pa_assert_se(p = pa_proplist_new());
+
+ if (template)
+ pa_proplist_update(p, PA_UPDATE_REPLACE, template);
+
+ return p;
+}
diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h
new file mode 100644
index 0000000..c23ef23
--- /dev/null
+++ b/src/pulse/proplist.h
@@ -0,0 +1,229 @@
+#ifndef foopulseproplisthfoo
+#define foopulseproplisthfoo
+
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2007 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#include <sys/types.h>
+
+#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
+
+PA_C_DECL_BEGIN
+
+/* Defined properties:
+ *
+ * media.name "Guns'N'Roses: Civil War"
+ * media.title "Civil War"
+ * media.artist "Guns'N'Roses"
+ * media.language "de_DE"
+ * media.filename
+ * media.icon Binary blob containing PNG icon data
+ * media.icon_name Name from XDG icon naming spec
+ * media.role video, music, game, event, phone, production, filter, abstract, stream
+ * event.id Name from XDG sound naming spec
+ * event.description "Button blabla clicked" for a11y
+ * event.mouse.x
+ * event.mouse.y
+ * event.mouse.hpos Float formatted as string in range 0..1
+ * event.mouse.vpos Float formatted as string in range 0..1
+ * event.mouse.button Button number following X11 ordering
+ * window.name
+ * window.id "org.gnome.rhytmbox.MainWindow"
+ * window.icon Binary blob containing PNG icon data
+ * window.icon_name Name from XDG icon naming spec
+ * window.x11.display
+ * window.x11.screen
+ * window.x11.monitor
+ * window.x11.xid
+ * application.name "Rhythmbox Media Player"
+ * application.id "org.gnome.rhythmbox"
+ * application.version
+ * application.icon Binary blob containing PNG icon data
+ * application.icon_name Name from XDG icon naming spec
+ * application.language
+ * application.process.id
+ * application.process.binary
+ * application.process.user
+ * application.process.host
+ * device.string
+ * device.api oss, alsa, sunaudio
+ * device.description
+ * device.bus_path
+ * device.serial
+ * device.vendor_product_id
+ * device.class sound, modem, monitor, filter, abstract
+ * device.form_factor laptop-speakers, external-speakers, telephone, tv-capture, webcam-capture, microphone-capture, headset
+ * device.connector isa, pci, usb, firewire, bluetooth
+ * device.access_mode mmap, mmap_rewrite, serial
+ * device.master_device
+ * device.bufferin.buffer_size
+ * device.bufferin.fragment_size
+ */
+#define PA_PROP_MEDIA_NAME "media.name"
+#define PA_PROP_MEDIA_TITLE "media.title"
+#define PA_PROP_MEDIA_ARTIST "media.artist"
+#define PA_PROP_MEDIA_LANGUAGE "media.language"
+#define PA_PROP_MEDIA_FILENAME "media.filename"
+#define PA_PROP_MEDIA_ICON "media.icon"
+#define PA_PROP_MEDIA_ICON_NAME "media.icon_name"
+#define PA_PROP_MEDIA_ROLE "media.role"
+#define PA_PROP_EVENT_ID "event.id"
+#define PA_PROP_EVENT_DESCRIPTION "event.description"
+#define PA_PROP_EVENT_MOUSE_X "event.mouse.x"
+#define PA_PROP_EVENT_MOUSE_Y "event.mouse.y"
+#define PA_PROP_EVENT_MOUSE_HPOS "event.mouse.hpos"
+#define PA_PROP_EVENT_MOUSE_VPOS "event.mouse.vpos"
+#define PA_PROP_EVENT_MOUSE_BUTTON "event.mouse.button"
+#define PA_PROP_WINDOW_NAME "window.name"
+#define PA_PROP_WINDOW_ID "window.id"
+#define PA_PROP_WINDOW_ICON "window.icon"
+#define PA_PROP_WINDOW_ICON_NAME "window.icon_name"
+#define PA_PROP_WINDOW_X11_DISPLAY "window.x11.display"
+#define PA_PROP_WINDOW_X11_SCREEN "window.x11.screen"
+#define PA_PROP_WINDOW_X11_MONITOR "window.x11.monitor"
+#define PA_PROP_WINDOW_X11_XID "window.x11.xid"
+#define PA_PROP_APPLICATION_NAME "application.name"
+#define PA_PROP_APPLICATION_ID "application.id"
+#define PA_PROP_APPLICATION_VERSION "application.version"
+#define PA_PROP_APPLICATION_ICON "application.icon"
+#define PA_PROP_APPLICATION_ICON_NAME "application.icon_name"
+#define PA_PROP_APPLICATION_LANGUAGE "application.language"
+#define PA_PROP_APPLICATION_PROCESS_ID "application.process.id"
+#define PA_PROP_APPLICATION_PROCESS_BINARY "application.process.binary"
+#define PA_PROP_APPLICATION_PROCESS_USER "application.process.user"
+#define PA_PROP_APPLICATION_PROCESS_HOST "application.process.host"
+#define PA_PROP_DEVICE_STRING "device.string"
+#define PA_PROP_DEVICE_API "device.api"
+#define PA_PROP_DEVICE_DESCRIPTION "device.description"
+#define PA_PROP_DEVICE_BUS_PATH "device.bus_path"
+#define PA_PROP_DEVICE_SERIAL "device.serial"
+#define PA_PROP_DEVICE_VENDOR_PRODUCT_ID "device.vendor_product_id"
+#define PA_PROP_DEVICE_CLASS "device.class"
+#define PA_PROP_DEVICE_FORM_FACTOR "device.form_factor"
+#define PA_PROP_DEVICE_CONNECTOR "device.connector"
+#define PA_PROP_DEVICE_ACCESS_MODE "device.access_mode"
+#define PA_PROP_DEVICE_MASTER_DEVICE "device.master_device"
+#define PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE "device.buffering.buffer_size"
+#define PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE "device.buffering.fragment_size"
+
+/** A property list object. Basically a dictionary with UTF-8 strings
+ * as keys and arbitrary data as values. \since 0.9.11 */
+typedef struct pa_proplist pa_proplist;
+
+/** Allocate a property list. \since 0.9.11 */
+pa_proplist* pa_proplist_new(void);
+
+/** Free the property list. \since 0.9.11 */
+void pa_proplist_free(pa_proplist* p);
+
+/** Append a new string entry to the property list, possibly
+ * overwriting an already existing entry with the same key. An
+ * internal copy of the data passed is made. Will accept only valid
+ * UTF-8. \since 0.9.11 */
+int pa_proplist_sets(pa_proplist *p, const char *key, const char *value);
+
+/** Append a new string entry to the property list, possibly
+ * overwriting an already existing entry with the same key. An
+ * internal copy of the data passed is made. Will accept only valid
+ * UTF-8. The data can be passed as printf()-style format string with
+ * arguments. \since 0.9.11 */
+int pa_proplist_setf(pa_proplist *p, const char *key, const char *format, ...) PA_GCC_PRINTF_ATTR(3,4);
+
+/** Append a new arbitrary data entry to the property list, possibly
+ * overwriting an already existing entry with the same key. An
+ * internal copy of the data passed is made. \since 0.9.11 */
+int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes);
+
+/* Return a string entry for the specified key. Will return NULL if
+ * the data is not valid UTF-8. Will return a NUL-terminated string in
+ * an internally allocated buffer. The caller should make a copy of
+ * the data before accessing the property list again. \since 0.9.11 */
+const char *pa_proplist_gets(pa_proplist *p, const char *key);
+
+/** Return the the value for the specified key. Will return a
+ * NUL-terminated string for string entries. The pointer returned will
+ * point to an internally allocated buffer. The caller should make a
+ * copy of the data before the property list is accessed again. \since
+ * 0.9.11 */
+int pa_proplist_get(pa_proplist *p, const char *key, const void **data, size_t *nbytes);
+
+/** Update mode enum for pa_proplist_update(). \since 0.9.11 */
+typedef enum pa_update_mode {
+ PA_UPDATE_SET,
+ /*< Replace the entirey property list with the new one. Don't keep
+ * any of the old data around */
+
+ PA_UPDATE_MERGE,
+ /*< Merge new property list into the existing one, not replacing
+ * any old entries if they share a common key with the new
+ * property list. */
+
+ PA_UPDATE_REPLACE
+ /*< Merge new property list into the existing one, replacing all
+ * old entries that share a common key with the new property
+ * list. */
+} pa_update_mode_t;
+
+/** Merge property list "other" into "p", adhering the merge mode as
+ * specified in "mode". \since 0.9.11 */
+void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, pa_proplist *other);
+
+/** Removes a single entry from the property list, identified be the
+ * specified key name. \since 0.9.11 */
+int pa_proplist_unset(pa_proplist *p, const char *key);
+
+/** Similar to pa_proplist_remove() but takes an array of keys to
+ * remove. The array should be terminated by a NULL pointer. Return -1
+ * on failure, otherwise the number of entries actually removed (which
+ * might even be 0, if there where no matching entries to
+ * remove). \since 0.9.11 */
+int pa_proplist_unset_many(pa_proplist *p, const char * const keys[]);
+
+/** Iterate through the property list. The user should allocate a
+ * state variable of type void* and initialize it with NULL. A pointer
+ * to this variable should then be passed to pa_proplist_iterate()
+ * which should be called in a loop until it returns NULL which
+ * signifies EOL. The property list should not be modified during
+ * iteration through the list -- except for deleting the current
+ * looked at entry. On each invication this function will return the
+ * key string for the next entry. The keys in the property list do not
+ * have any particular order. \since 0.9.11 */
+const char *pa_proplist_iterate(pa_proplist *p, void **state);
+
+/** Format the property list nicely as a human readable string. Call pa_xfree() on the result. \since
+ * 0.9.11 */
+char *pa_proplist_to_string(pa_proplist *p);
+
+/** Returns 1 if an entry for the specified key is existant in the
+ * property list. \since 0.9.11 */
+int pa_proplist_contains(pa_proplist *p, const char *key);
+
+/** Remove all entries from the property list object. \since 0.9.11 */
+void pa_proplist_clear(pa_proplist *p);
+
+/** Allocate a new property list and copy over every single entry from
+ * the specific list. \since 0.9.11 */
+pa_proplist* pa_proplist_copy(pa_proplist *t);
+
+PA_C_DECL_END
+
+#endif
diff --git a/src/pulse/pulseaudio.h b/src/pulse/pulseaudio.h
index 1497ce7..e09caca 100644
--- a/src/pulse/pulseaudio.h
+++ b/src/pulse/pulseaudio.h
@@ -1,8 +1,6 @@
#ifndef foopulseaudiohfoo
#define foopulseaudiohfoo
-/* $Id: pulseaudio.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -45,6 +43,7 @@
#include <pulse/mainloop-signal.h>
#include <pulse/util.h>
#include <pulse/timeval.h>
+#include <pulse/proplist.h>
/** \file
* Include all libpulse header files at once. The following
@@ -52,7 +51,7 @@
* \ref context.h, \ref stream.h, \ref introspect.h, \ref subscribe.h,
* \ref scache.h, \ref version.h, \ref error.h, \ref channelmap.h,
* \ref operation.h,\ref volume.h, \ref xmalloc.h, \ref utf8.h, \ref
- * thread-mainloop.h, \ref mainloop.h, \ref util.h, \ref timeval.h and
+ * thread-mainloop.h, \ref mainloop.h, \ref util.h, \ref proplist.h, \ref timeval.h and
* \ref mainloop-signal.h at once */
/** \mainpage
@@ -90,17 +89,17 @@
*
* \section thread_sec Threads
*
- * The PulseAudio client libraries are not designed to be used in a
- * heavily threaded environment. They are however designed to be reentrant
- * safe.
+ * The PulseAudio client libraries are not designed to be directly
+ * thread-safe. They are however designed to be reentrant and
+ * threads-aware.
*
- * To use a the libraries in a threaded environment, you must assure that
+ * To use the libraries in a threaded environment, you must assure that
* all objects are only used in one thread at a time. Normally, this means
* that all objects belonging to a single context must be accessed from the
* same thread.
*
* The included main loop implementation is also not thread safe. Take care
- * to make sure event lists are not manipulated when any other code is
+ * to make sure event objects are not manipulated when any other code is
* using the main loop.
*
* \section pkgconfig pkg-config
diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index 92bff10..2950159 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
@@ -1,5 +1,3 @@
-/* $Id: sample.c 2037 2007-11-09 02:45:07Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,6 +28,9 @@
#include <math.h>
#include <string.h>
+#include <pulse/timeval.h>
+#include <pulse/i18n.h>
+
#include <pulsecore/core-util.h>
#include <pulsecore/macro.h>
@@ -70,13 +71,23 @@ size_t pa_bytes_per_second(const pa_sample_spec *spec) {
pa_usec_t pa_bytes_to_usec(uint64_t length, const pa_sample_spec *spec) {
pa_assert(spec);
- return (pa_usec_t) (((double) length/pa_frame_size(spec)*1000000)/spec->rate);
+ return (((pa_usec_t) (length / pa_frame_size(spec)) * PA_USEC_PER_SEC) / spec->rate);
}
size_t pa_usec_to_bytes(pa_usec_t t, const pa_sample_spec *spec) {
pa_assert(spec);
- return (size_t) (((double) t * spec->rate / 1000000))*pa_frame_size(spec);
+ return (size_t) (((t * spec->rate) / PA_USEC_PER_SEC)) * pa_frame_size(spec);
+}
+
+pa_sample_spec* pa_sample_spec_init(pa_sample_spec *spec) {
+ pa_assert(spec);
+
+ spec->format = PA_SAMPLE_INVALID;
+ spec->rate = 0;
+ spec->channels = 0;
+
+ return spec;
}
int pa_sample_spec_valid(const pa_sample_spec *spec) {
@@ -97,7 +108,10 @@ int pa_sample_spec_equal(const pa_sample_spec*a, const pa_sample_spec*b) {
pa_assert(a);
pa_assert(b);
- return (a->format == b->format) && (a->rate == b->rate) && (a->channels == b->channels);
+ return
+ (a->format == b->format) &&
+ (a->rate == b->rate) &&
+ (a->channels == b->channels);
}
const char *pa_sample_format_to_string(pa_sample_format_t f) {
@@ -124,8 +138,10 @@ char *pa_sample_spec_snprint(char *s, size_t l, const pa_sample_spec *spec) {
pa_assert(l);
pa_assert(spec);
+ pa_init_i18n();
+
if (!pa_sample_spec_valid(spec))
- pa_snprintf(s, l, "Invalid");
+ pa_snprintf(s, l, _("(invalid)"));
else
pa_snprintf(s, l, "%s %uch %uHz", pa_sample_format_to_string(spec->format), spec->channels, spec->rate);
diff --git a/src/pulse/sample.h b/src/pulse/sample.h
index 2df7e2c..3c7dd0e 100644
--- a/src/pulse/sample.h
+++ b/src/pulse/sample.h
@@ -1,8 +1,6 @@
#ifndef foosamplehfoo
#define foosamplehfoo
-/* $Id: sample.h 2157 2008-03-27 23:25:08Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,6 +28,7 @@
#include <sys/param.h>
#include <math.h>
+#include <pulse/gccmacro.h>
#include <pulse/cdecl.h>
/** \page sample Sample Format Specifications
@@ -53,7 +52,7 @@
* \li PA_SAMPLE_S32LE - Signed 32 bit integer PCM, little endian.
* \li PA_SAMPLE_S32BE - Signed 32 bit integer PCM, big endian.
*
- * The floating point sample formats have the range from -1 to 1.
+ * The floating point sample formats have the range from -1.0 to 1.0.
*
* The sample formats that are sensitive to endianness have convenience
* macros for native endian (NE), and reverse endian (RE).
@@ -114,24 +113,45 @@ PA_C_DECL_BEGIN
#endif
/** Maximum number of allowed channels */
-#define PA_CHANNELS_MAX 32
+#define PA_CHANNELS_MAX 32U
/** Maximum allowed sample rate */
-#define PA_RATE_MAX (48000*4)
+#define PA_RATE_MAX (48000U*4U)
/** Sample format */
typedef enum pa_sample_format {
- PA_SAMPLE_U8, /**< Unsigned 8 Bit PCM */
- PA_SAMPLE_ALAW, /**< 8 Bit a-Law */
- PA_SAMPLE_ULAW, /**< 8 Bit mu-Law */
- PA_SAMPLE_S16LE, /**< Signed 16 Bit PCM, little endian (PC) */
- PA_SAMPLE_S16BE, /**< Signed 16 Bit PCM, big endian */
- PA_SAMPLE_FLOAT32LE, /**< 32 Bit IEEE floating point, little endian, range -1 to 1 */
- PA_SAMPLE_FLOAT32BE, /**< 32 Bit IEEE floating point, big endian, range -1 to 1 */
- PA_SAMPLE_S32LE, /**< Signed 32 Bit PCM, little endian (PC) */
- PA_SAMPLE_S32BE, /**< Signed 32 Bit PCM, big endian (PC) */
- PA_SAMPLE_MAX, /**< Upper limit of valid sample types */
- PA_SAMPLE_INVALID = -1 /**< An invalid value */
+ PA_SAMPLE_U8,
+ /**< Unsigned 8 Bit PCM */
+
+ PA_SAMPLE_ALAW,
+ /**< 8 Bit a-Law */
+
+ PA_SAMPLE_ULAW,
+ /**< 8 Bit mu-Law */
+
+ PA_SAMPLE_S16LE,
+ /**< Signed 16 Bit PCM, little endian (PC) */
+
+ PA_SAMPLE_S16BE,
+ /**< Signed 16 Bit PCM, big endian */
+
+ PA_SAMPLE_FLOAT32LE,
+ /**< 32 Bit IEEE floating point, little endian, range -1 to 1 */
+
+ PA_SAMPLE_FLOAT32BE,
+ /**< 32 Bit IEEE floating point, big endian, range -1 to 1 */
+
+ PA_SAMPLE_S32LE,
+ /**< Signed 32 Bit PCM, little endian (PC) */
+
+ PA_SAMPLE_S32BE,
+ /**< Signed 32 Bit PCM, big endian (PC) */
+
+ PA_SAMPLE_MAX,
+ /**< Upper limit of valid sample types */
+
+ PA_SAMPLE_INVALID = -1
+ /**< An invalid value */
} pa_sample_format_t;
#ifdef WORDS_BIGENDIAN
@@ -165,14 +185,32 @@ typedef enum pa_sample_format {
/** A Shortcut for PA_SAMPLE_FLOAT32NE */
#define PA_SAMPLE_FLOAT32 PA_SAMPLE_FLOAT32NE
+/** \cond fulldocs */
+/* Allow clients to check with #ifdef for thse sample formats */
+#define PA_SAMPLE_U8 PA_SAMPLE_U8
+#define PA_SAMPLE_ALAW PA_SAMPLE_ALAW
+#define PA_SAMPLE_ULAW PA_SAMPLE_ULAW
+#define PA_SAMPLE_S16LE PA_SAMPLE_S16LE
+#define PA_SAMPLE_S16BE PA_SAMPLE_S16BE
+#define PA_SAMPLE_FLOAT32LE PA_SAMPLE_FLOAT32LE
+#define PA_SAMPLE_FLOAT32BE PA_SAMPLE_FLOAT32BE
+#define PA_SAMPLE_S32LE PA_SAMPLE_S32LE
+#define PA_SAMPLE_S32BE PA_SAMPLE_S32BE
+/** \endcond */
+
/** A sample format and attribute specification */
typedef struct pa_sample_spec {
- pa_sample_format_t format; /**< The sample format */
- uint32_t rate; /**< The sample rate. (e.g. 44100) */
- uint8_t channels; /**< Audio channels. (1 for mono, 2 for stereo, ...) */
+ pa_sample_format_t format;
+ /**< The sample format */
+
+ uint32_t rate;
+ /**< The sample rate. (e.g. 44100) */
+
+ uint8_t channels;
+ /**< Audio channels. (1 for mono, 2 for stereo, ...) */
} pa_sample_spec;
-/** Type for usec specifications (unsigned). May be either 32 or 64 bit, depending on the architecture */
+/** Type for usec specifications (unsigned). Always 64 bit. */
typedef uint64_t pa_usec_t;
/** Return the amount of bytes playback of a second of audio with the specified sample type takes */
@@ -184,12 +222,21 @@ size_t pa_frame_size(const pa_sample_spec *spec) PA_GCC_PURE;
/** Return the size of a sample with the specific sample type */
size_t pa_sample_size(const pa_sample_spec *spec) PA_GCC_PURE;
-/** Calculate the time the specified bytes take to play with the specified sample type */
+/** Calculate the time the specified bytes take to play with the
+ * specified sample type. The return value will always be rounded
+ * down for non-integral return values. */
pa_usec_t pa_bytes_to_usec(uint64_t length, const pa_sample_spec *spec) PA_GCC_PURE;
-/** Calculates the number of bytes that are required for the specified time. \since 0.9 */
+/** Calculates the number of bytes that are required for the specified
+ * time. The return value will always be rounded down for non-integral
+ * return values. \since 0.9 */
size_t pa_usec_to_bytes(pa_usec_t t, const pa_sample_spec *spec) PA_GCC_PURE;
+/** Initialize the specified sample spec and return a pointer to
+ * it. The sample spec will have a defined state but
+ * pa_sample_spec_valid() will fail for it. \since 0.9.13 */
+pa_sample_spec* pa_sample_spec_init(pa_sample_spec *spec);
+
/** Return non-zero when the sample type specification is valid */
int pa_sample_spec_valid(const pa_sample_spec *spec) PA_GCC_PURE;
@@ -202,7 +249,11 @@ const char *pa_sample_format_to_string(pa_sample_format_t f) PA_GCC_PURE;
/** Parse a sample format text. Inverse of pa_sample_format_to_string() */
pa_sample_format_t pa_parse_sample_format(const char *format) PA_GCC_PURE;
-/** Maximum required string length for pa_sample_spec_snprint() */
+/** Maximum required string length for
+ * pa_sample_spec_snprint(). Please note that this value can change
+ * with any release without warning and without being considered API
+ * or ABI breakage. You should not use this definition anywhere where
+ * it might become part of an ABI. */
#define PA_SAMPLE_SPEC_SNPRINT_MAX 32
/** Pretty print a sample type specification to a string */
diff --git a/src/pulse/scache.c b/src/pulse/scache.c
index 81218e5..fd3b987 100644
--- a/src/pulse/scache.c
+++ b/src/pulse/scache.c
@@ -1,5 +1,3 @@
-/* $Id: scache.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,8 +27,11 @@
#include <stdio.h>
#include <string.h>
+#include <pulse/utf8.h>
+
#include <pulsecore/pstream-util.h>
#include <pulsecore/macro.h>
+#include <pulsecore/proplist-util.h>
#include "internal.h"
@@ -39,22 +40,37 @@
int pa_stream_connect_upload(pa_stream *s, size_t length) {
pa_tagstruct *t;
uint32_t tag;
+ const char *name;
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY(s->context, length > 0, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(s->context, length == (size_t) (uint32_t) length, PA_ERR_INVALID);
+
+ if (!(name = pa_proplist_gets(s->proplist, PA_PROP_EVENT_ID)))
+ name = pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME);
+
+ PA_CHECK_VALIDITY(s->context, name && *name && pa_utf8_valid(name), PA_ERR_INVALID);
pa_stream_ref(s);
s->direction = PA_STREAM_UPLOAD;
+ s->flags = 0;
t = pa_tagstruct_command(s->context, PA_COMMAND_CREATE_UPLOAD_STREAM, &tag);
- pa_tagstruct_puts(t, s->name);
+
+ pa_tagstruct_puts(t, name);
pa_tagstruct_put_sample_spec(t, &s->sample_spec);
pa_tagstruct_put_channel_map(t, &s->channel_map);
- pa_tagstruct_putu32(t, length);
+ pa_tagstruct_putu32(t, (uint32_t) length);
+
+ if (s->context->version >= 13) {
+ pa_init_proplist(s->proplist);
+ pa_tagstruct_put_proplist(t, s->proplist);
+ }
+
pa_pstream_send_tagstruct(s->context->pstream, t);
pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_create_stream_callback, s, NULL);
@@ -85,6 +101,73 @@ int pa_stream_finish_upload(pa_stream *s) {
return 0;
}
+static void play_sample_ack_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_operation *o = userdata;
+ int success = 1;
+ uint32_t idx = PA_INVALID_INDEX;
+
+ pa_assert(pd);
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ if (!o->context)
+ goto finish;
+
+ if (command != PA_COMMAND_REPLY) {
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
+ goto finish;
+
+ success = 0;
+ } else if ((o->context->version >= 13 && pa_tagstruct_getu32(t, &idx) < 0) ||
+ !pa_tagstruct_eof(t)) {
+ pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ goto finish;
+ } else if (o->context->version >= 13 && idx == PA_INVALID_INDEX)
+ success = 0;
+
+ if (o->callback) {
+ pa_context_success_cb_t cb = (pa_context_success_cb_t) o->callback;
+ cb(o->context, success, o->userdata);
+ }
+
+finish:
+ pa_operation_done(o);
+ pa_operation_unref(o);
+}
+
+static void play_sample_with_proplist_ack_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_operation *o = userdata;
+ uint32_t idx;
+
+ pa_assert(pd);
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ if (!o->context)
+ goto finish;
+
+ if (command != PA_COMMAND_REPLY) {
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
+ goto finish;
+
+ idx = PA_INVALID_INDEX;
+ } else if (pa_tagstruct_getu32(t, &idx) < 0 ||
+ !pa_tagstruct_eof(t)) {
+ pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
+ if (o->callback) {
+ pa_context_play_sample_cb_t cb = (pa_context_play_sample_cb_t) o->callback;
+ cb(o->context, idx, o->userdata);
+ }
+
+finish:
+ pa_operation_done(o);
+ pa_operation_unref(o);
+}
+
+
pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char *dev, pa_volume_t volume, pa_context_success_cb_t cb, void *userdata) {
pa_operation *o;
pa_tagstruct *t;
@@ -107,8 +190,47 @@ pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char
pa_tagstruct_puts(t, dev);
pa_tagstruct_putu32(t, volume);
pa_tagstruct_puts(t, name);
+
+ if (c->version >= 13) {
+ pa_proplist *p = pa_proplist_new();
+ pa_tagstruct_put_proplist(t, p);
+ pa_proplist_free(p);
+ }
+
pa_pstream_send_tagstruct(c->pstream, t);
- pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, play_sample_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
+
+pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *name, const char *dev, pa_volume_t volume, pa_proplist *p, pa_context_play_sample_cb_t cb, void *userdata) {
+ pa_operation *o;
+ pa_tagstruct *t;
+ uint32_t tag;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, name && *name, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, !dev || *dev, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, p, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 13, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ if (!dev)
+ dev = c->conf->default_sink;
+
+ t = pa_tagstruct_command(c, PA_COMMAND_PLAY_SAMPLE, &tag);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, dev);
+ pa_tagstruct_putu32(t, volume);
+ pa_tagstruct_puts(t, name);
+ pa_tagstruct_put_proplist(t, p);
+
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, play_sample_with_proplist_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
return o;
}
@@ -128,9 +250,9 @@ pa_operation* pa_context_remove_sample(pa_context *c, const char *name, pa_conte
t = pa_tagstruct_command(c, PA_COMMAND_REMOVE_SAMPLE, &tag);
pa_tagstruct_puts(t, name);
+
pa_pstream_send_tagstruct(c->pstream, t);
pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
return o;
}
-
diff --git a/src/pulse/scache.h b/src/pulse/scache.h
index dbb2c60..f380b4e 100644
--- a/src/pulse/scache.h
+++ b/src/pulse/scache.h
@@ -1,8 +1,6 @@
#ifndef fooscachehfoo
#define fooscachehfoo
-/* $Id: scache.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -79,14 +77,25 @@
PA_C_DECL_BEGIN
+/** Callback prototype for pa_context_play_sample_with_proplist(). The
+ * idx value is the index of the sink input object, or
+ * PA_INVALID_INDEX on failure. \since 0.9.11 */
+typedef void (*pa_context_play_sample_cb_t)(pa_context *c, uint32_t idx, void *userdata);
+
/** Make this stream a sample upload stream */
int pa_stream_connect_upload(pa_stream *s, size_t length);
-/** Finish the sample upload, the stream name will become the sample name. You cancel a samp
- * le upload by issuing pa_stream_disconnect() */
+/** Finish the sample upload, the stream name will become the sample
+ * name. You cancel a sample upload by issuing
+ * pa_stream_disconnect() */
int pa_stream_finish_upload(pa_stream *s);
-/** Play a sample from the sample cache to the specified device. If the latter is NULL use the default sink. Returns an operation object */
+/** Remove a sample from the sample cache. Returns an operation object which may be used to cancel the operation while it is running */
+pa_operation* pa_context_remove_sample(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
+
+/** Play a sample from the sample cache to the specified device. If
+ * the latter is NULL use the default sink. Returns an operation
+ * object */
pa_operation* pa_context_play_sample(
pa_context *c /**< Context */,
const char *name /**< Name of the sample to play */,
@@ -95,8 +104,18 @@ pa_operation* pa_context_play_sample(
pa_context_success_cb_t cb /**< Call this function after successfully starting playback, or NULL */,
void *userdata /**< Userdata to pass to the callback */);
-/** Remove a sample from the sample cache. Returns an operation object which may be used to cancel the operation while it is running */
-pa_operation* pa_context_remove_sample(pa_context *c, const char *name, pa_context_success_cb_t, void *userdata);
+/** Play a sample from the sample cache to the specified device,
+ * allowing specification of a property list for the playback
+ * stream. If the latter is NULL use the default sink. Returns an
+ * operation object. \since 0.9.11 */
+pa_operation* pa_context_play_sample_with_proplist(
+ pa_context *c /**< Context */,
+ const char *name /**< Name of the sample to play */,
+ const char *dev /**< Sink to play this sample on */,
+ pa_volume_t volume /**< Volume to play this sample with */ ,
+ pa_proplist *proplist /**< Property list for this sound. The property list of the cached entry will be merged into this property list */,
+ pa_context_play_sample_cb_t cb /**< Call this function after successfully starting playback, or NULL */,
+ void *userdata /**< Userdata to pass to the callback */);
PA_C_DECL_END
diff --git a/src/pulse/simple.c b/src/pulse/simple.c
index 3f9b58f..79e39eb 100644
--- a/src/pulse/simple.c
+++ b/src/pulse/simple.c
@@ -1,6 +1,4 @@
-/* $Id: simple.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -274,7 +272,7 @@ int pa_simple_write(pa_simple *p, const void*data, size_t length, int *rerror) {
if (l > length)
l = length;
- r = pa_stream_write(p->stream, data, l, NULL, 0, PA_SEEK_RELATIVE);
+ r = pa_stream_write(p->stream, data, l, NULL, 0LL, PA_SEEK_RELATIVE);
CHECK_SUCCESS_GOTO(p, rerror, r >= 0, unlock_and_fail);
data = (const uint8_t*) data + l;
@@ -455,4 +453,3 @@ unlock_and_fail:
pa_threaded_mainloop_unlock(p->mainloop);
return (pa_usec_t) -1;
}
-
diff --git a/src/pulse/simple.h b/src/pulse/simple.h
index bfa9b38..a1380a0 100644
--- a/src/pulse/simple.h
+++ b/src/pulse/simple.h
@@ -1,8 +1,6 @@
#ifndef foosimplehfoo
#define foosimplehfoo
-/* $Id: simple.h 1999 2007-10-30 14:17:41Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -138,10 +136,10 @@ int pa_simple_drain(pa_simple *s, int *error);
/** Read some data from the server */
int pa_simple_read(pa_simple *s, void*data, size_t bytes, int *error);
-/** Return the playback latency. \since 0.5 */
+/** Return the playback latency. */
pa_usec_t pa_simple_get_latency(pa_simple *s, int *error);
-/** Flush the playback buffer. \since 0.5 */
+/** Flush the playback buffer. */
int pa_simple_flush(pa_simple *s, int *error);
PA_C_DECL_END
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 9e2c804..00aa1cf 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -1,5 +1,3 @@
-/* $Id: stream.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -38,33 +36,21 @@
#include <pulsecore/log.h>
#include <pulsecore/hashmap.h>
#include <pulsecore/macro.h>
+#include <pulsecore/rtclock.h>
#include "internal.h"
-#define LATENCY_IPOL_INTERVAL_USEC (100000L)
-
-pa_stream *pa_stream_new(pa_context *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map) {
- pa_stream *s;
- int i;
- pa_channel_map tmap;
-
- pa_assert(c);
- pa_assert(PA_REFCNT_VALUE(c) >= 1);
-
- PA_CHECK_VALIDITY_RETURN_NULL(c, ss && pa_sample_spec_valid(ss), PA_ERR_INVALID);
- PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 12 || (ss->format != PA_SAMPLE_S32LE || ss->format != PA_SAMPLE_S32NE), PA_ERR_NOTSUPPORTED);
- PA_CHECK_VALIDITY_RETURN_NULL(c, !map || (pa_channel_map_valid(map) && map->channels == ss->channels), PA_ERR_INVALID);
-
- if (!map)
- PA_CHECK_VALIDITY_RETURN_NULL(c, map = pa_channel_map_init_auto(&tmap, ss->channels, PA_CHANNEL_MAP_DEFAULT), PA_ERR_INVALID);
+#define LATENCY_IPOL_INTERVAL_USEC (333*PA_USEC_PER_MSEC)
- s = pa_xnew(pa_stream, 1);
- PA_REFCNT_INIT(s);
- s->context = c;
- s->mainloop = c->mainloop;
+#define SMOOTHER_ADJUST_TIME (1000*PA_USEC_PER_MSEC)
+#define SMOOTHER_HISTORY_TIME (5000*PA_USEC_PER_MSEC)
+#define SMOOTHER_MIN_HISTORY (4)
- s->buffer_attr_not_ready = s->timing_info_not_ready = FALSE;
+pa_stream *pa_stream_new(pa_context *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map) {
+ return pa_stream_new_with_proplist(c, name, ss, map, NULL);
+}
+static void reset_callbacks(pa_stream *s) {
s->read_callback = NULL;
s->read_userdata = NULL;
s->write_callback = NULL;
@@ -81,49 +67,96 @@ pa_stream *pa_stream_new(pa_context *c, const char *name, const pa_sample_spec *
s->moved_userdata = NULL;
s->suspended_callback = NULL;
s->suspended_userdata = NULL;
+ s->started_callback = NULL;
+ s->started_userdata = NULL;
+}
+
+pa_stream *pa_stream_new_with_proplist(
+ pa_context *c,
+ const char *name,
+ const pa_sample_spec *ss,
+ const pa_channel_map *map,
+ pa_proplist *p) {
+
+ pa_stream *s;
+ int i;
+ pa_channel_map tmap;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, ss && pa_sample_spec_valid(ss), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 12 || (ss->format != PA_SAMPLE_S32LE && ss->format != PA_SAMPLE_S32BE), PA_ERR_NOTSUPPORTED);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, !map || (pa_channel_map_valid(map) && map->channels == ss->channels), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, name || (p && pa_proplist_contains(p, PA_PROP_MEDIA_NAME)), PA_ERR_INVALID);
+
+ if (!map)
+ PA_CHECK_VALIDITY_RETURN_NULL(c, map = pa_channel_map_init_auto(&tmap, ss->channels, PA_CHANNEL_MAP_DEFAULT), PA_ERR_INVALID);
+
+ s = pa_xnew(pa_stream, 1);
+ PA_REFCNT_INIT(s);
+ s->context = c;
+ s->mainloop = c->mainloop;
s->direction = PA_STREAM_NODIRECTION;
- s->name = pa_xstrdup(name);
+ s->state = PA_STREAM_UNCONNECTED;
+ s->flags = 0;
+
s->sample_spec = *ss;
s->channel_map = *map;
- s->flags = 0;
+
+ s->direct_on_input = PA_INVALID_INDEX;
+
+ s->proplist = p ? pa_proplist_copy(p) : pa_proplist_new();
+ if (name)
+ pa_proplist_sets(s->proplist, PA_PROP_MEDIA_NAME, name);
s->channel = 0;
- s->channel_valid = 0;
+ s->channel_valid = FALSE;
s->syncid = c->csyncid++;
s->stream_index = PA_INVALID_INDEX;
- s->requested_bytes = 0;
- s->state = PA_STREAM_UNCONNECTED;
- s->manual_buffer_attr = FALSE;
+ s->requested_bytes = 0;
memset(&s->buffer_attr, 0, sizeof(s->buffer_attr));
+ /* We initialize der target length here, so that if the user
+ * passes no explicit buffering metrics the default is similar to
+ * what older PA versions provided. */
+
+ s->buffer_attr.maxlength = (uint32_t) -1;
+ s->buffer_attr.tlength = (uint32_t) pa_usec_to_bytes(250*PA_USEC_PER_MSEC, ss); /* 250ms of buffering */
+ s->buffer_attr.minreq = (uint32_t) -1;
+ s->buffer_attr.prebuf = (uint32_t) -1;
+ s->buffer_attr.fragsize = (uint32_t) -1;
+
s->device_index = PA_INVALID_INDEX;
s->device_name = NULL;
s->suspended = FALSE;
- s->peek_memchunk.index = 0;
- s->peek_memchunk.length = 0;
- s->peek_memchunk.memblock = NULL;
+ pa_memchunk_reset(&s->peek_memchunk);
s->peek_data = NULL;
s->record_memblockq = NULL;
+ s->corked = FALSE;
+
+ memset(&s->timing_info, 0, sizeof(s->timing_info));
+ s->timing_info_valid = FALSE;
+
s->previous_time = 0;
- s->timing_info_valid = 0;
+
s->read_index_not_before = 0;
s->write_index_not_before = 0;
-
for (i = 0; i < PA_MAX_WRITE_INDEX_CORRECTIONS; i++)
s->write_index_corrections[i].valid = 0;
s->current_write_index_correction = 0;
- s->corked = 0;
+ s->auto_timing_update_event = NULL;
+ s->auto_timing_update_requested = FALSE;
- s->cached_time_valid = 0;
+ reset_callbacks(s);
- s->auto_timing_update_event = NULL;
- s->auto_timing_update_requested = 0;
+ s->smoother = NULL;
/* Refcounting is strictly one-way: from the "bigger" to the "smaller" object. */
PA_LLIST_PREPEND(pa_stream, c->streams, s);
@@ -132,16 +165,51 @@ pa_stream *pa_stream_new(pa_context *c, const char *name, const pa_sample_spec *
return s;
}
-static void stream_free(pa_stream *s) {
+static void stream_unlink(pa_stream *s) {
+ pa_operation *o, *n;
pa_assert(s);
- pa_assert(!s->context);
- pa_assert(!s->channel_valid);
+
+ if (!s->context)
+ return;
+
+ /* Detach from context */
+
+ /* Unref all operatio object that point to us */
+ for (o = s->context->operations; o; o = n) {
+ n = o->next;
+
+ if (o->stream == s)
+ pa_operation_cancel(o);
+ }
+
+ /* Drop all outstanding replies for this stream */
+ if (s->context->pdispatch)
+ pa_pdispatch_unregister_reply(s->context->pdispatch, s);
+
+ if (s->channel_valid) {
+ pa_dynarray_put((s->direction == PA_STREAM_PLAYBACK) ? s->context->playback_streams : s->context->record_streams, s->channel, NULL);
+ s->channel = 0;
+ s->channel_valid = FALSE;
+ }
+
+ PA_LLIST_REMOVE(pa_stream, s->context->streams, s);
+ pa_stream_unref(s);
+
+ s->context = NULL;
if (s->auto_timing_update_event) {
pa_assert(s->mainloop);
s->mainloop->time_free(s->auto_timing_update_event);
}
+ reset_callbacks(s);
+}
+
+static void stream_free(pa_stream *s) {
+ pa_assert(s);
+
+ stream_unlink(s);
+
if (s->peek_memchunk.memblock) {
if (s->peek_data)
pa_memblock_release(s->peek_memchunk.memblock);
@@ -151,7 +219,12 @@ static void stream_free(pa_stream *s) {
if (s->record_memblockq)
pa_memblockq_free(s->record_memblockq);
- pa_xfree(s->name);
+ if (s->proplist)
+ pa_proplist_free(s->proplist);
+
+ if (s->smoother)
+ pa_smoother_free(s->smoother);
+
pa_xfree(s->device_name);
pa_xfree(s);
}
@@ -205,49 +278,44 @@ void pa_stream_set_state(pa_stream *s, pa_stream_state_t st) {
pa_stream_ref(s);
s->state = st;
+
if (s->state_callback)
s->state_callback(s, s->state_userdata);
- if ((st == PA_STREAM_FAILED || st == PA_STREAM_TERMINATED) && s->context) {
-
- /* Detach from context */
- pa_operation *o, *n;
-
- /* Unref all operatio object that point to us */
- for (o = s->context->operations; o; o = n) {
- n = o->next;
-
- if (o->stream == s)
- pa_operation_cancel(o);
- }
+ if ((st == PA_STREAM_FAILED || st == PA_STREAM_TERMINATED))
+ stream_unlink(s);
- /* Drop all outstanding replies for this stream */
- if (s->context->pdispatch)
- pa_pdispatch_unregister_reply(s->context->pdispatch, s);
+ pa_stream_unref(s);
+}
- if (s->channel_valid)
- pa_dynarray_put((s->direction == PA_STREAM_PLAYBACK) ? s->context->playback_streams : s->context->record_streams, s->channel, NULL);
+static void request_auto_timing_update(pa_stream *s, pa_bool_t force) {
+ pa_assert(s);
+ pa_assert(PA_REFCNT_VALUE(s) >= 1);
- PA_LLIST_REMOVE(pa_stream, s->context->streams, s);
- pa_stream_unref(s);
+ if (!(s->flags & PA_STREAM_AUTO_TIMING_UPDATE))
+ return;
- s->channel = 0;
- s->channel_valid = 0;
+ if (s->state == PA_STREAM_READY &&
+ (force || !s->auto_timing_update_requested)) {
+ pa_operation *o;
- s->context = NULL;
+/* pa_log("automatically requesting new timing data"); */
- s->read_callback = NULL;
- s->write_callback = NULL;
- s->state_callback = NULL;
- s->overflow_callback = NULL;
- s->underflow_callback = NULL;
- s->latency_update_callback = NULL;
+ if ((o = pa_stream_update_timing_info(s, NULL, NULL))) {
+ pa_operation_unref(o);
+ s->auto_timing_update_requested = TRUE;
+ }
}
- pa_stream_unref(s);
+ if (s->auto_timing_update_event) {
+ struct timeval next;
+ pa_gettimeofday(&next);
+ pa_timeval_add(&next, LATENCY_IPOL_INTERVAL_USEC);
+ s->mainloop->time_restart(s->auto_timing_update_event, &next);
+ }
}
-void pa_command_stream_killed(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+void pa_command_stream_killed(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_context *c = userdata;
pa_stream *s;
uint32_t channel;
@@ -269,6 +337,9 @@ void pa_command_stream_killed(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
if (!(s = pa_dynarray_get(command == PA_COMMAND_PLAYBACK_STREAM_KILLED ? c->playback_streams : c->record_streams, channel)))
goto finish;
+ if (s->state != PA_STREAM_READY)
+ goto finish;
+
pa_context_set_error(c, PA_ERR_KILLED);
pa_stream_set_state(s, PA_STREAM_FAILED);
@@ -276,13 +347,50 @@ finish:
pa_context_unref(c);
}
-void pa_command_stream_moved(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void check_smoother_status(pa_stream *s, pa_bool_t aposteriori, pa_bool_t force_start, pa_bool_t force_stop) {
+ pa_usec_t x;
+
+ pa_assert(s);
+ pa_assert(!force_start || !force_stop);
+
+ if (!s->smoother)
+ return;
+
+ x = pa_rtclock_usec();
+
+ if (s->timing_info_valid) {
+ if (aposteriori)
+ x -= s->timing_info.transport_usec;
+ else
+ x += s->timing_info.transport_usec;
+
+ if (s->direction == PA_STREAM_PLAYBACK)
+ /* it takes a while until the pause/resume is actually
+ * audible */
+ x += s->timing_info.sink_usec;
+ else
+ /* Data froma while back will be dropped */
+ x -= s->timing_info.source_usec;
+ }
+
+ if (s->suspended || s->corked || force_stop)
+ pa_smoother_pause(s->smoother, x);
+ else if (force_start || s->buffer_attr.prebuf == 0)
+ pa_smoother_resume(s->smoother, x);
+
+ /* Please note that we have no idea if playback actually started
+ * if prebuf is non-zero! */
+}
+
+void pa_command_stream_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_context *c = userdata;
pa_stream *s;
uint32_t channel;
const char *dn;
- int suspended;
+ pa_bool_t suspended;
uint32_t di;
+ pa_usec_t usec;
+ uint32_t maxlength = 0, fragsize = 0, minreq = 0, tlength = 0, prebuf = 0;
pa_assert(pd);
pa_assert(command == PA_COMMAND_PLAYBACK_STREAM_MOVED || command == PA_COMMAND_RECORD_STREAM_MOVED);
@@ -300,8 +408,33 @@ void pa_command_stream_moved(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED u
if (pa_tagstruct_getu32(t, &channel) < 0 ||
pa_tagstruct_getu32(t, &di) < 0 ||
pa_tagstruct_gets(t, &dn) < 0 ||
- pa_tagstruct_get_boolean(t, &suspended) < 0 ||
- !pa_tagstruct_eof(t)) {
+ pa_tagstruct_get_boolean(t, &suspended) < 0) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
+ if (c->version >= 13) {
+
+ if (command == PA_COMMAND_RECORD_STREAM_MOVED) {
+ if (pa_tagstruct_getu32(t, &maxlength) < 0 ||
+ pa_tagstruct_getu32(t, &fragsize) < 0 ||
+ pa_tagstruct_get_usec(t, &usec) < 0) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+ } else {
+ if (pa_tagstruct_getu32(t, &maxlength) < 0 ||
+ pa_tagstruct_getu32(t, &tlength) < 0 ||
+ pa_tagstruct_getu32(t, &prebuf) < 0 ||
+ pa_tagstruct_getu32(t, &minreq) < 0 ||
+ pa_tagstruct_get_usec(t, &usec) < 0) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+ }
+ }
+
+ if (!pa_tagstruct_eof(t)) {
pa_context_fail(c, PA_ERR_PROTOCOL);
goto finish;
}
@@ -314,12 +447,31 @@ void pa_command_stream_moved(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED u
if (!(s = pa_dynarray_get(command == PA_COMMAND_PLAYBACK_STREAM_MOVED ? c->playback_streams : c->record_streams, channel)))
goto finish;
+ if (s->state != PA_STREAM_READY)
+ goto finish;
+
+ if (c->version >= 13) {
+ if (s->direction == PA_STREAM_RECORD)
+ s->timing_info.configured_source_usec = usec;
+ else
+ s->timing_info.configured_sink_usec = usec;
+
+ s->buffer_attr.maxlength = maxlength;
+ s->buffer_attr.fragsize = fragsize;
+ s->buffer_attr.tlength = tlength;
+ s->buffer_attr.prebuf = prebuf;
+ s->buffer_attr.minreq = minreq;
+ }
+
pa_xfree(s->device_name);
s->device_name = pa_xstrdup(dn);
s->device_index = di;
s->suspended = suspended;
+ check_smoother_status(s, TRUE, FALSE, FALSE);
+ request_auto_timing_update(s, TRUE);
+
if (s->moved_callback)
s->moved_callback(s, s->moved_userdata);
@@ -327,11 +479,11 @@ finish:
pa_context_unref(c);
}
-void pa_command_stream_suspended(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+void pa_command_stream_suspended(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_context *c = userdata;
pa_stream *s;
uint32_t channel;
- int suspended;
+ pa_bool_t suspended;
pa_assert(pd);
pa_assert(command == PA_COMMAND_PLAYBACK_STREAM_SUSPENDED || command == PA_COMMAND_RECORD_STREAM_SUSPENDED);
@@ -356,8 +508,14 @@ void pa_command_stream_suspended(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUS
if (!(s = pa_dynarray_get(command == PA_COMMAND_PLAYBACK_STREAM_SUSPENDED ? c->playback_streams : c->record_streams, channel)))
goto finish;
+ if (s->state != PA_STREAM_READY)
+ goto finish;
+
s->suspended = suspended;
+ check_smoother_status(s, TRUE, FALSE, FALSE);
+ request_auto_timing_update(s, TRUE);
+
if (s->suspended_callback)
s->suspended_callback(s, s->suspended_userdata);
@@ -365,21 +523,25 @@ finish:
pa_context_unref(c);
}
-void pa_command_request(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
- pa_stream *s;
+void pa_command_stream_started(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_context *c = userdata;
- uint32_t bytes, channel;
+ pa_stream *s;
+ uint32_t channel;
pa_assert(pd);
- pa_assert(command == PA_COMMAND_REQUEST);
+ pa_assert(command == PA_COMMAND_STARTED);
pa_assert(t);
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
pa_context_ref(c);
+ if (c->version < 13) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
if (pa_tagstruct_getu32(t, &channel) < 0 ||
- pa_tagstruct_getu32(t, &bytes) < 0 ||
!pa_tagstruct_eof(t)) {
pa_context_fail(c, PA_ERR_PROTOCOL);
goto finish;
@@ -388,24 +550,26 @@ void pa_command_request(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32
if (!(s = pa_dynarray_get(c->playback_streams, channel)))
goto finish;
- if (s->state == PA_STREAM_READY) {
- s->requested_bytes += bytes;
+ if (s->state != PA_STREAM_READY)
+ goto finish;
- if (s->requested_bytes > 0 && s->write_callback)
- s->write_callback(s, s->requested_bytes, s->write_userdata);
- }
+ check_smoother_status(s, TRUE, TRUE, FALSE);
+ request_auto_timing_update(s, TRUE);
+
+ if (s->started_callback)
+ s->started_callback(s, s->started_userdata);
finish:
pa_context_unref(c);
}
-void pa_command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+void pa_command_request(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_stream *s;
pa_context *c = userdata;
- uint32_t channel;
+ uint32_t bytes, channel;
pa_assert(pd);
- pa_assert(command == PA_COMMAND_OVERFLOW || command == PA_COMMAND_UNDERFLOW);
+ pa_assert(command == PA_COMMAND_REQUEST);
pa_assert(t);
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
@@ -413,6 +577,7 @@ void pa_command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, PA_GCC
pa_context_ref(c);
if (pa_tagstruct_getu32(t, &channel) < 0 ||
+ pa_tagstruct_getu32(t, &bytes) < 0 ||
!pa_tagstruct_eof(t)) {
pa_context_fail(c, PA_ERR_PROTOCOL);
goto finish;
@@ -421,49 +586,61 @@ void pa_command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, PA_GCC
if (!(s = pa_dynarray_get(c->playback_streams, channel)))
goto finish;
- if (s->state == PA_STREAM_READY) {
+ if (s->state != PA_STREAM_READY)
+ goto finish;
- if (command == PA_COMMAND_OVERFLOW) {
- if (s->overflow_callback)
- s->overflow_callback(s, s->overflow_userdata);
- } else if (command == PA_COMMAND_UNDERFLOW) {
- if (s->underflow_callback)
- s->underflow_callback(s, s->underflow_userdata);
- }
- }
+ s->requested_bytes += bytes;
- finish:
+ if (s->requested_bytes > 0 && s->write_callback)
+ s->write_callback(s, s->requested_bytes, s->write_userdata);
+
+finish:
pa_context_unref(c);
}
-static void request_auto_timing_update(pa_stream *s, int force) {
- pa_assert(s);
- pa_assert(PA_REFCNT_VALUE(s) >= 1);
-
- if (!(s->flags & PA_STREAM_AUTO_TIMING_UPDATE))
- return;
+void pa_command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_stream *s;
+ pa_context *c = userdata;
+ uint32_t channel;
- if (s->state == PA_STREAM_READY &&
- (force || !s->auto_timing_update_requested)) {
- pa_operation *o;
+ pa_assert(pd);
+ pa_assert(command == PA_COMMAND_OVERFLOW || command == PA_COMMAND_UNDERFLOW);
+ pa_assert(t);
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
-/* pa_log("automatically requesting new timing data"); */
+ pa_context_ref(c);
- if ((o = pa_stream_update_timing_info(s, NULL, NULL))) {
- pa_operation_unref(o);
- s->auto_timing_update_requested = 1;
- }
+ if (pa_tagstruct_getu32(t, &channel) < 0 ||
+ !pa_tagstruct_eof(t)) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ goto finish;
}
- if (s->auto_timing_update_event) {
- struct timeval next;
- pa_gettimeofday(&next);
- pa_timeval_add(&next, LATENCY_IPOL_INTERVAL_USEC);
- s->mainloop->time_restart(s->auto_timing_update_event, &next);
+ if (!(s = pa_dynarray_get(c->playback_streams, channel)))
+ goto finish;
+
+ if (s->state != PA_STREAM_READY)
+ goto finish;
+
+ if (s->buffer_attr.prebuf > 0)
+ check_smoother_status(s, TRUE, FALSE, TRUE);
+
+ request_auto_timing_update(s, TRUE);
+
+ if (command == PA_COMMAND_OVERFLOW) {
+ if (s->overflow_callback)
+ s->overflow_callback(s, s->overflow_userdata);
+ } else if (command == PA_COMMAND_UNDERFLOW) {
+ if (s->underflow_callback)
+ s->underflow_callback(s, s->underflow_userdata);
}
+
+ finish:
+ pa_context_unref(c);
}
-static void invalidate_indexes(pa_stream *s, int r, int w) {
+static void invalidate_indexes(pa_stream *s, pa_bool_t r, pa_bool_t w) {
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
@@ -476,7 +653,7 @@ static void invalidate_indexes(pa_stream *s, int r, int w) {
s->write_index_not_before = s->context->ctag;
if (s->timing_info_valid)
- s->timing_info.write_index_corrupt = 1;
+ s->timing_info.write_index_corrupt = TRUE;
/* pa_log("write_index invalidated"); */
}
@@ -485,28 +662,22 @@ static void invalidate_indexes(pa_stream *s, int r, int w) {
s->read_index_not_before = s->context->ctag;
if (s->timing_info_valid)
- s->timing_info.read_index_corrupt = 1;
+ s->timing_info.read_index_corrupt = TRUE;
/* pa_log("read_index invalidated"); */
}
- if ((s->direction == PA_STREAM_PLAYBACK && r) ||
- (s->direction == PA_STREAM_RECORD && w))
- s->cached_time_valid = 0;
-
- request_auto_timing_update(s, 1);
+ request_auto_timing_update(s, TRUE);
}
-static void auto_timing_update_callback(PA_GCC_UNUSED pa_mainloop_api *m, PA_GCC_UNUSED pa_time_event *e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+static void auto_timing_update_callback(pa_mainloop_api *m, pa_time_event *e, const struct timeval *tv, void *userdata) {
pa_stream *s = userdata;
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
-/* pa_log("time event"); */
-
pa_stream_ref(s);
- request_auto_timing_update(s, 0);
+ request_auto_timing_update(s, FALSE);
pa_stream_unref(s);
}
@@ -515,9 +686,6 @@ static void create_stream_complete(pa_stream *s) {
pa_assert(PA_REFCNT_VALUE(s) >= 1);
pa_assert(s->state == PA_STREAM_CREATING);
- if (s->buffer_attr_not_ready || s->timing_info_not_ready)
- return;
-
pa_stream_set_state(s, PA_STREAM_READY);
if (s->requested_bytes > 0 && s->write_callback)
@@ -526,24 +694,47 @@ static void create_stream_complete(pa_stream *s) {
if (s->flags & PA_STREAM_AUTO_TIMING_UPDATE) {
struct timeval tv;
pa_gettimeofday(&tv);
- tv.tv_usec += LATENCY_IPOL_INTERVAL_USEC; /* every 100 ms */
+ tv.tv_usec += (suseconds_t) LATENCY_IPOL_INTERVAL_USEC; /* every 100 ms */
pa_assert(!s->auto_timing_update_event);
s->auto_timing_update_event = s->mainloop->time_new(s->mainloop, &tv, &auto_timing_update_callback, s);
+
+ request_auto_timing_update(s, TRUE);
}
+
+ check_smoother_status(s, TRUE, FALSE, FALSE);
}
-static void automatic_buffer_attr(pa_buffer_attr *attr, pa_sample_spec *ss) {
+static void automatic_buffer_attr(pa_stream *s, pa_buffer_attr *attr, const pa_sample_spec *ss) {
+ pa_assert(s);
pa_assert(attr);
pa_assert(ss);
- attr->tlength = pa_bytes_per_second(ss)/2;
- attr->maxlength = (attr->tlength*3)/2;
- attr->minreq = attr->tlength/50;
- attr->prebuf = attr->tlength - attr->minreq;
- attr->fragsize = attr->tlength/50;
+ if (s->context->version >= 13)
+ return;
+
+ /* Version older than 0.9.10 didn't do server side buffer_attr
+ * selection, hence we have to fake it on the client side. */
+
+ /* We choose fairly conservative values here, to not confuse
+ * old clients with extremely large playback buffers */
+
+ if (attr->maxlength == (uint32_t) -1)
+ attr->maxlength = 4*1024*1024; /* 4MB is the maximum queue length PulseAudio <= 0.9.9 supported. */
+
+ if (attr->tlength == (uint32_t) -1)
+ attr->tlength = (uint32_t) pa_usec_to_bytes(250*PA_USEC_PER_MSEC, ss); /* 250ms of buffering */
+
+ if (attr->minreq == (uint32_t) -1)
+ attr->minreq = (attr->tlength)/5; /* Ask for more data when there are only 200ms left in the playback buffer */
+
+ if (attr->prebuf == (uint32_t) -1)
+ attr->prebuf = attr->tlength; /* Start to play only when the playback is fully filled up once */
+
+ if (attr->fragsize == (uint32_t) -1)
+ attr->fragsize = attr->tlength; /* Pass data to the app only when the buffer is filled up once */
}
-void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_stream *s = userdata;
pa_assert(pd);
@@ -554,7 +745,7 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
pa_stream_ref(s);
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(s->context, command, t) < 0)
+ if (pa_context_handle_error(s->context, command, t, FALSE) < 0)
goto finish;
pa_stream_set_state(s, PA_STREAM_FAILED);
@@ -562,7 +753,8 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
}
if (pa_tagstruct_getu32(t, &s->channel) < 0 ||
- ((s->direction != PA_STREAM_UPLOAD) && pa_tagstruct_getu32(t, &s->stream_index) < 0) ||
+ s->channel == PA_INVALID_INDEX ||
+ ((s->direction != PA_STREAM_UPLOAD) && (pa_tagstruct_getu32(t, &s->stream_index) < 0 || s->stream_index == PA_INVALID_INDEX)) ||
((s->direction != PA_STREAM_RECORD) && pa_tagstruct_getu32(t, &s->requested_bytes) < 0)) {
pa_context_fail(s->context, PA_ERR_PROTOCOL);
goto finish;
@@ -590,7 +782,7 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
pa_sample_spec ss;
pa_channel_map cm;
const char *dn = NULL;
- int suspended;
+ pa_bool_t suspended;
if (pa_tagstruct_get_sample_spec(t, &ss) < 0 ||
pa_tagstruct_get_channel_map(t, &cm) < 0 ||
@@ -616,26 +808,22 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
s->device_name = pa_xstrdup(dn);
s->suspended = suspended;
- if (!s->manual_buffer_attr && pa_bytes_per_second(&ss) != pa_bytes_per_second(&s->sample_spec)) {
- pa_buffer_attr attr;
- pa_operation *o;
-
- automatic_buffer_attr(&attr, &ss);
-
- /* If we need to update the buffer metrics, we wait for
- * the the OK for that call before we go to
- * PA_STREAM_READY */
+ s->channel_map = cm;
+ s->sample_spec = ss;
+ }
- s->state = PA_STREAM_READY;
- pa_assert_se(o = pa_stream_set_buffer_attr(s, &attr, NULL, NULL));
- pa_operation_unref(o);
- s->state = PA_STREAM_CREATING;
+ if (s->context->version >= 13 && s->direction != PA_STREAM_UPLOAD) {
+ pa_usec_t usec;
- s->buffer_attr_not_ready = TRUE;
+ if (pa_tagstruct_get_usec(t, &usec) < 0) {
+ pa_context_fail(s->context, PA_ERR_PROTOCOL);
+ goto finish;
}
- s->channel_map = cm;
- s->sample_spec = ss;
+ if (s->direction == PA_STREAM_RECORD)
+ s->timing_info.configured_source_usec = usec;
+ else
+ s->timing_info.configured_sink_usec = usec;
}
if (!pa_tagstruct_eof(t)) {
@@ -653,25 +841,13 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
pa_frame_size(&s->sample_spec),
1,
0,
+ 0,
NULL);
}
- s->channel_valid = 1;
+ s->channel_valid = TRUE;
pa_dynarray_put((s->direction == PA_STREAM_RECORD) ? s->context->record_streams : s->context->playback_streams, s->channel, s);
- if (s->direction != PA_STREAM_UPLOAD && s->flags & PA_STREAM_AUTO_TIMING_UPDATE) {
-
- /* If automatic timing updates are active, we wait for the
- * first timing update before going to PA_STREAM_READY
- * state */
-
- s->state = PA_STREAM_READY;
- request_auto_timing_update(s, 1);
- s->state = PA_STREAM_CREATING;
-
- s->timing_info_not_ready = TRUE;
- }
-
create_stream_complete(s);
finish:
@@ -689,44 +865,67 @@ static int create_stream(
pa_tagstruct *t;
uint32_t tag;
+ pa_bool_t volume_set = FALSE;
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ pa_assert(direction == PA_STREAM_PLAYBACK || direction == PA_STREAM_RECORD);
PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
- PA_CHECK_VALIDITY(s->context, !(flags & ~((direction != PA_STREAM_UPLOAD ?
- PA_STREAM_START_CORKED|
- PA_STREAM_INTERPOLATE_TIMING|
- PA_STREAM_NOT_MONOTONOUS|
- PA_STREAM_AUTO_TIMING_UPDATE|
- PA_STREAM_NO_REMAP_CHANNELS|
- PA_STREAM_NO_REMIX_CHANNELS|
- PA_STREAM_FIX_FORMAT|
- PA_STREAM_FIX_RATE|
- PA_STREAM_FIX_CHANNELS|
- PA_STREAM_DONT_MOVE : 0))), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(s->context, s->direct_on_input == PA_INVALID_INDEX || direction == PA_STREAM_RECORD, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY(s->context, !(flags & ~(PA_STREAM_START_CORKED|
+ PA_STREAM_INTERPOLATE_TIMING|
+ PA_STREAM_NOT_MONOTONOUS|
+ PA_STREAM_AUTO_TIMING_UPDATE|
+ PA_STREAM_NO_REMAP_CHANNELS|
+ PA_STREAM_NO_REMIX_CHANNELS|
+ PA_STREAM_FIX_FORMAT|
+ PA_STREAM_FIX_RATE|
+ PA_STREAM_FIX_CHANNELS|
+ PA_STREAM_DONT_MOVE|
+ PA_STREAM_VARIABLE_RATE|
+ PA_STREAM_PEAK_DETECT|
+ PA_STREAM_START_MUTED|
+ PA_STREAM_ADJUST_LATENCY|
+ PA_STREAM_EARLY_REQUESTS)), PA_ERR_INVALID);
+
+ PA_CHECK_VALIDITY(s->context, s->context->version >= 12 || !(flags & PA_STREAM_VARIABLE_RATE), PA_ERR_NOTSUPPORTED);
+ PA_CHECK_VALIDITY(s->context, s->context->version >= 13 || !(flags & PA_STREAM_PEAK_DETECT), PA_ERR_NOTSUPPORTED);
+ /* Althought some of the other flags are not supported on older
+ * version, we don't check for them here, because it doesn't hurt
+ * when they are passed but actually not supported. This makes
+ * client development easier */
+
+ PA_CHECK_VALIDITY(s->context, direction == PA_STREAM_PLAYBACK || !(flags & (PA_STREAM_START_MUTED)), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(s->context, direction == PA_STREAM_RECORD || !(flags & (PA_STREAM_PEAK_DETECT)), PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, !volume || volume->channels == s->sample_spec.channels, PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, !sync_stream || (direction == PA_STREAM_PLAYBACK && sync_stream->direction == PA_STREAM_PLAYBACK), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(s->context, (flags & (PA_STREAM_ADJUST_LATENCY|PA_STREAM_EARLY_REQUESTS)) != (PA_STREAM_ADJUST_LATENCY|PA_STREAM_EARLY_REQUESTS), PA_ERR_INVALID);
pa_stream_ref(s);
s->direction = direction;
s->flags = flags;
+ s->corked = !!(flags & PA_STREAM_START_CORKED);
if (sync_stream)
s->syncid = sync_stream->syncid;
- if (attr) {
+ if (attr)
s->buffer_attr = *attr;
- s->manual_buffer_attr = TRUE;
- } else {
- /* half a second, with minimum request of 10 ms */
- s->buffer_attr.tlength = pa_bytes_per_second(&s->sample_spec)/2;
- s->buffer_attr.maxlength = (s->buffer_attr.tlength*3)/2;
- s->buffer_attr.minreq = s->buffer_attr.tlength/50;
- s->buffer_attr.prebuf = s->buffer_attr.tlength - s->buffer_attr.minreq;
- s->buffer_attr.fragsize = s->buffer_attr.tlength/50;
- s->manual_buffer_attr = FALSE;
+ automatic_buffer_attr(s, &s->buffer_attr, &s->sample_spec);
+
+ if (flags & PA_STREAM_INTERPOLATE_TIMING) {
+ pa_usec_t x;
+
+ if (s->smoother)
+ pa_smoother_free(s->smoother);
+
+ s->smoother = pa_smoother_new(SMOOTHER_ADJUST_TIME, SMOOTHER_HISTORY_TIME, !(flags & PA_STREAM_NOT_MONOTONIC), SMOOTHER_MIN_HISTORY);
+
+ x = pa_rtclock_usec();
+ pa_smoother_set_time_offset(s->smoother, x);
+ pa_smoother_pause(s->smoother, x);
}
if (!dev)
@@ -734,18 +933,20 @@ static int create_stream(
t = pa_tagstruct_command(
s->context,
- s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_CREATE_PLAYBACK_STREAM : PA_COMMAND_CREATE_RECORD_STREAM,
+ (uint32_t) (s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_CREATE_PLAYBACK_STREAM : PA_COMMAND_CREATE_RECORD_STREAM),
&tag);
+ if (s->context->version < 13)
+ pa_tagstruct_puts(t, pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME));
+
pa_tagstruct_put(
t,
- PA_TAG_STRING, s->name,
PA_TAG_SAMPLE_SPEC, &s->sample_spec,
PA_TAG_CHANNEL_MAP, &s->channel_map,
PA_TAG_U32, PA_INVALID_INDEX,
PA_TAG_STRING, dev,
PA_TAG_U32, s->buffer_attr.maxlength,
- PA_TAG_BOOLEAN, !!(flags & PA_STREAM_START_CORKED),
+ PA_TAG_BOOLEAN, s->corked,
PA_TAG_INVALID);
if (s->direction == PA_STREAM_PLAYBACK) {
@@ -759,6 +960,8 @@ static int create_stream(
PA_TAG_U32, s->syncid,
PA_TAG_INVALID);
+ volume_set = !!volume;
+
if (!volume)
volume = pa_cvolume_reset(&cv, s->sample_spec.channels);
@@ -766,7 +969,7 @@ static int create_stream(
} else
pa_tagstruct_putu32(t, s->buffer_attr.fragsize);
- if (s->context->version >= 12 && s->direction != PA_STREAM_UPLOAD) {
+ if (s->context->version >= 12) {
pa_tagstruct_put(
t,
PA_TAG_BOOLEAN, flags & PA_STREAM_NO_REMAP_CHANNELS,
@@ -779,6 +982,31 @@ static int create_stream(
PA_TAG_INVALID);
}
+ if (s->context->version >= 13) {
+
+ if (s->direction == PA_STREAM_PLAYBACK)
+ pa_tagstruct_put_boolean(t, flags & PA_STREAM_START_MUTED);
+ else
+ pa_tagstruct_put_boolean(t, flags & PA_STREAM_PEAK_DETECT);
+
+ pa_tagstruct_put(
+ t,
+ PA_TAG_BOOLEAN, flags & PA_STREAM_ADJUST_LATENCY,
+ PA_TAG_PROPLIST, s->proplist,
+ PA_TAG_INVALID);
+
+ if (s->direction == PA_STREAM_RECORD)
+ pa_tagstruct_putu32(t, s->direct_on_input);
+ }
+
+ if (s->context->version >= 14) {
+
+ if (s->direction == PA_STREAM_PLAYBACK)
+ pa_tagstruct_put_boolean(t, volume_set);
+
+ pa_tagstruct_put_boolean(t, flags & PA_STREAM_EARLY_REQUESTS);
+ }
+
pa_pstream_send_tagstruct(s->context->pstream, t);
pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_create_stream_callback, s, NULL);
@@ -823,6 +1051,10 @@ int pa_stream_write(
pa_seek_mode_t seek) {
pa_memchunk chunk;
+ pa_seek_mode_t t_seek;
+ int64_t t_offset;
+ size_t t_length;
+ const void *t_data;
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
@@ -836,58 +1068,81 @@ int pa_stream_write(
if (length <= 0)
return 0;
- if (free_cb)
- chunk.memblock = pa_memblock_new_user(s->context->mempool, (void*) data, length, free_cb, 1);
- else {
- void *tdata;
- chunk.memblock = pa_memblock_new(s->context->mempool, length);
- tdata = pa_memblock_acquire(chunk.memblock);
- memcpy(tdata, data, length);
- pa_memblock_release(chunk.memblock);
- }
+ t_seek = seek;
+ t_offset = offset;
+ t_length = length;
+ t_data = data;
+
+ while (t_length > 0) {
+
+ chunk.index = 0;
+
+ if (free_cb && !pa_pstream_get_shm(s->context->pstream)) {
+ chunk.memblock = pa_memblock_new_user(s->context->mempool, (void*) t_data, t_length, free_cb, 1);
+ chunk.length = t_length;
+ } else {
+ void *d;
+
+ chunk.length = PA_MIN(t_length, pa_mempool_block_size_max(s->context->mempool));
+ chunk.memblock = pa_memblock_new(s->context->mempool, chunk.length);
+
+ d = pa_memblock_acquire(chunk.memblock);
+ memcpy(d, t_data, chunk.length);
+ pa_memblock_release(chunk.memblock);
+ }
+
+ pa_pstream_send_memblock(s->context->pstream, s->channel, t_offset, t_seek, &chunk);
+
+ t_offset = 0;
+ t_seek = PA_SEEK_RELATIVE;
+
+ t_data = (const uint8_t*) t_data + chunk.length;
+ t_length -= chunk.length;
- chunk.index = 0;
- chunk.length = length;
+ pa_memblock_unref(chunk.memblock);
+ }
- pa_pstream_send_memblock(s->context->pstream, s->channel, offset, seek, &chunk);
- pa_memblock_unref(chunk.memblock);
+ if (free_cb && pa_pstream_get_shm(s->context->pstream))
+ free_cb((void*) data);
if (length < s->requested_bytes)
- s->requested_bytes -= length;
+ s->requested_bytes -= (uint32_t) length;
else
s->requested_bytes = 0;
+ /* FIXME!!! ^^^ will break when offset is != 0 and mode is not RELATIVE*/
+
if (s->direction == PA_STREAM_PLAYBACK) {
/* Update latency request correction */
if (s->write_index_corrections[s->current_write_index_correction].valid) {
if (seek == PA_SEEK_ABSOLUTE) {
- s->write_index_corrections[s->current_write_index_correction].corrupt = 0;
- s->write_index_corrections[s->current_write_index_correction].absolute = 1;
- s->write_index_corrections[s->current_write_index_correction].value = offset + length;
+ s->write_index_corrections[s->current_write_index_correction].corrupt = FALSE;
+ s->write_index_corrections[s->current_write_index_correction].absolute = TRUE;
+ s->write_index_corrections[s->current_write_index_correction].value = offset + (int64_t) length;
} else if (seek == PA_SEEK_RELATIVE) {
if (!s->write_index_corrections[s->current_write_index_correction].corrupt)
- s->write_index_corrections[s->current_write_index_correction].value += offset + length;
+ s->write_index_corrections[s->current_write_index_correction].value += offset + (int64_t) length;
} else
- s->write_index_corrections[s->current_write_index_correction].corrupt = 1;
+ s->write_index_corrections[s->current_write_index_correction].corrupt = TRUE;
}
/* Update the write index in the already available latency data */
if (s->timing_info_valid) {
if (seek == PA_SEEK_ABSOLUTE) {
- s->timing_info.write_index_corrupt = 0;
- s->timing_info.write_index = offset + length;
+ s->timing_info.write_index_corrupt = FALSE;
+ s->timing_info.write_index = offset + (int64_t) length;
} else if (seek == PA_SEEK_RELATIVE) {
if (!s->timing_info.write_index_corrupt)
- s->timing_info.write_index += offset + length;
+ s->timing_info.write_index += offset + (int64_t) length;
} else
- s->timing_info.write_index_corrupt = 1;
+ s->timing_info.write_index_corrupt = TRUE;
}
if (!s->timing_info_valid || s->timing_info.write_index_corrupt)
- request_auto_timing_update(s, 1);
+ request_auto_timing_update(s, TRUE);
}
return 0;
@@ -931,14 +1186,12 @@ int pa_stream_drop(pa_stream *s) {
/* Fix the simulated local read index */
if (s->timing_info_valid && !s->timing_info.read_index_corrupt)
- s->timing_info.read_index += s->peek_memchunk.length;
+ s->timing_info.read_index += (int64_t) s->peek_memchunk.length;
pa_assert(s->peek_data);
pa_memblock_release(s->peek_memchunk.memblock);
pa_memblock_unref(s->peek_memchunk.memblock);
- s->peek_memchunk.length = 0;
- s->peek_memchunk.index = 0;
- s->peek_memchunk.memblock = NULL;
+ pa_memchunk_reset(&s->peek_memchunk);
return 0;
}
@@ -984,10 +1237,73 @@ pa_operation * pa_stream_drain(pa_stream *s, pa_stream_success_cb_t cb, void *us
return o;
}
+static pa_usec_t calc_time(pa_stream *s, pa_bool_t ignore_transport) {
+ pa_usec_t usec;
+
+ pa_assert(s);
+ pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ pa_assert(s->state == PA_STREAM_READY);
+ pa_assert(s->direction != PA_STREAM_UPLOAD);
+ pa_assert(s->timing_info_valid);
+ pa_assert(s->direction != PA_STREAM_PLAYBACK || !s->timing_info.read_index_corrupt);
+ pa_assert(s->direction != PA_STREAM_RECORD || !s->timing_info.write_index_corrupt);
+
+ if (s->direction == PA_STREAM_PLAYBACK) {
+ /* The last byte that was written into the output device
+ * had this time value associated */
+ usec = pa_bytes_to_usec(s->timing_info.read_index < 0 ? 0 : (uint64_t) s->timing_info.read_index, &s->sample_spec);
+
+ if (!s->corked && !s->suspended) {
+
+ if (!ignore_transport)
+ /* Because the latency info took a little time to come
+ * to us, we assume that the real output time is actually
+ * a little ahead */
+ usec += s->timing_info.transport_usec;
+
+ /* However, the output device usually maintains a buffer
+ too, hence the real sample currently played is a little
+ back */
+ if (s->timing_info.sink_usec >= usec)
+ usec = 0;
+ else
+ usec -= s->timing_info.sink_usec;
+ }
+
+ } else {
+ pa_assert(s->direction == PA_STREAM_RECORD);
+
+ /* The last byte written into the server side queue had
+ * this time value associated */
+ usec = pa_bytes_to_usec(s->timing_info.write_index < 0 ? 0 : (uint64_t) s->timing_info.write_index, &s->sample_spec);
+
+ if (!s->corked && !s->suspended) {
+
+ if (!ignore_transport)
+ /* Add transport latency */
+ usec += s->timing_info.transport_usec;
+
+ /* Add latency of data in device buffer */
+ usec += s->timing_info.source_usec;
+
+ /* If this is a monitor source, we need to correct the
+ * time by the playback device buffer */
+ if (s->timing_info.sink_usec >= usec)
+ usec = 0;
+ else
+ usec -= s->timing_info.sink_usec;
+ }
+ }
+
+ return usec;
+}
+
static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
struct timeval local, remote, now;
pa_timing_info *i;
+ pa_bool_t playing = FALSE;
+ uint64_t underrun_for = 0, playing_for = 0;
pa_assert(pd);
pa_assert(o);
@@ -998,31 +1314,48 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command,
i = &o->stream->timing_info;
-/* pa_log("pre corrupt w:%u r:%u\n", !o->stream->timing_info_valid || i->write_index_corrupt,!o->stream->timing_info_valid || i->read_index_corrupt); */
+ o->stream->timing_info_valid = FALSE;
+ i->write_index_corrupt = TRUE;
+ i->read_index_corrupt = TRUE;
+
+ if (command != PA_COMMAND_REPLY) {
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
+ goto finish;
- o->stream->timing_info_valid = 0;
- i->write_index_corrupt = 0;
- i->read_index_corrupt = 0;
+ } else {
-/* pa_log("timing update %u\n", tag); */
+ if (pa_tagstruct_get_usec(t, &i->sink_usec) < 0 ||
+ pa_tagstruct_get_usec(t, &i->source_usec) < 0 ||
+ pa_tagstruct_get_boolean(t, &playing) < 0 ||
+ pa_tagstruct_get_timeval(t, &local) < 0 ||
+ pa_tagstruct_get_timeval(t, &remote) < 0 ||
+ pa_tagstruct_gets64(t, &i->write_index) < 0 ||
+ pa_tagstruct_gets64(t, &i->read_index) < 0) {
- if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ pa_context_fail(o->context, PA_ERR_PROTOCOL);
goto finish;
+ }
- } else if (pa_tagstruct_get_usec(t, &i->sink_usec) < 0 ||
- pa_tagstruct_get_usec(t, &i->source_usec) < 0 ||
- pa_tagstruct_get_boolean(t, &i->playing) < 0 ||
- pa_tagstruct_get_timeval(t, &local) < 0 ||
- pa_tagstruct_get_timeval(t, &remote) < 0 ||
- pa_tagstruct_gets64(t, &i->write_index) < 0 ||
- pa_tagstruct_gets64(t, &i->read_index) < 0 ||
- !pa_tagstruct_eof(t)) {
- pa_context_fail(o->context, PA_ERR_PROTOCOL);
- goto finish;
+ if (o->context->version >= 13 &&
+ o->stream->direction == PA_STREAM_PLAYBACK)
+ if (pa_tagstruct_getu64(t, &underrun_for) < 0 ||
+ pa_tagstruct_getu64(t, &playing_for) < 0) {
- } else {
- o->stream->timing_info_valid = 1;
+ pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
+
+ if (!pa_tagstruct_eof(t)) {
+ pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+ o->stream->timing_info_valid = TRUE;
+ i->write_index_corrupt = FALSE;
+ i->read_index_corrupt = FALSE;
+
+ i->playing = (int) playing;
+ i->since_underrun = (int64_t) (playing ? playing_for : underrun_for);
pa_gettimeofday(&now);
@@ -1035,22 +1368,22 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command,
else
i->transport_usec = pa_timeval_diff(&now, &remote);
- i->synchronized_clocks = 1;
+ i->synchronized_clocks = TRUE;
i->timestamp = remote;
} else {
/* clocks are not synchronized, let's estimate latency then */
i->transport_usec = pa_timeval_diff(&now, &local)/2;
- i->synchronized_clocks = 0;
+ i->synchronized_clocks = FALSE;
i->timestamp = local;
pa_timeval_add(&i->timestamp, i->transport_usec);
}
/* Invalidate read and write indexes if necessary */
if (tag < o->stream->read_index_not_before)
- i->read_index_corrupt = 1;
+ i->read_index_corrupt = TRUE;
if (tag < o->stream->write_index_not_before)
- i->write_index_corrupt = 1;
+ i->write_index_corrupt = TRUE;
if (o->stream->direction == PA_STREAM_PLAYBACK) {
/* Write index correction */
@@ -1058,8 +1391,8 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command,
int n, j;
uint32_t ctag = tag;
- /* Go through the saved correction values and add up the total correction.*/
-
+ /* Go through the saved correction values and add up the
+ * total correction.*/
for (n = 0, j = o->stream->current_write_index_correction+1;
n < PA_MAX_WRITE_INDEX_CORRECTIONS;
n++, j = (j + 1) % PA_MAX_WRITE_INDEX_CORRECTIONS) {
@@ -1075,50 +1408,68 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command,
/* Now fix the write index */
if (o->stream->write_index_corrections[j].corrupt) {
/* A corrupting seek was made */
- i->write_index = 0;
- i->write_index_corrupt = 1;
+ i->write_index_corrupt = TRUE;
} else if (o->stream->write_index_corrections[j].absolute) {
/* An absolute seek was made */
i->write_index = o->stream->write_index_corrections[j].value;
- i->write_index_corrupt = 0;
+ i->write_index_corrupt = FALSE;
} else if (!i->write_index_corrupt) {
/* A relative seek was made */
i->write_index += o->stream->write_index_corrections[j].value;
}
}
+
+ /* Clear old correction entries */
+ for (n = 0; n < PA_MAX_WRITE_INDEX_CORRECTIONS; n++) {
+ if (!o->stream->write_index_corrections[n].valid)
+ continue;
+
+ if (o->stream->write_index_corrections[n].tag <= tag)
+ o->stream->write_index_corrections[n].valid = FALSE;
+ }
}
if (o->stream->direction == PA_STREAM_RECORD) {
/* Read index correction */
if (!i->read_index_corrupt)
- i->read_index -= pa_memblockq_get_length(o->stream->record_memblockq);
+ i->read_index -= (int64_t) pa_memblockq_get_length(o->stream->record_memblockq);
}
- o->stream->cached_time_valid = 0;
- }
+ /* Update smoother */
+ if (o->stream->smoother) {
+ pa_usec_t u, x;
+
+ u = x = pa_rtclock_usec() - i->transport_usec;
+
+ if (o->stream->direction == PA_STREAM_PLAYBACK && o->context->version >= 13) {
+ pa_usec_t su;
+
+ /* If we weren't playing then it will take some time
+ * until the audio will actually come out through the
+ * speakers. Since we follow that timing here, we need
+ * to try to fix this up */
- o->stream->auto_timing_update_requested = 0;
-/* pa_log("post corrupt w:%u r:%u\n", i->write_index_corrupt || !o->stream->timing_info_valid, i->read_index_corrupt || !o->stream->timing_info_valid); */
+ su = pa_bytes_to_usec((uint64_t) i->since_underrun, &o->stream->sample_spec);
- /* Clear old correction entries */
- if (o->stream->direction == PA_STREAM_PLAYBACK) {
- int n;
+ if (su < i->sink_usec)
+ x += i->sink_usec - su;
+ }
+
+ if (!i->playing)
+ pa_smoother_pause(o->stream->smoother, x);
- for (n = 0; n < PA_MAX_WRITE_INDEX_CORRECTIONS; n++) {
- if (!o->stream->write_index_corrections[n].valid)
- continue;
+ /* Update the smoother */
+ if ((o->stream->direction == PA_STREAM_PLAYBACK && !i->read_index_corrupt) ||
+ (o->stream->direction == PA_STREAM_RECORD && !i->write_index_corrupt))
+ pa_smoother_put(o->stream->smoother, u, calc_time(o->stream, TRUE));
- if (o->stream->write_index_corrections[n].tag <= tag)
- o->stream->write_index_corrections[n].valid = 0;
+ if (i->playing)
+ pa_smoother_resume(o->stream->smoother, x);
}
}
- /* First, let's complete the initialization, if necessary. */
- if (o->stream->state == PA_STREAM_CREATING) {
- o->stream->timing_info_not_ready = FALSE;
- create_stream_complete(o->stream);
- }
+ o->stream->auto_timing_update_requested = FALSE;
if (o->stream->latency_update_callback)
o->stream->latency_update_callback(o->stream, o->stream->latency_update_userdata);
@@ -1158,7 +1509,7 @@ pa_operation* pa_stream_update_timing_info(pa_stream *s, pa_stream_success_cb_t
t = pa_tagstruct_command(
s->context,
- s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_GET_PLAYBACK_LATENCY : PA_COMMAND_GET_RECORD_LATENCY,
+ (uint32_t) (s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_GET_PLAYBACK_LATENCY : PA_COMMAND_GET_RECORD_LATENCY),
&tag);
pa_tagstruct_putu32(t, s->channel);
pa_tagstruct_put_timeval(t, pa_gettimeofday(&now));
@@ -1168,20 +1519,20 @@ pa_operation* pa_stream_update_timing_info(pa_stream *s, pa_stream_success_cb_t
if (s->direction == PA_STREAM_PLAYBACK) {
/* Fill in initial correction data */
- o->stream->current_write_index_correction = cidx;
- o->stream->write_index_corrections[cidx].valid = 1;
- o->stream->write_index_corrections[cidx].tag = tag;
- o->stream->write_index_corrections[cidx].absolute = 0;
- o->stream->write_index_corrections[cidx].value = 0;
- o->stream->write_index_corrections[cidx].corrupt = 0;
- }
-/* pa_log("requesting update %u\n", tag); */
+ s->current_write_index_correction = cidx;
+
+ s->write_index_corrections[cidx].valid = TRUE;
+ s->write_index_corrections[cidx].absolute = FALSE;
+ s->write_index_corrections[cidx].corrupt = FALSE;
+ s->write_index_corrections[cidx].tag = tag;
+ s->write_index_corrections[cidx].value = 0;
+ }
return o;
}
-void pa_stream_disconnect_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+void pa_stream_disconnect_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_stream *s = userdata;
pa_assert(pd);
@@ -1191,7 +1542,7 @@ void pa_stream_disconnect_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UN
pa_stream_ref(s);
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(s->context, command, t) < 0)
+ if (pa_context_handle_error(s->context, command, t, FALSE) < 0)
goto finish;
pa_stream_set_state(s, PA_STREAM_FAILED);
@@ -1221,8 +1572,8 @@ int pa_stream_disconnect(pa_stream *s) {
t = pa_tagstruct_command(
s->context,
- s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_DELETE_PLAYBACK_STREAM :
- (s->direction == PA_STREAM_RECORD ? PA_COMMAND_DELETE_RECORD_STREAM : PA_COMMAND_DELETE_UPLOAD_STREAM),
+ (uint32_t) (s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_DELETE_PLAYBACK_STREAM :
+ (s->direction == PA_STREAM_RECORD ? PA_COMMAND_DELETE_RECORD_STREAM : PA_COMMAND_DELETE_UPLOAD_STREAM)),
&tag);
pa_tagstruct_putu32(t, s->channel);
pa_pstream_send_tagstruct(s->context->pstream, t);
@@ -1236,6 +1587,9 @@ void pa_stream_set_read_callback(pa_stream *s, pa_stream_request_cb_t cb, void *
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
s->read_callback = cb;
s->read_userdata = userdata;
}
@@ -1244,6 +1598,9 @@ void pa_stream_set_write_callback(pa_stream *s, pa_stream_request_cb_t cb, void
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
s->write_callback = cb;
s->write_userdata = userdata;
}
@@ -1252,6 +1609,9 @@ void pa_stream_set_state_callback(pa_stream *s, pa_stream_notify_cb_t cb, void *
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
s->state_callback = cb;
s->state_userdata = userdata;
}
@@ -1260,6 +1620,9 @@ void pa_stream_set_overflow_callback(pa_stream *s, pa_stream_notify_cb_t cb, voi
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
s->overflow_callback = cb;
s->overflow_userdata = userdata;
}
@@ -1268,6 +1631,9 @@ void pa_stream_set_underflow_callback(pa_stream *s, pa_stream_notify_cb_t cb, vo
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
s->underflow_callback = cb;
s->underflow_userdata = userdata;
}
@@ -1276,6 +1642,9 @@ void pa_stream_set_latency_update_callback(pa_stream *s, pa_stream_notify_cb_t c
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
s->latency_update_callback = cb;
s->latency_update_userdata = userdata;
}
@@ -1284,6 +1653,9 @@ void pa_stream_set_moved_callback(pa_stream *s, pa_stream_notify_cb_t cb, void *
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
s->moved_callback = cb;
s->moved_userdata = userdata;
}
@@ -1292,11 +1664,25 @@ void pa_stream_set_suspended_callback(pa_stream *s, pa_stream_notify_cb_t cb, vo
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
s->suspended_callback = cb;
s->suspended_userdata = userdata;
}
-void pa_stream_simple_ack_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+void pa_stream_set_started_callback(pa_stream *s, pa_stream_notify_cb_t cb, void *userdata) {
+ pa_assert(s);
+ pa_assert(PA_REFCNT_VALUE(s) >= 1);
+
+ if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
+ return;
+
+ s->started_callback = cb;
+ s->started_userdata = userdata;
+}
+
+void pa_stream_simple_ack_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int success = 1;
@@ -1308,7 +1694,7 @@ void pa_stream_simple_ack_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UN
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
success = 0;
@@ -1344,15 +1730,18 @@ pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, voi
t = pa_tagstruct_command(
s->context,
- s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_CORK_PLAYBACK_STREAM : PA_COMMAND_CORK_RECORD_STREAM,
+ (uint32_t) (s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_CORK_PLAYBACK_STREAM : PA_COMMAND_CORK_RECORD_STREAM),
&tag);
pa_tagstruct_putu32(t, s->channel);
pa_tagstruct_put_boolean(t, !!b);
pa_pstream_send_tagstruct(s->context->pstream, t);
pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_stream_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
- if (s->direction == PA_STREAM_PLAYBACK)
- invalidate_indexes(s, 1, 0);
+ check_smoother_status(s, FALSE, FALSE, FALSE);
+
+ /* This might cause the indexes to hang/start again, hence
+ * let's request a timing update */
+ request_auto_timing_update(s, TRUE);
return o;
}
@@ -1383,24 +1772,28 @@ pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *use
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
- if ((o = stream_send_simple_command(s, s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_FLUSH_PLAYBACK_STREAM : PA_COMMAND_FLUSH_RECORD_STREAM, cb, userdata))) {
+ if (!(o = stream_send_simple_command(s, (uint32_t) (s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_FLUSH_PLAYBACK_STREAM : PA_COMMAND_FLUSH_RECORD_STREAM), cb, userdata)))
+ return NULL;
- if (s->direction == PA_STREAM_PLAYBACK) {
- if (s->write_index_corrections[s->current_write_index_correction].valid)
- s->write_index_corrections[s->current_write_index_correction].corrupt = 1;
+ if (s->direction == PA_STREAM_PLAYBACK) {
- if (s->timing_info_valid)
- s->timing_info.write_index_corrupt = 1;
+ if (s->write_index_corrections[s->current_write_index_correction].valid)
+ s->write_index_corrections[s->current_write_index_correction].corrupt = TRUE;
- if (s->buffer_attr.prebuf > 0)
- invalidate_indexes(s, 1, 0);
- else
- request_auto_timing_update(s, 1);
- } else
- invalidate_indexes(s, 0, 1);
- }
+ if (s->buffer_attr.prebuf > 0)
+ check_smoother_status(s, FALSE, FALSE, TRUE);
+
+ /* This will change the write index, but leave the
+ * read index untouched. */
+ invalidate_indexes(s, FALSE, TRUE);
+
+ } else
+ /* For record streams this has no influence on the write
+ * index, but the read index might jump. */
+ invalidate_indexes(s, TRUE, FALSE);
return o;
}
@@ -1411,11 +1804,16 @@ pa_operation* pa_stream_prebuf(pa_stream *s, pa_stream_success_cb_t cb, void *us
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->buffer_attr.prebuf > 0, PA_ERR_BADSTATE);
- if ((o = stream_send_simple_command(s, PA_COMMAND_PREBUF_PLAYBACK_STREAM, cb, userdata)))
- invalidate_indexes(s, 1, 0);
+ if (!(o = stream_send_simple_command(s, PA_COMMAND_PREBUF_PLAYBACK_STREAM, cb, userdata)))
+ return NULL;
+
+ /* This might cause the read index to hang again, hence
+ * let's request a timing update */
+ request_auto_timing_update(s, TRUE);
return o;
}
@@ -1426,19 +1824,22 @@ pa_operation* pa_stream_trigger(pa_stream *s, pa_stream_success_cb_t cb, void *u
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->buffer_attr.prebuf > 0, PA_ERR_BADSTATE);
- if ((o = stream_send_simple_command(s, PA_COMMAND_TRIGGER_PLAYBACK_STREAM, cb, userdata)))
- invalidate_indexes(s, 1, 0);
+ if (!(o = stream_send_simple_command(s, PA_COMMAND_TRIGGER_PLAYBACK_STREAM, cb, userdata)))
+ return NULL;
+
+ /* This might cause the read index to start moving again, hence
+ * let's request a timing update */
+ request_auto_timing_update(s, TRUE);
return o;
}
pa_operation* pa_stream_set_name(pa_stream *s, const char *name, pa_stream_success_cb_t cb, void *userdata) {
pa_operation *o;
- pa_tagstruct *t;
- uint32_t tag;
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
@@ -1447,22 +1848,32 @@ pa_operation* pa_stream_set_name(pa_stream *s, const char *name, pa_stream_succe
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
- o = pa_operation_new(s->context, s, (pa_operation_cb_t) cb, userdata);
+ if (s->context->version >= 13) {
+ pa_proplist *p = pa_proplist_new();
- t = pa_tagstruct_command(
- s->context,
- s->direction == PA_STREAM_RECORD ? PA_COMMAND_SET_RECORD_STREAM_NAME : PA_COMMAND_SET_PLAYBACK_STREAM_NAME,
- &tag);
- pa_tagstruct_putu32(t, s->channel);
- pa_tagstruct_puts(t, name);
- pa_pstream_send_tagstruct(s->context->pstream, t);
- pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_stream_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+ pa_proplist_sets(p, PA_PROP_MEDIA_NAME, name);
+ o = pa_stream_proplist_update(s, PA_UPDATE_REPLACE, p, cb, userdata);
+ pa_proplist_free(p);
+ } else {
+ pa_tagstruct *t;
+ uint32_t tag;
+
+ o = pa_operation_new(s->context, s, (pa_operation_cb_t) cb, userdata);
+ t = pa_tagstruct_command(
+ s->context,
+ (uint32_t) (s->direction == PA_STREAM_RECORD ? PA_COMMAND_SET_RECORD_STREAM_NAME : PA_COMMAND_SET_PLAYBACK_STREAM_NAME),
+ &tag);
+ pa_tagstruct_putu32(t, s->channel);
+ pa_tagstruct_puts(t, name);
+ pa_pstream_send_tagstruct(s->context->pstream, t);
+ pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_stream_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+ }
return o;
}
int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec) {
- pa_usec_t usec = 0;
+ pa_usec_t usec;
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
@@ -1473,65 +1884,10 @@ int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec) {
PA_CHECK_VALIDITY(s->context, s->direction != PA_STREAM_PLAYBACK || !s->timing_info.read_index_corrupt, PA_ERR_NODATA);
PA_CHECK_VALIDITY(s->context, s->direction != PA_STREAM_RECORD || !s->timing_info.write_index_corrupt, PA_ERR_NODATA);
- if (s->cached_time_valid)
- /* We alredy calculated the time value for this timing info, so let's reuse it */
- usec = s->cached_time;
- else {
- if (s->direction == PA_STREAM_PLAYBACK) {
- /* The last byte that was written into the output device
- * had this time value associated */
- usec = pa_bytes_to_usec(s->timing_info.read_index < 0 ? 0 : (uint64_t) s->timing_info.read_index, &s->sample_spec);
-
- if (!s->corked) {
- /* Because the latency info took a little time to come
- * to us, we assume that the real output time is actually
- * a little ahead */
- usec += s->timing_info.transport_usec;
-
- /* However, the output device usually maintains a buffer
- too, hence the real sample currently played is a little
- back */
- if (s->timing_info.sink_usec >= usec)
- usec = 0;
- else
- usec -= s->timing_info.sink_usec;
- }
-
- } else if (s->direction == PA_STREAM_RECORD) {
- /* The last byte written into the server side queue had
- * this time value associated */
- usec = pa_bytes_to_usec(s->timing_info.write_index < 0 ? 0 : (uint64_t) s->timing_info.write_index, &s->sample_spec);
-
- if (!s->corked) {
- /* Add transport latency */
- usec += s->timing_info.transport_usec;
-
- /* Add latency of data in device buffer */
- usec += s->timing_info.source_usec;
-
- /* If this is a monitor source, we need to correct the
- * time by the playback device buffer */
- if (s->timing_info.sink_usec >= usec)
- usec = 0;
- else
- usec -= s->timing_info.sink_usec;
- }
- }
-
- s->cached_time = usec;
- s->cached_time_valid = 1;
- }
-
- /* Interpolate if requested */
- if (s->flags & PA_STREAM_INTERPOLATE_TIMING) {
-
- /* We just add the time that passed since the latency info was
- * current */
- if (!s->corked && s->timing_info.playing) {
- struct timeval now;
- usec += pa_timeval_diff(pa_gettimeofday(&now), &s->timing_info.timestamp);
- }
- }
+ if (s->smoother)
+ usec = pa_smoother_get(s->smoother, pa_rtclock_usec());
+ else
+ usec = calc_time(s, FALSE);
/* Make sure the time runs monotonically */
if (!(s->flags & PA_STREAM_NOT_MONOTONOUS)) {
@@ -1591,7 +1947,7 @@ int pa_stream_get_latency(pa_stream *s, pa_usec_t *r_usec, int *negative) {
if (cindex < 0)
cindex = 0;
- c = pa_bytes_to_usec(cindex, &s->sample_spec);
+ c = pa_bytes_to_usec((uint64_t) cindex, &s->sample_spec);
if (s->direction == PA_STREAM_PLAYBACK)
*r_usec = time_counter_diff(s, c, t, negative);
@@ -1607,7 +1963,7 @@ const pa_timing_info* pa_stream_get_timing_info(pa_stream *s) {
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
- PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->timing_info_valid, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->timing_info_valid, PA_ERR_NODATA);
return &s->timing_info;
}
@@ -1632,12 +1988,12 @@ const pa_buffer_attr* pa_stream_get_buffer_attr(pa_stream *s) {
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
- PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->context->version >= 9, PA_ERR_NODATA);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->context->version >= 9, PA_ERR_NOTSUPPORTED);
return &s->buffer_attr;
}
-static void stream_set_buffer_attr_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+static void stream_set_buffer_attr_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int success = 1;
@@ -1649,12 +2005,11 @@ static void stream_set_buffer_attr_callback(pa_pdispatch *pd, uint32_t command,
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
success = 0;
} else {
-
if (o->stream->direction == PA_STREAM_PLAYBACK) {
if (pa_tagstruct_getu32(t, &o->stream->buffer_attr.maxlength) < 0 ||
pa_tagstruct_getu32(t, &o->stream->buffer_attr.tlength) < 0 ||
@@ -1671,17 +2026,24 @@ static void stream_set_buffer_attr_callback(pa_pdispatch *pd, uint32_t command,
}
}
+ if (o->stream->context->version >= 13) {
+ pa_usec_t usec;
+
+ if (pa_tagstruct_get_usec(t, &usec) < 0) {
+ pa_context_fail(o->context, PA_ERR_PROTOCOL);
+ goto finish;
+ }
+
+ if (o->stream->direction == PA_STREAM_RECORD)
+ o->stream->timing_info.configured_source_usec = usec;
+ else
+ o->stream->timing_info.configured_sink_usec = usec;
+ }
+
if (!pa_tagstruct_eof(t)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
goto finish;
}
-
- o->stream->manual_buffer_attr = TRUE;
- }
-
- if (o->stream->state == PA_STREAM_CREATING) {
- o->stream->buffer_attr_not_ready = FALSE;
- create_stream_complete(o->stream);
}
if (o->callback) {
@@ -1712,7 +2074,7 @@ pa_operation* pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr
t = pa_tagstruct_command(
s->context,
- s->direction == PA_STREAM_RECORD ? PA_COMMAND_SET_RECORD_STREAM_BUFFER_ATTR : PA_COMMAND_SET_PLAYBACK_STREAM_BUFFER_ATTR,
+ (uint32_t) (s->direction == PA_STREAM_RECORD ? PA_COMMAND_SET_RECORD_STREAM_BUFFER_ATTR : PA_COMMAND_SET_PLAYBACK_STREAM_BUFFER_ATTR),
&tag);
pa_tagstruct_putu32(t, s->channel);
@@ -1728,9 +2090,19 @@ pa_operation* pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr
else
pa_tagstruct_putu32(t, attr->fragsize);
+ if (s->context->version >= 13)
+ pa_tagstruct_put_boolean(t, !!(s->flags & PA_STREAM_ADJUST_LATENCY));
+
+ if (s->context->version >= 14)
+ pa_tagstruct_put_boolean(t, !!(s->flags & PA_STREAM_EARLY_REQUESTS));
+
pa_pstream_send_tagstruct(s->context->pstream, t);
pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, stream_set_buffer_attr_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+ /* This might cause changes in the read/write indexex, hence let's
+ * request a timing update */
+ request_auto_timing_update(s, TRUE);
+
return o;
}
@@ -1769,7 +2141,17 @@ int pa_stream_is_suspended(pa_stream *s) {
return s->suspended;
}
-static void stream_update_sample_rate_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+int pa_stream_is_corked(pa_stream *s) {
+ pa_assert(s);
+ pa_assert(PA_REFCNT_VALUE(s) >= 1);
+
+ PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
+
+ return s->corked;
+}
+
+static void stream_update_sample_rate_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int success = 1;
@@ -1781,7 +2163,7 @@ static void stream_update_sample_rate_callback(pa_pdispatch *pd, uint32_t comman
goto finish;
if (command != PA_COMMAND_REPLY) {
- if (pa_context_handle_error(o->context, command, t) < 0)
+ if (pa_context_handle_error(o->context, command, t, FALSE) < 0)
goto finish;
success = 0;
@@ -1826,7 +2208,7 @@ pa_operation *pa_stream_update_sample_rate(pa_stream *s, uint32_t rate, pa_strea
t = pa_tagstruct_command(
s->context,
- s->direction == PA_STREAM_RECORD ? PA_COMMAND_UPDATE_RECORD_STREAM_SAMPLE_RATE : PA_COMMAND_UPDATE_PLAYBACK_STREAM_SAMPLE_RATE,
+ (uint32_t) (s->direction == PA_STREAM_RECORD ? PA_COMMAND_UPDATE_RECORD_STREAM_SAMPLE_RATE : PA_COMMAND_UPDATE_PLAYBACK_STREAM_SAMPLE_RATE),
&tag);
pa_tagstruct_putu32(t, s->channel);
pa_tagstruct_putu32(t, rate);
@@ -1835,5 +2217,95 @@ pa_operation *pa_stream_update_sample_rate(pa_stream *s, uint32_t rate, pa_strea
pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, stream_update_sample_rate_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
return o;
+}
+
+pa_operation *pa_stream_proplist_update(pa_stream *s, pa_update_mode_t mode, pa_proplist *p, pa_stream_success_cb_t cb, void *userdata) {
+ pa_operation *o;
+ pa_tagstruct *t;
+ uint32_t tag;
+
+ pa_assert(s);
+ pa_assert(PA_REFCNT_VALUE(s) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, mode == PA_UPDATE_SET || mode == PA_UPDATE_MERGE || mode == PA_UPDATE_REPLACE, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->context->version >= 13, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(s->context, s, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(
+ s->context,
+ (uint32_t) (s->direction == PA_STREAM_RECORD ? PA_COMMAND_UPDATE_RECORD_STREAM_PROPLIST : PA_COMMAND_UPDATE_PLAYBACK_STREAM_PROPLIST),
+ &tag);
+ pa_tagstruct_putu32(t, s->channel);
+ pa_tagstruct_putu32(t, (uint32_t) mode);
+ pa_tagstruct_put_proplist(t, p);
+
+ pa_pstream_send_tagstruct(s->context->pstream, t);
+ pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_stream_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ /* Please note that we don't update s->proplist here, because we
+ * don't export that field */
+
+ return o;
+}
+
+pa_operation *pa_stream_proplist_remove(pa_stream *s, const char *const keys[], pa_stream_success_cb_t cb, void *userdata) {
+ pa_operation *o;
+ pa_tagstruct *t;
+ uint32_t tag;
+ const char * const*k;
+
+ pa_assert(s);
+ pa_assert(PA_REFCNT_VALUE(s) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, keys && keys[0], PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->context->version >= 13, PA_ERR_NOTSUPPORTED);
+
+ o = pa_operation_new(s->context, s, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(
+ s->context,
+ (uint32_t) (s->direction == PA_STREAM_RECORD ? PA_COMMAND_REMOVE_RECORD_STREAM_PROPLIST : PA_COMMAND_REMOVE_PLAYBACK_STREAM_PROPLIST),
+ &tag);
+ pa_tagstruct_putu32(t, s->channel);
+
+ for (k = keys; *k; k++)
+ pa_tagstruct_puts(t, *k);
+
+ pa_tagstruct_puts(t, NULL);
+
+ pa_pstream_send_tagstruct(s->context->pstream, t);
+ pa_pdispatch_register_reply(s->context->pdispatch, tag, DEFAULT_TIMEOUT, pa_stream_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ /* Please note that we don't update s->proplist here, because we
+ * don't export that field */
+
+ return o;
+}
+
+int pa_stream_set_monitor_stream(pa_stream *s, uint32_t sink_input_idx) {
+ pa_assert(s);
+ pa_assert(PA_REFCNT_VALUE(s) >= 1);
+
+ PA_CHECK_VALIDITY(s->context, sink_input_idx != PA_INVALID_INDEX, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY(s->context, s->context->version >= 13, PA_ERR_NOTSUPPORTED);
+
+ s->direct_on_input = sink_input_idx;
+
+ return 0;
+}
+
+uint32_t pa_stream_get_monitor_stream(pa_stream *s) {
+ pa_assert(s);
+ pa_assert(PA_REFCNT_VALUE(s) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->direct_on_input != PA_INVALID_INDEX, PA_ERR_BADSTATE, PA_INVALID_INDEX);
+ PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->context->version >= 13, PA_ERR_NOTSUPPORTED, PA_INVALID_INDEX);
+ return s->direct_on_input;
}
diff --git a/src/pulse/stream.h b/src/pulse/stream.h
index 94241a7..6cb363c 100644
--- a/src/pulse/stream.h
+++ b/src/pulse/stream.h
@@ -1,8 +1,6 @@
#ifndef foostreamhfoo
#define foostreamhfoo
-/* $Id: stream.h 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -72,35 +70,85 @@
*
* \subsection bufattr_subsec Buffer Attributes
*
- * Playback and record streams always have a server side buffer as
- * part of the data flow. The size of this buffer strikes a
- * compromise between low latency and sensitivity for buffer
+ * Playback and record streams always have a server-side buffer as
+ * part of the data flow. The size of this buffer needs to be chosen
+ * in a compromise between low latency and sensitivity for buffer
* overflows/underruns.
*
* The buffer metrics may be controlled by the application. They are
* described with a pa_buffer_attr structure which contains a number
* of fields:
*
- * \li maxlength - The absolute maximum number of bytes that can be stored in
- * the buffer. If this value is exceeded then data will be
- * lost.
- * \li tlength - The target length of a playback buffer. The server will only
- * send requests for more data as long as the buffer has less
- * than this number of bytes of data.
+ * \li maxlength - The absolute maximum number of bytes that can be
+ * stored in the buffer. If this value is exceeded
+ * then data will be lost. It is recommended to pass
+ * (uint32_t) -1 here which will cause the server to
+ * fill in the maximum possible value.
+ *
+ * \li tlength - The target fill level of the playback buffer. The
+ * server will only send requests for more data as long
+ * as the buffer has less than this number of bytes of
+ * data. If you pass (uint32_t) -1 (which is
+ * recommended) here the server will choose the longest
+ * target buffer fill level possible to minimize the
+ * number of necessary wakeups and maximize drop-out
+ * safety. This can exceed 2s of buffering. For
+ * low-latency applications or applications where
+ * latency matters you should pass a proper value here.
+ *
* \li prebuf - Number of bytes that need to be in the buffer before
- * playback will commence. Start of playback can be forced using
- * pa_stream_trigger() even though the prebuffer size hasn't been
- * reached. If a buffer underrun occurs, this prebuffering will be
- * again enabled. If the playback shall never stop in case of a buffer
- * underrun, this value should be set to 0. In that case the read
- * index of the output buffer overtakes the write index, and hence the
- * fill level of the buffer is negative.
- * \li minreq - Minimum free number of the bytes in the playback buffer before
- * the server will request more data.
- * \li fragsize - Maximum number of bytes that the server will push in one
- * chunk for record streams.
- *
- * The server side playback buffers are indexed by a write and a read
+ * playback will commence. Start of playback can be
+ * forced using pa_stream_trigger() even though the
+ * prebuffer size hasn't been reached. If a buffer
+ * underrun occurs, this prebuffering will be again
+ * enabled. If the playback shall never stop in case of a
+ * buffer underrun, this value should be set to 0. In
+ * that case the read index of the output buffer
+ * overtakes the write index, and hence the fill level of
+ * the buffer is negative. If you pass (uint32_t) -1 here
+ * (which is recommended) the server will choose the same
+ * value as tlength here.
+ *
+ * \li minreq - Minimum free number of the bytes in the playback
+ * buffer before the server will request more data. It is
+ * recommended to fill in (uint32_t) -1 here. This value
+ * influences how much time the sound server has to move
+ * data from the per-stream server-side playback buffer
+ * to the hardware playback buffer.
+ *
+ * \li fragsize - Maximum number of bytes that the server will push in
+ * one chunk for record streams. If you pass (uint32_t)
+ * -1 (which is recommended) here, the server will
+ * choose the longest fragment setting possible to
+ * minimize the number of necessary wakeups and
+ * maximize drop-out safety. This can exceed 2s of
+ * buffering. For low-latency applications or
+ * applications where latency matters you should pass a
+ * proper value here.
+ *
+ * If PA_STREAM_ADJUST_LATENCY is set, then the tlength/fragsize
+ * parameters will be interpreted slightly differently than described
+ * above when passed to pa_stream_connect_record() and
+ * pa_stream_connect_playback(): the overall latency that is comprised
+ * of both the server side playback buffer length, the hardware
+ * playback buffer length and additional latencies will be adjusted in
+ * a way that it matches tlength resp. fragsize. Set
+ * PA_STREAM_ADJUST_LATENCY if you want to control the overall
+ * playback latency for your stream. Unset it if you want to control
+ * only the latency induced by the server-side, rewritable playback
+ * buffer. The server will try to fulfill the clients latency requests
+ * as good as possible. However if the underlying hardware cannot
+ * change the hardware buffer length or only in a limited range, the
+ * actually resulting latency might be different from what the client
+ * requested. Thus, for synchronization clients always need to check
+ * the actual measured latency via pa_stream_get_latency() or a
+ * similar call, and not make any assumptions. about the latency
+ * available. The function pa_stream_get_buffer_attr() will always
+ * return the actual size of the server-side per-stream buffer in
+ * tlength/fragsize, regardless whether PA_STREAM_ADJUST_LATENCY is
+ * set or not.
+ *
+ * The server-side per-stream playback buffers are indexed by a write and a read
* index. The application writes to the write index and the sound
* device reads from the read index. The read index is increased
* monotonically, while the write index may be freely controlled by
@@ -198,10 +246,10 @@
* accordingly.
*
* The raw timing data in the pa_timing_info structure is usually hard
- * to deal with. Therefore a more simplistic interface is available:
+ * to deal with. Therefore a simpler interface is available:
* you can call pa_stream_get_time() or pa_stream_get_latency(). The
* former will return the current playback time of the hardware since
- * the stream has been started. The latter returns the time a sample
+ * the stream has been started. The latter returns the overall time a sample
* that you write now takes to be played by the hardware. These two
* functions base their calculations on the same data that is returned
* by pa_stream_get_timing_info(). Hence the same rules for keeping
@@ -276,13 +324,25 @@ typedef void (*pa_stream_request_cb_t)(pa_stream *p, size_t bytes, void *userdat
/** A generic notification callback */
typedef void (*pa_stream_notify_cb_t)(pa_stream *p, void *userdata);
-/** Create a new, unconnected stream with the specified name and sample type */
+/** Create a new, unconnected stream with the specified name and
+ * sample type. It is recommended to use pa_stream_new_with_proplist()
+ * instead and specify some initial properties. */
pa_stream* pa_stream_new(
pa_context *c /**< The context to create this stream in */,
const char *name /**< A name for this stream */,
const pa_sample_spec *ss /**< The desired sample format */,
const pa_channel_map *map /**< The desired channel map, or NULL for default */);
+/** Create a new, unconnected stream with the specified name and
+ * sample type, and specify the the initial stream property
+ * list. \since 0.9.11 */
+pa_stream* pa_stream_new_with_proplist(
+ pa_context *c /**< The context to create this stream in */,
+ const char *name /**< A name for this stream */,
+ const pa_sample_spec *ss /**< The desired sample format */,
+ const pa_channel_map *map /**< The desired channel map, or NULL for default */,
+ pa_proplist *p /**< The initial property list */);
+
/** Decrease the reference counter by one */
void pa_stream_unref(pa_stream *s);
@@ -327,6 +387,10 @@ const char *pa_stream_get_device_name(pa_stream *s);
* server is older than 0.9.8. \since 0.9.8 */
int pa_stream_is_suspended(pa_stream *s);
+/** Return 1 if the this stream has been corked. This will return 0 if
+ * not, and negative on error. \since 0.9.11 */
+int pa_stream_is_corked(pa_stream *s);
+
/** Connect the stream to a sink */
int pa_stream_connect_playback(
pa_stream *s /**< The stream to connect to a sink */,
@@ -356,7 +420,7 @@ int pa_stream_disconnect(pa_stream *s);
int pa_stream_write(
pa_stream *p /**< The stream to use */,
const void *data /**< The data to write */,
- size_t bytes /**< The length of the data to write in bytes*/,
+ size_t nbytes /**< The length of the data to write in bytes*/,
pa_free_cb_t free_cb /**< A cleanup routine for the data or NULL to request an internal copy */,
int64_t offset, /**< Offset for seeking, must be 0 for upload streams */
pa_seek_mode_t seek /**< Seek mode, must be PA_SEEK_RELATIVE for upload streams */);
@@ -365,20 +429,20 @@ int pa_stream_write(
* data will point to the actual data and length will contain the size
* of the data in bytes (which can be less than a complete framgnet).
* Use pa_stream_drop() to actually remove the data from the
- * buffer. If no data is available will return a NULL pointer \since 0.8 */
+ * buffer. If no data is available will return a NULL pointer */
int pa_stream_peek(
pa_stream *p /**< The stream to use */,
const void **data /**< Pointer to pointer that will point to data */,
- size_t *bytes /**< The length of the data read in bytes */);
+ size_t *nbytes /**< The length of the data read in bytes */);
/** Remove the current fragment on record streams. It is invalid to do this without first
- * calling pa_stream_peek(). \since 0.8 */
+ * calling pa_stream_peek(). */
int pa_stream_drop(pa_stream *p);
/** Return the number of bytes that may be written using pa_stream_write() */
size_t pa_stream_writable_size(pa_stream *p);
-/** Return the number of bytes that may be read using pa_stream_read() \since 0.8 */
+/** Return the number of bytes that may be read using pa_stream_peek()*/
size_t pa_stream_readable_size(pa_stream *p);
/** Drain a playback stream. Use this for notification when the buffer is empty */
@@ -398,18 +462,25 @@ void pa_stream_set_state_callback(pa_stream *s, pa_stream_notify_cb_t cb, void *
void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata);
/** Set the callback function that is called when new data is available from the stream.
- * Return the number of bytes read. \since 0.8 */
+ * Return the number of bytes read.*/
void pa_stream_set_read_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata);
-/** Set the callback function that is called when a buffer overflow happens. (Only for playback streams) \since 0.8 */
+/** Set the callback function that is called when a buffer overflow happens. (Only for playback streams) */
void pa_stream_set_overflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
-/** Set the callback function that is called when a buffer underflow happens. (Only for playback streams) \since 0.8 */
+/** Set the callback function that is called when a buffer underflow happens. (Only for playback streams) */
void pa_stream_set_underflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
+/** Set the callback function that is called when a the server starts
+ * playback after an underrun or on initial startup. This only informs
+ * that audio is flowing again, it is no indication that audio started
+ * to reach the speakers already. (Only for playback streams). \since
+ * 0.9.11 */
+void pa_stream_set_started_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
+
/** Set the callback function that is called whenever a latency
* information update happens. Useful on PA_STREAM_AUTO_TIMING_UPDATE
- * streams only. (Only for playback streams) \since 0.8.2 */
+ * streams only. (Only for playback streams) */
void pa_stream_set_latency_update_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
/** Set the callback function that is called whenever the stream is
@@ -429,24 +500,25 @@ void pa_stream_set_moved_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *
* 0.9.8. \since 0.9.8 */
void pa_stream_set_suspended_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
-/** Pause (or resume) playback of this stream temporarily. Available on both playback and recording streams. \since 0.3 */
+/** Pause (or resume) playback of this stream temporarily. Available on both playback and recording streams. */
pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata);
/** Flush the playback buffer of this stream. Most of the time you're
- * better off using the parameter delta of pa_stream_write() instead of this
- * function. Available on both playback and recording streams. \since 0.3 */
+ * better off using the parameter delta of pa_stream_write() instead
+ * of this function. Available on both playback and recording
+ * streams. */
pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
/** Reenable prebuffering as specified in the pa_buffer_attr
- * structure. Available for playback streams only. \since 0.6 */
+ * structure. Available for playback streams only. */
pa_operation* pa_stream_prebuf(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
/** Request immediate start of playback on this stream. This disables
- * prebuffering as specified in the pa_buffer_attr
- * structure, temporarily. Available for playback streams only. \since 0.3 */
+ * prebuffering as specified in the pa_buffer_attr structure,
+ * temporarily. Available for playback streams only. */
pa_operation* pa_stream_trigger(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
-/** Rename the stream. \since 0.5 */
+/** Rename the stream. */
pa_operation* pa_stream_set_name(pa_stream *s, const char *name, pa_stream_success_cb_t cb, void *userdata);
/** Return the current playback/recording time. This is based on the
@@ -463,13 +535,13 @@ pa_operation* pa_stream_set_name(pa_stream *s, const char *name, pa_stream_succe
* be disabled by using PA_STREAM_NOT_MONOTONOUS. This may be
* desirable to deal better with bad estimations of transport
* latencies, but may have strange effects if the application is not
- * able to deal with time going 'backwards'. \since 0.6 */
+ * able to deal with time going 'backwards'. */
int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec);
/** Return the total stream latency. This function is based on
* pa_stream_get_time(). In case the stream is a monitoring stream the
* result can be negative, i.e. the captured samples are not yet
- * played. In this case *negative is set to 1. \since 0.6 */
+ * played. In this case *negative is set to 1. */
int pa_stream_get_latency(pa_stream *s, pa_usec_t *r_usec, int *negative);
/** Return the latest raw timing data structure. The returned pointer
@@ -481,18 +553,23 @@ int pa_stream_get_latency(pa_stream *s, pa_usec_t *r_usec, int *negative);
* function will fail with PA_ERR_NODATA. Please note that the
* write_index member field (and only this field) is updated on each
* pa_stream_write() call, not just when a timing update has been
- * recieved. \since 0.8 */
+ * recieved. */
const pa_timing_info* pa_stream_get_timing_info(pa_stream *s);
-/** Return a pointer to the stream's sample specification. \since 0.6 */
+/** Return a pointer to the stream's sample specification. */
const pa_sample_spec* pa_stream_get_sample_spec(pa_stream *s);
-/** Return a pointer to the stream's channel map. \since 0.8 */
+/** Return a pointer to the stream's channel map. */
const pa_channel_map* pa_stream_get_channel_map(pa_stream *s);
-/** Return the buffer metrics of the stream. Only valid after the
- * stream has been connected successfuly and if the server is at least
- * PulseAudio 0.9. \since 0.9.0 */
+/** Return the per-stream server-side buffer metrics of the
+ * stream. Only valid after the stream has been connected successfuly
+ * and if the server is at least PulseAudio 0.9. This will return the
+ * actual configured buffering metrics, which may differ from what was
+ * requested during pa_stream_connect_record() or
+ * pa_stream_connect_playback(). This call will always return the
+ * actually per-stream server-side buffer metrics, regardless whether
+ * PA_STREAM_ADJUST_LATENCY is set or not. \since 0.9.0 */
const pa_buffer_attr* pa_stream_get_buffer_attr(pa_stream *s);
/** Change the buffer metrics of the stream during playback. The
@@ -500,16 +577,40 @@ const pa_buffer_attr* pa_stream_get_buffer_attr(pa_stream *s);
* requested. The selected metrics may be queried with
* pa_stream_get_buffer_attr() as soon as the callback is called. Only
* valid after the stream has been connected successfully and if the
- * server is at least PulseAudio 0.9.8. \since 0.9.8 */
+ * server is at least PulseAudio 0.9.8. Please be aware of the
+ * slightly different semantics of the call depending whether
+ * PA_STREAM_ADJUST_LATENCY is set or not. \since 0.9.8 */
pa_operation *pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr, pa_stream_success_cb_t cb, void *userdata);
-/* Change the stream sampling rate during playback. You need to pass
+/** Change the stream sampling rate during playback. You need to pass
* PA_STREAM_VARIABLE_RATE in the flags parameter of
* pa_stream_connect() if you plan to use this function. Only valid
* after the stream has been connected successfully and if the server
* is at least PulseAudio 0.9.8. \since 0.9.8 */
pa_operation *pa_stream_update_sample_rate(pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata);
+/** Update the property list of the sink input/source output of this
+ * stream, adding new entries. Please note that it is highly
+ * recommended to set as much properties initially via
+ * pa_stream_new_with_proplist() as possible instead a posteriori with
+ * this function, since that information may then be used to route
+ * this stream to the right device. \since 0.9.11 */
+pa_operation *pa_stream_proplist_update(pa_stream *s, pa_update_mode_t mode, pa_proplist *p, pa_stream_success_cb_t cb, void *userdata);
+
+/** Update the property list of the sink input/source output of this
+ * stream, remove entries. \since 0.9.11 */
+pa_operation *pa_stream_proplist_remove(pa_stream *s, const char *const keys[], pa_stream_success_cb_t cb, void *userdata);
+
+/** For record streams connected to a monitor source: monitor only a
+ * very specific sink input of the sink. Thus function needs to be
+ * called before pa_stream_connect_record() is called. \since
+ * 0.9.11 */
+int pa_stream_set_monitor_stream(pa_stream *s, uint32_t sink_input_idx);
+
+/** Return what has been set with pa_stream_set_monitor_stream()
+ * ebfore. \since 0.9.11 */
+uint32_t pa_stream_get_monitor_stream(pa_stream *s);
+
PA_C_DECL_END
#endif
diff --git a/src/pulse/subscribe.c b/src/pulse/subscribe.c
index c0f1427..e12d144 100644
--- a/src/pulse/subscribe.c
+++ b/src/pulse/subscribe.c
@@ -1,5 +1,3 @@
-/* $Id: subscribe.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -27,7 +25,8 @@
#include <stdio.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
+
#include <pulsecore/macro.h>
#include <pulsecore/pstream-util.h>
@@ -35,7 +34,7 @@
#include "subscribe.h"
-void pa_command_subscribe_event(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+void pa_command_subscribe_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_context *c = userdata;
pa_subscription_event_type_t e;
uint32_t idx;
@@ -62,7 +61,6 @@ finish:
pa_context_unref(c);
}
-
pa_operation* pa_context_subscribe(pa_context *c, pa_subscription_mask_t m, pa_context_success_cb_t cb, void *userdata) {
pa_operation *o;
pa_tagstruct *t;
@@ -87,6 +85,9 @@ void pa_context_set_subscribe_callback(pa_context *c, pa_context_subscribe_cb_t
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ if (c->state == PA_CONTEXT_TERMINATED || c->state == PA_CONTEXT_FAILED)
+ return;
+
c->subscribe_callback = cb;
c->subscribe_userdata = userdata;
}
diff --git a/src/pulse/subscribe.h b/src/pulse/subscribe.h
index 6b4b55f..0e4be8c 100644
--- a/src/pulse/subscribe.h
+++ b/src/pulse/subscribe.h
@@ -1,8 +1,6 @@
#ifndef foosubscribehfoo
#define foosubscribehfoo
-/* $Id: subscribe.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c
index 76bb120..fb73ff1 100644
--- a/src/pulse/thread-mainloop.c
+++ b/src/pulse/thread-mainloop.c
@@ -1,5 +1,3 @@
-/* $Id: thread-mainloop.c 2059 2007-11-14 16:11:51Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -37,6 +35,7 @@
#include <pulse/xmalloc.h>
#include <pulse/mainloop.h>
+#include <pulse/i18n.h>
#include <pulsecore/log.h>
#include <pulsecore/hashmap.h>
@@ -96,6 +95,8 @@ static void thread(void *userdata) {
pa_threaded_mainloop *pa_threaded_mainloop_new(void) {
pa_threaded_mainloop *m;
+ pa_init_i18n();
+
m = pa_xnew(pa_threaded_mainloop, 1);
if (!(m->real_mainloop = pa_mainloop_new())) {
diff --git a/src/pulse/thread-mainloop.h b/src/pulse/thread-mainloop.h
index fbc1423..521e29b 100644
--- a/src/pulse/thread-mainloop.h
+++ b/src/pulse/thread-mainloop.h
@@ -1,8 +1,6 @@
#ifndef foothreadmainloophfoo
#define foothreadmainloophfoo
-/* $Id: thread-mainloop.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulse/timeval.c b/src/pulse/timeval.c
index 1db6bbe..376cf13 100644
--- a/src/pulse/timeval.c
+++ b/src/pulse/timeval.c
@@ -1,5 +1,3 @@
-/* $Id: timeval.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -92,13 +90,13 @@ pa_usec_t pa_timeval_diff(const struct timeval *a, const struct timeval *b) {
}
/* Calculate the second difference*/
- r = ((pa_usec_t) a->tv_sec - b->tv_sec) * PA_USEC_PER_SEC;
+ r = ((pa_usec_t) a->tv_sec - (pa_usec_t) b->tv_sec) * PA_USEC_PER_SEC;
/* Calculate the microsecond difference */
if (a->tv_usec > b->tv_usec)
- r += ((pa_usec_t) a->tv_usec - b->tv_usec);
+ r += ((pa_usec_t) a->tv_usec - (pa_usec_t) b->tv_usec);
else if (a->tv_usec < b->tv_usec)
- r -= ((pa_usec_t) b->tv_usec - a->tv_usec);
+ r -= ((pa_usec_t) b->tv_usec - (pa_usec_t) a->tv_usec);
return r;
}
@@ -134,15 +132,33 @@ struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v) {
pa_assert(tv);
secs = (unsigned long) (v/PA_USEC_PER_SEC);
- tv->tv_sec += secs;
+ tv->tv_sec += (time_t) secs;
v -= ((pa_usec_t) secs) * PA_USEC_PER_SEC;
tv->tv_usec += (suseconds_t) v;
/* Normalize */
- while (tv->tv_usec >= PA_USEC_PER_SEC) {
+ while ((unsigned) tv->tv_usec >= PA_USEC_PER_SEC) {
tv->tv_sec++;
- tv->tv_usec -= PA_USEC_PER_SEC;
+ tv->tv_usec -= (suseconds_t) PA_USEC_PER_SEC;
+ }
+
+ return tv;
+}
+
+struct timeval* pa_timeval_sub(struct timeval *tv, pa_usec_t v) {
+ unsigned long secs;
+ pa_assert(tv);
+
+ secs = (unsigned long) (v/PA_USEC_PER_SEC);
+ tv->tv_sec -= (time_t) secs;
+ v -= ((pa_usec_t) secs) * PA_USEC_PER_SEC;
+
+ if (tv->tv_usec >= (suseconds_t) v)
+ tv->tv_usec -= (suseconds_t) v;
+ else {
+ tv->tv_sec --;
+ tv->tv_usec += (suseconds_t) (PA_USEC_PER_SEC - v);
}
return tv;
@@ -151,8 +167,8 @@ struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v) {
struct timeval* pa_timeval_store(struct timeval *tv, pa_usec_t v) {
pa_assert(tv);
- tv->tv_sec = v / PA_USEC_PER_SEC;
- tv->tv_usec = v % PA_USEC_PER_SEC;
+ tv->tv_sec = (time_t) (v / PA_USEC_PER_SEC);
+ tv->tv_usec = (suseconds_t) (v % PA_USEC_PER_SEC);
return tv;
}
diff --git a/src/pulse/timeval.h b/src/pulse/timeval.h
index d0db9d4..ee39829 100644
--- a/src/pulse/timeval.h
+++ b/src/pulse/timeval.h
@@ -1,8 +1,6 @@
#ifndef footimevalhfoo
#define footimevalhfoo
-/* $Id: timeval.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,6 +24,7 @@
***/
#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
#include <pulse/sample.h>
/** \file
@@ -33,10 +32,12 @@
PA_C_DECL_BEGIN
-#define PA_MSEC_PER_SEC 1000
-#define PA_USEC_PER_SEC 1000000
-#define PA_NSEC_PER_SEC 1000000000
-#define PA_USEC_PER_MSEC 1000
+#define PA_MSEC_PER_SEC ((pa_usec_t) 1000ULL)
+#define PA_USEC_PER_SEC ((pa_usec_t) 1000000ULL)
+#define PA_NSEC_PER_SEC ((pa_usec_t) 1000000000ULL)
+#define PA_USEC_PER_MSEC ((pa_usec_t) 1000ULL)
+#define PA_NSEC_PER_MSEC ((pa_usec_t) 1000000ULL)
+#define PA_NSEC_PER_USEC ((pa_usec_t) 1000ULL)
struct timeval;
@@ -54,7 +55,10 @@ int pa_timeval_cmp(const struct timeval *a, const struct timeval *b) PA_GCC_PURE
pa_usec_t pa_timeval_age(const struct timeval *tv);
/** Add the specified time inmicroseconds to the specified timeval structure */
-struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v) PA_GCC_PURE;
+struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v);
+
+/** Subtract the specified time inmicroseconds to the specified timeval structure. \since 0.9.11 */
+struct timeval* pa_timeval_sub(struct timeval *tv, pa_usec_t v);
/** Store the specified uec value in the timeval struct. \since 0.9.7 */
struct timeval* pa_timeval_store(struct timeval *tv, pa_usec_t v);
diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c
index 8169bbe..7671be4 100644
--- a/src/pulse/utf8.c
+++ b/src/pulse/utf8.c
@@ -1,5 +1,3 @@
-/* $Id: utf8.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -66,24 +64,24 @@
#define FILTER_CHAR '_'
-static inline int is_unicode_valid(uint32_t ch) {
+static inline pa_bool_t is_unicode_valid(uint32_t ch) {
if (ch >= 0x110000) /* End of unicode space */
- return 0;
+ return FALSE;
if ((ch & 0xFFFFF800) == 0xD800) /* Reserved area for UTF-16 */
- return 0;
+ return FALSE;
if ((ch >= 0xFDD0) && (ch <= 0xFDEF)) /* Reserved */
- return 0;
+ return FALSE;
if ((ch & 0xFFFE) == 0xFFFE) /* BOM (Byte Order Mark) */
- return 0;
+ return FALSE;
- return 1;
+ return TRUE;
}
-static inline int is_continuation_char(uint8_t ch) {
+static inline pa_bool_t is_continuation_char(uint8_t ch) {
if ((ch & 0xc0) != 0x80) /* 10xxxxxx */
- return 0;
- return 1;
+ return FALSE;
+ return TRUE;
}
static inline void merge_continuation_char(uint32_t *u_ch, uint8_t ch) {
@@ -111,17 +109,17 @@ static char* utf8_validate(const char *str, char *output) {
if ((*p & 0xe0) == 0xc0) { /* 110xxxxx two-char seq. */
size = 2;
min = 128;
- val = *p & 0x1e;
+ val = (uint32_t) (*p & 0x1e);
goto ONE_REMAINING;
} else if ((*p & 0xf0) == 0xe0) { /* 1110xxxx three-char seq.*/
size = 3;
min = (1 << 11);
- val = *p & 0x0f;
+ val = (uint32_t) (*p & 0x0f);
goto TWO_REMAINING;
} else if ((*p & 0xf8) == 0xf0) { /* 11110xxx four-char seq */
size = 4;
min = (1 << 16);
- val = *p & 0x07;
+ val = (uint32_t) (*p & 0x07);
} else {
size = 1;
goto error;
@@ -151,7 +149,7 @@ ONE_REMAINING:
goto error;
if (o) {
- memcpy(o, last, size);
+ memcpy(o, last, (size_t) size);
o += size - 1;
}
@@ -191,7 +189,7 @@ char* pa_utf8_filter (const char *str) {
char *new_str;
pa_assert(str);
- new_str = pa_xnew(char, strlen(str) + 1);
+ new_str = pa_xmalloc(strlen(str) + 1);
return utf8_validate(str, new_str);
}
@@ -214,7 +212,7 @@ static char* iconv_simple(const char *str, const char *to, const char *from) {
return NULL;
inlen = len = strlen(str) + 1;
- new_str = pa_xnew(char, len);
+ new_str = pa_xmalloc(len);
for (;;) {
inbuf = (ICONV_CONST char*) str; /* Brain dead prototype for iconv() */
diff --git a/src/pulse/utf8.h b/src/pulse/utf8.h
index 3f79862..6c7e7a5 100644
--- a/src/pulse/utf8.h
+++ b/src/pulse/utf8.h
@@ -1,8 +1,6 @@
#ifndef fooutf8hfoo
#define fooutf8hfoo
-/* $Id: utf8.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,6 +24,7 @@
***/
#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
/** \file
* UTF8 Validation functions
diff --git a/src/pulse/util.c b/src/pulse/util.c
index 565370e..b20ea46 100644
--- a/src/pulse/util.c
+++ b/src/pulse/util.c
@@ -1,5 +1,3 @@
-/* $Id: util.c 2185 2008-03-28 17:12:01Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -97,12 +95,15 @@ char *pa_get_user_name(char *s, size_t l) {
#elif defined(OS_IS_WIN32) /* HAVE_PWD_H */
DWORD size = sizeof(buf);
- if (!GetUserName(buf, &size))
+ if (!GetUserName(buf, &size)) {
+ errno = ENOENT;
return NULL;
+ }
p = buf;
#else /* HAVE_PWD_H */
+
return NULL;
#endif /* HAVE_PWD_H */
}
@@ -115,10 +116,8 @@ char *pa_get_host_name(char *s, size_t l) {
pa_assert(s);
pa_assert(l > 0);
- if (gethostname(s, l) < 0) {
- pa_log("gethostname(): %s", pa_cstrerror(errno));
+ if (gethostname(s, l) < 0)
return NULL;
- }
s[l-1] = 0;
return s;
@@ -142,20 +141,25 @@ char *pa_get_home_dir(char *s, size_t l) {
return pa_strlcpy(s, e, l);
#ifdef HAVE_PWD_H
+
+ errno = 0;
#ifdef HAVE_GETPWUID_R
if (getpwuid_r(getuid(), &pw, buf, sizeof(buf), &r) != 0 || !r) {
- pa_log("getpwuid_r() failed");
#else
/* XXX Not thread-safe, but needed on OSes (e.g. FreeBSD 4.X)
* that do not support getpwuid_r. */
if ((r = getpwuid(getuid())) == NULL) {
- pa_log("getpwuid_r() failed");
#endif
+ if (!errno)
+ errno = ENOENT;
+
return NULL;
}
return pa_strlcpy(s, r->pw_dir, l);
#else /* HAVE_PWD_H */
+
+ errno = ENOENT;
return NULL;
#endif
}
@@ -206,6 +210,7 @@ char *pa_get_binary_name(char *s, size_t l) {
}
#endif
+ errno = ENOENT;
return NULL;
}
@@ -255,8 +260,8 @@ int pa_msleep(unsigned long t) {
#elif defined(HAVE_NANOSLEEP)
struct timespec ts;
- ts.tv_sec = t/1000;
- ts.tv_nsec = (t % 1000) * 1000000;
+ ts.tv_sec = (time_t) (t/1000UL);
+ ts.tv_nsec = (long) ((t % 1000UL) * 1000000UL);
return nanosleep(&ts, NULL);
#else
diff --git a/src/pulse/util.h b/src/pulse/util.h
index 96aeb92..cf06d4f 100644
--- a/src/pulse/util.h
+++ b/src/pulse/util.h
@@ -1,8 +1,6 @@
#ifndef fooutilhfoo
#define fooutilhfoo
-/* $Id: util.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -28,6 +26,7 @@
#include <stddef.h>
#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
/** \file
* Assorted utility functions */
diff --git a/src/pulse/version.h b/src/pulse/version.h
index 88eab79..1ca28db 100644
--- a/src/pulse/version.h
+++ b/src/pulse/version.h
@@ -1,24 +1,22 @@
#ifndef fooversionhfoo /*-*-C-*-*/
#define fooversionhfoo
-/* $Id: version.h.in 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
Copyright 2004-2006 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
-
+
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
-
+
PulseAudio is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -37,19 +35,20 @@ PA_C_DECL_BEGIN
/** Return the version of the header files. Keep in mind that this is
a macro and not a function, so it is impossible to get the pointer of
it. */
-#define pa_get_headers_version() ("0.9.10")
+#define pa_get_headers_version() ("0.9.13")
-/** Return the version of the library the current application is linked to. */
+/** Return the version of the library the current application is
+ * linked to. */
const char* pa_get_library_version(void);
/** The current API version. Version 6 relates to Polypaudio
* 0.6. Prior versions (i.e. Polypaudio 0.5.1 and older) have
* PA_API_VERSION undefined. */
-#define PA_API_VERSION 11
+#define PA_API_VERSION 12
-/** The current protocol version. Version 8 relates to Polypaudio 0.8/PulseAudio 0.9.
- * \since 0.8 */
-#define PA_PROTOCOL_VERSION 12
+/** The current protocol version. Version 8 relates to Polypaudio
+ * 0.8/PulseAudio 0.9. */
+#define PA_PROTOCOL_VERSION 14
PA_C_DECL_END
diff --git a/src/pulse/version.h.in b/src/pulse/version.h.in
index 1fb9a46..e6226c4 100644
--- a/src/pulse/version.h.in
+++ b/src/pulse/version.h.in
@@ -1,24 +1,22 @@
#ifndef fooversionhfoo /*-*-C-*-*/
#define fooversionhfoo
-/* $Id: version.h.in 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
Copyright 2004-2006 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
-
+
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
-
+
PulseAudio is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -39,7 +37,8 @@ a macro and not a function, so it is impossible to get the pointer of
it. */
#define pa_get_headers_version() ("@PACKAGE_VERSION@")
-/** Return the version of the library the current application is linked to. */
+/** Return the version of the library the current application is
+ * linked to. */
const char* pa_get_library_version(void);
/** The current API version. Version 6 relates to Polypaudio
@@ -47,8 +46,8 @@ const char* pa_get_library_version(void);
* PA_API_VERSION undefined. */
#define PA_API_VERSION @PA_API_VERSION@
-/** The current protocol version. Version 8 relates to Polypaudio 0.8/PulseAudio 0.9.
- * \since 0.8 */
+/** The current protocol version. Version 8 relates to Polypaudio
+ * 0.8/PulseAudio 0.9. */
#define PA_PROTOCOL_VERSION @PA_PROTOCOL_VERSION@
PA_C_DECL_END
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index d3bedc3..99a85f4 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -1,5 +1,3 @@
-/* $Id: volume.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -28,6 +26,7 @@
#include <stdio.h>
#include <string.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/macro.h>
@@ -48,6 +47,19 @@ int pa_cvolume_equal(const pa_cvolume *a, const pa_cvolume *b) {
return 1;
}
+pa_cvolume* pa_cvolume_init(pa_cvolume *a) {
+ unsigned c;
+
+ pa_assert(a);
+
+ a->channels = 0;
+
+ for (c = 0; c < PA_CHANNELS_MAX; c++)
+ a->values[c] = (pa_volume_t) -1;
+
+ return a;
+}
+
pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v) {
int i;
@@ -55,7 +67,7 @@ pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v) {
pa_assert(channels > 0);
pa_assert(channels <= PA_CHANNELS_MAX);
- a->channels = channels;
+ a->channels = (uint8_t) channels;
for (i = 0; i < a->channels; i++)
a->values[i] = v;
@@ -76,17 +88,38 @@ pa_volume_t pa_cvolume_avg(const pa_cvolume *a) {
return (pa_volume_t) sum;
}
+pa_volume_t pa_cvolume_max(const pa_cvolume *a) {
+ pa_volume_t m = 0;
+ int i;
+ pa_assert(a);
+
+ for (i = 0; i < a->channels; i++)
+ if (a->values[i] > m)
+ m = a->values[i];
+
+ return m;
+}
+
pa_volume_t pa_sw_volume_multiply(pa_volume_t a, pa_volume_t b) {
- return pa_sw_volume_from_linear(pa_sw_volume_to_linear(a)* pa_sw_volume_to_linear(b));
+ return pa_sw_volume_from_linear(pa_sw_volume_to_linear(a) * pa_sw_volume_to_linear(b));
+}
+
+pa_volume_t pa_sw_volume_divide(pa_volume_t a, pa_volume_t b) {
+ double v = pa_sw_volume_to_linear(b);
+
+ if (v <= 0)
+ return 0;
+
+ return pa_sw_volume_from_linear(pa_sw_volume_to_linear(a) / v);
}
-#define USER_DECIBEL_RANGE 30
+#define USER_DECIBEL_RANGE 60
pa_volume_t pa_sw_volume_from_dB(double dB) {
- if (dB <= -USER_DECIBEL_RANGE)
+ if (isinf(dB) < 0 || dB <= -USER_DECIBEL_RANGE)
return PA_VOLUME_MUTED;
- return (pa_volume_t) ((dB/USER_DECIBEL_RANGE+1)*PA_VOLUME_NORM);
+ return (pa_volume_t) lrint((dB/USER_DECIBEL_RANGE+1)*PA_VOLUME_NORM);
}
double pa_sw_volume_to_dB(pa_volume_t v) {
@@ -112,18 +145,25 @@ double pa_sw_volume_to_linear(pa_volume_t v) {
if (v == PA_VOLUME_MUTED)
return 0;
- return pow(10, pa_sw_volume_to_dB(v)/20);
+ return pow(10.0, pa_sw_volume_to_dB(v)/20.0);
}
char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c) {
unsigned channel;
- int first = 1;
+ pa_bool_t first = TRUE;
char *e;
pa_assert(s);
pa_assert(l > 0);
pa_assert(c);
+ pa_init_i18n();
+
+ if (!pa_cvolume_valid(c)) {
+ pa_snprintf(s, l, _("(invalid)"));
+ return s;
+ }
+
*(e = s) = 0;
for (channel = 0; channel < c->channels && l > 1; channel++) {
@@ -133,7 +173,38 @@ char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c) {
(c->values[channel]*100)/PA_VOLUME_NORM);
e = strchr(e, 0);
- first = 0;
+ first = FALSE;
+ }
+
+ return s;
+}
+
+char *pa_sw_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c) {
+ unsigned channel;
+ pa_bool_t first = TRUE;
+ char *e;
+
+ pa_assert(s);
+ pa_assert(l > 0);
+ pa_assert(c);
+
+ pa_init_i18n();
+
+ if (!pa_cvolume_valid(c)) {
+ pa_snprintf(s, l, _("(invalid)"));
+ return s;
+ }
+
+ *(e = s) = 0;
+
+ for (channel = 0; channel < c->channels && l > 1; channel++) {
+ l -= pa_snprintf(e, l, "%s%u: %0.2f dB",
+ first ? "" : " ",
+ channel,
+ pa_sw_volume_to_dB(c->values[channel]));
+
+ e = strchr(e, 0);
+ first = FALSE;
}
return s;
@@ -158,23 +229,139 @@ pa_cvolume *pa_sw_cvolume_multiply(pa_cvolume *dest, const pa_cvolume *a, const
pa_assert(a);
pa_assert(b);
- for (i = 0; i < a->channels && i < b->channels && i < PA_CHANNELS_MAX; i++) {
+ for (i = 0; i < a->channels && i < b->channels && i < PA_CHANNELS_MAX; i++)
+ dest->values[i] = pa_sw_volume_multiply(a->values[i], b->values[i]);
- dest->values[i] = pa_sw_volume_multiply(
- i < a->channels ? a->values[i] : PA_VOLUME_NORM,
- i < b->channels ? b->values[i] : PA_VOLUME_NORM);
- }
+ dest->channels = (uint8_t) i;
+
+ return dest;
+}
+
+pa_cvolume *pa_sw_cvolume_divide(pa_cvolume *dest, const pa_cvolume *a, const pa_cvolume *b) {
+ unsigned i;
+
+ pa_assert(dest);
+ pa_assert(a);
+ pa_assert(b);
+
+ for (i = 0; i < a->channels && i < b->channels && i < PA_CHANNELS_MAX; i++)
+ dest->values[i] = pa_sw_volume_divide(a->values[i], b->values[i]);
- dest->channels = i;
+ dest->channels = (uint8_t) i;
return dest;
}
int pa_cvolume_valid(const pa_cvolume *v) {
+ unsigned c;
+
pa_assert(v);
if (v->channels <= 0 || v->channels > PA_CHANNELS_MAX)
return 0;
+ for (c = 0; c < v->channels; c++)
+ if (v->values[c] == (pa_volume_t) -1)
+ return 0;
+
return 1;
}
+
+static pa_bool_t on_left(pa_channel_position_t p) {
+
+ return
+ p == PA_CHANNEL_POSITION_FRONT_LEFT ||
+ p == PA_CHANNEL_POSITION_REAR_LEFT ||
+ p == PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER ||
+ p == PA_CHANNEL_POSITION_SIDE_LEFT ||
+ p == PA_CHANNEL_POSITION_TOP_FRONT_LEFT ||
+ p == PA_CHANNEL_POSITION_TOP_REAR_LEFT;
+}
+
+static pa_bool_t on_right(pa_channel_position_t p) {
+
+ return
+ p == PA_CHANNEL_POSITION_FRONT_RIGHT ||
+ p == PA_CHANNEL_POSITION_REAR_RIGHT ||
+ p == PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER ||
+ p == PA_CHANNEL_POSITION_SIDE_RIGHT ||
+ p == PA_CHANNEL_POSITION_TOP_FRONT_RIGHT ||
+ p == PA_CHANNEL_POSITION_TOP_REAR_RIGHT;
+}
+
+static pa_bool_t on_center(pa_channel_position_t p) {
+
+ return
+ p == PA_CHANNEL_POSITION_FRONT_CENTER ||
+ p == PA_CHANNEL_POSITION_REAR_CENTER ||
+ p == PA_CHANNEL_POSITION_TOP_CENTER ||
+ p == PA_CHANNEL_POSITION_TOP_FRONT_CENTER ||
+ p == PA_CHANNEL_POSITION_TOP_REAR_CENTER;
+}
+
+static pa_bool_t on_lfe(pa_channel_position_t p) {
+ return
+ p == PA_CHANNEL_POSITION_LFE;
+}
+
+pa_cvolume *pa_cvolume_remap(pa_cvolume *v, pa_channel_map *from, pa_channel_map *to) {
+ int a, b;
+ pa_cvolume result;
+
+ pa_assert(v);
+ pa_assert(from);
+ pa_assert(to);
+ pa_assert(v->channels == from->channels);
+
+ if (pa_channel_map_equal(from, to))
+ return v;
+
+ result.channels = to->channels;
+
+ for (b = 0; b < to->channels; b++) {
+ pa_volume_t k = 0;
+ int n = 0;
+
+ for (a = 0; a < from->channels; a++)
+ if (from->map[a] == to->map[b]) {
+ k += v->values[a];
+ n ++;
+ }
+
+ if (n <= 0) {
+ for (a = 0; a < from->channels; a++)
+ if ((on_left(from->map[a]) && on_left(to->map[b])) ||
+ (on_right(from->map[a]) && on_right(to->map[b])) ||
+ (on_center(from->map[a]) && on_center(to->map[b])) ||
+ (on_lfe(from->map[a]) && on_lfe(to->map[b]))) {
+
+ k += v->values[a];
+ n ++;
+ }
+ }
+
+ if (n <= 0)
+ k = pa_cvolume_avg(v);
+ else
+ k /= n;
+
+ result.values[b] = k;
+ }
+
+ *v = result;
+ return v;
+}
+
+int pa_cvolume_compatible(const pa_cvolume *v, const pa_sample_spec *ss) {
+
+ pa_assert(v);
+ pa_assert(ss);
+
+ if (!pa_cvolume_valid(v))
+ return 0;
+
+ if (!pa_sample_spec_valid(ss))
+ return 0;
+
+ return v->channels == ss->channels;
+}
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index 8295786..75051af 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -1,8 +1,6 @@
#ifndef foovolumehfoo
#define foovolumehfoo
-/* $Id: volume.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,8 +24,11 @@
***/
#include <inttypes.h>
+
#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
#include <pulse/sample.h>
+#include <pulse/channelmap.h>
/** \page volume Volume Control
*
@@ -61,7 +62,7 @@
*
* The functions described above are only valid when used with
* software volumes. Hence it is usually a better idea to treat all
- * volume values as opaque with a range from PA_VOLUME_MUTE (0%) to
+ * volume values as opaque with a range from PA_VOLUME_MUTED (0%) to
* PA_VOLUME_NORM (100%) and to refrain from any calculations with
* them.
*
@@ -101,10 +102,10 @@ PA_C_DECL_BEGIN
typedef uint32_t pa_volume_t;
/** Normal volume (100%) */
-#define PA_VOLUME_NORM (0x10000)
+#define PA_VOLUME_NORM ((pa_volume_t) 0x10000U)
/** Muted volume (0%) */
-#define PA_VOLUME_MUTED (0)
+#define PA_VOLUME_MUTED ((pa_volume_t) 0U)
/** A structure encapsulating a per-channel volume */
typedef struct pa_cvolume {
@@ -115,6 +116,11 @@ typedef struct pa_cvolume {
/** Return non-zero when *a == *b */
int pa_cvolume_equal(const pa_cvolume *a, const pa_cvolume *b) PA_GCC_PURE;
+/** Initialize the specified volume and return a pointer to
+ * it. The sample spec will have a defined state but
+ * pa_cvolume_valid() will fail for it. \since 0.9.13 */
+pa_cvolume* pa_cvolume_init(pa_cvolume *a);
+
/** Set the volume of all channels to PA_VOLUME_NORM */
#define pa_cvolume_reset(a, n) pa_cvolume_set((a), (n), PA_VOLUME_NORM)
@@ -124,15 +130,32 @@ int pa_cvolume_equal(const pa_cvolume *a, const pa_cvolume *b) PA_GCC_PURE;
/** Set the volume of all channels to the specified parameter */
pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v);
-/** Maximum length of the strings returned by pa_cvolume_snprint() */
-#define PA_CVOLUME_SNPRINT_MAX 64
+/** Maximum length of the strings returned by
+ * pa_cvolume_snprint(). Please note that this value can change with
+ * any release without warning and without being considered API or ABI
+ * breakage. You should not use this definition anywhere where it
+ * might become part of an ABI.*/
+#define PA_CVOLUME_SNPRINT_MAX 320
/** Pretty print a volume structure */
char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c);
+/** Maximum length of the strings returned by
+ * pa_cvolume_snprint_dB(). Please note that this value can change with
+ * any release without warning and without being considered API or ABI
+ * breakage. You should not use this definition anywhere where it
+ * might become part of an ABI. \since 0.9.13 */
+#define PA_SW_CVOLUME_SNPRINT_DB_MAX 448
+
+/** Pretty print a volume structure but show dB values. \since 0.9.13 */
+char *pa_sw_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c);
+
/** Return the average volume of all channels */
pa_volume_t pa_cvolume_avg(const pa_cvolume *a) PA_GCC_PURE;
+/** Return the maximum volume of all channels. \since 0.9.12 */
+pa_volume_t pa_cvolume_max(const pa_cvolume *a) PA_GCC_PURE;
+
/** Return TRUE when the passed cvolume structure is valid, FALSE otherwise */
int pa_cvolume_valid(const pa_cvolume *v) PA_GCC_PURE;
@@ -145,31 +168,51 @@ int pa_cvolume_channels_equal_to(const pa_cvolume *a, pa_volume_t v) PA_GCC_PURE
/** Return 1 if the specified volume has all channels on normal level */
#define pa_cvolume_is_norm(a) pa_cvolume_channels_equal_to((a), PA_VOLUME_NORM)
-/** Multiply two volumes specifications, return the result. This uses PA_VOLUME_NORM as neutral element of multiplication. This is only valid for software volumes! */
+/** Multiply two volume specifications, return the result. This uses
+ * PA_VOLUME_NORM as neutral element of multiplication. This is only
+ * valid for software volumes! */
pa_volume_t pa_sw_volume_multiply(pa_volume_t a, pa_volume_t b) PA_GCC_CONST;
-/** Multiply to per-channel volumes and return the result in *dest. This is only valid for software volumes! */
-pa_cvolume *pa_sw_cvolume_multiply(pa_cvolume *dest, const pa_cvolume *a, const pa_cvolume *b) PA_GCC_PURE;
+/** Multiply two per-channel volumes and return the result in
+ * *dest. This is only valid for software volumes! */
+pa_cvolume *pa_sw_cvolume_multiply(pa_cvolume *dest, const pa_cvolume *a, const pa_cvolume *b);
+
+/** Divide two volume specifications, return the result. This uses
+ * PA_VOLUME_NORM as neutral element of division. This is only valid
+ * for software volumes! If a division by zero is tried the result
+ * will be 0. \since 0.9.13 */
+pa_volume_t pa_sw_volume_divide(pa_volume_t a, pa_volume_t b) PA_GCC_CONST;
+
+/** Multiply to per-channel volumes and return the result in
+ * *dest. This is only valid for software volumes! \since 0.9.13 */
+pa_cvolume *pa_sw_cvolume_divide(pa_cvolume *dest, const pa_cvolume *a, const pa_cvolume *b);
-/** Convert a decibel value to a volume. This is only valid for software volumes! \since 0.4 */
+/** Convert a decibel value to a volume. This is only valid for software volumes! */
pa_volume_t pa_sw_volume_from_dB(double f) PA_GCC_CONST;
-/** Convert a volume to a decibel value. This is only valid for software volumes! \since 0.4 */
+/** Convert a volume to a decibel value. This is only valid for software volumes! */
double pa_sw_volume_to_dB(pa_volume_t v) PA_GCC_CONST;
-/** Convert a linear factor to a volume. This is only valid for software volumes! \since 0.8 */
+/** Convert a linear factor to a volume. This is only valid for software volumes! */
pa_volume_t pa_sw_volume_from_linear(double v) PA_GCC_CONST;
-/** Convert a volume to a linear factor. This is only valid for software volumes! \since 0.8 */
+/** Convert a volume to a linear factor. This is only valid for software volumes! */
double pa_sw_volume_to_linear(pa_volume_t v) PA_GCC_CONST;
#ifdef INFINITY
-#define PA_DECIBEL_MININFTY (-INFINITY)
+#define PA_DECIBEL_MININFTY ((double) -INFINITY)
#else
-/** This value is used as minus infinity when using pa_volume_{to,from}_dB(). \since 0.4 */
-#define PA_DECIBEL_MININFTY (-200)
+/** This value is used as minus infinity when using pa_volume_{to,from}_dB(). */
+#define PA_DECIBEL_MININFTY ((double) -200.0)
#endif
+/** Remap a volume from one channel mapping to a different channel mapping. \since 0.9.12 */
+pa_cvolume *pa_cvolume_remap(pa_cvolume *v, pa_channel_map *from, pa_channel_map *to);
+
+/** Return non-zero if the specified volume is compatible with
+ * the specified sample spec. \since 0.9.13 */
+int pa_cvolume_compatible(const pa_cvolume *v, const pa_sample_spec *ss) PA_GCC_PURE;
+
PA_C_DECL_END
#endif
diff --git a/src/pulse/xmalloc.c b/src/pulse/xmalloc.c
index b63d702..c570e40 100644
--- a/src/pulse/xmalloc.c
+++ b/src/pulse/xmalloc.c
@@ -1,5 +1,3 @@
-/* $Id: xmalloc.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,15 +27,16 @@
#include <signal.h>
#include <unistd.h>
#include <string.h>
+#include <errno.h>
+#include <pulse/gccmacro.h>
#include <pulsecore/core-util.h>
-#include <pulsecore/gccmacro.h>
#include <pulsecore/macro.h>
#include "xmalloc.h"
/* Make sure not to allocate more than this much memory. */
-#define MAX_ALLOC_SIZE (1024*1024*20) /* 20MB */
+#define MAX_ALLOC_SIZE (1024*1024*96) /* 96MB */
/* #undef malloc */
/* #undef free */
@@ -47,7 +46,7 @@
static void oom(void) PA_GCC_NORETURN;
-/** called in case of an OOM situation. Prints an error message and
+/* called in case of an OOM situation. Prints an error message and
* exits */
static void oom(void) {
static const char e[] = "Not enough memory\n";
@@ -114,7 +113,7 @@ char *pa_xstrndup(const char *s, size_t l) {
return NULL;
if ((e = memchr(s, 0, l)))
- return pa_xmemdup(s, e-s+1);
+ return pa_xmemdup(s, (size_t) (e-s+1));
r = pa_xmalloc(l+1);
memcpy(r, s, l);
@@ -123,8 +122,12 @@ char *pa_xstrndup(const char *s, size_t l) {
}
void pa_xfree(void *p) {
+ int saved_errno;
+
if (!p)
return;
+ saved_errno = errno;
free(p);
+ errno = saved_errno;
}
diff --git a/src/pulse/xmalloc.h b/src/pulse/xmalloc.h
index d41fe85..b264358 100644
--- a/src/pulse/xmalloc.h
+++ b/src/pulse/xmalloc.h
@@ -1,8 +1,6 @@
#ifndef foomemoryhfoo
#define foomemoryhfoo
-/* $Id: xmalloc.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -28,7 +26,9 @@
#include <stdlib.h>
#include <limits.h>
#include <assert.h>
+
#include <pulse/cdecl.h>
+#include <pulse/gccmacro.h>
/** \file
* Memory allocation functions.
@@ -37,52 +37,58 @@
PA_C_DECL_BEGIN
/** Allocate the specified number of bytes, just like malloc() does. However, in case of OOM, terminate */
-void* pa_xmalloc(size_t l);
+void* pa_xmalloc(size_t l) PA_GCC_MALLOC PA_GCC_ALLOC_SIZE(1);
/** Same as pa_xmalloc(), but initialize allocated memory to 0 */
-void *pa_xmalloc0(size_t l);
+void *pa_xmalloc0(size_t l) PA_GCC_MALLOC PA_GCC_ALLOC_SIZE(1);
/** The combination of pa_xmalloc() and realloc() */
-void *pa_xrealloc(void *ptr, size_t size);
+void *pa_xrealloc(void *ptr, size_t size) PA_GCC_ALLOC_SIZE(2);
/** Free allocated memory */
void pa_xfree(void *p);
/** Duplicate the specified string, allocating memory with pa_xmalloc() */
-char *pa_xstrdup(const char *s);
+char *pa_xstrdup(const char *s) PA_GCC_MALLOC;
/** Duplicate the specified string, but truncate after l characters */
-char *pa_xstrndup(const char *s, size_t l);
+char *pa_xstrndup(const char *s, size_t l) PA_GCC_MALLOC;
/** Duplicate the specified memory block */
-void* pa_xmemdup(const void *p, size_t l);
+void* pa_xmemdup(const void *p, size_t l) PA_GCC_MALLOC PA_GCC_ALLOC_SIZE(2);
/** Internal helper for pa_xnew() */
-static inline void* pa_xnew_internal(unsigned n, size_t k) {
+static void* _pa_xnew_internal(size_t n, size_t k) PA_GCC_MALLOC PA_GCC_ALLOC_SIZE2(1,2);
+
+static inline void* _pa_xnew_internal(size_t n, size_t k) {
assert(n < INT_MAX/k);
return pa_xmalloc(n*k);
}
/** Allocate n new structures of the specified type. */
-#define pa_xnew(type, n) ((type*) pa_xnew_internal((n), sizeof(type)))
+#define pa_xnew(type, n) ((type*) _pa_xnew_internal((n), sizeof(type)))
/** Internal helper for pa_xnew0() */
-static inline void* pa_xnew0_internal(unsigned n, size_t k) {
+static void* _pa_xnew0_internal(size_t n, size_t k) PA_GCC_MALLOC PA_GCC_ALLOC_SIZE2(1,2);
+
+static inline void* _pa_xnew0_internal(size_t n, size_t k) {
assert(n < INT_MAX/k);
return pa_xmalloc0(n*k);
}
/** Same as pa_xnew() but set the memory to zero */
-#define pa_xnew0(type, n) ((type*) pa_xnew0_internal((n), sizeof(type)))
+#define pa_xnew0(type, n) ((type*) _pa_xnew0_internal((n), sizeof(type)))
/** Internal helper for pa_xnew0() */
-static inline void* pa_xnewdup_internal(const void *p, unsigned n, size_t k) {
+static void* _pa_xnewdup_internal(const void *p, size_t n, size_t k) PA_GCC_MALLOC PA_GCC_ALLOC_SIZE2(2,3);
+
+static inline void* _pa_xnewdup_internal(const void *p, size_t n, size_t k) {
assert(n < INT_MAX/k);
return pa_xmemdup(p, n*k);
}
/** Same as pa_xnew() but set the memory to zero */
-#define pa_xnewdup(type, p, n) ((type*) pa_xnewdup_internal((p), (n), sizeof(type)))
+#define pa_xnewdup(type, p, n) ((type*) _pa_xnewdup_internal((p), (n), sizeof(type)))
PA_C_DECL_END
diff --git a/src/pulsecore/asyncmsgq.c b/src/pulsecore/asyncmsgq.c
index f8ddda1..5c7af2a 100644
--- a/src/pulsecore/asyncmsgq.c
+++ b/src/pulsecore/asyncmsgq.c
@@ -1,5 +1,3 @@
-/* $Id: asyncmsgq.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -136,7 +134,7 @@ void pa_asyncmsgq_post(pa_asyncmsgq *a, pa_msgobject *object, int code, const vo
/* This mutex makes the queue multiple-writer safe. This lock is only used on the writing side */
pa_mutex_lock(a->mutex);
- pa_assert_se(pa_asyncq_push(a->asyncq, i, 1) == 0);
+ pa_asyncq_post(a->asyncq, i);
pa_mutex_unlock(a->mutex);
}
@@ -163,7 +161,7 @@ int pa_asyncmsgq_send(pa_asyncmsgq *a, pa_msgobject *object, int code, const voi
/* Thus mutex makes the queue multiple-writer safe. This lock is only used on the writing side */
pa_mutex_lock(a->mutex);
- pa_assert_se(pa_asyncq_push(a->asyncq, &i, 1) == 0);
+ pa_assert_se(pa_asyncq_push(a->asyncq, &i, TRUE) == 0);
pa_mutex_unlock(a->mutex);
pa_semaphore_wait(i.semaphore);
@@ -174,7 +172,7 @@ int pa_asyncmsgq_send(pa_asyncmsgq *a, pa_msgobject *object, int code, const voi
return i.ret;
}
-int pa_asyncmsgq_get(pa_asyncmsgq *a, pa_msgobject **object, int *code, void **userdata, int64_t *offset, pa_memchunk *chunk, int wait) {
+int pa_asyncmsgq_get(pa_asyncmsgq *a, pa_msgobject **object, int *code, void **userdata, int64_t *offset, pa_memchunk *chunk, pa_bool_t wait) {
pa_assert(PA_REFCNT_VALUE(a) > 0);
pa_assert(!a->current);
@@ -276,22 +274,40 @@ int pa_asyncmsgq_process_one(pa_asyncmsgq *a) {
return 1;
}
-int pa_asyncmsgq_get_fd(pa_asyncmsgq *a) {
+int pa_asyncmsgq_read_fd(pa_asyncmsgq *a) {
+ pa_assert(PA_REFCNT_VALUE(a) > 0);
+
+ return pa_asyncq_read_fd(a->asyncq);
+}
+
+int pa_asyncmsgq_read_before_poll(pa_asyncmsgq *a) {
+ pa_assert(PA_REFCNT_VALUE(a) > 0);
+
+ return pa_asyncq_read_before_poll(a->asyncq);
+}
+
+void pa_asyncmsgq_read_after_poll(pa_asyncmsgq *a) {
+ pa_assert(PA_REFCNT_VALUE(a) > 0);
+
+ pa_asyncq_read_after_poll(a->asyncq);
+}
+
+int pa_asyncmsgq_write_fd(pa_asyncmsgq *a) {
pa_assert(PA_REFCNT_VALUE(a) > 0);
- return pa_asyncq_get_fd(a->asyncq);
+ return pa_asyncq_write_fd(a->asyncq);
}
-int pa_asyncmsgq_before_poll(pa_asyncmsgq *a) {
+void pa_asyncmsgq_write_before_poll(pa_asyncmsgq *a) {
pa_assert(PA_REFCNT_VALUE(a) > 0);
- return pa_asyncq_before_poll(a->asyncq);
+ pa_asyncq_write_before_poll(a->asyncq);
}
-void pa_asyncmsgq_after_poll(pa_asyncmsgq *a) {
+void pa_asyncmsgq_write_after_poll(pa_asyncmsgq *a) {
pa_assert(PA_REFCNT_VALUE(a) > 0);
- pa_asyncq_after_poll(a->asyncq);
+ pa_asyncq_write_after_poll(a->asyncq);
}
int pa_asyncmsgq_dispatch(pa_msgobject *object, int code, void *userdata, int64_t offset, pa_memchunk *memchunk) {
diff --git a/src/pulsecore/asyncmsgq.h b/src/pulsecore/asyncmsgq.h
index 932a5b1..1f38207 100644
--- a/src/pulsecore/asyncmsgq.h
+++ b/src/pulsecore/asyncmsgq.h
@@ -1,8 +1,6 @@
#ifndef foopulseasyncmsgqhfoo
#define foopulseasyncmsgqhfoo
-/* $Id: asyncmsgq.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -56,20 +54,26 @@ typedef struct pa_asyncmsgq pa_asyncmsgq;
pa_asyncmsgq* pa_asyncmsgq_new(unsigned size);
pa_asyncmsgq* pa_asyncmsgq_ref(pa_asyncmsgq *q);
+
void pa_asyncmsgq_unref(pa_asyncmsgq* q);
void pa_asyncmsgq_post(pa_asyncmsgq *q, pa_msgobject *object, int code, const void *userdata, int64_t offset, const pa_memchunk *memchunk, pa_free_cb_t userdata_free_cb);
int pa_asyncmsgq_send(pa_asyncmsgq *q, pa_msgobject *object, int code, const void *userdata, int64_t offset, const pa_memchunk *memchunk);
-int pa_asyncmsgq_get(pa_asyncmsgq *q, pa_msgobject **object, int *code, void **userdata, int64_t *offset, pa_memchunk *memchunk, int wait);
+int pa_asyncmsgq_get(pa_asyncmsgq *q, pa_msgobject **object, int *code, void **userdata, int64_t *offset, pa_memchunk *memchunk, pa_bool_t wait);
int pa_asyncmsgq_dispatch(pa_msgobject *object, int code, void *userdata, int64_t offset, pa_memchunk *memchunk);
void pa_asyncmsgq_done(pa_asyncmsgq *q, int ret);
int pa_asyncmsgq_wait_for(pa_asyncmsgq *a, int code);
int pa_asyncmsgq_process_one(pa_asyncmsgq *a);
-/* Just for the reading side */
-int pa_asyncmsgq_get_fd(pa_asyncmsgq *q);
-int pa_asyncmsgq_before_poll(pa_asyncmsgq *a);
-void pa_asyncmsgq_after_poll(pa_asyncmsgq *a);
+/* For the reading side */
+int pa_asyncmsgq_read_fd(pa_asyncmsgq *q);
+int pa_asyncmsgq_read_before_poll(pa_asyncmsgq *a);
+void pa_asyncmsgq_read_after_poll(pa_asyncmsgq *a);
+
+/* For the write side */
+int pa_asyncmsgq_write_fd(pa_asyncmsgq *q);
+void pa_asyncmsgq_write_before_poll(pa_asyncmsgq *a);
+void pa_asyncmsgq_write_after_poll(pa_asyncmsgq *a);
#endif
diff --git a/src/pulsecore/asyncq.c b/src/pulsecore/asyncq.c
index 4724c1b..f64931a 100644
--- a/src/pulsecore/asyncq.c
+++ b/src/pulsecore/asyncq.c
@@ -1,9 +1,7 @@
-/* $Id: asyncq.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2006 Lennart Poettering
+ Copyright 2006-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -33,14 +31,16 @@
#include <pulsecore/thread.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/llist.h>
+#include <pulsecore/flist.h>
#include <pulse/xmalloc.h>
#include "asyncq.h"
#include "fdsem.h"
-#define ASYNCQ_SIZE 128
+#define ASYNCQ_SIZE 256
-/* For debugging purposes we can define _Y to put and extra thread
+/* For debugging purposes we can define _Y to put an extra thread
* yield between each operation. */
/* #define PROFILE */
@@ -51,20 +51,27 @@
#define _Y do { } while(0)
#endif
+struct localq {
+ void *data;
+ PA_LLIST_FIELDS(struct localq);
+};
+
struct pa_asyncq {
unsigned size;
unsigned read_idx;
unsigned write_idx;
pa_fdsem *read_fdsem, *write_fdsem;
+
+ PA_LLIST_HEAD(struct localq, localq);
+ struct localq *last_localq;
+ pa_bool_t waiting_for_post;
};
-#define PA_ASYNCQ_CELLS(x) ((pa_atomic_ptr_t*) ((uint8_t*) (x) + PA_ALIGN(sizeof(struct pa_asyncq))))
+PA_STATIC_FLIST_DECLARE(localq, 0, pa_xfree);
-static int is_power_of_two(unsigned size) {
- return !(size & (size - 1));
-}
+#define PA_ASYNCQ_CELLS(x) ((pa_atomic_ptr_t*) ((uint8_t*) (x) + PA_ALIGN(sizeof(struct pa_asyncq))))
-static int reduce(pa_asyncq *l, int value) {
+static unsigned reduce(pa_asyncq *l, unsigned value) {
return value & (unsigned) (l->size - 1);
}
@@ -74,12 +81,16 @@ pa_asyncq *pa_asyncq_new(unsigned size) {
if (!size)
size = ASYNCQ_SIZE;
- pa_assert(is_power_of_two(size));
+ pa_assert(pa_is_power_of_two(size));
l = pa_xmalloc0(PA_ALIGN(sizeof(pa_asyncq)) + (sizeof(pa_atomic_ptr_t) * size));
l->size = size;
+ PA_LLIST_HEAD_INIT(struct localq, l->localq);
+ l->last_localq = NULL;
+ l->waiting_for_post = FALSE;
+
if (!(l->read_fdsem = pa_fdsem_new())) {
pa_xfree(l);
return NULL;
@@ -95,6 +106,7 @@ pa_asyncq *pa_asyncq_new(unsigned size) {
}
void pa_asyncq_free(pa_asyncq *l, pa_free_cb_t free_cb) {
+ struct localq *q;
pa_assert(l);
if (free_cb) {
@@ -104,13 +116,23 @@ void pa_asyncq_free(pa_asyncq *l, pa_free_cb_t free_cb) {
free_cb(p);
}
+ while ((q = l->localq)) {
+ if (free_cb)
+ free_cb(q->data);
+
+ PA_LLIST_REMOVE(struct localq, l->localq, q);
+
+ if (pa_flist_push(PA_STATIC_FLIST_GET(localq), q) < 0)
+ pa_xfree(q);
+ }
+
pa_fdsem_free(l->read_fdsem);
pa_fdsem_free(l->write_fdsem);
pa_xfree(l);
}
-int pa_asyncq_push(pa_asyncq*l, void *p, int wait) {
- int idx;
+static int push(pa_asyncq*l, void *p, pa_bool_t wait) {
+ unsigned idx;
pa_atomic_ptr_t *cells;
pa_assert(l);
@@ -141,8 +163,64 @@ int pa_asyncq_push(pa_asyncq*l, void *p, int wait) {
return 0;
}
-void* pa_asyncq_pop(pa_asyncq*l, int wait) {
- int idx;
+static pa_bool_t flush_postq(pa_asyncq *l) {
+ struct localq *q;
+
+ pa_assert(l);
+
+ while ((q = l->last_localq)) {
+
+ if (push(l, q->data, FALSE) < 0)
+ return FALSE;
+
+ l->last_localq = q->prev;
+
+ PA_LLIST_REMOVE(struct localq, l->localq, q);
+
+ if (pa_flist_push(PA_STATIC_FLIST_GET(localq), q) < 0)
+ pa_xfree(q);
+ }
+
+ return TRUE;
+}
+
+int pa_asyncq_push(pa_asyncq*l, void *p, pa_bool_t wait) {
+ pa_assert(l);
+
+ if (!flush_postq(l))
+ return -1;
+
+ return push(l, p, wait);
+}
+
+void pa_asyncq_post(pa_asyncq*l, void *p) {
+ struct localq *q;
+
+ pa_assert(l);
+ pa_assert(p);
+
+ if (pa_asyncq_push(l, p, FALSE) >= 0)
+ return;
+
+ /* OK, we couldn't push anything in the queue. So let's queue it
+ * locally and push it later */
+
+ pa_log("q overrun, queuing locally");
+
+ if (!(q = pa_flist_pop(PA_STATIC_FLIST_GET(localq))))
+ q = pa_xnew(struct localq, 1);
+
+ q->data = p;
+ PA_LLIST_PREPEND(struct localq, l->localq, q);
+
+ if (!l->last_localq)
+ l->last_localq = q;
+
+ return;
+}
+
+void* pa_asyncq_pop(pa_asyncq*l, pa_bool_t wait) {
+ unsigned idx;
void *ret;
pa_atomic_ptr_t *cells;
@@ -178,14 +256,14 @@ void* pa_asyncq_pop(pa_asyncq*l, int wait) {
return ret;
}
-int pa_asyncq_get_fd(pa_asyncq *q) {
+int pa_asyncq_read_fd(pa_asyncq *q) {
pa_assert(q);
return pa_fdsem_get(q->write_fdsem);
}
-int pa_asyncq_before_poll(pa_asyncq *l) {
- int idx;
+int pa_asyncq_read_before_poll(pa_asyncq *l) {
+ unsigned idx;
pa_atomic_ptr_t *cells;
pa_assert(l);
@@ -202,12 +280,40 @@ int pa_asyncq_before_poll(pa_asyncq *l) {
if (pa_fdsem_before_poll(l->write_fdsem) >= 0)
return 0;
}
-
- return 0;
}
-void pa_asyncq_after_poll(pa_asyncq *l) {
+void pa_asyncq_read_after_poll(pa_asyncq *l) {
pa_assert(l);
pa_fdsem_after_poll(l->write_fdsem);
}
+
+int pa_asyncq_write_fd(pa_asyncq *q) {
+ pa_assert(q);
+
+ return pa_fdsem_get(q->read_fdsem);
+}
+
+void pa_asyncq_write_before_poll(pa_asyncq *l) {
+ pa_assert(l);
+
+ for (;;) {
+
+ if (flush_postq(l))
+ break;
+
+ if (pa_fdsem_before_poll(l->read_fdsem) >= 0) {
+ l->waiting_for_post = TRUE;
+ break;
+ }
+ }
+}
+
+void pa_asyncq_write_after_poll(pa_asyncq *l) {
+ pa_assert(l);
+
+ if (l->waiting_for_post) {
+ pa_fdsem_after_poll(l->read_fdsem);
+ l->waiting_for_post = FALSE;
+ }
+}
diff --git a/src/pulsecore/asyncq.h b/src/pulsecore/asyncq.h
index d47f472..e6847ab 100644
--- a/src/pulsecore/asyncq.h
+++ b/src/pulsecore/asyncq.h
@@ -1,8 +1,6 @@
#ifndef foopulseasyncqhfoo
#define foopulseasyncqhfoo
-/* $Id: asyncq.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,6 +24,7 @@
#include <sys/types.h>
#include <pulse/def.h>
+#include <pulsecore/macro.h>
/* A simple, asynchronous, lock-free (if requested also wait-free)
* queue. Not multiple-reader/multiple-writer safe. If that is
@@ -46,11 +45,21 @@ typedef struct pa_asyncq pa_asyncq;
pa_asyncq* pa_asyncq_new(unsigned size);
void pa_asyncq_free(pa_asyncq* q, pa_free_cb_t free_cb);
-void* pa_asyncq_pop(pa_asyncq *q, int wait);
-int pa_asyncq_push(pa_asyncq *q, void *p, int wait);
+void* pa_asyncq_pop(pa_asyncq *q, pa_bool_t wait);
+int pa_asyncq_push(pa_asyncq *q, void *p, pa_bool_t wait);
+
+/* Similar to pa_asyncq_push(), but if the queue is full, postpone it
+ * locally and delay until pa_asyncq_before_poll_post() */
+void pa_asyncq_post(pa_asyncq*l, void *p);
+
+/* For the reading side */
+int pa_asyncq_read_fd(pa_asyncq *q);
+int pa_asyncq_read_before_poll(pa_asyncq *a);
+void pa_asyncq_read_after_poll(pa_asyncq *a);
-int pa_asyncq_get_fd(pa_asyncq *q);
-int pa_asyncq_before_poll(pa_asyncq *a);
-void pa_asyncq_after_poll(pa_asyncq *a);
+/* For the writing side */
+int pa_asyncq_write_fd(pa_asyncq *q);
+void pa_asyncq_write_before_poll(pa_asyncq *a);
+void pa_asyncq_write_after_poll(pa_asyncq *a);
#endif
diff --git a/src/pulsecore/atomic.h b/src/pulsecore/atomic.h
index efe68d1..9c58c66 100644
--- a/src/pulsecore/atomic.h
+++ b/src/pulsecore/atomic.h
@@ -1,12 +1,11 @@
#ifndef foopulseatomichfoo
#define foopulseatomichfoo
-/* $Id: atomic.h 2170 2008-03-27 23:37:23Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2006 Lennart Poettering
+ Copyright 2006-2008 Lennart Poettering
+ Copyright 2008 Nokia Corporation
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -24,6 +23,8 @@
USA.
***/
+#include <pulsecore/macro.h>
+
/*
* atomic_ops guarantees us that sizeof(AO_t) == sizeof(void*). It is
* not guaranteed however, that sizeof(AO_t) == sizeof(size_t).
@@ -36,7 +37,7 @@
* On gcc >= 4.1 we use the builtin atomic functions. otherwise we use
* libatomic_ops
*/
-#
+
#ifndef PACKAGE
#error "Please include config.h before including this file!"
#endif
@@ -81,8 +82,8 @@ static inline int pa_atomic_dec(pa_atomic_t *a) {
return pa_atomic_sub(a, 1);
}
-/* Returns non-zero when the operation was successful. */
-static inline int pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
+/* Returns TRUE when the operation was successful. */
+static inline pa_bool_t pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
return __sync_bool_compare_and_swap(&a->value, old_i, new_i);
}
@@ -102,13 +103,13 @@ static inline void pa_atomic_ptr_store(pa_atomic_ptr_t *a, void *p) {
__sync_synchronize();
}
-static inline int pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
+static inline pa_bool_t pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
}
#elif defined(__GNUC__) && (defined(__amd64__) || defined(__x86_64__))
-#error "The native atomic operations implementation for AMD64 has not been tested. libatomic_ops is known to not work properly on AMD64 and your gcc version is too old for the gcc-builtin atomic ops support. You have three options now: make the native atomic operations implementation for AMD64 work, fix libatomic_ops, or upgrade your GCC."
+#warn "The native atomic operations implementation for AMD64 has not been tested thoroughly. libatomic_ops is known to not work properly on AMD64 and your gcc version is too old for the gcc-builtin atomic ops support. You have three options now: test the native atomic operations implementation for AMD64, fix libatomic_ops, or upgrade your GCC."
/* Addapted from glibc */
@@ -148,14 +149,14 @@ static inline int pa_atomic_dec(pa_atomic_t *a) {
return pa_atomic_sub(a, 1);
}
-static inline int pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
+static inline pa_bool_t pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
int result;
__asm__ __volatile__ ("lock; cmpxchgl %2, %1"
: "=a" (result), "=m" (a->value)
: "r" (new_i), "m" (a->value), "0" (old_i));
- return result == oldval;
+ return result == old_i;
}
typedef struct pa_atomic_ptr {
@@ -172,14 +173,14 @@ static inline void pa_atomic_ptr_store(pa_atomic_ptr_t *a, void *p) {
a->value = (unsigned long) p;
}
-static inline int pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
+static inline pa_bool_t pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
void *result;
__asm__ __volatile__ ("lock; cmpxchgq %q2, %1"
: "=a" (result), "=m" (a->value)
: "r" (new_p), "m" (a->value), "0" (old_p));
- return result;
+ return result == old_p;
}
#elif defined(ATOMIC_ARM_INLINE_ASM)
@@ -256,7 +257,7 @@ static inline int pa_atomic_dec(pa_atomic_t *a) {
return pa_atomic_sub(a, 1);
}
-static inline int pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
+static inline pa_bool_t pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
unsigned long not_equal, not_exclusive;
pa_memory_barrier();
@@ -290,7 +291,7 @@ static inline void pa_atomic_ptr_store(pa_atomic_ptr_t *a, void *p) {
pa_memory_barrier();
}
-static inline int pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
+static inline pa_bool_t pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
unsigned long not_equal, not_exclusive;
pa_memory_barrier();
@@ -378,11 +379,11 @@ static inline int pa_atomic_dec(pa_atomic_t *a) {
return pa_atomic_sub(a, 1);
}
-/* Returns non-zero when the operation was successful. */
-static inline int pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
- int failed = 1;
+/* Returns TRUE when the operation was successful. */
+static inline pa_bool_t pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
+ pa_bool_t failed;
do {
- failed = __kernel_cmpxchg(old_i, new_i, &a->value);
+ failed = !!__kernel_cmpxchg(old_i, new_i, &a->value);
} while(failed && a->value == old_i);
return !failed;
}
@@ -403,11 +404,11 @@ static inline void pa_atomic_ptr_store(pa_atomic_ptr_t *a, void *p) {
pa_memory_barrier();
}
-static inline int pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
- int failed = 1;
+static inline pa_bool_t pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
+ pa_bool_t failed;
do {
- failed = __kernel_cmpxchg_u((unsigned long) old_p, (unsigned long) new_p, &a->value);
- } while(failed && a->value == old_p);
+ failed = !!__kernel_cmpxchg_u((unsigned long) old_p, (unsigned long) new_p, &a->value);
+ } while(failed && a->value == (unsigned long) old_p);
return !failed;
}
@@ -421,7 +422,7 @@ typedef struct pa_atomic {
volatile AO_t value;
} pa_atomic_t;
-#define PA_ATOMIC_INIT(v) { .value = (v) }
+#define PA_ATOMIC_INIT(v) { .value = (AO_t) (v) }
static inline int pa_atomic_load(const pa_atomic_t *a) {
return (int) AO_load_full((AO_t*) &a->value);
@@ -432,23 +433,23 @@ static inline void pa_atomic_store(pa_atomic_t *a, int i) {
}
static inline int pa_atomic_add(pa_atomic_t *a, int i) {
- return AO_fetch_and_add_full(&a->value, (AO_t) i);
+ return (int) AO_fetch_and_add_full(&a->value, (AO_t) i);
}
static inline int pa_atomic_sub(pa_atomic_t *a, int i) {
- return AO_fetch_and_add_full(&a->value, (AO_t) -i);
+ return (int) AO_fetch_and_add_full(&a->value, (AO_t) -i);
}
static inline int pa_atomic_inc(pa_atomic_t *a) {
- return AO_fetch_and_add1_full(&a->value);
+ return (int) AO_fetch_and_add1_full(&a->value);
}
static inline int pa_atomic_dec(pa_atomic_t *a) {
- return AO_fetch_and_sub1_full(&a->value);
+ return (int) AO_fetch_and_sub1_full(&a->value);
}
-static inline int pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
- return AO_compare_and_swap_full(&a->value, old_i, new_i);
+static inline pa_bool_t pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
+ return AO_compare_and_swap_full(&a->value, (unsigned long) old_i, (unsigned long) new_i);
}
typedef struct pa_atomic_ptr {
@@ -465,7 +466,7 @@ static inline void pa_atomic_ptr_store(pa_atomic_ptr_t *a, void *p) {
AO_store_full(&a->value, (AO_t) p);
}
-static inline int pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
+static inline pa_bool_t pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
return AO_compare_and_swap_full(&a->value, (AO_t) old_p, (AO_t) new_p);
}
diff --git a/src/pulsecore/auth-cookie.c b/src/pulsecore/auth-cookie.c
new file mode 100644
index 0000000..68b0147
--- /dev/null
+++ b/src/pulsecore/auth-cookie.c
@@ -0,0 +1,109 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#include <pulse/xmalloc.h>
+#include <pulse/util.h>
+
+#include <pulsecore/refcnt.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/shared.h>
+#include <pulsecore/authkey.h>
+
+#include "auth-cookie.h"
+
+struct pa_auth_cookie {
+ PA_REFCNT_DECLARE;
+ pa_core *core;
+ char *name;
+ size_t size;
+};
+
+pa_auth_cookie* pa_auth_cookie_get(pa_core *core, const char *cn, size_t size) {
+ pa_auth_cookie *c;
+ char *t;
+
+ pa_assert(core);
+ pa_assert(size > 0);
+
+ t = pa_sprintf_malloc("auth-cookie%s%s", cn ? "@" : "", cn ? cn : "");
+
+ if ((c = pa_shared_get(core, t))) {
+
+ pa_xfree(t);
+
+ if (c->size != size)
+ return NULL;
+
+ return pa_auth_cookie_ref(c);
+ }
+
+ c = pa_xmalloc(PA_ALIGN(sizeof(pa_auth_cookie)) + size);
+ PA_REFCNT_INIT(c);
+ c->core = core;
+ c->name = t;
+ c->size = size;
+
+ pa_assert_se(pa_shared_set(core, t, c) >= 0);
+
+ if (pa_authkey_load_auto(cn, (uint8_t*) c + PA_ALIGN(sizeof(pa_auth_cookie)), size) < 0) {
+ pa_auth_cookie_unref(c);
+ return NULL;
+ }
+
+ return c;
+}
+
+pa_auth_cookie* pa_auth_cookie_ref(pa_auth_cookie *c) {
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_REFCNT_INC(c);
+
+ return c;
+}
+
+void pa_auth_cookie_unref(pa_auth_cookie *c) {
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ if (PA_REFCNT_DEC(c) > 0)
+ return;
+
+ pa_assert_se(pa_shared_remove(c->core, c->name) >= 0);
+
+ pa_xfree(c->name);
+ pa_xfree(c);
+}
+
+const uint8_t* pa_auth_cookie_read(pa_auth_cookie *c, size_t size) {
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ pa_assert(c->size == size);
+
+ return (const uint8_t*) c + PA_ALIGN(sizeof(pa_auth_cookie));
+}
diff --git a/src/pulsecore/core-def.h b/src/pulsecore/auth-cookie.h
index 24a17d7..c08cbd8 100644
--- a/src/pulsecore/core-def.h
+++ b/src/pulsecore/auth-cookie.h
@@ -1,12 +1,10 @@
-#ifndef foocoredefhfoo
-#define foocoredefhfoo
-
-/* $Id: core-def.h 1971 2007-10-28 19:13:50Z lennart $ */
+#ifndef fooauthcookiehfoo
+#define fooauthcookiehfoo
/***
This file is part of PulseAudio.
- Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
+ Copyright 2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -24,6 +22,14 @@
USA.
***/
-/* FIXME: Remove this shit */
+#include <pulsecore/core.h>
+
+typedef struct pa_auth_cookie pa_auth_cookie;
+
+pa_auth_cookie* pa_auth_cookie_get(pa_core *c, const char *cn, size_t size);
+pa_auth_cookie* pa_auth_cookie_ref(pa_auth_cookie *c);
+void pa_auth_cookie_unref(pa_auth_cookie *c);
+
+const uint8_t* pa_auth_cookie_read(pa_auth_cookie *, size_t size);
#endif
diff --git a/src/pulsecore/authkey-prop.c b/src/pulsecore/authkey-prop.c
deleted file mode 100644
index fa90fbd..0000000
--- a/src/pulsecore/authkey-prop.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* $Id: authkey-prop.c 1971 2007-10-28 19:13:50Z lennart $ */
-
-/***
- This file is part of PulseAudio.
-
- Copyright 2004-2006 Lennart Poettering
-
- PulseAudio is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
- or (at your option) any later version.
-
- PulseAudio is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with PulseAudio; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA.
-***/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-
-#include <pulse/xmalloc.h>
-
-#include <pulsecore/props.h>
-#include <pulsecore/macro.h>
-#include <pulsecore/log.h>
-#include <pulsecore/refcnt.h>
-
-#include "authkey-prop.h"
-
-struct authkey_data {
- PA_REFCNT_DECLARE;
- size_t length;
-};
-
-int pa_authkey_prop_get(pa_core *c, const char *name, void *data, size_t len) {
- struct authkey_data *a;
-
- pa_assert(c);
- pa_assert(name);
- pa_assert(data);
- pa_assert(len > 0);
-
- if (!(a = pa_property_get(c, name)))
- return -1;
-
- pa_assert(a->length == len);
- memcpy(data, (uint8_t*) a + PA_ALIGN(sizeof(struct authkey_data)), len);
-
- return 0;
-}
-
-int pa_authkey_prop_put(pa_core *c, const char *name, const void *data, size_t len) {
- struct authkey_data *a;
-
- pa_assert(c);
- pa_assert(name);
-
- if (pa_property_get(c, name))
- return -1;
-
- a = pa_xmalloc(PA_ALIGN(sizeof(struct authkey_data)) + len);
- PA_REFCNT_INIT(a);
- a->length = len;
- memcpy((uint8_t*) a + PA_ALIGN(sizeof(struct authkey_data)), data, len);
-
- pa_property_set(c, name, a);
-
- return 0;
-}
-
-void pa_authkey_prop_ref(pa_core *c, const char *name) {
- struct authkey_data *a;
-
- pa_assert(c);
- pa_assert(name);
-
- a = pa_property_get(c, name);
- pa_assert(a);
- pa_assert(PA_REFCNT_VALUE(a) >= 1);
- PA_REFCNT_INC(a);
-}
-
-void pa_authkey_prop_unref(pa_core *c, const char *name) {
- struct authkey_data *a;
-
- pa_assert(c);
- pa_assert(name);
-
- a = pa_property_get(c, name);
- pa_assert(a);
- pa_assert(PA_REFCNT_VALUE(a) >= 1);
-
- if (PA_REFCNT_DEC(a) <= 0) {
- pa_property_remove(c, name);
- pa_xfree(a);
- }
-}
-
-
diff --git a/src/pulsecore/authkey-prop.h b/src/pulsecore/authkey-prop.h
deleted file mode 100644
index 5316668..0000000
--- a/src/pulsecore/authkey-prop.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef fooauthkeyprophfoo
-#define fooauthkeyprophfoo
-
-/* $Id: authkey-prop.h 1426 2007-02-13 15:35:19Z ossman $ */
-
-/***
- This file is part of PulseAudio.
-
- Copyright 2004-2006 Lennart Poettering
-
- PulseAudio is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
- or (at your option) any later version.
-
- PulseAudio is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with PulseAudio; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA.
-***/
-
-#include <pulsecore/core.h>
-
-/* The authkey-prop uses a central property to store a previously
- * loaded cookie in memory. Useful for sharing the same cookie between
- * several modules. */
-
-/* Return the data of the specified authorization key property. Doesn't alter the refernce count of the key */
-int pa_authkey_prop_get(pa_core *c, const char *name, void *data, size_t len);
-
-/* Store data in the specified authorization key property. The initial reference count is set to 1 */
-int pa_authkey_prop_put(pa_core *c, const char *name, const void *data, size_t len);
-
-/* Increase the reference count of the specified authorization key */
-void pa_authkey_prop_ref(pa_core *c, const char *name);
-
-/* Decrease the reference count of the specified authorization key */
-void pa_authkey_prop_unref(pa_core *c, const char *name);
-
-#endif
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index 5a99d9e..b122fee 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
@@ -1,5 +1,3 @@
-/* $Id: authkey.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -56,8 +54,8 @@ static int generate(int fd, void *ret_data, size_t length) {
pa_random(ret_data, length);
- lseek(fd, 0, SEEK_SET);
- (void) ftruncate(fd, 0);
+ lseek(fd, (off_t) 0, SEEK_SET);
+ (void) ftruncate(fd, (off_t) 0);
if ((r = pa_loop_write(fd, ret_data, length, NULL)) < 0 || (size_t) r != length) {
pa_log("Failed to write cookie file: %s", pa_cstrerror(errno));
@@ -90,7 +88,7 @@ static int load(const char *fn, void *data, size_t length) {
if ((fd = open(fn, O_RDWR|O_CREAT|O_BINARY|O_NOCTTY, S_IRUSR|S_IWUSR)) < 0) {
if (errno != EACCES || (fd = open(fn, O_RDONLY|O_BINARY|O_NOCTTY)) < 0) {
- pa_log("Failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
+ pa_log_warn("Failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
goto finish;
} else
writable = 0;
@@ -107,7 +105,7 @@ static int load(const char *fn, void *data, size_t length) {
pa_log_debug("Got %d bytes from cookie file '%s', expected %d", (int) r, fn, (int) length);
if (!writable) {
- pa_log("Unable to write cookie to read only file");
+ pa_log_warn("Unable to write cookie to read-only file");
goto finish;
}
@@ -142,7 +140,7 @@ int pa_authkey_load(const char *path, void *data, size_t length) {
pa_assert(length > 0);
if ((ret = load(path, data, length)) < 0)
- pa_log("Failed to load authorization key '%s': %s", path, (ret < 0) ? pa_cstrerror(errno) : "File corrupt");
+ pa_log_warn("Failed to load authorization key '%s': %s", path, (ret < 0) ? pa_cstrerror(errno) : "File corrupt");
return ret;
}
@@ -208,7 +206,7 @@ int pa_authkey_save(const char *fn, const void *data, size_t length) {
return -2;
if ((fd = open(p, O_RDWR|O_CREAT|O_NOCTTY, S_IRUSR|S_IWUSR)) < 0) {
- pa_log("Failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
+ pa_log_warn("Failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
goto finish;
}
diff --git a/src/pulsecore/authkey.h b/src/pulsecore/authkey.h
index 71d4ab4..8301db1 100644
--- a/src/pulsecore/authkey.h
+++ b/src/pulsecore/authkey.h
@@ -1,8 +1,6 @@
#ifndef fooauthkeyhfoo
#define fooauthkeyhfoo
-/* $Id: authkey.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/autoload.c b/src/pulsecore/autoload.c
index f8abbe6..8c84cee 100644
--- a/src/pulsecore/autoload.c
+++ b/src/pulsecore/autoload.c
@@ -1,5 +1,3 @@
-/* $Id: autoload.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -160,7 +158,7 @@ void pa_autoload_request(pa_core *c, const char *name, pa_namereg_type_t type) {
e->in_action = 0;
}
-static void free_func(void *p, PA_GCC_UNUSED void *userdata) {
+static void free_func(void *p, void *userdata) {
pa_autoload_entry *e = p;
pa_idxset_remove_by_data(e->core->autoload_idxset, e, NULL);
entry_free(e);
diff --git a/src/pulsecore/autoload.h b/src/pulsecore/autoload.h
index 0095c20..3926351 100644
--- a/src/pulsecore/autoload.h
+++ b/src/pulsecore/autoload.h
@@ -1,8 +1,6 @@
#ifndef fooautoloadhfoo
#define fooautoloadhfoo
-/* $Id: autoload.h 2166 2008-03-27 23:33:40Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/avahi-wrap.c b/src/pulsecore/avahi-wrap.c
index 32b0b92..d5f40d8 100644
--- a/src/pulsecore/avahi-wrap.c
+++ b/src/pulsecore/avahi-wrap.c
@@ -1,5 +1,3 @@
-/* $Id: avahi-wrap.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/avahi-wrap.h b/src/pulsecore/avahi-wrap.h
index 20f9505..7d8995b 100644
--- a/src/pulsecore/avahi-wrap.h
+++ b/src/pulsecore/avahi-wrap.h
@@ -1,8 +1,6 @@
#ifndef fooavahiwrapperhfoo
#define fooavahiwrapperhfoo
-/* $Id: avahi-wrap.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index 3cf565c..1624165 100644
--- a/src/pulsecore/cli-command.c
+++ b/src/pulsecore/cli-command.c
@@ -1,5 +1,3 @@
-/* $Id: cli-command.c 2175 2008-03-27 23:39:10Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -51,7 +49,7 @@
#include <pulsecore/play-memchunk.h>
#include <pulsecore/autoload.h>
#include <pulsecore/sound-file-stream.h>
-#include <pulsecore/props.h>
+#include <pulsecore/shared.h>
#include <pulsecore/core-util.h>
#include <pulsecore/core-error.h>
@@ -90,6 +88,7 @@ static int pa_cli_command_stat(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_b
static int pa_cli_command_info(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_load(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_unload(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
+static int pa_cli_command_describe(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_sink_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_sink_input_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_source_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
@@ -111,7 +110,7 @@ static int pa_cli_command_autoload_list(pa_core *c, pa_tokenizer *t, pa_strbuf *
static int pa_cli_command_autoload_add(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_autoload_remove(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_dump(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
-static int pa_cli_command_list_props(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
+static int pa_cli_command_list_shared_props(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_move_sink_input(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_move_source_output(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_vacuum(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
@@ -136,6 +135,7 @@ static const struct command commands[] = {
{ "list", pa_cli_command_info, NULL, 1 },
{ "load-module", pa_cli_command_load, "Load a module (args: name, arguments)", 3},
{ "unload-module", pa_cli_command_unload, "Unload a module (args: index)", 2},
+ { "describe-module", pa_cli_command_describe, "Describe a module (arg: name)", 2},
{ "set-sink-volume", pa_cli_command_sink_volume, "Set the volume of a sink (args: index|name, volume)", 3},
{ "set-sink-input-volume", pa_cli_command_sink_input_volume, "Set the volume of a sink input (args: index, volume)", 3},
{ "set-source-volume", pa_cli_command_source_volume, "Set the volume of a source (args: index|name, volume)", 3},
@@ -155,12 +155,12 @@ static const struct command commands[] = {
{ "load-sample-dir-lazy", pa_cli_command_scache_load_dir, "Lazily load all files in a directory into the sample cache (args: pathname)", 2},
{ "play-file", pa_cli_command_play_file, "Play a sound file (args: filename, sink|index)", 3},
{ "list-autoload", pa_cli_command_autoload_list, "List autoload entries", 1},
- { "add-autoload-sink", pa_cli_command_autoload_add, "Add autoload entry for a sink (args: sink, module name, arguments)", 4},
- { "add-autoload-source", pa_cli_command_autoload_add, "Add autoload entry for a source (args: source, module name, arguments)", 4},
- { "remove-autoload-sink", pa_cli_command_autoload_remove, "Remove autoload entry for a sink (args: name)", 2},
- { "remove-autoload-source", pa_cli_command_autoload_remove, "Remove autoload entry for a source (args: name)", 2},
+ { "add-autoload-sink", pa_cli_command_autoload_add, NULL /*"Add autoload entry for a sink (args: sink, module name, arguments)"*/, 4},
+ { "add-autoload-source", pa_cli_command_autoload_add, NULL /*"Add autoload entry for a source (args: source, module name, arguments)"*/, 4},
+ { "remove-autoload-sink", pa_cli_command_autoload_remove, NULL /*"Remove autoload entry for a sink (args: name)"*/, 2},
+ { "remove-autoload-source", pa_cli_command_autoload_remove, NULL /*"Remove autoload entry for a source (args: name)"*/, 2},
{ "dump", pa_cli_command_dump, "Dump daemon configuration", 1},
- { "list-props", pa_cli_command_list_props, NULL, 1},
+ { "shared", pa_cli_command_list_shared_props, NULL, 1},
{ "move-sink-input", pa_cli_command_move_sink_input, "Move sink input to another sink (args: index, sink)", 3},
{ "move-source-output", pa_cli_command_move_source_output, "Move source output to another source (args: index, source)", 3},
{ "vacuum", pa_cli_command_vacuum, NULL, 1},
@@ -188,7 +188,9 @@ static int pa_cli_command_exit(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_b
pa_assert(buf);
pa_assert(fail);
- c->mainloop->quit(c->mainloop, 0);
+ if (pa_core_exit(c, FALSE, 0) < 0)
+ pa_strbuf_puts(buf, "Not allowed to terminate daemon.\n");
+
return 0;
}
@@ -316,22 +318,22 @@ static int pa_cli_command_stat(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_b
pa_strbuf_printf(buf, "Memory blocks currently allocated: %u, size: %s.\n",
(unsigned) pa_atomic_load(&stat->n_allocated),
- pa_bytes_snprint(s, sizeof(s), (size_t) pa_atomic_load(&stat->allocated_size)));
+ pa_bytes_snprint(s, sizeof(s), (unsigned) pa_atomic_load(&stat->allocated_size)));
pa_strbuf_printf(buf, "Memory blocks allocated during the whole lifetime: %u, size: %s.\n",
(unsigned) pa_atomic_load(&stat->n_accumulated),
- pa_bytes_snprint(s, sizeof(s), (size_t) pa_atomic_load(&stat->accumulated_size)));
+ pa_bytes_snprint(s, sizeof(s), (unsigned) pa_atomic_load(&stat->accumulated_size)));
pa_strbuf_printf(buf, "Memory blocks imported from other processes: %u, size: %s.\n",
(unsigned) pa_atomic_load(&stat->n_imported),
- pa_bytes_snprint(s, sizeof(s), (size_t) pa_atomic_load(&stat->imported_size)));
+ pa_bytes_snprint(s, sizeof(s), (unsigned) pa_atomic_load(&stat->imported_size)));
pa_strbuf_printf(buf, "Memory blocks exported to other processes: %u, size: %s.\n",
(unsigned) pa_atomic_load(&stat->n_exported),
- pa_bytes_snprint(s, sizeof(s), (size_t) pa_atomic_load(&stat->exported_size)));
+ pa_bytes_snprint(s, sizeof(s), (unsigned) pa_atomic_load(&stat->exported_size)));
pa_strbuf_printf(buf, "Total sample cache size: %s.\n",
- pa_bytes_snprint(s, sizeof(s), pa_scache_total_size(c)));
+ pa_bytes_snprint(s, sizeof(s), (unsigned) pa_scache_total_size(c)));
pa_strbuf_printf(buf, "Default sample spec: %s\n",
pa_sample_spec_snprint(s, sizeof(s), &c->default_sample_spec));
@@ -367,7 +369,7 @@ static int pa_cli_command_info(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_b
pa_cli_command_sink_inputs(c, t, buf, fail);
pa_cli_command_source_outputs(c, t, buf, fail);
pa_cli_command_scache_list(c, t, buf, fail);
- pa_cli_command_autoload_list(c, t, buf, fail);
+/* pa_cli_command_autoload_list(c, t, buf, fail); */
return 0;
}
@@ -415,7 +417,46 @@ static int pa_cli_command_unload(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa
return -1;
}
- pa_module_unload_request(m);
+ pa_module_unload_request(m, FALSE);
+ return 0;
+}
+
+static int pa_cli_command_describe(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
+ const char *name;
+ pa_modinfo *i;
+
+ pa_core_assert_ref(c);
+ pa_assert(t);
+ pa_assert(buf);
+ pa_assert(fail);
+
+ if (!(name = pa_tokenizer_get(t, 1))) {
+ pa_strbuf_puts(buf, "You need to specify the module name.\n");
+ return -1;
+ }
+
+ if ((i = pa_modinfo_get_by_name(name))) {
+
+ pa_strbuf_printf(buf, "Name: %s\n", name);
+
+ if (!i->description && !i->version && !i->author && !i->usage)
+ pa_strbuf_printf(buf, "No module information available\n");
+ else {
+ if (i->version)
+ pa_strbuf_printf(buf, "Version: %s\n", i->version);
+ if (i->description)
+ pa_strbuf_printf(buf, "Description: %s\n", i->description);
+ if (i->author)
+ pa_strbuf_printf(buf, "Author: %s\n", i->author);
+ if (i->usage)
+ pa_strbuf_printf(buf, "Usage: %s\n", i->usage);
+ pa_strbuf_printf(buf, "Load Once: %s\n", pa_yes_no(i->load_once));
+ }
+
+ pa_modinfo_free(i);
+ } else
+ pa_strbuf_puts(buf, "Failed to open module.\n");
+
return 0;
}
@@ -436,7 +477,7 @@ static int pa_cli_command_sink_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *bu
}
if (!(v = pa_tokenizer_get(t, 2))) {
- pa_strbuf_puts(buf, "You need to specify a volume >= 0. (0 is muted, 0x100 is normal volume)\n");
+ pa_strbuf_puts(buf, "You need to specify a volume >= 0. (0 is muted, 0x10000 is normal volume)\n");
return -1;
}
@@ -478,7 +519,7 @@ static int pa_cli_command_sink_input_volume(pa_core *c, pa_tokenizer *t, pa_strb
}
if (!(v = pa_tokenizer_get(t, 2))) {
- pa_strbuf_puts(buf, "You need to specify a volume >= 0. (0 is muted, 0x100 is normal volume)\n");
+ pa_strbuf_puts(buf, "You need to specify a volume >= 0. (0 is muted, 0x10000 is normal volume)\n");
return -1;
}
@@ -514,7 +555,7 @@ static int pa_cli_command_source_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *
}
if (!(v = pa_tokenizer_get(t, 2))) {
- pa_strbuf_puts(buf, "You need to specify a volume >= 0. (0 is muted, 0x100 is normal volume)\n");
+ pa_strbuf_puts(buf, "You need to specify a volume >= 0. (0 is muted, 0x10000 is normal volume)\n");
return -1;
}
@@ -553,7 +594,7 @@ static int pa_cli_command_sink_mute(pa_core *c, pa_tokenizer *t, pa_strbuf *buf,
return -1;
}
- if (pa_atoi(m, &mute) < 0) {
+ if ((mute = pa_parse_boolean(m)) < 0) {
pa_strbuf_puts(buf, "Failed to parse mute switch.\n");
return -1;
}
@@ -587,7 +628,7 @@ static int pa_cli_command_source_mute(pa_core *c, pa_tokenizer *t, pa_strbuf *bu
return -1;
}
- if (pa_atoi(m, &mute) < 0) {
+ if ((mute = pa_parse_boolean(m)) < 0) {
pa_strbuf_puts(buf, "Failed to parse mute switch.\n");
return -1;
}
@@ -623,11 +664,11 @@ static int pa_cli_command_sink_input_mute(pa_core *c, pa_tokenizer *t, pa_strbuf
}
if (!(v = pa_tokenizer_get(t, 2))) {
- pa_strbuf_puts(buf, "You need to specify a volume >= 0. (0 is muted, 0x100 is normal volume)\n");
+ pa_strbuf_puts(buf, "You need to specify a mute switch setting (0/1).\n");
return -1;
}
- if (pa_atoi(v, &mute) < 0) {
+ if ((mute = pa_parse_boolean(v)) < 0) {
pa_strbuf_puts(buf, "Failed to parse mute switch.\n");
return -1;
}
@@ -780,6 +821,7 @@ static int pa_cli_command_scache_list(pa_core *c, pa_tokenizer *t, pa_strbuf *bu
static int pa_cli_command_scache_play(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
const char *n, *sink_name;
pa_sink *sink;
+ uint32_t idx;
pa_core_assert_ref(c);
pa_assert(t);
@@ -796,11 +838,13 @@ static int pa_cli_command_scache_play(pa_core *c, pa_tokenizer *t, pa_strbuf *bu
return -1;
}
- if (pa_scache_play_item(c, n, sink, PA_VOLUME_NORM) < 0) {
+ if (pa_scache_play_item(c, n, sink, PA_VOLUME_NORM, NULL, &idx) < 0) {
pa_strbuf_puts(buf, "Failed to play sample.\n");
return -1;
}
+ pa_strbuf_printf(buf, "Playing on sink input #%i\n", idx);
+
return 0;
}
@@ -902,6 +946,8 @@ static int pa_cli_command_autoload_add(pa_core *c, pa_tokenizer *t, pa_strbuf *b
pa_assert(buf);
pa_assert(fail);
+ pa_log_warn("Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
if (!(a = pa_tokenizer_get(t, 1)) || !(b = pa_tokenizer_get(t, 2))) {
pa_strbuf_puts(buf, "You need to specify a device name, a filename or a module name and optionally module arguments\n");
return -1;
@@ -920,6 +966,8 @@ static int pa_cli_command_autoload_remove(pa_core *c, pa_tokenizer *t, pa_strbuf
pa_assert(buf);
pa_assert(fail);
+ pa_log_warn("Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
if (!(name = pa_tokenizer_get(t, 1))) {
pa_strbuf_puts(buf, "You need to specify a device name\n");
return -1;
@@ -941,6 +989,8 @@ static int pa_cli_command_autoload_list(pa_core *c, pa_tokenizer *t, pa_strbuf *
pa_assert(buf);
pa_assert(fail);
+ pa_log_warn("Autoload will no longer be implemented by future versions of the PulseAudio server.");
+
pa_assert_se(s = pa_autoload_list_to_string(c));
pa_strbuf_puts(buf, s);
pa_xfree(s);
@@ -948,13 +998,13 @@ static int pa_cli_command_autoload_list(pa_core *c, pa_tokenizer *t, pa_strbuf *
return 0;
}
-static int pa_cli_command_list_props(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
+static int pa_cli_command_list_shared_props(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
pa_core_assert_ref(c);
pa_assert(t);
pa_assert(buf);
pa_assert(fail);
- pa_property_dump(c, buf);
+ pa_shared_dump(c, buf);
return 0;
}
@@ -1005,7 +1055,7 @@ static int pa_cli_command_move_sink_input(pa_core *c, pa_tokenizer *t, pa_strbuf
return -1;
}
- if (pa_sink_input_move_to(si, sink, 0) < 0) {
+ if (pa_sink_input_move_to(si, sink) < 0) {
pa_strbuf_puts(buf, "Moved failed.\n");
return -1;
}
@@ -1075,7 +1125,7 @@ static int pa_cli_command_suspend_sink(pa_core *c, pa_tokenizer *t, pa_strbuf *b
return -1;
}
- if (pa_atoi(m, &suspend) < 0) {
+ if ((suspend = pa_parse_boolean(m)) < 0) {
pa_strbuf_puts(buf, "Failed to parse suspend switch.\n");
return -1;
}
@@ -1109,7 +1159,7 @@ static int pa_cli_command_suspend_source(pa_core *c, pa_tokenizer *t, pa_strbuf
return -1;
}
- if (pa_atoi(m, &suspend) < 0) {
+ if ((suspend = pa_parse_boolean(m)) < 0) {
pa_strbuf_puts(buf, "Failed to parse suspend switch.\n");
return -1;
}
@@ -1138,7 +1188,7 @@ static int pa_cli_command_suspend(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, p
return -1;
}
- if (pa_atoi(m, &suspend) < 0) {
+ if ((suspend = pa_parse_boolean(m)) < 0) {
pa_strbuf_puts(buf, "Failed to parse suspend switch.\n");
return -1;
}
@@ -1201,8 +1251,9 @@ static int pa_cli_command_dump(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_b
nl = 1;
}
- pa_strbuf_printf(buf, "set-sink-volume %s 0x%03x\n", sink->name, pa_cvolume_avg(pa_sink_get_volume(sink)));
- pa_strbuf_printf(buf, "set-sink-mute %s %d\n", sink->name, pa_sink_get_mute(sink));
+ pa_strbuf_printf(buf, "set-sink-volume %s 0x%03x\n", sink->name, pa_cvolume_avg(pa_sink_get_volume(sink, FALSE)));
+ pa_strbuf_printf(buf, "set-sink-mute %s %s\n", sink->name, pa_yes_no(pa_sink_get_mute(sink, FALSE)));
+ pa_strbuf_printf(buf, "suspend-sink %s %s\n", sink->name, pa_yes_no(pa_sink_get_state(sink) == PA_SINK_SUSPENDED));
}
for (source = pa_idxset_first(c->sources, &idx); source; source = pa_idxset_next(c->sources, &idx)) {
@@ -1214,8 +1265,9 @@ static int pa_cli_command_dump(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_b
nl = 1;
}
- pa_strbuf_printf(buf, "set-source-volume %s 0x%03x\n", source->name, pa_cvolume_avg(pa_source_get_volume(source)));
- pa_strbuf_printf(buf, "set-source-mute %s %d\n", source->name, pa_source_get_mute(source));
+ pa_strbuf_printf(buf, "set-source-volume %s 0x%03x\n", source->name, pa_cvolume_avg(pa_source_get_volume(source, FALSE)));
+ pa_strbuf_printf(buf, "set-source-mute %s %s\n", source->name, pa_yes_no(pa_source_get_mute(source, FALSE)));
+ pa_strbuf_printf(buf, "suspend-source %s %s\n", source->name, pa_yes_no(pa_source_get_state(source) == PA_SOURCE_SUSPENDED));
}
@@ -1390,16 +1442,45 @@ int pa_cli_command_execute_line(pa_core *c, const char *s, pa_strbuf *buf, pa_bo
return pa_cli_command_execute_line_stateful(c, s, buf, fail, NULL);
}
-int pa_cli_command_execute_file(pa_core *c, const char *fn, pa_strbuf *buf, pa_bool_t *fail) {
+int pa_cli_command_execute_file_stream(pa_core *c, FILE *f, pa_strbuf *buf, pa_bool_t *fail) {
char line[1024];
- FILE *f = NULL;
int ifstate = IFSTATE_NONE;
int ret = -1;
+ pa_bool_t _fail = TRUE;
+
+ pa_assert(c);
+ pa_assert(f);
+ pa_assert(buf);
+
+ if (!fail)
+ fail = &_fail;
+
+ while (fgets(line, sizeof(line), f)) {
+ pa_strip_nl(line);
+
+ if (pa_cli_command_execute_line_stateful(c, line, buf, fail, &ifstate) < 0 && *fail)
+ goto fail;
+ }
+
+ ret = 0;
+
+fail:
+
+ return ret;
+}
+
+int pa_cli_command_execute_file(pa_core *c, const char *fn, pa_strbuf *buf, pa_bool_t *fail) {
+ FILE *f = NULL;
+ int ret = -1;
+ pa_bool_t _fail = TRUE;
pa_assert(c);
pa_assert(fn);
pa_assert(buf);
+ if (!fail)
+ fail = &_fail;
+
if (!(f = fopen(fn, "r"))) {
pa_strbuf_printf(buf, "open('%s') failed: %s\n", fn, pa_cstrerror(errno));
if (!*fail)
@@ -1407,13 +1488,7 @@ int pa_cli_command_execute_file(pa_core *c, const char *fn, pa_strbuf *buf, pa_b
goto fail;
}
- while (fgets(line, sizeof(line), f)) {
- char *e = line + strcspn(line, linebreak);
- *e = 0;
-
- if (pa_cli_command_execute_line_stateful(c, line, buf, fail, &ifstate) < 0 && *fail)
- goto fail;
- }
+ ret = pa_cli_command_execute_file_stream(c, f, buf, fail);
ret = 0;
@@ -1427,11 +1502,15 @@ fail:
int pa_cli_command_execute(pa_core *c, const char *s, pa_strbuf *buf, pa_bool_t *fail) {
const char *p;
int ifstate = IFSTATE_NONE;
+ pa_bool_t _fail = TRUE;
pa_assert(c);
pa_assert(s);
pa_assert(buf);
+ if (!fail)
+ fail = &_fail;
+
p = s;
while (*p) {
size_t l = strcspn(p, linebreak);
diff --git a/src/pulsecore/cli-command.h b/src/pulsecore/cli-command.h
index 6ea8365..9bf35dc 100644
--- a/src/pulsecore/cli-command.h
+++ b/src/pulsecore/cli-command.h
@@ -1,8 +1,6 @@
#ifndef fooclicommandhfoo
#define fooclicommandhfoo
-/* $Id: cli-command.h 2008 2007-11-01 00:32:45Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -36,6 +34,9 @@ int pa_cli_command_execute_line(pa_core *c, const char *s, pa_strbuf *buf, pa_bo
/* Execute a whole file of CLI commands */
int pa_cli_command_execute_file(pa_core *c, const char *fn, pa_strbuf *buf, pa_bool_t *fail);
+/* Execute a whole file of CLI commands */
+int pa_cli_command_execute_file_stream(pa_core *c, FILE *f, pa_strbuf *buf, pa_bool_t *fail);
+
/* Split the specified string into lines and run pa_cli_command_execute_line() for each. */
int pa_cli_command_execute(pa_core *c, const char *s, pa_strbuf *buf, pa_bool_t *fail);
diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c
index 9a8c1d5..7bbc266 100644
--- a/src/pulsecore/cli-text.c
+++ b/src/pulsecore/cli-text.c
@@ -1,5 +1,3 @@
-/* $Id: cli-text.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,6 +27,7 @@
#include <pulse/volume.h>
#include <pulse/xmalloc.h>
+#include <pulse/timeval.h>
#include <pulsecore/module.h>
#include <pulsecore/client.h>
@@ -41,6 +40,7 @@
#include <pulsecore/core-scache.h>
#include <pulsecore/autoload.h>
#include <pulsecore/macro.h>
+#include <pulsecore/core-util.h>
#include "cli-text.h"
@@ -56,12 +56,12 @@ char *pa_module_list_to_string(pa_core *c) {
for (m = pa_idxset_first(c->modules, &idx); m; m = pa_idxset_next(c->modules, &idx)) {
pa_strbuf_printf(s, " index: %u\n"
- "\tname: <%s>\n"
- "\targument: <%s>\n"
- "\tused: %i\n"
- "\tauto unload: %s\n",
- m->index, m->name, m->argument ? m->argument : "", m->n_used,
- m->auto_unload ? "yes" : "no");
+ "\tname: <%s>\n"
+ "\targument: <%s>\n"
+ "\tused: %i\n"
+ "\tauto unload: %s\n",
+ m->index, m->name, m->argument ? m->argument : "", m->n_used,
+ pa_yes_no(m->auto_unload));
}
return pa_strbuf_tostring_free(s);
@@ -78,10 +78,20 @@ char *pa_client_list_to_string(pa_core *c) {
pa_strbuf_printf(s, "%u client(s) logged in.\n", pa_idxset_size(c->clients));
for (client = pa_idxset_first(c->clients, &idx); client; client = pa_idxset_next(c->clients, &idx)) {
- pa_strbuf_printf(s, " index: %u\n\tname: <%s>\n\tdriver: <%s>\n", client->index, client->name, client->driver);
+ char *t;
+ pa_strbuf_printf(
+ s,
+ " index: %u\n"
+ "\tdriver: <%s>\n",
+ client->index,
+ client->driver);
- if (client->owner)
- pa_strbuf_printf(s, "\towner module: <%u>\n", client->owner->index);
+ if (client->module)
+ pa_strbuf_printf(s, "\towner module: %u\n", client->module->index);
+
+ t = pa_proplist_to_string(client->proplist);
+ pa_strbuf_printf(s, "\tproperties:\n%s", t);
+ pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
@@ -92,6 +102,7 @@ char *pa_sink_list_to_string(pa_core *c) {
pa_sink *sink;
uint32_t idx = PA_IDXSET_INVALID;
static const char* const state_table[] = {
+ [PA_SINK_INIT] = "INIT",
[PA_SINK_RUNNING] = "RUNNING",
[PA_SINK_SUSPENDED] = "SUSPENDED",
[PA_SINK_IDLE] = "IDLE",
@@ -104,35 +115,48 @@ char *pa_sink_list_to_string(pa_core *c) {
pa_strbuf_printf(s, "%u sink(s) available.\n", pa_idxset_size(c->sinks));
for (sink = pa_idxset_first(c->sinks, &idx); sink; sink = pa_idxset_next(c->sinks, &idx)) {
- char ss[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char ss[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX], *t;
+ pa_usec_t min_latency, max_latency;
+
+ pa_sink_get_latency_range(sink, &min_latency, &max_latency);
pa_strbuf_printf(
s,
" %c index: %u\n"
"\tname: <%s>\n"
"\tdriver: <%s>\n"
- "\tflags: %s%s%s%s\n"
+ "\tflags: %s%s%s%s%s%s\n"
"\tstate: %s\n"
- "\tvolume: <%s>\n"
- "\tmute: <%i>\n"
- "\tlatency: <%0.0f usec>\n"
- "\tmonitor source: <%u>\n"
- "\tsample spec: <%s>\n"
- "\tchannel map: <%s>\n"
- "\tused by: <%u>\n"
- "\tlinked by: <%u>\n",
+ "\tvolume: %s\n"
+ "\tmuted: %s\n"
+ "\tcurrent latency: %0.2f ms\n"
+ "\tconfigured latency: %0.2f ms; range is %0.2f .. %0.2f ms\n"
+ "\tmax request: %lu KiB\n"
+ "\tmax rewind: %lu KiB\n"
+ "\tmonitor source: %u\n"
+ "\tsample spec: %s\n"
+ "\tchannel map: %s\n"
+ "\tused by: %u\n"
+ "\tlinked by: %u\n",
c->default_sink_name && !strcmp(sink->name, c->default_sink_name) ? '*' : ' ',
sink->index,
sink->name,
sink->driver,
- sink->flags & PA_SINK_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
- sink->flags & PA_SINK_LATENCY ? "LATENCY " : "",
sink->flags & PA_SINK_HARDWARE ? "HARDWARE " : "",
sink->flags & PA_SINK_NETWORK ? "NETWORK " : "",
+ sink->flags & PA_SINK_HW_MUTE_CTRL ? "HW_MUTE_CTRL " : "",
+ sink->flags & PA_SINK_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
+ sink->flags & PA_SINK_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
+ sink->flags & PA_SINK_LATENCY ? "LATENCY " : "",
state_table[pa_sink_get_state(sink)],
- pa_cvolume_snprint(cv, sizeof(cv), pa_sink_get_volume(sink)),
- !!pa_sink_get_mute(sink),
- (double) pa_sink_get_latency(sink),
+ pa_cvolume_snprint(cv, sizeof(cv), pa_sink_get_volume(sink, FALSE)),
+ pa_yes_no(pa_sink_get_mute(sink, FALSE)),
+ (double) pa_sink_get_latency(sink) / (double) PA_USEC_PER_MSEC,
+ (double) pa_sink_get_requested_latency(sink) / (double) PA_USEC_PER_MSEC,
+ (double) min_latency / PA_USEC_PER_MSEC,
+ (double) max_latency / PA_USEC_PER_MSEC,
+ (unsigned long) pa_sink_get_max_request(sink) / 1024,
+ (unsigned long) pa_sink_get_max_rewind(sink) / 1024,
sink->monitor_source ? sink->monitor_source->index : PA_INVALID_INDEX,
pa_sample_spec_snprint(ss, sizeof(ss), &sink->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &sink->channel_map),
@@ -140,9 +164,11 @@ char *pa_sink_list_to_string(pa_core *c) {
pa_sink_linked_by(sink));
if (sink->module)
- pa_strbuf_printf(s, "\tmodule: <%u>\n", sink->module->index);
- if (sink->description)
- pa_strbuf_printf(s, "\tdescription: <%s>\n", sink->description);
+ pa_strbuf_printf(s, "\tmodule: %u\n", sink->module->index);
+
+ t = pa_proplist_to_string(sink->proplist);
+ pa_strbuf_printf(s, "\tproperties:\n%s", t);
+ pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
@@ -153,6 +179,7 @@ char *pa_source_list_to_string(pa_core *c) {
pa_source *source;
uint32_t idx = PA_IDXSET_INVALID;
static const char* const state_table[] = {
+ [PA_SOURCE_INIT] = "INIT",
[PA_SOURCE_RUNNING] = "RUNNING",
[PA_SOURCE_SUSPENDED] = "SUSPENDED",
[PA_SOURCE_IDLE] = "IDLE",
@@ -165,46 +192,58 @@ char *pa_source_list_to_string(pa_core *c) {
pa_strbuf_printf(s, "%u source(s) available.\n", pa_idxset_size(c->sources));
for (source = pa_idxset_first(c->sources, &idx); source; source = pa_idxset_next(c->sources, &idx)) {
- char ss[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX];
+ char ss[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], *t;
+ pa_usec_t min_latency, max_latency;
+ pa_source_get_latency_range(source, &min_latency, &max_latency);
pa_strbuf_printf(
s,
" %c index: %u\n"
"\tname: <%s>\n"
"\tdriver: <%s>\n"
- "\tflags: %s%s%s%s\n"
+ "\tflags: %s%s%s%s%s%s\n"
"\tstate: %s\n"
- "\tvolume: <%s>\n"
- "\tmute: <%u>\n"
- "\tlatency: <%0.0f usec>\n"
- "\tsample spec: <%s>\n"
- "\tchannel map: <%s>\n"
- "\tused by: <%u>\n"
- "\tlinked by: <%u>\n",
+ "\tvolume: %s\n"
+ "\tmuted: %s\n"
+ "\tcurrent latency: %0.2f ms\n"
+ "\tconfigured latency: %0.2f ms; range is %0.2f .. %0.2f ms\n"
+ "\tmax rewind: %lu KiB\n"
+ "\tsample spec: %s\n"
+ "\tchannel map: %s\n"
+ "\tused by: %u\n"
+ "\tlinked by: %u\n",
c->default_source_name && !strcmp(source->name, c->default_source_name) ? '*' : ' ',
source->index,
source->name,
source->driver,
- source->flags & PA_SOURCE_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
- source->flags & PA_SOURCE_LATENCY ? "LATENCY " : "",
source->flags & PA_SOURCE_HARDWARE ? "HARDWARE " : "",
source->flags & PA_SOURCE_NETWORK ? "NETWORK " : "",
+ source->flags & PA_SOURCE_HW_MUTE_CTRL ? "HW_MUTE_CTRL " : "",
+ source->flags & PA_SOURCE_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
+ source->flags & PA_SOURCE_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
+ source->flags & PA_SOURCE_LATENCY ? "LATENCY " : "",
state_table[pa_source_get_state(source)],
- pa_cvolume_snprint(cv, sizeof(cv), pa_source_get_volume(source)),
- !!pa_source_get_mute(source),
- (double) pa_source_get_latency(source),
+ pa_cvolume_snprint(cv, sizeof(cv), pa_source_get_volume(source, FALSE)),
+ pa_yes_no(pa_source_get_mute(source, FALSE)),
+ (double) pa_source_get_latency(source) / PA_USEC_PER_MSEC,
+ (double) pa_source_get_requested_latency(source) / PA_USEC_PER_MSEC,
+ (double) min_latency / PA_USEC_PER_MSEC,
+ (double) max_latency / PA_USEC_PER_MSEC,
+ (unsigned long) pa_source_get_max_rewind(source) / 1024,
pa_sample_spec_snprint(ss, sizeof(ss), &source->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &source->channel_map),
pa_source_used_by(source),
pa_source_linked_by(source));
if (source->monitor_of)
- pa_strbuf_printf(s, "\tmonitor_of: <%u>\n", source->monitor_of->index);
+ pa_strbuf_printf(s, "\tmonitor_of: %u\n", source->monitor_of->index);
if (source->module)
- pa_strbuf_printf(s, "\tmodule: <%u>\n", source->module->index);
- if (source->description)
- pa_strbuf_printf(s, "\tdescription: <%s>\n", source->description);
+ pa_strbuf_printf(s, "\tmodule: %u\n", source->module->index);
+
+ t = pa_proplist_to_string(source->proplist);
+ pa_strbuf_printf(s, "\tproperties:\n%s", t);
+ pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
@@ -216,6 +255,7 @@ char *pa_source_output_list_to_string(pa_core *c) {
pa_source_output *o;
uint32_t idx = PA_IDXSET_INVALID;
static const char* const state_table[] = {
+ [PA_SOURCE_OUTPUT_INIT] = "INIT",
[PA_SOURCE_OUTPUT_RUNNING] = "RUNNING",
[PA_SOURCE_OUTPUT_CORKED] = "CORKED",
[PA_SOURCE_OUTPUT_UNLINKED] = "UNLINKED"
@@ -227,27 +267,33 @@ char *pa_source_output_list_to_string(pa_core *c) {
pa_strbuf_printf(s, "%u source outputs(s) available.\n", pa_idxset_size(c->source_outputs));
for (o = pa_idxset_first(c->source_outputs, &idx); o; o = pa_idxset_next(c->source_outputs, &idx)) {
- char ss[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char ss[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX], *t, clt[28];
+ pa_usec_t cl;
+
+ if ((cl = pa_source_output_get_requested_latency(o)) == (pa_usec_t) -1)
+ pa_snprintf(clt, sizeof(clt), "n/a");
+ else
+ pa_snprintf(clt, sizeof(clt), "%0.2f ms", (double) cl / PA_USEC_PER_MSEC);
pa_assert(o->source);
pa_strbuf_printf(
s,
" index: %u\n"
- "\tname: '%s'\n"
"\tdriver: <%s>\n"
- "\tflags: %s%s%s%s%s%s%s\n"
+ "\tflags: %s%s%s%s%s%s%s%s\n"
"\tstate: %s\n"
- "\tsource: <%u> '%s'\n"
- "\tlatency: <%0.0f usec>\n"
- "\tsample spec: <%s>\n"
- "\tchannel map: <%s>\n"
+ "\tsource: %u <%s>\n"
+ "\tcurrent latency: %0.2f ms\n"
+ "\trequested latency: %s\n"
+ "\tsample spec: %s\n"
+ "\tchannel map: %s\n"
"\tresample method: %s\n",
o->index,
- o->name,
o->driver,
o->flags & PA_SOURCE_OUTPUT_VARIABLE_RATE ? "VARIABLE_RATE " : "",
o->flags & PA_SOURCE_OUTPUT_DONT_MOVE ? "DONT_MOVE " : "",
+ o->flags & PA_SOURCE_OUTPUT_START_CORKED ? "START_CORKED " : "",
o->flags & PA_SOURCE_OUTPUT_NO_REMAP ? "NO_REMAP " : "",
o->flags & PA_SOURCE_OUTPUT_NO_REMIX ? "NO_REMIX " : "",
o->flags & PA_SOURCE_OUTPUT_FIX_FORMAT ? "FIX_FORMAT " : "",
@@ -255,14 +301,21 @@ char *pa_source_output_list_to_string(pa_core *c) {
o->flags & PA_SOURCE_OUTPUT_FIX_CHANNELS ? "FIX_CHANNELS " : "",
state_table[pa_source_output_get_state(o)],
o->source->index, o->source->name,
- (double) pa_source_output_get_latency(o),
+ (double) pa_source_output_get_latency(o, NULL) / PA_USEC_PER_MSEC,
+ clt,
pa_sample_spec_snprint(ss, sizeof(ss), &o->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &o->channel_map),
pa_resample_method_to_string(pa_source_output_get_resample_method(o)));
if (o->module)
- pa_strbuf_printf(s, "\towner module: <%u>\n", o->module->index);
+ pa_strbuf_printf(s, "\towner module: %u\n", o->module->index);
if (o->client)
- pa_strbuf_printf(s, "\tclient: <%u> '%s'\n", o->client->index, o->client->name);
+ pa_strbuf_printf(s, "\tclient: %u <%s>\n", o->client->index, pa_strnull(pa_proplist_gets(o->client->proplist, PA_PROP_APPLICATION_NAME)));
+ if (o->direct_on_input)
+ pa_strbuf_printf(s, "\tdirect on input: %u\n", o->direct_on_input->index);
+
+ t = pa_proplist_to_string(o->proplist);
+ pa_strbuf_printf(s, "\tproperties:\n%s", t);
+ pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
@@ -273,6 +326,7 @@ char *pa_sink_input_list_to_string(pa_core *c) {
pa_sink_input *i;
uint32_t idx = PA_IDXSET_INVALID;
static const char* const state_table[] = {
+ [PA_SINK_INPUT_INIT] = "INIT",
[PA_SINK_INPUT_RUNNING] = "RUNNING",
[PA_SINK_INPUT_DRAINED] = "DRAINED",
[PA_SINK_INPUT_CORKED] = "CORKED",
@@ -285,29 +339,35 @@ char *pa_sink_input_list_to_string(pa_core *c) {
pa_strbuf_printf(s, "%u sink input(s) available.\n", pa_idxset_size(c->sink_inputs));
for (i = pa_idxset_first(c->sink_inputs, &idx); i; i = pa_idxset_next(c->sink_inputs, &idx)) {
- char ss[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char ss[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX], *t, clt[28];
+ pa_usec_t cl;
+
+ if ((cl = pa_sink_input_get_requested_latency(i)) == (pa_usec_t) -1)
+ pa_snprintf(clt, sizeof(clt), "n/a");
+ else
+ pa_snprintf(clt, sizeof(clt), "%0.2f ms", (double) cl / PA_USEC_PER_MSEC);
pa_assert(i->sink);
pa_strbuf_printf(
s,
" index: %u\n"
- "\tname: <%s>\n"
"\tdriver: <%s>\n"
- "\tflags: %s%s%s%s%s%s%s\n"
+ "\tflags: %s%s%s%s%s%s%s%s\n"
"\tstate: %s\n"
- "\tsink: <%u> '%s'\n"
- "\tvolume: <%s>\n"
- "\tmute: <%i>\n"
- "\tlatency: <%0.0f usec>\n"
- "\tsample spec: <%s>\n"
- "\tchannel map: <%s>\n"
+ "\tsink: %u <%s>\n"
+ "\tvolume: %s\n"
+ "\tmuted: %s\n"
+ "\tcurrent latency: %0.2f ms\n"
+ "\trequested latency: %s\n"
+ "\tsample spec: %s\n"
+ "\tchannel map: %s\n"
"\tresample method: %s\n",
i->index,
- i->name,
i->driver,
i->flags & PA_SINK_INPUT_VARIABLE_RATE ? "VARIABLE_RATE " : "",
i->flags & PA_SINK_INPUT_DONT_MOVE ? "DONT_MOVE " : "",
+ i->flags & PA_SINK_INPUT_START_CORKED ? "START_CORKED " : "",
i->flags & PA_SINK_INPUT_NO_REMAP ? "NO_REMAP " : "",
i->flags & PA_SINK_INPUT_NO_REMIX ? "NO_REMIX " : "",
i->flags & PA_SINK_INPUT_FIX_FORMAT ? "FIX_FORMAT " : "",
@@ -316,16 +376,21 @@ char *pa_sink_input_list_to_string(pa_core *c) {
state_table[pa_sink_input_get_state(i)],
i->sink->index, i->sink->name,
pa_cvolume_snprint(cv, sizeof(cv), pa_sink_input_get_volume(i)),
- !!pa_sink_input_get_mute(i),
- (double) pa_sink_input_get_latency(i),
+ pa_yes_no(pa_sink_input_get_mute(i)),
+ (double) pa_sink_input_get_latency(i, NULL) / PA_USEC_PER_MSEC,
+ clt,
pa_sample_spec_snprint(ss, sizeof(ss), &i->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
pa_resample_method_to_string(pa_sink_input_get_resample_method(i)));
if (i->module)
- pa_strbuf_printf(s, "\tmodule: <%u>\n", i->module->index);
+ pa_strbuf_printf(s, "\tmodule: %u\n", i->module->index);
if (i->client)
- pa_strbuf_printf(s, "\tclient: <%u> '%s'\n", i->client->index, i->client->name);
+ pa_strbuf_printf(s, "\tclient: %u <%s>\n", i->client->index, pa_strnull(pa_proplist_gets(i->client->proplist, PA_PROP_APPLICATION_NAME)));
+
+ t = pa_proplist_to_string(i->proplist);
+ pa_strbuf_printf(s, "\tproperties:\n%s", t);
+ pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
@@ -345,25 +410,25 @@ char *pa_scache_list_to_string(pa_core *c) {
for (e = pa_idxset_first(c->scache, &idx); e; e = pa_idxset_next(c->scache, &idx)) {
double l = 0;
- char ss[PA_SAMPLE_SPEC_SNPRINT_MAX] = "n/a", cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX] = "n/a";
+ char ss[PA_SAMPLE_SPEC_SNPRINT_MAX] = "n/a", cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX] = "n/a", *t;
if (e->memchunk.memblock) {
pa_sample_spec_snprint(ss, sizeof(ss), &e->sample_spec);
pa_channel_map_snprint(cm, sizeof(cm), &e->channel_map);
- l = (double) e->memchunk.length / pa_bytes_per_second(&e->sample_spec);
+ l = (double) e->memchunk.length / (double) pa_bytes_per_second(&e->sample_spec);
}
pa_strbuf_printf(
s,
" name: <%s>\n"
- "\tindex: <%u>\n"
- "\tsample spec: <%s>\n"
- "\tchannel map: <%s>\n"
- "\tlength: <%lu>\n"
- "\tduration: <%0.1fs>\n"
- "\tvolume: <%s>\n"
+ "\tindex: %u\n"
+ "\tsample spec: %s\n"
+ "\tchannel map: %s\n"
+ "\tlength: %lu\n"
+ "\tduration: %0.1f s\n"
+ "\tvolume: %s\n"
"\tlazy: %s\n"
- "\tfilename: %s\n",
+ "\tfilename: <%s>\n",
e->name,
e->index,
ss,
@@ -371,8 +436,12 @@ char *pa_scache_list_to_string(pa_core *c) {
(long unsigned)(e->memchunk.memblock ? e->memchunk.length : 0),
l,
pa_cvolume_snprint(cv, sizeof(cv), &e->volume),
- e->lazy ? "yes" : "no",
+ pa_yes_no(e->lazy),
e->filename ? e->filename : "n/a");
+
+ t = pa_proplist_to_string(e->proplist);
+ pa_strbuf_printf(s, "\tproperties:\n%s", t);
+ pa_xfree(t);
}
}
@@ -393,7 +462,12 @@ char *pa_autoload_list_to_string(pa_core *c) {
while ((e = pa_hashmap_iterate(c->autoload_hashmap, &state, NULL))) {
pa_strbuf_printf(
- s, " name: <%s>\n\ttype: <%s>\n\tindex: <%u>\n\tmodule_name: <%s>\n\targuments: <%s>\n",
+ s,
+ " name: <%s>\n"
+ "\ttype: %s\n"
+ "\tindex: %u\n"
+ "\tmodule_name: <%s>\n"
+ "\targuments: <%s>\n",
e->name,
e->type == PA_NAMEREG_SOURCE ? "source" : "sink",
e->index,
diff --git a/src/pulsecore/cli-text.h b/src/pulsecore/cli-text.h
index 0c71cd7..f4cb97a 100644
--- a/src/pulsecore/cli-text.h
+++ b/src/pulsecore/cli-text.h
@@ -1,8 +1,6 @@
#ifndef fooclitexthfoo
#define fooclitexthfoo
-/* $Id: cli-text.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/cli.c b/src/pulsecore/cli.c
index 7bff329..67bf1e7 100644
--- a/src/pulsecore/cli.c
+++ b/src/pulsecore/cli.c
@@ -1,5 +1,3 @@
-/* $Id: cli.c 2008 2007-11-01 00:32:45Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -54,7 +52,7 @@ struct pa_cli {
pa_core *core;
pa_ioline *line;
- void (*eof_callback)(pa_cli *c, void *userdata);
+ pa_cli_eof_cb_t eof_callback;
void *userdata;
pa_client *client;
@@ -82,7 +80,7 @@ pa_cli* pa_cli_new(pa_core *core, pa_iochannel *io, pa_module *m) {
pa_assert_se(c->client = pa_client_new(core, __FILE__, cname));
c->client->kill = client_kill;
c->client->userdata = c;
- c->client->owner = m;
+ c->client->module = m;
pa_ioline_set_callback(c->line, line_callback, c);
pa_ioline_puts(c->line, "Welcome to PulseAudio! Use \"help\" for usage information.\n"PROMPT);
@@ -109,12 +107,11 @@ static void client_kill(pa_client *client) {
pa_assert_se(c = client->userdata);
pa_log_debug("CLI client killed.");
+
if (c->defer_kill)
c->kill_requested = TRUE;
- else {
- if (c->eof_callback)
- c->eof_callback(c, c->userdata);
- }
+ else if (c->eof_callback)
+ c->eof_callback(c, c->userdata);
}
static void line_callback(pa_ioline *line, const char *s, void *userdata) {
@@ -127,6 +124,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
if (!s) {
pa_log_debug("CLI got EOF from user.");
+
if (c->eof_callback)
c->eof_callback(c, c->userdata);
@@ -147,9 +145,15 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
pa_ioline_puts(line, PROMPT);
}
-void pa_cli_set_eof_callback(pa_cli *c, void (*cb)(pa_cli*c, void *userdata), void *userdata) {
+void pa_cli_set_eof_callback(pa_cli *c, pa_cli_eof_cb_t cb, void *userdata) {
pa_assert(c);
c->eof_callback = cb;
c->userdata = userdata;
}
+
+pa_module *pa_cli_get_module(pa_cli *c) {
+ pa_assert(c);
+
+ return c->client->module;
+}
diff --git a/src/pulsecore/cli.h b/src/pulsecore/cli.h
index 991dc35..d860461 100644
--- a/src/pulsecore/cli.h
+++ b/src/pulsecore/cli.h
@@ -1,8 +1,6 @@
#ifndef fooclihfoo
#define fooclihfoo
-/* $Id: cli.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -30,11 +28,15 @@
typedef struct pa_cli pa_cli;
+typedef void (*pa_cli_eof_cb_t)(pa_cli *c, void *userdata);
+
/* Create a new command line session on the specified io channel owned by the specified module */
pa_cli* pa_cli_new(pa_core *core, pa_iochannel *io, pa_module *m);
void pa_cli_free(pa_cli *cli);
/* Set a callback function that is called whenever the command line session is terminated */
-void pa_cli_set_eof_callback(pa_cli *cli, void (*cb)(pa_cli*c, void *userdata), void *userdata);
+void pa_cli_set_eof_callback(pa_cli *cli, pa_cli_eof_cb_t cb, void *userdata);
+
+pa_module *pa_cli_get_module(pa_cli *c);
#endif
diff --git a/src/pulsecore/client.c b/src/pulsecore/client.c
index c3a174c..ab6e5df 100644
--- a/src/pulsecore/client.c
+++ b/src/pulsecore/client.c
@@ -1,5 +1,3 @@
-/* $Id: client.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -35,6 +33,7 @@
#include <pulsecore/core-subscribe.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
+#include <pulsecore/core-util.h>
#include "client.h"
@@ -44,37 +43,42 @@ pa_client *pa_client_new(pa_core *core, const char *driver, const char *name) {
pa_core_assert_ref(core);
c = pa_xnew(pa_client, 1);
- c->name = pa_xstrdup(name);
- c->driver = pa_xstrdup(driver);
- c->owner = NULL;
c->core = core;
+ c->proplist = pa_proplist_new();
+ if (name)
+ pa_proplist_sets(c->proplist, PA_PROP_APPLICATION_NAME, name);
+ c->driver = pa_xstrdup(driver);
+ c->module = NULL;
c->kill = NULL;
c->userdata = NULL;
pa_assert_se(pa_idxset_put(core->clients, c, &c->index) >= 0);
- pa_log_info("Created %u \"%s\"", c->index, c->name);
+ pa_log_info("Created %u \"%s\"", c->index, pa_strnull(name));
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_NEW, c->index);
- pa_core_check_quit(core);
+ pa_core_check_idle(core);
return c;
}
void pa_client_free(pa_client *c) {
+ pa_core *core;
+
pa_assert(c);
pa_assert(c->core);
+ core = c->core;
pa_idxset_remove_by_data(c->core->clients, c, NULL);
- pa_core_check_quit(c->core);
-
- pa_log_info("Freed %u \"%s\"", c->index, c->name);
+ pa_log_info("Freed %u \"%s\"", c->index, pa_strnull(pa_proplist_gets(c->proplist, PA_PROP_APPLICATION_NAME)));
pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
- pa_xfree(c->name);
+ pa_proplist_free(c->proplist);
pa_xfree(c->driver);
pa_xfree(c);
+
+ pa_core_check_idle(core);
}
void pa_client_kill(pa_client *c) {
@@ -91,10 +95,7 @@ void pa_client_kill(pa_client *c) {
void pa_client_set_name(pa_client *c, const char *name) {
pa_assert(c);
- pa_log_info("Client %u changed name from \"%s\" to \"%s\"", c->index, c->name, name);
-
- pa_xfree(c->name);
- c->name = pa_xstrdup(name);
-
+ pa_log_info("Client %u changed name from \"%s\" to \"%s\"", c->index, pa_strnull(pa_proplist_gets(c->proplist, PA_PROP_APPLICATION_NAME)), name);
+ pa_proplist_sets(c->proplist, PA_PROP_APPLICATION_NAME, name);
pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
}
diff --git a/src/pulsecore/client.h b/src/pulsecore/client.h
index 79cf322..28d1fe5 100644
--- a/src/pulsecore/client.h
+++ b/src/pulsecore/client.h
@@ -1,8 +1,6 @@
#ifndef foopulseclienthfoo
#define foopulseclienthfoo
-/* $Id: client.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -28,6 +26,7 @@
typedef struct pa_client pa_client;
+#include <pulse/proplist.h>
#include <pulsecore/core.h>
#include <pulsecore/module.h>
@@ -37,11 +36,12 @@ typedef struct pa_client pa_client;
struct pa_client {
uint32_t index;
-
- pa_module *owner;
- char *name, *driver;
pa_core *core;
+ pa_proplist *proplist;
+ pa_module *module;
+ char *driver;
+
void (*kill)(pa_client *c);
void *userdata;
};
diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c
index 554de82..58ceab9 100644
--- a/src/pulsecore/conf-parser.c
+++ b/src/pulsecore/conf-parser.c
@@ -1,5 +1,3 @@
-/* $Id: conf-parser.c 2007 2007-11-01 00:31:59Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -150,7 +148,7 @@ finish:
return r;
}
-int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
int *i = data;
int32_t k;
@@ -168,7 +166,25 @@ int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue,
return 0;
}
-int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+int pa_config_parse_size(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
+ size_t *i = data;
+ uint32_t k;
+
+ pa_assert(filename);
+ pa_assert(lvalue);
+ pa_assert(rvalue);
+ pa_assert(data);
+
+ if (pa_atou(rvalue, &k) < 0) {
+ pa_log("[%s:%u] Failed to parse numeric value: %s", filename, line, rvalue);
+ return -1;
+ }
+
+ *i = (size_t) k;
+ return 0;
+}
+
+int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
int k;
pa_bool_t *b = data;
@@ -187,7 +203,7 @@ int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue
return 0;
}
-int pa_config_parse_string(const char *filename, PA_GCC_UNUSED unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
+int pa_config_parse_string(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
char **s = data;
pa_assert(filename);
diff --git a/src/pulsecore/conf-parser.h b/src/pulsecore/conf-parser.h
index 19a4636..a5174fc 100644
--- a/src/pulsecore/conf-parser.h
+++ b/src/pulsecore/conf-parser.h
@@ -1,8 +1,6 @@
#ifndef fooconfparserhfoo
#define fooconfparserhfoo
-/* $Id: conf-parser.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -41,8 +39,9 @@ typedef struct pa_config_item {
* NULL */
int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void *userdata);
-/* Generic parsers for integers, booleans and strings */
+/* Generic parsers for integers, size_t, booleans and strings */
int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata);
+int pa_config_parse_size(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata);
int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata);
int pa_config_parse_string(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata);
diff --git a/src/pulsecore/core-error.c b/src/pulsecore/core-error.c
index dfe0611..3d6c2c3 100644
--- a/src/pulsecore/core-error.c
+++ b/src/pulsecore/core-error.c
@@ -1,5 +1,3 @@
-/* $Id: core-error.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/core-error.h b/src/pulsecore/core-error.h
index 473f174..b0c306c 100644
--- a/src/pulsecore/core-error.h
+++ b/src/pulsecore/core-error.h
@@ -1,8 +1,6 @@
#ifndef foocoreerrorhfoo
#define foocoreerrorhfoo
-/* $Id: core-error.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c
index b475cac..1d080e1 100644
--- a/src/pulsecore/core-scache.c
+++ b/src/pulsecore/core-scache.c
@@ -1,9 +1,7 @@
-/* $Id: core-scache.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio is free software; you can redistribute it and/or modify
@@ -63,9 +61,9 @@
#include "core-scache.h"
-#define UNLOAD_POLL_TIME 2
+#define UNLOAD_POLL_TIME 60
-static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, const struct timeval *tv, void *userdata) {
pa_core *c = userdata;
struct timeval ntv;
@@ -89,6 +87,8 @@ static void free_entry(pa_scache_entry *e) {
pa_xfree(e->filename);
if (e->memchunk.memblock)
pa_memblock_unref(e->memchunk.memblock);
+ if (e->proplist)
+ pa_proplist_free(e->proplist);
pa_xfree(e);
}
@@ -98,11 +98,12 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) {
pa_assert(c);
pa_assert(name);
- if ((e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 0))) {
+ if ((e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, FALSE))) {
if (e->memchunk.memblock)
pa_memblock_unref(e->memchunk.memblock);
pa_xfree(e->filename);
+ pa_proplist_clear(e->proplist);
pa_assert(e->core == c);
@@ -110,18 +111,17 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) {
} else {
e = pa_xnew(pa_scache_entry, 1);
- if (!pa_namereg_register(c, name, PA_NAMEREG_SAMPLE, e, 1)) {
+ if (!pa_namereg_register(c, name, PA_NAMEREG_SAMPLE, e, TRUE)) {
pa_xfree(e);
return NULL;
}
e->name = pa_xstrdup(name);
e->core = c;
+ e->proplist = pa_proplist_new();
- if (!c->scache) {
+ if (!c->scache)
c->scache = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
- pa_assert(c->scache);
- }
pa_idxset_put(c->scache, e, &e->index);
@@ -129,20 +129,29 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) {
}
e->last_used_time = 0;
- e->memchunk.memblock = NULL;
- e->memchunk.index = e->memchunk.length = 0;
+ pa_memchunk_reset(&e->memchunk);
e->filename = NULL;
- e->lazy = 0;
+ e->lazy = FALSE;
e->last_used_time = 0;
- memset(&e->sample_spec, 0, sizeof(e->sample_spec));
+ pa_sample_spec_init(&e->sample_spec);
pa_channel_map_init(&e->channel_map);
- pa_cvolume_reset(&e->volume, PA_CHANNELS_MAX);
+ pa_cvolume_init(&e->volume);
+
+ pa_proplist_sets(e->proplist, PA_PROP_MEDIA_ROLE, "event");
return e;
}
-int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_memchunk *chunk, uint32_t *idx) {
+int pa_scache_add_item(
+ pa_core *c,
+ const char *name,
+ const pa_sample_spec *ss,
+ const pa_channel_map *map,
+ const pa_memchunk *chunk,
+ pa_proplist *p,
+ uint32_t *idx) {
+
pa_scache_entry *e;
char st[PA_SAMPLE_SPEC_SNPRINT_MAX];
pa_channel_map tmap;
@@ -150,11 +159,12 @@ int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, c
pa_assert(c);
pa_assert(name);
pa_assert(!ss || pa_sample_spec_valid(ss));
- pa_assert(!map || (pa_channel_map_valid(map) && ss && ss->channels == map->channels));
+ pa_assert(!map || (pa_channel_map_valid(map) && ss && pa_channel_map_compatible(map, ss)));
- if (ss && !map)
- if (!(map = pa_channel_map_init_auto(&tmap, ss->channels, PA_CHANNEL_MAP_DEFAULT)))
- return -1;
+ if (ss && !map) {
+ pa_channel_map_init_extend(&tmap, ss->channels, PA_CHANNEL_MAP_DEFAULT);
+ map = &tmap;
+ }
if (chunk && chunk->length > PA_SCACHE_ENTRY_SIZE_MAX)
return -1;
@@ -162,12 +172,13 @@ int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, c
if (!(e = scache_add_item(c, name)))
return -1;
- memset(&e->sample_spec, 0, sizeof(e->sample_spec));
+ pa_sample_spec_init(&e->sample_spec);
pa_channel_map_init(&e->channel_map);
+ pa_cvolume_init(&e->volume);
if (ss) {
e->sample_spec = *ss;
- e->volume.channels = e->sample_spec.channels;
+ pa_cvolume_reset(&e->volume, ss->channels);
}
if (map)
@@ -178,6 +189,9 @@ int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, c
pa_memblock_ref(e->memchunk.memblock);
}
+ if (p)
+ pa_proplist_update(e->proplist, PA_UPDATE_REPLACE, p);
+
if (idx)
*idx = e->index;
@@ -193,6 +207,7 @@ int pa_scache_add_file(pa_core *c, const char *name, const char *filename, uint3
pa_channel_map map;
pa_memchunk chunk;
int r;
+ pa_proplist *p;
#ifdef OS_IS_WIN32
char buf[MAX_PATH];
@@ -208,8 +223,11 @@ int pa_scache_add_file(pa_core *c, const char *name, const char *filename, uint3
if (pa_sound_file_load(c->mempool, filename, &ss, &map, &chunk) < 0)
return -1;
- r = pa_scache_add_item(c, name, &ss, &map, &chunk, idx);
+ p = pa_proplist_new();
+ pa_proplist_sets(p, PA_PROP_MEDIA_FILENAME, filename);
+ r = pa_scache_add_item(c, name, &ss, &map, &chunk, p, idx);
pa_memblock_unref(chunk.memblock);
+ pa_proplist_free(p);
return r;
}
@@ -231,9 +249,11 @@ int pa_scache_add_file_lazy(pa_core *c, const char *name, const char *filename,
if (!(e = scache_add_item(c, name)))
return -1;
- e->lazy = 1;
+ e->lazy = TRUE;
e->filename = pa_xstrdup(filename);
+ pa_proplist_sets(e->proplist, PA_PROP_MEDIA_FILENAME, filename);
+
if (!c->scache_auto_unload_event) {
struct timeval ntv;
pa_gettimeofday(&ntv);
@@ -256,8 +276,7 @@ int pa_scache_remove_item(pa_core *c, const char *name) {
if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 0)))
return -1;
- if (pa_idxset_remove_by_data(c->scache, e, NULL) != e)
- pa_assert(0);
+ pa_assert_se(pa_idxset_remove_by_data(c->scache, e, NULL) == e);
pa_log_debug("Removed sample \"%s\"", name);
@@ -266,7 +285,7 @@ int pa_scache_remove_item(pa_core *c, const char *name) {
return 0;
}
-static void free_cb(void *p, PA_GCC_UNUSED void *userdata) {
+static void free_cb(void *p, void *userdata) {
pa_scache_entry *e = p;
pa_assert(e);
@@ -285,26 +304,30 @@ void pa_scache_free(pa_core *c) {
c->mainloop->time_free(c->scache_auto_unload_event);
}
-int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t volume) {
+int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t volume, pa_proplist *p, uint32_t *sink_input_idx) {
pa_scache_entry *e;
- char *t;
pa_cvolume r;
+ pa_proplist *merged;
pa_assert(c);
pa_assert(name);
pa_assert(sink);
- if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 1)))
+ if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, FALSE)))
return -1;
if (e->lazy && !e->memchunk.memblock) {
+ pa_channel_map old_channel_map = e->channel_map;
+
if (pa_sound_file_load(c->mempool, e->filename, &e->sample_spec, &e->channel_map, &e->memchunk) < 0)
return -1;
pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE|PA_SUBSCRIPTION_EVENT_CHANGE, e->index);
- if (e->volume.channels > e->sample_spec.channels)
- e->volume.channels = e->sample_spec.channels;
+ if (pa_cvolume_valid(&e->volume))
+ pa_cvolume_remap(&e->volume, &old_channel_map, &e->channel_map);
+ else
+ pa_cvolume_reset(&e->volume, e->sample_spec.channels);
}
if (!e->memchunk.memblock)
@@ -312,17 +335,24 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t
pa_log_debug("Playing sample \"%s\" on \"%s\"", name, sink->name);
- t = pa_sprintf_malloc("sample:%s", name);
-
pa_cvolume_set(&r, e->volume.channels, volume);
pa_sw_cvolume_multiply(&r, &r, &e->volume);
- if (pa_play_memchunk(sink, t, &e->sample_spec, &e->channel_map, &e->memchunk, &r) < 0) {
- pa_xfree(t);
+ merged = pa_proplist_new();
+
+ pa_proplist_setf(merged, PA_PROP_MEDIA_NAME, "Sample %s", name);
+
+ pa_proplist_update(merged, PA_UPDATE_REPLACE, e->proplist);
+
+ if (p)
+ pa_proplist_update(merged, PA_UPDATE_REPLACE, p);
+
+ if (pa_play_memchunk(sink, &e->sample_spec, &e->channel_map, &e->memchunk, &r, merged, sink_input_idx) < 0) {
+ pa_proplist_free(merged);
return -1;
}
- pa_xfree(t);
+ pa_proplist_free(merged);
if (e->lazy)
time(&e->last_used_time);
@@ -330,7 +360,7 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t
return 0;
}
-int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*sink_name, pa_volume_t volume, int autoload) {
+int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*sink_name, pa_bool_t autoload, pa_volume_t volume, pa_proplist *p, uint32_t *sink_input_idx) {
pa_sink *sink;
pa_assert(c);
@@ -339,10 +369,10 @@ int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*sink_na
if (!(sink = pa_namereg_get(c, sink_name, PA_NAMEREG_SINK, autoload)))
return -1;
- return pa_scache_play_item(c, name, sink, volume);
+ return pa_scache_play_item(c, name, sink, volume, p, sink_input_idx);
}
-const char * pa_scache_get_name_by_id(pa_core *c, uint32_t id) {
+const char *pa_scache_get_name_by_id(pa_core *c, uint32_t id) {
pa_scache_entry *e;
pa_assert(c);
@@ -360,15 +390,16 @@ uint32_t pa_scache_get_id_by_name(pa_core *c, const char *name) {
pa_assert(c);
pa_assert(name);
- if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 0)))
+ if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, FALSE)))
return PA_IDXSET_INVALID;
return e->index;
}
-uint32_t pa_scache_total_size(pa_core *c) {
+size_t pa_scache_total_size(pa_core *c) {
pa_scache_entry *e;
- uint32_t idx, sum = 0;
+ uint32_t idx;
+ size_t sum = 0;
pa_assert(c);
@@ -403,8 +434,7 @@ void pa_scache_unload_unused(pa_core *c) {
continue;
pa_memblock_unref(e->memchunk.memblock);
- e->memchunk.memblock = NULL;
- e->memchunk.index = e->memchunk.length = 0;
+ pa_memchunk_reset(&e->memchunk);
pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE|PA_SUBSCRIPTION_EVENT_CHANGE, e->index);
}
@@ -467,8 +497,9 @@ int pa_scache_add_directory_lazy(pa_core *c, const char *pathname) {
pa_snprintf(p, sizeof(p), "%s/%s", pathname, e->d_name);
add_file(c, p);
}
+
+ closedir(dir);
}
- closedir(dir);
return 0;
}
diff --git a/src/pulsecore/core-scache.h b/src/pulsecore/core-scache.h
index 7ec76e4..80e0fd0 100644
--- a/src/pulsecore/core-scache.h
+++ b/src/pulsecore/core-scache.h
@@ -1,8 +1,6 @@
#ifndef foocorescachehfoo
#define foocorescachehfoo
-/* $Id: core-scache.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,11 +27,12 @@
#include <pulsecore/memchunk.h>
#include <pulsecore/sink.h>
-#define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*2)
+#define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*16)
typedef struct pa_scache_entry {
- pa_core *core;
uint32_t index;
+ pa_core *core;
+
char *name;
pa_cvolume volume;
@@ -43,25 +42,27 @@ typedef struct pa_scache_entry {
char *filename;
- int lazy;
+ pa_bool_t lazy;
time_t last_used_time;
+
+ pa_proplist *proplist;
} pa_scache_entry;
-int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_memchunk *chunk, uint32_t *idx);
+int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_memchunk *chunk, pa_proplist *p, uint32_t *idx);
int pa_scache_add_file(pa_core *c, const char *name, const char *filename, uint32_t *idx);
int pa_scache_add_file_lazy(pa_core *c, const char *name, const char *filename, uint32_t *idx);
int pa_scache_add_directory_lazy(pa_core *c, const char *pathname);
int pa_scache_remove_item(pa_core *c, const char *name);
-int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t volume);
-int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*sink_name, pa_volume_t volume, int autoload);
+int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t volume, pa_proplist *p, uint32_t *sink_input_idx);
+int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*sink_name, pa_bool_t autoload, pa_volume_t volume, pa_proplist *p, uint32_t *sink_input_idx);
void pa_scache_free(pa_core *c);
const char *pa_scache_get_name_by_id(pa_core *c, uint32_t id);
uint32_t pa_scache_get_id_by_name(pa_core *c, const char *name);
-uint32_t pa_scache_total_size(pa_core *c);
+size_t pa_scache_total_size(pa_core *c);
void pa_scache_unload_unused(pa_core *c);
diff --git a/src/pulsecore/core-subscribe.c b/src/pulsecore/core-subscribe.c
index 6b54853..c70d8ad 100644
--- a/src/pulsecore/core-subscribe.c
+++ b/src/pulsecore/core-subscribe.c
@@ -1,5 +1,3 @@
-/* $Id: core-subscribe.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -44,7 +42,7 @@
struct pa_subscription {
pa_core *core;
- int dead;
+ pa_bool_t dead;
pa_subscription_cb_t callback;
void *userdata;
@@ -74,7 +72,7 @@ pa_subscription* pa_subscription_new(pa_core *c, pa_subscription_mask_t m, pa_su
s = pa_xnew(pa_subscription, 1);
s->core = c;
- s->dead = 0;
+ s->dead = FALSE;
s->callback = callback;
s->userdata = userdata;
s->mask = m;
@@ -88,7 +86,7 @@ void pa_subscription_free(pa_subscription*s) {
pa_assert(s);
pa_assert(!s->dead);
- s->dead = 1;
+ s->dead = TRUE;
sched_event(s->core);
}
@@ -147,7 +145,7 @@ static void dump_event(const char * prefix, pa_subscription_event*e) {
[PA_SUBSCRIPTION_EVENT_REMOVE] = "REMOVE"
};
- pa_log("%s event (%s|%s|%u)",
+ pa_log_debug("%s event (%s|%s|%u)",
prefix,
fac_table[e->type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK],
type_table[e->type & PA_SUBSCRIPTION_EVENT_TYPE_MASK],
@@ -236,7 +234,7 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i
* entry in the queue. */
free_event(i);
- pa_log_debug("dropped redundant event.");
+ pa_log_debug("Dropped redundant event due to remove event.");
continue;
}
@@ -244,7 +242,7 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i
/* This object has changed. If a "new" or "change" event for
* this object is still in the queue we can exit. */
- pa_log_debug("dropped redundant event.");
+ pa_log_debug("Dropped redundant event due to change event.");
return;
}
}
diff --git a/src/pulsecore/core-subscribe.h b/src/pulsecore/core-subscribe.h
index c043f46..2f9730d 100644
--- a/src/pulsecore/core-subscribe.h
+++ b/src/pulsecore/core-subscribe.h
@@ -1,8 +1,6 @@
#ifndef foocoresubscribehfoo
#define foocoresubscribehfoo
-/* $Id: core-subscribe.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 97c591d..dde34d7 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -1,5 +1,3 @@
-/* $Id: core-util.c 2137 2008-03-27 21:20:07Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -41,6 +39,10 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <dirent.h>
+#include <regex.h>
+#include <langinfo.h>
+#include <sys/utsname.h>
#ifdef HAVE_STRTOF_L
#include <locale.h>
@@ -103,12 +105,6 @@
#define MSG_NOSIGNAL 0
#endif
-#ifndef OS_IS_WIN32
-#define PA_USER_RUNTIME_PATH_PREFIX "/tmp/pulse-"
-#else
-#define PA_USER_RUNTIME_PATH_PREFIX "%TEMP%\\pulse-"
-#endif
-
#ifdef OS_IS_WIN32
#define PULSE_ROOTENV "PULSE_ROOT"
@@ -118,6 +114,8 @@ int pa_set_root(HANDLE handle) {
strcpy(library_path, PULSE_ROOTENV "=");
+ /* FIXME: Needs to set errno */
+
if (!GetModuleFileName(handle, library_path + sizeof(PULSE_ROOTENV), MAX_PATH))
return 0;
@@ -175,7 +173,7 @@ void pa_make_fd_cloexec(int fd) {
/** Creates a directory securely */
int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) {
struct stat st;
- int r;
+ int r, saved_errno;
pa_assert(dir);
@@ -184,7 +182,7 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) {
#else
{
mode_t u;
- u = umask(~m);
+ u = umask((~m) & 0777);
r = mkdir(dir, m);
umask(u);
}
@@ -221,13 +219,16 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) {
goto fail;
}
#else
- pa_log_warn("secure directory creation not supported on Win32.");
+ pa_log_warn("Secure directory creation not supported on Win32.");
#endif
return 0;
fail:
+ saved_errno = errno;
rmdir(dir);
+ errno = saved_errno;
+
return -1;
}
@@ -237,6 +238,7 @@ char *pa_parent_dir(const char *fn) {
if ((slash = (char*) pa_path_get_filename(dir)) == dir) {
pa_xfree(dir);
+ errno = ENOENT;
return NULL;
}
@@ -344,7 +346,7 @@ ssize_t pa_loop_read(int fd, void*data, size_t size, int *type) {
ret += r;
data = (uint8_t*) data + r;
- size -= r;
+ size -= (size_t) r;
}
return ret;
@@ -375,7 +377,7 @@ ssize_t pa_loop_write(int fd, const void*data, size_t size, int *type) {
ret += r;
data = (const uint8_t*) data + r;
- size -= r;
+ size -= (size_t) r;
}
return ret;
@@ -397,7 +399,15 @@ int pa_close(int fd) {
}
#endif
- return close(fd);
+ for (;;) {
+ int r;
+
+ if ((r = close(fd)) >= 0)
+ return r;
+
+ if (errno != EINTR)
+ return r;
+ }
}
/* Print a warning messages in case that the given signal is not
@@ -444,7 +454,7 @@ void pa_check_signal_is_blocked(int sig) {
/* The following function is based on an example from the GNU libc
* documentation. This function is similar to GNU's asprintf(). */
char *pa_sprintf_malloc(const char *format, ...) {
- int size = 100;
+ size_t size = 100;
char *c = NULL;
pa_assert(format);
@@ -461,11 +471,11 @@ char *pa_sprintf_malloc(const char *format, ...) {
c[size-1] = 0;
- if (r > -1 && r < size)
+ if (r > -1 && (size_t) r < size)
return c;
if (r > -1) /* glibc 2.1 */
- size = r+1;
+ size = (size_t) r+1;
else /* glibc 2.0 */
size *= 2;
}
@@ -474,7 +484,7 @@ char *pa_sprintf_malloc(const char *format, ...) {
/* Same as the previous function, but use a va_list instead of an
* ellipsis */
char *pa_vsprintf_malloc(const char *format, va_list ap) {
- int size = 100;
+ size_t size = 100;
char *c = NULL;
pa_assert(format);
@@ -491,11 +501,11 @@ char *pa_vsprintf_malloc(const char *format, va_list ap) {
c[size-1] = 0;
- if (r > -1 && r < size)
+ if (r > -1 && (size_t) r < size)
return c;
if (r > -1) /* glibc 2.1 */
- size = r+1;
+ size = (size_t) r+1;
else /* glibc 2.0 */
size *= 2;
}
@@ -553,10 +563,88 @@ int pa_make_realtime(int rtprio) {
pa_log_info("Successfully enabled SCHED_FIFO scheduling for thread, with priority %i.", sp.sched_priority);
return 0;
#else
+
+ errno = ENOTSUP;
return -1;
#endif
}
+/* This is merely used for giving the user a hint. This is not correct
+ * for anything security related */
+pa_bool_t pa_can_realtime(void) {
+
+ if (geteuid() == 0)
+ return TRUE;
+
+#if defined(HAVE_SYS_RESOURCE_H) && defined(RLIMIT_RTPRIO)
+ {
+ struct rlimit rl;
+
+ if (getrlimit(RLIMIT_RTPRIO, &rl) >= 0)
+ if (rl.rlim_cur > 0 || rl.rlim_cur == RLIM_INFINITY)
+ return TRUE;
+ }
+#endif
+
+#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_SYS_NICE)
+ {
+ cap_t cap;
+
+ if ((cap = cap_get_proc())) {
+ cap_flag_value_t flag = CAP_CLEAR;
+
+ if (cap_get_flag(cap, CAP_SYS_NICE, CAP_EFFECTIVE, &flag) >= 0)
+ if (flag == CAP_SET) {
+ cap_free(cap);
+ return TRUE;
+ }
+
+ cap_free(cap);
+ }
+ }
+#endif
+
+ return FALSE;
+}
+
+/* This is merely used for giving the user a hint. This is not correct
+ * for anything security related */
+pa_bool_t pa_can_high_priority(void) {
+
+ if (geteuid() == 0)
+ return TRUE;
+
+#if defined(HAVE_SYS_RESOURCE_H) && defined(RLIMIT_RTPRIO)
+ {
+ struct rlimit rl;
+
+ if (getrlimit(RLIMIT_NICE, &rl) >= 0)
+ if (rl.rlim_cur >= 21 || rl.rlim_cur == RLIM_INFINITY)
+ return TRUE;
+ }
+#endif
+
+#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_SYS_NICE)
+ {
+ cap_t cap;
+
+ if ((cap = cap_get_proc())) {
+ cap_flag_value_t flag = CAP_CLEAR;
+
+ if (cap_get_flag(cap, CAP_SYS_NICE, CAP_EFFECTIVE, &flag) >= 0)
+ if (flag == CAP_SET) {
+ cap_free(cap);
+ return TRUE;
+ }
+
+ cap_free(cap);
+ }
+ }
+#endif
+
+ return FALSE;
+}
+
/* Raise the priority of the current process as much as possible that
* is <= the specified nice level..*/
int pa_raise_priority(int nice_level) {
@@ -584,6 +672,7 @@ int pa_raise_priority(int nice_level) {
if (nice_level < 0) {
if (!SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS)) {
pa_log_warn("SetPriorityClass() failed: 0x%08X", GetLastError());
+ errno = EPERM;
return .-1;
} else
pa_log_info("Successfully gained high priority class.");
@@ -610,14 +699,55 @@ void pa_reset_priority(void) {
#endif
}
+static int match(const char *expr, const char *v) {
+ int k;
+ regex_t re;
+ int r;
+
+ if (regcomp(&re, expr, REG_NOSUB|REG_EXTENDED) != 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if ((k = regexec(&re, v, 0, NULL, 0)) == 0)
+ r = 1;
+ else if (k == REG_NOMATCH)
+ r = 0;
+ else
+ r = -1;
+
+ regfree(&re);
+
+ if (r < 0)
+ errno = EINVAL;
+
+ return r;
+}
+
/* Try to parse a boolean string value.*/
int pa_parse_boolean(const char *v) {
+ const char *expr;
+ int r;
+ pa_assert(v);
+ /* First we check language independant */
if (!strcmp(v, "1") || v[0] == 'y' || v[0] == 'Y' || v[0] == 't' || v[0] == 'T' || !strcasecmp(v, "on"))
return 1;
else if (!strcmp(v, "0") || v[0] == 'n' || v[0] == 'N' || v[0] == 'f' || v[0] == 'F' || !strcasecmp(v, "off"))
return 0;
+ /* And then we check language dependant */
+ if ((expr = nl_langinfo(YESEXPR)))
+ if (expr[0])
+ if ((r = match(expr, v)) > 0)
+ return 1;
+
+ if ((expr = nl_langinfo(NOEXPR)))
+ if (expr[0])
+ if ((r = match(expr, v)) > 0)
+ return 0;
+
+ errno = EINVAL;
return -1;
}
@@ -805,11 +935,18 @@ static int is_group(gid_t gid, const char *name) {
#else
n = -1;
#endif
- if (n < 0) n = 512;
- data = pa_xmalloc(n);
+ if (n < 0)
+ n = 512;
+
+ data = pa_xmalloc((size_t) n);
+
+ errno = 0;
+ if (getgrgid_r(gid, &group, data, (size_t) n, &result) < 0 || !result) {
+ pa_log("getgrgid_r(%u): %s", (unsigned) gid, pa_cstrerror(errno));
+
+ if (!errno)
+ errno = ENOENT;
- if (getgrgid_r(gid, &group, data, n, &result) < 0 || !result) {
- pa_log("getgrgid_r(%u): %s", (unsigned)gid, pa_cstrerror(errno));
goto finish;
}
@@ -820,8 +957,14 @@ finish:
#else
/* XXX Not thread-safe, but needed on OSes (e.g. FreeBSD 4.X) that do not
* support getgrgid_r. */
+
+ errno = 0;
if ((result = getgrgid(gid)) == NULL) {
pa_log("getgrgid(%u): %s", gid, pa_cstrerror(errno));
+
+ if (!errno)
+ errno = ENOENT;
+
goto finish;
}
@@ -836,27 +979,32 @@ finish:
/* Check the current user is member of the specified group */
int pa_own_uid_in_group(const char *name, gid_t *gid) {
GETGROUPS_T *gids, tgid;
- int n = sysconf(_SC_NGROUPS_MAX);
- int r = -1, i;
+ long n = sysconf(_SC_NGROUPS_MAX);
+ int r = -1, i, k;
pa_assert(n > 0);
- gids = pa_xmalloc(sizeof(GETGROUPS_T)*n);
+ gids = pa_xmalloc(sizeof(GETGROUPS_T) * (size_t) n);
- if ((n = getgroups(n, gids)) < 0) {
+ if ((n = getgroups((int) n, gids)) < 0) {
pa_log("getgroups(): %s", pa_cstrerror(errno));
goto finish;
}
for (i = 0; i < n; i++) {
- if (is_group(gids[i], name) > 0) {
+
+ if ((k = is_group(gids[i], name)) < 0)
+ goto finish;
+ else if (k > 0) {
*gid = gids[i];
r = 1;
goto finish;
}
}
- if (is_group(tgid = getgid(), name) > 0) {
+ if ((k = is_group(tgid = getgid(), name)) < 0)
+ goto finish;
+ else if (k > 0) {
*gid = tgid;
r = 1;
goto finish;
@@ -879,18 +1027,25 @@ int pa_uid_in_group(uid_t uid, const char *name) {
int r = -1;
g_n = sysconf(_SC_GETGR_R_SIZE_MAX);
- g_buf = pa_xmalloc(g_n);
+ g_buf = pa_xmalloc((size_t) g_n);
p_n = sysconf(_SC_GETPW_R_SIZE_MAX);
- p_buf = pa_xmalloc(p_n);
+ p_buf = pa_xmalloc((size_t) p_n);
+
+ errno = 0;
+ if (getgrnam_r(name, &grbuf, g_buf, (size_t) g_n, &gr) != 0 || !gr) {
+
+ if (!errno)
+ errno = ENOENT;
- if (getgrnam_r(name, &grbuf, g_buf, (size_t) g_n, &gr) != 0 || !gr)
goto finish;
+ }
r = 0;
for (i = gr->gr_mem; *i; i++) {
struct passwd pwbuf, *pw;
+ errno = 0;
if (getpwnam_r(*i, &pwbuf, p_buf, (size_t) p_n, &pw) != 0 || !pw)
continue;
@@ -915,10 +1070,16 @@ gid_t pa_get_gid_of_group(const char *name) {
struct group grbuf, *gr;
g_n = sysconf(_SC_GETGR_R_SIZE_MAX);
- g_buf = pa_xmalloc(g_n);
+ g_buf = pa_xmalloc((size_t) g_n);
+
+ errno = 0;
+ if (getgrnam_r(name, &grbuf, g_buf, (size_t) g_n, &gr) != 0 || !gr) {
+
+ if (!errno)
+ errno = ENOENT;
- if (getgrnam_r(name, &grbuf, g_buf, (size_t) g_n, &gr) != 0 || !gr)
goto finish;
+ }
ret = gr->gr_gid;
@@ -944,19 +1105,23 @@ int pa_check_in_group(gid_t g) {
#else /* HAVE_GRP_H */
int pa_own_uid_in_group(const char *name, gid_t *gid) {
+ errno = ENOSUP;
return -1;
}
int pa_uid_in_group(uid_t uid, const char *name) {
+ errno = ENOSUP;
return -1;
}
gid_t pa_get_gid_of_group(const char *name) {
+ errno = ENOSUP;
return (gid_t) -1;
}
int pa_check_in_group(gid_t g) {
+ errno = ENOSUP;
return -1;
}
@@ -970,7 +1135,7 @@ int pa_lock_fd(int fd, int b) {
/* Try a R/W lock first */
- flock.l_type = b ? F_WRLCK : F_UNLCK;
+ flock.l_type = (short) (b ? F_WRLCK : F_UNLCK);
flock.l_whence = SEEK_SET;
flock.l_start = 0;
flock.l_len = 0;
@@ -997,6 +1162,8 @@ int pa_lock_fd(int fd, int b) {
return 0;
pa_log("%slock failed: 0x%08X", !b ? "un" : "", GetLastError());
+
+ /* FIXME: Needs to set errno! */
#endif
return -1;
@@ -1063,8 +1230,11 @@ int pa_lock_lockfile(const char *fn) {
fail:
- if (fd >= 0)
+ if (fd >= 0) {
+ int saved_errno = errno;
pa_close(fd);
+ errno = saved_errno;
+ }
return -1;
}
@@ -1072,12 +1242,13 @@ fail:
/* Unlock a temporary lcok file */
int pa_unlock_lockfile(const char *fn, int fd) {
int r = 0;
- pa_assert(fn);
pa_assert(fd >= 0);
- if (unlink(fn) < 0) {
- pa_log_warn("Unable to remove lock file '%s': %s", fn, pa_cstrerror(errno));
- r = -1;
+ if (fn) {
+ if (unlink(fn) < 0) {
+ pa_log_warn("Unable to remove lock file '%s': %s", fn, pa_cstrerror(errno));
+ r = -1;
+ }
}
if (pa_lock_fd(fd, 0) < 0) {
@@ -1093,16 +1264,272 @@ int pa_unlock_lockfile(const char *fn, int fd) {
return r;
}
+static char *get_pulse_home(void) {
+ char h[PATH_MAX];
+ struct stat st;
+
+ if (!pa_get_home_dir(h, sizeof(h))) {
+ pa_log_error("Failed to get home directory.");
+ return NULL;
+ }
+
+ if (stat(h, &st) < 0) {
+ pa_log_error("Failed to stat home directory %s: %s", h, pa_cstrerror(errno));
+ return NULL;
+ }
+
+ if (st.st_uid != getuid()) {
+ pa_log_error("Home directory %s not ours.", h);
+ errno = EACCES;
+ return NULL;
+ }
+
+ return pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse", h);
+}
+
+char *pa_get_state_dir(void) {
+ char *d;
+
+ /* The state directory shall contain dynamic data that should be
+ * kept across reboots, and is private to this user */
+
+ if (!(d = pa_xstrdup(getenv("PULSE_STATE_PATH"))))
+ if (!(d = get_pulse_home()))
+ return NULL;
+
+ /* If PULSE_STATE_PATH and PULSE_RUNTIME_PATH point to the same
+ * dir then this will break. */
+
+ if (pa_make_secure_dir(d, 0700U, (uid_t) -1, (gid_t) -1) < 0) {
+ pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
+ pa_xfree(d);
+ return NULL;
+ }
+
+ return d;
+}
+
+static char* make_random_dir(mode_t m) {
+ static const char table[] =
+ "abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "0123456789";
+
+ const char *tmpdir;
+ char *fn;
+ size_t pathlen;
+
+ if (!(tmpdir = getenv("TMPDIR")))
+ if (!(tmpdir = getenv("TMP")))
+ if (!(tmpdir = getenv("TEMP")))
+ tmpdir = getenv("TEMPDIR");
+
+ if (!tmpdir || !pa_is_path_absolute(tmpdir))
+ tmpdir = "/tmp";
+
+ fn = pa_sprintf_malloc("%s/pulse-XXXXXXXXXXXX", tmpdir);
+ pathlen = strlen(fn);
+
+ for (;;) {
+ size_t i;
+ int r;
+ mode_t u;
+ int saved_errno;
+
+ for (i = pathlen - 12; i < pathlen; i++)
+ fn[i] = table[rand() % (sizeof(table)-1)];
+
+ u = umask((~m) & 0777);
+ r = mkdir(fn, m);
+
+ saved_errno = errno;
+ umask(u);
+ errno = saved_errno;
+
+ if (r >= 0)
+ return fn;
+
+ if (errno != EEXIST) {
+ pa_log_error("Failed to create random directory %s: %s", fn, pa_cstrerror(errno));
+ pa_xfree(fn);
+ return NULL;
+ }
+ }
+}
+
+static int make_random_dir_and_link(mode_t m, const char *k) {
+ char *p;
+
+ if (!(p = make_random_dir(m)))
+ return -1;
+
+ if (symlink(p, k) < 0) {
+ int saved_errno = errno;
+
+ if (errno != EEXIST)
+ pa_log_error("Failed to symlink %s to %s: %s", k, p, pa_cstrerror(errno));
+
+ rmdir(p);
+ pa_xfree(p);
+
+ errno = saved_errno;
+ return -1;
+ }
+
+ return 0;
+}
+
+char *pa_get_runtime_dir(void) {
+ char *d, *k = NULL, *p = NULL, *t = NULL, *mid;
+ struct stat st;
+ mode_t m;
+
+ /* The runtime directory shall contain dynamic data that needs NOT
+ * to be kept accross reboots and is usuallly private to the user,
+ * except in system mode, where it might be accessible by other
+ * users, too. Since we need POSIX locking and UNIX sockets in
+ * this directory, we link it to a random subdir in /tmp, if it
+ * was not explicitly configured. */
+
+ m = pa_in_system_mode() ? 0755U : 0700U;
+
+ if ((d = getenv("PULSE_RUNTIME_PATH"))) {
+
+ if (pa_make_secure_dir(d, m, (uid_t) -1, (gid_t) -1) < 0) {
+ pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
+ goto fail;
+ }
+
+ return pa_xstrdup(d);
+ }
+
+ if (!(d = get_pulse_home()))
+ goto fail;
+
+ if (pa_make_secure_dir(d, m, (uid_t) -1, (gid_t) -1) < 0) {
+ pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
+ goto fail;
+ }
+
+ if (!(mid = pa_machine_id())) {
+ pa_xfree(d);
+ goto fail;
+ }
+
+ k = pa_sprintf_malloc("%s" PA_PATH_SEP "%s:runtime", d, mid);
+ pa_xfree(d);
+ pa_xfree(mid);
+
+ for (;;) {
+ /* OK, first let's check if the "runtime" symlink is already
+ * existant */
+
+ if (!(p = pa_readlink(k))) {
+
+ if (errno != ENOENT) {
+ pa_log_error("Failed to stat runtime directory %s: %s", k, pa_cstrerror(errno));
+ goto fail;
+ }
+
+ /* Hmm, so the runtime directory didn't exist yet, so let's
+ * create one in /tmp and symlink that to it */
+
+ if (make_random_dir_and_link(0700, k) < 0) {
+
+ /* Mhmm, maybe another process was quicker than us,
+ * let's check if that was valid */
+ if (errno == EEXIST)
+ continue;
+
+ goto fail;
+ }
+
+ return k;
+ }
+
+ /* Make sure that this actually makes sense */
+ if (!pa_is_path_absolute(p)) {
+ pa_log_error("Path %s in link %s is not absolute.", p, k);
+ errno = ENOENT;
+ goto fail;
+ }
+
+ /* Hmm, so this symlink is still around, make sure nobody fools
+ * us */
+
+ if (lstat(p, &st) < 0) {
+
+ if (errno != ENOENT) {
+ pa_log_error("Failed to stat runtime directory %s: %s", p, pa_cstrerror(errno));
+ goto fail;
+ }
+
+ } else {
+
+ if (S_ISDIR(st.st_mode) &&
+ (st.st_uid == getuid()) &&
+ ((st.st_mode & 0777) == 0700)) {
+
+ pa_xfree(p);
+ return k;
+ }
+
+ pa_log_info("Hmm, runtime path exists, but points to an invalid directory. Changing runtime directory.");
+ }
+
+ pa_xfree(p);
+ p = NULL;
+
+ /* Hmm, so the link points to some nonexisting or invalid
+ * dir. Let's replace it by a new link. We first create a
+ * temporary link and then rename that to allow concurrent
+ * execution of this function. */
+
+ t = pa_sprintf_malloc("%s.tmp", k);
+
+ if (make_random_dir_and_link(0700, t) < 0) {
+
+ if (errno != EEXIST) {
+ pa_log_error("Failed to symlink %s: %s", t, pa_cstrerror(errno));
+ goto fail;
+ }
+
+ pa_xfree(t);
+ t = NULL;
+
+ /* Hmm, someone lese was quicker then us. Let's give
+ * him some time to finish, and retry. */
+ pa_msleep(10);
+ continue;
+ }
+
+ /* OK, we succeeded in creating the temporary symlink, so
+ * let's rename it */
+ if (rename(t, k) < 0) {
+ pa_log_error("Failed to rename %s to %s: %s", t, k, pa_cstrerror(errno));
+ goto fail;
+ }
+
+ pa_xfree(t);
+ return k;
+ }
+
+fail:
+ pa_xfree(p);
+ pa_xfree(k);
+ pa_xfree(t);
+
+ return NULL;
+}
+
/* Try to open a configuration file. If "env" is specified, open the
* value of the specified environment variable. Otherwise look for a
* file "local" in the home directory or a file "global" in global
* file system. If "result" is non-NULL, a pointer to a newly
* allocated buffer containing the used configuration file is
* stored there.*/
-FILE *pa_open_config_file(const char *global, const char *local, const char *env, char **result, const char *mode) {
+FILE *pa_open_config_file(const char *global, const char *local, const char *env, char **result) {
const char *fn;
- char h[PATH_MAX];
-
#ifdef OS_IS_WIN32
char buf[PATH_MAX];
@@ -1111,75 +1538,164 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env
#endif
if (env && (fn = getenv(env))) {
+ FILE *f;
+
#ifdef OS_IS_WIN32
if (!ExpandEnvironmentStrings(fn, buf, PATH_MAX))
+ /* FIXME: Needs to set errno! */
return NULL;
fn = buf;
#endif
- if (result)
- *result = pa_xstrdup(fn);
+ if ((f = fopen(fn, "r"))) {
+ if (result)
+ *result = pa_xstrdup(fn);
+
+ return f;
+ }
- return fopen(fn, mode);
+ pa_log_warn("Failed to open configuration file '%s': %s", fn, pa_cstrerror(errno));
+ return NULL;
}
if (local) {
const char *e;
- char *lfn = NULL;
+ char *lfn;
+ char h[PATH_MAX];
+ FILE *f;
if ((e = getenv("PULSE_CONFIG_PATH")))
- fn = lfn = pa_sprintf_malloc("%s/%s", e, local);
- else if (pa_get_home_dir(h, sizeof(h))) {
- char *d;
+ fn = lfn = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", e, local);
+ else if (pa_get_home_dir(h, sizeof(h)))
+ fn = lfn = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse" PA_PATH_SEP "%s", h, local);
+ else
+ return NULL;
+
+#ifdef OS_IS_WIN32
+ if (!ExpandEnvironmentStrings(lfn, buf, PATH_MAX)) {
+ /* FIXME: Needs to set errno! */
+ pa_xfree(lfn);
+ return NULL;
+ }
+ fn = buf;
+#endif
- d = pa_sprintf_malloc("%s/.pulse", h);
- mkdir(d, 0755);
- pa_xfree(d);
+ if ((f = fopen(fn, "r"))) {
+ if (result)
+ *result = pa_xstrdup(fn);
- fn = lfn = pa_sprintf_malloc("%s/.pulse/%s", h, local);
+ pa_xfree(lfn);
+ return f;
}
- if (lfn) {
- FILE *f;
+ if (errno != ENOENT) {
+ pa_log_warn("Failed to open configuration file '%s': %s", fn, pa_cstrerror(errno));
+ pa_xfree(lfn);
+ return NULL;
+ }
+
+ pa_xfree(lfn);
+ }
+
+ if (global) {
+ FILE *f;
#ifdef OS_IS_WIN32
- if (!ExpandEnvironmentStrings(lfn, buf, PATH_MAX))
- return NULL;
- fn = buf;
+ if (!ExpandEnvironmentStrings(global, buf, PATH_MAX))
+ /* FIXME: Needs to set errno! */
+ return NULL;
+ global = buf;
#endif
- f = fopen(fn, mode);
- if (f != NULL) {
- if (result)
- *result = pa_xstrdup(fn);
- pa_xfree(lfn);
- return f;
- }
+ if ((f = fopen(global, "r"))) {
- if (errno != ENOENT)
- pa_log_warn("Failed to open configuration file '%s': %s", lfn, pa_cstrerror(errno));
+ if (result)
+ *result = pa_xstrdup(global);
- pa_xfree(lfn);
+ return f;
}
}
- if (!global) {
- if (result)
- *result = NULL;
- errno = ENOENT;
+ errno = ENOENT;
+ return NULL;
+}
+
+char *pa_find_config_file(const char *global, const char *local, const char *env) {
+ const char *fn;
+#ifdef OS_IS_WIN32
+ char buf[PATH_MAX];
+
+ if (!getenv(PULSE_ROOTENV))
+ pa_set_root(NULL);
+#endif
+
+ if (env && (fn = getenv(env))) {
+
+#ifdef OS_IS_WIN32
+ if (!ExpandEnvironmentStrings(fn, buf, PATH_MAX))
+ /* FIXME: Needs to set errno! */
+ return NULL;
+ fn = buf;
+#endif
+
+ if (access(fn, R_OK) == 0)
+ return pa_xstrdup(fn);
+
+ pa_log_warn("Failed to access configuration file '%s': %s", fn, pa_cstrerror(errno));
return NULL;
}
+ if (local) {
+ const char *e;
+ char *lfn;
+ char h[PATH_MAX];
+
+ if ((e = getenv("PULSE_CONFIG_PATH")))
+ fn = lfn = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", e, local);
+ else if (pa_get_home_dir(h, sizeof(h)))
+ fn = lfn = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse" PA_PATH_SEP "%s", h, local);
+ else
+ return NULL;
+
+#ifdef OS_IS_WIN32
+ if (!ExpandEnvironmentStrings(lfn, buf, PATH_MAX)) {
+ /* FIXME: Needs to set errno! */
+ pa_xfree(lfn);
+ return NULL;
+ }
+ fn = buf;
+#endif
+
+ if (access(fn, R_OK) == 0) {
+ char *r = pa_xstrdup(fn);
+ pa_xfree(lfn);
+ return r;
+ }
+
+ if (errno != ENOENT) {
+ pa_log_warn("Failed to access configuration file '%s': %s", fn, pa_cstrerror(errno));
+ pa_xfree(lfn);
+ return NULL;
+ }
+
+ pa_xfree(lfn);
+ }
+
+ if (global) {
#ifdef OS_IS_WIN32
- if (!ExpandEnvironmentStrings(global, buf, PATH_MAX))
- return NULL;
- global = buf;
+ if (!ExpandEnvironmentStrings(global, buf, PATH_MAX))
+ /* FIXME: Needs to set errno! */
+ return NULL;
+ global = buf;
#endif
- if (result)
- *result = pa_xstrdup(global);
+ if (access(global, R_OK) == 0)
+ return pa_xstrdup(global);
+ }
+
+ errno = ENOENT;
- return fopen(global, mode);
+ return NULL;
}
/* Format the specified data as a hexademical string */
@@ -1214,6 +1730,7 @@ static int hexc(char c) {
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
+ errno = EINVAL;
return -1;
}
@@ -1246,7 +1763,7 @@ size_t pa_parsehex(const char *p, uint8_t *d, size_t dlength) {
}
/* Returns nonzero when *s starts with *pfx */
-int pa_startswith(const char *s, const char *pfx) {
+pa_bool_t pa_startswith(const char *s, const char *pfx) {
size_t l;
pa_assert(s);
@@ -1258,7 +1775,7 @@ int pa_startswith(const char *s, const char *pfx) {
}
/* Returns nonzero when *s ends with *sfx */
-int pa_endswith(const char *s, const char *sfx) {
+pa_bool_t pa_endswith(const char *s, const char *sfx) {
size_t l1, l2;
pa_assert(s);
@@ -1270,45 +1787,75 @@ int pa_endswith(const char *s, const char *sfx) {
return l1 >= l2 && strcmp(s+l1-l2, sfx) == 0;
}
-/* if fn is null return the PulseAudio run time path in s (/tmp/pulse)
- * if fn is non-null and starts with / return fn in s
- * otherwise append fn to the run time path and return it in s */
-char *pa_runtime_path(const char *fn, char *s, size_t l) {
- const char *e;
+pa_bool_t pa_is_path_absolute(const char *fn) {
+ pa_assert(fn);
#ifndef OS_IS_WIN32
- if (fn && *fn == '/')
+ return *fn == '/';
#else
- if (fn && strlen(fn) >= 3 && isalpha(fn[0]) && fn[1] == ':' && fn[2] == '\\')
+ return strlen(fn) >= 3 && isalpha(fn[0]) && fn[1] == ':' && fn[2] == '\\';
#endif
- return pa_strlcpy(s, fn, l);
+}
- if ((e = getenv("PULSE_RUNTIME_PATH"))) {
+char *pa_make_path_absolute(const char *p) {
+ char *r;
+ char *cwd;
- if (fn)
- pa_snprintf(s, l, "%s%c%s", e, PA_PATH_SEP_CHAR, fn);
- else
- pa_snprintf(s, l, "%s", e);
+ pa_assert(p);
- } else {
- char u[256];
+ if (pa_is_path_absolute(p))
+ return pa_xstrdup(p);
- if (fn)
- pa_snprintf(s, l, "%s%s%c%s", PA_USER_RUNTIME_PATH_PREFIX, pa_get_user_name(u, sizeof(u)), PA_PATH_SEP_CHAR, fn);
- else
- pa_snprintf(s, l, "%s%s", PA_USER_RUNTIME_PATH_PREFIX, pa_get_user_name(u, sizeof(u)));
- }
+ if (!(cwd = pa_getcwd()))
+ return pa_xstrdup(p);
+ r = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", cwd, p);
+ pa_xfree(cwd);
+ return r;
+}
-#ifdef OS_IS_WIN32
- {
- char buf[l];
- strcpy(buf, s);
- ExpandEnvironmentStrings(buf, s, l);
- }
-#endif
+/* if fn is null return the PulseAudio run time path in s (~/.pulse)
+ * if fn is non-null and starts with / return fn
+ * otherwise append fn to the run time path and return it */
+static char *get_path(const char *fn, pa_bool_t prependmid, pa_bool_t rt) {
+ char *rtp;
- return s;
+ if (pa_is_path_absolute(fn))
+ return pa_xstrdup(fn);
+
+ rtp = rt ? pa_get_runtime_dir() : pa_get_state_dir();
+
+ if (!rtp)
+ return NULL;
+
+ if (fn) {
+ char *r;
+
+ if (prependmid) {
+ char *mid;
+
+ if (!(mid = pa_machine_id())) {
+ pa_xfree(rtp);
+ return NULL;
+ }
+
+ r = pa_sprintf_malloc("%s" PA_PATH_SEP "%s:%s", rtp, mid, fn);
+ pa_xfree(mid);
+ } else
+ r = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", rtp, fn);
+
+ pa_xfree(rtp);
+ return r;
+ } else
+ return rtp;
+}
+
+char *pa_runtime_path(const char *fn) {
+ return get_path(fn, FALSE, TRUE);
+}
+
+char *pa_state_path(const char *fn, pa_bool_t appendmid) {
+ return get_path(fn, appendmid, FALSE);
}
/* Convert the string s to a signed integer in *ret_i */
@@ -1322,11 +1869,16 @@ int pa_atoi(const char *s, int32_t *ret_i) {
errno = 0;
l = strtol(s, &x, 0);
- if (!x || *x || errno != 0)
+ if (!x || *x || errno) {
+ if (!errno)
+ errno = EINVAL;
return -1;
+ }
- if ((int32_t) l != l)
+ if ((int32_t) l != l) {
+ errno = ERANGE;
return -1;
+ }
*ret_i = (int32_t) l;
@@ -1344,11 +1896,16 @@ int pa_atou(const char *s, uint32_t *ret_u) {
errno = 0;
l = strtoul(s, &x, 0);
- if (!x || *x || errno != 0)
+ if (!x || *x || errno) {
+ if (!errno)
+ errno = EINVAL;
return -1;
+ }
- if ((uint32_t) l != l)
+ if ((uint32_t) l != l) {
+ errno = ERANGE;
return -1;
+ }
*ret_u = (uint32_t) l;
@@ -1363,13 +1920,12 @@ static void c_locale_destroy(void) {
}
#endif
-int pa_atof(const char *s, float *ret_f) {
+int pa_atod(const char *s, double *ret_d) {
char *x = NULL;
- float f;
- int r = 0;
+ double f;
pa_assert(s);
- pa_assert(ret_f);
+ pa_assert(ret_d);
/* This should be locale independent */
@@ -1384,29 +1940,28 @@ int pa_atof(const char *s, float *ret_f) {
if (c_locale) {
errno = 0;
- f = strtof_l(s, &x, c_locale);
+ f = strtod_l(s, &x, c_locale);
} else
#endif
{
errno = 0;
-#ifdef HAVE_STRTOF
- f = strtof(s, &x);
-#else
f = strtod(s, &x);
-#endif
}
- if (!x || *x || errno != 0)
- r = -1;
- else
- *ret_f = f;
+ if (!x || *x || errno) {
+ if (!errno)
+ errno = EINVAL;
+ return -1;
+ }
- return r;
+ *ret_d = f;
+
+ return 0;
}
/* Same as snprintf, but guarantees NUL-termination on every platform */
-int pa_snprintf(char *str, size_t size, const char *format, ...) {
- int ret;
+size_t pa_snprintf(char *str, size_t size, const char *format, ...) {
+ size_t ret;
va_list ap;
pa_assert(str);
@@ -1414,12 +1969,31 @@ int pa_snprintf(char *str, size_t size, const char *format, ...) {
pa_assert(format);
va_start(ap, format);
- ret = vsnprintf(str, size, format, ap);
+ ret = pa_vsnprintf(str, size, format, ap);
va_end(ap);
+ return ret;
+}
+
+/* Same as vsnprintf, but guarantees NUL-termination on every platform */
+size_t pa_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
+ int ret;
+
+ pa_assert(str);
+ pa_assert(size > 0);
+ pa_assert(format);
+
+ ret = vsnprintf(str, size, format, ap);
+
str[size-1] = 0;
- return ret;
+ if (ret < 0)
+ return strlen(str);
+
+ if ((size_t) ret > size-1)
+ return size-1;
+
+ return (size_t) ret;
}
/* Truncate the specified string, but guarantee that the string
@@ -1443,7 +2017,7 @@ char *pa_getcwd(void) {
size_t l = 128;
for (;;) {
- char *p = pa_xnew(char, l);
+ char *p = pa_xmalloc(l);
if (getcwd(p, l))
return p;
@@ -1455,23 +2029,6 @@ char *pa_getcwd(void) {
}
}
-char *pa_make_path_absolute(const char *p) {
- char *r;
- char *cwd;
-
- pa_assert(p);
-
- if (p[0] == '/')
- return pa_xstrdup(p);
-
- if (!(cwd = pa_getcwd()))
- return pa_xstrdup(p);
-
- r = pa_sprintf_malloc("%s/%s", cwd, p);
- pa_xfree(cwd);
- return r;
-}
-
void *pa_will_need(const void *p, size_t l) {
#ifdef RLIMIT_MEMLOCK
struct rlimit rlim;
@@ -1485,7 +2042,7 @@ void *pa_will_need(const void *p, size_t l) {
pa_assert(l > 0);
a = PA_PAGE_ALIGN_PTR(p);
- size = (const uint8_t*) p + l - (const uint8_t*) a;
+ size = (size_t) ((const uint8_t*) p + l - (const uint8_t*) a);
#ifdef HAVE_POSIX_MADVISE
if ((r = posix_madvise((void*) a, size, POSIX_MADV_WILLNEED)) == 0) {
@@ -1506,10 +2063,11 @@ void *pa_will_need(const void *p, size_t l) {
if (rlim.rlim_cur < PA_PAGE_SIZE) {
pa_log_debug("posix_madvise() failed (or doesn't exist), resource limits don't allow mlock(), can't page in data: %s", pa_cstrerror(r));
+ errno = EPERM;
return (void*) p;
}
- bs = PA_PAGE_ALIGN(rlim.rlim_cur);
+ bs = PA_PAGE_ALIGN((size_t) rlim.rlim_cur);
#else
bs = PA_PAGE_SIZE*4;
#endif
@@ -1561,7 +2119,7 @@ char *pa_readlink(const char *p) {
char *c;
ssize_t n;
- c = pa_xnew(char, l);
+ c = pa_xmalloc(l);
if ((n = readlink(p, c, l-1)) < 0) {
pa_xfree(c);
@@ -1577,3 +2135,355 @@ char *pa_readlink(const char *p) {
l *= 2;
}
}
+
+int pa_close_all(int except_fd, ...) {
+ va_list ap;
+ unsigned n = 0, i;
+ int r, *p;
+
+ va_start(ap, except_fd);
+
+ if (except_fd >= 0)
+ for (n = 1; va_arg(ap, int) >= 0; n++)
+ ;
+
+ va_end(ap);
+
+ p = pa_xnew(int, n+1);
+
+ va_start(ap, except_fd);
+
+ i = 0;
+ if (except_fd >= 0) {
+ int fd;
+ p[i++] = except_fd;
+
+ while ((fd = va_arg(ap, int)) >= 0)
+ p[i++] = fd;
+ }
+ p[i] = -1;
+
+ va_end(ap);
+
+ r = pa_close_allv(p);
+ free(p);
+
+ return r;
+}
+
+int pa_close_allv(const int except_fds[]) {
+ struct rlimit rl;
+ int fd;
+ int saved_errno;
+
+#ifdef __linux__
+
+ DIR *d;
+
+ if ((d = opendir("/proc/self/fd"))) {
+
+ struct dirent *de;
+
+ while ((de = readdir(d))) {
+ pa_bool_t found;
+ long l;
+ char *e = NULL;
+ int i;
+
+ if (de->d_name[0] == '.')
+ continue;
+
+ errno = 0;
+ l = strtol(de->d_name, &e, 10);
+ if (errno != 0 || !e || *e) {
+ closedir(d);
+ errno = EINVAL;
+ return -1;
+ }
+
+ fd = (int) l;
+
+ if ((long) fd != l) {
+ closedir(d);
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (fd < 3)
+ continue;
+
+ if (fd == dirfd(d))
+ continue;
+
+ found = FALSE;
+ for (i = 0; except_fds[i] >= 0; i++)
+ if (except_fds[i] == fd) {
+ found = TRUE;
+ break;
+ }
+
+ if (found)
+ continue;
+
+ if (pa_close(fd) < 0) {
+ saved_errno = errno;
+ closedir(d);
+ errno = saved_errno;
+
+ return -1;
+ }
+ }
+
+ closedir(d);
+ return 0;
+ }
+
+#endif
+
+ if (getrlimit(RLIMIT_NOFILE, &rl) < 0)
+ return -1;
+
+ for (fd = 3; fd < (int) rl.rlim_max; fd++) {
+ int i;
+ pa_bool_t found;
+
+ found = FALSE;
+ for (i = 0; except_fds[i] >= 0; i++)
+ if (except_fds[i] == fd) {
+ found = TRUE;
+ break;
+ }
+
+ if (found)
+ continue;
+
+ if (pa_close(fd) < 0 && errno != EBADF)
+ return -1;
+ }
+
+ return 0;
+}
+
+int pa_unblock_sigs(int except, ...) {
+ va_list ap;
+ unsigned n = 0, i;
+ int r, *p;
+
+ va_start(ap, except);
+
+ if (except >= 1)
+ for (n = 1; va_arg(ap, int) >= 0; n++)
+ ;
+
+ va_end(ap);
+
+ p = pa_xnew(int, n+1);
+
+ va_start(ap, except);
+
+ i = 0;
+ if (except >= 1) {
+ int sig;
+ p[i++] = except;
+
+ while ((sig = va_arg(ap, int)) >= 0)
+ p[i++] = sig;
+ }
+ p[i] = -1;
+
+ va_end(ap);
+
+ r = pa_unblock_sigsv(p);
+ pa_xfree(p);
+
+ return r;
+}
+
+int pa_unblock_sigsv(const int except[]) {
+ int i;
+ sigset_t ss;
+
+ if (sigemptyset(&ss) < 0)
+ return -1;
+
+ for (i = 0; except[i] > 0; i++)
+ if (sigaddset(&ss, except[i]) < 0)
+ return -1;
+
+ return sigprocmask(SIG_SETMASK, &ss, NULL);
+}
+
+int pa_reset_sigs(int except, ...) {
+ va_list ap;
+ unsigned n = 0, i;
+ int *p, r;
+
+ va_start(ap, except);
+
+ if (except >= 1)
+ for (n = 1; va_arg(ap, int) >= 0; n++)
+ ;
+
+ va_end(ap);
+
+ p = pa_xnew(int, n+1);
+
+ va_start(ap, except);
+
+ i = 0;
+ if (except >= 1) {
+ int sig;
+ p[i++] = except;
+
+ while ((sig = va_arg(ap, int)) >= 0)
+ sig = p[i++];
+ }
+ p[i] = -1;
+
+ va_end(ap);
+
+ r = pa_reset_sigsv(p);
+ pa_xfree(p);
+
+ return r;
+}
+
+int pa_reset_sigsv(const int except[]) {
+ int sig;
+
+ for (sig = 1; sig < NSIG; sig++) {
+ pa_bool_t reset = TRUE;
+
+ switch (sig) {
+ case SIGKILL:
+ case SIGSTOP:
+ reset = FALSE;
+ break;
+
+ default: {
+ int i;
+
+ for (i = 0; except[i] > 0; i++) {
+ if (sig == except[i]) {
+ reset = FALSE;
+ break;
+ }
+ }
+ }
+ }
+
+ if (reset) {
+ struct sigaction sa;
+
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = SIG_DFL;
+
+ /* On Linux the first two RT signals are reserved by
+ * glibc, and sigaction() will return EINVAL for them. */
+ if ((sigaction(sig, &sa, NULL) < 0))
+ if (errno != EINVAL)
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+void pa_set_env(const char *key, const char *value) {
+ pa_assert(key);
+ pa_assert(value);
+
+ putenv(pa_sprintf_malloc("%s=%s", key, value));
+}
+
+pa_bool_t pa_in_system_mode(void) {
+ const char *e;
+
+ if (!(e = getenv("PULSE_SYSTEM")))
+ return FALSE;
+
+ return !!atoi(e);
+}
+
+char *pa_machine_id(void) {
+ FILE *f;
+ size_t l;
+
+ /* The returned value is supposed be some kind of ascii identifier
+ * that is unique and stable across reboots. */
+
+ /* First we try the D-Bus UUID, which is the best option we have,
+ * since it fits perfectly our needs and is not as volatile as the
+ * hostname which might be set from dhcp. */
+
+ if ((f = fopen(PA_MACHINE_ID, "r"))) {
+ char ln[34] = "", *r;
+
+ r = fgets(ln, sizeof(ln)-1, f);
+ fclose(f);
+
+ pa_strip_nl(ln);
+
+ if (ln[0])
+ return pa_xstrdup(ln);
+ }
+
+ /* The we fall back to the host name. It supposed to be somewhat
+ * unique, at least in a network, but may change. */
+
+ l = 100;
+ for (;;) {
+ char *c;
+
+ c = pa_xmalloc(l);
+
+ if (!pa_get_host_name(c, l)) {
+
+ if (errno != EINVAL && errno != ENAMETOOLONG)
+ break;
+
+ } else if (strlen(c) < l-1) {
+
+ if (*c == 0) {
+ pa_xfree(c);
+ break;
+ }
+
+ return c;
+ }
+
+ /* Hmm, the hostname is as long the space we offered the
+ * function, we cannot know if it fully fit in, so let's play
+ * safe and retry. */
+
+ pa_xfree(c);
+ l *= 2;
+ }
+
+ /* If no hostname was set we use the POSIX hostid. It's usually
+ * the IPv4 address. Mit not be that stable. */
+ return pa_sprintf_malloc("%08lx", (unsigned long) gethostid);
+}
+
+char *pa_uname_string(void) {
+ struct utsname u;
+
+ pa_assert_se(uname(&u) == 0);
+
+ return pa_sprintf_malloc("%s %s %s %s", u.sysname, u.machine, u.release, u.version);
+}
+
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+pa_bool_t pa_in_valgrind(void) {
+ static int b = 0;
+
+ /* To make heisenbugs a bit simpler to find we check for $VALGRIND
+ * here instead of really checking whether we run in valgrind or
+ * not. */
+
+ if (b < 1)
+ b = getenv("VALGRIND") ? 2 : 1;
+
+ return b > 1;
+}
+#endif
diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h
index fd5e80c..fd6ee89 100644
--- a/src/pulsecore/core-util.h
+++ b/src/pulsecore/core-util.h
@@ -1,8 +1,6 @@
#ifndef foocoreutilhfoo
#define foocoreutilhfoo
-/* $Id: core-util.h 2014 2007-11-01 02:58:26Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,11 +28,31 @@
#include <stdarg.h>
#include <stdio.h>
-#include <pulsecore/gccmacro.h>
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+#include <pulse/gccmacro.h>
#include <pulsecore/macro.h>
+#ifndef PACKAGE
+#error "Please include config.h before including this file!"
+#endif
+
struct timeval;
+/* These resource limits are pretty new on Linux, let's define them
+ * here manually, in case the kernel is newer than the glibc */
+#if !defined(RLIMIT_NICE) && defined(__linux__)
+#define RLIMIT_NICE 13
+#endif
+#if !defined(RLIMIT_RTPRIO) && defined(__linux__)
+#define RLIMIT_RTPRIO 14
+#endif
+#if !defined(RLIMIT_RTTIME) && defined(__linux__)
+#define RLIMIT_RTTIME 15
+#endif
+
void pa_make_fd_nonblock(int fd);
void pa_make_fd_cloexec(int fd);
@@ -61,12 +79,23 @@ int pa_make_realtime(int rtprio);
int pa_raise_priority(int nice_level);
void pa_reset_priority(void);
+pa_bool_t pa_can_realtime(void);
+pa_bool_t pa_can_high_priority(void);
+
int pa_parse_boolean(const char *s) PA_GCC_PURE;
static inline const char *pa_yes_no(pa_bool_t b) {
return b ? "yes" : "no";
}
+static inline const char *pa_strnull(const char *x) {
+ return x ? x : "(null)";
+}
+
+static inline const char *pa_strempty(const char *x) {
+ return x ? x : "";
+}
+
char *pa_split(const char *c, const char*delimiters, const char **state);
char *pa_split_spaces(const char *c, const char **state);
@@ -84,26 +113,32 @@ int pa_lock_fd(int fd, int b);
int pa_lock_lockfile(const char *fn);
int pa_unlock_lockfile(const char *fn, int fd);
-FILE *pa_open_config_file(const char *global, const char *local, const char *env, char **result, const char *mode);
-
char *pa_hexstr(const uint8_t* d, size_t dlength, char *s, size_t slength);
size_t pa_parsehex(const char *p, uint8_t *d, size_t dlength);
-int pa_startswith(const char *s, const char *pfx) PA_GCC_PURE;
-int pa_endswith(const char *s, const char *sfx) PA_GCC_PURE;
+pa_bool_t pa_startswith(const char *s, const char *pfx) PA_GCC_PURE;
+pa_bool_t pa_endswith(const char *s, const char *sfx) PA_GCC_PURE;
-char *pa_runtime_path(const char *fn, char *s, size_t l);
+FILE *pa_open_config_file(const char *global, const char *local, const char *env, char **result);
+char* pa_find_config_file(const char *global, const char *local, const char *env);
+
+char *pa_get_runtime_dir(void);
+char *pa_get_state_dir(void);
+char *pa_runtime_path(const char *fn);
+char *pa_state_path(const char *fn, pa_bool_t prepend_machine_id);
int pa_atoi(const char *s, int32_t *ret_i);
int pa_atou(const char *s, uint32_t *ret_u);
-int pa_atof(const char *s, float *ret_f);
+int pa_atod(const char *s, double *ret_d);
-int pa_snprintf(char *str, size_t size, const char *format, ...);
+size_t pa_snprintf(char *str, size_t size, const char *format, ...);
+size_t pa_vsnprintf(char *str, size_t size, const char *format, va_list ap);
char *pa_truncate_utf8(char *c, size_t l);
char *pa_getcwd(void);
char *pa_make_path_absolute(const char *p);
+pa_bool_t pa_is_path_absolute(const char *p);
void *pa_will_need(const void *p, size_t l);
@@ -111,22 +146,64 @@ static inline int pa_is_power_of_two(unsigned n) {
return !(n & (n - 1));
}
+static inline unsigned pa_ulog2(unsigned n) {
+
+ if (n <= 1)
+ return 0;
+
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ return 8U * (unsigned) sizeof(unsigned) - (unsigned) __builtin_clz(n) - 1;
+#else
+{
+ unsigned r = 0;
+
+ for (;;) {
+ n = n >> 1;
+
+ if (!n)
+ return r;
+
+ r++;
+ }
+}
+#endif
+}
+
static inline unsigned pa_make_power_of_two(unsigned n) {
- unsigned j = n;
if (pa_is_power_of_two(n))
return n;
- while (j) {
- j = j >> 1;
- n = n | j;
- }
-
- return n + 1;
+ return 1U << (pa_ulog2(n) + 1);
}
void pa_close_pipe(int fds[2]);
char *pa_readlink(const char *p);
+int pa_close_all(int except_fd, ...);
+int pa_close_allv(const int except_fds[]);
+int pa_unblock_sigs(int except, ...);
+int pa_unblock_sigsv(const int except[]);
+int pa_reset_sigs(int except, ...);
+int pa_reset_sigsv(const int except[]);
+
+void pa_set_env(const char *key, const char *value);
+
+pa_bool_t pa_in_system_mode(void);
+
+#define pa_streq(a,b) (!strcmp((a),(b)))
+
+char *pa_machine_id(void);
+char *pa_uname_string(void);
+
+
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+pa_bool_t pa_in_valgrind(void);
+#else
+static inline pa_bool_t pa_in_valgrind(void) {
+ return FALSE;
+}
+#endif
+
#endif
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c
index 84131de..5761bbc 100644
--- a/src/pulsecore/core.c
+++ b/src/pulsecore/core.c
@@ -1,5 +1,3 @@
-/* $Id: core.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -41,7 +39,7 @@
#include <pulsecore/core-scache.h>
#include <pulsecore/autoload.h>
#include <pulsecore/core-subscribe.h>
-#include <pulsecore/props.h>
+#include <pulsecore/shared.h>
#include <pulsecore/random.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
@@ -58,7 +56,7 @@ static int core_process_msg(pa_msgobject *o, int code, void *userdata, int64_t o
switch (code) {
case PA_CORE_MESSAGE_UNLOAD_MODULE:
- pa_module_unload(c, userdata);
+ pa_module_unload(c, userdata, TRUE);
return 0;
default:
@@ -68,7 +66,7 @@ static int core_process_msg(pa_msgobject *o, int code, void *userdata, int64_t o
static void core_free(pa_object *o);
-pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
+pa_core* pa_core_new(pa_mainloop_api *m, pa_bool_t shared, size_t shm_size) {
pa_core* c;
pa_mempool *pool;
int j;
@@ -76,14 +74,14 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
pa_assert(m);
if (shared) {
- if (!(pool = pa_mempool_new(shared))) {
+ if (!(pool = pa_mempool_new(shared, shm_size))) {
pa_log_warn("failed to allocate shared memory pool. Falling back to a normal memory pool.");
- shared = 0;
+ shared = FALSE;
}
}
if (!shared) {
- if (!(pool = pa_mempool_new(shared))) {
+ if (!(pool = pa_mempool_new(shared, shm_size))) {
pa_log("pa_mempool_new() failed.");
return NULL;
}
@@ -125,8 +123,9 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
c->subscription_event_last = NULL;
c->mempool = pool;
+ pa_silence_cache_init(&c->silence_cache);
- c->quit_event = NULL;
+ c->exit_event = NULL;
c->exit_idle_time = -1;
c->module_idle_time = 20;
@@ -134,16 +133,17 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
c->resample_method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 3;
- c->is_system_instance = FALSE;
c->disallow_module_loading = FALSE;
+ c->disallow_exit = FALSE;
c->realtime_scheduling = FALSE;
c->realtime_priority = 5;
c->disable_remixing = FALSE;
+ c->disable_lfe_remixing = FALSE;
for (j = 0; j < PA_CORE_HOOK_MAX; j++)
pa_hook_init(&c->hooks[j], c);
- pa_property_init(c);
+ pa_shared_init(c);
pa_random(&c->cookie, sizeof(c->cookie));
@@ -151,6 +151,8 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
pa_check_signal_is_blocked(SIGPIPE);
#endif
+ pa_core_check_idle(c);
+
return c;
}
@@ -182,39 +184,56 @@ static void core_free(pa_object *o) {
pa_autoload_free(c);
pa_subscription_free_all(c);
- if (c->quit_event)
- c->mainloop->time_free(c->quit_event);
+ if (c->exit_event)
+ c->mainloop->time_free(c->exit_event);
pa_xfree(c->default_source_name);
pa_xfree(c->default_sink_name);
+ pa_silence_cache_done(&c->silence_cache);
pa_mempool_free(c->mempool);
- pa_property_cleanup(c);
+ pa_shared_cleanup(c);
for (j = 0; j < PA_CORE_HOOK_MAX; j++)
- pa_hook_free(&c->hooks[j]);
+ pa_hook_done(&c->hooks[j]);
pa_xfree(c);
}
-static void quit_callback(pa_mainloop_api*m, pa_time_event *e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+static void exit_callback(pa_mainloop_api*m, pa_time_event *e, const struct timeval *tv, void *userdata) {
pa_core *c = userdata;
- pa_assert(c->quit_event == e);
+ pa_assert(c->exit_event == e);
- m->quit(m, 0);
+ pa_log_info("We are idle, quitting...");
+ pa_core_exit(c, TRUE, 0);
}
-void pa_core_check_quit(pa_core *c) {
+void pa_core_check_idle(pa_core *c) {
pa_assert(c);
- if (!c->quit_event && c->exit_idle_time >= 0 && pa_idxset_size(c->clients) == 0) {
+ if (!c->exit_event &&
+ c->exit_idle_time >= 0 &&
+ pa_idxset_size(c->clients) == 0) {
+
struct timeval tv;
pa_gettimeofday(&tv);
tv.tv_sec+= c->exit_idle_time;
- c->quit_event = c->mainloop->time_new(c->mainloop, &tv, quit_callback, c);
- } else if (c->quit_event && pa_idxset_size(c->clients) > 0) {
- c->mainloop->time_free(c->quit_event);
- c->quit_event = NULL;
+
+ c->exit_event = c->mainloop->time_new(c->mainloop, &tv, exit_callback, c);
+
+ } else if (c->exit_event && pa_idxset_size(c->clients) > 0) {
+ c->mainloop->time_free(c->exit_event);
+ c->exit_event = NULL;
}
}
+
+int pa_core_exit(pa_core *c, pa_bool_t force, int retval) {
+ pa_assert(c);
+
+ if (c->disallow_exit && !force)
+ return -1;
+
+ c->mainloop->quit(c->mainloop, retval);
+ return 0;
+}
diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
index d5bc10b..3955908 100644
--- a/src/pulsecore/core.h
+++ b/src/pulsecore/core.h
@@ -1,8 +1,6 @@
#ifndef foocorehfoo
#define foocorehfoo
-/* $Id: core.h 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -35,6 +33,7 @@
#include <pulsecore/llist.h>
#include <pulsecore/hook-list.h>
#include <pulsecore/asyncmsgq.h>
+#include <pulsecore/sample-util.h>
typedef struct pa_core pa_core;
@@ -43,16 +42,20 @@ typedef struct pa_core pa_core;
#include <pulsecore/msgobject.h>
typedef enum pa_core_hook {
- PA_CORE_HOOK_SINK_NEW_POST,
+ PA_CORE_HOOK_SINK_NEW,
+ PA_CORE_HOOK_SINK_FIXATE,
+ PA_CORE_HOOK_SINK_PUT,
PA_CORE_HOOK_SINK_UNLINK,
PA_CORE_HOOK_SINK_UNLINK_POST,
PA_CORE_HOOK_SINK_STATE_CHANGED,
- PA_CORE_HOOK_SINK_DESCRIPTION_CHANGED,
- PA_CORE_HOOK_SOURCE_NEW_POST,
+ PA_CORE_HOOK_SINK_PROPLIST_CHANGED,
+ PA_CORE_HOOK_SOURCE_NEW,
+ PA_CORE_HOOK_SOURCE_FIXATE,
+ PA_CORE_HOOK_SOURCE_PUT,
PA_CORE_HOOK_SOURCE_UNLINK,
PA_CORE_HOOK_SOURCE_UNLINK_POST,
PA_CORE_HOOK_SOURCE_STATE_CHANGED,
- PA_CORE_HOOK_SOURCE_DESCRIPTION_CHANGED,
+ PA_CORE_HOOK_SOURCE_PROPLIST_CHANGED,
PA_CORE_HOOK_SINK_INPUT_NEW,
PA_CORE_HOOK_SINK_INPUT_FIXATE,
PA_CORE_HOOK_SINK_INPUT_PUT,
@@ -60,8 +63,8 @@ typedef enum pa_core_hook {
PA_CORE_HOOK_SINK_INPUT_UNLINK_POST,
PA_CORE_HOOK_SINK_INPUT_MOVE,
PA_CORE_HOOK_SINK_INPUT_MOVE_POST,
- PA_CORE_HOOK_SINK_INPUT_NAME_CHANGED,
PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED,
+ PA_CORE_HOOK_SINK_INPUT_PROPLIST_CHANGED,
PA_CORE_HOOK_SOURCE_OUTPUT_NEW,
PA_CORE_HOOK_SOURCE_OUTPUT_FIXATE,
PA_CORE_HOOK_SOURCE_OUTPUT_PUT,
@@ -69,8 +72,8 @@ typedef enum pa_core_hook {
PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK_POST,
PA_CORE_HOOK_SOURCE_OUTPUT_MOVE,
PA_CORE_HOOK_SOURCE_OUTPUT_MOVE_POST,
- PA_CORE_HOOK_SOURCE_OUTPUT_NAME_CHANGED,
PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED,
+ PA_CORE_HOOK_SOURCE_OUTPUT_PROPLIST_CHANGED,
PA_CORE_HOOK_MAX
} pa_core_hook_t;
@@ -91,7 +94,7 @@ struct pa_core {
pa_idxset *clients, *sinks, *sources, *sink_inputs, *source_outputs, *modules, *scache, *autoload_idxset;
/* Some hashmaps for all sorts of entities */
- pa_hashmap *namereg, *autoload_hashmap, *properties;
+ pa_hashmap *namereg, *autoload_hashmap, *shared;
/* The name of the default sink/source */
char *default_source_name, *default_sink_name;
@@ -108,19 +111,23 @@ struct pa_core {
pa_subscription_event *subscription_event_last;
pa_mempool *mempool;
+ pa_silence_cache silence_cache;
int exit_idle_time, module_idle_time, scache_idle_time;
- pa_time_event *quit_event;
+ pa_time_event *exit_event;
pa_time_event *scache_auto_unload_event;
- pa_bool_t disallow_module_loading, running_as_daemon;
+ pa_bool_t disallow_module_loading:1;
+ pa_bool_t disallow_exit:1;
+ pa_bool_t running_as_daemon:1;
+ pa_bool_t realtime_scheduling:1;
+ pa_bool_t disable_remixing:1;
+ pa_bool_t disable_lfe_remixing:1;
+
pa_resample_method_t resample_method;
- pa_bool_t is_system_instance;
- pa_bool_t realtime_scheduling;
int realtime_priority;
- pa_bool_t disable_remixing;
/* hooks */
pa_hook hooks[PA_CORE_HOOK_MAX];
@@ -134,9 +141,11 @@ enum {
PA_CORE_MESSAGE_MAX
};
-pa_core* pa_core_new(pa_mainloop_api *m, int shared);
+pa_core* pa_core_new(pa_mainloop_api *m, pa_bool_t shared, size_t shm_size);
/* Check whether noone is connected to this core */
-void pa_core_check_quit(pa_core *c);
+void pa_core_check_idle(pa_core *c);
+
+int pa_core_exit(pa_core *c, pa_bool_t force, int retval);
#endif
diff --git a/src/pulsecore/creds.h b/src/pulsecore/creds.h
index 34f3684..c15c469 100644
--- a/src/pulsecore/creds.h
+++ b/src/pulsecore/creds.h
@@ -1,8 +1,6 @@
#ifndef foocredshfoo
#define foocredshfoo
-/* $Id: creds.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/dllmain.c b/src/pulsecore/dllmain.c
index 5e80cb7..269de60 100644
--- a/src/pulsecore/dllmain.c
+++ b/src/pulsecore/dllmain.c
@@ -1,5 +1,3 @@
-/* $Id: dllmain.c 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/dynarray.c b/src/pulsecore/dynarray.c
index c5d2ef8..69d835a 100644
--- a/src/pulsecore/dynarray.c
+++ b/src/pulsecore/dynarray.c
@@ -1,9 +1,7 @@
-/* $Id: dynarray.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -33,8 +31,8 @@
#include "dynarray.h"
-/* If the array becomes to small, increase its size by 100 entries */
-#define INCREASE_BY 100
+/* If the array becomes to small, increase its size by 25 entries */
+#define INCREASE_BY 25
struct pa_dynarray {
void **data;
@@ -43,21 +41,23 @@ struct pa_dynarray {
pa_dynarray* pa_dynarray_new(void) {
pa_dynarray *a;
+
a = pa_xnew(pa_dynarray, 1);
a->data = NULL;
a->n_entries = 0;
a->n_allocated = 0;
+
return a;
}
-void pa_dynarray_free(pa_dynarray* a, void (*func)(void *p, void *userdata), void *userdata) {
+void pa_dynarray_free(pa_dynarray* a, pa_free2_cb_t free_func, void *userdata) {
unsigned i;
pa_assert(a);
- if (func)
+ if (free_func)
for (i = 0; i < a->n_entries; i++)
if (a->data[i])
- func(a->data[i], userdata);
+ free_func(a->data[i], userdata);
pa_xfree(a->data);
pa_xfree(a);
@@ -91,6 +91,7 @@ unsigned pa_dynarray_append(pa_dynarray*a, void *p) {
i = a->n_entries;
pa_dynarray_put(a, i, p);
+
return i;
}
diff --git a/src/pulsecore/dynarray.h b/src/pulsecore/dynarray.h
index d726a7c..9a8e64e 100644
--- a/src/pulsecore/dynarray.h
+++ b/src/pulsecore/dynarray.h
@@ -1,12 +1,10 @@
-#ifndef foodynarrayhfoo
-#define foodynarrayhfoo
-
-/* $Id: dynarray.h 1426 2007-02-13 15:35:19Z ossman $ */
+#ifndef foopulsecoredynarrayhfoo
+#define foopulsecoredynarrayhfoo
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -24,6 +22,8 @@
USA.
***/
+#include <pulsecore/idxset.h>
+
typedef struct pa_dynarray pa_dynarray;
/* Implementation of a simple dynamically sized array. The array
@@ -34,7 +34,7 @@ pa_dynarray* pa_dynarray_new(void);
/* Free the array calling the specified function for every entry in
* the array. The function may be NULL. */
-void pa_dynarray_free(pa_dynarray* a, void (*func)(void *p, void *userdata), void *userdata);
+void pa_dynarray_free(pa_dynarray* a, pa_free2_cb_t free_func, void *userdata);
/* Store p at position i in the array */
void pa_dynarray_put(pa_dynarray*a, unsigned i, void *p);
diff --git a/src/pulsecore/endianmacros.h b/src/pulsecore/endianmacros.h
index da2d1d5..1b94de1 100644
--- a/src/pulsecore/endianmacros.h
+++ b/src/pulsecore/endianmacros.h
@@ -1,8 +1,6 @@
#ifndef fooendianmacroshfoo
#define fooendianmacroshfoo
-/* $Id: endianmacros.h 2143 2008-03-27 21:24:03Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -48,9 +46,14 @@
#endif
static inline float PA_FLOAT32_SWAP(float x) {
- uint32_t i = *(uint32_t*) &x;
- i = PA_UINT32_SWAP(i);
- return *(float*) &i;
+ union {
+ float f;
+ uint32_t u;
+ } t;
+
+ t.f = x;
+ t.u = PA_UINT32_SWAP(t.u);
+ return t.f;
}
#define PA_MAYBE_INT16_SWAP(c,x) ((c) ? PA_INT32_SWAP(x) : x)
diff --git a/src/pulsecore/envelope.c b/src/pulsecore/envelope.c
new file mode 100644
index 0000000..7f2252e
--- /dev/null
+++ b/src/pulsecore/envelope.c
@@ -0,0 +1,781 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2007 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <pulse/sample.h>
+#include <pulse/xmalloc.h>
+
+#include <pulsecore/endianmacros.h>
+#include <pulsecore/memchunk.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/flist.h>
+#include <pulsecore/semaphore.h>
+#include <pulsecore/g711.h>
+
+#include "envelope.h"
+
+/*
+ Envelope subsystem for applying linear interpolated volume
+ envelopes on audio data. If multiple enevelopes shall be applied
+ at the same time, the "minimum" envelope is determined and
+ applied.
+
+ Envelopes are defined in a statically allocated constant structure
+ pa_envelope_def. It may be activated using pa_envelope_add(). And
+ already active envelope may be replaced with pa_envelope_replace()
+ and removed with pa_envelope_remove().The combined "minimum"
+ envelope can be applied to audio data with pa_envelope_apply().
+
+ _apply() on one hand and _add()/_replace()/_remove() on the other
+ can be executed in seperate threads, in which case no locking is
+ used.
+*/
+
+PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree);
+
+struct pa_envelope_item {
+ PA_LLIST_FIELDS(pa_envelope_item);
+ const pa_envelope_def *def;
+ pa_usec_t start_x;
+ union {
+ int32_t i;
+ float f;
+ } start_y;
+ unsigned j;
+};
+
+enum envelope_state {
+ STATE_VALID0,
+ STATE_VALID1,
+ STATE_READ0,
+ STATE_READ1,
+ STATE_WAIT0,
+ STATE_WAIT1,
+ STATE_WRITE0,
+ STATE_WRITE1
+};
+
+struct pa_envelope {
+ pa_sample_spec sample_spec;
+
+ PA_LLIST_HEAD(pa_envelope_item, items);
+
+ pa_atomic_t state;
+
+ size_t x;
+
+ struct {
+ unsigned n_points, n_allocated, n_current;
+
+ size_t *x;
+ union {
+ int32_t *i;
+ float *f;
+ } y;
+
+ size_t cached_dx;
+ int32_t cached_dy_i;
+ float cached_dy_dx;
+ pa_bool_t cached_valid;
+ } points[2];
+
+ pa_bool_t is_float;
+
+ pa_semaphore *semaphore;
+};
+
+pa_envelope *pa_envelope_new(const pa_sample_spec *ss) {
+ pa_envelope *e;
+ pa_assert(ss);
+
+ e = pa_xnew(pa_envelope, 1);
+
+ e->sample_spec = *ss;
+ PA_LLIST_HEAD_INIT(pa_envelope_item, e->items);
+
+ e->x = 0;
+
+ e->points[0].n_points = e->points[1].n_points = 0;
+ e->points[0].n_allocated = e->points[1].n_allocated = 0;
+ e->points[0].n_current = e->points[1].n_current = 0;
+ e->points[0].x = e->points[1].x = NULL;
+ e->points[0].y.i = e->points[1].y.i = NULL;
+ e->points[0].cached_valid = e->points[1].cached_valid = FALSE;
+
+ pa_atomic_store(&e->state, STATE_VALID0);
+
+ e->is_float =
+ ss->format == PA_SAMPLE_FLOAT32LE ||
+ ss->format == PA_SAMPLE_FLOAT32BE;
+
+ e->semaphore = pa_semaphore_new(0);
+
+ return e;
+}
+
+void pa_envelope_free(pa_envelope *e) {
+ pa_assert(e);
+
+ while (e->items)
+ pa_envelope_remove(e, e->items);
+
+ pa_xfree(e->points[0].x);
+ pa_xfree(e->points[1].x);
+ pa_xfree(e->points[0].y.i);
+ pa_xfree(e->points[1].y.i);
+
+ pa_semaphore_free(e->semaphore);
+
+ pa_xfree(e);
+}
+
+static int32_t linear_interpolate_int(pa_usec_t x1, int32_t _y1, pa_usec_t x2, int32_t y2, pa_usec_t x3) {
+ return (int32_t) ((double) _y1 + (double) (x3 - x1) * (double) (y2 - _y1) / (double) (x2 - x1));
+}
+
+static float linear_interpolate_float(pa_usec_t x1, float _y1, pa_usec_t x2, float y2, pa_usec_t x3) {
+ return _y1 + ((float) x3 - (float) x1) * (y2 - _y1) / ((float) x2 - (float) x1);
+}
+
+static int32_t item_get_int(pa_envelope_item *i, pa_usec_t x) {
+ pa_assert(i);
+
+ if (x <= i->start_x)
+ return i->start_y.i;
+
+ x -= i->start_x;
+
+ if (x <= i->def->points_x[0])
+ return linear_interpolate_int(0, i->start_y.i,
+ i->def->points_x[0], i->def->points_y.i[0], x);
+
+ if (x >= i->def->points_x[i->def->n_points-1])
+ return i->def->points_y.i[i->def->n_points-1];
+
+ pa_assert(i->j > 0);
+ pa_assert(i->def->points_x[i->j-1] <= x);
+ pa_assert(x < i->def->points_x[i->j]);
+
+ return linear_interpolate_int(i->def->points_x[i->j-1], i->def->points_y.i[i->j-1],
+ i->def->points_x[i->j], i->def->points_y.i[i->j], x);
+}
+
+static float item_get_float(pa_envelope_item *i, pa_usec_t x) {
+ pa_assert(i);
+
+ if (x <= i->start_x)
+ return i->start_y.f;
+
+ x -= i->start_x;
+
+ if (x <= i->def->points_x[0])
+ return linear_interpolate_float(0, i->start_y.f,
+ i->def->points_x[0], i->def->points_y.f[0], x);
+
+ if (x >= i->def->points_x[i->def->n_points-1])
+ return i->def->points_y.f[i->def->n_points-1];
+
+ pa_assert(i->j > 0);
+ pa_assert(i->def->points_x[i->j-1] <= x);
+ pa_assert(x < i->def->points_x[i->j]);
+
+ return linear_interpolate_float(i->def->points_x[i->j-1], i->def->points_y.f[i->j-1],
+ i->def->points_x[i->j], i->def->points_y.f[i->j], x);
+}
+
+static void envelope_begin_write(pa_envelope *e, int *v) {
+ enum envelope_state new_state, old_state;
+ pa_bool_t wait_sem;
+
+ pa_assert(e);
+ pa_assert(v);
+
+ for (;;) {
+ do {
+ wait_sem = FALSE;
+ old_state = pa_atomic_load(&e->state);
+
+ switch (old_state) {
+ case STATE_VALID0:
+ *v = 1;
+ new_state = STATE_WRITE0;
+ break;
+ case STATE_VALID1:
+ *v = 0;
+ new_state = STATE_WRITE1;
+ break;
+ case STATE_READ0:
+ new_state = STATE_WAIT0;
+ wait_sem = TRUE;
+ break;
+ case STATE_READ1:
+ new_state = STATE_WAIT1;
+ wait_sem = TRUE;
+ break;
+ default:
+ pa_assert_not_reached();
+ }
+ } while (!pa_atomic_cmpxchg(&e->state, old_state, new_state));
+
+ if (!wait_sem)
+ break;
+
+ pa_semaphore_wait(e->semaphore);
+ }
+}
+
+static pa_bool_t envelope_commit_write(pa_envelope *e, int v) {
+ enum envelope_state new_state, old_state;
+
+ pa_assert(e);
+
+ do {
+ old_state = pa_atomic_load(&e->state);
+
+ switch (old_state) {
+ case STATE_WRITE0:
+ pa_assert(v == 1);
+ new_state = STATE_VALID1;
+ break;
+ case STATE_WRITE1:
+ pa_assert(v == 0);
+ new_state = STATE_VALID0;
+ break;
+ case STATE_VALID0:
+ case STATE_VALID1:
+ case STATE_READ0:
+ case STATE_READ1:
+ return FALSE;
+ default:
+ pa_assert_not_reached();
+ }
+ } while (!pa_atomic_cmpxchg(&e->state, old_state, new_state));
+
+ return TRUE;
+}
+
+static void envelope_begin_read(pa_envelope *e, int *v) {
+ enum envelope_state new_state, old_state;
+ pa_assert(e);
+ pa_assert(v);
+
+ do {
+ old_state = pa_atomic_load(&e->state);
+
+ switch (old_state) {
+ case STATE_VALID0:
+ case STATE_WRITE0:
+ *v = 0;
+ new_state = STATE_READ0;
+ break;
+ case STATE_VALID1:
+ case STATE_WRITE1:
+ *v = 1;
+ new_state = STATE_READ1;
+ break;
+ default:
+ pa_assert_not_reached();
+ }
+ } while (!pa_atomic_cmpxchg(&e->state, old_state, new_state));
+}
+
+static void envelope_commit_read(pa_envelope *e, int v) {
+ enum envelope_state new_state, old_state;
+ pa_bool_t post_sem;
+
+ pa_assert(e);
+
+ do {
+ post_sem = FALSE;
+ old_state = pa_atomic_load(&e->state);
+
+ switch (old_state) {
+ case STATE_READ0:
+ pa_assert(v == 0);
+ new_state = STATE_VALID0;
+ break;
+ case STATE_READ1:
+ pa_assert(v == 1);
+ new_state = STATE_VALID1;
+ break;
+ case STATE_WAIT0:
+ pa_assert(v == 0);
+ new_state = STATE_VALID0;
+ post_sem = TRUE;
+ break;
+ case STATE_WAIT1:
+ pa_assert(v == 1);
+ new_state = STATE_VALID1;
+ post_sem = TRUE;
+ break;
+ default:
+ pa_assert_not_reached();
+ }
+ } while (!pa_atomic_cmpxchg(&e->state, old_state, new_state));
+
+ if (post_sem)
+ pa_semaphore_post(e->semaphore);
+}
+
+static void envelope_merge(pa_envelope *e, int v) {
+
+ e->points[v].n_points = 0;
+
+ if (e->items) {
+ pa_envelope_item *i;
+ pa_usec_t x = (pa_usec_t) -1;
+
+ for (i = e->items; i; i = i->next)
+ i->j = 0;
+
+ for (;;) {
+ pa_bool_t min_is_set;
+ pa_envelope_item *s = NULL;
+
+ /* Let's find the next spot on the X axis to analyze */
+ for (i = e->items; i; i = i->next) {
+
+ for (;;) {
+
+ if (i->j >= i->def->n_points)
+ break;
+
+ if ((x != (pa_usec_t) -1) && i->start_x + i->def->points_x[i->j] <= x) {
+ i->j++;
+ continue;
+ }
+
+ if (!s || (i->start_x + i->def->points_x[i->j] < s->start_x + s->def->points_x[s->j]))
+ s = i;
+
+ break;
+ }
+ }
+
+ if (!s)
+ break;
+
+ if (e->points[v].n_points >= e->points[v].n_allocated) {
+ e->points[v].n_allocated = PA_MAX(e->points[v].n_points*2, PA_ENVELOPE_POINTS_MAX);
+
+ e->points[v].x = pa_xrealloc(e->points[v].x, sizeof(size_t) * e->points[v].n_allocated);
+ e->points[v].y.i = pa_xrealloc(e->points[v].y.i, sizeof(int32_t) * e->points[v].n_allocated);
+ }
+
+ x = s->start_x + s->def->points_x[s->j];
+ e->points[v].x[e->points[v].n_points] = pa_usec_to_bytes(x, &e->sample_spec);
+
+ min_is_set = FALSE;
+
+ /* Now let's find the lowest value */
+ if (e->is_float) {
+ float min_f;
+
+ for (i = e->items; i; i = i->next) {
+ float f = item_get_float(i, x);
+ if (!min_is_set || f < min_f) {
+ min_f = f;
+ min_is_set = TRUE;
+ }
+ }
+
+ e->points[v].y.f[e->points[v].n_points] = min_f;
+ } else {
+ int32_t min_k;
+
+ for (i = e->items; i; i = i->next) {
+ int32_t k = item_get_int(i, x);
+ if (!min_is_set || k < min_k) {
+ min_k = k;
+ min_is_set = TRUE;
+ }
+ }
+
+ e->points[v].y.i[e->points[v].n_points] = min_k;
+ }
+
+ pa_assert_se(min_is_set);
+ e->points[v].n_points++;
+ }
+ }
+
+ e->points[v].n_current = 0;
+ e->points[v].cached_valid = FALSE;
+}
+
+pa_envelope_item *pa_envelope_add(pa_envelope *e, const pa_envelope_def *def) {
+ pa_envelope_item *i;
+ int v;
+
+ pa_assert(e);
+ pa_assert(def);
+ pa_assert(def->n_points > 0);
+
+ if (!(i = pa_flist_pop(PA_STATIC_FLIST_GET(items))))
+ i = pa_xnew(pa_envelope_item, 1);
+
+ i->def = def;
+
+ if (e->is_float)
+ i->start_y.f = def->points_y.f[0];
+ else
+ i->start_y.i = def->points_y.i[0];
+
+ PA_LLIST_PREPEND(pa_envelope_item, e->items, i);
+
+ envelope_begin_write(e, &v);
+
+ do {
+
+ i->start_x = pa_bytes_to_usec(e->x, &e->sample_spec);
+ envelope_merge(e, v);
+
+ } while (!envelope_commit_write(e, v));
+
+ return i;
+}
+
+pa_envelope_item *pa_envelope_replace(pa_envelope *e, pa_envelope_item *i, const pa_envelope_def *def) {
+ pa_usec_t x;
+ int v;
+
+ pa_assert(e);
+ pa_assert(i);
+ pa_assert(def->n_points > 0);
+
+ envelope_begin_write(e, &v);
+
+ for (;;) {
+ float saved_f;
+ int32_t saved_i;
+ uint64_t saved_start_x;
+ const pa_envelope_def *saved_def;
+
+ x = pa_bytes_to_usec(e->x, &e->sample_spec);
+
+ if (e->is_float) {
+ saved_f = i->start_y.f;
+ i->start_y.f = item_get_float(i, x);
+ } else {
+ saved_i = i->start_y.i;
+ i->start_y.i = item_get_int(i, x);
+ }
+
+ saved_start_x = i->start_x;
+ saved_def = i->def;
+
+ i->start_x = x;
+ i->def = def;
+
+ envelope_merge(e, v);
+
+ if (envelope_commit_write(e, v))
+ break;
+
+ i->start_x = saved_start_x;
+ i->def = saved_def;
+
+ if (e->is_float)
+ i->start_y.f = saved_f;
+ else
+ i->start_y.i = saved_i;
+ }
+
+ return i;
+}
+
+void pa_envelope_remove(pa_envelope *e, pa_envelope_item *i) {
+ int v;
+
+ pa_assert(e);
+ pa_assert(i);
+
+ PA_LLIST_REMOVE(pa_envelope_item, e->items, i);
+
+ if (pa_flist_push(PA_STATIC_FLIST_GET(items), i) < 0)
+ pa_xfree(i);
+
+ envelope_begin_write(e, &v);
+ do {
+ envelope_merge(e, v);
+ } while (!envelope_commit_write(e, v));
+}
+
+static int32_t linear_get_int(pa_envelope *e, int v) {
+ pa_assert(e);
+
+ /* The repeated division could be replaced by Bresenham, as an
+ * optimization */
+
+ if (e->x < e->points[v].x[0])
+ return e->points[v].y.i[0];
+
+ for (;;) {
+ if (e->points[v].n_current+1 >= e->points[v].n_points)
+ return e->points[v].y.i[e->points[v].n_points-1];
+
+ if (e->x < e->points[v].x[e->points[v].n_current+1])
+ break;
+
+ e->points[v].n_current++;
+ e->points[v].cached_valid = FALSE;
+ }
+
+ if (!e->points[v].cached_valid) {
+ e->points[v].cached_dx = e->points[v].x[e->points[v].n_current+1] - e->points[v].x[e->points[v].n_current];
+ e->points[v].cached_dy_i = e->points[v].y.i[e->points[v].n_current+1] - e->points[v].y.i[e->points[v].n_current];
+ e->points[v].cached_valid = TRUE;
+ }
+
+ return e->points[v].y.i[e->points[v].n_current] + (e->points[v].cached_dy_i * (int32_t) (e->x - e->points[v].x[e->points[v].n_current])) / (int32_t) e->points[v].cached_dx;
+}
+
+static float linear_get_float(pa_envelope *e, int v) {
+ pa_assert(e);
+
+ if (e->x < e->points[v].x[0])
+ return e->points[v].y.f[0];
+
+ for (;;) {
+ if (e->points[v].n_current+1 >= e->points[v].n_points)
+ return e->points[v].y.f[e->points[v].n_points-1];
+
+ if (e->x < e->points[v].x[e->points[v].n_current+1])
+ break;
+
+ e->points[v].n_current++;
+ e->points[v].cached_valid = FALSE;
+ }
+
+ if (!e->points[v].cached_valid) {
+ e->points[v].cached_dy_dx =
+ (e->points[v].y.f[e->points[v].n_current+1] - e->points[v].y.f[e->points[v].n_current]) /
+ ((float) e->points[v].x[e->points[v].n_current+1] - (float) e->points[v].x[e->points[v].n_current]);
+ e->points[v].cached_valid = TRUE;
+ }
+
+ return e->points[v].y.f[e->points[v].n_current] + (float) (e->x - e->points[v].x[e->points[v].n_current]) * e->points[v].cached_dy_dx;
+}
+
+void pa_envelope_apply(pa_envelope *e, pa_memchunk *chunk) {
+ int v;
+
+ pa_assert(e);
+ pa_assert(chunk);
+
+ envelope_begin_read(e, &v);
+
+ if (e->points[v].n_points > 0) {
+ void *p;
+ size_t fs, n;
+
+ pa_memchunk_make_writable(chunk, 0);
+ p = (uint8_t*) pa_memblock_acquire(chunk->memblock) + chunk->index;
+ fs = pa_frame_size(&e->sample_spec);
+ n = chunk->length;
+
+ switch (e->sample_spec.format) {
+
+
+
+ case PA_SAMPLE_U8: {
+ uint8_t *t;
+
+ for (t = p; n > 0; n -= fs) {
+ int32_t factor = linear_get_int(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++)
+ *t = (uint8_t) (((factor * ((int16_t) *t - 0x80)) / 0x10000) + 0x80);
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_ULAW: {
+ uint8_t *t;
+
+ for (t = p; n > 0; n -= fs) {
+ int32_t factor = linear_get_int(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++) {
+ int16_t k = st_ulaw2linear16(*t);
+ *t = (uint8_t) st_14linear2ulaw((int16_t) (((factor * k) / 0x10000) >> 2));
+ }
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_ALAW: {
+ uint8_t *t;
+
+ for (t = p; n > 0; n -= fs) {
+ int32_t factor = linear_get_int(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++) {
+ int16_t k = st_alaw2linear16(*t);
+ *t = (uint8_t) st_13linear2alaw((int16_t) (((factor * k) / 0x10000) >> 3));
+ }
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_S16NE: {
+ int16_t *t;
+
+ for (t = p; n > 0; n -= fs) {
+ int32_t factor = linear_get_int(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++)
+ *t = (int16_t) ((factor * *t) / 0x10000);
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_S16RE: {
+ int16_t *t;
+
+ for (t = p; n > 0; n -= fs) {
+ int32_t factor = linear_get_int(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++) {
+ int16_t r = (int16_t) ((factor * PA_INT16_SWAP(*t)) / 0x10000);
+ *t = PA_INT16_SWAP(r);
+ }
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_S32NE: {
+ int32_t *t;
+
+ for (t = p; n > 0; n -= fs) {
+ int32_t factor = linear_get_int(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++)
+ *t = (int32_t) (((int64_t) factor * (int64_t) *t) / 0x10000);
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_S32RE: {
+ int32_t *t;
+
+ for (t = p; n > 0; n -= fs) {
+ int32_t factor = linear_get_int(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++) {
+ int32_t r = (int32_t) (((int64_t) factor * (int64_t) PA_INT32_SWAP(*t)) / 0x10000);
+ *t = PA_INT32_SWAP(r);
+ }
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_FLOAT32NE: {
+ float *t;
+
+ for (t = p; n > 0; n -= fs) {
+ float factor = linear_get_float(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++)
+ *t = *t * factor;
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_FLOAT32RE: {
+ float *t;
+
+ for (t = p; n > 0; n -= fs) {
+ float factor = linear_get_float(e, v);
+ unsigned c;
+ e->x += fs;
+
+ for (c = 0; c < e->sample_spec.channels; c++, t++) {
+ float r = PA_FLOAT32_SWAP(*t) * factor;
+ *t = PA_FLOAT32_SWAP(r);
+ }
+ }
+
+ break;
+ }
+
+ case PA_SAMPLE_MAX:
+ case PA_SAMPLE_INVALID:
+ pa_assert_not_reached();
+ }
+
+ pa_memblock_release(chunk->memblock);
+
+ e->x += chunk->length;
+ } else {
+ /* When we have no envelope to apply we reset our origin */
+ e->x = 0;
+ }
+
+ envelope_commit_read(e, v);
+}
+
+void pa_envelope_rewind(pa_envelope *e, size_t n_bytes) {
+ int v;
+
+ pa_assert(e);
+
+ envelope_begin_read(e, &v);
+
+ if (n_bytes < e->x)
+ e->x -= n_bytes;
+ else
+ e->x = 0;
+
+ e->points[v].n_current = 0;
+ e->points[v].cached_valid = FALSE;
+
+ envelope_commit_read(e, v);
+}
diff --git a/src/pulsecore/envelope.h b/src/pulsecore/envelope.h
new file mode 100644
index 0000000..5296415
--- /dev/null
+++ b/src/pulsecore/envelope.h
@@ -0,0 +1,53 @@
+#ifndef foopulseenvelopehfoo
+#define foopulseenvelopehfoo
+
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2007 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#include <pulsecore/macro.h>
+#include <pulsecore/memchunk.h>
+
+#include <pulse/sample.h>
+
+#define PA_ENVELOPE_POINTS_MAX 4U
+
+typedef struct pa_envelope pa_envelope;
+typedef struct pa_envelope_item pa_envelope_item;
+
+typedef struct pa_envelope_def {
+ unsigned n_points;
+
+ pa_usec_t points_x[PA_ENVELOPE_POINTS_MAX];
+ struct {
+ int32_t i[PA_ENVELOPE_POINTS_MAX];
+ float f[PA_ENVELOPE_POINTS_MAX];
+ } points_y;
+} pa_envelope_def;
+
+pa_envelope *pa_envelope_new(const pa_sample_spec *ss);
+void pa_envelope_free(pa_envelope *e);
+pa_envelope_item *pa_envelope_add(pa_envelope *e, const pa_envelope_def *def);
+pa_envelope_item *pa_envelope_replace(pa_envelope *e, pa_envelope_item *i, const pa_envelope_def *def);
+void pa_envelope_remove(pa_envelope *e, pa_envelope_item *i);
+void pa_envelope_apply(pa_envelope *e, pa_memchunk *chunk);
+void pa_envelope_rewind(pa_envelope *e, size_t n_bytes);
+
+#endif
diff --git a/src/pulsecore/esound.h b/src/pulsecore/esound.h
index 0bfe88d..79322ae 100644
--- a/src/pulsecore/esound.h
+++ b/src/pulsecore/esound.h
@@ -1,8 +1,6 @@
#ifndef fooesoundhfoo
#define fooesoundhfoo
-/* $Id: esound.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/fdsem.c b/src/pulsecore/fdsem.c
index 59eec18..380f34f 100644
--- a/src/pulsecore/fdsem.c
+++ b/src/pulsecore/fdsem.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -43,56 +41,30 @@
#include <pulsecore/pipe.h>
#endif
-#ifdef __linux__
-
-#if !defined(__NR_eventfd) && defined(__i386__)
-#define __NR_eventfd 323
-#endif
-
-#if !defined(__NR_eventfd) && defined(__x86_64__)
-#define __NR_eventfd 284
-#endif
-
-#if !defined(__NR_eventfd) && defined(__arm__)
-#define __NR_eventfd (__NR_SYSCALL_BASE+351)
-#endif
-
-#if !defined(SYS_eventfd) && defined(__NR_eventfd)
-#define SYS_eventfd __NR_eventfd
-#endif
-
-#ifdef SYS_eventfd
-#define HAVE_EVENTFD
-
-static inline long eventfd(unsigned count) {
- return syscall(SYS_eventfd, count);
-}
-
-#endif
+#ifdef HAVE_SYS_EVENTFD_H
+#include <sys/eventfd.h>
#endif
#include "fdsem.h"
struct pa_fdsem {
int fds[2];
-#ifdef HAVE_EVENTFD
+#ifdef HAVE_SYS_EVENTFD_H
int efd;
#endif
- pa_atomic_t waiting;
- pa_atomic_t signalled;
- pa_atomic_t in_pipe;
+
+ pa_fdsem_data *data;
};
pa_fdsem *pa_fdsem_new(void) {
pa_fdsem *f;
- f = pa_xnew(pa_fdsem, 1);
+ f = pa_xmalloc(PA_ALIGN(sizeof(pa_fdsem)) + PA_ALIGN(sizeof(pa_fdsem_data)));
-#ifdef HAVE_EVENTFD
- if ((f->efd = eventfd(0)) >= 0) {
+#ifdef HAVE_SYS_EVENTFD_H
+ if ((f->efd = eventfd(0, 0)) >= 0) {
pa_make_fd_cloexec(f->efd);
f->fds[0] = f->fds[1] = -1;
-
} else
#endif
{
@@ -105,9 +77,57 @@ pa_fdsem *pa_fdsem_new(void) {
pa_make_fd_cloexec(f->fds[1]);
}
- pa_atomic_store(&f->waiting, 0);
- pa_atomic_store(&f->signalled, 0);
- pa_atomic_store(&f->in_pipe, 0);
+ f->data = (pa_fdsem_data*) ((uint8_t*) f + PA_ALIGN(sizeof(pa_fdsem)));
+
+ pa_atomic_store(&f->data->waiting, 0);
+ pa_atomic_store(&f->data->signalled, 0);
+ pa_atomic_store(&f->data->in_pipe, 0);
+
+ return f;
+}
+
+pa_fdsem *pa_fdsem_open_shm(pa_fdsem_data *data, int event_fd) {
+ pa_fdsem *f = NULL;
+
+ pa_assert(data);
+ pa_assert(event_fd >= 0);
+
+#ifdef HAVE_SYS_EVENTFD_H
+ f = pa_xnew(pa_fdsem, 1);
+
+ f->efd = event_fd;
+ pa_make_fd_cloexec(f->efd);
+ f->fds[0] = f->fds[1] = -1;
+ f->data = data;
+#endif
+
+ return f;
+}
+
+pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data, int* event_fd) {
+ pa_fdsem *f = NULL;
+
+ pa_assert(data);
+ pa_assert(event_fd);
+
+#ifdef HAVE_SYS_EVENTFD_H
+
+ f = pa_xnew(pa_fdsem, 1);
+
+ if ((f->efd = eventfd(0, 0)) < 0) {
+ pa_xfree(f);
+ return NULL;
+ }
+
+ pa_make_fd_cloexec(f->efd);
+ f->fds[0] = f->fds[1] = -1;
+ f->data = data;
+
+ pa_atomic_store(&f->data->waiting, 0);
+ pa_atomic_store(&f->data->signalled, 0);
+ pa_atomic_store(&f->data->in_pipe, 0);
+
+#endif
return f;
}
@@ -115,7 +135,7 @@ pa_fdsem *pa_fdsem_new(void) {
void pa_fdsem_free(pa_fdsem *f) {
pa_assert(f);
-#ifdef HAVE_EVENTFD
+#ifdef HAVE_SYS_EVENTFD_H
if (f->efd >= 0)
pa_close(f->efd);
#endif
@@ -128,13 +148,13 @@ static void flush(pa_fdsem *f) {
ssize_t r;
pa_assert(f);
- if (pa_atomic_load(&f->in_pipe) <= 0)
+ if (pa_atomic_load(&f->data->in_pipe) <= 0)
return;
do {
char x[10];
-#ifdef HAVE_EVENTFD
+#ifdef HAVE_SYS_EVENTFD_H
if (f->efd >= 0) {
uint64_t u;
@@ -151,23 +171,23 @@ static void flush(pa_fdsem *f) {
continue;
}
- } while (pa_atomic_sub(&f->in_pipe, r) > r);
+ } while (pa_atomic_sub(&f->data->in_pipe, (int) r) > (int) r);
}
void pa_fdsem_post(pa_fdsem *f) {
pa_assert(f);
- if (pa_atomic_cmpxchg(&f->signalled, 0, 1)) {
+ if (pa_atomic_cmpxchg(&f->data->signalled, 0, 1)) {
- if (pa_atomic_load(&f->waiting)) {
+ if (pa_atomic_load(&f->data->waiting)) {
ssize_t r;
char x = 'x';
- pa_atomic_inc(&f->in_pipe);
+ pa_atomic_inc(&f->data->in_pipe);
for (;;) {
-#ifdef HAVE_EVENTFD
+#ifdef HAVE_SYS_EVENTFD_H
if (f->efd >= 0) {
uint64_t u = 1;
@@ -194,16 +214,16 @@ void pa_fdsem_wait(pa_fdsem *f) {
flush(f);
- if (pa_atomic_cmpxchg(&f->signalled, 1, 0))
+ if (pa_atomic_cmpxchg(&f->data->signalled, 1, 0))
return;
- pa_atomic_inc(&f->waiting);
+ pa_atomic_inc(&f->data->waiting);
- while (!pa_atomic_cmpxchg(&f->signalled, 1, 0)) {
+ while (!pa_atomic_cmpxchg(&f->data->signalled, 1, 0)) {
char x[10];
ssize_t r;
-#ifdef HAVE_EVENTFD
+#ifdef HAVE_SYS_EVENTFD_H
if (f->efd >= 0) {
uint64_t u;
@@ -221,10 +241,10 @@ void pa_fdsem_wait(pa_fdsem *f) {
continue;
}
- pa_atomic_sub(&f->in_pipe, r);
+ pa_atomic_sub(&f->data->in_pipe, (int) r);
}
- pa_assert_se(pa_atomic_dec(&f->waiting) >= 1);
+ pa_assert_se(pa_atomic_dec(&f->data->waiting) >= 1);
}
int pa_fdsem_try(pa_fdsem *f) {
@@ -232,7 +252,7 @@ int pa_fdsem_try(pa_fdsem *f) {
flush(f);
- if (pa_atomic_cmpxchg(&f->signalled, 1, 0))
+ if (pa_atomic_cmpxchg(&f->data->signalled, 1, 0))
return 1;
return 0;
@@ -241,7 +261,7 @@ int pa_fdsem_try(pa_fdsem *f) {
int pa_fdsem_get(pa_fdsem *f) {
pa_assert(f);
-#ifdef HAVE_EVENTFD
+#ifdef HAVE_SYS_EVENTFD_H
if (f->efd >= 0)
return f->efd;
#endif
@@ -254,13 +274,13 @@ int pa_fdsem_before_poll(pa_fdsem *f) {
flush(f);
- if (pa_atomic_cmpxchg(&f->signalled, 1, 0))
+ if (pa_atomic_cmpxchg(&f->data->signalled, 1, 0))
return -1;
- pa_atomic_inc(&f->waiting);
+ pa_atomic_inc(&f->data->waiting);
- if (pa_atomic_cmpxchg(&f->signalled, 1, 0)) {
- pa_assert_se(pa_atomic_dec(&f->waiting) >= 1);
+ if (pa_atomic_cmpxchg(&f->data->signalled, 1, 0)) {
+ pa_assert_se(pa_atomic_dec(&f->data->waiting) >= 1);
return -1;
}
return 0;
@@ -269,11 +289,11 @@ int pa_fdsem_before_poll(pa_fdsem *f) {
int pa_fdsem_after_poll(pa_fdsem *f) {
pa_assert(f);
- pa_assert_se(pa_atomic_dec(&f->waiting) >= 1);
+ pa_assert_se(pa_atomic_dec(&f->data->waiting) >= 1);
flush(f);
- if (pa_atomic_cmpxchg(&f->signalled, 1, 0))
+ if (pa_atomic_cmpxchg(&f->data->signalled, 1, 0))
return 1;
return 0;
diff --git a/src/pulsecore/fdsem.h b/src/pulsecore/fdsem.h
index f38ef20..48a77c4 100644
--- a/src/pulsecore/fdsem.h
+++ b/src/pulsecore/fdsem.h
@@ -1,8 +1,6 @@
#ifndef foopulsefdsemhfoo
#define foopulsefdsemhfoo
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -33,7 +31,15 @@
typedef struct pa_fdsem pa_fdsem;
+typedef struct pa_fdsem_data {
+ pa_atomic_t waiting;
+ pa_atomic_t signalled;
+ pa_atomic_t in_pipe;
+} pa_fdsem_data;
+
pa_fdsem *pa_fdsem_new(void);
+pa_fdsem *pa_fdsem_open_shm(pa_fdsem_data *data, int event_fd);
+pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data, int* event_fd);
void pa_fdsem_free(pa_fdsem *f);
void pa_fdsem_post(pa_fdsem *f);
diff --git a/src/pulsecore/ffmpeg/resample2.c b/src/pulsecore/ffmpeg/resample2.c
index da1443d..ed59448 100644
--- a/src/pulsecore/ffmpeg/resample2.c
+++ b/src/pulsecore/ffmpeg/resample2.c
@@ -208,7 +208,7 @@ void av_resample_close(AVResampleContext *c){
/**
* Compensates samplerate/timestamp drift. The compensation is done by changing
- * the resampler parameters, so no audible clicks or similar distortions ocur
+ * the resampler parameters, so no audible clicks or similar distortions occur
* @param compensation_distance distance in output samples over which the compensation should be performed
* @param sample_delta number of output samples which should be output less
*
@@ -231,7 +231,7 @@ void av_resample_compensate(AVResampleContext *c, int sample_delta, int compensa
* @param src_size the number of unconsumed samples available
* @param dst_size the amount of space in samples available in dst
* @param update_ctx if this is 0 then the context wont be modified, that way several channels can be resampled with the same context
- * @return the number of samples written in dst or -1 if an error occured
+ * @return the number of samples written in dst or -1 if an error occurred
*/
int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx){
int dst_index, i;
diff --git a/src/pulsecore/flist.c b/src/pulsecore/flist.c
index c9271cd..6fb944f 100644
--- a/src/pulsecore/flist.c
+++ b/src/pulsecore/flist.c
@@ -1,9 +1,7 @@
-/* $Id: flist.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2006 Lennart Poettering
+ Copyright 2006-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -40,14 +38,8 @@
* from the flist although it isn't empty, and fail to push into the
* flist, although it isn't full.
*
- * We keep a fixed size array of entries, each item is either marked
- * UNUSED, USED or BUSY and contains a user data pointer. When pushing
- * into the queue we look for an UNUSED cell and mark it BUSY with a
- * CAS operation. If successful we use it and mark it USED, otherwise
- * we go on and look for the next UNUSED cell. The algorithm for
- * popping an item from the queue is practically inverse: look for a
- * USED cell and and mark it BUSY with a CAS operation, after reading
- * from it mark it UNUSED again.
+ * We keep a fixed size array of entries, each item is an atomic
+ * pointer.
*
* To accelerate finding of used/unused cells we maintain a read and a
* write index which is used like a ring buffer. After each push we
@@ -74,7 +66,7 @@
* Please note that this algorithm is home grown.*/
#define FLIST_SIZE 128
-#define N_EXTRA_SCAN 2
+#define N_EXTRA_SCAN 3
/* For debugging purposes we can define _Y to put and extra thread
* yield between each operation. */
@@ -85,17 +77,6 @@
#define _Y do { } while(0)
#endif
-enum {
- STATE_UNUSED,
- STATE_USED,
- STATE_BUSY
-};
-
-struct cell {
- pa_atomic_t state;
- void *data;
-};
-
struct pa_flist {
unsigned size;
pa_atomic_t length;
@@ -103,7 +84,7 @@ struct pa_flist {
pa_atomic_t write_idx;
};
-#define PA_FLIST_CELLS(x) ((struct cell*) ((uint8_t*) (x) + PA_ALIGN(sizeof(struct pa_flist))))
+#define PA_FLIST_CELLS(x) ((pa_atomic_ptr_t*) ((uint8_t*) (x) + PA_ALIGN(sizeof(struct pa_flist))))
pa_flist *pa_flist_new(unsigned size) {
pa_flist *l;
@@ -113,7 +94,7 @@ pa_flist *pa_flist_new(unsigned size) {
pa_assert(pa_is_power_of_two(size));
- l = pa_xmalloc0(PA_ALIGN(sizeof(pa_flist)) + (sizeof(struct cell) * size));
+ l = pa_xmalloc0(PA_ALIGN(sizeof(pa_flist)) + (sizeof(pa_atomic_ptr_t) * size));
l->size = size;
@@ -124,28 +105,24 @@ pa_flist *pa_flist_new(unsigned size) {
return l;
}
-static int reduce(pa_flist *l, int value) {
- return value & (unsigned) (l->size - 1);
+static unsigned reduce(pa_flist *l, unsigned value) {
+ return value & (l->size - 1);
}
void pa_flist_free(pa_flist *l, pa_free_cb_t free_cb) {
pa_assert(l);
if (free_cb) {
- struct cell *cells;
- int len, idx;
+ pa_atomic_ptr_t*cells;
+ unsigned idx;
cells = PA_FLIST_CELLS(l);
- idx = reduce(l, pa_atomic_load(&l->read_idx));
- len = pa_atomic_load(&l->length);
-
- for (; len > 0; len--) {
-
- if (pa_atomic_load(&cells[idx].state) == STATE_USED)
- free_cb(cells[idx].data);
+ for (idx = 0; idx < l->size; idx ++) {
+ void *p;
- idx = reduce(l, idx + 1);
+ if ((p = pa_atomic_ptr_load(&cells[idx])))
+ free_cb(p);
}
}
@@ -153,30 +130,31 @@ void pa_flist_free(pa_flist *l, pa_free_cb_t free_cb) {
}
int pa_flist_push(pa_flist*l, void *p) {
- int idx, len, n;
- struct cell *cells;
+ unsigned idx, n, len;
+ pa_atomic_ptr_t*cells;
pa_assert(l);
pa_assert(p);
cells = PA_FLIST_CELLS(l);
- n = len = (int) l->size - pa_atomic_load(&l->length) + N_EXTRA_SCAN;
+ n = len = l->size + N_EXTRA_SCAN - (unsigned) pa_atomic_load(&l->length);
+
_Y;
- idx = reduce(l, pa_atomic_load(&l->write_idx));
+ idx = reduce(l, (unsigned) pa_atomic_load(&l->write_idx));
for (; n > 0 ; n--) {
+
_Y;
- if (pa_atomic_cmpxchg(&cells[idx].state, STATE_UNUSED, STATE_BUSY)) {
+ if (pa_atomic_ptr_cmpxchg(&cells[idx], NULL, p)) {
+
_Y;
pa_atomic_inc(&l->write_idx);
- _Y;
- cells[idx].data = p;
- _Y;
- pa_atomic_store(&cells[idx].state, STATE_USED);
+
_Y;
pa_atomic_inc(&l->length);
+
return 0;
}
@@ -193,31 +171,36 @@ int pa_flist_push(pa_flist*l, void *p) {
}
void* pa_flist_pop(pa_flist*l) {
- int idx, len, n;
- struct cell *cells;
+ unsigned idx, len, n;
+ pa_atomic_ptr_t *cells;
pa_assert(l);
cells = PA_FLIST_CELLS(l);
- n = len = pa_atomic_load(&l->length) + N_EXTRA_SCAN;
+ n = len = (unsigned) pa_atomic_load(&l->length) + N_EXTRA_SCAN;
+
_Y;
- idx = reduce(l, pa_atomic_load(&l->read_idx));
+ idx = reduce(l, (unsigned) pa_atomic_load(&l->read_idx));
for (; n > 0 ; n--) {
+ void *p;
+
_Y;
+ p = pa_atomic_ptr_load(&cells[idx]);
+
+ if (p) {
- if (pa_atomic_cmpxchg(&cells[idx].state, STATE_USED, STATE_BUSY)) {
- void *p;
- _Y;
- pa_atomic_inc(&l->read_idx);
- _Y;
- p = cells[idx].data;
_Y;
- pa_atomic_store(&cells[idx].state, STATE_UNUSED);
+ if (!pa_atomic_ptr_cmpxchg(&cells[idx], p, NULL))
+ continue;
+
_Y;
+ pa_atomic_inc(&l->read_idx);
+ _Y;
pa_atomic_dec(&l->length);
+
return p;
}
diff --git a/src/pulsecore/flist.h b/src/pulsecore/flist.h
index 547c736..512dd35 100644
--- a/src/pulsecore/flist.h
+++ b/src/pulsecore/flist.h
@@ -1,12 +1,10 @@
#ifndef foopulseflisthfoo
#define foopulseflisthfoo
-/* $Id: flist.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2006 Lennart Poettering
+ Copyright 2006-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -25,9 +23,10 @@
***/
#include <pulse/def.h>
+#include <pulse/gccmacro.h>
#include <pulsecore/once.h>
-#include <pulsecore/gccmacro.h>
+#include <pulsecore/core-util.h>
/* A multiple-reader multipler-write lock-free free list implementation */
@@ -58,6 +57,8 @@ void* pa_flist_pop(pa_flist*l);
} \
static void name##_flist_destructor(void) PA_GCC_DESTRUCTOR; \
static void name##_flist_destructor(void) { \
+ if (!pa_in_valgrind()) \
+ return; \
if (name##_flist.flist) \
pa_flist_free(name##_flist.flist, (free_cb)); \
} \
diff --git a/src/pulsecore/hashmap.c b/src/pulsecore/hashmap.c
index 8dc42ae..3c6f41e 100644
--- a/src/pulsecore/hashmap.c
+++ b/src/pulsecore/hashmap.c
@@ -1,9 +1,7 @@
-/* $Id: hashmap.c 2192 2008-03-30 00:38:47Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -29,7 +27,6 @@
#include <string.h>
#include <pulse/xmalloc.h>
-
#include <pulsecore/idxset.h>
#include <pulsecore/log.h>
#include <pulsecore/flist.h>
@@ -37,37 +34,39 @@
#include "hashmap.h"
-#define BUCKETS 127
+#define NBUCKETS 127
struct hashmap_entry {
- struct hashmap_entry *next, *previous, *bucket_next, *bucket_previous;
- unsigned hash;
const void *key;
void *value;
+
+ struct hashmap_entry *bucket_next, *bucket_previous;
+ struct hashmap_entry *iterate_next, *iterate_previous;
};
struct pa_hashmap {
- unsigned size;
- struct hashmap_entry **data;
- struct hashmap_entry *first_entry;
-
- unsigned n_entries;
pa_hash_func_t hash_func;
pa_compare_func_t compare_func;
+
+ struct hashmap_entry *iterate_list_head, *iterate_list_tail;
+ unsigned n_entries;
};
+#define BY_HASH(h) ((struct hashmap_entry**) ((uint8_t*) (h) + PA_ALIGN(sizeof(pa_hashmap))))
+
PA_STATIC_FLIST_DECLARE(entries, 0, pa_xfree);
pa_hashmap *pa_hashmap_new(pa_hash_func_t hash_func, pa_compare_func_t compare_func) {
pa_hashmap *h;
- h = pa_xnew(pa_hashmap, 1);
- h->data = pa_xnew0(struct hashmap_entry*, h->size = BUCKETS);
- h->first_entry = NULL;
- h->n_entries = 0;
+ h = pa_xmalloc0(PA_ALIGN(sizeof(pa_hashmap)) + NBUCKETS*sizeof(struct hashmap_entry*));
+
h->hash_func = hash_func ? hash_func : pa_idxset_trivial_hash_func;
h->compare_func = compare_func ? compare_func : pa_idxset_trivial_compare_func;
+ h->n_entries = 0;
+ h->iterate_list_head = h->iterate_list_tail = NULL;
+
return h;
}
@@ -75,47 +74,56 @@ static void remove_entry(pa_hashmap *h, struct hashmap_entry *e) {
pa_assert(h);
pa_assert(e);
- if (e->next)
- e->next->previous = e->previous;
- if (e->previous)
- e->previous->next = e->next;
+ /* Remove from iteration list */
+ if (e->iterate_next)
+ e->iterate_next->iterate_previous = e->iterate_previous;
else
- h->first_entry = e->next;
+ h->iterate_list_tail = e->iterate_previous;
+ if (e->iterate_previous)
+ e->iterate_previous->iterate_next = e->iterate_next;
+ else
+ h->iterate_list_head = e->iterate_next;
+
+ /* Remove from hash table bucket list */
if (e->bucket_next)
e->bucket_next->bucket_previous = e->bucket_previous;
+
if (e->bucket_previous)
e->bucket_previous->bucket_next = e->bucket_next;
else {
- pa_assert(e->hash < h->size);
- h->data[e->hash] = e->bucket_next;
+ unsigned hash = h->hash_func(e->key) % NBUCKETS;
+ BY_HASH(h)[hash] = e->bucket_next;
}
if (pa_flist_push(PA_STATIC_FLIST_GET(entries), e) < 0)
pa_xfree(e);
+ pa_assert(h->n_entries >= 1);
h->n_entries--;
}
-void pa_hashmap_free(pa_hashmap*h, void (*free_func)(void *p, void *userdata), void *userdata) {
+void pa_hashmap_free(pa_hashmap*h, pa_free2_cb_t free_cb, void *userdata) {
pa_assert(h);
- while (h->first_entry) {
- if (free_func)
- free_func(h->first_entry->value, userdata);
- remove_entry(h, h->first_entry);
+ while (h->iterate_list_head) {
+ void *data;
+ data = h->iterate_list_head->value;
+ remove_entry(h, h->iterate_list_head);
+
+ if (free_cb)
+ free_cb(data, userdata);
}
- pa_xfree(h->data);
pa_xfree(h);
}
-static struct hashmap_entry *get(pa_hashmap *h, unsigned hash, const void *key) {
+static struct hashmap_entry *hash_scan(pa_hashmap *h, unsigned hash, const void *key) {
struct hashmap_entry *e;
pa_assert(h);
- pa_assert(hash < h->size);
+ pa_assert(hash < NBUCKETS);
- for (e = h->data[hash]; e; e = e->bucket_next)
+ for (e = BY_HASH(h)[hash]; e; e = e->bucket_next)
if (h->compare_func(e->key, key) == 0)
return e;
@@ -125,33 +133,42 @@ static struct hashmap_entry *get(pa_hashmap *h, unsigned hash, const void *key)
int pa_hashmap_put(pa_hashmap *h, const void *key, void *value) {
struct hashmap_entry *e;
unsigned hash;
+
pa_assert(h);
- hash = h->hash_func(key) % h->size;
+ hash = h->hash_func(key) % NBUCKETS;
- if ((e = get(h, hash, key)))
+ if ((e = hash_scan(h, hash, key)))
return -1;
if (!(e = pa_flist_pop(PA_STATIC_FLIST_GET(entries))))
e = pa_xnew(struct hashmap_entry, 1);
- e->hash = hash;
e->key = key;
e->value = value;
- e->previous = NULL;
- e->next = h->first_entry;
- if (h->first_entry)
- h->first_entry->previous = e;
- h->first_entry = e;
-
+ /* Insert into hash table */
+ e->bucket_next = BY_HASH(h)[hash];
e->bucket_previous = NULL;
- e->bucket_next = h->data[hash];
- if (h->data[hash])
- h->data[hash]->bucket_previous = e;
- h->data[hash] = e;
+ if (BY_HASH(h)[hash])
+ BY_HASH(h)[hash]->bucket_previous = e;
+ BY_HASH(h)[hash] = e;
+
+ /* Insert into iteration list */
+ e->iterate_previous = h->iterate_list_tail;
+ e->iterate_next = NULL;
+ if (h->iterate_list_tail) {
+ pa_assert(h->iterate_list_head);
+ h->iterate_list_tail->iterate_next = e;
+ } else {
+ pa_assert(!h->iterate_list_head);
+ h->iterate_list_head = e;
+ }
+ h->iterate_list_tail = e;
+
+ h->n_entries++;
+ pa_assert(h->n_entries >= 1);
- h->n_entries ++;
return 0;
}
@@ -161,9 +178,9 @@ void* pa_hashmap_get(pa_hashmap *h, const void *key) {
pa_assert(h);
- hash = h->hash_func(key) % h->size;
+ hash = h->hash_func(key) % NBUCKETS;
- if (!(e = get(h, hash, key)))
+ if (!(e = hash_scan(h, hash, key)))
return NULL;
return e->value;
@@ -176,39 +193,57 @@ void* pa_hashmap_remove(pa_hashmap *h, const void *key) {
pa_assert(h);
- hash = h->hash_func(key) % h->size;
+ hash = h->hash_func(key) % NBUCKETS;
- if (!(e = get(h, hash, key)))
+ if (!(e = hash_scan(h, hash, key)))
return NULL;
data = e->value;
remove_entry(h, e);
- return data;
-}
-unsigned pa_hashmap_size(pa_hashmap *h) {
- return h->n_entries;
+ return data;
}
void *pa_hashmap_iterate(pa_hashmap *h, void **state, const void **key) {
+ struct hashmap_entry *e;
+
pa_assert(h);
pa_assert(state);
- if (!*state)
- *state = h->first_entry;
+ if (*state == (void*) -1)
+ goto at_end;
+
+ if (!*state && !h->iterate_list_head)
+ goto at_end;
+
+ e = *state ? *state : h->iterate_list_head;
+
+ if (e->iterate_next)
+ *state = e->iterate_next;
else
- *state = ((struct hashmap_entry*) *state)->next;
+ *state = (void*) -1;
- if (!*state) {
- if (key)
- *key = NULL;
- return NULL;
- }
+ if (key)
+ *key = e->key;
+
+ return e->value;
+
+at_end:
+ *state = (void *) -1;
if (key)
- *key = ((struct hashmap_entry*) *state)->key;
+ *key = NULL;
- return ((struct hashmap_entry*) *state)->value;
+ return NULL;
+}
+
+void* pa_hashmap_first(pa_hashmap *h) {
+ pa_assert(h);
+
+ if (!h->iterate_list_head)
+ return NULL;
+
+ return h->iterate_list_head->value;
}
void* pa_hashmap_steal_first(pa_hashmap *h) {
@@ -216,19 +251,23 @@ void* pa_hashmap_steal_first(pa_hashmap *h) {
pa_assert(h);
- if (!h->first_entry)
+ if (!h->iterate_list_head)
return NULL;
- data = h->first_entry->value;
- remove_entry(h, h->first_entry);
+ data = h->iterate_list_head->value;
+ remove_entry(h, h->iterate_list_head);
+
return data;
}
-void *pa_hashmap_get_first(pa_hashmap *h) {
+unsigned pa_hashmap_size(pa_hashmap *h) {
pa_assert(h);
- if (!h->first_entry)
- return NULL;
+ return h->n_entries;
+}
+
+pa_bool_t pa_hashmap_isempty(pa_hashmap *h) {
+ pa_assert(h);
- return h->first_entry->value;
+ return h->n_entries == 0;
}
diff --git a/src/pulsecore/hashmap.h b/src/pulsecore/hashmap.h
index f010e20..70d78b7 100644
--- a/src/pulsecore/hashmap.h
+++ b/src/pulsecore/hashmap.h
@@ -1,12 +1,10 @@
-#ifndef foohashmaphfoo
-#define foohashmaphfoo
-
-/* $Id: hashmap.h 1971 2007-10-28 19:13:50Z lennart $ */
+#ifndef foopulsecorehashmaphfoo
+#define foopulsecorehashmaphfoo
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -32,32 +30,39 @@
typedef struct pa_hashmap pa_hashmap;
-typedef void (*pa_free2_cb_t)(void *p, void *userdata);
-
/* Create a new hashmap. Use the specified functions for hashing and comparing objects in the map */
pa_hashmap *pa_hashmap_new(pa_hash_func_t hash_func, pa_compare_func_t compare_func);
/* Free the hash table. Calls the specified function for every value in the table. The function may be NULL */
void pa_hashmap_free(pa_hashmap*, pa_free2_cb_t free_cb, void *userdata);
-/* Returns non-zero when the entry already exists */
+/* Add an entry to the hashmap. Returns non-zero when the entry already exists */
int pa_hashmap_put(pa_hashmap *h, const void *key, void *value);
+
+/* Return an entry from the hashmap */
void* pa_hashmap_get(pa_hashmap *h, const void *key);
/* Returns the data of the entry while removing */
void* pa_hashmap_remove(pa_hashmap *h, const void *key);
+/* Return the current number of entries of the hashmap */
unsigned pa_hashmap_size(pa_hashmap *h);
+/* Return TRUE if the hashmap is empty */
+pa_bool_t pa_hashmap_isempty(pa_hashmap *h);
+
/* May be used to iterate through the hashmap. Initially the opaque
pointer *state has to be set to NULL. The hashmap may not be
- modified during iteration. The key of the entry is returned in
- *key, if key is non-NULL. After the last entry in the hashmap NULL
- is returned. */
+ modified during iteration -- except for deleting the current entry
+ via pa_hashmap_remove(). The key of the entry is returned in *key,
+ if key is non-NULL. After the last entry in the hashmap NULL is
+ returned. */
void *pa_hashmap_iterate(pa_hashmap *h, void **state, const void**key);
+/* Remove the oldest entry in the hashmap and return it */
void *pa_hashmap_steal_first(pa_hashmap *h);
-void *pa_hashmap_get_first(pa_hashmap *h);
+/* Return the oldest entry in the hashmap */
+void* pa_hashmap_first(pa_hashmap *h);
#endif
diff --git a/src/pulsecore/hook-list.c b/src/pulsecore/hook-list.c
index b8ddca5..3969403 100644
--- a/src/pulsecore/hook-list.c
+++ b/src/pulsecore/hook-list.c
@@ -1,5 +1,3 @@
-/* $Id: hook-list.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,8 +31,7 @@ void pa_hook_init(pa_hook *hook, void *data) {
pa_assert(hook);
PA_LLIST_HEAD_INIT(pa_hook_slot, hook->slots);
- hook->last = NULL;
- hook->n_dead = hook->firing = 0;
+ hook->n_dead = hook->n_firing = 0;
hook->data = data;
}
@@ -42,17 +39,14 @@ static void slot_free(pa_hook *hook, pa_hook_slot *slot) {
pa_assert(hook);
pa_assert(slot);
- if (hook->last == slot)
- hook->last = slot->prev;
-
PA_LLIST_REMOVE(pa_hook_slot, hook->slots, slot);
pa_xfree(slot);
}
-void pa_hook_free(pa_hook *hook) {
+void pa_hook_done(pa_hook *hook) {
pa_assert(hook);
- pa_assert(!hook->firing);
+ pa_assert(hook->n_firing == 0);
while (hook->slots)
slot_free(hook, hook->slots);
@@ -60,19 +54,26 @@ void pa_hook_free(pa_hook *hook) {
pa_hook_init(hook, NULL);
}
-pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_cb_t cb, void *data) {
- pa_hook_slot *slot;
+pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_priority_t prio, pa_hook_cb_t cb, void *data) {
+ pa_hook_slot *slot, *where, *prev;
pa_assert(cb);
slot = pa_xnew(pa_hook_slot, 1);
slot->hook = hook;
- slot->dead = 0;
+ slot->dead = FALSE;
slot->callback = cb;
slot->data = data;
+ slot->priority = prio;
- PA_LLIST_INSERT_AFTER(pa_hook_slot, hook->slots, hook->last, slot);
- hook->last = slot;
+ prev = NULL;
+ for (where = hook->slots; where; where = where->next) {
+ if (prio < where->priority)
+ break;
+ prev = where;
+ }
+
+ PA_LLIST_INSERT_AFTER(pa_hook_slot, hook->slots, prev, slot);
return slot;
}
@@ -81,8 +82,8 @@ void pa_hook_slot_free(pa_hook_slot *slot) {
pa_assert(slot);
pa_assert(!slot->dead);
- if (slot->hook->firing > 0) {
- slot->dead = 1;
+ if (slot->hook->n_firing > 0) {
+ slot->dead = TRUE;
slot->hook->n_dead++;
} else
slot_free(slot->hook, slot);
@@ -94,7 +95,7 @@ pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data) {
pa_assert(hook);
- hook->firing ++;
+ hook->n_firing ++;
for (slot = hook->slots; slot; slot = slot->next) {
if (slot->dead)
@@ -104,7 +105,8 @@ pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data) {
break;
}
- hook->firing --;
+ hook->n_firing --;
+ pa_assert(hook->n_firing >= 0);
for (slot = hook->slots; hook->n_dead > 0 && slot; slot = next) {
next = slot->next;
@@ -115,6 +117,7 @@ pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data) {
}
}
+ pa_assert(hook->n_dead == 0);
+
return result;
}
-
diff --git a/src/pulsecore/hook-list.h b/src/pulsecore/hook-list.h
index 2cc5c95..de947ad 100644
--- a/src/pulsecore/hook-list.h
+++ b/src/pulsecore/hook-list.h
@@ -1,8 +1,6 @@
#ifndef foohooklistfoo
#define foohooklistfoo
-/* $Id: hook-list.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -24,9 +22,10 @@
USA.
***/
-#include <pulsecore/llist.h>
#include <pulse/xmalloc.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
+
+#include <pulsecore/llist.h>
typedef struct pa_hook_slot pa_hook_slot;
typedef struct pa_hook pa_hook;
@@ -37,14 +36,21 @@ typedef enum pa_hook_result {
PA_HOOK_CANCEL = -1
} pa_hook_result_t;
+typedef enum pa_hook_priority {
+ PA_HOOK_EARLY = -100,
+ PA_HOOK_NORMAL = 0,
+ PA_HOOK_LATE = 100
+} pa_hook_priority_t;
+
typedef pa_hook_result_t (*pa_hook_cb_t)(
void *hook_data,
void *call_data,
void *slot_data);
struct pa_hook_slot {
- int dead;
+ pa_bool_t dead;
pa_hook *hook;
+ pa_hook_priority_t priority;
pa_hook_cb_t callback;
void *data;
PA_LLIST_FIELDS(pa_hook_slot);
@@ -52,16 +58,15 @@ struct pa_hook_slot {
struct pa_hook {
PA_LLIST_HEAD(pa_hook_slot, slots);
- pa_hook_slot *last;
- int firing, n_dead;
+ int n_firing, n_dead;
void *data;
};
void pa_hook_init(pa_hook *hook, void *data);
-void pa_hook_free(pa_hook *hook);
+void pa_hook_done(pa_hook *hook);
-pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_cb_t, void *data);
+pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_priority_t prio, pa_hook_cb_t cb, void *data);
void pa_hook_slot_free(pa_hook_slot *slot);
pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data);
diff --git a/src/pulsecore/idxset.c b/src/pulsecore/idxset.c
index 5fde082..24a28db 100644
--- a/src/pulsecore/idxset.c
+++ b/src/pulsecore/idxset.c
@@ -1,9 +1,7 @@
-/* $Id: idxset.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio is free software; you can redistribute it and/or modify
@@ -31,29 +29,36 @@
#include <string.h>
#include <pulse/xmalloc.h>
-#include <pulsecore/macro.h>
+#include <pulsecore/log.h>
#include <pulsecore/flist.h>
+#include <pulsecore/macro.h>
#include "idxset.h"
+#define NBUCKETS 127
+
struct idxset_entry {
+ uint32_t idx;
void *data;
- uint32_t index;
- unsigned hash_value;
- struct idxset_entry *hash_prev, *hash_next;
- struct idxset_entry* iterate_prev, *iterate_next;
+ struct idxset_entry *data_next, *data_previous;
+ struct idxset_entry *index_next, *index_previous;
+ struct idxset_entry *iterate_next, *iterate_previous;
};
struct pa_idxset {
pa_hash_func_t hash_func;
pa_compare_func_t compare_func;
- unsigned hash_table_size, n_entries;
- struct idxset_entry **hash_table, **array, *iterate_list_head, *iterate_list_tail;
- uint32_t index, start_index, array_size;
+ uint32_t current_index;
+
+ struct idxset_entry *iterate_list_head, *iterate_list_tail;
+ unsigned n_entries;
};
+#define BY_DATA(i) ((struct idxset_entry**) ((uint8_t*) (i) + PA_ALIGN(sizeof(pa_idxset))))
+#define BY_INDEX(i) (BY_DATA(i) + NBUCKETS)
+
PA_STATIC_FLIST_DECLARE(entries, 0, pa_xfree);
unsigned pa_idxset_string_hash_func(const void *p) {
@@ -61,7 +66,7 @@ unsigned pa_idxset_string_hash_func(const void *p) {
const char *c;
for (c = p; *c; c++)
- hash = 31 * hash + *c;
+ hash = 31 * hash + (unsigned) *c;
return hash;
}
@@ -75,137 +80,146 @@ unsigned pa_idxset_trivial_hash_func(const void *p) {
}
int pa_idxset_trivial_compare_func(const void *a, const void *b) {
- return a != b;
+ return a < b ? -1 : (a > b ? 1 : 0);
}
pa_idxset* pa_idxset_new(pa_hash_func_t hash_func, pa_compare_func_t compare_func) {
pa_idxset *s;
- s = pa_xnew(pa_idxset, 1);
+ s = pa_xmalloc0(PA_ALIGN(sizeof(pa_idxset)) + NBUCKETS*2*sizeof(struct idxset_entry*));
+
s->hash_func = hash_func ? hash_func : pa_idxset_trivial_hash_func;
s->compare_func = compare_func ? compare_func : pa_idxset_trivial_compare_func;
- s->hash_table_size = 127;
- s->hash_table = pa_xnew0(struct idxset_entry*, s->hash_table_size);
- s->array = NULL;
- s->array_size = 0;
- s->index = 0;
- s->start_index = 0;
- s->n_entries = 0;
+ s->current_index = 0;
+ s->n_entries = 0;
s->iterate_list_head = s->iterate_list_tail = NULL;
return s;
}
-void pa_idxset_free(pa_idxset *s, void (*free_func) (void *p, void *userdata), void *userdata) {
+static void remove_entry(pa_idxset *s, struct idxset_entry *e) {
pa_assert(s);
+ pa_assert(e);
- while (s->iterate_list_head) {
- struct idxset_entry *e = s->iterate_list_head;
- s->iterate_list_head = s->iterate_list_head->iterate_next;
+ /* Remove from iteration linked list */
+ if (e->iterate_next)
+ e->iterate_next->iterate_previous = e->iterate_previous;
+ else
+ s->iterate_list_tail = e->iterate_previous;
- if (free_func)
- free_func(e->data, userdata);
+ if (e->iterate_previous)
+ e->iterate_previous->iterate_next = e->iterate_next;
+ else
+ s->iterate_list_head = e->iterate_next;
- if (pa_flist_push(PA_STATIC_FLIST_GET(entries), e) < 0)
- pa_xfree(e);
+ /* Remove from data hash table */
+ if (e->data_next)
+ e->data_next->data_previous = e->data_previous;
+
+ if (e->data_previous)
+ e->data_previous->data_next = e->data_next;
+ else {
+ unsigned hash = s->hash_func(e->data) % NBUCKETS;
+ BY_DATA(s)[hash] = e->data_next;
}
- pa_xfree(s->hash_table);
- pa_xfree(s->array);
- pa_xfree(s);
-}
+ /* Remove from index hash table */
+ if (e->index_next)
+ e->index_next->index_previous = e->index_previous;
-static struct idxset_entry* hash_scan(pa_idxset *s, struct idxset_entry* e, const void *p) {
- pa_assert(p);
+ if (e->index_previous)
+ e->index_previous->index_next = e->index_next;
+ else
+ BY_INDEX(s)[e->idx % NBUCKETS] = e->index_next;
- pa_assert(s->compare_func);
- for (; e; e = e->hash_next)
- if (s->compare_func(e->data, p) == 0)
- return e;
+ if (pa_flist_push(PA_STATIC_FLIST_GET(entries), e) < 0)
+ pa_xfree(e);
- return NULL;
+ pa_assert(s->n_entries >= 1);
+ s->n_entries--;
}
-static void extend_array(pa_idxset *s, uint32_t idx) {
- uint32_t i, j, l;
- struct idxset_entry** n;
-
+void pa_idxset_free(pa_idxset *s, pa_free2_cb_t free_cb, void *userdata) {
pa_assert(s);
- pa_assert(idx >= s->start_index);
- if (idx < s->start_index + s->array_size)
- return;
+ while (s->iterate_list_head) {
+ void *data = s->iterate_list_head->data;
- for (i = 0; i < s->array_size; i++)
- if (s->array[i])
- break;
+ remove_entry(s, s->iterate_list_head);
- l = idx - s->start_index - i + 100;
- n = pa_xnew0(struct idxset_entry*, l);
+ if (free_cb)
+ free_cb(data, userdata);
+ }
- for (j = 0; j < s->array_size-i; j++)
- n[j] = s->array[i+j];
+ pa_xfree(s);
+}
- pa_xfree(s->array);
+static struct idxset_entry* data_scan(pa_idxset *s, unsigned hash, const void *p) {
+ struct idxset_entry *e;
+ pa_assert(s);
+ pa_assert(hash < NBUCKETS);
+ pa_assert(p);
- s->array = n;
- s->array_size = l;
- s->start_index += i;
+ for (e = BY_DATA(s)[hash]; e; e = e->data_next)
+ if (s->compare_func(e->data, p) == 0)
+ return e;
+
+ return NULL;
}
-static struct idxset_entry** array_index(pa_idxset*s, uint32_t idx) {
+static struct idxset_entry* index_scan(pa_idxset *s, unsigned hash, uint32_t idx) {
+ struct idxset_entry *e;
pa_assert(s);
+ pa_assert(hash < NBUCKETS);
- if (idx >= s->start_index + s->array_size)
- return NULL;
-
- if (idx < s->start_index)
- return NULL;
+ for (e = BY_INDEX(s)[hash]; e; e = e->index_next)
+ if (e->idx == idx)
+ return e;
- return s->array + idx - s->start_index;
+ return NULL;
}
int pa_idxset_put(pa_idxset*s, void *p, uint32_t *idx) {
- unsigned h;
- struct idxset_entry *e, **a;
+ unsigned hash;
+ struct idxset_entry *e;
pa_assert(s);
- pa_assert(p);
- pa_assert(s->hash_func);
- h = s->hash_func(p) % s->hash_table_size;
+ hash = s->hash_func(p) % NBUCKETS;
- pa_assert(s->hash_table);
- if ((e = hash_scan(s, s->hash_table[h], p))) {
+ if ((e = data_scan(s, hash, p))) {
if (idx)
- *idx = e->index;
+ *idx = e->idx;
return -1;
}
if (!(e = pa_flist_pop(PA_STATIC_FLIST_GET(entries))))
e = pa_xnew(struct idxset_entry, 1);
+
e->data = p;
- e->index = s->index++;
- e->hash_value = h;
-
- /* Insert into hash table */
- e->hash_next = s->hash_table[h];
- e->hash_prev = NULL;
- if (s->hash_table[h])
- s->hash_table[h]->hash_prev = e;
- s->hash_table[h] = e;
-
- /* Insert into array */
- extend_array(s, e->index);
- a = array_index(s, e->index);
- pa_assert(a && !*a);
- *a = e;
-
- /* Insert into linked list */
+ e->idx = s->current_index++;
+
+ /* Insert into data hash table */
+ e->data_next = BY_DATA(s)[hash];
+ e->data_previous = NULL;
+ if (BY_DATA(s)[hash])
+ BY_DATA(s)[hash]->data_previous = e;
+ BY_DATA(s)[hash] = e;
+
+ hash = e->idx % NBUCKETS;
+
+ /* Insert into index hash table */
+ e->index_next = BY_INDEX(s)[hash];
+ e->index_previous = NULL;
+ if (BY_INDEX(s)[hash])
+ BY_INDEX(s)[hash]->index_previous = e;
+ BY_INDEX(s)[hash] = e;
+
+ /* Insert into iteration list */
+ e->iterate_previous = s->iterate_list_tail;
e->iterate_next = NULL;
- e->iterate_prev = s->iterate_list_tail;
if (s->iterate_list_tail) {
pa_assert(s->iterate_list_head);
s->iterate_list_tail->iterate_next = e;
@@ -219,117 +233,76 @@ int pa_idxset_put(pa_idxset*s, void *p, uint32_t *idx) {
pa_assert(s->n_entries >= 1);
if (idx)
- *idx = e->index;
+ *idx = e->idx;
return 0;
}
void* pa_idxset_get_by_index(pa_idxset*s, uint32_t idx) {
- struct idxset_entry **a;
+ unsigned hash;
+ struct idxset_entry *e;
+
pa_assert(s);
- if (!(a = array_index(s, idx)))
- return NULL;
+ hash = idx % NBUCKETS;
- if (!*a)
+ if (!(e = index_scan(s, hash, idx)))
return NULL;
- return (*a)->data;
+ return e->data;
}
void* pa_idxset_get_by_data(pa_idxset*s, const void *p, uint32_t *idx) {
- unsigned h;
+ unsigned hash;
struct idxset_entry *e;
pa_assert(s);
- pa_assert(p);
- pa_assert(s->hash_func);
- h = s->hash_func(p) % s->hash_table_size;
+ hash = s->hash_func(p) % NBUCKETS;
- pa_assert(s->hash_table);
- if (!(e = hash_scan(s, s->hash_table[h], p)))
+ if (!(e = data_scan(s, hash, p)))
return NULL;
if (idx)
- *idx = e->index;
+ *idx = e->idx;
return e->data;
}
-static void remove_entry(pa_idxset *s, struct idxset_entry *e) {
- struct idxset_entry **a;
-
- pa_assert(s);
- pa_assert(e);
-
- /* Remove from array */
- a = array_index(s, e->index);
- pa_assert(a && *a && *a == e);
- *a = NULL;
-
- /* Remove from linked list */
- if (e->iterate_next)
- e->iterate_next->iterate_prev = e->iterate_prev;
- else
- s->iterate_list_tail = e->iterate_prev;
-
- if (e->iterate_prev)
- e->iterate_prev->iterate_next = e->iterate_next;
- else
- s->iterate_list_head = e->iterate_next;
-
- /* Remove from hash table */
- if (e->hash_next)
- e->hash_next->hash_prev = e->hash_prev;
-
- if (e->hash_prev)
- e->hash_prev->hash_next = e->hash_next;
- else
- s->hash_table[e->hash_value] = e->hash_next;
-
- if (pa_flist_push(PA_STATIC_FLIST_GET(entries), e) < 0)
- pa_xfree(e);
-
- pa_assert(s->n_entries >= 1);
- s->n_entries--;
-}
-
void* pa_idxset_remove_by_index(pa_idxset*s, uint32_t idx) {
- struct idxset_entry **a;
+ struct idxset_entry *e;
+ unsigned hash;
void *data;
pa_assert(s);
- if (!(a = array_index(s, idx)))
- return NULL;
+ hash = idx % NBUCKETS;
- if (!*a)
+ if (!(e = index_scan(s, hash, idx)))
return NULL;
- data = (*a)->data;
- remove_entry(s, *a);
+ data = e->data;
+ remove_entry(s, e);
return data;
}
void* pa_idxset_remove_by_data(pa_idxset*s, const void *data, uint32_t *idx) {
struct idxset_entry *e;
- unsigned h;
+ unsigned hash;
void *r;
pa_assert(s);
- pa_assert(s->hash_func);
- h = s->hash_func(data) % s->hash_table_size;
+ hash = s->hash_func(data) % NBUCKETS;
- pa_assert(s->hash_table);
- if (!(e = hash_scan(s, s->hash_table[h], data)))
+ if (!(e = data_scan(s, hash, data)))
return NULL;
r = e->data;
+
if (idx)
- *idx = e->index;
+ *idx = e->idx;
remove_entry(s, e);
@@ -337,76 +310,112 @@ void* pa_idxset_remove_by_data(pa_idxset*s, const void *data, uint32_t *idx) {
}
void* pa_idxset_rrobin(pa_idxset *s, uint32_t *idx) {
- struct idxset_entry **a, *e = NULL;
+ unsigned hash;
+ struct idxset_entry *e;
pa_assert(s);
pa_assert(idx);
- if ((a = array_index(s, *idx)) && *a)
- e = (*a)->iterate_next;
+ hash = *idx % NBUCKETS;
- if (!e)
+ e = index_scan(s, hash, *idx);
+
+ if (e && e->iterate_next)
+ e = e->iterate_next;
+ else
e = s->iterate_list_head;
if (!e)
return NULL;
- *idx = e->index;
+ *idx = e->idx;
return e->data;
}
-void* pa_idxset_first(pa_idxset *s, uint32_t *idx) {
+void *pa_idxset_iterate(pa_idxset *s, void **state, uint32_t *idx) {
+ struct idxset_entry *e;
+
pa_assert(s);
+ pa_assert(state);
- if (!s->iterate_list_head)
- return NULL;
+ if (*state == (void*) -1)
+ goto at_end;
+
+ if ((!*state && !s->iterate_list_head))
+ goto at_end;
+
+ e = *state ? *state : s->iterate_list_head;
+
+ if (e->iterate_next)
+ *state = e->iterate_next;
+ else
+ *state = (void*) -1;
if (idx)
- *idx = s->iterate_list_head->index;
- return s->iterate_list_head->data;
+ *idx = e->idx;
+
+ return e->data;
+
+at_end:
+ *state = (void *) -1;
+
+ if (idx)
+ *idx = PA_IDXSET_INVALID;
+
+ return NULL;
}
-void *pa_idxset_next(pa_idxset *s, uint32_t *idx) {
- struct idxset_entry **a, *e = NULL;
+void* pa_idxset_steal_first(pa_idxset *s, uint32_t *idx) {
+ void *data;
pa_assert(s);
- pa_assert(idx);
- if ((a = array_index(s, *idx)) && *a)
- e = (*a)->iterate_next;
+ if (!s->iterate_list_head)
+ return NULL;
- if (e) {
- *idx = e->index;
- return e->data;
- } else {
- *idx = PA_IDXSET_INVALID;
+ data = s->iterate_list_head->data;
+
+ if (idx)
+ *idx = s->iterate_list_head->idx;
+
+ remove_entry(s, s->iterate_list_head);
+
+ return data;
+}
+
+void* pa_idxset_first(pa_idxset *s, uint32_t *idx) {
+ pa_assert(s);
+
+ if (!s->iterate_list_head)
return NULL;
- }
+
+ if (idx)
+ *idx = s->iterate_list_head->idx;
+
+ return s->iterate_list_head->data;
}
-int pa_idxset_foreach(pa_idxset*s, int (*func)(void *p, uint32_t idx, int *del, void*userdata), void *userdata) {
+void *pa_idxset_next(pa_idxset *s, uint32_t *idx) {
struct idxset_entry *e;
+ unsigned hash;
pa_assert(s);
- pa_assert(func);
-
- e = s->iterate_list_head;
- while (e) {
- int del = 0, r;
- struct idxset_entry *n = e->iterate_next;
-
- r = func(e->data, e->index, &del, userdata);
+ pa_assert(idx);
- if (del)
- remove_entry(s, e);
+ hash = *idx % NBUCKETS;
- if (r < 0)
- return r;
+ if (!(e = index_scan(s, hash, *idx)))
+ return NULL;
- e = n;
+ if (!e->iterate_next) {
+ *idx = PA_IDXSET_INVALID;
+ return NULL;
}
- return 0;
+ e = e->iterate_next;
+
+ *idx = e->idx;
+ return e->data;
}
unsigned pa_idxset_size(pa_idxset*s) {
@@ -415,9 +424,8 @@ unsigned pa_idxset_size(pa_idxset*s) {
return s->n_entries;
}
-int pa_idxset_isempty(pa_idxset *s) {
+pa_bool_t pa_idxset_isempty(pa_idxset *s) {
pa_assert(s);
return s->n_entries == 0;
}
-
diff --git a/src/pulsecore/idxset.h b/src/pulsecore/idxset.h
index b152206..7531ea3 100644
--- a/src/pulsecore/idxset.h
+++ b/src/pulsecore/idxset.h
@@ -1,12 +1,10 @@
-#ifndef fooidxsethfoo
-#define fooidxsethfoo
-
-/* $Id: idxset.h 1971 2007-10-28 19:13:50Z lennart $ */
+#ifndef foopulsecoreidxsethfoo
+#define foopulsecoreidxsethfoo
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio is free software; you can redistribute it and/or modify
@@ -27,13 +25,19 @@
#include <inttypes.h>
+#include <pulsecore/macro.h>
+
/* A combination of a set and a dynamic array. Entries are indexable
- * both through a numeric automatically generated index and the entry's
- * data pointer. As usual, memory management is the user's job. */
+ * both through an automatically generated numeric index and the
+ * entry's data pointer. As usual, memory management is the user's
+ * job. */
/* A special index value denoting the invalid index. */
#define PA_IDXSET_INVALID ((uint32_t) -1)
+/* Similar to pa_free_cb_t, but takes a userdata argument */
+typedef void (*pa_free2_cb_t)(void *p, void *userdata);
+
/* Generic implementations for hash and comparison functions. Just
* compares the pointer or calculates the hash value directly from the
* pointer value. */
@@ -53,7 +57,7 @@ typedef struct pa_idxset pa_idxset;
pa_idxset* pa_idxset_new(pa_hash_func_t hash_func, pa_compare_func_t compare_func);
/* Free the idxset. When the idxset is not empty the specified function is called for every entry contained */
-void pa_idxset_free(pa_idxset *s, void (*free_func) (void *p, void *userdata), void *userdata);
+void pa_idxset_free(pa_idxset *s, pa_free2_cb_t free_cb, void *userdata);
/* Store a new item in the idxset. The index of the item is returned in *idx */
int pa_idxset_put(pa_idxset*s, void *p, uint32_t *idx);
@@ -78,6 +82,12 @@ void* pa_idxset_remove_by_data(pa_idxset*s, const void *p, uint32_t *idx);
returned before the an entry is returned the second time.*/
void* pa_idxset_rrobin(pa_idxset *s, uint32_t *idx);
+/* Iterate through the idxset. At first iteration state should be NULL */
+void *pa_idxset_iterate(pa_idxset *s, void **state, uint32_t *idx);
+
+/* Return the oldest entry in the idxset and remove it. If idx is not NULL fill in its index in *idx */
+void* pa_idxset_steal_first(pa_idxset *s, uint32_t *idx);
+
/* Return the oldest entry in the idxset. Fill in its index in *idx. */
void* pa_idxset_first(pa_idxset *s, uint32_t *idx);
@@ -87,14 +97,10 @@ void* pa_idxset_first(pa_idxset *s, uint32_t *idx);
* iterate through the set.*/
void *pa_idxset_next(pa_idxset *s, uint32_t *idx);
-/* Call a function for every item in the set. If the callback function
- returns -1, the loop is terminated. If *del is set to non-zero that
- specific item is removed. It is not safe to call any other
- functions on the idxset while pa_idxset_foreach is executed. */
-int pa_idxset_foreach(pa_idxset*s, int (*func)(void *p, uint32_t idx, int *del, void*userdata), void *userdata);
-
+/* Return the current number of entries in the idxset */
unsigned pa_idxset_size(pa_idxset*s);
-int pa_idxset_isempty(pa_idxset *s);
+/* Return TRUE of the idxset is empty */
+pa_bool_t pa_idxset_isempty(pa_idxset *s);
#endif
diff --git a/src/pulsecore/inet_ntop.c b/src/pulsecore/inet_ntop.c
index c8621f8..8755123 100644
--- a/src/pulsecore/inet_ntop.c
+++ b/src/pulsecore/inet_ntop.c
@@ -1,5 +1,3 @@
-/* $Id: inet_ntop.c 1986 2007-10-29 20:32:53Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/inet_pton.c b/src/pulsecore/inet_pton.c
index 739cf4c..d191e55 100644
--- a/src/pulsecore/inet_pton.c
+++ b/src/pulsecore/inet_pton.c
@@ -1,5 +1,3 @@
-/* $Id: inet_pton.c 1986 2007-10-29 20:32:53Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
index b4cff26..b40c981 100644
--- a/src/pulsecore/iochannel.c
+++ b/src/pulsecore/iochannel.c
@@ -1,5 +1,3 @@
-/* $Id: iochannel.c 2022 2007-11-04 16:51:26Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -424,3 +422,16 @@ int pa_iochannel_get_send_fd(pa_iochannel *io) {
return io->ofd;
}
+
+pa_bool_t pa_iochannel_socket_is_local(pa_iochannel *io) {
+ pa_assert(io);
+
+ if (pa_socket_is_local(io->ifd))
+ return TRUE;
+
+ if (io->ifd != io->ofd)
+ if (pa_socket_is_local(io->ofd))
+ return TRUE;
+
+ return FALSE;
+}
diff --git a/src/pulsecore/iochannel.h b/src/pulsecore/iochannel.h
index 36ec8db..9050df9 100644
--- a/src/pulsecore/iochannel.h
+++ b/src/pulsecore/iochannel.h
@@ -1,8 +1,6 @@
#ifndef fooiochannelhfoo
#define fooiochannelhfoo
-/* $Id: iochannel.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -85,6 +83,8 @@ void pa_iochannel_socket_peer_to_string(pa_iochannel*io, char*s, size_t l);
int pa_iochannel_socket_set_rcvbuf(pa_iochannel*io, size_t l);
int pa_iochannel_socket_set_sndbuf(pa_iochannel*io, size_t l);
+pa_bool_t pa_iochannel_socket_is_local(pa_iochannel *io);
+
pa_mainloop_api* pa_iochannel_get_mainloop_api(pa_iochannel *io);
int pa_iochannel_get_recv_fd(pa_iochannel *io);
diff --git a/src/pulsecore/ioline.c b/src/pulsecore/ioline.c
index 21fd8fb..88174c0 100644
--- a/src/pulsecore/ioline.c
+++ b/src/pulsecore/ioline.c
@@ -1,5 +1,3 @@
-/* $Id: ioline.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -49,7 +47,6 @@ struct pa_ioline {
pa_iochannel *io;
pa_defer_event *defer_event;
pa_mainloop_api *mainloop;
- int dead;
char *wbuf;
size_t wbuf_length, wbuf_index, wbuf_valid_length;
@@ -57,10 +54,11 @@ struct pa_ioline {
char *rbuf;
size_t rbuf_length, rbuf_index, rbuf_valid_length;
- void (*callback)(pa_ioline*io, const char *s, void *userdata);
+ pa_ioline_cb_t callback;
void *userdata;
- int defer_close;
+ pa_bool_t dead:1;
+ pa_bool_t defer_close:1;
};
static void io_callback(pa_iochannel*io, void *userdata);
@@ -73,7 +71,6 @@ pa_ioline* pa_ioline_new(pa_iochannel *io) {
l = pa_xnew(pa_ioline, 1);
PA_REFCNT_INIT(l);
l->io = io;
- l->dead = 0;
l->wbuf = NULL;
l->wbuf_length = l->wbuf_index = l->wbuf_valid_length = 0;
@@ -89,7 +86,8 @@ pa_ioline* pa_ioline_new(pa_iochannel *io) {
l->defer_event = l->mainloop->defer_new(l->mainloop, defer_callback, l);
l->mainloop->defer_enable(l->defer_event, 0);
- l->defer_close = 0;
+ l->dead = FALSE;
+ l->defer_close = FALSE;
pa_iochannel_set_callback(io, io_callback, l);
@@ -130,7 +128,7 @@ void pa_ioline_close(pa_ioline *l) {
pa_assert(l);
pa_assert(PA_REFCNT_VALUE(l) >= 1);
- l->dead = 1;
+ l->dead = TRUE;
if (l->io) {
pa_iochannel_free(l->io);
@@ -166,11 +164,13 @@ void pa_ioline_puts(pa_ioline *l, const char *c) {
/* In case the allocated buffer is too small, enlarge it. */
if (l->wbuf_valid_length + len > l->wbuf_length) {
size_t n = l->wbuf_valid_length+len;
- char *new = pa_xmalloc(n);
+ char *new = pa_xnew(char, (unsigned) n);
+
if (l->wbuf) {
memcpy(new, l->wbuf+l->wbuf_index, l->wbuf_valid_length);
pa_xfree(l->wbuf);
}
+
l->wbuf = new;
l->wbuf_length = n;
l->wbuf_index = 0;
@@ -191,15 +191,18 @@ void pa_ioline_puts(pa_ioline *l, const char *c) {
}
}
-void pa_ioline_set_callback(pa_ioline*l, void (*callback)(pa_ioline*io, const char *s, void *userdata), void *userdata) {
+void pa_ioline_set_callback(pa_ioline*l, pa_ioline_cb_t callback, void *userdata) {
pa_assert(l);
pa_assert(PA_REFCNT_VALUE(l) >= 1);
+ if (l->dead)
+ return;
+
l->callback = callback;
l->userdata = userdata;
}
-static void failure(pa_ioline *l, int process_leftover) {
+static void failure(pa_ioline *l, pa_bool_t process_leftover) {
pa_assert(l);
pa_assert(PA_REFCNT_VALUE(l) >= 1);
pa_assert(!l->dead);
@@ -247,7 +250,7 @@ static void scan_for_lines(pa_ioline *l, size_t skip) {
l->rbuf_index = 0;
if (l->callback)
- l->callback(l, p, l->userdata);
+ l->callback(l, pa_strip_nl(p), l->userdata);
skip = 0;
}
@@ -282,7 +285,7 @@ static int do_read(pa_ioline *l) {
memmove(l->rbuf, l->rbuf+l->rbuf_index, l->rbuf_valid_length);
} else {
/* Enlarge the buffer */
- char *new = pa_xmalloc(n);
+ char *new = pa_xnew(char, (unsigned) n);
if (l->rbuf_valid_length)
memcpy(new, l->rbuf+l->rbuf_index, l->rbuf_valid_length);
pa_xfree(l->rbuf);
@@ -299,19 +302,23 @@ static int do_read(pa_ioline *l) {
/* Read some data */
if ((r = pa_iochannel_read(l->io, l->rbuf+l->rbuf_index+l->rbuf_valid_length, len)) <= 0) {
+
+ if (r < 0 && errno == EAGAIN)
+ return 0;
+
if (r < 0 && errno != ECONNRESET) {
pa_log("read(): %s", pa_cstrerror(errno));
- failure(l, 0);
+ failure(l, FALSE);
} else
- failure(l, 1);
+ failure(l, TRUE);
return -1;
}
- l->rbuf_valid_length += r;
+ l->rbuf_valid_length += (size_t) r;
/* Look if a line has been terminated in the newly read data */
- scan_for_lines(l, l->rbuf_valid_length - r);
+ scan_for_lines(l, l->rbuf_valid_length - (size_t) r);
}
return 0;
@@ -328,16 +335,19 @@ static int do_write(pa_ioline *l) {
if ((r = pa_iochannel_write(l->io, l->wbuf+l->wbuf_index, l->wbuf_valid_length)) <= 0) {
+ if (r < 0 && errno == EAGAIN)
+ return 0;
+
if (r < 0 && errno != EPIPE)
pa_log("write(): %s", pa_cstrerror(errno));
- failure(l, 0);
+ failure(l, FALSE);
return -1;
}
- l->wbuf_index += r;
- l->wbuf_valid_length -= r;
+ l->wbuf_index += (size_t) r;
+ l->wbuf_valid_length -= (size_t) r;
/* A shortcut for the next time */
if (l->wbuf_valid_length == 0)
@@ -363,7 +373,7 @@ static void do_work(pa_ioline *l) {
do_write(l);
if (l->defer_close && !l->wbuf_valid_length)
- failure(l, 1);
+ failure(l, TRUE);
pa_ioline_unref(l);
}
@@ -393,7 +403,7 @@ void pa_ioline_defer_close(pa_ioline *l) {
pa_assert(l);
pa_assert(PA_REFCNT_VALUE(l) >= 1);
- l->defer_close = 1;
+ l->defer_close = TRUE;
if (!l->wbuf_valid_length)
l->mainloop->defer_enable(l->defer_event, 1);
diff --git a/src/pulsecore/ioline.h b/src/pulsecore/ioline.h
index 304549e..b9a3d9f 100644
--- a/src/pulsecore/ioline.h
+++ b/src/pulsecore/ioline.h
@@ -1,8 +1,6 @@
#ifndef fooiolinehfoo
#define fooiolinehfoo
-/* $Id: ioline.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -33,6 +31,8 @@
typedef struct pa_ioline pa_ioline;
+typedef void (*pa_ioline_cb_t)(pa_ioline*io, const char *s, void *userdata);
+
pa_ioline* pa_ioline_new(pa_iochannel *io);
void pa_ioline_unref(pa_ioline *l);
pa_ioline* pa_ioline_ref(pa_ioline *l);
@@ -45,7 +45,7 @@ void pa_ioline_puts(pa_ioline *s, const char *c);
void pa_ioline_printf(pa_ioline *s, const char *format, ...) PA_GCC_PRINTF_ATTR(2,3);
/* Set the callback function that is called for every recieved line */
-void pa_ioline_set_callback(pa_ioline*io, void (*callback)(pa_ioline*io, const char *s, void *userdata), void *userdata);
+void pa_ioline_set_callback(pa_ioline*io, pa_ioline_cb_t callback, void *userdata);
/* Make sure to close the ioline object as soon as the send buffer is emptied */
void pa_ioline_defer_close(pa_ioline *io);
diff --git a/src/pulsecore/ipacl.c b/src/pulsecore/ipacl.c
index 329b94e..6d5080f 100644
--- a/src/pulsecore/ipacl.c
+++ b/src/pulsecore/ipacl.c
@@ -1,5 +1,3 @@
-/* $Id: ipacl.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -124,7 +122,7 @@ pa_ip_acl* pa_ip_acl_new(const char *s) {
if (e.bits < 128) {
int t = 0, i;
- for (i = 0, bits = e.bits; i < 16; i++) {
+ for (i = 0, bits = (uint32_t) e.bits; i < 16; i++) {
if (bits >= 8)
bits -= 8;
diff --git a/src/pulsecore/ipacl.h b/src/pulsecore/ipacl.h
index 030cc3c..7b7ffa6 100644
--- a/src/pulsecore/ipacl.h
+++ b/src/pulsecore/ipacl.h
@@ -1,8 +1,6 @@
#ifndef fooparseaddrhfoo
#define fooparseaddrhfoo
-/* $Id: ipacl.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/llist.h b/src/pulsecore/llist.h
index ac3c27c..46b54eb 100644
--- a/src/pulsecore/llist.h
+++ b/src/pulsecore/llist.h
@@ -1,8 +1,6 @@
#ifndef foollistfoo
#define foollistfoo
-/* $Id: llist.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/lock-autospawn.c b/src/pulsecore/lock-autospawn.c
new file mode 100644
index 0000000..d36b669
--- /dev/null
+++ b/src/pulsecore/lock-autospawn.c
@@ -0,0 +1,330 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/poll.h>
+#include <signal.h>
+#include <pthread.h>
+
+#include <pulse/i18n.h>
+#include <pulse/xmalloc.h>
+
+#include <pulsecore/mutex.h>
+#include <pulsecore/thread.h>
+#include <pulsecore/core-util.h>
+
+#include "lock-autospawn.h"
+
+/* So, why do we have this complex code here with threads and pipes
+ * and stuff? For two reasons: POSIX file locks are per-process, not
+ * per-file descriptor. That means that two contexts within the same
+ * process that try to create the autospawn lock might end up assuming
+ * they both managed to lock the file. And then, POSIX locking
+ * operations are synchronous. If two contexts run from the same event
+ * loop it must be made sure that they do not block each other, but
+ * that the locking operation can happen asynchronously. */
+
+#define AUTOSPAWN_LOCK "autospawn.lock"
+
+static pa_mutex *mutex;
+
+static unsigned n_ref = 0;
+static int lock_fd = -1;
+static pa_mutex *lock_fd_mutex = NULL;
+static pa_bool_t taken = FALSE;
+static pa_thread *thread;
+static int pipe_fd[2] = { -1, -1 };
+
+static void destroy_mutex(void) PA_GCC_DESTRUCTOR;
+
+static int ref(void) {
+
+ if (n_ref > 0) {
+
+ pa_assert(pipe_fd[0] >= 0);
+ pa_assert(pipe_fd[1] >= 0);
+
+ n_ref++;
+
+ return 0;
+ }
+
+ pa_assert(lock_fd < 0);
+ pa_assert(!lock_fd_mutex);
+ pa_assert(!taken);
+ pa_assert(!thread);
+ pa_assert(pipe_fd[0] < 0);
+ pa_assert(pipe_fd[1] < 0);
+
+ if (pipe(pipe_fd) < 0)
+ return -1;
+
+ lock_fd_mutex = pa_mutex_new(FALSE, FALSE);
+
+ pa_make_fd_cloexec(pipe_fd[0]);
+ pa_make_fd_cloexec(pipe_fd[1]);
+
+ pa_make_fd_nonblock(pipe_fd[1]);
+ pa_make_fd_nonblock(pipe_fd[0]);
+
+ n_ref = 1;
+ return 0;
+}
+
+static void unref(pa_bool_t after_fork) {
+
+ pa_assert(n_ref > 0);
+ pa_assert(pipe_fd[0] >= 0);
+ pa_assert(pipe_fd[1] >= 0);
+ pa_assert(lock_fd_mutex);
+
+ n_ref--;
+
+ if (n_ref > 0)
+ return;
+
+ pa_assert(!taken);
+
+ if (thread) {
+ pa_thread_free(thread);
+ thread = NULL;
+ }
+
+ pa_mutex_lock(lock_fd_mutex);
+ if (lock_fd >= 0) {
+
+ if (after_fork)
+ pa_close(lock_fd);
+ else {
+ char *lf;
+
+ if (!(lf = pa_runtime_path(AUTOSPAWN_LOCK)))
+ pa_log_warn(_("Cannot access autospawn lock."));
+
+ pa_unlock_lockfile(lf, lock_fd);
+ pa_xfree(lf);
+
+ lock_fd = -1;
+ }
+ }
+ pa_mutex_unlock(lock_fd_mutex);
+
+ pa_mutex_free(lock_fd_mutex);
+ lock_fd_mutex = NULL;
+
+ pa_close(pipe_fd[0]);
+ pa_close(pipe_fd[1]);
+ pipe_fd[0] = pipe_fd[1] = -1;
+}
+
+static void ping(void) {
+ ssize_t s;
+
+ pa_assert(pipe_fd[1] >= 0);
+
+ for (;;) {
+ char x = 'x';
+
+ if ((s = write(pipe_fd[1], &x, 1)) == 1)
+ break;
+
+ pa_assert(s < 0);
+
+ if (errno == EAGAIN)
+ break;
+
+ pa_assert(errno == EINTR);
+ }
+}
+
+static void wait_for_ping(void) {
+ ssize_t s;
+ char x;
+ struct pollfd pfd;
+ int k;
+
+ pa_assert(pipe_fd[0] >= 0);
+
+ memset(&pfd, 0, sizeof(pfd));
+ pfd.fd = pipe_fd[0];
+ pfd.events = POLLIN;
+
+ if ((k = poll(&pfd, 1, -1)) != 1) {
+ pa_assert(k < 0);
+ pa_assert(errno == EINTR);
+ } else if ((s = read(pipe_fd[0], &x, 1)) != 1) {
+ pa_assert(s < 0);
+ pa_assert(errno == EAGAIN);
+ }
+}
+
+static void empty_pipe(void) {
+ char x[16];
+ ssize_t s;
+
+ pa_assert(pipe_fd[0] >= 0);
+
+ if ((s = read(pipe_fd[0], &x, sizeof(x))) < 1) {
+ pa_assert(s < 0);
+ pa_assert(errno == EAGAIN);
+ }
+}
+
+static void thread_func(void *u) {
+ int fd;
+ char *lf;
+ sigset_t fullset;
+
+ /* No signals in this thread please */
+ sigfillset(&fullset);
+ pthread_sigmask(SIG_BLOCK, &fullset, NULL);
+
+ if (!(lf = pa_runtime_path(AUTOSPAWN_LOCK))) {
+ pa_log_warn(_("Cannot access autospawn lock."));
+ goto finish;
+ }
+
+ if ((fd = pa_lock_lockfile(lf)) < 0)
+ goto finish;
+
+ pa_mutex_lock(lock_fd_mutex);
+ pa_assert(lock_fd < 0);
+ lock_fd = fd;
+ pa_mutex_unlock(lock_fd_mutex);
+
+finish:
+ pa_xfree(lf);
+
+ ping();
+}
+
+static int start_thread(void) {
+
+ if (!thread)
+ if (!(thread = pa_thread_new(thread_func, NULL)))
+ return -1;
+
+ return 0;
+}
+
+static void create_mutex(void) {
+ PA_ONCE_BEGIN {
+ mutex = pa_mutex_new(FALSE, FALSE);
+ } PA_ONCE_END;
+}
+
+static void destroy_mutex(void) {
+
+ if (mutex)
+ pa_mutex_free(mutex);
+}
+
+
+int pa_autospawn_lock_init(void) {
+ int ret = -1;
+
+ create_mutex();
+ pa_mutex_lock(mutex);
+
+ if (ref() < 0)
+ ret = -1;
+ else
+ ret = pipe_fd[0];
+
+ pa_mutex_unlock(mutex);
+
+ return ret;
+}
+
+int pa_autospawn_lock_acquire(pa_bool_t block) {
+ int ret = -1;
+
+ create_mutex();
+ pa_mutex_lock(mutex);
+ pa_assert(n_ref >= 1);
+
+ pa_mutex_lock(lock_fd_mutex);
+
+ for (;;) {
+
+ empty_pipe();
+
+ if (lock_fd >= 0 && !taken) {
+ taken = TRUE;
+ ret = 1;
+ break;
+ }
+
+ if (lock_fd < 0)
+ if (start_thread() < 0)
+ break;
+
+ if (!block) {
+ ret = 0;
+ break;
+ }
+
+ pa_mutex_unlock(lock_fd_mutex);
+ pa_mutex_unlock(mutex);
+
+ wait_for_ping();
+
+ pa_mutex_lock(mutex);
+ pa_mutex_lock(lock_fd_mutex);
+ }
+
+ pa_mutex_unlock(lock_fd_mutex);
+
+ pa_mutex_unlock(mutex);
+
+ return ret;
+}
+
+void pa_autospawn_lock_release(void) {
+
+ create_mutex();
+ pa_mutex_lock(mutex);
+ pa_assert(n_ref >= 1);
+
+ pa_assert(taken);
+ taken = FALSE;
+
+ ping();
+
+ pa_mutex_unlock(mutex);
+}
+
+void pa_autospawn_lock_done(pa_bool_t after_fork) {
+
+ create_mutex();
+ pa_mutex_lock(mutex);
+ pa_assert(n_ref >= 1);
+
+ unref(after_fork);
+
+ pa_mutex_unlock(mutex);
+}
diff --git a/src/pulsecore/lock-autospawn.h b/src/pulsecore/lock-autospawn.h
new file mode 100644
index 0000000..c04c4bd
--- /dev/null
+++ b/src/pulsecore/lock-autospawn.h
@@ -0,0 +1,32 @@
+#ifndef foopulselockautospawnhfoo
+#define foopulselockautospawnhfoo
+
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#include <pulsecore/macro.h>
+
+int pa_autospawn_lock_init(void);
+int pa_autospawn_lock_acquire(pa_bool_t block);
+void pa_autospawn_lock_release(void);
+void pa_autospawn_lock_done(pa_bool_t after_fork);
+
+#endif
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c
index 46c486c..b1de696 100644
--- a/src/pulsecore/log.c
+++ b/src/pulsecore/log.c
@@ -1,5 +1,3 @@
-/* $Id: log.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,6 +28,7 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
+#include <errno.h>
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
@@ -38,19 +37,23 @@
#include <pulse/utf8.h>
#include <pulse/xmalloc.h>
#include <pulse/util.h>
+#include <pulse/timeval.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/rtclock.h>
+#include <pulsecore/once.h>
#include "log.h"
#define ENV_LOGLEVEL "PULSE_LOG"
#define ENV_LOGMETA "PULSE_LOG_META"
+#define ENV_LOGTIME "PULSE_LOG_TIME"
static char *log_ident = NULL, *log_ident_local = NULL;
static pa_log_target_t log_target = PA_LOG_STDERR;
-static void (*user_log_func)(pa_log_level_t l, const char *s) = NULL;
-static pa_log_level_t maximal_level = PA_LOG_NOTICE;
+static pa_log_func_t user_log_func = NULL;
+static pa_log_level_t maximal_level = PA_LOG_ERROR;
#ifdef HAVE_SYSLOG_H
static const int level_to_syslog[] = {
@@ -82,6 +85,9 @@ void pa_log_set_ident(const char *p) {
/* To make valgrind shut up. */
static void ident_destructor(void) PA_GCC_DESTRUCTOR;
static void ident_destructor(void) {
+ if (!pa_in_valgrind())
+ return;
+
pa_xfree(log_ident);
pa_xfree(log_ident_local);
}
@@ -92,7 +98,7 @@ void pa_log_set_maximal_level(pa_log_level_t l) {
maximal_level = l;
}
-void pa_log_set_target(pa_log_target_t t, void (*func)(pa_log_level_t l, const char*s)) {
+void pa_log_set_target(pa_log_target_t t, pa_log_func_t func) {
pa_assert(t == PA_LOG_USER || !func);
log_target = t;
@@ -108,7 +114,12 @@ void pa_log_levelv_meta(
va_list ap) {
const char *e;
- char *text, *t, *n, *location;
+ char *t, *n;
+ int saved_errno = errno;
+
+ /* We don't use dynamic memory allocation here to minimize the hit
+ * in RT threads */
+ char text[1024], location[128], timestamp[32];
pa_assert(level < PA_LOG_LEVEL_MAX);
pa_assert(format);
@@ -116,17 +127,46 @@ void pa_log_levelv_meta(
if ((e = getenv(ENV_LOGLEVEL)))
maximal_level = atoi(e);
- if (level > maximal_level)
+ if (level > maximal_level) {
+ errno = saved_errno;
return;
+ }
- text = pa_vsprintf_malloc(format, ap);
+ pa_vsnprintf(text, sizeof(text), format, ap);
if (getenv(ENV_LOGMETA) && file && line > 0 && func)
- location = pa_sprintf_malloc("[%s:%i %s()] ", file, line, func);
+ pa_snprintf(location, sizeof(location), "[%s:%i %s()] ", file, line, func);
else if (file)
- location = pa_sprintf_malloc("%s: ", pa_path_get_filename(file));
+ pa_snprintf(location, sizeof(location), "%s: ", pa_path_get_filename(file));
else
- location = pa_xstrdup("");
+ location[0] = 0;
+
+ if (getenv(ENV_LOGTIME)) {
+ static pa_usec_t start, last;
+ pa_usec_t u, a, r;
+
+ u = pa_rtclock_usec();
+
+ PA_ONCE_BEGIN {
+ start = u;
+ last = u;
+ } PA_ONCE_END;
+
+ r = u - last;
+ a = u - start;
+
+ /* This is not thread safe, but this is a debugging tool only
+ * anyway. */
+ last = u;
+
+ pa_snprintf(timestamp, sizeof(timestamp), "(%4llu.%03llu|%4llu.%03llu) ",
+ (unsigned long long) (a / PA_USEC_PER_SEC),
+ (unsigned long long) (((a / PA_USEC_PER_MSEC)) % 1000),
+ (unsigned long long) (r / PA_USEC_PER_SEC),
+ (unsigned long long) (((r / PA_USEC_PER_MSEC)) % 1000));
+
+ } else
+ timestamp[0] = 0;
if (!pa_utf8_valid(text))
pa_log_level(level, __FILE__": invalid UTF-8 string following below:");
@@ -158,11 +198,13 @@ void pa_log_levelv_meta(
}
#endif
+ /* We shouldn't be using dynamic allocation here to
+ * minimize the hit in RT threads */
local_t = pa_utf8_to_locale(t);
if (!local_t)
- fprintf(stderr, "%c: %s%s%s%s\n", level_to_char[level], location, prefix, t, suffix);
+ fprintf(stderr, "%s%c: %s%s%s%s\n", timestamp, level_to_char[level], location, prefix, t, suffix);
else {
- fprintf(stderr, "%c: %s%s%s%s\n", level_to_char[level], location, prefix, local_t, suffix);
+ fprintf(stderr, "%s%c: %s%s%s%s\n", timestamp, level_to_char[level], location, prefix, local_t, suffix);
pa_xfree(local_t);
}
@@ -177,9 +219,9 @@ void pa_log_levelv_meta(
local_t = pa_utf8_to_locale(t);
if (!local_t)
- syslog(level_to_syslog[level], "%s%s", location, t);
+ syslog(level_to_syslog[level], "%s%s%s", timestamp, location, t);
else {
- syslog(level_to_syslog[level], "%s%s", location, local_t);
+ syslog(level_to_syslog[level], "%s%s%s", timestamp, location, local_t);
pa_xfree(local_t);
}
@@ -189,11 +231,10 @@ void pa_log_levelv_meta(
#endif
case PA_LOG_USER: {
- char *x;
+ char x[1024];
- x = pa_sprintf_malloc("%s%s", location, t);
+ pa_snprintf(x, sizeof(x), "%s%s%s", timestamp, location, t);
user_log_func(level, x);
- pa_xfree(x);
break;
}
@@ -204,8 +245,7 @@ void pa_log_levelv_meta(
}
}
- pa_xfree(text);
- pa_xfree(location);
+ errno = saved_errno;
}
void pa_log_level_meta(
diff --git a/src/pulsecore/log.h b/src/pulsecore/log.h
index c8ef5d0..633227f 100644
--- a/src/pulsecore/log.h
+++ b/src/pulsecore/log.h
@@ -1,8 +1,6 @@
#ifndef foologhfoo
#define foologhfoo
-/* $Id: log.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -27,7 +25,7 @@
#include <stdarg.h>
#include <stdlib.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
/* A simple logging subsystem */
@@ -51,8 +49,10 @@ typedef enum pa_log_level {
/* Set an identification for the current daemon. Used when logging to syslog. */
void pa_log_set_ident(const char *p);
+typedef void (*pa_log_func_t)(pa_log_level_t t, const char*s);
+
/* Set another log target. If t is PA_LOG_USER you may specify a function that is called every log string */
-void pa_log_set_target(pa_log_target_t t, void (*func)(pa_log_level_t t, const char*s));
+void pa_log_set_target(pa_log_target_t t, pa_log_func_t func);
/* Minimal log level */
void pa_log_set_maximal_level(pa_log_level_t l);
diff --git a/src/pulsecore/ltdl-helper.c b/src/pulsecore/ltdl-helper.c
index c994622..0d4c22f 100644
--- a/src/pulsecore/ltdl-helper.c
+++ b/src/pulsecore/ltdl-helper.c
@@ -1,5 +1,3 @@
-/* $Id: ltdl-helper.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -42,12 +40,14 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s
pa_void_func_t f;
pa_assert(handle);
- pa_assert(module);
pa_assert(symbol);
- if ((f = ((pa_void_func_t) (long) lt_dlsym(handle, symbol))))
+ if ((f = ((pa_void_func_t) (size_t) lt_dlsym(handle, symbol))))
return f;
+ if (!module)
+ return NULL;
+
/* As the .la files might have been cleansed from the system, we should
* try with the ltdl prefix as well. */
@@ -57,7 +57,7 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s
if (!isalnum(*c))
*c = '_';
- f = (pa_void_func_t) (long) lt_dlsym(handle, sn);
+ f = (pa_void_func_t) (size_t) lt_dlsym(handle, sn);
pa_xfree(sn);
return f;
diff --git a/src/pulsecore/ltdl-helper.h b/src/pulsecore/ltdl-helper.h
index 4280ead..ea73de5 100644
--- a/src/pulsecore/ltdl-helper.h
+++ b/src/pulsecore/ltdl-helper.h
@@ -1,8 +1,6 @@
#ifndef foopulsecoreltdlhelperhfoo
#define foopulsecoreltdlhelperhfoo
-/* $Id: ltdl-helper.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h
index b4ca0c7..39e9b58 100644
--- a/src/pulsecore/macro.h
+++ b/src/pulsecore/macro.h
@@ -1,8 +1,6 @@
#ifndef foopulsemacrohfoo
#define foopulsemacrohfoo
-/* $Id: macro.h 2194 2008-03-30 01:42:34Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,12 +31,22 @@
#include <stdlib.h>
#include <pulsecore/log.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
#ifndef PACKAGE
#error "Please include config.h before including this file!"
#endif
+#ifndef PA_LIKELY
+#ifdef __GNUC__
+#define PA_LIKELY(x) (__builtin_expect(!!(x),1))
+#define PA_UNLIKELY(x) (__builtin_expect((x),0))
+#else
+#define PA_LIKELY(x) (x)
+#define PA_UNLIKELY(x) (x)
+#endif
+#endif
+
#if defined(PAGE_SIZE)
#define PA_PAGE_SIZE ((size_t) PAGE_SIZE)
#elif defined(PAGESIZE)
@@ -67,19 +75,53 @@ static inline size_t pa_page_align(size_t l) {
#define PA_ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
-#ifndef MAX
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
+/* The users of PA_MIN and PA_MAX should be aware that these macros on
+ * non-GCC executed code with side effects twice. It is thus
+ * considered misuse to use code with side effects as arguments to MIN
+ * and MAX. */
+
+#ifdef __GNUC__
+#define PA_MAX(a,b) \
+ __extension__ ({ typeof(a) _a = (a); \
+ typeof(b) _b = (b); \
+ _a > _b ? _a : _b; \
+ })
+#else
+#define PA_MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
-#ifndef MIN
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#ifdef __GNUC__
+#define PA_MIN(a,b) \
+ __extension__ ({ typeof(a) _a = (a); \
+ typeof(b) _b = (b); \
+ _a < _b ? _a : _b; \
+ })
+#else
+#define PA_MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
-#ifndef CLAMP
-#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
+#ifdef __GNUC__
+#define PA_CLAMP(x, low, high) \
+ __extension__ ({ typeof(x) _x = (x); \
+ typeof(low) _low = (low); \
+ typeof(high) _high = (high); \
+ ((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \
+ })
+#else
+#define PA_CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
#endif
+#ifdef __GNUC__
+#define PA_CLAMP_UNLIKELY(x, low, high) \
+ __extension__ ({ typeof(x) _x = (x); \
+ typeof(low) _low = (low); \
+ typeof(high) _high = (high); \
+ (PA_UNLIKELY(_x > _high) ? _high : (PA_UNLIKELY(_x < _low) ? _low : _x)); \
+ })
+#else
#define PA_CLAMP_UNLIKELY(x, low, high) (PA_UNLIKELY((x) > (high)) ? (high) : (PA_UNLIKELY((x) < (low)) ? (low) : (x)))
+#endif
+
/* We don't define a PA_CLAMP_LIKELY here, because it doesn't really
* make sense: we cannot know if it is more likely that the values is
* lower or greater than the boundaries.*/
@@ -166,8 +208,17 @@ typedef int pa_bool_t;
#define PA_PATH_SEP_CHAR '/'
#endif
-static inline const char *pa_strnull(const char *x) {
- return x ? x : "(null)";
-}
+#if defined(__GNUC__) && defined(__ELF__)
+
+#define PA_WARN_REFERENCE(sym, msg) \
+ __asm__(".section .gnu.warning." #sym); \
+ __asm__(".asciz \"" msg "\""); \
+ __asm__(".previous")
+
+#else
+
+#define PA_WARN_REFERENCE(sym, msg)
+
+#endif
#endif
diff --git a/src/pulsecore/mcalign.c b/src/pulsecore/mcalign.c
index 5500f29..a03d5ae 100644
--- a/src/pulsecore/mcalign.c
+++ b/src/pulsecore/mcalign.c
@@ -1,5 +1,3 @@
-/* $Id: mcalign.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -197,7 +195,6 @@ int pa_mcalign_pop(pa_mcalign *m, pa_memchunk *c) {
/* There's simply nothing */
return -1;
-
}
size_t pa_mcalign_csize(pa_mcalign *m, size_t l) {
@@ -211,3 +208,11 @@ size_t pa_mcalign_csize(pa_mcalign *m, size_t l) {
return (l/m->base)*m->base;
}
+
+void pa_mcalign_flush(pa_mcalign *m) {
+ pa_memchunk chunk;
+ pa_assert(m);
+
+ while (pa_mcalign_pop(m, &chunk) >= 0)
+ pa_memblock_unref(chunk.memblock);
+}
diff --git a/src/pulsecore/mcalign.h b/src/pulsecore/mcalign.h
index ad997b2..e82eb00 100644
--- a/src/pulsecore/mcalign.h
+++ b/src/pulsecore/mcalign.h
@@ -1,8 +1,6 @@
#ifndef foomcalignhfoo
#define foomcalignhfoo
-/* $Id: mcalign.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -79,4 +77,7 @@ int pa_mcalign_pop(pa_mcalign *m, pa_memchunk *c);
/* If we pass l bytes in now, how many bytes would we get out? */
size_t pa_mcalign_csize(pa_mcalign *m, size_t l);
+/* Flush what's still stored in the aligner */
+void pa_mcalign_flush(pa_mcalign *m);
+
#endif
diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c
index c4d33a8..d9e1bf1 100644
--- a/src/pulsecore/memblock.c
+++ b/src/pulsecore/memblock.c
@@ -1,5 +1,3 @@
-/* $Id: memblock.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,6 +31,10 @@
#include <signal.h>
#include <errno.h>
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
#include <pulse/xmalloc.h>
#include <pulse/def.h>
@@ -46,8 +48,12 @@
#include "memblock.h"
-#define PA_MEMPOOL_SLOTS_MAX 128
-#define PA_MEMPOOL_SLOT_SIZE (16*1024)
+/* We can allocate 64*1024*1024 bytes at maximum. That's 64MB. Please
+ * note that the footprint is usually much smaller, since the data is
+ * stored in SHM and our OS does not commit the memory before we use
+ * it for the first time. */
+#define PA_MEMPOOL_SLOTS_MAX 1024
+#define PA_MEMPOOL_SLOT_SIZE (64*1024)
#define PA_MEMEXPORT_SLOTS_MAX 128
@@ -59,7 +65,9 @@ struct pa_memblock {
pa_mempool *pool;
pa_memblock_type_t type;
- int read_only; /* boolean */
+
+ pa_bool_t read_only:1;
+ pa_bool_t is_silence:1;
pa_atomic_ptr_t data;
size_t length;
@@ -125,11 +133,6 @@ struct pa_memexport {
PA_LLIST_FIELDS(pa_memexport);
};
-struct mempool_slot {
- PA_LLIST_FIELDS(struct mempool_slot);
- /* the actual data follows immediately hereafter */
-};
-
struct pa_mempool {
pa_semaphore *semaphore;
pa_mutex *mutex;
@@ -159,14 +162,14 @@ static void stat_add(pa_memblock*b) {
pa_assert(b->pool);
pa_atomic_inc(&b->pool->stat.n_allocated);
- pa_atomic_add(&b->pool->stat.allocated_size, b->length);
+ pa_atomic_add(&b->pool->stat.allocated_size, (int) b->length);
pa_atomic_inc(&b->pool->stat.n_accumulated);
- pa_atomic_add(&b->pool->stat.accumulated_size, b->length);
+ pa_atomic_add(&b->pool->stat.accumulated_size, (int) b->length);
if (b->type == PA_MEMBLOCK_IMPORTED) {
pa_atomic_inc(&b->pool->stat.n_imported);
- pa_atomic_add(&b->pool->stat.imported_size, b->length);
+ pa_atomic_add(&b->pool->stat.imported_size, (int) b->length);
}
pa_atomic_inc(&b->pool->stat.n_allocated_by_type[b->type]);
@@ -182,14 +185,14 @@ static void stat_remove(pa_memblock *b) {
pa_assert(pa_atomic_load(&b->pool->stat.allocated_size) >= (int) b->length);
pa_atomic_dec(&b->pool->stat.n_allocated);
- pa_atomic_sub(&b->pool->stat.allocated_size, b->length);
+ pa_atomic_sub(&b->pool->stat.allocated_size, (int) b->length);
if (b->type == PA_MEMBLOCK_IMPORTED) {
pa_assert(pa_atomic_load(&b->pool->stat.n_imported) > 0);
pa_assert(pa_atomic_load(&b->pool->stat.imported_size) >= (int) b->length);
pa_atomic_dec(&b->pool->stat.n_imported);
- pa_atomic_sub(&b->pool->stat.imported_size, b->length);
+ pa_atomic_sub(&b->pool->stat.imported_size, (int) b->length);
}
pa_atomic_dec(&b->pool->stat.n_allocated_by_type[b->type]);
@@ -202,7 +205,7 @@ pa_memblock *pa_memblock_new(pa_mempool *p, size_t length) {
pa_memblock *b;
pa_assert(p);
- pa_assert(length > 0);
+ pa_assert(length);
if (!(b = pa_memblock_new_pool(p, length)))
b = memblock_new_appended(p, length);
@@ -215,18 +218,18 @@ static pa_memblock *memblock_new_appended(pa_mempool *p, size_t length) {
pa_memblock *b;
pa_assert(p);
- pa_assert(length > 0);
+ pa_assert(length);
/* If -1 is passed as length we choose the size for the caller. */
if (length == (size_t) -1)
- length = p->block_size - PA_ALIGN(sizeof(struct mempool_slot)) - PA_ALIGN(sizeof(pa_memblock));
+ length = p->block_size - PA_ALIGN(sizeof(pa_memblock));
b = pa_xmalloc(PA_ALIGN(sizeof(pa_memblock)) + length);
PA_REFCNT_INIT(b);
b->pool = p;
b->type = PA_MEMBLOCK_APPENDED;
- b->read_only = 0;
+ b->read_only = b->is_silence = FALSE;
pa_atomic_ptr_store(&b->data, (uint8_t*) b + PA_ALIGN(sizeof(pa_memblock)));
b->length = length;
pa_atomic_store(&b->n_acquired, 0);
@@ -249,23 +252,27 @@ static struct mempool_slot* mempool_allocate_slot(pa_mempool *p) {
if ((unsigned) (idx = pa_atomic_inc(&p->n_init)) >= p->n_blocks)
pa_atomic_dec(&p->n_init);
else
- slot = (struct mempool_slot*) ((uint8_t*) p->memory.ptr + (p->block_size * idx));
+ slot = (struct mempool_slot*) ((uint8_t*) p->memory.ptr + (p->block_size * (size_t) idx));
if (!slot) {
- pa_log_debug("Pool full");
+ pa_log_info("Pool full");
pa_atomic_inc(&p->stat.n_pool_full);
return NULL;
}
}
+/* #ifdef HAVE_VALGRIND_MEMCHECK_H */
+/* if (PA_UNLIKELY(pa_in_valgrind())) { */
+/* VALGRIND_MALLOCLIKE_BLOCK(slot, p->block_size, 0, 0); */
+/* } */
+/* #endif */
+
return slot;
}
-/* No lock necessary */
-static void* mempool_slot_data(struct mempool_slot *slot) {
- pa_assert(slot);
-
- return (uint8_t*) slot + PA_ALIGN(sizeof(struct mempool_slot));
+/* No lock necessary, totally redundant anyway */
+static inline void* mempool_slot_data(struct mempool_slot *slot) {
+ return slot;
}
/* No lock necessary */
@@ -275,7 +282,7 @@ static unsigned mempool_slot_idx(pa_mempool *p, void *ptr) {
pa_assert((uint8_t*) ptr >= (uint8_t*) p->memory.ptr);
pa_assert((uint8_t*) ptr < (uint8_t*) p->memory.ptr + p->memory.size);
- return ((uint8_t*) ptr - (uint8_t*) p->memory.ptr) / p->block_size;
+ return (unsigned) ((size_t) ((uint8_t*) ptr - (uint8_t*) p->memory.ptr) / p->block_size);
}
/* No lock necessary */
@@ -294,7 +301,7 @@ pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) {
struct mempool_slot *slot;
pa_assert(p);
- pa_assert(length > 0);
+ pa_assert(length);
/* If -1 is passed as length we choose the size for the caller: we
* take the largest size that fits in one of our slots. */
@@ -302,7 +309,7 @@ pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) {
if (length == (size_t) -1)
length = pa_mempool_block_size_max(p);
- if (p->block_size - PA_ALIGN(sizeof(struct mempool_slot)) >= PA_ALIGN(sizeof(pa_memblock)) + length) {
+ if (p->block_size >= PA_ALIGN(sizeof(pa_memblock)) + length) {
if (!(slot = mempool_allocate_slot(p)))
return NULL;
@@ -311,7 +318,7 @@ pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) {
b->type = PA_MEMBLOCK_POOL;
pa_atomic_ptr_store(&b->data, (uint8_t*) b + PA_ALIGN(sizeof(pa_memblock)));
- } else if (p->block_size - PA_ALIGN(sizeof(struct mempool_slot)) >= length) {
+ } else if (p->block_size >= length) {
if (!(slot = mempool_allocate_slot(p)))
return NULL;
@@ -323,14 +330,14 @@ pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) {
pa_atomic_ptr_store(&b->data, mempool_slot_data(slot));
} else {
- pa_log_debug("Memory block too large for pool: %lu > %lu", (unsigned long) length, (unsigned long) (p->block_size - PA_ALIGN(sizeof(struct mempool_slot))));
+ pa_log_debug("Memory block too large for pool: %lu > %lu", (unsigned long) length, (unsigned long) p->block_size);
pa_atomic_inc(&p->stat.n_too_large_for_pool);
return NULL;
}
PA_REFCNT_INIT(b);
b->pool = p;
- b->read_only = 0;
+ b->read_only = b->is_silence = FALSE;
b->length = length;
pa_atomic_store(&b->n_acquired, 0);
pa_atomic_store(&b->please_signal, 0);
@@ -340,13 +347,13 @@ pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) {
}
/* No lock necessary */
-pa_memblock *pa_memblock_new_fixed(pa_mempool *p, void *d, size_t length, int read_only) {
+pa_memblock *pa_memblock_new_fixed(pa_mempool *p, void *d, size_t length, pa_bool_t read_only) {
pa_memblock *b;
pa_assert(p);
pa_assert(d);
pa_assert(length != (size_t) -1);
- pa_assert(length > 0);
+ pa_assert(length);
if (!(b = pa_flist_pop(PA_STATIC_FLIST_GET(unused_memblocks))))
b = pa_xnew(pa_memblock, 1);
@@ -354,6 +361,7 @@ pa_memblock *pa_memblock_new_fixed(pa_mempool *p, void *d, size_t length, int re
b->pool = p;
b->type = PA_MEMBLOCK_FIXED;
b->read_only = read_only;
+ b->is_silence = FALSE;
pa_atomic_ptr_store(&b->data, d);
b->length = length;
pa_atomic_store(&b->n_acquired, 0);
@@ -364,12 +372,12 @@ pa_memblock *pa_memblock_new_fixed(pa_mempool *p, void *d, size_t length, int re
}
/* No lock necessary */
-pa_memblock *pa_memblock_new_user(pa_mempool *p, void *d, size_t length, void (*free_cb)(void *p), int read_only) {
+pa_memblock *pa_memblock_new_user(pa_mempool *p, void *d, size_t length, pa_free_cb_t free_cb, pa_bool_t read_only) {
pa_memblock *b;
pa_assert(p);
pa_assert(d);
- pa_assert(length > 0);
+ pa_assert(length);
pa_assert(length != (size_t) -1);
pa_assert(free_cb);
@@ -379,6 +387,7 @@ pa_memblock *pa_memblock_new_user(pa_mempool *p, void *d, size_t length, void (*
b->pool = p;
b->type = PA_MEMBLOCK_USER;
b->read_only = read_only;
+ b->is_silence = FALSE;
pa_atomic_ptr_store(&b->data, d);
b->length = length;
pa_atomic_store(&b->n_acquired, 0);
@@ -391,7 +400,7 @@ pa_memblock *pa_memblock_new_user(pa_mempool *p, void *d, size_t length, void (*
}
/* No lock necessary */
-int pa_memblock_is_read_only(pa_memblock *b) {
+pa_bool_t pa_memblock_is_read_only(pa_memblock *b) {
pa_assert(b);
pa_assert(PA_REFCNT_VALUE(b) > 0);
@@ -399,13 +408,27 @@ int pa_memblock_is_read_only(pa_memblock *b) {
}
/* No lock necessary */
-int pa_memblock_ref_is_one(pa_memblock *b) {
- int r;
+pa_bool_t pa_memblock_is_silence(pa_memblock *b) {
+ pa_assert(b);
+ pa_assert(PA_REFCNT_VALUE(b) > 0);
+ return b->is_silence;
+}
+
+/* No lock necessary */
+void pa_memblock_set_is_silence(pa_memblock *b, pa_bool_t v) {
pa_assert(b);
+ pa_assert(PA_REFCNT_VALUE(b) > 0);
- r = PA_REFCNT_VALUE(b);
- pa_assert(r > 0);
+ b->is_silence = v;
+}
+
+/* No lock necessary */
+pa_bool_t pa_memblock_ref_is_one(pa_memblock *b) {
+ int r;
+ pa_assert(b);
+
+ pa_assert_se((r = PA_REFCNT_VALUE(b)) > 0);
return r == 1;
}
@@ -506,13 +529,19 @@ static void memblock_free(pa_memblock *b) {
case PA_MEMBLOCK_POOL_EXTERNAL:
case PA_MEMBLOCK_POOL: {
struct mempool_slot *slot;
- int call_free;
+ pa_bool_t call_free;
slot = mempool_slot_by_ptr(b->pool, pa_atomic_ptr_load(&b->data));
pa_assert(slot);
call_free = b->type == PA_MEMBLOCK_POOL_EXTERNAL;
+/* #ifdef HAVE_VALGRIND_MEMCHECK_H */
+/* if (PA_UNLIKELY(pa_in_valgrind())) { */
+/* VALGRIND_FREELIKE_BLOCK(slot, b->pool->block_size); */
+/* } */
+/* #endif */
+
/* The free list dimensions should easily allow all slots
* to fit in, hence try harder if pushing this slot into
* the free list fails */
@@ -567,7 +596,7 @@ static void memblock_make_local(pa_memblock *b) {
pa_atomic_dec(&b->pool->stat.n_allocated_by_type[b->type]);
- if (b->length <= b->pool->block_size - PA_ALIGN(sizeof(struct mempool_slot))) {
+ if (b->length <= b->pool->block_size) {
struct mempool_slot *slot;
if ((slot = mempool_allocate_slot(b->pool))) {
@@ -579,7 +608,7 @@ static void memblock_make_local(pa_memblock *b) {
pa_atomic_ptr_store(&b->data, new_data);
b->type = PA_MEMBLOCK_POOL_EXTERNAL;
- b->read_only = 0;
+ b->read_only = FALSE;
goto finish;
}
@@ -590,7 +619,7 @@ static void memblock_make_local(pa_memblock *b) {
pa_atomic_ptr_store(&b->data, pa_xmemdup(pa_atomic_ptr_load(&b->data), b->length));
b->type = PA_MEMBLOCK_USER;
- b->read_only = 0;
+ b->read_only = FALSE;
finish:
pa_atomic_inc(&b->pool->stat.n_allocated_by_type[b->type]);
@@ -634,7 +663,7 @@ static void memblock_replace_import(pa_memblock *b) {
pa_assert(pa_atomic_load(&b->pool->stat.n_imported) > 0);
pa_assert(pa_atomic_load(&b->pool->stat.imported_size) >= (int) b->length);
pa_atomic_dec(&b->pool->stat.n_imported);
- pa_atomic_sub(&b->pool->stat.imported_size, b->length);
+ pa_atomic_sub(&b->pool->stat.imported_size, (int) b->length);
seg = b->per_type.imported.segment;
pa_assert(seg);
@@ -655,8 +684,9 @@ static void memblock_replace_import(pa_memblock *b) {
pa_mutex_unlock(seg->import->mutex);
}
-pa_mempool* pa_mempool_new(int shared) {
+pa_mempool* pa_mempool_new(pa_bool_t shared, size_t size) {
pa_mempool *p;
+ char t1[64], t2[64];
p = pa_xnew(pa_mempool, 1);
@@ -667,22 +697,33 @@ pa_mempool* pa_mempool_new(int shared) {
if (p->block_size < PA_PAGE_SIZE)
p->block_size = PA_PAGE_SIZE;
- p->n_blocks = PA_MEMPOOL_SLOTS_MAX;
+ if (size <= 0)
+ p->n_blocks = PA_MEMPOOL_SLOTS_MAX;
+ else {
+ p->n_blocks = (unsigned) (size / p->block_size);
- pa_assert(p->block_size > PA_ALIGN(sizeof(struct mempool_slot)));
+ if (p->n_blocks < 2)
+ p->n_blocks = 2;
+ }
if (pa_shm_create_rw(&p->memory, p->n_blocks * p->block_size, shared, 0700) < 0) {
pa_xfree(p);
return NULL;
}
+ pa_log_debug("Using %s memory pool with %u slots of size %s each, total size is %s",
+ p->memory.shared ? "shared" : "private",
+ p->n_blocks,
+ pa_bytes_snprint(t1, sizeof(t1), (unsigned) p->block_size),
+ pa_bytes_snprint(t2, sizeof(t2), (unsigned) (p->n_blocks * p->block_size)));
+
memset(&p->stat, 0, sizeof(p->stat));
pa_atomic_store(&p->n_init, 0);
PA_LLIST_HEAD_INIT(pa_memimport, p->imports);
PA_LLIST_HEAD_INIT(pa_memexport, p->exports);
- p->free_slots = pa_flist_new(p->n_blocks*2);
+ p->free_slots = pa_flist_new(p->n_blocks);
return p;
}
@@ -726,7 +767,7 @@ const pa_mempool_stat* pa_mempool_get_stat(pa_mempool *p) {
size_t pa_mempool_block_size_max(pa_mempool *p) {
pa_assert(p);
- return p->block_size - PA_ALIGN(sizeof(struct mempool_slot)) - PA_ALIGN(sizeof(pa_memblock));
+ return p->block_size - PA_ALIGN(sizeof(pa_memblock));
}
/* No lock necessary */
@@ -736,16 +777,14 @@ void pa_mempool_vacuum(pa_mempool *p) {
pa_assert(p);
- list = pa_flist_new(p->n_blocks*2);
+ list = pa_flist_new(p->n_blocks);
while ((slot = pa_flist_pop(p->free_slots)))
while (pa_flist_push(list, slot) < 0)
;
while ((slot = pa_flist_pop(list))) {
- pa_shm_punch(&p->memory,
- (uint8_t*) slot - (uint8_t*) p->memory.ptr + PA_ALIGN(sizeof(struct mempool_slot)),
- p->block_size - PA_ALIGN(sizeof(struct mempool_slot)));
+ pa_shm_punch(&p->memory, (size_t) ((uint8_t*) slot - (uint8_t*) p->memory.ptr), p->block_size);
while (pa_flist_push(p->free_slots, slot))
;
@@ -767,7 +806,7 @@ int pa_mempool_get_shm_id(pa_mempool *p, uint32_t *id) {
}
/* No lock necessary */
-int pa_mempool_is_shared(pa_mempool *p) {
+pa_bool_t pa_mempool_is_shared(pa_mempool *p) {
pa_assert(p);
return !!p->memory.shared;
@@ -836,7 +875,7 @@ void pa_memimport_free(pa_memimport *i) {
pa_mutex_lock(i->mutex);
- while ((b = pa_hashmap_get_first(i->blocks)))
+ while ((b = pa_hashmap_first(i->blocks)))
memblock_replace_import(b);
pa_assert(pa_hashmap_size(i->segments) == 0);
@@ -886,7 +925,8 @@ pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_i
PA_REFCNT_INIT(b);
b->pool = i->pool;
b->type = PA_MEMBLOCK_IMPORTED;
- b->read_only = 1;
+ b->read_only = TRUE;
+ b->is_silence = FALSE;
pa_atomic_ptr_store(&b->data, (uint8_t*) seg->memory.ptr + offset);
b->length = size;
pa_atomic_store(&b->n_acquired, 0);
@@ -957,7 +997,7 @@ void pa_memexport_free(pa_memexport *e) {
pa_mutex_lock(e->mutex);
while (e->used_slots)
- pa_memexport_process_release(e, e->used_slots - e->slots);
+ pa_memexport_process_release(e, (uint32_t) (e->used_slots - e->slots));
pa_mutex_unlock(e->mutex);
pa_mutex_lock(e->pool->mutex);
@@ -996,7 +1036,7 @@ int pa_memexport_process_release(pa_memexport *e, uint32_t id) {
pa_assert(pa_atomic_load(&e->pool->stat.exported_size) >= (int) b->length);
pa_atomic_dec(&e->pool->stat.n_exported);
- pa_atomic_sub(&e->pool->stat.exported_size, b->length);
+ pa_atomic_sub(&e->pool->stat.exported_size, (int) b->length);
pa_memblock_unref(b);
@@ -1024,7 +1064,7 @@ static void memexport_revoke_blocks(pa_memexport *e, pa_memimport *i) {
slot->block->per_type.imported.segment->import != i)
continue;
- idx = slot - e->slots;
+ idx = (uint32_t) (slot - e->slots);
e->revoke_cb(e, idx, e->userdata);
pa_memexport_process_release(e, idx);
}
@@ -1085,7 +1125,7 @@ int pa_memexport_put(pa_memexport *e, pa_memblock *b, uint32_t *block_id, uint32
PA_LLIST_PREPEND(struct memexport_slot, e->used_slots, slot);
slot->block = b;
- *block_id = slot - e->slots;
+ *block_id = (uint32_t) (slot - e->slots);
pa_mutex_unlock(e->mutex);
/* pa_log("Got block id %u", *block_id); */
@@ -1105,13 +1145,13 @@ int pa_memexport_put(pa_memexport *e, pa_memblock *b, uint32_t *block_id, uint32
pa_assert((uint8_t*) data + b->length <= (uint8_t*) memory->ptr + memory->size);
*shm_id = memory->id;
- *offset = (uint8_t*) data - (uint8_t*) memory->ptr;
+ *offset = (size_t) ((uint8_t*) data - (uint8_t*) memory->ptr);
*size = b->length;
pa_memblock_release(b);
pa_atomic_inc(&e->pool->stat.n_exported);
- pa_atomic_add(&e->pool->stat.exported_size, b->length);
+ pa_atomic_add(&e->pool->stat.exported_size, (int) b->length);
return 0;
}
diff --git a/src/pulsecore/memblock.h b/src/pulsecore/memblock.h
index 0955d0b..b1eab2a 100644
--- a/src/pulsecore/memblock.h
+++ b/src/pulsecore/memblock.h
@@ -1,8 +1,6 @@
#ifndef foopulsememblockhfoo
#define foopulsememblockhfoo
-/* $Id: memblock.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -87,13 +85,13 @@ pa_memblock *pa_memblock_new(pa_mempool *, size_t length);
pa_memblock *pa_memblock_new_pool(pa_mempool *, size_t length);
/* Allocate a new memory block of type PA_MEMBLOCK_USER */
-pa_memblock *pa_memblock_new_user(pa_mempool *, void *data, size_t length, void (*free_cb)(void *p), int read_only);
+pa_memblock *pa_memblock_new_user(pa_mempool *, void *data, size_t length, pa_free_cb_t free_cb, pa_bool_t read_only);
/* A special case of pa_memblock_new_user: take a memory buffer previously allocated with pa_xmalloc() */
#define pa_memblock_new_malloced(p,data,length) pa_memblock_new_user(p, data, length, pa_xfree, 0)
/* Allocate a new memory block of type PA_MEMBLOCK_FIXED */
-pa_memblock *pa_memblock_new_fixed(pa_mempool *, void *data, size_t length, int read_only);
+pa_memblock *pa_memblock_new_fixed(pa_mempool *, void *data, size_t length, pa_bool_t read_only);
void pa_memblock_unref(pa_memblock*b);
pa_memblock* pa_memblock_ref(pa_memblock*b);
@@ -106,8 +104,11 @@ function is not multiple caller safe, i.e. needs to be locked
manually if called from more than one thread at the same time. */
void pa_memblock_unref_fixed(pa_memblock*b);
-int pa_memblock_is_read_only(pa_memblock *b);
-int pa_memblock_ref_is_one(pa_memblock *b);
+pa_bool_t pa_memblock_is_read_only(pa_memblock *b);
+pa_bool_t pa_memblock_is_silence(pa_memblock *b);
+pa_bool_t pa_memblock_ref_is_one(pa_memblock *b);
+void pa_memblock_set_is_silence(pa_memblock *b, pa_bool_t v);
+
void* pa_memblock_acquire(pa_memblock *b);
void pa_memblock_release(pa_memblock *b);
size_t pa_memblock_get_length(pa_memblock *b);
@@ -116,12 +117,12 @@ pa_mempool * pa_memblock_get_pool(pa_memblock *b);
pa_memblock *pa_memblock_will_need(pa_memblock *b);
/* The memory block manager */
-pa_mempool* pa_mempool_new(int shared);
+pa_mempool* pa_mempool_new(pa_bool_t shared, size_t size);
void pa_mempool_free(pa_mempool *p);
const pa_mempool_stat* pa_mempool_get_stat(pa_mempool *p);
void pa_mempool_vacuum(pa_mempool *p);
int pa_mempool_get_shm_id(pa_mempool *p, uint32_t *id);
-int pa_mempool_is_shared(pa_mempool *p);
+pa_bool_t pa_mempool_is_shared(pa_mempool *p);
size_t pa_mempool_block_size_max(pa_mempool *p);
/* For recieving blocks from other nodes */
diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c
index e719151..265da37 100644
--- a/src/pulsecore/memblockq.c
+++ b/src/pulsecore/memblockq.c
@@ -1,5 +1,3 @@
-/* $Id: memblockq.c 2063 2007-11-21 01:19:28Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -50,11 +48,12 @@ PA_STATIC_FLIST_DECLARE(list_items, 0, pa_xfree);
struct pa_memblockq {
struct list_item *blocks, *blocks_tail;
+ struct list_item *current_read, *current_write;
unsigned n_blocks;
- size_t maxlength, tlength, base, prebuf, minreq;
+ size_t maxlength, tlength, base, prebuf, minreq, maxrewind;
int64_t read_index, write_index;
pa_bool_t in_prebuf;
- pa_memblock *silence;
+ pa_memchunk silence;
pa_mcalign *mcalign;
int64_t missing;
size_t requested;
@@ -67,7 +66,8 @@ pa_memblockq* pa_memblockq_new(
size_t base,
size_t prebuf,
size_t minreq,
- pa_memblock *silence) {
+ size_t maxrewind,
+ pa_memchunk *silence) {
pa_memblockq* bq;
@@ -75,27 +75,35 @@ pa_memblockq* pa_memblockq_new(
bq = pa_xnew(pa_memblockq, 1);
bq->blocks = bq->blocks_tail = NULL;
+ bq->current_read = bq->current_write = NULL;
bq->n_blocks = 0;
bq->base = base;
bq->read_index = bq->write_index = idx;
- pa_log_debug("memblockq requested: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu",
- (unsigned long) maxlength, (unsigned long) tlength, (unsigned long) base, (unsigned long) prebuf, (unsigned long) minreq);
+ pa_log_debug("memblockq requested: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu maxrewind=%lu",
+ (unsigned long) maxlength, (unsigned long) tlength, (unsigned long) base, (unsigned long) prebuf, (unsigned long) minreq, (unsigned long) maxrewind);
- bq->missing = bq->requested = bq->maxlength = bq->tlength = bq->prebuf = bq->minreq = 0;
+ bq->missing = 0;
+ bq->requested = bq->maxlength = bq->tlength = bq->prebuf = bq->minreq = bq->maxrewind = 0;
bq->in_prebuf = TRUE;
pa_memblockq_set_maxlength(bq, maxlength);
pa_memblockq_set_tlength(bq, tlength);
pa_memblockq_set_prebuf(bq, prebuf);
pa_memblockq_set_minreq(bq, minreq);
+ pa_memblockq_set_maxrewind(bq, maxrewind);
+
+ pa_log_debug("memblockq sanitized: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu maxrewind=%lu",
+ (unsigned long) bq->maxlength, (unsigned long) bq->tlength, (unsigned long) bq->base, (unsigned long) bq->prebuf, (unsigned long) bq->minreq, (unsigned long) bq->maxrewind);
- pa_log_debug("memblockq sanitized: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu",
- (unsigned long)bq->maxlength, (unsigned long)bq->tlength, (unsigned long)bq->base, (unsigned long)bq->prebuf, (unsigned long)bq->minreq);
+ if (silence) {
+ bq->silence = *silence;
+ pa_memblock_ref(bq->silence.memblock);
+ } else
+ pa_memchunk_reset(&bq->silence);
- bq->silence = silence ? pa_memblock_ref(silence) : NULL;
- bq->mcalign = NULL;
+ bq->mcalign = pa_mcalign_new(bq->base);
return bq;
}
@@ -103,10 +111,10 @@ pa_memblockq* pa_memblockq_new(
void pa_memblockq_free(pa_memblockq* bq) {
pa_assert(bq);
- pa_memblockq_flush(bq);
+ pa_memblockq_silence(bq);
- if (bq->silence)
- pa_memblock_unref(bq->silence);
+ if (bq->silence.memblock)
+ pa_memblock_unref(bq->silence.memblock);
if (bq->mcalign)
pa_mcalign_free(bq->mcalign);
@@ -114,6 +122,62 @@ void pa_memblockq_free(pa_memblockq* bq) {
pa_xfree(bq);
}
+static void fix_current_read(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ if (PA_UNLIKELY(!bq->blocks)) {
+ bq->current_read = NULL;
+ return;
+ }
+
+ if (PA_UNLIKELY(!bq->current_read))
+ bq->current_read = bq->blocks;
+
+ /* Scan left */
+ while (PA_UNLIKELY(bq->current_read->index > bq->read_index))
+
+ if (bq->current_read->prev)
+ bq->current_read = bq->current_read->prev;
+ else
+ break;
+
+ /* Scan right */
+ while (PA_LIKELY(bq->current_read != NULL) && PA_UNLIKELY(bq->current_read->index + (int64_t) bq->current_read->chunk.length <= bq->read_index))
+ bq->current_read = bq->current_read->next;
+
+ /* At this point current_read will either point at or left of the
+ next block to play. It may be NULL in case everything in
+ the queue was already played */
+}
+
+static void fix_current_write(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ if (PA_UNLIKELY(!bq->blocks)) {
+ bq->current_write = NULL;
+ return;
+ }
+
+ if (PA_UNLIKELY(!bq->current_write))
+ bq->current_write = bq->blocks_tail;
+
+ /* Scan right */
+ while (PA_UNLIKELY(bq->current_write->index + (int64_t) bq->current_write->chunk.length <= bq->write_index))
+
+ if (bq->current_write->next)
+ bq->current_write = bq->current_write->next;
+ else
+ break;
+
+ /* Scan left */
+ while (PA_LIKELY(bq->current_write != NULL) && PA_UNLIKELY(bq->current_write->index > bq->write_index))
+ bq->current_write = bq->current_write->prev;
+
+ /* At this point current_write will either point at or right of
+ the next block to write data to. It may be NULL in case
+ everything in the queue is still to be played */
+}
+
static void drop_block(pa_memblockq *bq, struct list_item *q) {
pa_assert(bq);
pa_assert(q);
@@ -122,13 +186,23 @@ static void drop_block(pa_memblockq *bq, struct list_item *q) {
if (q->prev)
q->prev->next = q->next;
- else
+ else {
+ pa_assert(bq->blocks == q);
bq->blocks = q->next;
+ }
if (q->next)
q->next->prev = q->prev;
- else
+ else {
+ pa_assert(bq->blocks_tail == q);
bq->blocks_tail = q->prev;
+ }
+
+ if (bq->current_write == q)
+ bq->current_write = q->prev;
+
+ if (bq->current_read == q)
+ bq->current_read = q->next;
pa_memblock_unref(q->chunk.memblock);
@@ -138,25 +212,35 @@ static void drop_block(pa_memblockq *bq, struct list_item *q) {
bq->n_blocks--;
}
+static void drop_backlog(pa_memblockq *bq) {
+ int64_t boundary;
+ pa_assert(bq);
+
+ boundary = bq->read_index - (int64_t) bq->maxrewind;
+
+ while (bq->blocks && (bq->blocks->index + (int64_t) bq->blocks->chunk.length <= boundary))
+ drop_block(bq, bq->blocks);
+}
+
static pa_bool_t can_push(pa_memblockq *bq, size_t l) {
int64_t end;
pa_assert(bq);
if (bq->read_index > bq->write_index) {
- size_t d = bq->read_index - bq->write_index;
+ int64_t d = bq->read_index - bq->write_index;
- if (l > d)
- l -= d;
+ if ((int64_t) l > d)
+ l -= (size_t) d;
else
return TRUE;
}
- end = bq->blocks_tail ? bq->blocks_tail->index + bq->blocks_tail->chunk.length : 0;
+ end = bq->blocks_tail ? bq->blocks_tail->index + (int64_t) bq->blocks_tail->chunk.length : bq->write_index;
/* Make sure that the list doesn't get too long */
- if (bq->write_index + (int64_t)l > end)
- if (bq->write_index + l - bq->read_index > bq->maxlength)
+ if (bq->write_index + (int64_t) l > end)
+ if (bq->write_index + (int64_t) l - bq->read_index > (int64_t) bq->maxlength)
return FALSE;
return TRUE;
@@ -182,28 +266,26 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
old = bq->write_index;
chunk = *uchunk;
- if (bq->read_index > bq->write_index) {
-
- /* We currently have a buffer underflow, we need to drop some
- * incoming data */
+ fix_current_write(bq);
+ q = bq->current_write;
- size_t d = bq->read_index - bq->write_index;
+ /* First we advance the q pointer right of where we want to
+ * write to */
- if (chunk.length > d) {
- chunk.index += d;
- chunk.length -= d;
- bq->write_index += d;
- } else {
- /* We drop the incoming data completely */
- bq->write_index += chunk.length;
- goto finish;
- }
+ if (q) {
+ while (bq->write_index + (int64_t) chunk.length > q->index)
+ if (q->next)
+ q = q->next;
+ else
+ break;
}
+ if (!q)
+ q = bq->blocks_tail;
+
/* We go from back to front to look for the right place to add
* this new entry. Drop data we will overwrite on the way */
- q = bq->blocks_tail;
while (q) {
if (bq->write_index >= q->index + (int64_t) q->chunk.length)
@@ -213,7 +295,7 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
/* This entry isn't touched at all, let's skip it */
q = q->prev;
} else if (bq->write_index <= q->index &&
- bq->write_index + chunk.length >= q->index + q->chunk.length) {
+ bq->write_index + (int64_t) chunk.length >= q->index + (int64_t) q->chunk.length) {
/* This entry is fully replaced by the new entry, so let's drop it */
@@ -225,7 +307,7 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
/* The write index points into this memblock, so let's
* truncate or split it */
- if (bq->write_index + chunk.length < q->index + q->chunk.length) {
+ if (bq->write_index + (int64_t) chunk.length < q->index + (int64_t) q->chunk.length) {
/* We need to save the end of this memchunk */
struct list_item *p;
@@ -239,11 +321,11 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
pa_memblock_ref(p->chunk.memblock);
/* Calculate offset */
- d = bq->write_index + chunk.length - q->index;
+ d = (size_t) (bq->write_index + (int64_t) chunk.length - q->index);
pa_assert(d > 0);
/* Drop it from the new entry */
- p->index = q->index + d;
+ p->index = q->index + (int64_t) d;
p->chunk.length -= d;
/* Add it to the list */
@@ -258,7 +340,7 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
}
/* Truncate the chunk */
- if (!(q->chunk.length = bq->write_index - q->index)) {
+ if (!(q->chunk.length = (size_t) (bq->write_index - q->index))) {
struct list_item *p;
p = q;
q = q->prev;
@@ -276,8 +358,8 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
/* The job overwrites the current entry at the end, so let's drop the beginning of this entry */
- d = bq->write_index + chunk.length - q->index;
- q->index += d;
+ d = (size_t) (bq->write_index + (int64_t) chunk.length - q->index);
+ q->index += (int64_t) d;
q->chunk.index += d;
q->chunk.length -= d;
@@ -292,11 +374,11 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
/* Try to merge memory blocks */
if (q->chunk.memblock == chunk.memblock &&
- q->chunk.index + (int64_t)q->chunk.length == chunk.index &&
- bq->write_index == q->index + (int64_t)q->chunk.length) {
+ q->chunk.index + q->chunk.length == chunk.index &&
+ bq->write_index == q->index + (int64_t) q->chunk.length) {
q->chunk.length += chunk.length;
- bq->write_index += chunk.length;
+ bq->write_index += (int64_t) chunk.length;
goto finish;
}
} else
@@ -308,7 +390,7 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
n->chunk = chunk;
pa_memblock_ref(n->chunk.memblock);
n->index = bq->write_index;
- bq->write_index += n->chunk.length;
+ bq->write_index += (int64_t) n->chunk.length;
n->next = q ? q->next : bq->blocks;
n->prev = q;
@@ -329,11 +411,11 @@ finish:
delta = bq->write_index - old;
- if (delta >= bq->requested) {
- delta -= bq->requested;
+ if (delta >= (int64_t) bq->requested) {
+ delta -= (int64_t) bq->requested;
bq->requested = 0;
} else {
- bq->requested -= delta;
+ bq->requested -= (size_t) delta;
delta = 0;
}
@@ -342,7 +424,16 @@ finish:
return 0;
}
-static pa_bool_t memblockq_check_prebuf(pa_memblockq *bq) {
+pa_bool_t pa_memblockq_prebuf_active(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ if (bq->in_prebuf)
+ return pa_memblockq_get_length(bq) < bq->prebuf;
+ else
+ return bq->prebuf > 0 && bq->read_index >= bq->write_index;
+}
+
+static pa_bool_t update_prebuf(pa_memblockq *bq) {
pa_assert(bq);
if (bq->in_prebuf) {
@@ -364,34 +455,42 @@ static pa_bool_t memblockq_check_prebuf(pa_memblockq *bq) {
}
int pa_memblockq_peek(pa_memblockq* bq, pa_memchunk *chunk) {
+ int64_t d;
pa_assert(bq);
pa_assert(chunk);
/* We need to pre-buffer */
- if (memblockq_check_prebuf(bq))
+ if (update_prebuf(bq))
return -1;
+ fix_current_read(bq);
+
/* Do we need to spit out silence? */
- if (!bq->blocks || bq->blocks->index > bq->read_index) {
+ if (!bq->current_read || bq->current_read->index > bq->read_index) {
size_t length;
/* How much silence shall we return? */
- length = bq->blocks ? bq->blocks->index - bq->read_index : 0;
+ if (bq->current_read)
+ length = (size_t) (bq->current_read->index - bq->read_index);
+ else if (bq->write_index > bq->read_index)
+ length = (size_t) (bq->write_index - bq->read_index);
+ else
+ length = 0;
/* We need to return silence, since no data is yet available */
- if (bq->silence) {
- chunk->memblock = pa_memblock_ref(bq->silence);
+ if (bq->silence.memblock) {
+ *chunk = bq->silence;
+ pa_memblock_ref(chunk->memblock);
- if (!length || length > pa_memblock_get_length(chunk->memblock))
- length = pa_memblock_get_length(chunk->memblock);
+ if (length > 0 && length < chunk->length)
+ chunk->length = length;
- chunk->length = length;
} else {
/* If the memblockq is empty, return -1, otherwise return
* the time to sleep */
- if (!bq->blocks)
+ if (length <= 0)
return -1;
chunk->memblock = NULL;
@@ -403,11 +502,14 @@ int pa_memblockq_peek(pa_memblockq* bq, pa_memchunk *chunk) {
}
/* Ok, let's pass real data to the caller */
- pa_assert(bq->blocks->index == bq->read_index);
-
- *chunk = bq->blocks->chunk;
+ *chunk = bq->current_read->chunk;
pa_memblock_ref(chunk->memblock);
+ pa_assert(bq->read_index >= bq->current_read->index);
+ d = bq->read_index - bq->current_read->index;
+ chunk->index += (size_t) d;
+ chunk->length -= (size_t) d;
+
return 0;
}
@@ -421,68 +523,61 @@ void pa_memblockq_drop(pa_memblockq *bq, size_t length) {
while (length > 0) {
/* Do not drop any data when we are in prebuffering mode */
- if (memblockq_check_prebuf(bq))
+ if (update_prebuf(bq))
break;
- if (bq->blocks) {
- size_t d;
-
- pa_assert(bq->blocks->index >= bq->read_index);
+ fix_current_read(bq);
- d = (size_t) (bq->blocks->index - bq->read_index);
+ if (bq->current_read) {
+ int64_t p, d;
- if (d >= length) {
- /* The first block is too far in the future */
+ /* We go through this piece by piece to make sure we don't
+ * drop more than allowed by prebuf */
- bq->read_index += length;
- break;
- } else {
+ p = bq->current_read->index + (int64_t) bq->current_read->chunk.length;
+ pa_assert(p >= bq->read_index);
+ d = p - bq->read_index;
- length -= d;
- bq->read_index += d;
- }
+ if (d > (int64_t) length)
+ d = (int64_t) length;
- pa_assert(bq->blocks->index == bq->read_index);
-
- if (bq->blocks->chunk.length <= length) {
- /* We need to drop the full block */
-
- length -= bq->blocks->chunk.length;
- bq->read_index += bq->blocks->chunk.length;
-
- drop_block(bq, bq->blocks);
- } else {
- /* Only the start of this block needs to be dropped */
-
- bq->blocks->chunk.index += length;
- bq->blocks->chunk.length -= length;
- bq->blocks->index += length;
- bq->read_index += length;
- break;
- }
+ bq->read_index += d;
+ length -= (size_t) d;
} else {
/* The list is empty, there's nothing we could drop */
- bq->read_index += length;
+ bq->read_index += (int64_t) length;
break;
}
}
+ drop_backlog(bq);
+
delta = bq->read_index - old;
bq->missing += delta;
}
-int pa_memblockq_is_readable(pa_memblockq *bq) {
+void pa_memblockq_rewind(pa_memblockq *bq, size_t length) {
pa_assert(bq);
+ pa_assert(length % bq->base == 0);
- if (memblockq_check_prebuf(bq))
- return 0;
+ /* This is kind of the inverse of pa_memblockq_drop() */
+
+ bq->read_index -= (int64_t) length;
+ bq->missing -= (int64_t) length;
+}
+
+pa_bool_t pa_memblockq_is_readable(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ if (pa_memblockq_prebuf_active(bq))
+ return FALSE;
if (pa_memblockq_get_length(bq) <= 0)
- return 0;
+ return FALSE;
- return 1;
+ return TRUE;
}
size_t pa_memblockq_get_length(pa_memblockq *bq) {
@@ -506,12 +601,6 @@ size_t pa_memblockq_missing(pa_memblockq *bq) {
return l >= bq->minreq ? l : 0;
}
-size_t pa_memblockq_get_minreq(pa_memblockq *bq) {
- pa_assert(bq);
-
- return bq->minreq;
-}
-
void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek) {
int64_t old, delta;
pa_assert(bq);
@@ -535,27 +624,26 @@ void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek) {
pa_assert_not_reached();
}
+ drop_backlog(bq);
+
delta = bq->write_index - old;
- if (delta >= bq->requested) {
- delta -= bq->requested;
+ if (delta >= (int64_t) bq->requested) {
+ delta -= (int64_t) bq->requested;
bq->requested = 0;
} else if (delta >= 0) {
- bq->requested -= delta;
+ bq->requested -= (size_t) delta;
delta = 0;
}
bq->missing -= delta;
}
-void pa_memblockq_flush(pa_memblockq *bq) {
+void pa_memblockq_flush_write(pa_memblockq *bq) {
int64_t old, delta;
pa_assert(bq);
- while (bq->blocks)
- drop_block(bq, bq->blocks);
-
- pa_assert(bq->n_blocks == 0);
+ pa_memblockq_silence(bq);
old = bq->write_index;
bq->write_index = bq->read_index;
@@ -564,30 +652,53 @@ void pa_memblockq_flush(pa_memblockq *bq) {
delta = bq->write_index - old;
- if (delta > bq->requested) {
- delta -= bq->requested;
+ if (delta >= (int64_t) bq->requested) {
+ delta -= (int64_t) bq->requested;
bq->requested = 0;
} else if (delta >= 0) {
- bq->requested -= delta;
+ bq->requested -= (size_t) delta;
delta = 0;
}
bq->missing -= delta;
}
+void pa_memblockq_flush_read(pa_memblockq *bq) {
+ int64_t old, delta;
+ pa_assert(bq);
+
+ pa_memblockq_silence(bq);
+
+ old = bq->read_index;
+ bq->read_index = bq->write_index;
+
+ pa_memblockq_prebuf_force(bq);
+
+ delta = bq->read_index - old;
+ bq->missing += delta;
+}
+
size_t pa_memblockq_get_tlength(pa_memblockq *bq) {
pa_assert(bq);
return bq->tlength;
}
+size_t pa_memblockq_get_minreq(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ return bq->minreq;
+}
+
int64_t pa_memblockq_get_read_index(pa_memblockq *bq) {
pa_assert(bq);
+
return bq->read_index;
}
int64_t pa_memblockq_get_write_index(pa_memblockq *bq) {
pa_assert(bq);
+
return bq->write_index;
}
@@ -600,9 +711,6 @@ int pa_memblockq_push_align(pa_memblockq* bq, const pa_memchunk *chunk) {
if (bq->base == 1)
return pa_memblockq_push(bq, chunk);
- if (!bq->mcalign)
- bq->mcalign = pa_mcalign_new(bq->base);
-
if (!can_push(bq, pa_mcalign_csize(bq->mcalign, chunk->length)))
return -1;
@@ -613,23 +721,15 @@ int pa_memblockq_push_align(pa_memblockq* bq, const pa_memchunk *chunk) {
r = pa_memblockq_push(bq, &rchunk);
pa_memblock_unref(rchunk.memblock);
- if (r < 0)
+ if (r < 0) {
+ pa_mcalign_flush(bq->mcalign);
return -1;
+ }
}
return 0;
}
-void pa_memblockq_shorten(pa_memblockq *bq, size_t length) {
- size_t l;
- pa_assert(bq);
-
- l = pa_memblockq_get_length(bq);
-
- if (l > length)
- pa_memblockq_drop(bq, l - length);
-}
-
void pa_memblockq_prebuf_disable(pa_memblockq *bq) {
pa_assert(bq);
@@ -639,7 +739,7 @@ void pa_memblockq_prebuf_disable(pa_memblockq *bq) {
void pa_memblockq_prebuf_force(pa_memblockq *bq) {
pa_assert(bq);
- if (!bq->in_prebuf && bq->prebuf > 0)
+ if (bq->prebuf > 0)
bq->in_prebuf = TRUE;
}
@@ -691,18 +791,20 @@ void pa_memblockq_set_tlength(pa_memblockq *bq, size_t tlength) {
size_t old_tlength;
pa_assert(bq);
- old_tlength = bq->tlength;
-
if (tlength <= 0)
tlength = bq->maxlength;
+ old_tlength = bq->tlength;
bq->tlength = ((tlength+bq->base-1)/bq->base)*bq->base;
if (bq->tlength > bq->maxlength)
bq->tlength = bq->maxlength;
- if (bq->minreq > bq->tlength - bq->prebuf)
- pa_memblockq_set_minreq(bq, bq->tlength - bq->prebuf);
+ if (bq->prebuf > bq->tlength)
+ pa_memblockq_set_prebuf(bq, bq->tlength);
+
+ if (bq->minreq > bq->tlength)
+ pa_memblockq_set_minreq(bq, bq->tlength);
bq->missing += (int64_t) bq->tlength - (int64_t) old_tlength;
}
@@ -710,20 +812,22 @@ void pa_memblockq_set_tlength(pa_memblockq *bq, size_t tlength) {
void pa_memblockq_set_prebuf(pa_memblockq *bq, size_t prebuf) {
pa_assert(bq);
- bq->prebuf = (prebuf == (size_t) -1) ? bq->tlength/2 : prebuf;
- bq->prebuf = ((bq->prebuf+bq->base-1)/bq->base)*bq->base;
+ if (prebuf == (size_t) -1)
+ prebuf = bq->tlength;
+
+ bq->prebuf = ((prebuf+bq->base-1)/bq->base)*bq->base;
if (prebuf > 0 && bq->prebuf < bq->base)
bq->prebuf = bq->base;
- if (bq->prebuf > bq->maxlength)
- bq->prebuf = bq->maxlength;
+ if (bq->prebuf > bq->tlength)
+ bq->prebuf = bq->tlength;
if (bq->prebuf <= 0 || pa_memblockq_get_length(bq) >= bq->prebuf)
bq->in_prebuf = FALSE;
- if (bq->minreq > bq->tlength - bq->prebuf)
- pa_memblockq_set_minreq(bq, bq->tlength - bq->prebuf);
+ if (bq->minreq > bq->prebuf)
+ pa_memblockq_set_minreq(bq, bq->prebuf);
}
void pa_memblockq_set_minreq(pa_memblockq *bq, size_t minreq) {
@@ -731,9 +835,99 @@ void pa_memblockq_set_minreq(pa_memblockq *bq, size_t minreq) {
bq->minreq = (minreq/bq->base)*bq->base;
- if (bq->minreq > bq->tlength - bq->prebuf)
- bq->minreq = bq->tlength - bq->prebuf;
+ if (bq->minreq > bq->tlength)
+ bq->minreq = bq->tlength;
+
+ if (bq->minreq > bq->prebuf)
+ bq->minreq = bq->prebuf;
if (bq->minreq < bq->base)
bq->minreq = bq->base;
}
+
+void pa_memblockq_set_maxrewind(pa_memblockq *bq, size_t maxrewind) {
+ pa_assert(bq);
+
+ bq->maxrewind = (maxrewind/bq->base)*bq->base;
+}
+
+int pa_memblockq_splice(pa_memblockq *bq, pa_memblockq *source) {
+
+ pa_assert(bq);
+ pa_assert(source);
+
+ pa_memblockq_prebuf_disable(bq);
+
+ for (;;) {
+ pa_memchunk chunk;
+
+ if (pa_memblockq_peek(source, &chunk) < 0)
+ return 0;
+
+ pa_assert(chunk.length > 0);
+
+ if (chunk.memblock) {
+
+ if (pa_memblockq_push_align(bq, &chunk) < 0) {
+ pa_memblock_unref(chunk.memblock);
+ return -1;
+ }
+
+ pa_memblock_unref(chunk.memblock);
+ } else
+ pa_memblockq_seek(bq, (int64_t) chunk.length, PA_SEEK_RELATIVE);
+
+ pa_memblockq_drop(bq, chunk.length);
+ }
+}
+
+void pa_memblockq_willneed(pa_memblockq *bq) {
+ struct list_item *q;
+
+ pa_assert(bq);
+
+ fix_current_read(bq);
+
+ for (q = bq->current_read; q; q = q->next)
+ pa_memchunk_will_need(&q->chunk);
+}
+
+void pa_memblockq_set_silence(pa_memblockq *bq, pa_memchunk *silence) {
+ pa_assert(bq);
+
+ if (bq->silence.memblock)
+ pa_memblock_unref(bq->silence.memblock);
+
+ if (silence) {
+ bq->silence = *silence;
+ pa_memblock_ref(bq->silence.memblock);
+ } else
+ pa_memchunk_reset(&bq->silence);
+}
+
+pa_bool_t pa_memblockq_is_empty(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ return !bq->blocks;
+}
+
+void pa_memblockq_silence(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ while (bq->blocks)
+ drop_block(bq, bq->blocks);
+
+ pa_assert(bq->n_blocks == 0);
+}
+
+unsigned pa_memblockq_get_nblocks(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ return bq->n_blocks;
+}
+
+size_t pa_memblockq_get_base(pa_memblockq *bq) {
+ pa_assert(bq);
+
+ return bq->base;
+}
diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h
index a251c7c..31f908d 100644
--- a/src/pulsecore/memblockq.h
+++ b/src/pulsecore/memblockq.h
@@ -1,8 +1,6 @@
#ifndef foomemblockqhfoo
#define foomemblockqhfoo
-/* $Id: memblockq.h 2063 2007-11-21 01:19:28Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -62,7 +60,9 @@ typedef struct pa_memblockq pa_memblockq;
- minreq: pa_memblockq_missing() will only return values greater
than this value. Pass 0 for the default.
- - silence: return this memblock when reading unitialized data
+ - maxrewind: how many bytes of history to keep in the queue
+
+ - silence: return this memchunk when reading unitialized data
*/
pa_memblockq* pa_memblockq_new(
int64_t idx,
@@ -71,7 +71,8 @@ pa_memblockq* pa_memblockq_new(
size_t base,
size_t prebuf,
size_t minreq,
- pa_memblock *silence);
+ size_t maxrewind,
+ pa_memchunk *silence);
void pa_memblockq_free(pa_memblockq*bq);
@@ -83,6 +84,9 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *chunk);
* you know what you do. */
int pa_memblockq_push_align(pa_memblockq* bq, const pa_memchunk *chunk);
+/* Manipulate the write pointer */
+void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek);
+
/* Return a copy of the next memory chunk in the queue. It is not
* removed from the queue. There are two reasons this function might
* fail: 1. prebuffering is active, 2. queue is empty and no silence
@@ -94,8 +98,11 @@ int pa_memblockq_peek(pa_memblockq* bq, pa_memchunk *chunk);
/* Drop the specified bytes from the queue. */
void pa_memblockq_drop(pa_memblockq *bq, size_t length);
+/* Rewind the read index. If the history is shorter than the specified length we'll point to silence afterwards. */
+void pa_memblockq_rewind(pa_memblockq *bq, size_t length);
+
/* Test if the pa_memblockq is currently readable, that is, more data than base */
-int pa_memblockq_is_readable(pa_memblockq *bq);
+pa_bool_t pa_memblockq_is_readable(pa_memblockq *bq);
/* Return the length of the queue in bytes */
size_t pa_memblockq_get_length(pa_memblockq *bq);
@@ -107,28 +114,14 @@ size_t pa_memblockq_missing(pa_memblockq *bq);
* this function, reset the internal counter to 0. */
size_t pa_memblockq_pop_missing(pa_memblockq *bq);
-/* Returns the minimal request value */
-size_t pa_memblockq_get_minreq(pa_memblockq *bq);
-
-/* Manipulate the write pointer */
-void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek);
+/* Directly moves the data from the source memblockq into bq */
+int pa_memblockq_splice(pa_memblockq *bq, pa_memblockq *source);
/* Set the queue to silence, set write index to read index */
-void pa_memblockq_flush(pa_memblockq *bq);
-
-/* Get Target length */
-size_t pa_memblockq_get_tlength(pa_memblockq *bq);
-
-/* Return the current read index */
-int64_t pa_memblockq_get_read_index(pa_memblockq *bq);
-
-/* Return the current write index */
-int64_t pa_memblockq_get_write_index(pa_memblockq *bq);
+void pa_memblockq_flush_write(pa_memblockq *bq);
-/* Shorten the pa_memblockq to the specified length by dropping data
- * at the read end of the queue. The read index is increased until the
- * queue has the specified length */
-void pa_memblockq_shorten(pa_memblockq *bq, size_t length);
+/* Set the queue to silence, set write read index to write index*/
+void pa_memblockq_flush_read(pa_memblockq *bq);
/* Ignore prebuf for now */
void pa_memblockq_prebuf_disable(pa_memblockq *bq);
@@ -139,13 +132,48 @@ void pa_memblockq_prebuf_force(pa_memblockq *bq);
/* Return the maximum length of the queue in bytes */
size_t pa_memblockq_get_maxlength(pa_memblockq *bq);
+/* Get Target length */
+size_t pa_memblockq_get_tlength(pa_memblockq *bq);
+
/* Return the prebuffer length in bytes */
size_t pa_memblockq_get_prebuf(pa_memblockq *bq);
-/* Change metrics. */
-void pa_memblockq_set_maxlength(pa_memblockq *memblockq, size_t maxlength);
-void pa_memblockq_set_tlength(pa_memblockq *memblockq, size_t tlength);
-void pa_memblockq_set_prebuf(pa_memblockq *memblockq, size_t prebuf);
+/* Returns the minimal request value */
+size_t pa_memblockq_get_minreq(pa_memblockq *bq);
+
+/* Return the base unit in bytes */
+size_t pa_memblockq_get_base(pa_memblockq *bq);
+
+/* Return the current read index */
+int64_t pa_memblockq_get_read_index(pa_memblockq *bq);
+
+/* Return the current write index */
+int64_t pa_memblockq_get_write_index(pa_memblockq *bq);
+
+/* Change metrics. Always call in order. */
+void pa_memblockq_set_maxlength(pa_memblockq *memblockq, size_t maxlength); /* might modify tlength, prebuf, minreq too */
+void pa_memblockq_set_tlength(pa_memblockq *memblockq, size_t tlength); /* might modify minreq, too */
+void pa_memblockq_set_prebuf(pa_memblockq *memblockq, size_t prebuf); /* might modify minreq, too */
void pa_memblockq_set_minreq(pa_memblockq *memblockq, size_t minreq);
+void pa_memblockq_set_maxrewind(pa_memblockq *memblockq, size_t maxrewind); /* Set the maximum history size */
+void pa_memblockq_set_silence(pa_memblockq *memblockq, pa_memchunk *silence);
+
+/* Call pa_memchunk_willneed() for every chunk in the queue from the current read pointer to the end */
+void pa_memblockq_willneed(pa_memblockq *bq);
+
+/* Check whether the memblockq is completely empty, i.e. no data
+ * neither left nor right of the read pointer, and hence no buffered
+ * data for the future nor data in the backlog. */
+pa_bool_t pa_memblockq_is_empty(pa_memblockq *bq);
+
+/* Drop everything in the queue, but don't modify the indexes */
+void pa_memblockq_silence(pa_memblockq *bq);
+
+/* Check whether we currently are in prebuf state */
+pa_bool_t pa_memblockq_prebuf_active(pa_memblockq *bq);
+
+/* Return how many items are currently stored in the queue */
+unsigned pa_memblockq_get_nblocks(pa_memblockq *bq);
+
#endif
diff --git a/src/pulsecore/memchunk.c b/src/pulsecore/memchunk.c
index e870416..0bbf859 100644
--- a/src/pulsecore/memchunk.c
+++ b/src/pulsecore/memchunk.c
@@ -1,5 +1,3 @@
-/* $Id: memchunk.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -49,17 +47,20 @@ pa_memchunk* pa_memchunk_make_writable(pa_memchunk *c, size_t min) {
pa_memblock_get_length(c->memblock) >= c->index+min)
return c;
- l = c->length;
- if (l < min)
- l = min;
+ l = PA_MAX(c->length, min);
n = pa_memblock_new(pa_memblock_get_pool(c->memblock), l);
- tdata = pa_memblock_acquire(n);
+
sdata = pa_memblock_acquire(c->memblock);
+ tdata = pa_memblock_acquire(n);
+
memcpy(tdata, (uint8_t*) sdata + c->index, c->length);
- pa_memblock_release(n);
+
pa_memblock_release(c->memblock);
+ pa_memblock_release(n);
+
pa_memblock_unref(c->memblock);
+
c->memblock = n;
c->index = 0;
@@ -69,8 +70,7 @@ pa_memchunk* pa_memchunk_make_writable(pa_memchunk *c, size_t min) {
pa_memchunk* pa_memchunk_reset(pa_memchunk *c) {
pa_assert(c);
- c->memblock = NULL;
- c->length = c->index = 0;
+ memset(c, 0, sizeof(*c));
return c;
}
@@ -90,3 +90,23 @@ pa_memchunk *pa_memchunk_will_need(const pa_memchunk *c) {
return (pa_memchunk*) c;
}
+
+pa_memchunk* pa_memchunk_memcpy(pa_memchunk *dst, pa_memchunk *src) {
+ void *p, *q;
+
+ pa_assert(dst);
+ pa_assert(src);
+ pa_assert(dst->length == src->length);
+
+ p = pa_memblock_acquire(dst->memblock);
+ q = pa_memblock_acquire(src->memblock);
+
+ memmove((uint8_t*) p + dst->index,
+ (uint8_t*) q + src->index,
+ dst->length);
+
+ pa_memblock_release(dst->memblock);
+ pa_memblock_release(src->memblock);
+
+ return dst;
+}
diff --git a/src/pulsecore/memchunk.h b/src/pulsecore/memchunk.h
index 20a8432..9458f4f 100644
--- a/src/pulsecore/memchunk.h
+++ b/src/pulsecore/memchunk.h
@@ -1,8 +1,6 @@
#ifndef foomemchunkhfoo
#define foomemchunkhfoo
-/* $Id: memchunk.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -49,4 +47,7 @@ pa_memchunk* pa_memchunk_reset(pa_memchunk *c);
/* Map a memory chunk back into memory if it was swapped out */
pa_memchunk *pa_memchunk_will_need(const pa_memchunk *c);
+/* Copy the data in the src memchunk to the dst memchunk */
+pa_memchunk* pa_memchunk_memcpy(pa_memchunk *dst, pa_memchunk *src);
+
#endif
diff --git a/src/pulsecore/modargs.c b/src/pulsecore/modargs.c
index 4c19a18..9e60125 100644
--- a/src/pulsecore/modargs.c
+++ b/src/pulsecore/modargs.c
@@ -1,5 +1,3 @@
-/* $Id: modargs.c 2050 2007-11-13 17:37:44Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -53,6 +51,12 @@ static int add_key_value(pa_hashmap *map, char *key, char *value, const char* co
pa_assert(key);
pa_assert(value);
+ if (pa_hashmap_get(map, key)) {
+ pa_xfree(key);
+ pa_xfree(value);
+ return -1;
+ }
+
if (valid_keys) {
const char*const* v;
for (v = valid_keys; *v; v++)
@@ -80,7 +84,15 @@ pa_modargs *pa_modargs_new(const char *args, const char* const* valid_keys) {
map = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
if (args) {
- enum { WHITESPACE, KEY, VALUE_START, VALUE_SIMPLE, VALUE_DOUBLE_QUOTES, VALUE_TICKS } state;
+ enum {
+ WHITESPACE,
+ KEY,
+ VALUE_START,
+ VALUE_SIMPLE,
+ VALUE_DOUBLE_QUOTES,
+ VALUE_TICKS
+ } state;
+
const char *p, *key, *value;
size_t key_len = 0, value_len = 0;
@@ -100,6 +112,8 @@ pa_modargs *pa_modargs_new(const char *args, const char* const* valid_keys) {
case KEY:
if (*p == '=')
state = VALUE_START;
+ else if (isspace(*p))
+ goto fail;
else
key_len++;
break;
@@ -169,7 +183,7 @@ fail:
return NULL;
}
-static void free_func(void *p, PA_GCC_UNUSED void*userdata) {
+static void free_func(void *p, void*userdata) {
struct entry *e = p;
pa_assert(e);
@@ -308,8 +322,7 @@ int pa_modargs_get_sample_spec_and_channel_map(pa_modargs *ma, pa_sample_spec *r
if (pa_modargs_get_sample_spec(ma, &ss) < 0)
return -1;
- if (!pa_channel_map_init_auto(&map, ss.channels, def))
- map.channels = 0;
+ pa_channel_map_init_extend(&map, ss.channels, def);
if (pa_modargs_get_channel_map(ma, NULL, &map) < 0)
return -1;
diff --git a/src/pulsecore/modargs.h b/src/pulsecore/modargs.h
index 462f721..23766cf 100644
--- a/src/pulsecore/modargs.h
+++ b/src/pulsecore/modargs.h
@@ -1,8 +1,6 @@
#ifndef foomodargshfoo
#define foomodargshfoo
-/* $Id: modargs.h 2050 2007-11-13 17:37:44Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/modinfo.c b/src/pulsecore/modinfo.c
index e606936..ac4ca88 100644
--- a/src/pulsecore/modinfo.c
+++ b/src/pulsecore/modinfo.c
@@ -1,5 +1,3 @@
-/* $Id: modinfo.c 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/modinfo.h b/src/pulsecore/modinfo.h
index ea8a520..605637c 100644
--- a/src/pulsecore/modinfo.h
+++ b/src/pulsecore/modinfo.h
@@ -1,8 +1,6 @@
#ifndef foomodinfohfoo
#define foomodinfohfoo
-/* $Id: modinfo.h 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index a293bc8..9b17cb9 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -1,5 +1,3 @@
-/* $Id: module.c 2049 2007-11-13 17:35:48Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -50,7 +48,7 @@
#define UNLOAD_POLL_TIME 2
-static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, const struct timeval *tv, void *userdata) {
pa_core *c = PA_CORE(userdata);
struct timeval ntv;
@@ -61,7 +59,7 @@ static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED
pa_module_unload_unused(c);
pa_gettimeofday(&ntv);
- pa_timeval_add(&ntv, UNLOAD_POLL_TIME*1000000);
+ pa_timeval_add(&ntv, UNLOAD_POLL_TIME*PA_USEC_PER_SEC);
m->time_restart(e, &ntv);
}
@@ -78,6 +76,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
m = pa_xnew(pa_module, 1);
m->name = pa_xstrdup(name);
m->argument = pa_xstrdup(argument);
+ m->load_once = FALSE;
if (!(m->dl = lt_dlopenext(name))) {
pa_log("Failed to open module \"%s\": %s", name, lt_dlerror());
@@ -86,7 +85,9 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
if ((load_once = (pa_bool_t (*)(void)) pa_load_sym(m->dl, name, PA_SYMBOL_LOAD_ONCE))) {
- if (load_once() && c->modules) {
+ m->load_once = load_once();
+
+ if (m->load_once && c->modules) {
pa_module *i;
uint32_t idx;
/* OK, the module only wants to be loaded once, let's make sure it is */
@@ -109,8 +110,8 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
m->userdata = NULL;
m->core = c;
m->n_used = -1;
- m->auto_unload = 0;
- m->unload_requested = 0;
+ m->auto_unload = FALSE;
+ m->unload_requested = FALSE;
if (m->init(m) < 0) {
pa_log_error("Failed to load module \"%s\" (argument: \"%s\"): initialization failed.", name, argument ? argument : "");
@@ -120,10 +121,10 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
if (!c->modules)
c->modules = pa_idxset_new(NULL, NULL);
- if (!c->module_auto_unload_event) {
+ if (m->auto_unload && !c->module_auto_unload_event) {
struct timeval ntv;
pa_gettimeofday(&ntv);
- pa_timeval_add(&ntv, UNLOAD_POLL_TIME*1000000);
+ pa_timeval_add(&ntv, UNLOAD_POLL_TIME*PA_USEC_PER_SEC);
c->module_auto_unload_event = c->mainloop->time_new(c->mainloop, &ntv, timeout_callback, c);
}
@@ -155,9 +156,6 @@ static void pa_module_free(pa_module *m) {
pa_assert(m);
pa_assert(m->core);
- if (m->core->disallow_module_loading)
- return;
-
pa_log_info("Unloading \"%s\" (index: #%u).", m->name, m->index);
if (m->done)
@@ -174,47 +172,45 @@ static void pa_module_free(pa_module *m) {
pa_xfree(m);
}
-void pa_module_unload(pa_core *c, pa_module *m) {
+void pa_module_unload(pa_core *c, pa_module *m, pa_bool_t force) {
pa_assert(c);
pa_assert(m);
- pa_assert(c->modules);
+ if (m->core->disallow_module_loading && !force)
+ return;
+
if (!(m = pa_idxset_remove_by_data(c->modules, m, NULL)))
return;
pa_module_free(m);
}
-void pa_module_unload_by_index(pa_core *c, uint32_t idx) {
+void pa_module_unload_by_index(pa_core *c, uint32_t idx, pa_bool_t force) {
pa_module *m;
pa_assert(c);
pa_assert(idx != PA_IDXSET_INVALID);
- if (!(m = pa_idxset_remove_by_index(c->modules, idx)))
+ if (c->disallow_module_loading && !force)
return;
- pa_module_free(m);
-}
+ if (!(m = pa_idxset_remove_by_index(c->modules, idx)))
+ return;
-static void free_callback(void *p, PA_GCC_UNUSED void *userdata) {
- pa_module *m = p;
- pa_assert(m);
pa_module_free(m);
}
void pa_module_unload_all(pa_core *c) {
- pa_module *m;
-
pa_assert(c);
- if (!c->modules)
- return;
+ if (c->modules) {
+ pa_module *m;
- while ((m = pa_idxset_first(c->modules, NULL)))
- pa_module_unload(c, m);
+ while ((m = pa_idxset_steal_first(c->modules, NULL)))
+ pa_module_free(m);
- pa_idxset_free(c->modules, free_callback, NULL);
- c->modules = NULL;
+ pa_idxset_free(c->modules, NULL, NULL);
+ c->modules = NULL;
+ }
if (c->module_auto_unload_event) {
c->mainloop->time_free(c->module_auto_unload_event);
@@ -227,61 +223,56 @@ void pa_module_unload_all(pa_core *c) {
}
}
-static int unused_callback(void *p, PA_GCC_UNUSED uint32_t idx, int *del, void *userdata) {
- pa_module *m = p;
- time_t *now = userdata;
-
- pa_assert(m);
- pa_assert(del);
- pa_assert(now);
-
- if (m->n_used == 0 && m->auto_unload && m->last_used_time+m->core->module_idle_time <= *now) {
- pa_module_free(m);
- *del = 1;
- }
-
- return 0;
-}
-
void pa_module_unload_unused(pa_core *c) {
+ void *state = NULL;
time_t now;
+ pa_module *m;
+
pa_assert(c);
if (!c->modules)
return;
time(&now);
- pa_idxset_foreach(c->modules, unused_callback, &now);
-}
-static int unload_callback(void *p, PA_GCC_UNUSED uint32_t idx, int *del, PA_GCC_UNUSED void *userdata) {
- pa_module *m = p;
- pa_assert(m);
+ while ((m = pa_idxset_iterate(c->modules, &state, NULL))) {
- if (m->unload_requested) {
- pa_module_free(m);
- *del = 1;
- }
+ if (m->n_used > 0)
+ continue;
- return 0;
+ if (!m->auto_unload)
+ continue;
+
+ if (m->last_used_time + m->core->module_idle_time > now)
+ continue;
+
+ pa_module_unload(c, m, FALSE);
+ }
}
static void defer_cb(pa_mainloop_api*api, pa_defer_event *e, void *userdata) {
- pa_core *core = PA_CORE(userdata);
+ void *state = NULL;
+ pa_core *c = PA_CORE(userdata);
+ pa_module *m;
- pa_core_assert_ref(core);
+ pa_core_assert_ref(c);
api->defer_enable(e, 0);
- if (!core->modules)
+ if (!c->modules)
return;
- pa_idxset_foreach(core->modules, unload_callback, NULL);
+ while ((m = pa_idxset_iterate(c->modules, &state, NULL)))
+ if (m->unload_requested)
+ pa_module_unload(c, m, TRUE);
}
-void pa_module_unload_request(pa_module *m) {
+void pa_module_unload_request(pa_module *m, pa_bool_t force) {
pa_assert(m);
- m->unload_requested = 1;
+ if (m->core->disallow_module_loading && !force)
+ return;
+
+ m->unload_requested = TRUE;
if (!m->core->module_defer_unload_event)
m->core->module_defer_unload_event = m->core->mainloop->defer_new(m->core->mainloop, defer_cb, m->core);
diff --git a/src/pulsecore/module.h b/src/pulsecore/module.h
index 4e08ab1..365ab67 100644
--- a/src/pulsecore/module.h
+++ b/src/pulsecore/module.h
@@ -1,8 +1,6 @@
#ifndef foomodulehfoo
#define foomodulehfoo
-/* $Id: module.h 2043 2007-11-09 18:25:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -45,20 +43,22 @@ struct pa_module {
void *userdata;
int n_used;
- int auto_unload;
- time_t last_used_time;
- int unload_requested;
+ pa_bool_t auto_unload:1;
+ pa_bool_t load_once:1;
+ pa_bool_t unload_requested:1;
+
+ time_t last_used_time;
};
pa_module* pa_module_load(pa_core *c, const char *name, const char*argument);
-void pa_module_unload(pa_core *c, pa_module *m);
-void pa_module_unload_by_index(pa_core *c, uint32_t idx);
+void pa_module_unload(pa_core *c, pa_module *m, pa_bool_t force);
+void pa_module_unload_by_index(pa_core *c, uint32_t idx, pa_bool_t force);
void pa_module_unload_all(pa_core *c);
void pa_module_unload_unused(pa_core *c);
-void pa_module_unload_request(pa_module *m);
+void pa_module_unload_request(pa_module *m, pa_bool_t force);
void pa_module_set_used(pa_module*m, int used);
diff --git a/src/pulsecore/msgobject.c b/src/pulsecore/msgobject.c
index d00e8d0..81417ea 100644
--- a/src/pulsecore/msgobject.c
+++ b/src/pulsecore/msgobject.c
@@ -1,5 +1,3 @@
-/* $Id: msgobject.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/msgobject.h b/src/pulsecore/msgobject.h
index 7e386c9..1a43fa3 100644
--- a/src/pulsecore/msgobject.h
+++ b/src/pulsecore/msgobject.h
@@ -1,8 +1,6 @@
#ifndef foopulsemsgobjecthfoo
#define foopulsemsgobjecthfoo
-/* $Id: msgobject.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/mutex-posix.c b/src/pulsecore/mutex-posix.c
index 45eec65..35465b7 100644
--- a/src/pulsecore/mutex-posix.c
+++ b/src/pulsecore/mutex-posix.c
@@ -1,5 +1,3 @@
-/* $Id: mutex-posix.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -92,6 +90,18 @@ void pa_mutex_lock(pa_mutex *m) {
pa_assert_se(pthread_mutex_lock(&m->mutex) == 0);
}
+pa_bool_t pa_mutex_try_lock(pa_mutex *m) {
+ int r;
+ pa_assert(m);
+
+ if ((r = pthread_mutex_trylock(&m->mutex)) != 0) {
+ pa_assert(r == EBUSY);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
void pa_mutex_unlock(pa_mutex *m) {
pa_assert(m);
diff --git a/src/pulsecore/mutex-win32.c b/src/pulsecore/mutex-win32.c
index f75767c..5e884e7 100644
--- a/src/pulsecore/mutex-win32.c
+++ b/src/pulsecore/mutex-win32.c
@@ -1,5 +1,3 @@
-/* $Id: mutex-win32.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/mutex.h b/src/pulsecore/mutex.h
index 9d6f3b1..36e1d63 100644
--- a/src/pulsecore/mutex.h
+++ b/src/pulsecore/mutex.h
@@ -1,8 +1,6 @@
#ifndef foopulsemutexhfoo
#define foopulsemutexhfoo
-/* $Id: mutex.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -37,6 +35,7 @@ pa_mutex* pa_mutex_new(pa_bool_t recursive, pa_bool_t inherit_priority);
void pa_mutex_free(pa_mutex *m);
void pa_mutex_lock(pa_mutex *m);
+pa_bool_t pa_mutex_try_lock(pa_mutex *m);
void pa_mutex_unlock(pa_mutex *m);
typedef struct pa_cond pa_cond;
diff --git a/src/pulsecore/namereg.c b/src/pulsecore/namereg.c
index 0c11621..ecd8def 100644
--- a/src/pulsecore/namereg.c
+++ b/src/pulsecore/namereg.c
@@ -1,5 +1,3 @@
-/* $Id: namereg.c 1981 2007-10-29 20:01:49Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -47,12 +45,13 @@ struct namereg_entry {
void *data;
};
-static int is_valid_char(char c) {
+static pa_bool_t is_valid_char(char c) {
return
(c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
(c >= '0' && c <= '9') ||
c == '.' ||
+ c == '-' ||
c == '_';
}
@@ -72,17 +71,17 @@ pa_bool_t pa_namereg_is_valid_name(const char *name) {
return TRUE;
}
-static char* cleanup_name(const char *name) {
+char* pa_namereg_make_valid_name(const char *name) {
const char *a;
char *b, *n;
if (*name == 0)
return NULL;
- n = pa_xnew(char, strlen(name)+1);
+ n = pa_xmalloc(strlen(name)+1);
for (a = name, b = n; *a && (a-name < PA_NAME_MAX); a++, b++)
- *b = is_valid_char(*a) ? *a : '_';
+ *b = (char) (is_valid_char(*a) ? *a : '_');
*b = 0;
@@ -99,7 +98,7 @@ void pa_namereg_free(pa_core *c) {
pa_hashmap_free(c->namereg, NULL, NULL);
}
-const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, int fail) {
+const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, pa_bool_t fail) {
struct namereg_entry *e;
char *n = NULL;
@@ -111,12 +110,12 @@ const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t
return NULL;
if ((type == PA_NAMEREG_SINK || type == PA_NAMEREG_SOURCE) &&
- !pa_namereg_is_valid_name(name) ) {
+ !pa_namereg_is_valid_name(name)) {
if (fail)
return NULL;
- if (!(name = n = cleanup_name(name)))
+ if (!(name = n = pa_namereg_make_valid_name(name)))
return NULL;
}
@@ -138,7 +137,7 @@ const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t
return NULL;
}
- k = pa_xnew(char, l+4);
+ k = pa_xmalloc(l+4);
for (i = 2; i <= 99; i++) {
pa_snprintf(k, l+4, "%s.%u", name, i);
@@ -179,7 +178,7 @@ void pa_namereg_unregister(pa_core *c, const char *name) {
pa_xfree(e);
}
-void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, int autoload) {
+void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, pa_bool_t autoload) {
struct namereg_entry *e;
uint32_t idx;
pa_assert(c);
diff --git a/src/pulsecore/namereg.h b/src/pulsecore/namereg.h
index d12d8c0..f458100 100644
--- a/src/pulsecore/namereg.h
+++ b/src/pulsecore/namereg.h
@@ -1,8 +1,6 @@
#ifndef foonamereghfoo
#define foonamereghfoo
-/* $Id: namereg.h 1981 2007-10-29 20:01:49Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -37,14 +35,15 @@ typedef enum pa_namereg_type {
void pa_namereg_free(pa_core *c);
-const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, int fail);
+const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t type, void *data, pa_bool_t fail);
void pa_namereg_unregister(pa_core *c, const char *name);
-void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, int autoload);
+void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, pa_bool_t autoload);
int pa_namereg_set_default(pa_core*c, const char *name, pa_namereg_type_t type);
const char *pa_namereg_get_default_sink_name(pa_core *c);
const char *pa_namereg_get_default_source_name(pa_core *c);
pa_bool_t pa_namereg_is_valid_name(const char *name);
+char* pa_namereg_make_valid_name(const char *name);
#endif
diff --git a/src/pulsecore/native-common.h b/src/pulsecore/native-common.h
index b4b57d4..8138b7a 100644
--- a/src/pulsecore/native-common.h
+++ b/src/pulsecore/native-common.h
@@ -1,8 +1,6 @@
#ifndef foonativecommonhfoo
#define foonativecommonhfoo
-/* $Id: native-common.h 2064 2007-11-21 01:20:16Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -126,7 +124,7 @@ enum {
PA_COMMAND_SUSPEND_SINK,
PA_COMMAND_SUSPEND_SOURCE,
- /* Supported since protocol v13 (0.9.8) */
+ /* Supported since protocol v12 (0.9.8) */
PA_COMMAND_SET_PLAYBACK_STREAM_BUFFER_ATTR,
PA_COMMAND_SET_RECORD_STREAM_BUFFER_ATTR,
@@ -139,6 +137,20 @@ enum {
PA_COMMAND_PLAYBACK_STREAM_MOVED,
PA_COMMAND_RECORD_STREAM_MOVED,
+ /* Supported since protocol v13 (0.9.11) */
+ PA_COMMAND_UPDATE_RECORD_STREAM_PROPLIST,
+ PA_COMMAND_UPDATE_PLAYBACK_STREAM_PROPLIST,
+ PA_COMMAND_UPDATE_CLIENT_PROPLIST,
+ PA_COMMAND_REMOVE_RECORD_STREAM_PROPLIST,
+ PA_COMMAND_REMOVE_PLAYBACK_STREAM_PROPLIST,
+ PA_COMMAND_REMOVE_CLIENT_PROPLIST,
+
+ /* SERVER->CLIENT */
+ PA_COMMAND_STARTED,
+
+ /* Supported since protocol v14 (0.9.12) */
+ PA_COMMAND_EXTENSION,
+
PA_COMMAND_MAX
};
@@ -152,7 +164,6 @@ enum {
#define PA_NATIVE_DEFAULT_UNIX_SOCKET "native"
-
PA_C_DECL_END
#endif
diff --git a/src/pulsecore/object.c b/src/pulsecore/object.c
index dc9e343..9a2f28f 100644
--- a/src/pulsecore/object.c
+++ b/src/pulsecore/object.c
@@ -1,5 +1,3 @@
-/* $Id: object.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/object.h b/src/pulsecore/object.h
index 7d3f9b0..2ee4fc3 100644
--- a/src/pulsecore/object.h
+++ b/src/pulsecore/object.h
@@ -1,8 +1,6 @@
#ifndef foopulseobjecthfoo
#define foopulseobjecthfoo
-/* $Id: object.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -44,7 +42,7 @@ struct pa_object {
pa_object *pa_object_new_internal(size_t size, const char *type_name, int (*check_type)(const char *type_name));
#define pa_object_new(type) ((type*) pa_object_new_internal(sizeof(type), #type, type##_check_type)
-#define pa_object_free ((void (*) (pa_object* o)) pa_xfree)
+#define pa_object_free ((void (*) (pa_object* _obj)) pa_xfree)
int pa_object_check_type(const char *type);
diff --git a/src/pulsecore/once.c b/src/pulsecore/once.c
index 0cb1f17..989741d 100644
--- a/src/pulsecore/once.c
+++ b/src/pulsecore/once.c
@@ -1,5 +1,3 @@
-/* $Id: once.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/once.h b/src/pulsecore/once.h
index 5f8f50f..576d40f 100644
--- a/src/pulsecore/once.h
+++ b/src/pulsecore/once.h
@@ -1,8 +1,6 @@
#ifndef foopulseoncehfoo
#define foopulseoncehfoo
-/* $Id: once.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/packet.c b/src/pulsecore/packet.c
index 75da59f..cee468b 100644
--- a/src/pulsecore/packet.c
+++ b/src/pulsecore/packet.c
@@ -1,5 +1,3 @@
-/* $Id: packet.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/packet.h b/src/pulsecore/packet.h
index ab8ab59..5989b1f 100644
--- a/src/pulsecore/packet.h
+++ b/src/pulsecore/packet.h
@@ -1,8 +1,6 @@
#ifndef foopackethfoo
#define foopackethfoo
-/* $Id: packet.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/parseaddr.c b/src/pulsecore/parseaddr.c
index 205efbc..c5cd7fe 100644
--- a/src/pulsecore/parseaddr.c
+++ b/src/pulsecore/parseaddr.c
@@ -1,5 +1,3 @@
-/* $Id: parseaddr.c 1998 2007-10-30 14:05:18Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -53,20 +51,29 @@ static char *parse_host(const char *s, uint16_t *ret_port) {
if (!(e = strchr(s+1, ']')))
return NULL;
- if (e[1] == ':')
- *ret_port = atoi(e+2);
- else if (e[1] != 0)
+ if (e[1] == ':') {
+ uint32_t p;
+
+ if (pa_atou(e+2, &p) < 0)
+ return NULL;
+
+ *ret_port = (uint16_t) p;
+ } else if (e[1] != 0)
return NULL;
- return pa_xstrndup(s+1, e-s-1);
+ return pa_xstrndup(s+1, (size_t) (e-s-1));
} else {
char *e;
+ uint32_t p;
if (!(e = strrchr(s, ':')))
return pa_xstrdup(s);
- *ret_port = atoi(e+1);
- return pa_xstrndup(s, e-s);
+ if (pa_atou(e+1, &p) < 0)
+ return NULL;
+
+ *ret_port = (uint16_t) p;
+ return pa_xstrndup(s, (size_t) (e-s));
}
}
diff --git a/src/pulsecore/parseaddr.h b/src/pulsecore/parseaddr.h
index f03dbad..5fbcb9a 100644
--- a/src/pulsecore/parseaddr.h
+++ b/src/pulsecore/parseaddr.h
@@ -1,8 +1,6 @@
#ifndef fooparseaddrhfoo
#define fooparseaddrhfoo
-/* $Id: parseaddr.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/pdispatch.c b/src/pulsecore/pdispatch.c
index 1ab944c..00df0f7 100644
--- a/src/pulsecore/pdispatch.c
+++ b/src/pulsecore/pdispatch.c
@@ -1,5 +1,3 @@
-/* $Id: pdispatch.c 2057 2007-11-14 16:10:36Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -257,7 +255,7 @@ finish:
return ret;
}
-static void timeout_callback(pa_mainloop_api*m, pa_time_event*e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+static void timeout_callback(pa_mainloop_api*m, pa_time_event*e, const struct timeval *tv, void *userdata) {
struct reply_info*r = userdata;
pa_assert(r);
diff --git a/src/pulsecore/pdispatch.h b/src/pulsecore/pdispatch.h
index c946255..5c31d80 100644
--- a/src/pulsecore/pdispatch.h
+++ b/src/pulsecore/pdispatch.h
@@ -1,8 +1,6 @@
#ifndef foopdispatchhfoo
#define foopdispatchhfoo
-/* $Id: pdispatch.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/pid.c b/src/pulsecore/pid.c
index 4d2c48e..ce8ef19 100644
--- a/src/pulsecore/pid.c
+++ b/src/pulsecore/pid.c
@@ -1,5 +1,3 @@
-/* $Id: pid.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -75,6 +73,7 @@ static pid_t read_pid(const char *fn, int fd) {
if (pa_atou(t, &pid) < 0) {
pa_log_warn("Failed to parse PID file '%s'", fn);
+ errno = EINVAL;
return (pid_t) -1;
}
@@ -112,7 +111,7 @@ static int open_pid_file(const char *fn, int mode) {
goto fail;
}
- /* Does the file still exist in the file system? When ye, w're done, otherwise restart */
+ /* Does the file still exist in the file system? When yes, we're done, otherwise restart */
if (st.st_nlink >= 1)
break;
@@ -133,27 +132,78 @@ static int open_pid_file(const char *fn, int mode) {
fail:
if (fd >= 0) {
+ int saved_errno = errno;
pa_lock_fd(fd, 0);
pa_close(fd);
+ errno = saved_errno;
}
return -1;
}
+static int proc_name_ours(pid_t pid, const char *procname) {
+#ifdef __linux__
+ char bn[PATH_MAX];
+ FILE *f;
+
+ pa_snprintf(bn, sizeof(bn), "/proc/%lu/stat", (unsigned long) pid);
+
+ if (!(f = fopen(bn, "r"))) {
+ pa_log_info("Failed to open %s: %s", bn, pa_cstrerror(errno));
+ return -1;
+ } else {
+ char *expected;
+ pa_bool_t good;
+ char stored[64];
+
+ if (!(fgets(stored, sizeof(stored), f))) {
+ int saved_errno = feof(f) ? EINVAL : errno;
+ pa_log_info("Failed to read from %s: %s", bn, feof(f) ? "EOF" : pa_cstrerror(errno));
+ fclose(f);
+
+ errno = saved_errno;
+ return -1;
+ }
+
+ fclose(f);
+
+ expected = pa_sprintf_malloc("%lu (%s)", (unsigned long) pid, procname);
+ good = pa_startswith(stored, expected);
+ pa_xfree(expected);
+
+#if !defined(__OPTIMIZE__)
+ if (!good) {
+ /* libtool likes to rename our binary names ... */
+ expected = pa_sprintf_malloc("%lu (lt-%s)", (unsigned long) pid, procname);
+ good = pa_startswith(stored, expected);
+ pa_xfree(expected);
+ }
+#endif
+
+ return !!good;
+ }
+#else
+
+ return 1;
+#endif
+
+}
+
/* Create a new PID file for the current process. */
-int pa_pid_file_create(void) {
+int pa_pid_file_create(const char *procname) {
int fd = -1;
int ret = -1;
- char fn[PATH_MAX];
char t[20];
pid_t pid;
size_t l;
+ char *fn;
#ifdef OS_IS_WIN32
HANDLE process;
#endif
- pa_runtime_path("pid", fn, sizeof(fn));
+ if (!(fn = pa_runtime_path("pid")))
+ goto fail;
if ((fd = open_pid_file(fn, O_CREAT|O_RDWR)) < 0)
goto fail;
@@ -161,21 +211,31 @@ int pa_pid_file_create(void) {
if ((pid = read_pid(fn, fd)) == (pid_t) -1)
pa_log_warn("Corrupt PID file, overwriting.");
else if (pid > 0) {
+
#ifdef OS_IS_WIN32
if ((process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid)) != NULL) {
CloseHandle(process);
#else
if (kill(pid, 0) >= 0 || errno != ESRCH) {
#endif
- pa_log("Daemon already running.");
- goto fail;
+ int ours = 1;
+
+ if (procname)
+ if ((ours = proc_name_ours(pid, procname)) < 0)
+ goto fail;
+
+ if (ours) {
+ pa_log("Daemon already running.");
+ ret = 1;
+ goto fail;
+ }
}
pa_log_warn("Stale PID file, overwriting.");
}
/* Overwrite the current PID file */
- if (lseek(fd, 0, SEEK_SET) == (off_t) -1 || ftruncate(fd, 0) < 0) {
+ if (lseek(fd, (off_t) 0, SEEK_SET) == (off_t) -1 || ftruncate(fd, (off_t) 0) < 0) {
pa_log("Failed to truncate PID file '%s': %s", fn, pa_cstrerror(errno));
goto fail;
}
@@ -200,17 +260,20 @@ fail:
}
}
+ pa_xfree(fn);
+
return ret;
}
/* Remove the PID file, if it is ours */
int pa_pid_file_remove(void) {
int fd = -1;
- char fn[PATH_MAX];
+ char *fn;
int ret = -1;
pid_t pid;
- pa_runtime_path("pid", fn, sizeof(fn));
+ if (!(fn = pa_runtime_path("pid")))
+ goto fail;
if ((fd = open_pid_file(fn, O_RDWR)) < 0) {
pa_log_warn("Failed to open PID file '%s': %s", fn, pa_cstrerror(errno));
@@ -225,14 +288,14 @@ int pa_pid_file_remove(void) {
goto fail;
}
- if (ftruncate(fd, 0) < 0) {
+ if (ftruncate(fd, (off_t) 0) < 0) {
pa_log_warn("Failed to truncate PID file '%s': %s", fn, pa_cstrerror(errno));
goto fail;
}
#ifdef OS_IS_WIN32
pa_lock_fd(fd, 0);
- close(fd);
+ pa_close(fd);
fd = -1;
#endif
@@ -254,6 +317,8 @@ fail:
}
}
+ pa_xfree(fn);
+
return ret;
}
@@ -261,8 +326,8 @@ fail:
* exists and the PID therein too. Returns 0 on succcess, -1
* otherwise. If pid is non-NULL and a running daemon was found,
* return its PID therein */
-int pa_pid_file_check_running(pid_t *pid, const char *binary_name) {
- return pa_pid_file_kill(0, pid, binary_name);
+int pa_pid_file_check_running(pid_t *pid, const char *procname) {
+ return pa_pid_file_kill(0, pid, procname);
}
#ifndef OS_IS_WIN32
@@ -270,55 +335,61 @@ int pa_pid_file_check_running(pid_t *pid, const char *binary_name) {
/* Kill a current running daemon. Return non-zero on success, -1
* otherwise. If successful *pid contains the PID of the daemon
* process. */
-int pa_pid_file_kill(int sig, pid_t *pid, const char *binary_name) {
+int pa_pid_file_kill(int sig, pid_t *pid, const char *procname) {
int fd = -1;
- char fn[PATH_MAX];
+ char *fn;
int ret = -1;
pid_t _pid;
#ifdef __linux__
char *e = NULL;
#endif
+
if (!pid)
pid = &_pid;
- pa_runtime_path("pid", fn, sizeof(fn));
+ if (!(fn = pa_runtime_path("pid")))
+ goto fail;
+
+ if ((fd = open_pid_file(fn, O_RDONLY)) < 0) {
+
+ if (errno == ENOENT)
+ errno = ESRCH;
- if ((fd = open_pid_file(fn, O_RDONLY)) < 0)
goto fail;
+ }
if ((*pid = read_pid(fn, fd)) == (pid_t) -1)
goto fail;
-#ifdef __linux__
- if (binary_name) {
- pa_snprintf(fn, sizeof(fn), "/proc/%lu/exe", (unsigned long) pid);
-
- if ((e = pa_readlink(fn))) {
- char *f = pa_path_get_filename(e);
- if (strcmp(f, binary_name)
-#if defined(__OPTIMIZE__)
- /* libtool likes to rename our binary names ... */
- && !(pa_startswith(f, "lt-") && strcmp(f+3, binary_name) == 0)
-#endif
- )
- goto fail;
+ if (procname) {
+ int ours;
+
+ if ((ours = proc_name_ours(*pid, procname)) < 0)
+ goto fail;
+
+ if (!ours) {
+ errno = ESRCH;
+ goto fail;
}
}
-#endif
ret = kill(*pid, sig);
fail:
if (fd >= 0) {
+ int saved_errno = errno;
pa_lock_fd(fd, 0);
pa_close(fd);
+ errno = saved_errno;
}
#ifdef __linux__
pa_xfree(e);
#endif
+ pa_xfree(fn);
+
return ret;
}
diff --git a/src/pulsecore/pid.h b/src/pulsecore/pid.h
index 6762c11..3c8a9de 100644
--- a/src/pulsecore/pid.h
+++ b/src/pulsecore/pid.h
@@ -1,8 +1,6 @@
#ifndef foopidhfoo
#define foopidhfoo
-/* $Id: pid.h 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -24,9 +22,9 @@
USA.
***/
-int pa_pid_file_create(void);
+int pa_pid_file_create(const char *procname);
int pa_pid_file_remove(void);
-int pa_pid_file_check_running(pid_t *pid, const char *binary_name);
-int pa_pid_file_kill(int sig, pid_t *pid, const char *binary_name);
+int pa_pid_file_check_running(pid_t *pid, const char *procname);
+int pa_pid_file_kill(int sig, pid_t *pid, const char *procname);
#endif
diff --git a/src/pulsecore/pipe.c b/src/pulsecore/pipe.c
index e3ae67f..93d78a2 100644
--- a/src/pulsecore/pipe.c
+++ b/src/pulsecore/pipe.c
@@ -1,5 +1,3 @@
-/* $Id: pipe.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/pipe.h b/src/pulsecore/pipe.h
index 8fdf27d..9a7e62c 100644
--- a/src/pulsecore/pipe.h
+++ b/src/pulsecore/pipe.h
@@ -1,8 +1,6 @@
#ifndef foopipehfoo
#define foopipehfoo
-/* $Id: pipe.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/play-memblockq.c b/src/pulsecore/play-memblockq.c
index 1c0b427..86edfe9 100644
--- a/src/pulsecore/play-memblockq.c
+++ b/src/pulsecore/play-memblockq.c
@@ -1,9 +1,7 @@
-/* $Id: play-memblockq.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2006 Lennart Poettering
+ Copyright 2006-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -30,10 +28,11 @@
#include <string.h>
#include <pulse/xmalloc.h>
+#include <pulse/gccmacro.h>
#include <pulsecore/sink-input.h>
-#include <pulsecore/gccmacro.h>
#include <pulsecore/thread-mq.h>
+#include <pulsecore/sample-util.h>
#include "play-memblockq.h"
@@ -59,7 +58,6 @@ static void memblockq_stream_unlink(memblockq_stream *u) {
return;
pa_sink_input_unlink(u->sink_input);
-
pa_sink_input_unref(u->sink_input);
u->sink_input = NULL;
@@ -70,8 +68,6 @@ static void memblockq_stream_free(pa_object *o) {
memblockq_stream *u = MEMBLOCKQ_STREAM(o);
pa_assert(u);
- memblockq_stream_unlink(u);
-
if (u->memblockq)
pa_memblockq_free(u->memblockq);
@@ -92,15 +88,34 @@ static int memblockq_stream_process_msg(pa_msgobject *o, int code, void*userdata
}
static void sink_input_kill_cb(pa_sink_input *i) {
+ memblockq_stream *u;
+
pa_sink_input_assert_ref(i);
+ u = MEMBLOCKQ_STREAM(i->userdata);
+ memblockq_stream_assert_ref(u);
- memblockq_stream_unlink(MEMBLOCKQ_STREAM(i->userdata));
+ memblockq_stream_unlink(u);
}
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+/* Called from IO thread context */
+static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
memblockq_stream *u;
- pa_assert(i);
+ pa_sink_input_assert_ref(i);
+ u = MEMBLOCKQ_STREAM(i->userdata);
+ memblockq_stream_assert_ref(u);
+
+ /* If we are added for the first time, ask for a rewinding so that
+ * we are heard right-away. */
+ if (PA_SINK_INPUT_IS_LINKED(state) &&
+ i->thread_info.state == PA_SINK_INPUT_INIT)
+ pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
+}
+
+static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) {
+ memblockq_stream *u;
+
+ pa_sink_input_assert_ref(i);
pa_assert(chunk);
u = MEMBLOCKQ_STREAM(i->userdata);
memblockq_stream_assert_ref(u);
@@ -109,36 +124,57 @@ static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chun
return -1;
if (pa_memblockq_peek(u->memblockq, chunk) < 0) {
- pa_memblockq_free(u->memblockq);
- u->memblockq = NULL;
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u), MEMBLOCKQ_STREAM_MESSAGE_UNLINK, NULL, 0, NULL, NULL);
+
+ if (pa_sink_input_safe_to_remove(i)) {
+
+ pa_memblockq_free(u->memblockq);
+ u->memblockq = NULL;
+
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u), MEMBLOCKQ_STREAM_MESSAGE_UNLINK, NULL, 0, NULL, NULL);
+ }
+
return -1;
}
+ chunk->length = PA_MIN(chunk->length, nbytes);
+ pa_memblockq_drop(u->memblockq, chunk->length);
+
return 0;
}
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
memblockq_stream *u;
- pa_assert(i);
- pa_assert(length > 0);
+ pa_sink_input_assert_ref(i);
u = MEMBLOCKQ_STREAM(i->userdata);
memblockq_stream_assert_ref(u);
if (!u->memblockq)
return;
- pa_memblockq_drop(u->memblockq, length);
+ pa_memblockq_rewind(u->memblockq, nbytes);
+}
+
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ memblockq_stream *u;
+
+ pa_sink_input_assert_ref(i);
+ u = MEMBLOCKQ_STREAM(i->userdata);
+ memblockq_stream_assert_ref(u);
+
+ if (!u->memblockq)
+ return;
+
+ pa_memblockq_set_maxrewind(u->memblockq, nbytes);
}
pa_sink_input* pa_memblockq_sink_input_new(
pa_sink *sink,
- const char *name,
const pa_sample_spec *ss,
const pa_channel_map *map,
pa_memblockq *q,
- pa_cvolume *volume) {
+ pa_cvolume *volume,
+ pa_proplist *p) {
memblockq_stream *u = NULL;
pa_sink_input_new_data data;
@@ -149,41 +185,36 @@ pa_sink_input* pa_memblockq_sink_input_new(
/* We allow creating this stream with no q set, so that it can be
* filled in later */
- if (q && pa_memblockq_get_length(q) <= 0) {
- pa_memblockq_free(q);
- return NULL;
- }
-
- if (volume && pa_cvolume_is_muted(volume)) {
- pa_memblockq_free(q);
- return NULL;
- }
-
u = pa_msgobject_new(memblockq_stream);
u->parent.parent.free = memblockq_stream_free;
u->parent.process_msg = memblockq_stream_process_msg;
u->core = sink->core;
u->sink_input = NULL;
- u->memblockq = q;
+ u->memblockq = NULL;
pa_sink_input_new_data_init(&data);
data.sink = sink;
- data.name = name;
data.driver = __FILE__;
pa_sink_input_new_data_set_sample_spec(&data, ss);
pa_sink_input_new_data_set_channel_map(&data, map);
pa_sink_input_new_data_set_volume(&data, volume);
+ pa_proplist_update(data.proplist, PA_UPDATE_REPLACE, p);
+
+ u->sink_input = pa_sink_input_new(sink->core, &data, 0);
+ pa_sink_input_new_data_done(&data);
- if (!(u->sink_input = pa_sink_input_new(sink->core, &data, 0)))
+ if (!u->sink_input)
goto fail;
- u->sink_input->peek = sink_input_peek_cb;
- u->sink_input->drop = sink_input_drop_cb;
+ u->sink_input->pop = sink_input_pop_cb;
+ u->sink_input->process_rewind = sink_input_process_rewind_cb;
+ u->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
u->sink_input->kill = sink_input_kill_cb;
+ u->sink_input->state_change = sink_input_state_change_cb;
u->sink_input->userdata = u;
if (q)
- pa_memblockq_prebuf_disable(q);
+ pa_memblockq_sink_input_set_queue(u->sink_input, q);
/* The reference to u is dangling here, because we want
* to keep this stream around until it is fully played. */
@@ -202,11 +233,12 @@ fail:
int pa_play_memblockq(
pa_sink *sink,
- const char *name,
const pa_sample_spec *ss,
const pa_channel_map *map,
pa_memblockq *q,
- pa_cvolume *volume) {
+ pa_cvolume *volume,
+ pa_proplist *p,
+ uint32_t *sink_input_index) {
pa_sink_input *i;
@@ -214,10 +246,14 @@ int pa_play_memblockq(
pa_assert(ss);
pa_assert(q);
- if (!(i = pa_memblockq_sink_input_new(sink, name, ss, map, q, volume)))
+ if (!(i = pa_memblockq_sink_input_new(sink, ss, map, q, volume, p)))
return -1;
pa_sink_input_put(i);
+
+ if (sink_input_index)
+ *sink_input_index = i->index;
+
pa_sink_input_unref(i);
return 0;
@@ -232,5 +268,10 @@ void pa_memblockq_sink_input_set_queue(pa_sink_input *i, pa_memblockq *q) {
if (u->memblockq)
pa_memblockq_free(u->memblockq);
- u->memblockq = q;
+
+ if ((u->memblockq = q)) {
+ pa_memblockq_set_prebuf(q, 0);
+ pa_memblockq_set_silence(q, NULL);
+ pa_memblockq_willneed(q);
+ }
}
diff --git a/src/pulsecore/play-memblockq.h b/src/pulsecore/play-memblockq.h
index 43a4bfb..1a42867 100644
--- a/src/pulsecore/play-memblockq.h
+++ b/src/pulsecore/play-memblockq.h
@@ -1,8 +1,6 @@
#ifndef fooplaymemblockqhfoo
#define fooplaymemblockqhfoo
-/* $Id: play-memblockq.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,20 +27,21 @@
pa_sink_input* pa_memblockq_sink_input_new(
pa_sink *sink,
- const char *name,
const pa_sample_spec *ss,
const pa_channel_map *map,
pa_memblockq *q,
- pa_cvolume *volume);
+ pa_cvolume *volume,
+ pa_proplist *p);
void pa_memblockq_sink_input_set_queue(pa_sink_input *i, pa_memblockq *q);
int pa_play_memblockq(
pa_sink *sink,
- const char *name,
const pa_sample_spec *ss,
const pa_channel_map *map,
pa_memblockq *q,
- pa_cvolume *cvolume);
+ pa_cvolume *cvolume,
+ pa_proplist *p,
+ uint32_t *sink_input_index);
#endif
diff --git a/src/pulsecore/play-memchunk.c b/src/pulsecore/play-memchunk.c
index 7ada60e..0dd4825 100644
--- a/src/pulsecore/play-memchunk.c
+++ b/src/pulsecore/play-memchunk.c
@@ -1,9 +1,7 @@
-/* $Id: play-memchunk.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -30,167 +28,37 @@
#include <string.h>
#include <pulse/xmalloc.h>
+#include <pulse/gccmacro.h>
#include <pulsecore/sink-input.h>
-#include <pulsecore/gccmacro.h>
#include <pulsecore/thread-mq.h>
+#include <pulsecore/play-memblockq.h>
#include "play-memchunk.h"
-typedef struct memchunk_stream {
- pa_msgobject parent;
- pa_core *core;
- pa_sink_input *sink_input;
- pa_memchunk memchunk;
-} memchunk_stream;
-
-enum {
- MEMCHUNK_STREAM_MESSAGE_UNLINK,
-};
-
-PA_DECLARE_CLASS(memchunk_stream);
-#define MEMCHUNK_STREAM(o) (memchunk_stream_cast(o))
-static PA_DEFINE_CHECK_TYPE(memchunk_stream, pa_msgobject);
-
-static void memchunk_stream_unlink(memchunk_stream *u) {
- pa_assert(u);
-
- if (!u->sink_input)
- return;
-
- pa_sink_input_unlink(u->sink_input);
-
- pa_sink_input_unref(u->sink_input);
- u->sink_input = NULL;
-
- memchunk_stream_unref(u);
-}
-
-static void memchunk_stream_free(pa_object *o) {
- memchunk_stream *u = MEMCHUNK_STREAM(o);
- pa_assert(u);
-
- memchunk_stream_unlink(u);
-
- if (u->memchunk.memblock)
- pa_memblock_unref(u->memchunk.memblock);
-
- pa_xfree(u);
-}
-
-static int memchunk_stream_process_msg(pa_msgobject *o, int code, void*userdata, int64_t offset, pa_memchunk *chunk) {
- memchunk_stream *u = MEMCHUNK_STREAM(o);
- memchunk_stream_assert_ref(u);
-
- switch (code) {
- case MEMCHUNK_STREAM_MESSAGE_UNLINK:
- memchunk_stream_unlink(u);
- break;
- }
-
- return 0;
-}
-
-static void sink_input_kill_cb(pa_sink_input *i) {
- pa_sink_input_assert_ref(i);
-
- memchunk_stream_unlink(MEMCHUNK_STREAM(i->userdata));
-}
-
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
- memchunk_stream *u;
-
- pa_assert(i);
- pa_assert(chunk);
- u = MEMCHUNK_STREAM(i->userdata);
- memchunk_stream_assert_ref(u);
-
- if (!u->memchunk.memblock)
- return -1;
-
- if (u->memchunk.length <= 0) {
- pa_memblock_unref(u->memchunk.memblock);
- u->memchunk.memblock = NULL;
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u), MEMCHUNK_STREAM_MESSAGE_UNLINK, NULL, 0, NULL, NULL);
- return -1;
- }
-
- pa_assert(u->memchunk.memblock);
- *chunk = u->memchunk;
- pa_memblock_ref(chunk->memblock);
-
- return 0;
-}
-
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
- memchunk_stream *u;
-
- pa_assert(i);
- pa_assert(length > 0);
- u = MEMCHUNK_STREAM(i->userdata);
- memchunk_stream_assert_ref(u);
-
- if (length < u->memchunk.length) {
- u->memchunk.length -= length;
- u->memchunk.index += length;
- } else
- u->memchunk.length = 0;
-}
-
int pa_play_memchunk(
pa_sink *sink,
- const char *name,
const pa_sample_spec *ss,
const pa_channel_map *map,
const pa_memchunk *chunk,
- pa_cvolume *volume) {
+ pa_cvolume *volume,
+ pa_proplist *p,
+ uint32_t *sink_input_index) {
- memchunk_stream *u = NULL;
- pa_sink_input_new_data data;
+ pa_memblockq *q;
+ int r;
pa_assert(sink);
pa_assert(ss);
pa_assert(chunk);
- if (volume && pa_cvolume_is_muted(volume))
- return 0;
-
- pa_memchunk_will_need(chunk);
-
- u = pa_msgobject_new(memchunk_stream);
- u->parent.parent.free = memchunk_stream_free;
- u->parent.process_msg = memchunk_stream_process_msg;
- u->core = sink->core;
- u->memchunk = *chunk;
- pa_memblock_ref(u->memchunk.memblock);
-
- pa_sink_input_new_data_init(&data);
- data.sink = sink;
- data.driver = __FILE__;
- data.name = name;
- pa_sink_input_new_data_set_sample_spec(&data, ss);
- pa_sink_input_new_data_set_channel_map(&data, map);
- pa_sink_input_new_data_set_volume(&data, volume);
-
- if (!(u->sink_input = pa_sink_input_new(sink->core, &data, 0)))
- goto fail;
+ q = pa_memblockq_new(0, chunk->length, 0, pa_frame_size(ss), 1, 1, 0, NULL);
+ pa_assert_se(pa_memblockq_push(q, chunk) >= 0);
- u->sink_input->peek = sink_input_peek_cb;
- u->sink_input->drop = sink_input_drop_cb;
- u->sink_input->kill = sink_input_kill_cb;
- u->sink_input->userdata = u;
-
- pa_sink_input_put(u->sink_input);
-
- /* The reference to u is dangling here, because we want to keep
- * this stream around until it is fully played. */
+ if ((r = pa_play_memblockq(sink, ss, map, q, volume, p, sink_input_index)) < 0) {
+ pa_memblockq_free(q);
+ return r;
+ }
return 0;
-
-fail:
- if (u)
- memchunk_stream_unref(u);
-
- return -1;
}
-
diff --git a/src/pulsecore/play-memchunk.h b/src/pulsecore/play-memchunk.h
index 01df35b..c312ae8 100644
--- a/src/pulsecore/play-memchunk.h
+++ b/src/pulsecore/play-memchunk.h
@@ -1,8 +1,6 @@
#ifndef fooplaychunkhfoo
#define fooplaychunkhfoo
-/* $Id: play-memchunk.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -29,10 +27,11 @@
int pa_play_memchunk(
pa_sink *sink,
- const char *name,
const pa_sample_spec *ss,
const pa_channel_map *map,
const pa_memchunk *chunk,
- pa_cvolume *cvolume);
+ pa_cvolume *cvolume,
+ pa_proplist *p,
+ uint32_t *sink_input_index);
#endif
diff --git a/src/pulsecore/poll.c b/src/pulsecore/poll.c
index 625b642..88ac21e 100644
--- a/src/pulsecore/poll.c
+++ b/src/pulsecore/poll.c
@@ -1,5 +1,3 @@
-/* $Id: poll.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/poll.h b/src/pulsecore/poll.h
index e44cf06..86c37a0 100644
--- a/src/pulsecore/poll.h
+++ b/src/pulsecore/poll.h
@@ -1,5 +1,3 @@
-/* $Id: poll.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/prioq.c b/src/pulsecore/prioq.c
new file mode 100644
index 0000000..693dc51
--- /dev/null
+++ b/src/pulsecore/prioq.c
@@ -0,0 +1,256 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulse/xmalloc.h>
+
+#include <pulsecore/flist.h>
+
+#include "prioq.h"
+
+struct pa_prioq_item {
+ void *value;
+ unsigned idx;
+};
+
+struct pa_prioq {
+ pa_prioq_item **items;
+ unsigned n_items;
+ unsigned n_allocated;
+ pa_compare_func_t compare_func;
+};
+
+PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree);
+
+pa_prioq *pa_prioq_new(pa_compare_func_t compare_func) {
+
+ pa_prioq *q;
+
+ q = pa_xnew(pa_prioq, 1);
+ q->compare_func = compare_func;
+ q->n_items = 0;
+ q->n_allocated = 64;
+ q->items = pa_xnew(pa_prioq_item*, q->n_allocated);
+
+ return q;
+}
+
+void pa_prioq_free(pa_prioq *q, pa_free2_cb_t free_cb, void *userdata) {
+ pa_prioq_item **i, **e;
+
+ pa_assert(q);
+
+ for (i = q->items, e = q->items + q->n_items; i < e; i++) {
+
+ if (!*i)
+ continue;
+
+ if (free_cb)
+ free_cb((*i)->value, userdata);
+
+ pa_xfree(*i);
+ }
+
+ pa_xfree(q->items);
+ pa_xfree(q);
+}
+
+static void shuffle_up(pa_prioq *q, pa_prioq_item *i) {
+ unsigned j;
+
+ pa_assert(q);
+ pa_assert(i);
+
+ j = i->idx;
+
+ while (j > 0) {
+ unsigned k;
+
+ k = (j-1)/2;
+
+ if (q->compare_func(q->items[k]->value, i->value) < 0)
+ break;
+
+ q->items[k]->idx = j;
+ q->items[j] = q->items[k];
+
+ j = k;
+ }
+
+ i->idx = j;
+ q->items[j] = i;
+
+}
+
+pa_prioq_item* pa_prioq_put(pa_prioq *q, void *p) {
+ pa_prioq_item *i;
+
+ pa_assert(q);
+
+ if (q->n_items >= q->n_allocated) {
+ q->n_allocated = PA_MAX(q->n_items+1, q->n_allocated)*2;
+ q->items = pa_xrealloc(q->items, sizeof(pa_prioq_item*) * q->n_allocated);
+ }
+
+ if (!(i = pa_flist_pop(PA_STATIC_FLIST_GET(items))))
+ i = pa_xnew(pa_prioq_item, 1);
+
+ i->value = p;
+ i->idx = q->n_items++;
+
+ shuffle_up(q, i);
+
+ return i;
+}
+
+void* pa_prioq_peek(pa_prioq *q) {
+ pa_assert(q);
+
+ if (q->n_items <= 0)
+ return NULL;
+
+ return q->items[0]->value;
+}
+
+void* pa_prioq_pop(pa_prioq *q){
+ pa_assert(q);
+
+ if (q->n_items <= 0)
+ return NULL;
+
+ return pa_prioq_remove(q, q->items[0]);
+}
+
+static void swap(pa_prioq *q, unsigned j, unsigned k) {
+ pa_prioq_item *t;
+
+ pa_assert(q);
+ pa_assert(j < q->n_items);
+ pa_assert(k < q->n_items);
+
+ pa_assert(q->items[j]->idx == j);
+ pa_assert(q->items[k]->idx == k);
+
+ t = q->items[j];
+
+ q->items[j]->idx = k;
+ q->items[j] = q->items[k];
+
+ q->items[k]->idx = j;
+ q->items[k] = t;
+}
+
+static void shuffle_down(pa_prioq *q, unsigned idx) {
+
+ pa_assert(q);
+ pa_assert(idx < q->n_items);
+
+ for (;;) {
+ unsigned j, k, s;
+
+ k = (idx+1)*2; /* right child */
+ j = k-1; /* left child */
+
+ if (j >= q->n_items)
+ break;
+
+ if (q->compare_func(q->items[j]->value, q->items[idx]->value) < 0)
+
+ /* So our left child is smaller than we are, let's
+ * remember this fact */
+ s = j;
+ else
+ s = idx;
+
+ if (k < q->n_items &&
+ q->compare_func(q->items[k]->value, q->items[s]->value) < 0)
+
+ /* So our right child is smaller than we are, let's
+ * remember this fact */
+ s = k;
+
+ /* s now points to the smallest of the three items */
+
+ if (s == idx)
+ /* No swap necessary, we're done */
+ break;
+
+ swap(q, idx, s);
+ idx = s;
+ }
+}
+
+void* pa_prioq_remove(pa_prioq *q, pa_prioq_item *i) {
+ void *p;
+
+ pa_assert(q);
+ pa_assert(i);
+ pa_assert(q->n_items >= 1);
+
+ p = i->value;
+
+ if (q->n_items-1 == i->idx) {
+ /* We are the last entry, so let's just remove us and good */
+ q->n_items--;
+
+ } else {
+
+ /* We are not the last entry, we need to replace ourselves
+ * with the last node and reshuffle */
+
+ q->items[i->idx] = q->items[q->n_items-1];
+ q->items[i->idx]->idx = i->idx;
+ q->n_items--;
+
+ shuffle_down(q, i->idx);
+ }
+
+ if (pa_flist_push(PA_STATIC_FLIST_GET(items), i) < 0)
+ pa_xfree(i);
+
+ return p;
+}
+
+unsigned pa_prioq_size(pa_prioq *q) {
+ pa_assert(q);
+
+ return q->n_items;
+}
+
+pa_bool_t pa_prioq_isempty(pa_prioq *q) {
+ pa_assert(q);
+
+ return q->n_items == 0;
+}
+
+void pa_prioq_reshuffle(pa_prioq *q, pa_prioq_item *i) {
+ pa_assert(q);
+ pa_assert(i);
+
+ /* This will move the entry down as far as necessary */
+ shuffle_down(q, i->idx);
+
+ /* And this will move the entry up as far as necessary */
+ shuffle_up(q, i);
+}
diff --git a/src/pulsecore/prioq.h b/src/pulsecore/prioq.h
new file mode 100644
index 0000000..fd3550b
--- /dev/null
+++ b/src/pulsecore/prioq.h
@@ -0,0 +1,64 @@
+#ifndef foopulsecoreprioqhfoo
+#define foopulsecoreprioqhfoo
+
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#include <inttypes.h>
+
+#include <pulsecore/macro.h>
+#include <pulsecore/idxset.h>
+
+/* A heap-based priority queue. Removal and insertion is O(log
+ * n). Removal can happen a the top or at any position referenced by a
+ * pa_prioq_item. */
+
+typedef struct pa_prioq pa_prioq;
+typedef struct pa_prioq_item pa_prioq_item;
+
+/* Instantiate a new prioq with the specified comparison functions */
+pa_prioq* pa_prioq_new(pa_compare_func_t compare_func);
+
+/* Free the prioq. When the prioq is not empty the specified function is called for every entry contained */
+void pa_prioq_free(pa_prioq *q, pa_free2_cb_t free_cb, void *userdata);
+
+/* Store a new item in the prioq. */
+pa_prioq_item* pa_prioq_put(pa_prioq *q, void* data);
+
+/* Get the item on the top of the queue, but don't remove it from the queue*/
+void* pa_prioq_peek(pa_prioq*q);
+
+/* Get the item on the top of the queue, and remove it from thq queue */
+void* pa_prioq_pop(pa_prioq*q);
+
+/* Remove an arbitrary from theq prioq, returning it's data */
+void* pa_prioq_remove(pa_prioq*q, pa_prioq_item *i);
+
+/* The priority of an item was modified. Adjustthe queue to that */
+void pa_prioq_reshuffle(pa_prioq *q, pa_prioq_item *i);
+
+/* Return the current number of items in the prioq */
+unsigned pa_prioq_size(pa_prioq*s);
+
+/* Return TRUE of the prioq is empty */
+pa_bool_t pa_prioq_isempty(pa_prioq *s);
+
+#endif
diff --git a/src/pulsecore/proplist-util.c b/src/pulsecore/proplist-util.c
new file mode 100644
index 0000000..4d505f5
--- /dev/null
+++ b/src/pulsecore/proplist-util.c
@@ -0,0 +1,118 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <locale.h>
+
+#include <pulse/proplist.h>
+#include <pulse/utf8.h>
+#include <pulse/xmalloc.h>
+#include <pulse/util.h>
+
+#include <pulsecore/core-util.h>
+
+#include "proplist-util.h"
+
+void pa_init_proplist(pa_proplist *p) {
+ int a, b;
+#if !HAVE_DECL_ENVIRON
+ extern char **environ;
+#endif
+ char **e;
+
+ pa_assert(p);
+
+ for (e = environ; *e; e++) {
+
+ if (pa_startswith(*e, "PULSE_PROP_")) {
+ size_t kl = strcspn(*e+11, "=");
+ char *k;
+
+ if ((*e)[11+kl] != '=')
+ continue;
+
+ if (!pa_utf8_valid(*e+11+kl+1))
+ continue;
+
+ k = pa_xstrndup(*e+11, kl);
+
+ if (pa_proplist_contains(p, k)) {
+ pa_xfree(k);
+ continue;
+ }
+
+ pa_proplist_sets(p, k, *e+11+kl+1);
+ pa_xfree(k);
+ }
+ }
+
+ if (!pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_ID)) {
+ char t[32];
+ pa_snprintf(t, sizeof(t), "%lu", (unsigned long) getpid());
+ pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_ID, t);
+ }
+
+ if (!pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_USER)) {
+ char t[64];
+ if (pa_get_user_name(t, sizeof(t))) {
+ char *c = pa_utf8_filter(t);
+ pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_USER, c);
+ pa_xfree(c);
+ }
+ }
+
+ if (!pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_HOST)) {
+ char t[64];
+ if (pa_get_host_name(t, sizeof(t))) {
+ char *c = pa_utf8_filter(t);
+ pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_HOST, c);
+ pa_xfree(c);
+ }
+ }
+
+ a = pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_BINARY);
+ b = pa_proplist_contains(p, PA_PROP_APPLICATION_NAME);
+
+ if (!a || !b) {
+ char t[PATH_MAX];
+ if (pa_get_binary_name(t, sizeof(t))) {
+ char *c = pa_utf8_filter(t);
+
+ if (!a)
+ pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_BINARY, c);
+ if (!b)
+ pa_proplist_sets(p, PA_PROP_APPLICATION_NAME, c);
+
+ pa_xfree(c);
+ }
+ }
+
+ if (!pa_proplist_contains(p, PA_PROP_APPLICATION_LANGUAGE)) {
+ const char *l;
+
+ if ((l = setlocale(LC_MESSAGES, NULL)))
+ pa_proplist_sets(p, PA_PROP_APPLICATION_LANGUAGE, l);
+ }
+}
diff --git a/src/pulsecore/proplist-util.h b/src/pulsecore/proplist-util.h
new file mode 100644
index 0000000..c6bdc10
--- /dev/null
+++ b/src/pulsecore/proplist-util.h
@@ -0,0 +1,29 @@
+#ifndef fooproplistutilutilhfoo
+#define fooproplistutilutilhfoo
+
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#include <pulse/proplist.h>
+
+void pa_init_proplist(pa_proplist *p);
+
+#endif
diff --git a/src/pulsecore/protocol-cli.c b/src/pulsecore/protocol-cli.c
index f284822..9247bb4 100644
--- a/src/pulsecore/protocol-cli.c
+++ b/src/pulsecore/protocol-cli.c
@@ -1,5 +1,3 @@
-/* $Id: protocol-cli.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -32,34 +30,41 @@
#include <pulsecore/cli.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
+#include <pulsecore/shared.h>
#include "protocol-cli.h"
/* Don't allow more than this many concurrent connections */
#define MAX_CONNECTIONS 25
-struct pa_protocol_cli {
- pa_module *module;
+struct pa_cli_protocol {
+ PA_REFCNT_DECLARE;
+
pa_core *core;
- pa_socket_server*server;
pa_idxset *connections;
};
-static void cli_eof_cb(pa_cli*c, void*userdata) {
- pa_protocol_cli *p = userdata;
+static void cli_unlink(pa_cli_protocol *p, pa_cli *c) {
pa_assert(p);
+ pa_assert(c);
pa_idxset_remove_by_data(p->connections, c, NULL);
pa_cli_free(c);
}
-static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) {
- pa_protocol_cli *p = userdata;
+static void cli_eof_cb(pa_cli*c, void*userdata) {
+ pa_cli_protocol *p = userdata;
+ pa_assert(p);
+
+ cli_unlink(p, c);
+}
+
+void pa_cli_protocol_connect(pa_cli_protocol *p, pa_iochannel *io, pa_module *m) {
pa_cli *c;
- pa_assert(s);
- pa_assert(io);
pa_assert(p);
+ pa_assert(io);
+ pa_assert(m);
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
@@ -67,39 +72,71 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
return;
}
- c = pa_cli_new(p->core, io, p->module);
+ c = pa_cli_new(p->core, io, m);
pa_cli_set_eof_callback(c, cli_eof_cb, p);
pa_idxset_put(p->connections, c, NULL);
}
-pa_protocol_cli* pa_protocol_cli_new(pa_core *core, pa_socket_server *server, pa_module *m, PA_GCC_UNUSED pa_modargs *ma) {
- pa_protocol_cli* p;
+void pa_cli_protocol_disconnect(pa_cli_protocol *p, pa_module *m) {
+ pa_cli *c;
+ void *state = NULL;
+
+ pa_assert(p);
+ pa_assert(m);
+
+ while ((c = pa_idxset_iterate(p->connections, &state, NULL)))
+ if (pa_cli_get_module(c) == m)
+ cli_unlink(p, c);
+}
+
+static pa_cli_protocol* cli_protocol_new(pa_core *c) {
+ pa_cli_protocol *p;
- pa_core_assert_ref(core);
- pa_assert(server);
+ pa_assert(c);
- p = pa_xnew(pa_protocol_cli, 1);
- p->module = m;
- p->core = core;
- p->server = server;
+ p = pa_xnew(pa_cli_protocol, 1);
+ PA_REFCNT_INIT(p);
+ p->core = c;
p->connections = pa_idxset_new(NULL, NULL);
- pa_socket_server_set_callback(p->server, on_connection, p);
+ pa_assert_se(pa_shared_set(c, "cli-protocol", p) >= 0);
return p;
}
-static void free_connection(void *p, PA_GCC_UNUSED void *userdata) {
+pa_cli_protocol* pa_cli_protocol_get(pa_core *c) {
+ pa_cli_protocol *p;
+
+ if ((p = pa_shared_get(c, "cli-protocol")))
+ return pa_cli_protocol_ref(p);
+
+ return cli_protocol_new(c);
+}
+
+pa_cli_protocol* pa_cli_protocol_ref(pa_cli_protocol *p) {
pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+
+ PA_REFCNT_INC(p);
- pa_cli_free(p);
+ return p;
}
-void pa_protocol_cli_free(pa_protocol_cli *p) {
+void pa_cli_protocol_unref(pa_cli_protocol *p) {
+ pa_cli *c;
pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+
+ if (PA_REFCNT_DEC(p) > 0)
+ return;
+
+ while ((c = pa_idxset_first(p->connections, NULL)))
+ cli_unlink(p, c);
+
+ pa_idxset_free(p->connections, NULL, NULL);
+
+ pa_assert_se(pa_shared_remove(p->core, "cli-protocol") >= 0);
- pa_idxset_free(p->connections, free_connection, NULL);
- pa_socket_server_unref(p->server);
pa_xfree(p);
}
diff --git a/src/pulsecore/protocol-cli.h b/src/pulsecore/protocol-cli.h
index b900377..9e26dcd 100644
--- a/src/pulsecore/protocol-cli.h
+++ b/src/pulsecore/protocol-cli.h
@@ -1,8 +1,6 @@
#ifndef fooprotocolclihfoo
#define fooprotocolclihfoo
-/* $Id: protocol-cli.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -29,9 +27,12 @@
#include <pulsecore/module.h>
#include <pulsecore/modargs.h>
-typedef struct pa_protocol_cli pa_protocol_cli;
+typedef struct pa_cli_protocol pa_cli_protocol;
-pa_protocol_cli* pa_protocol_cli_new(pa_core *core, pa_socket_server *server, pa_module *m, pa_modargs *ma);
-void pa_protocol_cli_free(pa_protocol_cli *n);
+pa_cli_protocol* pa_cli_protocol_get(pa_core *core);
+pa_cli_protocol* pa_cli_protocol_ref(pa_cli_protocol *p);
+void pa_cli_protocol_unref(pa_cli_protocol *p);
+void pa_cli_protocol_connect(pa_cli_protocol *p, pa_iochannel *io, pa_module *m);
+void pa_cli_protocol_disconnect(pa_cli_protocol *o, pa_module *m);
#endif
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
index 784d122..460119a 100644
--- a/src/pulsecore/protocol-esound.c
+++ b/src/pulsecore/protocol-esound.c
@@ -1,5 +1,3 @@
-/* $Id: protocol-esound.c 2176 2008-03-27 23:40:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -54,6 +52,7 @@
#include <pulsecore/ipacl.h>
#include <pulsecore/macro.h>
#include <pulsecore/thread-mq.h>
+#include <pulsecore/shared.h>
#include "endianmacros.h"
@@ -70,10 +69,12 @@
#define PLAYBACK_BUFFER_SECONDS (.25)
#define PLAYBACK_BUFFER_FRAGMENTS (10)
#define RECORD_BUFFER_SECONDS (5)
-#define RECORD_BUFFER_FRAGMENTS (100)
#define MAX_CACHE_SAMPLE_SIZE (2048000)
+#define DEFAULT_SINK_LATENCY (150*PA_USEC_PER_MSEC)
+#define DEFAULT_SOURCE_LATENCY (150*PA_USEC_PER_MSEC)
+
#define SCACHE_PREFIX "esound."
/* This is heavily based on esound's code */
@@ -83,7 +84,8 @@ typedef struct connection {
uint32_t index;
pa_bool_t dead;
- pa_protocol_esound *protocol;
+ pa_esound_protocol *protocol;
+ pa_esound_options *options;
pa_iochannel *io;
pa_client *client;
pa_bool_t authorized, swap_byte_order;
@@ -102,8 +104,9 @@ typedef struct connection {
struct {
pa_memblock *current_memblock;
- size_t memblock_index, fragment_size;
+ size_t memblock_index;
pa_atomic_t missing;
+ pa_bool_t underrun;
} playback;
struct {
@@ -119,17 +122,12 @@ PA_DECLARE_CLASS(connection);
#define CONNECTION(o) (connection_cast(o))
static PA_DEFINE_CHECK_TYPE(connection, pa_msgobject);
-struct pa_protocol_esound {
- pa_module *module;
+struct pa_esound_protocol {
+ PA_REFCNT_DECLARE;
+
pa_core *core;
- int public;
- pa_socket_server *server;
pa_idxset *connections;
-
- char *sink_name, *source_name;
unsigned n_player;
- uint8_t esd_key[ESD_KEY_LEN];
- pa_ip_acl *auth_ip_acl;
};
enum {
@@ -149,8 +147,9 @@ typedef struct proto_handler {
const char *description;
} esd_proto_handler_info_t;
-static void sink_input_drop_cb(pa_sink_input *i, size_t length);
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk);
+static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk);
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes);
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes);
static void sink_input_kill_cb(pa_sink_input *i);
static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk);
static pa_usec_t source_output_get_latency_cb(pa_source_output *o);
@@ -185,7 +184,7 @@ static struct proto_handler proto_map[ESD_PROTO_MAX] = {
{ sizeof(int), esd_proto_sample_free_or_play, "sample play" }, /* 8 */
{ sizeof(int), NULL, "sample loop" },
{ sizeof(int), NULL, "sample stop" },
- { -1, NULL, "TODO: sample kill" },
+ { (size_t) -1, NULL, "TODO: sample kill" },
{ ESD_KEY_LEN + sizeof(int), esd_proto_standby_or_resume, "standby" }, /* NOOP! */
{ ESD_KEY_LEN + sizeof(int), esd_proto_standby_or_resume, "resume" }, /* NOOP! */ /* 13 */
@@ -195,8 +194,8 @@ static struct proto_handler proto_map[ESD_PROTO_MAX] = {
{ sizeof(int), esd_proto_server_info, "server info" },
{ sizeof(int), esd_proto_all_info, "all info" },
- { -1, NULL, "TODO: subscribe" },
- { -1, NULL, "TODO: unsubscribe" },
+ { (size_t) -1, NULL, "TODO: subscribe" },
+ { (size_t) -1, NULL, "TODO: unsubscribe" },
{ 3 * sizeof(int), esd_proto_stream_pan, "stream pan"},
{ 3 * sizeof(int), NULL, "sample pan" },
@@ -211,6 +210,11 @@ static void connection_unlink(connection *c) {
if (!c->protocol)
return;
+ if (c->options) {
+ pa_esound_options_unref(c->options);
+ c->options = NULL;
+ }
+
if (c->sink_input) {
pa_sink_input_unlink(c->sink_input);
pa_sink_input_unref(c->sink_input);
@@ -305,7 +309,7 @@ static void connection_write(connection *c, const void *data, size_t length) {
static void format_esd2native(int format, pa_bool_t swap_bytes, pa_sample_spec *ss) {
pa_assert(ss);
- ss->channels = ((format & ESD_MASK_CHAN) == ESD_STEREO) ? 2 : 1;
+ ss->channels = (uint8_t) (((format & ESD_MASK_CHAN) == ESD_STEREO) ? 2 : 1);
if ((format & ESD_MASK_BITS) == ESD_BITS16)
ss->format = swap_bytes ? PA_SAMPLE_S16RE : PA_SAMPLE_S16NE;
else
@@ -330,7 +334,7 @@ static int format_native2esd(pa_sample_spec *ss) {
/*** esound commands ***/
-static int esd_proto_connect(connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
+static int esd_proto_connect(connection *c, esd_proto_t request, const void *data, size_t length) {
uint32_t ekey;
int ok;
@@ -338,17 +342,22 @@ static int esd_proto_connect(connection *c, PA_GCC_UNUSED esd_proto_t request, c
pa_assert(data);
pa_assert(length == (ESD_KEY_LEN + sizeof(uint32_t)));
+ if (!c->authorized && c->options->auth_cookie) {
+ const uint8_t*key;
+
+ if ((key = pa_auth_cookie_read(c->options->auth_cookie, ESD_KEY_LEN)))
+ if (memcmp(data, key, ESD_KEY_LEN) == 0)
+ c->authorized = TRUE;
+ }
+
if (!c->authorized) {
- if (memcmp(data, c->protocol->esd_key, ESD_KEY_LEN) != 0) {
- pa_log("kicked client with invalid authorization key.");
- return -1;
- }
+ pa_log("Kicked client with invalid authorization key.");
+ return -1;
+ }
- c->authorized = TRUE;
- if (c->auth_timeout_event) {
- c->protocol->core->mainloop->time_free(c->auth_timeout_event);
- c->auth_timeout_event = NULL;
- }
+ if (c->auth_timeout_event) {
+ c->protocol->core->mainloop->time_free(c->auth_timeout_event);
+ c->auth_timeout_event = NULL;
}
data = (const char*)data + ESD_KEY_LEN;
@@ -368,7 +377,7 @@ static int esd_proto_connect(connection *c, PA_GCC_UNUSED esd_proto_t request, c
return 0;
}
-static int esd_proto_stream_play(connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
+static int esd_proto_stream_play(connection *c, esd_proto_t request, const void *data, size_t length) {
char name[ESD_NAME_MAX], *utf8_name;
int32_t format, rate;
pa_sample_spec ss;
@@ -388,18 +397,17 @@ static int esd_proto_stream_play(connection *c, PA_GCC_UNUSED esd_proto_t reques
rate = PA_MAYBE_INT32_SWAP(c->swap_byte_order, rate);
data = (const char*) data + sizeof(int32_t);
- ss.rate = rate;
+ ss.rate = (uint32_t) rate;
format_esd2native(format, c->swap_byte_order, &ss);
CHECK_VALIDITY(pa_sample_spec_valid(&ss), "Invalid sample specification");
- if (c->protocol->sink_name) {
- sink = pa_namereg_get(c->protocol->core, c->protocol->sink_name, PA_NAMEREG_SINK, 1);
- CHECK_VALIDITY(sink, "No such sink: %s", c->protocol->sink_name);
+ if (c->options->default_sink) {
+ sink = pa_namereg_get(c->protocol->core, c->options->default_sink, PA_NAMEREG_SINK, 1);
+ CHECK_VALIDITY(sink, "No such sink: %s", c->options->default_sink);
}
- strncpy(name, data, sizeof(name));
- name[sizeof(name)-1] = 0;
+ pa_strlcpy(name, data, sizeof(name));
utf8_name = pa_utf8_filter(name);
pa_client_set_name(c->client, utf8_name);
@@ -410,39 +418,44 @@ static int esd_proto_stream_play(connection *c, PA_GCC_UNUSED esd_proto_t reques
pa_assert(!c->sink_input && !c->input_memblockq);
pa_sink_input_new_data_init(&sdata);
- sdata.sink = sink;
sdata.driver = __FILE__;
- sdata.name = c->client->name;
- pa_sink_input_new_data_set_sample_spec(&sdata, &ss);
- sdata.module = c->protocol->module;
+ sdata.module = c->options->module;
sdata.client = c->client;
+ sdata.sink = sink;
+ pa_proplist_update(sdata.proplist, PA_UPDATE_MERGE, c->client->proplist);
+ pa_sink_input_new_data_set_sample_spec(&sdata, &ss);
c->sink_input = pa_sink_input_new(c->protocol->core, &sdata, 0);
+ pa_sink_input_new_data_done(&sdata);
+
CHECK_VALIDITY(c->sink_input, "Failed to create sink input.");
- l = (size_t) (pa_bytes_per_second(&ss)*PLAYBACK_BUFFER_SECONDS);
+ l = (size_t) ((double) pa_bytes_per_second(&ss)*PLAYBACK_BUFFER_SECONDS);
c->input_memblockq = pa_memblockq_new(
0,
l,
- 0,
+ l,
pa_frame_size(&ss),
(size_t) -1,
l/PLAYBACK_BUFFER_FRAGMENTS,
+ 0,
NULL);
- pa_iochannel_socket_set_rcvbuf(c->io, l/PLAYBACK_BUFFER_FRAGMENTS*2);
- c->playback.fragment_size = l/PLAYBACK_BUFFER_FRAGMENTS;
+ pa_iochannel_socket_set_rcvbuf(c->io, l);
c->sink_input->parent.process_msg = sink_input_process_msg;
- c->sink_input->peek = sink_input_peek_cb;
- c->sink_input->drop = sink_input_drop_cb;
+ c->sink_input->pop = sink_input_pop_cb;
+ c->sink_input->process_rewind = sink_input_process_rewind_cb;
+ c->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
c->sink_input->kill = sink_input_kill_cb;
c->sink_input->userdata = c;
+ pa_sink_input_set_requested_latency(c->sink_input, DEFAULT_SINK_LATENCY);
+
c->state = ESD_STREAMING_DATA;
c->protocol->n_player++;
- pa_atomic_store(&c->playback.missing, pa_memblockq_missing(c->input_memblockq));
+ pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq));
pa_sink_input_put(c->sink_input);
@@ -469,7 +482,7 @@ static int esd_proto_stream_record(connection *c, esd_proto_t request, const voi
rate = PA_MAYBE_INT32_SWAP(c->swap_byte_order, rate);
data = (const char*) data + sizeof(int32_t);
- ss.rate = rate;
+ ss.rate = (uint32_t) rate;
format_esd2native(format, c->swap_byte_order, &ss);
CHECK_VALIDITY(pa_sample_spec_valid(&ss), "Invalid sample specification.");
@@ -477,7 +490,7 @@ static int esd_proto_stream_record(connection *c, esd_proto_t request, const voi
if (request == ESD_PROTO_STREAM_MON) {
pa_sink* sink;
- if (!(sink = pa_namereg_get(c->protocol->core, c->protocol->sink_name, PA_NAMEREG_SINK, 1))) {
+ if (!(sink = pa_namereg_get(c->protocol->core, c->options->default_sink, PA_NAMEREG_SINK, 1))) {
pa_log("no such sink.");
return -1;
}
@@ -489,16 +502,15 @@ static int esd_proto_stream_record(connection *c, esd_proto_t request, const voi
} else {
pa_assert(request == ESD_PROTO_STREAM_REC);
- if (c->protocol->source_name) {
- if (!(source = pa_namereg_get(c->protocol->core, c->protocol->source_name, PA_NAMEREG_SOURCE, 1))) {
+ if (c->options->default_source) {
+ if (!(source = pa_namereg_get(c->protocol->core, c->options->default_source, PA_NAMEREG_SOURCE, 1))) {
pa_log("no such source.");
return -1;
}
}
}
- strncpy(name, data, sizeof(name));
- name[sizeof(name)-1] = 0;
+ pa_strlcpy(name, data, sizeof(name));
utf8_name = pa_utf8_filter(name);
pa_client_set_name(c->client, utf8_name);
@@ -509,32 +521,37 @@ static int esd_proto_stream_record(connection *c, esd_proto_t request, const voi
pa_assert(!c->output_memblockq && !c->source_output);
pa_source_output_new_data_init(&sdata);
- sdata.source = source;
sdata.driver = __FILE__;
- sdata.name = c->client->name;
- pa_source_output_new_data_set_sample_spec(&sdata, &ss);
- sdata.module = c->protocol->module;
+ sdata.module = c->options->module;
sdata.client = c->client;
+ sdata.source = source;
+ pa_proplist_update(sdata.proplist, PA_UPDATE_MERGE, c->client->proplist);
+ pa_source_output_new_data_set_sample_spec(&sdata, &ss);
+
+ c->source_output = pa_source_output_new(c->protocol->core, &sdata, 0);
+ pa_source_output_new_data_done(&sdata);
- c->source_output = pa_source_output_new(c->protocol->core, &sdata, 9);
- CHECK_VALIDITY(c->source_output, "Failed to create source_output.");
+ CHECK_VALIDITY(c->source_output, "Failed to create source output.");
l = (size_t) (pa_bytes_per_second(&ss)*RECORD_BUFFER_SECONDS);
c->output_memblockq = pa_memblockq_new(
0,
l,
- 0,
+ l,
pa_frame_size(&ss),
1,
0,
+ 0,
NULL);
- pa_iochannel_socket_set_sndbuf(c->io, l/RECORD_BUFFER_FRAGMENTS*2);
+ pa_iochannel_socket_set_sndbuf(c->io, l);
c->source_output->push = source_output_push_cb;
c->source_output->kill = source_output_kill_cb;
c->source_output->get_latency = source_output_get_latency_cb;
c->source_output->userdata = c;
+ pa_source_output_set_requested_latency(c->source_output, DEFAULT_SOURCE_LATENCY);
+
c->state = ESD_STREAMING_DATA;
c->protocol->n_player++;
@@ -544,7 +561,7 @@ static int esd_proto_stream_record(connection *c, esd_proto_t request, const voi
return 0;
}
-static int esd_proto_get_latency(connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
+static int esd_proto_get_latency(connection *c, esd_proto_t request, const void *data, size_t length) {
pa_sink *sink;
int32_t latency;
@@ -552,10 +569,10 @@ static int esd_proto_get_latency(connection *c, PA_GCC_UNUSED esd_proto_t reques
pa_assert(!data);
pa_assert(length == 0);
- if (!(sink = pa_namereg_get(c->protocol->core, c->protocol->sink_name, PA_NAMEREG_SINK, 1)))
+ if (!(sink = pa_namereg_get(c->protocol->core, c->options->default_sink, PA_NAMEREG_SINK, 1)))
latency = 0;
else {
- double usec = pa_sink_get_latency(sink);
+ double usec = (double) pa_sink_get_latency(sink);
latency = (int) ((usec*44100)/1000000);
}
@@ -564,7 +581,7 @@ static int esd_proto_get_latency(connection *c, PA_GCC_UNUSED esd_proto_t reques
return 0;
}
-static int esd_proto_server_info(connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
+static int esd_proto_server_info(connection *c, esd_proto_t request, const void *data, size_t length) {
int32_t rate = 44100, format = ESD_STEREO|ESD_BITS16;
int32_t response;
pa_sink *sink;
@@ -573,8 +590,8 @@ static int esd_proto_server_info(connection *c, PA_GCC_UNUSED esd_proto_t reques
pa_assert(data);
pa_assert(length == sizeof(int32_t));
- if ((sink = pa_namereg_get(c->protocol->core, c->protocol->sink_name, PA_NAMEREG_SINK, 1))) {
- rate = sink->sample_spec.rate;
+ if ((sink = pa_namereg_get(c->protocol->core, c->options->default_sink, PA_NAMEREG_SINK, 1))) {
+ rate = (int32_t) sink->sample_spec.rate;
format = format_native2esd(&sink->sample_spec);
}
@@ -624,9 +641,9 @@ static int esd_proto_all_info(connection *c, esd_proto_t request, const void *da
if (conn->sink_input) {
pa_cvolume volume = *pa_sink_input_get_volume(conn->sink_input);
- rate = conn->sink_input->sample_spec.rate;
- lvolume = (volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM;
- rvolume = (volume.values[1]*ESD_VOLUME_BASE)/PA_VOLUME_NORM;
+ rate = (int32_t) conn->sink_input->sample_spec.rate;
+ lvolume = (int32_t) ((volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM);
+ rvolume = (int32_t) ((volume.values[1]*ESD_VOLUME_BASE)/PA_VOLUME_NORM);
format = format_native2esd(&conn->sink_input->sample_spec);
}
@@ -638,8 +655,8 @@ static int esd_proto_all_info(connection *c, esd_proto_t request, const void *da
memset(name, 0, ESD_NAME_MAX); /* don't leak old data */
if (conn->original_name)
strncpy(name, conn->original_name, ESD_NAME_MAX);
- else if (conn->client && conn->client->name)
- strncpy(name, conn->client->name, ESD_NAME_MAX);
+ else if (conn->client && pa_proplist_gets(conn->client->proplist, PA_PROP_APPLICATION_NAME))
+ strncpy(name, pa_proplist_gets(conn->client->proplist, PA_PROP_APPLICATION_NAME), ESD_NAME_MAX);
connection_write(c, name, ESD_NAME_MAX);
/* rate */
@@ -689,15 +706,15 @@ static int esd_proto_all_info(connection *c, esd_proto_t request, const void *da
connection_write(c, name, ESD_NAME_MAX);
/* rate */
- rate = PA_MAYBE_UINT32_SWAP(c->swap_byte_order, ce->sample_spec.rate);
+ rate = PA_MAYBE_INT32_SWAP(c->swap_byte_order, (int32_t) ce->sample_spec.rate);
connection_write(c, &rate, sizeof(int32_t));
/* left */
- lvolume = PA_MAYBE_UINT32_SWAP(c->swap_byte_order, (ce->volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM);
+ lvolume = PA_MAYBE_INT32_SWAP(c->swap_byte_order, (int32_t) ((ce->volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM));
connection_write(c, &lvolume, sizeof(int32_t));
/*right*/
- rvolume = PA_MAYBE_UINT32_SWAP(c->swap_byte_order, (ce->volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM);
+ rvolume = PA_MAYBE_INT32_SWAP(c->swap_byte_order, (int32_t) ((ce->volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM));
connection_write(c, &rvolume, sizeof(int32_t));
/*format*/
@@ -719,7 +736,7 @@ static int esd_proto_all_info(connection *c, esd_proto_t request, const void *da
return 0;
}
-static int esd_proto_stream_pan(connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
+static int esd_proto_stream_pan(connection *c, esd_proto_t request, const void *data, size_t length) {
int32_t ok;
uint32_t idx, lvolume, rvolume;
connection *conn;
@@ -755,7 +772,7 @@ static int esd_proto_stream_pan(connection *c, PA_GCC_UNUSED esd_proto_t request
return 0;
}
-static int esd_proto_sample_cache(connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
+static int esd_proto_sample_cache(connection *c, esd_proto_t request, const void *data, size_t length) {
pa_sample_spec ss;
int32_t format, rate, sc_length;
uint32_t idx;
@@ -773,7 +790,7 @@ static int esd_proto_sample_cache(connection *c, PA_GCC_UNUSED esd_proto_t reque
rate = PA_MAYBE_INT32_SWAP(c->swap_byte_order, rate);
data = (const char*)data + sizeof(int32_t);
- ss.rate = rate;
+ ss.rate = (uint32_t) rate;
format_esd2native(format, c->swap_byte_order, &ss);
CHECK_VALIDITY(pa_sample_spec_valid(&ss), "Invalid sample specification.");
@@ -785,22 +802,21 @@ static int esd_proto_sample_cache(connection *c, PA_GCC_UNUSED esd_proto_t reque
CHECK_VALIDITY(sc_length <= MAX_CACHE_SAMPLE_SIZE, "Sample too large (%d bytes).", (int)sc_length);
strcpy(name, SCACHE_PREFIX);
- strncpy(name+sizeof(SCACHE_PREFIX)-1, data, ESD_NAME_MAX);
- name[sizeof(name)-1] = 0;
+ pa_strlcpy(name+sizeof(SCACHE_PREFIX)-1, data, ESD_NAME_MAX);
CHECK_VALIDITY(pa_utf8_valid(name), "Invalid UTF8 in sample name.");
pa_assert(!c->scache.memchunk.memblock);
- c->scache.memchunk.memblock = pa_memblock_new(c->protocol->core->mempool, sc_length);
+ c->scache.memchunk.memblock = pa_memblock_new(c->protocol->core->mempool, (size_t) sc_length);
c->scache.memchunk.index = 0;
- c->scache.memchunk.length = sc_length;
+ c->scache.memchunk.length = (size_t) sc_length;
c->scache.sample_spec = ss;
pa_assert(!c->scache.name);
c->scache.name = pa_xstrdup(name);
c->state = ESD_CACHING_SAMPLE;
- pa_scache_add_item(c->protocol->core, c->scache.name, NULL, NULL, NULL, &idx);
+ pa_scache_add_item(c->protocol->core, c->scache.name, NULL, NULL, NULL, c->client->proplist, &idx);
idx += 1;
connection_write(c, &idx, sizeof(uint32_t));
@@ -808,7 +824,7 @@ static int esd_proto_sample_cache(connection *c, PA_GCC_UNUSED esd_proto_t reque
return 0;
}
-static int esd_proto_sample_get_id(connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
+static int esd_proto_sample_get_id(connection *c, esd_proto_t request, const void *data, size_t length) {
int32_t ok;
uint32_t idx;
char name[ESD_NAME_MAX+sizeof(SCACHE_PREFIX)-1];
@@ -818,14 +834,13 @@ static int esd_proto_sample_get_id(connection *c, PA_GCC_UNUSED esd_proto_t requ
pa_assert(length == ESD_NAME_MAX);
strcpy(name, SCACHE_PREFIX);
- strncpy(name+sizeof(SCACHE_PREFIX)-1, data, ESD_NAME_MAX);
- name[sizeof(name)-1] = 0;
+ pa_strlcpy(name+sizeof(SCACHE_PREFIX)-1, data, ESD_NAME_MAX);
CHECK_VALIDITY(pa_utf8_valid(name), "Invalid UTF8 in sample name.");
ok = -1;
if ((idx = pa_scache_get_id_by_name(c->protocol->core, name)) != PA_IDXSET_INVALID)
- ok = idx + 1;
+ ok = (int32_t) idx + 1;
connection_write(c, &ok, sizeof(int32_t));
@@ -850,14 +865,14 @@ static int esd_proto_sample_free_or_play(connection *c, esd_proto_t request, con
if (request == ESD_PROTO_SAMPLE_PLAY) {
pa_sink *sink;
- if ((sink = pa_namereg_get(c->protocol->core, c->protocol->sink_name, PA_NAMEREG_SINK, 1)))
- if (pa_scache_play_item(c->protocol->core, name, sink, PA_VOLUME_NORM) >= 0)
- ok = idx + 1;
+ if ((sink = pa_namereg_get(c->protocol->core, c->options->default_sink, PA_NAMEREG_SINK, 1)))
+ if (pa_scache_play_item(c->protocol->core, name, sink, PA_VOLUME_NORM, c->client->proplist, NULL) >= 0)
+ ok = (int32_t) idx + 1;
} else {
pa_assert(request == ESD_PROTO_SAMPLE_FREE);
if (pa_scache_remove_item(c->protocol->core, name) >= 0)
- ok = idx + 1;
+ ok = (int32_t) idx + 1;
}
}
@@ -866,7 +881,7 @@ static int esd_proto_sample_free_or_play(connection *c, esd_proto_t request, con
return 0;
}
-static int esd_proto_standby_or_resume(connection *c, PA_GCC_UNUSED esd_proto_t request, PA_GCC_UNUSED const void *data, PA_GCC_UNUSED size_t length) {
+static int esd_proto_standby_or_resume(connection *c, esd_proto_t request, const void *data, size_t length) {
int32_t ok;
connection_assert_ref(c);
@@ -904,7 +919,9 @@ static int do_read(connection *c) {
return -1;
}
- if ((c->read_data_length+= r) >= sizeof(c->request)) {
+ c->read_data_length += (size_t) r;
+
+ if (c->read_data_length >= sizeof(c->request)) {
struct proto_handler *handler;
c->request = PA_MAYBE_INT32_SWAP(c->swap_byte_order, c->request);
@@ -955,7 +972,8 @@ static int do_read(connection *c) {
return -1;
}
- if ((c->read_data_length += r) >= handler->data_length) {
+ c->read_data_length += (size_t) r;
+ if (c->read_data_length >= handler->data_length) {
size_t l = c->read_data_length;
pa_assert(handler->proc);
@@ -985,14 +1003,14 @@ static int do_read(connection *c) {
return -1;
}
- c->scache.memchunk.index += r;
+ c->scache.memchunk.index += (size_t) r;
pa_assert(c->scache.memchunk.index <= c->scache.memchunk.length);
if (c->scache.memchunk.index == c->scache.memchunk.length) {
uint32_t idx;
c->scache.memchunk.index = 0;
- pa_scache_add_item(c->protocol->core, c->scache.name, &c->scache.sample_spec, NULL, &c->scache.memchunk, &idx);
+ pa_scache_add_item(c->protocol->core, c->scache.name, &c->scache.sample_spec, NULL, &c->scache.memchunk, c->client->proplist, &idx);
pa_memblock_unref(c->scache.memchunk.memblock);
c->scache.memchunk.memblock = NULL;
@@ -1012,29 +1030,35 @@ static int do_read(connection *c) {
ssize_t r;
size_t l;
void *p;
+ size_t space;
pa_assert(c->input_memblockq);
/* pa_log("STREAMING_DATA"); */
- if (!(l = pa_atomic_load(&c->playback.missing)))
+ if (!(l = (size_t) pa_atomic_load(&c->playback.missing)))
return 0;
- if (l > c->playback.fragment_size)
- l = c->playback.fragment_size;
+ if (c->playback.current_memblock) {
- if (c->playback.current_memblock)
- if (pa_memblock_get_length(c->playback.current_memblock) - c->playback.memblock_index < l) {
+ space = pa_memblock_get_length(c->playback.current_memblock) - c->playback.memblock_index;
+
+ if (space <= 0) {
pa_memblock_unref(c->playback.current_memblock);
c->playback.current_memblock = NULL;
- c->playback.memblock_index = 0;
}
+ }
if (!c->playback.current_memblock) {
- pa_assert_se(c->playback.current_memblock = pa_memblock_new(c->protocol->core->mempool, c->playback.fragment_size*2));
+ pa_assert_se(c->playback.current_memblock = pa_memblock_new(c->protocol->core->mempool, (size_t) -1));
c->playback.memblock_index = 0;
+
+ space = pa_memblock_get_length(c->playback.current_memblock);
}
+ if (l > space)
+ l = space;
+
p = pa_memblock_acquire(c->playback.current_memblock);
r = pa_iochannel_read(c->io, (uint8_t*) p+c->playback.memblock_index, l);
pa_memblock_release(c->playback.current_memblock);
@@ -1050,12 +1074,12 @@ static int do_read(connection *c) {
chunk.memblock = c->playback.current_memblock;
chunk.index = c->playback.memblock_index;
- chunk.length = r;
+ chunk.length = (size_t) r;
- c->playback.memblock_index += r;
+ c->playback.memblock_index += (size_t) r;
pa_asyncmsgq_post(c->sink_input->sink->asyncmsgq, PA_MSGOBJECT(c->sink_input), SINK_INPUT_MESSAGE_POST_DATA, NULL, 0, &chunk, NULL);
- pa_atomic_sub(&c->playback.missing, r);
+ pa_atomic_sub(&c->playback.missing, (int) r);
}
return 0;
@@ -1079,7 +1103,8 @@ static int do_write(connection *c) {
return -1;
}
- if ((c->write_data_index +=r) >= c->write_data_length)
+ c->write_data_index += (size_t) r;
+ if (c->write_data_index >= c->write_data_length)
c->write_data_length = c->write_data_index = 0;
} else if (c->state == ESD_STREAMING_DATA && c->source_output) {
@@ -1108,7 +1133,7 @@ static int do_write(connection *c) {
return -1;
}
- pa_memblockq_drop(c->output_memblockq, r);
+ pa_memblockq_drop(c->output_memblockq, (size_t) r);
}
return 0;
@@ -1122,12 +1147,11 @@ static void do_work(connection *c) {
if (c->dead)
return;
- if (pa_iochannel_is_readable(c->io)) {
+ if (pa_iochannel_is_readable(c->io))
if (do_read(c) < 0)
goto fail;
- }
- if (c->state == ESD_STREAMING_DATA && c->source_output && pa_iochannel_is_hungup(c->io))
+ if (c->state == ESD_STREAMING_DATA && !c->sink_input && pa_iochannel_is_hungup(c->io))
/* In case we are in capture mode we will never call read()
* on the socket, hence we need to detect the hangup manually
* here, instead of simply waiting for read() to return 0. */
@@ -1212,15 +1236,19 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
/* New data from the main loop */
pa_memblockq_push_align(c->input_memblockq, chunk);
+ if (pa_memblockq_is_readable(c->input_memblockq) && c->playback.underrun) {
+ pa_log_debug("Requesting rewind due to end of underrun.");
+ pa_sink_input_request_rewind(c->sink_input, 0, FALSE, TRUE);
+ }
+
/* pa_log("got data, %u", pa_memblockq_get_length(c->input_memblockq)); */
return 0;
}
- case SINK_INPUT_MESSAGE_DISABLE_PREBUF: {
+ case SINK_INPUT_MESSAGE_DISABLE_PREBUF:
pa_memblockq_prebuf_disable(c->input_memblockq);
return 0;
- }
case PA_SINK_INPUT_MESSAGE_GET_LATENCY: {
pa_usec_t *r = userdata;
@@ -1237,41 +1265,64 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
}
/* Called from thread context */
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
connection*c;
- int r;
- pa_assert(i);
+ pa_sink_input_assert_ref(i);
c = CONNECTION(i->userdata);
connection_assert_ref(c);
pa_assert(chunk);
- if ((r = pa_memblockq_peek(c->input_memblockq, chunk)) < 0 && c->dead)
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(c), CONNECTION_MESSAGE_UNLINK_CONNECTION, NULL, 0, NULL, NULL);
+ if (pa_memblockq_peek(c->input_memblockq, chunk) < 0) {
+
+ c->playback.underrun = TRUE;
+
+ if (c->dead && pa_sink_input_safe_to_remove(i))
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(c), CONNECTION_MESSAGE_UNLINK_CONNECTION, NULL, 0, NULL, NULL);
+
+ return -1;
+ } else {
+ size_t m;
+
+ chunk->length = PA_MIN(length, chunk->length);
+
+ c->playback.underrun = FALSE;
- return r;
+ pa_memblockq_drop(c->input_memblockq, chunk->length);
+ m = pa_memblockq_pop_missing(c->input_memblockq);
+
+ if (m > 0)
+ if (pa_atomic_add(&c->playback.missing, (int) m) <= 0)
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(c), CONNECTION_MESSAGE_REQUEST_DATA, NULL, 0, NULL, NULL);
+
+ return 0;
+ }
}
/* Called from thread context */
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
- connection*c;
- size_t old, new;
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ connection *c;
- pa_assert(i);
+ pa_sink_input_assert_ref(i);
c = CONNECTION(i->userdata);
connection_assert_ref(c);
- pa_assert(length);
- /* pa_log("DROP"); */
+ /* If we are in an underrun, then we don't rewind */
+ if (i->thread_info.underrun_for > 0)
+ return;
- old = pa_memblockq_missing(c->input_memblockq);
- pa_memblockq_drop(c->input_memblockq, length);
- new = pa_memblockq_missing(c->input_memblockq);
+ pa_memblockq_rewind(c->input_memblockq, nbytes);
+}
- if (new > old) {
- if (pa_atomic_add(&c->playback.missing, new - old) <= 0)
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(c), CONNECTION_MESSAGE_REQUEST_DATA, NULL, 0, NULL, NULL);
- }
+/* Called from thread context */
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ connection *c;
+
+ pa_sink_input_assert_ref(i);
+ c = CONNECTION(i->userdata);
+ connection_assert_ref(c);
+
+ pa_memblockq_set_maxrewind(c->input_memblockq, nbytes);
}
static void sink_input_kill_cb(pa_sink_input *i) {
@@ -1286,7 +1337,7 @@ static void sink_input_kill_cb(pa_sink_input *i) {
static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk) {
connection *c;
- pa_assert(o);
+ pa_source_output_assert_ref(o);
c = CONNECTION(o->userdata);
pa_assert(c);
pa_assert(chunk);
@@ -1303,14 +1354,14 @@ static void source_output_kill_cb(pa_source_output *o) {
static pa_usec_t source_output_get_latency_cb(pa_source_output *o) {
connection*c;
- pa_assert(o);
+ pa_source_output_assert_ref(o);
c = CONNECTION(o->userdata);
pa_assert(c);
return pa_bytes_to_usec(pa_memblockq_get_length(c->output_memblockq), &c->source_output->sample_spec);
}
-/*** socket server callback ***/
+/*** entry points ***/
static void auth_timeout(pa_mainloop_api*m, pa_time_event *e, const struct timeval *tv, void *userdata) {
connection *c = CONNECTION(userdata);
@@ -1324,14 +1375,13 @@ static void auth_timeout(pa_mainloop_api*m, pa_time_event *e, const struct timev
connection_unlink(c);
}
-static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) {
+void pa_esound_protocol_connect(pa_esound_protocol *p, pa_iochannel *io, pa_esound_options *o) {
connection *c;
- pa_protocol_esound *p = userdata;
char cname[256], pname[128];
- pa_assert(s);
- pa_assert(io);
pa_assert(p);
+ pa_assert(io);
+ pa_assert(o);
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
@@ -1349,11 +1399,13 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
pa_iochannel_socket_peer_to_string(io, pname, sizeof(pname));
pa_snprintf(cname, sizeof(cname), "EsounD client (%s)", pname);
c->client = pa_client_new(p->core, __FILE__, cname);
- c->client->owner = p->module;
+ pa_proplist_sets(c->client->proplist, "esound-protocol.peer", pname);
+ c->client->module = o->module;
c->client->kill = client_kill_cb;
c->client->userdata = c;
- c->authorized = !!p->public;
+ c->options = pa_esound_options_ref(o);
+ c->authorized = FALSE;
c->swap_byte_order = FALSE;
c->dead = FALSE;
@@ -1374,16 +1426,23 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
c->playback.current_memblock = NULL;
c->playback.memblock_index = 0;
- c->playback.fragment_size = 0;
+ c->playback.underrun = TRUE;
pa_atomic_store(&c->playback.missing, 0);
- c->scache.memchunk.length = c->scache.memchunk.index = 0;
- c->scache.memchunk.memblock = NULL;
+ pa_memchunk_reset(&c->scache.memchunk);
c->scache.name = NULL;
c->original_name = NULL;
- if (!c->authorized && p->auth_ip_acl && pa_ip_acl_check(p->auth_ip_acl, pa_iochannel_get_recv_fd(io)) > 0) {
+ if (o->auth_anonymous) {
+ pa_log_info("Client authenticated anonymously.");
+ c->authorized = TRUE;
+ }
+
+ if (!c->authorized &&
+ o->auth_ip_acl &&
+ pa_ip_acl_check(o->auth_ip_acl, pa_iochannel_get_recv_fd(io)) > 0) {
+
pa_log_info("Client authenticated by IP ACL.");
c->authorized = TRUE;
}
@@ -1402,70 +1461,163 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
pa_idxset_put(p->connections, c, &c->index);
}
-/*** entry points ***/
-
-pa_protocol_esound* pa_protocol_esound_new(pa_core*core, pa_socket_server *server, pa_module *m, pa_modargs *ma) {
- pa_protocol_esound *p = NULL;
- pa_bool_t public = FALSE;
- const char *acl;
+void pa_esound_protocol_disconnect(pa_esound_protocol *p, pa_module *m) {
+ connection *c;
+ void *state = NULL;
- pa_assert(core);
- pa_assert(server);
+ pa_assert(p);
pa_assert(m);
- pa_assert(ma);
- if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &public) < 0) {
- pa_log("auth-anonymous= expects a boolean argument.");
- goto fail;
- }
+ while ((c = pa_idxset_iterate(p->connections, &state, NULL)))
+ if (c->options->module == m)
+ connection_unlink(c);
+}
- p = pa_xnew(pa_protocol_esound, 1);
+static pa_esound_protocol* esound_protocol_new(pa_core *c) {
+ pa_esound_protocol *p;
- if (pa_authkey_load_auto(pa_modargs_get_value(ma, "cookie", DEFAULT_COOKIE_FILE), p->esd_key, sizeof(p->esd_key)) < 0)
- goto fail;
-
- if ((acl = pa_modargs_get_value(ma, "auth-ip-acl", NULL))) {
-
- if (!(p->auth_ip_acl = pa_ip_acl_new(acl))) {
- pa_log("Failed to parse IP ACL '%s'", acl);
- goto fail;
- }
- } else
- p->auth_ip_acl = NULL;
+ pa_assert(c);
- p->core = core;
- p->module = m;
- p->public = public;
- p->server = server;
- pa_socket_server_set_callback(p->server, on_connection, p);
+ p = pa_xnew(pa_esound_protocol, 1);
+ PA_REFCNT_INIT(p);
+ p->core = c;
p->connections = pa_idxset_new(NULL, NULL);
-
- p->sink_name = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
- p->source_name = pa_xstrdup(pa_modargs_get_value(ma, "source", NULL));
p->n_player = 0;
+ pa_assert_se(pa_shared_set(c, "esound-protocol", p) >= 0);
+
return p;
+}
-fail:
- pa_xfree(p);
- return NULL;
+pa_esound_protocol* pa_esound_protocol_get(pa_core *c) {
+ pa_esound_protocol *p;
+
+ if ((p = pa_shared_get(c, "esound-protocol")))
+ return pa_esound_protocol_ref(p);
+
+ return esound_protocol_new(c);
}
-void pa_protocol_esound_free(pa_protocol_esound *p) {
+pa_esound_protocol* pa_esound_protocol_ref(pa_esound_protocol *p) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+
+ PA_REFCNT_INC(p);
+
+ return p;
+}
+
+void pa_esound_protocol_unref(pa_esound_protocol *p) {
connection *c;
pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+
+ if (PA_REFCNT_DEC(p) > 0)
+ return;
while ((c = pa_idxset_first(p->connections, NULL)))
connection_unlink(c);
+
pa_idxset_free(p->connections, NULL, NULL);
- pa_socket_server_unref(p->server);
+ pa_assert_se(pa_shared_remove(p->core, "esound-protocol") >= 0);
- if (p->auth_ip_acl)
- pa_ip_acl_free(p->auth_ip_acl);
+ pa_xfree(p);
+}
- pa_xfree(p->sink_name);
- pa_xfree(p->source_name);
+pa_esound_options* pa_esound_options_new(void) {
+ pa_esound_options *o;
- pa_xfree(p);
+ o = pa_xnew0(pa_esound_options, 1);
+ PA_REFCNT_INIT(o);
+
+ return o;
+}
+
+pa_esound_options* pa_esound_options_ref(pa_esound_options *o) {
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ PA_REFCNT_INC(o);
+
+ return o;
+}
+
+void pa_esound_options_unref(pa_esound_options *o) {
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ if (PA_REFCNT_DEC(o) > 0)
+ return;
+
+ if (o->auth_ip_acl)
+ pa_ip_acl_free(o->auth_ip_acl);
+
+ if (o->auth_cookie)
+ pa_auth_cookie_unref(o->auth_cookie);
+
+ pa_xfree(o->default_sink);
+ pa_xfree(o->default_source);
+
+ pa_xfree(o);
+}
+
+int pa_esound_options_parse(pa_esound_options *o, pa_core *c, pa_modargs *ma) {
+ pa_bool_t enabled;
+ const char *acl;
+
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+ pa_assert(ma);
+
+ if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &o->auth_anonymous) < 0) {
+ pa_log("auth-anonymous= expects a boolean argument.");
+ return -1;
+ }
+
+ if ((acl = pa_modargs_get_value(ma, "auth-ip-acl", NULL))) {
+ pa_ip_acl *ipa;
+
+ if (!(ipa = pa_ip_acl_new(acl))) {
+ pa_log("Failed to parse IP ACL '%s'", acl);
+ return -1;
+ }
+
+ if (o->auth_ip_acl)
+ pa_ip_acl_free(o->auth_ip_acl);
+
+ o->auth_ip_acl = ipa;
+ }
+
+ enabled = TRUE;
+ if (pa_modargs_get_value_boolean(ma, "auth-cookie-enabled", &enabled) < 0) {
+ pa_log("auth-cookie-enabled= expects a boolean argument.");
+ return -1;
+ }
+
+ if (o->auth_cookie)
+ pa_auth_cookie_unref(o->auth_cookie);
+
+ if (enabled) {
+ const char *cn;
+
+ /* The new name for this is 'auth-cookie', for compat reasons
+ * we check the old name too */
+ if (!(cn = pa_modargs_get_value(ma, "auth-cookie", NULL)))
+ if (!(cn = pa_modargs_get_value(ma, "cookie", NULL)))
+ cn = DEFAULT_COOKIE_FILE;
+
+ if (!(o->auth_cookie = pa_auth_cookie_get(c, cn, ESD_KEY_LEN)))
+ return -1;
+
+ } else
+ o->auth_cookie = NULL;
+
+ pa_xfree(o->default_sink);
+ o->default_sink = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
+
+ pa_xfree(o->default_source);
+ o->default_source = pa_xstrdup(pa_modargs_get_value(ma, "source", NULL));
+
+ return 0;
}
diff --git a/src/pulsecore/protocol-esound.h b/src/pulsecore/protocol-esound.h
index 7f04edd..232df66 100644
--- a/src/pulsecore/protocol-esound.h
+++ b/src/pulsecore/protocol-esound.h
@@ -1,8 +1,6 @@
#ifndef fooprotocolesoundhfoo
#define fooprotocolesoundhfoo
-/* $Id: protocol-esound.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -26,13 +24,35 @@
***/
#include <pulsecore/core.h>
-#include <pulsecore/socket-server.h>
+#include <pulsecore/ipacl.h>
+#include <pulsecore/auth-cookie.h>
+#include <pulsecore/iochannel.h>
#include <pulsecore/module.h>
#include <pulsecore/modargs.h>
-typedef struct pa_protocol_esound pa_protocol_esound;
+typedef struct pa_esound_protocol pa_esound_protocol;
+
+typedef struct pa_esound_options {
+ PA_REFCNT_DECLARE;
+
+ pa_module *module;
+
+ pa_bool_t auth_anonymous;
+ pa_ip_acl *auth_ip_acl;
+ pa_auth_cookie *auth_cookie;
+
+ char *default_sink, *default_source;
+} pa_esound_options;
+
+pa_esound_protocol* pa_esound_protocol_get(pa_core*core);
+pa_esound_protocol* pa_esound_protocol_ref(pa_esound_protocol *p);
+void pa_esound_protocol_unref(pa_esound_protocol *p);
+void pa_esound_protocol_connect(pa_esound_protocol *p, pa_iochannel *io, pa_esound_options *o);
+void pa_esound_protocol_disconnect(pa_esound_protocol *p, pa_module *m);
-pa_protocol_esound* pa_protocol_esound_new(pa_core*core, pa_socket_server *server, pa_module *m, pa_modargs *ma);
-void pa_protocol_esound_free(pa_protocol_esound *p);
+pa_esound_options* pa_esound_options_new(void);
+pa_esound_options* pa_esound_options_ref(pa_esound_options *o);
+void pa_esound_options_unref(pa_esound_options *o);
+int pa_esound_options_parse(pa_esound_options *o, pa_core *c, pa_modargs *ma);
#endif
diff --git a/src/pulsecore/protocol-http.c b/src/pulsecore/protocol-http.c
index 8ae318e..c89d48b 100644
--- a/src/pulsecore/protocol-http.c
+++ b/src/pulsecore/protocol-http.c
@@ -1,5 +1,3 @@
-/* $Id: protocol-http.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -37,6 +35,7 @@
#include <pulsecore/log.h>
#include <pulsecore/namereg.h>
#include <pulsecore/cli-text.h>
+#include <pulsecore/shared.h>
#include "protocol-http.h"
@@ -50,16 +49,21 @@
#define URL_STATUS "/status"
struct connection {
- pa_protocol_http *protocol;
+ pa_http_protocol *protocol;
pa_ioline *line;
- enum { REQUEST_LINE, MIME_HEADER, DATA } state;
+ enum {
+ REQUEST_LINE,
+ MIME_HEADER,
+ DATA
+ } state;
char *url;
+ pa_module *module;
};
-struct pa_protocol_http {
- pa_module *module;
+struct pa_http_protocol {
+ PA_REFCNT_DECLARE;
+
pa_core *core;
- pa_socket_server*server;
pa_idxset *connections;
};
@@ -103,14 +107,13 @@ static void http_message(struct connection *c, int code, const char *msg, const
}
-static void connection_free(struct connection *c, int del) {
+static void connection_unlink(struct connection *c) {
pa_assert(c);
if (c->url)
pa_xfree(c->url);
- if (del)
- pa_idxset_remove_by_data(c->protocol->connections, c, NULL);
+ pa_idxset_remove_by_data(c->protocol->connections, c, NULL);
pa_ioline_unref(c->line);
pa_xfree(c);
@@ -123,7 +126,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
if (!s) {
/* EOF */
- connection_free(c, 1);
+ connection_unlink(c);
return;
}
@@ -168,7 +171,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
#define PRINTF_FIELD(a,b) pa_ioline_printf(c->line, "<tr><td><b>%s</b></td><td>%s</td></tr>\n",(a),(b))
PRINTF_FIELD("User Name:", pa_get_user_name(txt, sizeof(txt)));
- PRINTF_FIELD("Fully Qualified Domain Name:", pa_get_fqdn(txt, sizeof(txt)));
+ PRINTF_FIELD("Host name:", pa_get_host_name(txt, sizeof(txt)));
PRINTF_FIELD("Default Sample Specification:", pa_sample_spec_snprint(txt, sizeof(txt), &c->protocol->core->default_sample_spec));
PRINTF_FIELD("Default Sink:", pa_namereg_get_default_sink_name(c->protocol->core));
PRINTF_FIELD("Default Source:", pa_namereg_get_default_source_name(c->protocol->core));
@@ -222,16 +225,15 @@ fail:
internal_server_error(c);
}
-static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) {
- pa_protocol_http *p = userdata;
+void pa_http_protocol_connect(pa_http_protocol *p, pa_iochannel *io, pa_module *m) {
struct connection *c;
- pa_assert(s);
- pa_assert(io);
pa_assert(p);
+ pa_assert(io);
+ pa_assert(m);
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
- pa_log_warn("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
+ pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
pa_iochannel_free(io);
return;
}
@@ -241,37 +243,73 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
c->line = pa_ioline_new(io);
c->state = REQUEST_LINE;
c->url = NULL;
+ c->module = m;
pa_ioline_set_callback(c->line, line_callback, c);
+
pa_idxset_put(p->connections, c, NULL);
}
-pa_protocol_http* pa_protocol_http_new(pa_core *core, pa_socket_server *server, pa_module *m, PA_GCC_UNUSED pa_modargs *ma) {
- pa_protocol_http* p;
+void pa_http_protocol_disconnect(pa_http_protocol *p, pa_module *m) {
+ struct connection *c;
+ void *state = NULL;
+
+ pa_assert(p);
+ pa_assert(m);
- pa_core_assert_ref(core);
- pa_assert(server);
+ while ((c = pa_idxset_iterate(p->connections, &state, NULL)))
+ if (c->module == m)
+ connection_unlink(c);
+}
+
+static pa_http_protocol* http_protocol_new(pa_core *c) {
+ pa_http_protocol *p;
+
+ pa_assert(c);
- p = pa_xnew(pa_protocol_http, 1);
- p->module = m;
- p->core = core;
- p->server = server;
+ p = pa_xnew(pa_http_protocol, 1);
+ PA_REFCNT_INIT(p);
+ p->core = c;
p->connections = pa_idxset_new(NULL, NULL);
- pa_socket_server_set_callback(p->server, on_connection, p);
+ pa_assert_se(pa_shared_set(c, "http-protocol", p) >= 0);
return p;
}
-static void free_connection(void *p, PA_GCC_UNUSED void *userdata) {
+pa_http_protocol* pa_http_protocol_get(pa_core *c) {
+ pa_http_protocol *p;
+
+ if ((p = pa_shared_get(c, "http-protocol")))
+ return pa_http_protocol_ref(p);
+
+ return http_protocol_new(c);
+}
+
+pa_http_protocol* pa_http_protocol_ref(pa_http_protocol *p) {
pa_assert(p);
- connection_free(p, 0);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+
+ PA_REFCNT_INC(p);
+
+ return p;
}
-void pa_protocol_http_free(pa_protocol_http *p) {
+void pa_http_protocol_unref(pa_http_protocol *p) {
+ struct connection *c;
+
pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+
+ if (PA_REFCNT_DEC(p) > 0)
+ return;
+
+ while ((c = pa_idxset_first(p->connections, NULL)))
+ connection_unlink(c);
+
+ pa_idxset_free(p->connections, NULL, NULL);
+
+ pa_assert_se(pa_shared_remove(p->core, "http-protocol") >= 0);
- pa_idxset_free(p->connections, free_connection, NULL);
- pa_socket_server_unref(p->server);
pa_xfree(p);
}
diff --git a/src/pulsecore/protocol-http.h b/src/pulsecore/protocol-http.h
index 6ed7b65..7e8f976 100644
--- a/src/pulsecore/protocol-http.h
+++ b/src/pulsecore/protocol-http.h
@@ -1,8 +1,6 @@
#ifndef fooprotocolhttphfoo
#define fooprotocolhttphfoo
-/* $Id: protocol-http.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -25,13 +23,17 @@
***/
#include <pulsecore/core.h>
-#include <pulsecore/socket-server.h>
#include <pulsecore/module.h>
#include <pulsecore/modargs.h>
+#include <pulsecore/iochannel.h>
+
-typedef struct pa_protocol_http pa_protocol_http;
+typedef struct pa_http_protocol pa_http_protocol;
-pa_protocol_http* pa_protocol_http_new(pa_core *core, pa_socket_server *server, pa_module *m, pa_modargs *ma);
-void pa_protocol_http_free(pa_protocol_http *n);
+pa_http_protocol* pa_http_protocol_get(pa_core *core);
+pa_http_protocol* pa_http_protocol_ref(pa_http_protocol *p);
+void pa_http_protocol_unref(pa_http_protocol *p);
+void pa_http_protocol_connect(pa_http_protocol *p, pa_iochannel *io, pa_module *m);
+void pa_http_protocol_disconnect(pa_http_protocol *p, pa_module *m);
#endif
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 0a0b911..778aab5 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -1,5 +1,3 @@
-/* $Id: protocol-native.c 2188 2008-03-29 00:31:10Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -52,9 +50,8 @@
#include <pulsecore/core-subscribe.h>
#include <pulsecore/log.h>
#include <pulsecore/autoload.h>
-#include <pulsecore/authkey-prop.h>
#include <pulsecore/strlist.h>
-#include <pulsecore/props.h>
+#include <pulsecore/shared.h>
#include <pulsecore/sample-util.h>
#include <pulsecore/llist.h>
#include <pulsecore/creds.h>
@@ -71,50 +68,66 @@
#define MAX_CONNECTIONS 64
#define MAX_MEMBLOCKQ_LENGTH (4*1024*1024) /* 4MB */
+#define DEFAULT_TLENGTH_MSEC 2000 /* 2s */
+#define DEFAULT_PROCESS_MSEC 20 /* 20ms */
+#define DEFAULT_FRAGSIZE_MSEC DEFAULT_TLENGTH_MSEC
-typedef struct connection connection;
-struct pa_protocol_native;
+struct pa_native_protocol;
typedef struct record_stream {
pa_msgobject parent;
- connection *connection;
+ pa_native_connection *connection;
uint32_t index;
pa_source_output *source_output;
pa_memblockq *memblockq;
size_t fragment_size;
+ pa_usec_t source_latency;
} record_stream;
+PA_DECLARE_CLASS(record_stream);
+#define RECORD_STREAM(o) (record_stream_cast(o))
+static PA_DEFINE_CHECK_TYPE(record_stream, pa_msgobject);
+
typedef struct output_stream {
pa_msgobject parent;
} output_stream;
+PA_DECLARE_CLASS(output_stream);
+#define OUTPUT_STREAM(o) (output_stream_cast(o))
+static PA_DEFINE_CHECK_TYPE(output_stream, pa_msgobject);
+
typedef struct playback_stream {
output_stream parent;
- connection *connection;
+ pa_native_connection *connection;
uint32_t index;
pa_sink_input *sink_input;
pa_memblockq *memblockq;
- int drain_request;
+ pa_bool_t is_underrun:1;
+ pa_bool_t drain_request:1;
uint32_t drain_tag;
uint32_t syncid;
- int underrun;
pa_atomic_t missing;
size_t minreq;
+ pa_usec_t sink_latency;
/* Only updated after SINK_INPUT_MESSAGE_UPDATE_LATENCY */
int64_t read_index, write_index;
- size_t resampled_chunk_length;
+ size_t render_memblockq_length;
} playback_stream;
+PA_DECLARE_CLASS(playback_stream);
+#define PLAYBACK_STREAM(o) (playback_stream_cast(o))
+static PA_DEFINE_CHECK_TYPE(playback_stream, output_stream);
+
typedef struct upload_stream {
output_stream parent;
- connection *connection;
+ pa_native_connection *connection;
uint32_t index;
pa_memchunk memchunk;
@@ -122,14 +135,20 @@ typedef struct upload_stream {
char *name;
pa_sample_spec sample_spec;
pa_channel_map channel_map;
+ pa_proplist *proplist;
} upload_stream;
-struct connection {
- pa_msgobject parent;
+PA_DECLARE_CLASS(upload_stream);
+#define UPLOAD_STREAM(o) (upload_stream_cast(o))
+static PA_DEFINE_CHECK_TYPE(upload_stream, output_stream);
- int authorized;
+struct pa_native_connection {
+ pa_msgobject parent;
+ pa_native_protocol *protocol;
+ pa_native_options *options;
+ pa_bool_t authorized:1;
+ pa_bool_t is_local:1;
uint32_t version;
- pa_protocol_native *protocol;
pa_client *client;
pa_pstream *pstream;
pa_pdispatch *pdispatch;
@@ -139,38 +158,20 @@ struct connection {
pa_time_event *auth_timeout_event;
};
-PA_DECLARE_CLASS(record_stream);
-#define RECORD_STREAM(o) (record_stream_cast(o))
-static PA_DEFINE_CHECK_TYPE(record_stream, pa_msgobject);
+PA_DECLARE_CLASS(pa_native_connection);
+#define PA_NATIVE_CONNECTION(o) (pa_native_connection_cast(o))
+static PA_DEFINE_CHECK_TYPE(pa_native_connection, pa_msgobject);
-PA_DECLARE_CLASS(output_stream);
-#define OUTPUT_STREAM(o) (output_stream_cast(o))
-static PA_DEFINE_CHECK_TYPE(output_stream, pa_msgobject);
+struct pa_native_protocol {
+ PA_REFCNT_DECLARE;
-PA_DECLARE_CLASS(playback_stream);
-#define PLAYBACK_STREAM(o) (playback_stream_cast(o))
-static PA_DEFINE_CHECK_TYPE(playback_stream, output_stream);
-
-PA_DECLARE_CLASS(upload_stream);
-#define UPLOAD_STREAM(o) (upload_stream_cast(o))
-static PA_DEFINE_CHECK_TYPE(upload_stream, output_stream);
-
-PA_DECLARE_CLASS(connection);
-#define CONNECTION(o) (connection_cast(o))
-static PA_DEFINE_CHECK_TYPE(connection, pa_msgobject);
-
-struct pa_protocol_native {
- pa_module *module;
pa_core *core;
- int public;
- pa_socket_server *server;
pa_idxset *connections;
- uint8_t auth_cookie[PA_NATIVE_COOKIE_LENGTH];
- int auth_cookie_in_property;
-#ifdef HAVE_CREDS
- char *auth_group;
-#endif
- pa_ip_acl *auth_ip_acl;
+
+ pa_strlist *servers;
+ pa_hook hooks[PA_NATIVE_HOOK_MAX];
+
+ pa_hashmap *extensions;
};
enum {
@@ -187,7 +188,8 @@ enum {
PLAYBACK_STREAM_MESSAGE_REQUEST_DATA, /* data requested from sink input from the main loop */
PLAYBACK_STREAM_MESSAGE_UNDERFLOW,
PLAYBACK_STREAM_MESSAGE_OVERFLOW,
- PLAYBACK_STREAM_MESSAGE_DRAIN_ACK
+ PLAYBACK_STREAM_MESSAGE_DRAIN_ACK,
+ PLAYBACK_STREAM_MESSAGE_STARTED
};
enum {
@@ -199,14 +201,16 @@ enum {
CONNECTION_MESSAGE_REVOKE
};
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk);
-static void sink_input_drop_cb(pa_sink_input *i, size_t length);
+static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk);
static void sink_input_kill_cb(pa_sink_input *i);
static void sink_input_suspend_cb(pa_sink_input *i, pa_bool_t suspend);
static void sink_input_moved_cb(pa_sink_input *i);
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes);
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes);
+static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes);
-static void send_memblock(connection *c);
-static void request_bytes(struct playback_stream*s);
+static void native_connection_send_memblock(pa_native_connection *c);
+static void playback_stream_request_bytes(struct playback_stream*s);
static void source_output_kill_cb(pa_source_output *o);
static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk);
@@ -254,6 +258,9 @@ static void command_move_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag
static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static void command_set_stream_buffer_attr(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static void command_update_stream_sample_rate(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_update_proplist(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_remove_proplist(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
[PA_COMMAND_ERROR] = NULL,
@@ -335,7 +342,17 @@ static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
[PA_COMMAND_SET_RECORD_STREAM_BUFFER_ATTR] = command_set_stream_buffer_attr,
[PA_COMMAND_UPDATE_PLAYBACK_STREAM_SAMPLE_RATE] = command_update_stream_sample_rate,
- [PA_COMMAND_UPDATE_RECORD_STREAM_SAMPLE_RATE] = command_update_stream_sample_rate
+ [PA_COMMAND_UPDATE_RECORD_STREAM_SAMPLE_RATE] = command_update_stream_sample_rate,
+
+ [PA_COMMAND_UPDATE_RECORD_STREAM_PROPLIST] = command_update_proplist,
+ [PA_COMMAND_UPDATE_PLAYBACK_STREAM_PROPLIST] = command_update_proplist,
+ [PA_COMMAND_UPDATE_CLIENT_PROPLIST] = command_update_proplist,
+
+ [PA_COMMAND_REMOVE_RECORD_STREAM_PROPLIST] = command_remove_proplist,
+ [PA_COMMAND_REMOVE_PLAYBACK_STREAM_PROPLIST] = command_remove_proplist,
+ [PA_COMMAND_REMOVE_CLIENT_PROPLIST] = command_remove_proplist,
+
+ [PA_COMMAND_EXTENSION] = command_extension
};
/* structure management */
@@ -359,6 +376,9 @@ static void upload_stream_free(pa_object *o) {
pa_xfree(s->name);
+ if (s->proplist)
+ pa_proplist_free(s->proplist);
+
if (s->memchunk.memblock)
pa_memblock_unref(s->memchunk.memblock);
@@ -366,10 +386,12 @@ static void upload_stream_free(pa_object *o) {
}
static upload_stream* upload_stream_new(
- connection *c,
+ pa_native_connection *c,
const pa_sample_spec *ss,
const pa_channel_map *map,
- const char *name, size_t length) {
+ const char *name,
+ size_t length,
+ pa_proplist *p) {
upload_stream *s;
@@ -377,6 +399,7 @@ static upload_stream* upload_stream_new(
pa_assert(ss);
pa_assert(name);
pa_assert(length > 0);
+ pa_assert(p);
s = pa_msgobject_new(upload_stream);
s->parent.parent.parent.free = upload_stream_free;
@@ -386,6 +409,8 @@ static upload_stream* upload_stream_new(
s->name = pa_xstrdup(name);
pa_memchunk_reset(&s->memchunk);
s->length = length;
+ s->proplist = pa_proplist_copy(p);
+ pa_proplist_update(s->proplist, PA_UPDATE_MERGE, c->client->proplist);
pa_idxset_put(c->output_streams, s, &s->index);
@@ -436,7 +461,7 @@ static int record_stream_process_msg(pa_msgobject *o, int code, void*userdata, i
}
if (!pa_pstream_is_pending(s->connection->pstream))
- send_memblock(s->connection);
+ native_connection_send_memblock(s->connection);
break;
}
@@ -444,15 +469,128 @@ static int record_stream_process_msg(pa_msgobject *o, int code, void*userdata, i
return 0;
}
+static void fix_record_buffer_attr_pre(
+ record_stream *s,
+ pa_bool_t adjust_latency,
+ pa_bool_t early_requests,
+ uint32_t *maxlength,
+ uint32_t *fragsize) {
+
+ size_t frame_size;
+ pa_usec_t orig_fragsize_usec, fragsize_usec, source_usec;
+
+ pa_assert(s);
+ pa_assert(maxlength);
+ pa_assert(fragsize);
+
+ frame_size = pa_frame_size(&s->source_output->sample_spec);
+
+ if (*maxlength == (uint32_t) -1 || *maxlength > MAX_MEMBLOCKQ_LENGTH)
+ *maxlength = MAX_MEMBLOCKQ_LENGTH;
+ if (*maxlength <= 0)
+ *maxlength = (uint32_t) frame_size;
+
+ if (*fragsize == (uint32_t) -1)
+ *fragsize = (uint32_t) pa_usec_to_bytes(DEFAULT_FRAGSIZE_MSEC*PA_USEC_PER_MSEC, &s->source_output->sample_spec);
+ if (*fragsize <= 0)
+ *fragsize = (uint32_t) frame_size;
+
+ orig_fragsize_usec = fragsize_usec = pa_bytes_to_usec(*fragsize, &s->source_output->sample_spec);
+
+ if (early_requests) {
+
+ /* In early request mode we need to emulate the classic
+ * fragment-based playback model. We do this setting the source
+ * latency to the fragment size. */
+
+ source_usec = fragsize_usec;
+
+ } else if (adjust_latency) {
+
+ /* So, the user asked us to adjust the latency according to
+ * what the source can provide. Half the latency will be
+ * spent on the hw buffer, half of it in the async buffer
+ * queue we maintain for each client. */
+
+ source_usec = fragsize_usec/2;
+
+ } else {
+
+ /* Ok, the user didn't ask us to adjust the latency, hence we
+ * don't */
+
+ source_usec = 0;
+ }
+
+ if (source_usec > 0)
+ s->source_latency = pa_source_output_set_requested_latency(s->source_output, source_usec);
+ else
+ s->source_latency = 0;
+
+ if (early_requests) {
+
+ /* Ok, we didn't necessarily get what we were asking for, so
+ * let's tell the user */
+
+ fragsize_usec = s->source_latency;
+
+ } else if (adjust_latency) {
+
+ /* Now subtract what we actually got */
+
+ if (fragsize_usec >= s->source_latency*2)
+ fragsize_usec -= s->source_latency;
+ else
+ fragsize_usec = s->source_latency;
+ }
+
+ if (pa_usec_to_bytes(orig_fragsize_usec, &s->source_output->sample_spec) !=
+ pa_usec_to_bytes(fragsize_usec, &s->source_output->sample_spec))
+
+ *fragsize = (uint32_t) pa_usec_to_bytes(fragsize_usec, &s->source_output->sample_spec);
+
+ if (*fragsize <= 0)
+ *fragsize = (uint32_t) frame_size;
+}
+
+static void fix_record_buffer_attr_post(
+ record_stream *s,
+ uint32_t *maxlength,
+ uint32_t *fragsize) {
+
+ size_t base;
+
+ pa_assert(s);
+ pa_assert(maxlength);
+ pa_assert(fragsize);
+
+ *maxlength = (uint32_t) pa_memblockq_get_maxlength(s->memblockq);
+
+ base = pa_frame_size(&s->source_output->sample_spec);
+
+ s->fragment_size = (*fragsize/base)*base;
+ if (s->fragment_size <= 0)
+ s->fragment_size = base;
+
+ if (s->fragment_size > *maxlength)
+ s->fragment_size = *maxlength;
+
+ *fragsize = (uint32_t) s->fragment_size;
+}
+
static record_stream* record_stream_new(
- connection *c,
+ pa_native_connection *c,
pa_source *source,
pa_sample_spec *ss,
pa_channel_map *map,
- const char *name,
+ pa_bool_t peak_detect,
uint32_t *maxlength,
- uint32_t fragment_size,
- pa_source_output_flags_t flags) {
+ uint32_t *fragsize,
+ pa_source_output_flags_t flags,
+ pa_proplist *p,
+ pa_bool_t adjust_latency,
+ pa_sink_input *direct_on_input,
+ pa_bool_t early_requests) {
record_stream *s;
pa_source_output *source_output;
@@ -461,20 +599,28 @@ static record_stream* record_stream_new(
pa_assert(c);
pa_assert(ss);
- pa_assert(name);
pa_assert(maxlength);
- pa_assert(*maxlength > 0);
+ pa_assert(p);
pa_source_output_new_data_init(&data);
- data.module = c->protocol->module;
+
+ pa_proplist_update(data.proplist, PA_UPDATE_REPLACE, p);
+ pa_proplist_update(data.proplist, PA_UPDATE_MERGE, c->client->proplist);
+ data.driver = __FILE__;
+ data.module = c->options->module;
data.client = c->client;
data.source = source;
- data.driver = __FILE__;
- data.name = name;
+ data.direct_on_input = direct_on_input;
pa_source_output_new_data_set_sample_spec(&data, ss);
pa_source_output_new_data_set_channel_map(&data, map);
+ if (peak_detect)
+ data.resample_method = PA_RESAMPLER_PEAKS;
- if (!(source_output = pa_source_output_new(c->protocol->core, &data, flags)))
+ source_output = pa_source_output_new(c->protocol->core, &data, flags);
+
+ pa_source_output_new_data_done(&data);
+
+ if (!source_output)
return NULL;
s = pa_msgobject_new(record_stream);
@@ -482,6 +628,7 @@ static record_stream* record_stream_new(
s->parent.process_msg = record_stream_process_msg;
s->connection = c;
s->source_output = source_output;
+
s->source_output->push = source_output_push_cb;
s->source_output->kill = source_output_kill_cb;
s->source_output->get_latency = source_output_get_latency_cb;
@@ -489,33 +636,45 @@ static record_stream* record_stream_new(
s->source_output->suspend = source_output_suspend_cb;
s->source_output->userdata = s;
+ fix_record_buffer_attr_pre(s, adjust_latency, early_requests, maxlength, fragsize);
+
s->memblockq = pa_memblockq_new(
0,
*maxlength,
0,
- base = pa_frame_size(&s->source_output->sample_spec),
+ base = pa_frame_size(&source_output->sample_spec),
1,
0,
+ 0,
NULL);
- *maxlength = pa_memblockq_get_maxlength(s->memblockq);
-
- s->fragment_size = (fragment_size/base)*base;
- if (s->fragment_size <= 0)
- s->fragment_size = base;
-
- if (s->fragment_size > *maxlength)
- s->fragment_size = *maxlength;
+ fix_record_buffer_attr_post(s, maxlength, fragsize);
*ss = s->source_output->sample_spec;
*map = s->source_output->channel_map;
pa_idxset_put(c->record_streams, s, &s->index);
+ pa_log_info("Final latency %0.2f ms = %0.2f ms + %0.2f ms",
+ ((double) pa_bytes_to_usec(s->fragment_size, &source_output->sample_spec) + (double) s->source_latency) / PA_USEC_PER_MSEC,
+ (double) pa_bytes_to_usec(s->fragment_size, &source_output->sample_spec) / PA_USEC_PER_MSEC,
+ (double) s->source_latency / PA_USEC_PER_MSEC);
+
pa_source_output_put(s->source_output);
return s;
}
+static void record_stream_send_killed(record_stream *r) {
+ pa_tagstruct *t;
+ record_stream_assert_ref(r);
+
+ t = pa_tagstruct_new(NULL, 0);
+ pa_tagstruct_putu32(t, PA_COMMAND_RECORD_STREAM_KILLED);
+ pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
+ pa_tagstruct_putu32(t, r->index);
+ pa_pstream_send_tagstruct(r->connection->pstream, t);
+}
+
static void playback_stream_unlink(playback_stream *s) {
pa_assert(s);
@@ -559,21 +718,14 @@ static int playback_stream_process_msg(pa_msgobject *o, int code, void*userdata,
uint32_t l = 0;
for (;;) {
- int32_t k;
-
- if ((k = pa_atomic_load(&s->missing)) <= 0)
- break;
-
- l += k;
-
- if (l < s->minreq)
+ if ((l = (uint32_t) pa_atomic_load(&s->missing)) <= 0)
break;
- if (pa_atomic_sub(&s->missing, k) <= k)
+ if (pa_atomic_cmpxchg(&s->missing, (int) l, 0))
break;
}
- if (l < s->minreq)
+ if (l <= 0)
break;
t = pa_tagstruct_new(NULL, 0);
@@ -583,13 +735,15 @@ static int playback_stream_process_msg(pa_msgobject *o, int code, void*userdata,
pa_tagstruct_putu32(t, l);
pa_pstream_send_tagstruct(s->connection->pstream, t);
-/* pa_log("Requesting %u bytes", l); */
+/* pa_log("Requesting %lu bytes", (unsigned long) l); */
break;
}
case PLAYBACK_STREAM_MESSAGE_UNDERFLOW: {
pa_tagstruct *t;
+/* pa_log("signalling underflow"); */
+
/* Report that we're empty */
t = pa_tagstruct_new(NULL, 0);
pa_tagstruct_putu32(t, PA_COMMAND_UNDERFLOW);
@@ -611,41 +765,222 @@ static int playback_stream_process_msg(pa_msgobject *o, int code, void*userdata,
break;
}
+ case PLAYBACK_STREAM_MESSAGE_STARTED:
+
+ if (s->connection->version >= 13) {
+ pa_tagstruct *t;
+
+ /* Notify the user we're overflowed*/
+ t = pa_tagstruct_new(NULL, 0);
+ pa_tagstruct_putu32(t, PA_COMMAND_STARTED);
+ pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
+ pa_tagstruct_putu32(t, s->index);
+ pa_pstream_send_tagstruct(s->connection->pstream, t);
+ }
+
+ break;
+
case PLAYBACK_STREAM_MESSAGE_DRAIN_ACK:
pa_pstream_send_simple_ack(s->connection->pstream, PA_PTR_TO_UINT(userdata));
break;
-
}
return 0;
}
+static void fix_playback_buffer_attr_pre(
+ playback_stream *s,
+ pa_bool_t adjust_latency,
+ pa_bool_t early_requests,
+ uint32_t *maxlength,
+ uint32_t *tlength,
+ uint32_t* prebuf,
+ uint32_t* minreq) {
+
+ size_t frame_size;
+ pa_usec_t orig_tlength_usec, tlength_usec, orig_minreq_usec, minreq_usec, sink_usec;
+
+ pa_assert(s);
+ pa_assert(maxlength);
+ pa_assert(tlength);
+ pa_assert(prebuf);
+ pa_assert(minreq);
+
+ frame_size = pa_frame_size(&s->sink_input->sample_spec);
+
+ if (*maxlength == (uint32_t) -1 || *maxlength > MAX_MEMBLOCKQ_LENGTH)
+ *maxlength = MAX_MEMBLOCKQ_LENGTH;
+ if (*maxlength <= 0)
+ *maxlength = (uint32_t) frame_size;
+
+ if (*tlength == (uint32_t) -1)
+ *tlength = (uint32_t) pa_usec_to_bytes_round_up(DEFAULT_TLENGTH_MSEC*PA_USEC_PER_MSEC, &s->sink_input->sample_spec);
+ if (*tlength <= 0)
+ *tlength = (uint32_t) frame_size;
+
+ if (*minreq == (uint32_t) -1)
+ *minreq = (uint32_t) pa_usec_to_bytes_round_up(DEFAULT_PROCESS_MSEC*PA_USEC_PER_MSEC, &s->sink_input->sample_spec);
+ if (*minreq <= 0)
+ *minreq = (uint32_t) frame_size;
+
+ if (*tlength < *minreq+frame_size)
+ *tlength = *minreq+(uint32_t) frame_size;
+
+ orig_tlength_usec = tlength_usec = pa_bytes_to_usec(*tlength, &s->sink_input->sample_spec);
+ orig_minreq_usec = minreq_usec = pa_bytes_to_usec(*minreq, &s->sink_input->sample_spec);
+
+ pa_log_info("Requested tlength=%0.2f ms, minreq=%0.2f ms",
+ (double) tlength_usec / PA_USEC_PER_MSEC,
+ (double) minreq_usec / PA_USEC_PER_MSEC);
+
+ if (early_requests) {
+
+ /* In early request mode we need to emulate the classic
+ * fragment-based playback model. We do this setting the sink
+ * latency to the fragment size. */
+
+ sink_usec = minreq_usec;
+
+ pa_log_debug("Early requests mode enabled, configuring sink latency to minreq.");
+
+ } else if (adjust_latency) {
+
+ /* So, the user asked us to adjust the latency of the stream
+ * buffer according to the what the sink can provide. The
+ * tlength passed in shall be the overall latency. Roughly
+ * half the latency will be spent on the hw buffer, the other
+ * half of it in the async buffer queue we maintain for each
+ * client. In between we'll have a safety space of size
+ * 2*minreq. Why the 2*minreq? When the hw buffer is completey
+ * empty and needs to be filled, then our buffer must have
+ * enough data to fulfill this request immediatly and thus
+ * have at least the same tlength as the size of the hw
+ * buffer. It additionally needs space for 2 times minreq
+ * because if the buffer ran empty and a partial fillup
+ * happens immediately on the next iteration we need to be
+ * able to fulfill it and give the application also minreq
+ * time to fill it up again for the next request Makes 2 times
+ * minreq in plus.. */
+
+ if (tlength_usec > minreq_usec*2)
+ sink_usec = (tlength_usec - minreq_usec*2)/2;
+ else
+ sink_usec = 0;
+
+ pa_log_debug("Adjust latency mode enabled, configuring sink latency to half of overall latency.");
+
+ } else {
+
+ /* Ok, the user didn't ask us to adjust the latency, but we
+ * still need to make sure that the parameters from the user
+ * do make sense. */
+
+ if (tlength_usec > minreq_usec*2)
+ sink_usec = (tlength_usec - minreq_usec*2);
+ else
+ sink_usec = 0;
+
+ pa_log_debug("Traditional mode enabled, modifying sink usec only for compat with minreq.");
+ }
+
+ s->sink_latency = pa_sink_input_set_requested_latency(s->sink_input, sink_usec);
+
+ if (early_requests) {
+
+ /* Ok, we didn't necessarily get what we were asking for, so
+ * let's tell the user */
+
+ minreq_usec = s->sink_latency;
+
+ } else if (adjust_latency) {
+
+ /* Ok, we didn't necessarily get what we were asking for, so
+ * let's subtract from what we asked for for the remaining
+ * buffer space */
+
+ if (tlength_usec >= s->sink_latency)
+ tlength_usec -= s->sink_latency;
+ }
+
+ /* FIXME: This is actually larger than necessary, since not all of
+ * the sink latency is actually rewritable. */
+ if (tlength_usec < s->sink_latency + 2*minreq_usec)
+ tlength_usec = s->sink_latency + 2*minreq_usec;
+
+ if (pa_usec_to_bytes_round_up(orig_tlength_usec, &s->sink_input->sample_spec) !=
+ pa_usec_to_bytes_round_up(tlength_usec, &s->sink_input->sample_spec))
+ *tlength = (uint32_t) pa_usec_to_bytes_round_up(tlength_usec, &s->sink_input->sample_spec);
+
+ if (pa_usec_to_bytes(orig_minreq_usec, &s->sink_input->sample_spec) !=
+ pa_usec_to_bytes(minreq_usec, &s->sink_input->sample_spec))
+ *minreq = (uint32_t) pa_usec_to_bytes(minreq_usec, &s->sink_input->sample_spec);
+
+ if (*minreq <= 0) {
+ *minreq = (uint32_t) frame_size;
+ *tlength += (uint32_t) frame_size*2;
+ }
+
+ if (*tlength <= *minreq)
+ *tlength = *minreq*2 + (uint32_t) frame_size;
+
+ if (*prebuf == (uint32_t) -1 || *prebuf > *tlength)
+ *prebuf = *tlength;
+}
+
+static void fix_playback_buffer_attr_post(
+ playback_stream *s,
+ uint32_t *maxlength,
+ uint32_t *tlength,
+ uint32_t* prebuf,
+ uint32_t* minreq) {
+
+ pa_assert(s);
+ pa_assert(maxlength);
+ pa_assert(tlength);
+ pa_assert(prebuf);
+ pa_assert(minreq);
+
+ *maxlength = (uint32_t) pa_memblockq_get_maxlength(s->memblockq);
+ *tlength = (uint32_t) pa_memblockq_get_tlength(s->memblockq);
+ *prebuf = (uint32_t) pa_memblockq_get_prebuf(s->memblockq);
+ *minreq = (uint32_t) pa_memblockq_get_minreq(s->memblockq);
+
+ s->minreq = *minreq;
+}
+
static playback_stream* playback_stream_new(
- connection *c,
+ pa_native_connection *c,
pa_sink *sink,
pa_sample_spec *ss,
pa_channel_map *map,
- const char *name,
uint32_t *maxlength,
uint32_t *tlength,
uint32_t *prebuf,
uint32_t *minreq,
pa_cvolume *volume,
+ pa_bool_t muted,
uint32_t syncid,
uint32_t *missing,
- pa_sink_input_flags_t flags) {
+ pa_sink_input_flags_t flags,
+ pa_proplist *p,
+ pa_bool_t adjust_latency,
+ pa_bool_t early_requests) {
playback_stream *s, *ssync;
pa_sink_input *sink_input;
- pa_memblock *silence;
+ pa_memchunk silence;
uint32_t idx;
int64_t start_index;
pa_sink_input_new_data data;
pa_assert(c);
pa_assert(ss);
- pa_assert(name);
pa_assert(maxlength);
+ pa_assert(tlength);
+ pa_assert(prebuf);
+ pa_assert(minreq);
+ pa_assert(missing);
+ pa_assert(p);
/* Find syncid group */
for (ssync = pa_idxset_first(c->output_streams, &idx); ssync; ssync = pa_idxset_next(c->output_streams, &idx)) {
@@ -667,17 +1002,25 @@ static playback_stream* playback_stream_new(
}
pa_sink_input_new_data_init(&data);
- data.sink = sink;
+
+ pa_proplist_update(data.proplist, PA_UPDATE_REPLACE, p);
+ pa_proplist_update(data.proplist, PA_UPDATE_MERGE, c->client->proplist);
data.driver = __FILE__;
- data.name = name;
+ data.module = c->options->module;
+ data.client = c->client;
+ data.sink = sink;
pa_sink_input_new_data_set_sample_spec(&data, ss);
pa_sink_input_new_data_set_channel_map(&data, map);
- pa_sink_input_new_data_set_volume(&data, volume);
- data.module = c->protocol->module;
- data.client = c->client;
+ if (volume)
+ pa_sink_input_new_data_set_volume(&data, volume);
+ pa_sink_input_new_data_set_muted(&data, muted);
data.sync_base = ssync ? ssync->sink_input : NULL;
- if (!(sink_input = pa_sink_input_new(c->protocol->core, &data, flags)))
+ sink_input = pa_sink_input_new(c->protocol->core, &data, flags);
+
+ pa_sink_input_new_data_done(&data);
+
+ if (!sink_input)
return NULL;
s = pa_msgobject_new(playback_stream);
@@ -686,11 +1029,15 @@ static playback_stream* playback_stream_new(
s->connection = c;
s->syncid = syncid;
s->sink_input = sink_input;
- s->underrun = 1;
+ s->is_underrun = TRUE;
+ s->drain_request = FALSE;
+ pa_atomic_store(&s->missing, 0);
s->sink_input->parent.process_msg = sink_input_process_msg;
- s->sink_input->peek = sink_input_peek_cb;
- s->sink_input->drop = sink_input_drop_cb;
+ s->sink_input->pop = sink_input_pop_cb;
+ s->sink_input->process_rewind = sink_input_process_rewind_cb;
+ s->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
+ s->sink_input->update_max_request = sink_input_update_max_request_cb;
s->sink_input->kill = sink_input_kill_cb;
s->sink_input->moved = sink_input_moved_cb;
s->sink_input->suspend = sink_input_suspend_cb;
@@ -698,42 +1045,74 @@ static playback_stream* playback_stream_new(
start_index = ssync ? pa_memblockq_get_read_index(ssync->memblockq) : 0;
- silence = pa_silence_memblock_new(c->protocol->core->mempool, &s->sink_input->sample_spec, 0);
+ fix_playback_buffer_attr_pre(s, adjust_latency, early_requests, maxlength, tlength, prebuf, minreq);
+ pa_sink_input_get_silence(sink_input, &silence);
s->memblockq = pa_memblockq_new(
start_index,
*maxlength,
*tlength,
- pa_frame_size(&s->sink_input->sample_spec),
+ pa_frame_size(&sink_input->sample_spec),
*prebuf,
*minreq,
- silence);
+ 0,
+ &silence);
- pa_memblock_unref(silence);
+ pa_memblock_unref(silence.memblock);
+ fix_playback_buffer_attr_post(s, maxlength, tlength, prebuf, minreq);
- *maxlength = (uint32_t) pa_memblockq_get_maxlength(s->memblockq);
- *tlength = (uint32_t) pa_memblockq_get_tlength(s->memblockq);
- *prebuf = (uint32_t) pa_memblockq_get_prebuf(s->memblockq);
- *minreq = (uint32_t) pa_memblockq_get_minreq(s->memblockq);
*missing = (uint32_t) pa_memblockq_pop_missing(s->memblockq);
*ss = s->sink_input->sample_spec;
*map = s->sink_input->channel_map;
- s->minreq = pa_memblockq_get_minreq(s->memblockq);
- pa_atomic_store(&s->missing, 0);
- s->drain_request = 0;
-
pa_idxset_put(c->output_streams, s, &s->index);
- pa_sink_input_put(s->sink_input);
+ pa_log_info("Final latency %0.2f ms = %0.2f ms + 2*%0.2f ms + %0.2f ms",
+ ((double) pa_bytes_to_usec(*tlength, &sink_input->sample_spec) + (double) s->sink_latency) / PA_USEC_PER_MSEC,
+ (double) pa_bytes_to_usec(*tlength-*minreq*2, &sink_input->sample_spec) / PA_USEC_PER_MSEC,
+ (double) pa_bytes_to_usec(*minreq, &sink_input->sample_spec) / PA_USEC_PER_MSEC,
+ (double) s->sink_latency / PA_USEC_PER_MSEC);
+ pa_sink_input_put(s->sink_input);
return s;
}
-static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int64_t offset, pa_memchunk *chunk) {
- connection *c = CONNECTION(o);
- connection_assert_ref(c);
+/* Called from thread context */
+static void playback_stream_request_bytes(playback_stream *s) {
+ size_t m, previous_missing;
+
+ playback_stream_assert_ref(s);
+
+ m = pa_memblockq_pop_missing(s->memblockq);
+
+ if (m <= 0)
+ return;
+
+/* pa_log("request_bytes(%lu)", (unsigned long) m); */
+
+ previous_missing = (size_t) pa_atomic_add(&s->missing, (int) m);
+
+ if (pa_memblockq_prebuf_active(s->memblockq) ||
+ (previous_missing < s->minreq && previous_missing+m >= s->minreq))
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_REQUEST_DATA, NULL, 0, NULL, NULL);
+}
+
+
+static void playback_stream_send_killed(playback_stream *p) {
+ pa_tagstruct *t;
+ playback_stream_assert_ref(p);
+
+ t = pa_tagstruct_new(NULL, 0);
+ pa_tagstruct_putu32(t, PA_COMMAND_PLAYBACK_STREAM_KILLED);
+ pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
+ pa_tagstruct_putu32(t, p->index);
+ pa_pstream_send_tagstruct(p->connection->pstream, t);
+}
+
+static int native_connection_process_msg(pa_msgobject *o, int code, void*userdata, int64_t offset, pa_memchunk *chunk) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(o);
+ pa_native_connection_assert_ref(c);
if (!c->protocol)
return -1;
@@ -752,7 +1131,7 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int6
return 0;
}
-static void connection_unlink(connection *c) {
+static void native_connection_unlink(pa_native_connection *c) {
record_stream *r;
output_stream *o;
@@ -761,6 +1140,11 @@ static void connection_unlink(connection *c) {
if (!c->protocol)
return;
+ pa_hook_fire(&c->protocol->hooks[PA_NATIVE_HOOK_CONNECTION_UNLINK], c);
+
+ if (c->options)
+ pa_native_options_unref(c->options);
+
while ((r = pa_idxset_first(c->record_streams, NULL)))
record_stream_unlink(r);
@@ -783,15 +1167,15 @@ static void connection_unlink(connection *c) {
pa_assert_se(pa_idxset_remove_by_data(c->protocol->connections, c, NULL) == c);
c->protocol = NULL;
- connection_unref(c);
+ pa_native_connection_unref(c);
}
-static void connection_free(pa_object *o) {
- connection *c = CONNECTION(o);
+static void native_connection_free(pa_object *o) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(o);
pa_assert(c);
- connection_unlink(c);
+ native_connection_unlink(c);
pa_idxset_free(c->record_streams, NULL, NULL);
pa_idxset_free(c->output_streams, NULL, NULL);
@@ -803,27 +1187,7 @@ static void connection_free(pa_object *o) {
pa_xfree(c);
}
-/* Called from thread context */
-static void request_bytes(playback_stream *s) {
- size_t m, previous_missing;
-
- playback_stream_assert_ref(s);
-
- m = pa_memblockq_pop_missing(s->memblockq);
-
- if (m <= 0)
- return;
-
-/* pa_log("request_bytes(%u)", m); */
-
- previous_missing = pa_atomic_add(&s->missing, m);
- if (previous_missing < s->minreq && previous_missing+m >= s->minreq) {
- pa_assert(pa_thread_mq_get());
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_REQUEST_DATA, NULL, 0, NULL, NULL);
- }
-}
-
-static void send_memblock(connection *c) {
+static void native_connection_send_memblock(pa_native_connection *c) {
uint32_t start;
record_stream *r;
@@ -855,29 +1219,44 @@ static void send_memblock(connection *c) {
}
}
-static void send_playback_stream_killed(playback_stream *p) {
- pa_tagstruct *t;
- playback_stream_assert_ref(p);
+/*** sink input callbacks ***/
- t = pa_tagstruct_new(NULL, 0);
- pa_tagstruct_putu32(t, PA_COMMAND_PLAYBACK_STREAM_KILLED);
- pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
- pa_tagstruct_putu32(t, p->index);
- pa_pstream_send_tagstruct(p->connection->pstream, t);
-}
+static void handle_seek(playback_stream *s, int64_t indexw) {
+ playback_stream_assert_ref(s);
-static void send_record_stream_killed(record_stream *r) {
- pa_tagstruct *t;
- record_stream_assert_ref(r);
+/* pa_log("handle_seek: %llu -- %i", (unsigned long long) s->sink_input->thread_info.underrun_for, pa_memblockq_is_readable(s->memblockq)); */
- t = pa_tagstruct_new(NULL, 0);
- pa_tagstruct_putu32(t, PA_COMMAND_RECORD_STREAM_KILLED);
- pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
- pa_tagstruct_putu32(t, r->index);
- pa_pstream_send_tagstruct(r->connection->pstream, t);
-}
+ if (s->sink_input->thread_info.underrun_for > 0) {
-/*** sink input callbacks ***/
+/* pa_log("%lu vs. %lu", (unsigned long) pa_memblockq_get_length(s->memblockq), (unsigned long) pa_memblockq_get_prebuf(s->memblockq)); */
+
+ if (pa_memblockq_is_readable(s->memblockq)) {
+
+ /* We just ended an underrun, let's ask the sink
+ * for a complete rewind rewrite */
+
+ pa_log_debug("Requesting rewind due to end of underrun.");
+ pa_sink_input_request_rewind(s->sink_input,
+ (size_t) (s->sink_input->thread_info.underrun_for == (size_t) -1 ? 0 : s->sink_input->thread_info.underrun_for),
+ FALSE, TRUE);
+ }
+
+ } else {
+ int64_t indexr;
+
+ indexr = pa_memblockq_get_read_index(s->memblockq);
+
+ if (indexw < indexr) {
+ /* OK, the sink already asked for this data, so
+ * let's have it usk us again */
+
+ pa_log_debug("Requesting rewind due to rewrite.");
+ pa_sink_input_request_rewind(s->sink_input, (size_t) (indexr - indexw), TRUE, FALSE);
+ }
+ }
+
+ playback_stream_request_bytes(s);
+}
/* Called from thread context */
static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk) {
@@ -890,60 +1269,57 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
switch (code) {
- case SINK_INPUT_MESSAGE_SEEK:
+ case SINK_INPUT_MESSAGE_SEEK: {
+ int64_t windex;
+
+ windex = pa_memblockq_get_write_index(s->memblockq);
pa_memblockq_seek(s->memblockq, offset, PA_PTR_TO_UINT(userdata));
- request_bytes(s);
+
+ handle_seek(s, windex);
return 0;
+ }
case SINK_INPUT_MESSAGE_POST_DATA: {
+ int64_t windex;
+
pa_assert(chunk);
-/* pa_log("sink input post: %u", chunk->length); */
+ windex = pa_memblockq_get_write_index(s->memblockq);
- if (pa_memblockq_push_align(s->memblockq, chunk) < 0) {
+/* pa_log("sink input post: %lu %lli", (unsigned long) chunk->length, (long long) windex); */
+ if (pa_memblockq_push_align(s->memblockq, chunk) < 0) {
pa_log_warn("Failed to push data into queue");
pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_OVERFLOW, NULL, 0, NULL, NULL);
- pa_memblockq_seek(s->memblockq, chunk->length, PA_SEEK_RELATIVE);
+ pa_memblockq_seek(s->memblockq, (int64_t) chunk->length, PA_SEEK_RELATIVE);
}
- request_bytes(s);
+ handle_seek(s, windex);
- s->underrun = 0;
- return 0;
- }
-
- case SINK_INPUT_MESSAGE_DRAIN: {
-
- pa_memblockq_prebuf_disable(s->memblockq);
-
- if (!pa_memblockq_is_readable(s->memblockq))
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_DRAIN_ACK, userdata, 0, NULL, NULL);
- else {
- s->drain_tag = PA_PTR_TO_UINT(userdata);
- s->drain_request = 1;
- }
- request_bytes(s);
+/* pa_log("sink input post2: %lu", (unsigned long) pa_memblockq_get_length(s->memblockq)); */
return 0;
}
+ case SINK_INPUT_MESSAGE_DRAIN:
case SINK_INPUT_MESSAGE_FLUSH:
case SINK_INPUT_MESSAGE_PREBUF_FORCE:
case SINK_INPUT_MESSAGE_TRIGGER: {
+ int64_t windex;
pa_sink_input *isync;
void (*func)(pa_memblockq *bq);
switch (code) {
case SINK_INPUT_MESSAGE_FLUSH:
- func = pa_memblockq_flush;
+ func = pa_memblockq_flush_write;
break;
case SINK_INPUT_MESSAGE_PREBUF_FORCE:
func = pa_memblockq_prebuf_force;
break;
+ case SINK_INPUT_MESSAGE_DRAIN:
case SINK_INPUT_MESSAGE_TRIGGER:
func = pa_memblockq_prebuf_disable;
break;
@@ -952,23 +1328,32 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
pa_assert_not_reached();
}
+ windex = pa_memblockq_get_write_index(s->memblockq);
func(s->memblockq);
- s->underrun = 0;
- request_bytes(s);
+ handle_seek(s, windex);
/* Do the same for all other members in the sync group */
for (isync = i->sync_prev; isync; isync = isync->sync_prev) {
playback_stream *ssync = PLAYBACK_STREAM(isync->userdata);
+ windex = pa_memblockq_get_write_index(ssync->memblockq);
func(ssync->memblockq);
- ssync->underrun = 0;
- request_bytes(ssync);
+ handle_seek(ssync, windex);
}
for (isync = i->sync_next; isync; isync = isync->sync_next) {
playback_stream *ssync = PLAYBACK_STREAM(isync->userdata);
+ windex = pa_memblockq_get_write_index(ssync->memblockq);
func(ssync->memblockq);
- ssync->underrun = 0;
- request_bytes(ssync);
+ handle_seek(ssync, windex);
+ }
+
+ if (code == SINK_INPUT_MESSAGE_DRAIN) {
+ if (!pa_memblockq_is_readable(s->memblockq))
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_DRAIN_ACK, userdata, 0, NULL, NULL);
+ else {
+ s->drain_tag = PA_PTR_TO_UINT(userdata);
+ s->drain_request = TRUE;
+ }
}
return 0;
@@ -978,14 +1363,21 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
s->read_index = pa_memblockq_get_read_index(s->memblockq);
s->write_index = pa_memblockq_get_write_index(s->memblockq);
- s->resampled_chunk_length = s->sink_input->thread_info.resampled_chunk.memblock ? s->sink_input->thread_info.resampled_chunk.length : 0;
+ s->render_memblockq_length = pa_memblockq_get_length(s->sink_input->thread_info.render_memblockq);
return 0;
- case PA_SINK_INPUT_MESSAGE_SET_STATE:
+ case PA_SINK_INPUT_MESSAGE_SET_STATE: {
+ int64_t windex;
+
+ windex = pa_memblockq_get_write_index(s->memblockq);
pa_memblockq_prebuf_force(s->memblockq);
- request_bytes(s);
+
+ handle_seek(s, windex);
+
+ /* Fall through to the default handler */
break;
+ }
case PA_SINK_INPUT_MESSAGE_GET_LATENCY: {
pa_usec_t *r = userdata;
@@ -1002,7 +1394,7 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
}
/* Called from thread context */
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) {
playback_stream *s;
pa_sink_input_assert_ref(i);
@@ -1010,42 +1402,76 @@ static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chun
playback_stream_assert_ref(s);
pa_assert(chunk);
- if (pa_memblockq_get_length(s->memblockq) <= 0 && !s->underrun) {
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_UNDERFLOW, NULL, 0, NULL, NULL);
- s->underrun = 1;
+/* pa_log("%s, pop(): %lu", pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME), (unsigned long) pa_memblockq_get_length(s->memblockq)); */
+
+ if (pa_memblockq_is_readable(s->memblockq))
+ s->is_underrun = FALSE;
+ else {
+/* pa_log("%s, UNDERRUN: %lu", pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME), (unsigned long) pa_memblockq_get_length(s->memblockq)); */
+
+ if (s->drain_request && pa_sink_input_safe_to_remove(i)) {
+ s->drain_request = FALSE;
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_DRAIN_ACK, PA_UINT_TO_PTR(s->drain_tag), 0, NULL, NULL);
+ } else if (!s->is_underrun)
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_UNDERFLOW, NULL, 0, NULL, NULL);
+
+ s->is_underrun = TRUE;
+
+ playback_stream_request_bytes(s);
}
- if (pa_memblockq_peek(s->memblockq, chunk) < 0) {
-/* pa_log("peek: failure"); */
+ /* This call will not fail with prebuf=0, hence we check for
+ underrun explicitly above */
+ if (pa_memblockq_peek(s->memblockq, chunk) < 0)
return -1;
- }
-/* pa_log("peek: %u", chunk->length); */
+ chunk->length = PA_MIN(nbytes, chunk->length);
+
+ if (i->thread_info.underrun_for > 0)
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_STARTED, NULL, 0, NULL, NULL);
- request_bytes(s);
+ pa_memblockq_drop(s->memblockq, chunk->length);
+ playback_stream_request_bytes(s);
return 0;
}
-/* Called from thread context */
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
playback_stream *s;
pa_sink_input_assert_ref(i);
s = PLAYBACK_STREAM(i->userdata);
playback_stream_assert_ref(s);
- pa_assert(length > 0);
- pa_memblockq_drop(s->memblockq, length);
+ /* If we are in an underrun, then we don't rewind */
+ if (i->thread_info.underrun_for > 0)
+ return;
- if (s->drain_request && !pa_memblockq_is_readable(s->memblockq)) {
- s->drain_request = 0;
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_DRAIN_ACK, PA_UINT_TO_PTR(s->drain_tag), 0, NULL, NULL);
- }
+ pa_memblockq_rewind(s->memblockq, nbytes);
+}
+
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ playback_stream *s;
- request_bytes(s);
+ pa_sink_input_assert_ref(i);
+ s = PLAYBACK_STREAM(i->userdata);
+ playback_stream_assert_ref(s);
-/* pa_log("after_drop: %u %u", pa_memblockq_get_length(s->memblockq), pa_memblockq_is_readable(s->memblockq)); */
+ pa_memblockq_set_maxrewind(s->memblockq, nbytes);
+}
+
+static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
+ playback_stream *s;
+ size_t tlength;
+
+ pa_sink_input_assert_ref(i);
+ s = PLAYBACK_STREAM(i->userdata);
+ playback_stream_assert_ref(s);
+
+ tlength = nbytes+2*pa_memblockq_get_minreq(s->memblockq);
+
+ if (pa_memblockq_get_tlength(s->memblockq) < tlength)
+ pa_memblockq_set_tlength(s->memblockq, tlength);
}
/* Called from main context */
@@ -1056,7 +1482,7 @@ static void sink_input_kill_cb(pa_sink_input *i) {
s = PLAYBACK_STREAM(i->userdata);
playback_stream_assert_ref(s);
- send_playback_stream_killed(s);
+ playback_stream_send_killed(s);
playback_stream_unlink(s);
}
@@ -1084,11 +1510,24 @@ static void sink_input_suspend_cb(pa_sink_input *i, pa_bool_t suspend) {
static void sink_input_moved_cb(pa_sink_input *i) {
playback_stream *s;
pa_tagstruct *t;
+ uint32_t maxlength, tlength, prebuf, minreq;
pa_sink_input_assert_ref(i);
s = PLAYBACK_STREAM(i->userdata);
playback_stream_assert_ref(s);
+ maxlength = (uint32_t) pa_memblockq_get_maxlength(s->memblockq);
+ tlength = (uint32_t) pa_memblockq_get_tlength(s->memblockq);
+ prebuf = (uint32_t) pa_memblockq_get_prebuf(s->memblockq);
+ minreq = (uint32_t) pa_memblockq_get_minreq(s->memblockq);
+
+ fix_playback_buffer_attr_pre(s, TRUE, FALSE, &maxlength, &tlength, &prebuf, &minreq);
+ pa_memblockq_set_maxlength(s->memblockq, maxlength);
+ pa_memblockq_set_tlength(s->memblockq, tlength);
+ pa_memblockq_set_prebuf(s->memblockq, prebuf);
+ pa_memblockq_set_minreq(s->memblockq, minreq);
+ fix_playback_buffer_attr_post(s, &maxlength, &tlength, &prebuf, &minreq);
+
if (s->connection->version < 12)
return;
@@ -1099,6 +1538,15 @@ static void sink_input_moved_cb(pa_sink_input *i) {
pa_tagstruct_putu32(t, i->sink->index);
pa_tagstruct_puts(t, i->sink->name);
pa_tagstruct_put_boolean(t, pa_sink_get_state(i->sink) == PA_SINK_SUSPENDED);
+
+ if (s->connection->version >= 13) {
+ pa_tagstruct_putu32(t, maxlength);
+ pa_tagstruct_putu32(t, tlength);
+ pa_tagstruct_putu32(t, prebuf);
+ pa_tagstruct_putu32(t, minreq);
+ pa_tagstruct_put_usec(t, s->sink_latency);
+ }
+
pa_pstream_send_tagstruct(s->connection->pstream, t);
}
@@ -1123,7 +1571,7 @@ static void source_output_kill_cb(pa_source_output *o) {
s = RECORD_STREAM(o->userdata);
record_stream_assert_ref(s);
- send_record_stream_killed(s);
+ record_stream_send_killed(s);
record_stream_unlink(s);
}
@@ -1163,11 +1611,19 @@ static void source_output_suspend_cb(pa_source_output *o, pa_bool_t suspend) {
static void source_output_moved_cb(pa_source_output *o) {
record_stream *s;
pa_tagstruct *t;
+ uint32_t maxlength, fragsize;
pa_source_output_assert_ref(o);
s = RECORD_STREAM(o->userdata);
record_stream_assert_ref(s);
+ fragsize = (uint32_t) s->fragment_size;
+ maxlength = (uint32_t) pa_memblockq_get_length(s->memblockq);
+
+ fix_record_buffer_attr_pre(s, TRUE, FALSE, &maxlength, &fragsize);
+ pa_memblockq_set_maxlength(s->memblockq, maxlength);
+ fix_record_buffer_attr_post(s, &maxlength, &fragsize);
+
if (s->connection->version < 12)
return;
@@ -1178,14 +1634,21 @@ static void source_output_moved_cb(pa_source_output *o) {
pa_tagstruct_putu32(t, o->source->index);
pa_tagstruct_puts(t, o->source->name);
pa_tagstruct_put_boolean(t, pa_source_get_state(o->source) == PA_SOURCE_SUSPENDED);
+
+ if (s->connection->version >= 13) {
+ pa_tagstruct_putu32(t, maxlength);
+ pa_tagstruct_putu32(t, fragsize);
+ pa_tagstruct_put_usec(t, s->source_latency);
+ }
+
pa_pstream_send_tagstruct(s->connection->pstream, t);
}
/*** pdispatch callbacks ***/
-static void protocol_error(connection *c) {
+static void protocol_error(pa_native_connection *c) {
pa_log("protocol error, kicking client");
- connection_unlink(c);
+ native_connection_unlink(c);
}
#define CHECK_VALIDITY(pstream, expression, tag, error) do { \
@@ -1204,42 +1667,70 @@ static pa_tagstruct *reply_new(uint32_t tag) {
return reply;
}
-static void command_create_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_create_playback_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
playback_stream *s;
uint32_t maxlength, tlength, prebuf, minreq, sink_index, syncid, missing;
- const char *name, *sink_name;
+ const char *name = NULL, *sink_name;
pa_sample_spec ss;
pa_channel_map map;
pa_tagstruct *reply;
pa_sink *sink = NULL;
pa_cvolume volume;
- int corked;
- int no_remap = 0, no_remix = 0, fix_format = 0, fix_rate = 0, fix_channels = 0, no_move = 0, variable_rate = 0;
+ pa_bool_t
+ corked = FALSE,
+ no_remap = FALSE,
+ no_remix = FALSE,
+ fix_format = FALSE,
+ fix_rate = FALSE,
+ fix_channels = FALSE,
+ no_move = FALSE,
+ variable_rate = FALSE,
+ muted = FALSE,
+ adjust_latency = FALSE,
+ early_requests = FALSE;
+
pa_sink_input_flags_t flags = 0;
+ pa_proplist *p;
+ pa_bool_t volume_set = TRUE;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
- if (pa_tagstruct_get(
- t,
- PA_TAG_STRING, &name,
- PA_TAG_SAMPLE_SPEC, &ss,
- PA_TAG_CHANNEL_MAP, &map,
- PA_TAG_U32, &sink_index,
- PA_TAG_STRING, &sink_name,
- PA_TAG_U32, &maxlength,
- PA_TAG_BOOLEAN, &corked,
- PA_TAG_U32, &tlength,
- PA_TAG_U32, &prebuf,
- PA_TAG_U32, &minreq,
- PA_TAG_U32, &syncid,
- PA_TAG_CVOLUME, &volume,
- PA_TAG_INVALID) < 0 || !name) {
+ if ((c->version < 13 && (pa_tagstruct_gets(t, &name) < 0 || !name)) ||
+ pa_tagstruct_get(
+ t,
+ PA_TAG_SAMPLE_SPEC, &ss,
+ PA_TAG_CHANNEL_MAP, &map,
+ PA_TAG_U32, &sink_index,
+ PA_TAG_STRING, &sink_name,
+ PA_TAG_U32, &maxlength,
+ PA_TAG_BOOLEAN, &corked,
+ PA_TAG_U32, &tlength,
+ PA_TAG_U32, &prebuf,
+ PA_TAG_U32, &minreq,
+ PA_TAG_U32, &syncid,
+ PA_TAG_CVOLUME, &volume,
+ PA_TAG_INVALID) < 0) {
+
protocol_error(c);
return;
}
+ CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
+ CHECK_VALIDITY(c->pstream, !sink_name || pa_namereg_is_valid_name(sink_name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, sink_index == PA_INVALID_INDEX || !sink_name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !sink_name || sink_index == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, pa_channel_map_valid(&map), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, pa_sample_spec_valid(&ss), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, pa_cvolume_valid(&volume), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, map.channels == ss.channels && volume.channels == ss.channels, tag, PA_ERR_INVALID);
+
+ p = pa_proplist_new();
+
+ if (name)
+ pa_proplist_sets(p, PA_PROP_MEDIA_NAME, name);
+
if (c->version >= 12) {
/* Since 0.9.8 the user can ask for a couple of additional flags */
@@ -1250,32 +1741,55 @@ static void command_create_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GC
pa_tagstruct_get_boolean(t, &fix_channels) < 0 ||
pa_tagstruct_get_boolean(t, &no_move) < 0 ||
pa_tagstruct_get_boolean(t, &variable_rate) < 0) {
+
protocol_error(c);
+ pa_proplist_free(p);
+ return;
+ }
+ }
+
+ if (c->version >= 13) {
+
+ if (pa_tagstruct_get_boolean(t, &muted) < 0 ||
+ pa_tagstruct_get_boolean(t, &adjust_latency) < 0 ||
+ pa_tagstruct_get_proplist(t, p) < 0) {
+ protocol_error(c);
+ pa_proplist_free(p);
+ return;
+ }
+ }
+
+ if (c->version >= 14) {
+
+ if (pa_tagstruct_get_boolean(t, &volume_set) < 0 ||
+ pa_tagstruct_get_boolean(t, &early_requests) < 0) {
+ protocol_error(c);
+ pa_proplist_free(p);
return;
}
}
if (!pa_tagstruct_eof(t)) {
protocol_error(c);
+ pa_proplist_free(p);
return;
}
- CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, name && pa_utf8_valid(name), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, sink_index != PA_INVALID_INDEX || !sink_name || (*sink_name && pa_utf8_valid(name)), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, pa_channel_map_valid(&map), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, pa_sample_spec_valid(&ss), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, pa_cvolume_valid(&volume), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, map.channels == ss.channels && volume.channels == ss.channels, tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, maxlength > 0, tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, maxlength <= MAX_MEMBLOCKQ_LENGTH, tag, PA_ERR_INVALID);
-
if (sink_index != PA_INVALID_INDEX) {
- sink = pa_idxset_get_by_index(c->protocol->core->sinks, sink_index);
- CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY);
+
+ if (!(sink = pa_idxset_get_by_index(c->protocol->core->sinks, sink_index))) {
+ pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
+ pa_proplist_free(p);
+ return;
+ }
+
} else if (sink_name) {
- sink = pa_namereg_get(c->protocol->core, sink_name, PA_NAMEREG_SINK, 1);
- CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY);
+
+ if (!(sink = pa_namereg_get(c->protocol->core, sink_name, PA_NAMEREG_SINK, 1))) {
+ pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
+ pa_proplist_free(p);
+ return;
+ }
}
flags =
@@ -1288,7 +1802,9 @@ static void command_create_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GC
(no_move ? PA_SINK_INPUT_DONT_MOVE : 0) |
(variable_rate ? PA_SINK_INPUT_VARIABLE_RATE : 0);
- s = playback_stream_new(c, sink, &ss, &map, name, &maxlength, &tlength, &prebuf, &minreq, &volume, syncid, &missing, flags);
+ s = playback_stream_new(c, sink, &ss, &map, &maxlength, &tlength, &prebuf, &minreq, volume_set ? &volume : NULL, muted, syncid, &missing, flags, p, adjust_latency, early_requests);
+ pa_proplist_free(p);
+
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_INVALID);
reply = reply_new(tag);
@@ -1322,14 +1838,17 @@ static void command_create_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GC
pa_tagstruct_put_boolean(reply, pa_sink_get_state(s->sink_input->sink) == PA_SINK_SUSPENDED);
}
+ if (c->version >= 13)
+ pa_tagstruct_put_usec(reply, s->sink_latency);
+
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_delete_stream(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_delete_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t channel;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &channel) < 0 ||
@@ -1383,24 +1902,37 @@ static void command_delete_stream(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t comma
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_create_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_create_record_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
record_stream *s;
uint32_t maxlength, fragment_size;
uint32_t source_index;
- const char *name, *source_name;
+ const char *name = NULL, *source_name;
pa_sample_spec ss;
pa_channel_map map;
pa_tagstruct *reply;
pa_source *source = NULL;
- int corked;
- int no_remap = 0, no_remix = 0, fix_format = 0, fix_rate = 0, fix_channels = 0, no_move = 0, variable_rate = 0;
+ pa_bool_t
+ corked = FALSE,
+ no_remap = FALSE,
+ no_remix = FALSE,
+ fix_format = FALSE,
+ fix_rate = FALSE,
+ fix_channels = FALSE,
+ no_move = FALSE,
+ variable_rate = FALSE,
+ adjust_latency = FALSE,
+ peak_detect = FALSE,
+ early_requests = FALSE;
pa_source_output_flags_t flags = 0;
+ pa_proplist *p;
+ uint32_t direct_on_input_idx = PA_INVALID_INDEX;
+ pa_sink_input *direct_on_input = NULL;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
- if (pa_tagstruct_gets(t, &name) < 0 ||
+ if ((c->version < 13 && (pa_tagstruct_gets(t, &name) < 0 || !name)) ||
pa_tagstruct_get_sample_spec(t, &ss) < 0 ||
pa_tagstruct_get_channel_map(t, &map) < 0 ||
pa_tagstruct_getu32(t, &source_index) < 0 ||
@@ -1412,6 +1944,19 @@ static void command_create_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
return;
}
+ CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
+ CHECK_VALIDITY(c->pstream, !source_name || pa_namereg_is_valid_name(source_name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, source_index == PA_INVALID_INDEX || !source_name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !source_name || source_index == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, pa_sample_spec_valid(&ss), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, pa_channel_map_valid(&map), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, map.channels == ss.channels, tag, PA_ERR_INVALID);
+
+ p = pa_proplist_new();
+
+ if (name)
+ pa_proplist_sets(p, PA_PROP_MEDIA_NAME, name);
+
if (c->version >= 12) {
/* Since 0.9.8 the user can ask for a couple of additional flags */
@@ -1422,16 +1967,66 @@ static void command_create_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
pa_tagstruct_get_boolean(t, &fix_channels) < 0 ||
pa_tagstruct_get_boolean(t, &no_move) < 0 ||
pa_tagstruct_get_boolean(t, &variable_rate) < 0) {
+
+ protocol_error(c);
+ pa_proplist_free(p);
+ return;
+ }
+ }
+
+ if (c->version >= 13) {
+
+ if (pa_tagstruct_get_boolean(t, &peak_detect) < 0 ||
+ pa_tagstruct_get_boolean(t, &adjust_latency) < 0 ||
+ pa_tagstruct_get_proplist(t, p) < 0 ||
+ pa_tagstruct_getu32(t, &direct_on_input_idx) < 0) {
protocol_error(c);
+ pa_proplist_free(p);
+ return;
+ }
+ }
+
+ if (c->version >= 14) {
+
+ if (pa_tagstruct_get_boolean(t, &early_requests) < 0) {
+ protocol_error(c);
+ pa_proplist_free(p);
return;
}
}
if (!pa_tagstruct_eof(t)) {
protocol_error(c);
+ pa_proplist_free(p);
return;
}
+ if (source_index != PA_INVALID_INDEX) {
+
+ if (!(source = pa_idxset_get_by_index(c->protocol->core->sources, source_index))) {
+ pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
+ pa_proplist_free(p);
+ return;
+ }
+
+ } else if (source_name) {
+
+ if (!(source = pa_namereg_get(c->protocol->core, source_name, PA_NAMEREG_SOURCE, 1))) {
+ pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
+ pa_proplist_free(p);
+ return;
+ }
+ }
+
+ if (direct_on_input_idx != PA_INVALID_INDEX) {
+
+ if (!(direct_on_input = pa_idxset_get_by_index(c->protocol->core->sink_inputs, direct_on_input_idx))) {
+ pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
+ pa_proplist_free(p);
+ return;
+ }
+ }
+
flags =
(corked ? PA_SOURCE_OUTPUT_START_CORKED : 0) |
(no_remap ? PA_SOURCE_OUTPUT_NO_REMAP : 0) |
@@ -1442,24 +2037,9 @@ static void command_create_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
(no_move ? PA_SOURCE_OUTPUT_DONT_MOVE : 0) |
(variable_rate ? PA_SOURCE_OUTPUT_VARIABLE_RATE : 0);
- CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, name && pa_utf8_valid(name), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, pa_sample_spec_valid(&ss), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, pa_channel_map_valid(&map), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, source_index != PA_INVALID_INDEX || !source_name || (*source_name && pa_utf8_valid(source_name)), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, map.channels == ss.channels, tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, maxlength > 0, tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, maxlength <= MAX_MEMBLOCKQ_LENGTH, tag, PA_ERR_INVALID);
-
- if (source_index != PA_INVALID_INDEX) {
- source = pa_idxset_get_by_index(c->protocol->core->sources, source_index);
- CHECK_VALIDITY(c->pstream, source, tag, PA_ERR_NOENTITY);
- } else if (source_name) {
- source = pa_namereg_get(c->protocol->core, source_name, PA_NAMEREG_SOURCE, 1);
- CHECK_VALIDITY(c->pstream, source, tag, PA_ERR_NOENTITY);
- }
+ s = record_stream_new(c, source, &ss, &map, peak_detect, &maxlength, &fragment_size, flags, p, adjust_latency, direct_on_input, early_requests);
+ pa_proplist_free(p);
- s = record_stream_new(c, source, &ss, &map, name, &maxlength, fragment_size, flags);
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_INVALID);
reply = reply_new(tag);
@@ -1471,7 +2051,7 @@ static void command_create_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
/* Since 0.9 we support sending the buffer metrics back to the client */
pa_tagstruct_putu32(reply, (uint32_t) maxlength);
- pa_tagstruct_putu32(reply, (uint32_t) s->fragment_size);
+ pa_tagstruct_putu32(reply, (uint32_t) fragment_size);
}
if (c->version >= 12) {
@@ -1488,13 +2068,17 @@ static void command_create_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
pa_tagstruct_put_boolean(reply, pa_source_get_state(s->source_output->source) == PA_SOURCE_SUSPENDED);
}
+ if (c->version >= 13)
+ pa_tagstruct_put_usec(reply, s->source_latency);
+
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_exit(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_exit(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
+ int ret;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (!pa_tagstruct_eof(t)) {
@@ -1503,17 +2087,19 @@ static void command_exit(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t
}
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
+ ret = pa_core_exit(c->protocol->core, FALSE, 0);
+ CHECK_VALIDITY(c->pstream, ret >= 0, tag, PA_ERR_ACCESS);
- c->protocol->core->mainloop->quit(c->protocol->core->mainloop, 0);
pa_pstream_send_simple_ack(c->pstream, tag); /* nonsense */
}
-static void command_auth(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_auth(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
const void*cookie;
pa_tagstruct *reply;
+ pa_bool_t shm_on_remote = FALSE, do_shm;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &c->version) < 0 ||
@@ -1529,50 +2115,58 @@ static void command_auth(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t
return;
}
+ /* Starting with protocol version 13 the MSB of the version tag
+ reflects if shm is available for this pa_native_connection or
+ not. */
+ if (c->version >= 13) {
+ shm_on_remote = !!(c->version & 0x80000000U);
+ c->version &= 0x7FFFFFFFU;
+ }
+
+ pa_log_debug("Protocol version: remote %u, local %u", c->version, PA_PROTOCOL_VERSION);
+
+ pa_proplist_setf(c->client->proplist, "native-protocol.version", "%u", c->version);
+
if (!c->authorized) {
- int success = 0;
+ pa_bool_t success = FALSE;
#ifdef HAVE_CREDS
const pa_creds *creds;
if ((creds = pa_pdispatch_creds(pd))) {
if (creds->uid == getuid())
- success = 1;
- else if (c->protocol->auth_group) {
+ success = TRUE;
+ else if (c->options->auth_group) {
int r;
gid_t gid;
- if ((gid = pa_get_gid_of_group(c->protocol->auth_group)) == (gid_t) -1)
- pa_log_warn("failed to get GID of group '%s'", c->protocol->auth_group);
+ if ((gid = pa_get_gid_of_group(c->options->auth_group)) == (gid_t) -1)
+ pa_log_warn("Failed to get GID of group '%s'", c->options->auth_group);
else if (gid == creds->gid)
- success = 1;
+ success = TRUE;
if (!success) {
- if ((r = pa_uid_in_group(creds->uid, c->protocol->auth_group)) < 0)
- pa_log_warn("failed to check group membership.");
+ if ((r = pa_uid_in_group(creds->uid, c->options->auth_group)) < 0)
+ pa_log_warn("Failed to check group membership.");
else if (r > 0)
- success = 1;
+ success = TRUE;
}
}
pa_log_info("Got credentials: uid=%lu gid=%lu success=%i",
(unsigned long) creds->uid,
(unsigned long) creds->gid,
- success);
-
- if (c->version >= 10 &&
- pa_mempool_is_shared(c->protocol->core->mempool) &&
- creds->uid == getuid()) {
-
- pa_pstream_use_shm(c->pstream, 1);
- pa_log_info("Enabled SHM for new connection");
- }
-
+ (int) success);
}
#endif
- if (!success && memcmp(c->protocol->auth_cookie, cookie, PA_NATIVE_COOKIE_LENGTH) == 0)
- success = 1;
+ if (!success && c->options->auth_cookie) {
+ const uint8_t *ac;
+
+ if ((ac = pa_auth_cookie_read(c->options->auth_cookie, PA_NATIVE_COOKIE_LENGTH)))
+ if (memcmp(ac, cookie, PA_NATIVE_COOKIE_LENGTH) == 0)
+ success = TRUE;
+ }
if (!success) {
pa_log_warn("Denied access to client with invalid authorization data.");
@@ -1580,15 +2174,41 @@ static void command_auth(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t
return;
}
- c->authorized = 1;
+ c->authorized = TRUE;
if (c->auth_timeout_event) {
c->protocol->core->mainloop->time_free(c->auth_timeout_event);
c->auth_timeout_event = NULL;
}
}
+ /* Enable shared memory support if possible */
+ do_shm =
+ pa_mempool_is_shared(c->protocol->core->mempool) &&
+ c->is_local;
+
+ pa_log_debug("SHM possible: %s", pa_yes_no(do_shm));
+
+ if (do_shm)
+ if (c->version < 10 || (c->version >= 13 && !shm_on_remote))
+ do_shm = FALSE;
+
+#ifdef HAVE_CREDS
+ if (do_shm) {
+ /* Only enable SHM if both sides are owned by the same
+ * user. This is a security measure because otherwise data
+ * private to the user might leak. */
+
+ const pa_creds *creds;
+ if (!(creds = pa_pdispatch_creds(pd)) || getuid() != creds->uid)
+ do_shm = FALSE;
+ }
+#endif
+
+ pa_log_debug("Negotiated SHM: %s", pa_yes_no(do_shm));
+ pa_pstream_enable_shm(c->pstream, do_shm);
+
reply = reply_new(tag);
- pa_tagstruct_putu32(reply, PA_PROTOCOL_VERSION);
+ pa_tagstruct_putu32(reply, PA_PROTOCOL_VERSION | (do_shm ? 0x80000000 : 0));
#ifdef HAVE_CREDS
{
@@ -1606,31 +2226,52 @@ static void command_auth(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t
#endif
}
-static void command_set_client_name(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
- const char *name;
+static void command_set_client_name(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
+ const char *name = NULL;
+ pa_proplist *p;
+ pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
- if (pa_tagstruct_gets(t, &name) < 0 ||
+ p = pa_proplist_new();
+
+ if ((c->version < 13 && pa_tagstruct_gets(t, &name) < 0) ||
+ (c->version >= 13 && pa_tagstruct_get_proplist(t, p) < 0) ||
!pa_tagstruct_eof(t)) {
+
protocol_error(c);
+ pa_proplist_free(p);
return;
}
- CHECK_VALIDITY(c->pstream, name && pa_utf8_valid(name), tag, PA_ERR_INVALID);
+ if (name)
+ if (pa_proplist_sets(p, PA_PROP_APPLICATION_NAME, name) < 0) {
+ pa_pstream_send_error(c->pstream, tag, PA_ERR_INVALID);
+ pa_proplist_free(p);
+ return;
+ }
- pa_client_set_name(c->client, name);
- pa_pstream_send_simple_ack(c->pstream, tag);
+ pa_proplist_update(c->client->proplist, PA_UPDATE_REPLACE, p);
+ pa_proplist_free(p);
+
+ pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_CHANGE, c->client->index);
+
+ reply = reply_new(tag);
+
+ if (c->version >= 13)
+ pa_tagstruct_putu32(reply, c->client->index);
+
+ pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_lookup(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_lookup(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
const char *name;
uint32_t idx = PA_IDXSET_INVALID;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_gets(t, &name) < 0 ||
@@ -1640,7 +2281,7 @@ static void command_lookup(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uin
}
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, name && *name && pa_utf8_valid(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, name && pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
if (command == PA_COMMAND_LOOKUP_SINK) {
pa_sink *sink;
@@ -1663,12 +2304,12 @@ static void command_lookup(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uin
}
}
-static void command_drain_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_drain_playback_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
playback_stream *s;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -1685,12 +2326,12 @@ static void command_drain_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC
pa_asyncmsgq_post(s->sink_input->sink->asyncmsgq, PA_MSGOBJECT(s->sink_input), SINK_INPUT_MESSAGE_DRAIN, PA_UINT_TO_PTR(tag), 0, NULL, NULL);
}
-static void command_stat(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_stat(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_tagstruct *reply;
const pa_mempool_stat *stat;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (!pa_tagstruct_eof(t)) {
@@ -1707,19 +2348,19 @@ static void command_stat(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t
pa_tagstruct_putu32(reply, (uint32_t) pa_atomic_load(&stat->allocated_size));
pa_tagstruct_putu32(reply, (uint32_t) pa_atomic_load(&stat->n_accumulated));
pa_tagstruct_putu32(reply, (uint32_t) pa_atomic_load(&stat->accumulated_size));
- pa_tagstruct_putu32(reply, pa_scache_total_size(c->protocol->core));
+ pa_tagstruct_putu32(reply, (uint32_t) pa_scache_total_size(c->protocol->core));
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_get_playback_latency(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_get_playback_latency(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_tagstruct *reply;
playback_stream *s;
struct timeval tv, now;
uint32_t idx;
pa_usec_t latency;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -1738,27 +2379,33 @@ static void command_get_playback_latency(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
reply = reply_new(tag);
latency = pa_sink_get_latency(s->sink_input->sink);
- latency += pa_bytes_to_usec(s->resampled_chunk_length, &s->sink_input->sample_spec);
+ latency += pa_bytes_to_usec(s->render_memblockq_length, &s->sink_input->sample_spec);
pa_tagstruct_put_usec(reply, latency);
pa_tagstruct_put_usec(reply, 0);
- pa_tagstruct_put_boolean(reply, pa_sink_input_get_state(s->sink_input) == PA_SINK_INPUT_RUNNING);
+ pa_tagstruct_put_boolean(reply, s->sink_input->thread_info.playing_for > 0);
pa_tagstruct_put_timeval(reply, &tv);
pa_tagstruct_put_timeval(reply, pa_gettimeofday(&now));
pa_tagstruct_puts64(reply, s->write_index);
pa_tagstruct_puts64(reply, s->read_index);
+
+ if (c->version >= 13) {
+ pa_tagstruct_putu64(reply, s->sink_input->thread_info.underrun_for);
+ pa_tagstruct_putu64(reply, s->sink_input->thread_info.playing_for);
+ }
+
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_get_record_latency(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_get_record_latency(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_tagstruct *reply;
record_stream *s;
struct timeval tv, now;
uint32_t idx;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -1775,7 +2422,7 @@ static void command_get_record_latency(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UN
reply = reply_new(tag);
pa_tagstruct_put_usec(reply, s->source_output->source->monitor_of ? pa_sink_get_latency(s->source_output->source->monitor_of) : 0);
pa_tagstruct_put_usec(reply, pa_source_get_latency(s->source_output->source));
- pa_tagstruct_put_boolean(reply, 0);
+ pa_tagstruct_put_boolean(reply, pa_source_get_state(s->source_output->source) == PA_SOURCE_RUNNING);
pa_tagstruct_put_timeval(reply, &tv);
pa_tagstruct_put_timeval(reply, pa_gettimeofday(&now));
pa_tagstruct_puts64(reply, pa_memblockq_get_write_index(s->memblockq));
@@ -1783,23 +2430,23 @@ static void command_get_record_latency(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UN
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_create_upload_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_create_upload_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
upload_stream *s;
uint32_t length;
- const char *name;
+ const char *name = NULL;
pa_sample_spec ss;
pa_channel_map map;
pa_tagstruct *reply;
+ pa_proplist *p;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_gets(t, &name) < 0 ||
pa_tagstruct_get_sample_spec(t, &ss) < 0 ||
pa_tagstruct_get_channel_map(t, &map) < 0 ||
- pa_tagstruct_getu32(t, &length) < 0 ||
- !pa_tagstruct_eof(t)) {
+ pa_tagstruct_getu32(t, &length) < 0) {
protocol_error(c);
return;
}
@@ -1810,9 +2457,26 @@ static void command_create_upload_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
CHECK_VALIDITY(c->pstream, map.channels == ss.channels, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, (length % pa_frame_size(&ss)) == 0 && length > 0, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, length <= PA_SCACHE_ENTRY_SIZE_MAX, tag, PA_ERR_TOOLARGE);
- CHECK_VALIDITY(c->pstream, name && *name && pa_utf8_valid(name), tag, PA_ERR_INVALID);
- s = upload_stream_new(c, &ss, &map, name, length);
+ p = pa_proplist_new();
+
+ if (c->version >= 13 && pa_tagstruct_get_proplist(t, p) < 0) {
+ protocol_error(c);
+ pa_proplist_free(p);
+ return;
+ }
+
+ if (c->version < 13)
+ pa_proplist_sets(p, PA_PROP_MEDIA_NAME, name);
+ else if (!name)
+ if (!(name = pa_proplist_gets(p, PA_PROP_EVENT_ID)))
+ name = pa_proplist_gets(p, PA_PROP_MEDIA_NAME);
+
+ CHECK_VALIDITY(c->pstream, name && pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
+
+ s = upload_stream_new(c, &ss, &map, name, length, p);
+ pa_proplist_free(p);
+
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_INVALID);
reply = reply_new(tag);
@@ -1821,13 +2485,13 @@ static void command_create_upload_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_finish_upload_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_finish_upload_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t channel;
upload_stream *s;
uint32_t idx;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &channel) < 0 ||
@@ -1842,7 +2506,7 @@ static void command_finish_upload_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
CHECK_VALIDITY(c->pstream, upload_stream_isinstance(s), tag, PA_ERR_NOENTITY);
- if (pa_scache_add_item(c->protocol->core, s->name, &s->sample_spec, &s->channel_map, &s->memchunk, &idx) < 0)
+ if (pa_scache_add_item(c->protocol->core, s->name, &s->sample_spec, &s->channel_map, &s->memchunk, s->proplist, &idx) < 0)
pa_pstream_send_error(c->pstream, tag, PA_ERR_INTERNAL);
else
pa_pstream_send_simple_ack(c->pstream, tag);
@@ -1850,28 +2514,33 @@ static void command_finish_upload_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
upload_stream_unlink(s);
}
-static void command_play_sample(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_play_sample(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t sink_index;
pa_volume_t volume;
pa_sink *sink;
const char *name, *sink_name;
+ uint32_t idx;
+ pa_proplist *p;
+ pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
+ CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
+
if (pa_tagstruct_getu32(t, &sink_index) < 0 ||
pa_tagstruct_gets(t, &sink_name) < 0 ||
pa_tagstruct_getu32(t, &volume) < 0 ||
- pa_tagstruct_gets(t, &name) < 0 ||
- !pa_tagstruct_eof(t)) {
+ pa_tagstruct_gets(t, &name) < 0) {
protocol_error(c);
return;
}
- CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, sink_index != PA_INVALID_INDEX || !sink_name || (*sink_name && pa_utf8_valid(name)), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, name && *name && pa_utf8_valid(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !sink_name || pa_namereg_is_valid_name(sink_name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, sink_index == PA_INVALID_INDEX || !sink_name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !sink_name || sink_index == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, name && pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
if (sink_index != PA_INVALID_INDEX)
sink = pa_idxset_get_by_index(c->protocol->core->sinks, sink_index);
@@ -1880,19 +2549,38 @@ static void command_play_sample(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED ui
CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY);
- if (pa_scache_play_item(c->protocol->core, name, sink, volume) < 0) {
+ p = pa_proplist_new();
+
+ if ((c->version >= 13 && pa_tagstruct_get_proplist(t, p) < 0) ||
+ !pa_tagstruct_eof(t)) {
+ protocol_error(c);
+ pa_proplist_free(p);
+ return;
+ }
+
+ pa_proplist_update(p, PA_UPDATE_MERGE, c->client->proplist);
+
+ if (pa_scache_play_item(c->protocol->core, name, sink, volume, p, &idx) < 0) {
pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
+ pa_proplist_free(p);
return;
}
- pa_pstream_send_simple_ack(c->pstream, tag);
+ pa_proplist_free(p);
+
+ reply = reply_new(tag);
+
+ if (c->version >= 13)
+ pa_tagstruct_putu32(reply, idx);
+
+ pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_remove_sample(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_remove_sample(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
const char *name;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_gets(t, &name) < 0 ||
@@ -1902,7 +2590,7 @@ static void command_remove_sample(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED
}
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, name && *name && pa_utf8_valid(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, name && pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
if (pa_scache_remove_item(c->protocol->core, name) < 0) {
pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
@@ -1912,7 +2600,7 @@ static void command_remove_sample(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void fixup_sample_spec(connection *c, pa_sample_spec *fixed, const pa_sample_spec *original) {
+static void fixup_sample_spec(pa_native_connection *c, pa_sample_spec *fixed, const pa_sample_spec *original) {
pa_assert(c);
pa_assert(fixed);
pa_assert(original);
@@ -1930,7 +2618,7 @@ static void fixup_sample_spec(connection *c, pa_sample_spec *fixed, const pa_sam
}
}
-static void sink_fill_tagstruct(connection *c, pa_tagstruct *t, pa_sink *sink) {
+static void sink_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_sink *sink) {
pa_sample_spec fixed_ss;
pa_assert(t);
@@ -1942,21 +2630,26 @@ static void sink_fill_tagstruct(connection *c, pa_tagstruct *t, pa_sink *sink) {
t,
PA_TAG_U32, sink->index,
PA_TAG_STRING, sink->name,
- PA_TAG_STRING, sink->description,
+ PA_TAG_STRING, pa_strnull(pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_DESCRIPTION)),
PA_TAG_SAMPLE_SPEC, &fixed_ss,
PA_TAG_CHANNEL_MAP, &sink->channel_map,
PA_TAG_U32, sink->module ? sink->module->index : PA_INVALID_INDEX,
- PA_TAG_CVOLUME, pa_sink_get_volume(sink),
- PA_TAG_BOOLEAN, pa_sink_get_mute(sink),
+ PA_TAG_CVOLUME, pa_sink_get_volume(sink, FALSE),
+ PA_TAG_BOOLEAN, pa_sink_get_mute(sink, FALSE),
PA_TAG_U32, sink->monitor_source ? sink->monitor_source->index : PA_INVALID_INDEX,
PA_TAG_STRING, sink->monitor_source ? sink->monitor_source->name : NULL,
PA_TAG_USEC, pa_sink_get_latency(sink),
PA_TAG_STRING, sink->driver,
PA_TAG_U32, sink->flags,
PA_TAG_INVALID);
+
+ if (c->version >= 13) {
+ pa_tagstruct_put_proplist(t, sink->proplist);
+ pa_tagstruct_put_usec(t, pa_sink_get_requested_latency(sink));
+ }
}
-static void source_fill_tagstruct(connection *c, pa_tagstruct *t, pa_source *source) {
+static void source_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_source *source) {
pa_sample_spec fixed_ss;
pa_assert(t);
@@ -1968,28 +2661,38 @@ static void source_fill_tagstruct(connection *c, pa_tagstruct *t, pa_source *sou
t,
PA_TAG_U32, source->index,
PA_TAG_STRING, source->name,
- PA_TAG_STRING, source->description,
+ PA_TAG_STRING, pa_strnull(pa_proplist_gets(source->proplist, PA_PROP_DEVICE_DESCRIPTION)),
PA_TAG_SAMPLE_SPEC, &fixed_ss,
PA_TAG_CHANNEL_MAP, &source->channel_map,
PA_TAG_U32, source->module ? source->module->index : PA_INVALID_INDEX,
- PA_TAG_CVOLUME, pa_source_get_volume(source),
- PA_TAG_BOOLEAN, pa_source_get_mute(source),
+ PA_TAG_CVOLUME, pa_source_get_volume(source, FALSE),
+ PA_TAG_BOOLEAN, pa_source_get_mute(source, FALSE),
PA_TAG_U32, source->monitor_of ? source->monitor_of->index : PA_INVALID_INDEX,
PA_TAG_STRING, source->monitor_of ? source->monitor_of->name : NULL,
PA_TAG_USEC, pa_source_get_latency(source),
PA_TAG_STRING, source->driver,
PA_TAG_U32, source->flags,
PA_TAG_INVALID);
+
+ if (c->version >= 13) {
+ pa_tagstruct_put_proplist(t, source->proplist);
+ pa_tagstruct_put_usec(t, pa_source_get_requested_latency(source));
+ }
}
-static void client_fill_tagstruct(pa_tagstruct *t, pa_client *client) {
+
+static void client_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_client *client) {
pa_assert(t);
pa_assert(client);
pa_tagstruct_putu32(t, client->index);
- pa_tagstruct_puts(t, client->name);
- pa_tagstruct_putu32(t, client->owner ? client->owner->index : PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, pa_strnull(pa_proplist_gets(client->proplist, PA_PROP_APPLICATION_NAME)));
+ pa_tagstruct_putu32(t, client->module ? client->module->index : PA_INVALID_INDEX);
pa_tagstruct_puts(t, client->driver);
+
+ if (c->version >= 13)
+ pa_tagstruct_put_proplist(t, client->proplist);
+
}
static void module_fill_tagstruct(pa_tagstruct *t, pa_module *module) {
@@ -1999,12 +2702,13 @@ static void module_fill_tagstruct(pa_tagstruct *t, pa_module *module) {
pa_tagstruct_putu32(t, module->index);
pa_tagstruct_puts(t, module->name);
pa_tagstruct_puts(t, module->argument);
- pa_tagstruct_putu32(t, module->n_used);
+ pa_tagstruct_putu32(t, (uint32_t) module->n_used);
pa_tagstruct_put_boolean(t, module->auto_unload);
}
-static void sink_input_fill_tagstruct(connection *c, pa_tagstruct *t, pa_sink_input *s) {
+static void sink_input_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_sink_input *s) {
pa_sample_spec fixed_ss;
+ pa_usec_t sink_latency;
pa_assert(t);
pa_sink_input_assert_ref(s);
@@ -2012,23 +2716,26 @@ static void sink_input_fill_tagstruct(connection *c, pa_tagstruct *t, pa_sink_in
fixup_sample_spec(c, &fixed_ss, &s->sample_spec);
pa_tagstruct_putu32(t, s->index);
- pa_tagstruct_puts(t, s->name);
+ pa_tagstruct_puts(t, pa_strnull(pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME)));
pa_tagstruct_putu32(t, s->module ? s->module->index : PA_INVALID_INDEX);
pa_tagstruct_putu32(t, s->client ? s->client->index : PA_INVALID_INDEX);
pa_tagstruct_putu32(t, s->sink->index);
pa_tagstruct_put_sample_spec(t, &fixed_ss);
pa_tagstruct_put_channel_map(t, &s->channel_map);
pa_tagstruct_put_cvolume(t, &s->volume);
- pa_tagstruct_put_usec(t, pa_sink_input_get_latency(s));
- pa_tagstruct_put_usec(t, pa_sink_get_latency(s->sink));
+ pa_tagstruct_put_usec(t, pa_sink_input_get_latency(s, &sink_latency));
+ pa_tagstruct_put_usec(t, sink_latency);
pa_tagstruct_puts(t, pa_resample_method_to_string(pa_sink_input_get_resample_method(s)));
pa_tagstruct_puts(t, s->driver);
if (c->version >= 11)
pa_tagstruct_put_boolean(t, pa_sink_input_get_mute(s));
+ if (c->version >= 13)
+ pa_tagstruct_put_proplist(t, s->proplist);
}
-static void source_output_fill_tagstruct(connection *c, pa_tagstruct *t, pa_source_output *s) {
+static void source_output_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_source_output *s) {
pa_sample_spec fixed_ss;
+ pa_usec_t source_latency;
pa_assert(t);
pa_source_output_assert_ref(s);
@@ -2036,39 +2743,48 @@ static void source_output_fill_tagstruct(connection *c, pa_tagstruct *t, pa_sour
fixup_sample_spec(c, &fixed_ss, &s->sample_spec);
pa_tagstruct_putu32(t, s->index);
- pa_tagstruct_puts(t, s->name);
+ pa_tagstruct_puts(t, pa_strnull(pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME)));
pa_tagstruct_putu32(t, s->module ? s->module->index : PA_INVALID_INDEX);
pa_tagstruct_putu32(t, s->client ? s->client->index : PA_INVALID_INDEX);
pa_tagstruct_putu32(t, s->source->index);
pa_tagstruct_put_sample_spec(t, &fixed_ss);
pa_tagstruct_put_channel_map(t, &s->channel_map);
- pa_tagstruct_put_usec(t, pa_source_output_get_latency(s));
- pa_tagstruct_put_usec(t, pa_source_get_latency(s->source));
+ pa_tagstruct_put_usec(t, pa_source_output_get_latency(s, &source_latency));
+ pa_tagstruct_put_usec(t, source_latency);
pa_tagstruct_puts(t, pa_resample_method_to_string(pa_source_output_get_resample_method(s)));
pa_tagstruct_puts(t, s->driver);
+
+ if (c->version >= 13)
+ pa_tagstruct_put_proplist(t, s->proplist);
}
-static void scache_fill_tagstruct(connection *c, pa_tagstruct *t, pa_scache_entry *e) {
+static void scache_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_scache_entry *e) {
pa_sample_spec fixed_ss;
pa_assert(t);
pa_assert(e);
- fixup_sample_spec(c, &fixed_ss, &e->sample_spec);
+ if (e->memchunk.memblock)
+ fixup_sample_spec(c, &fixed_ss, &e->sample_spec);
+ else
+ memset(&fixed_ss, 0, sizeof(fixed_ss));
pa_tagstruct_putu32(t, e->index);
pa_tagstruct_puts(t, e->name);
pa_tagstruct_put_cvolume(t, &e->volume);
- pa_tagstruct_put_usec(t, pa_bytes_to_usec(e->memchunk.length, &e->sample_spec));
+ pa_tagstruct_put_usec(t, e->memchunk.memblock ? pa_bytes_to_usec(e->memchunk.length, &e->sample_spec) : 0);
pa_tagstruct_put_sample_spec(t, &fixed_ss);
pa_tagstruct_put_channel_map(t, &e->channel_map);
- pa_tagstruct_putu32(t, e->memchunk.length);
+ pa_tagstruct_putu32(t, (uint32_t) e->memchunk.length);
pa_tagstruct_put_boolean(t, e->lazy);
pa_tagstruct_puts(t, e->filename);
+
+ if (c->version >= 13)
+ pa_tagstruct_put_proplist(t, e->proplist);
}
-static void command_get_info(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_get_info(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
pa_sink *sink = NULL;
pa_source *source = NULL;
@@ -2077,10 +2793,10 @@ static void command_get_info(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, u
pa_sink_input *si = NULL;
pa_source_output *so = NULL;
pa_scache_entry *sce = NULL;
- const char *name;
+ const char *name = NULL;
pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2095,7 +2811,10 @@ static void command_get_info(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, u
}
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || !name || (*name && pa_utf8_valid(name)), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx == PA_INVALID_INDEX || !name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || idx == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
if (command == PA_COMMAND_GET_SINK_INFO) {
if (idx != PA_INVALID_INDEX)
@@ -2134,7 +2853,7 @@ static void command_get_info(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, u
else if (source)
source_fill_tagstruct(c, reply, source);
else if (client)
- client_fill_tagstruct(reply, client);
+ client_fill_tagstruct(c, reply, client);
else if (module)
module_fill_tagstruct(reply, module);
else if (si)
@@ -2146,14 +2865,14 @@ static void command_get_info(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, u
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_get_info_list(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_get_info_list(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_idxset *i;
uint32_t idx;
void *p;
pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (!pa_tagstruct_eof(t)) {
@@ -2189,7 +2908,7 @@ static void command_get_info_list(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t comma
else if (command == PA_COMMAND_GET_SOURCE_INFO_LIST)
source_fill_tagstruct(c, reply, p);
else if (command == PA_COMMAND_GET_CLIENT_INFO_LIST)
- client_fill_tagstruct(reply, p);
+ client_fill_tagstruct(c, reply, p);
else if (command == PA_COMMAND_GET_MODULE_INFO_LIST)
module_fill_tagstruct(reply, p);
else if (command == PA_COMMAND_GET_SINK_INPUT_INFO_LIST)
@@ -2206,14 +2925,14 @@ static void command_get_info_list(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t comma
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_get_server_info(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_get_server_info(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_tagstruct *reply;
char txt[256];
const char *n;
pa_sample_spec fixed_ss;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (!pa_tagstruct_eof(t)) {
@@ -2227,7 +2946,7 @@ static void command_get_server_info(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSE
pa_tagstruct_puts(reply, PACKAGE_NAME);
pa_tagstruct_puts(reply, PACKAGE_VERSION);
pa_tagstruct_puts(reply, pa_get_user_name(txt, sizeof(txt)));
- pa_tagstruct_puts(reply, pa_get_fqdn(txt, sizeof(txt)));
+ pa_tagstruct_puts(reply, pa_get_host_name(txt, sizeof(txt)));
fixup_sample_spec(c, &fixed_ss, &c->protocol->core->default_sample_spec);
pa_tagstruct_put_sample_spec(reply, &fixed_ss);
@@ -2244,9 +2963,9 @@ static void command_get_server_info(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSE
static void subscription_cb(pa_core *core, pa_subscription_event_type_t e, uint32_t idx, void *userdata) {
pa_tagstruct *t;
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
t = pa_tagstruct_new(NULL, 0);
pa_tagstruct_putu32(t, PA_COMMAND_SUBSCRIBE_EVENT);
@@ -2256,11 +2975,11 @@ static void subscription_cb(pa_core *core, pa_subscription_event_type_t e, uint3
pa_pstream_send_tagstruct(c->pstream, t);
}
-static void command_subscribe(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_subscribe(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_subscription_mask_t m;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &m) < 0 ||
@@ -2285,13 +3004,13 @@ static void command_subscribe(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint
}
static void command_set_volume(
- PA_GCC_UNUSED pa_pdispatch *pd,
+ pa_pdispatch *pd,
uint32_t command,
uint32_t tag,
pa_tagstruct *t,
void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
pa_cvolume volume;
pa_sink *sink = NULL;
@@ -2299,7 +3018,7 @@ static void command_set_volume(
pa_sink_input *si = NULL;
const char *name = NULL;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2312,7 +3031,10 @@ static void command_set_volume(
}
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || !name || (*name && pa_utf8_valid(name)), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx == PA_INVALID_INDEX || !name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || idx == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, pa_cvolume_valid(&volume), tag, PA_ERR_INVALID);
switch (command) {
@@ -2352,21 +3074,21 @@ static void command_set_volume(
}
static void command_set_mute(
- PA_GCC_UNUSED pa_pdispatch *pd,
+ pa_pdispatch *pd,
uint32_t command,
uint32_t tag,
pa_tagstruct *t,
void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
- int mute;
+ pa_bool_t mute;
pa_sink *sink = NULL;
pa_source *source = NULL;
pa_sink_input *si = NULL;
const char *name = NULL;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2379,7 +3101,10 @@ static void command_set_mute(
}
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || !name || (*name && pa_utf8_valid(name)), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx == PA_INVALID_INDEX || !name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || idx == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
switch (command) {
@@ -2420,13 +3145,13 @@ static void command_set_mute(
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_cork_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_cork_playback_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
- int b;
+ pa_bool_t b;
playback_stream *s;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2443,15 +3168,19 @@ static void command_cork_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_
CHECK_VALIDITY(c->pstream, playback_stream_isinstance(s), tag, PA_ERR_NOENTITY);
pa_sink_input_cork(s->sink_input, b);
+
+ if (b)
+ s->is_underrun = TRUE;
+
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_trigger_or_flush_or_prebuf_playback_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_trigger_or_flush_or_prebuf_playback_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
playback_stream *s;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2486,13 +3215,13 @@ static void command_trigger_or_flush_or_prebuf_playback_stream(PA_GCC_UNUSED pa_
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_cork_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_cork_record_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
record_stream *s;
- int b;
+ pa_bool_t b;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2511,12 +3240,12 @@ static void command_cork_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UN
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_flush_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_flush_record_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
record_stream *s;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2529,17 +3258,17 @@ static void command_flush_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_U
s = pa_idxset_get_by_index(c->record_streams, idx);
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
- pa_memblockq_flush(s->memblockq);
+ pa_memblockq_flush_read(s->memblockq);
pa_pstream_send_simple_ack(c->pstream, tag);
}
static void command_set_stream_buffer_attr(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
uint32_t maxlength, tlength, prebuf, minreq, fragsize;
pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0) {
@@ -2551,6 +3280,7 @@ static void command_set_stream_buffer_attr(pa_pdispatch *pd, uint32_t command, u
if (command == PA_COMMAND_SET_PLAYBACK_STREAM_BUFFER_ATTR) {
playback_stream *s;
+ pa_bool_t adjust_latency = FALSE, early_requests = FALSE;
s = pa_idxset_get_by_index(c->output_streams, idx);
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
@@ -2563,28 +3293,32 @@ static void command_set_stream_buffer_attr(pa_pdispatch *pd, uint32_t command, u
PA_TAG_U32, &prebuf,
PA_TAG_U32, &minreq,
PA_TAG_INVALID) < 0 ||
+ (c->version >= 13 && pa_tagstruct_get_boolean(t, &adjust_latency) < 0) ||
+ (c->version >= 14 && pa_tagstruct_get_boolean(t, &early_requests) < 0) ||
!pa_tagstruct_eof(t)) {
protocol_error(c);
return;
}
- CHECK_VALIDITY(c->pstream, maxlength > 0, tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, maxlength <= MAX_MEMBLOCKQ_LENGTH, tag, PA_ERR_INVALID);
-
+ fix_playback_buffer_attr_pre(s, adjust_latency, early_requests, &maxlength, &tlength, &prebuf, &minreq);
pa_memblockq_set_maxlength(s->memblockq, maxlength);
pa_memblockq_set_tlength(s->memblockq, tlength);
pa_memblockq_set_prebuf(s->memblockq, prebuf);
pa_memblockq_set_minreq(s->memblockq, minreq);
+ fix_playback_buffer_attr_post(s, &maxlength, &tlength, &prebuf, &minreq);
reply = reply_new(tag);
- pa_tagstruct_putu32(reply, (uint32_t) pa_memblockq_get_maxlength(s->memblockq));
- pa_tagstruct_putu32(reply, (uint32_t) pa_memblockq_get_tlength(s->memblockq));
- pa_tagstruct_putu32(reply, (uint32_t) pa_memblockq_get_prebuf(s->memblockq));
- pa_tagstruct_putu32(reply, (uint32_t) pa_memblockq_get_minreq(s->memblockq));
+ pa_tagstruct_putu32(reply, maxlength);
+ pa_tagstruct_putu32(reply, tlength);
+ pa_tagstruct_putu32(reply, prebuf);
+ pa_tagstruct_putu32(reply, minreq);
+
+ if (c->version >= 13)
+ pa_tagstruct_put_usec(reply, s->sink_latency);
} else {
record_stream *s;
- size_t base;
+ pa_bool_t adjust_latency = FALSE, early_requests = FALSE;
pa_assert(command == PA_COMMAND_SET_RECORD_STREAM_BUFFER_ATTR);
s = pa_idxset_get_by_index(c->record_streams, idx);
@@ -2595,38 +3329,34 @@ static void command_set_stream_buffer_attr(pa_pdispatch *pd, uint32_t command, u
PA_TAG_U32, &maxlength,
PA_TAG_U32, &fragsize,
PA_TAG_INVALID) < 0 ||
+ (c->version >= 13 && pa_tagstruct_get_boolean(t, &adjust_latency) < 0) ||
+ (c->version >= 14 && pa_tagstruct_get_boolean(t, &early_requests) < 0) ||
!pa_tagstruct_eof(t)) {
protocol_error(c);
return;
}
- CHECK_VALIDITY(c->pstream, maxlength > 0, tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, maxlength <= MAX_MEMBLOCKQ_LENGTH, tag, PA_ERR_INVALID);
-
+ fix_record_buffer_attr_pre(s, adjust_latency, early_requests, &maxlength, &fragsize);
pa_memblockq_set_maxlength(s->memblockq, maxlength);
-
- base = pa_frame_size(&s->source_output->sample_spec);
- s->fragment_size = (fragsize/base)*base;
- if (s->fragment_size <= 0)
- s->fragment_size = base;
-
- if (s->fragment_size > pa_memblockq_get_maxlength(s->memblockq))
- s->fragment_size = pa_memblockq_get_maxlength(s->memblockq);
+ fix_record_buffer_attr_post(s, &maxlength, &fragsize);
reply = reply_new(tag);
- pa_tagstruct_putu32(reply, (uint32_t) pa_memblockq_get_maxlength(s->memblockq));
- pa_tagstruct_putu32(reply, s->fragment_size);
+ pa_tagstruct_putu32(reply, maxlength);
+ pa_tagstruct_putu32(reply, fragsize);
+
+ if (c->version >= 13)
+ pa_tagstruct_put_usec(reply, s->source_latency);
}
pa_pstream_send_tagstruct(c->pstream, reply);
}
static void command_update_stream_sample_rate(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
uint32_t rate;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2661,11 +3391,173 @@ static void command_update_stream_sample_rate(pa_pdispatch *pd, uint32_t command
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_set_default_sink_or_source(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_update_proplist(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
+ uint32_t idx;
+ uint32_t mode;
+ pa_proplist *p;
+
+ pa_native_connection_assert_ref(c);
+ pa_assert(t);
+
+ CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
+
+ p = pa_proplist_new();
+
+ if (command == PA_COMMAND_UPDATE_CLIENT_PROPLIST) {
+
+ if (pa_tagstruct_getu32(t, &mode) < 0 ||
+ pa_tagstruct_get_proplist(t, p) < 0 ||
+ !pa_tagstruct_eof(t)) {
+ protocol_error(c);
+ pa_proplist_free(p);
+ return;
+ }
+
+ } else {
+
+ if (pa_tagstruct_getu32(t, &idx) < 0 ||
+ pa_tagstruct_getu32(t, &mode) < 0 ||
+ pa_tagstruct_get_proplist(t, p) < 0 ||
+ !pa_tagstruct_eof(t)) {
+ protocol_error(c);
+ pa_proplist_free(p);
+ return;
+ }
+ }
+
+ CHECK_VALIDITY(c->pstream, mode == PA_UPDATE_SET || mode == PA_UPDATE_MERGE || mode == PA_UPDATE_REPLACE, tag, PA_ERR_INVALID);
+
+ if (command == PA_COMMAND_UPDATE_PLAYBACK_STREAM_PROPLIST) {
+ playback_stream *s;
+
+ s = pa_idxset_get_by_index(c->output_streams, idx);
+ CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
+ CHECK_VALIDITY(c->pstream, playback_stream_isinstance(s), tag, PA_ERR_NOENTITY);
+
+ pa_proplist_update(s->sink_input->proplist, mode, p);
+ pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, s->sink_input->index);
+
+ } else if (command == PA_COMMAND_UPDATE_RECORD_STREAM_PROPLIST) {
+ record_stream *s;
+
+ s = pa_idxset_get_by_index(c->record_streams, idx);
+ CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
+
+ pa_proplist_update(s->source_output->proplist, mode, p);
+ pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, s->source_output->index);
+ } else {
+ pa_assert(command == PA_COMMAND_UPDATE_CLIENT_PROPLIST);
+
+ pa_proplist_update(c->client->proplist, mode, p);
+ pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_CHANGE, c->client->index);
+ }
+
+ pa_pstream_send_simple_ack(c->pstream, tag);
+}
+
+static void command_remove_proplist(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
+ uint32_t idx;
+ unsigned changed = 0;
+ pa_proplist *p;
+ pa_strlist *l = NULL;
+
+ pa_native_connection_assert_ref(c);
+ pa_assert(t);
+
+ CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
+
+ if (command != PA_COMMAND_REMOVE_CLIENT_PROPLIST) {
+
+ if (pa_tagstruct_getu32(t, &idx) < 0) {
+ protocol_error(c);
+ return;
+ }
+ }
+
+ if (command == PA_COMMAND_REMOVE_PLAYBACK_STREAM_PROPLIST) {
+ playback_stream *s;
+
+ s = pa_idxset_get_by_index(c->output_streams, idx);
+ CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
+ CHECK_VALIDITY(c->pstream, playback_stream_isinstance(s), tag, PA_ERR_NOENTITY);
+
+ p = s->sink_input->proplist;
+
+ } else if (command == PA_COMMAND_REMOVE_RECORD_STREAM_PROPLIST) {
+ record_stream *s;
+
+ s = pa_idxset_get_by_index(c->record_streams, idx);
+ CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
+
+ p = s->source_output->proplist;
+ } else {
+ pa_assert(command == PA_COMMAND_REMOVE_CLIENT_PROPLIST);
+
+ p = c->client->proplist;
+ }
+
+ for (;;) {
+ const char *k;
+
+ if (pa_tagstruct_gets(t, &k) < 0) {
+ protocol_error(c);
+ pa_strlist_free(l);
+ return;
+ }
+
+ if (!k)
+ break;
+
+ l = pa_strlist_prepend(l, k);
+ }
+
+ if (!pa_tagstruct_eof(t)) {
+ protocol_error(c);
+ pa_strlist_free(l);
+ return;
+ }
+
+ for (;;) {
+ char *z;
+
+ l = pa_strlist_pop(l, &z);
+
+ if (!z)
+ break;
+
+ changed += (unsigned) (pa_proplist_unset(p, z) >= 0);
+ pa_xfree(z);
+ }
+
+ pa_pstream_send_simple_ack(c->pstream, tag);
+
+ if (changed) {
+ if (command == PA_COMMAND_REMOVE_PLAYBACK_STREAM_PROPLIST) {
+ playback_stream *s;
+
+ s = pa_idxset_get_by_index(c->output_streams, idx);
+ pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, s->sink_input->index);
+
+ } else if (command == PA_COMMAND_REMOVE_RECORD_STREAM_PROPLIST) {
+ record_stream *s;
+
+ s = pa_idxset_get_by_index(c->record_streams, idx);
+ pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, s->source_output->index);
+
+ } else {
+ pa_assert(command == PA_COMMAND_REMOVE_CLIENT_PROPLIST);
+ pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_CHANGE, c->client->index);
+ }
+ }
+}
+
+static void command_set_default_sink_or_source(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
const char *s;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_gets(t, &s) < 0 ||
@@ -2675,18 +3567,18 @@ static void command_set_default_sink_or_source(PA_GCC_UNUSED pa_pdispatch *pd, u
}
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, !s || (*s && pa_utf8_valid(s)), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !s || pa_namereg_is_valid_name(s), tag, PA_ERR_INVALID);
pa_namereg_set_default(c->protocol->core, s, command == PA_COMMAND_SET_DEFAULT_SOURCE ? PA_NAMEREG_SOURCE : PA_NAMEREG_SINK);
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_set_stream_name(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_set_stream_name(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
const char *name;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2721,11 +3613,11 @@ static void command_set_stream_name(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t com
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_kill(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_kill(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2742,7 +3634,7 @@ static void command_kill(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint3
client = pa_idxset_get_by_index(c->protocol->core->clients, idx);
CHECK_VALIDITY(c->pstream, client, tag, PA_ERR_NOENTITY);
- connection_ref(c);
+ pa_native_connection_ref(c);
pa_client_kill(client);
} else if (command == PA_COMMAND_KILL_SINK_INPUT) {
@@ -2751,7 +3643,7 @@ static void command_kill(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint3
s = pa_idxset_get_by_index(c->protocol->core->sink_inputs, idx);
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
- connection_ref(c);
+ pa_native_connection_ref(c);
pa_sink_input_kill(s);
} else {
pa_source_output *s;
@@ -2761,21 +3653,21 @@ static void command_kill(PA_GCC_UNUSED pa_pdispatch *pd, uint32_t command, uint3
s = pa_idxset_get_by_index(c->protocol->core->source_outputs, idx);
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
- connection_ref(c);
+ pa_native_connection_ref(c);
pa_source_output_kill(s);
}
pa_pstream_send_simple_ack(c->pstream, tag);
- connection_unref(c);
+ pa_native_connection_unref(c);
}
-static void command_load_module(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_load_module(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_module *m;
const char *name, *argument;
pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_gets(t, &name) < 0 ||
@@ -2799,12 +3691,12 @@ static void command_load_module(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED ui
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_unload_module(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_unload_module(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx;
pa_module *m;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -2817,18 +3709,18 @@ static void command_unload_module(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED
m = pa_idxset_get_by_index(c->protocol->core->modules, idx);
CHECK_VALIDITY(c->pstream, m, tag, PA_ERR_NOENTITY);
- pa_module_unload_request(m);
+ pa_module_unload_request(m, FALSE);
pa_pstream_send_simple_ack(c->pstream, tag);
}
-static void command_add_autoload(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_add_autoload(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
const char *name, *module, *argument;
uint32_t type;
uint32_t idx;
pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_gets(t, &name) < 0 ||
@@ -2856,13 +3748,13 @@ static void command_add_autoload(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED u
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_remove_autoload(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_remove_autoload(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
const char *name = NULL;
uint32_t type, idx = PA_IDXSET_INVALID;
int r;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if ((pa_tagstruct_getu32(t, &idx) < 0 &&
@@ -2892,19 +3784,19 @@ static void autoload_fill_tagstruct(pa_tagstruct *t, const pa_autoload_entry *e)
pa_tagstruct_putu32(t, e->index);
pa_tagstruct_puts(t, e->name);
- pa_tagstruct_putu32(t, e->type == PA_NAMEREG_SINK ? 0 : 1);
+ pa_tagstruct_putu32(t, e->type == PA_NAMEREG_SINK ? 0U : 1U);
pa_tagstruct_puts(t, e->module);
pa_tagstruct_puts(t, e->argument);
}
-static void command_get_autoload_info(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_get_autoload_info(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
const pa_autoload_entry *a = NULL;
uint32_t type, idx;
const char *name;
pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if ((pa_tagstruct_getu32(t, &idx) < 0 &&
@@ -2931,11 +3823,11 @@ static void command_get_autoload_info(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNU
pa_pstream_send_tagstruct(c->pstream, reply);
}
-static void command_get_autoload_info_list(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+static void command_get_autoload_info_list(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_tagstruct *reply;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (!pa_tagstruct_eof(t)) {
@@ -2959,16 +3851,16 @@ static void command_get_autoload_info_list(PA_GCC_UNUSED pa_pdispatch *pd, PA_GC
}
static void command_move_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx = PA_INVALID_INDEX, idx_device = PA_INVALID_INDEX;
- const char *name = NULL;
+ const char *name_device = NULL;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
pa_tagstruct_getu32(t, &idx_device) < 0 ||
- pa_tagstruct_gets(t, &name) < 0 ||
+ pa_tagstruct_gets(t, &name_device) < 0 ||
!pa_tagstruct_eof(t)) {
protocol_error(c);
return;
@@ -2976,7 +3868,11 @@ static void command_move_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX, tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, idx_device != PA_INVALID_INDEX || !name || (*name && pa_utf8_valid(name)), tag, PA_ERR_INVALID);
+
+ CHECK_VALIDITY(c->pstream, !name_device || pa_namereg_is_valid_name(name_device), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx_device != PA_INVALID_INDEX || name_device, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx_device == PA_INVALID_INDEX || !name_device, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name_device || idx_device == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
if (command == PA_COMMAND_MOVE_SINK_INPUT) {
pa_sink_input *si = NULL;
@@ -2987,11 +3883,11 @@ static void command_move_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag
if (idx_device != PA_INVALID_INDEX)
sink = pa_idxset_get_by_index(c->protocol->core->sinks, idx_device);
else
- sink = pa_namereg_get(c->protocol->core, name, PA_NAMEREG_SINK, 1);
+ sink = pa_namereg_get(c->protocol->core, name_device, PA_NAMEREG_SINK, 1);
CHECK_VALIDITY(c->pstream, si && sink, tag, PA_ERR_NOENTITY);
- if (pa_sink_input_move_to(si, sink, 0) < 0) {
+ if (pa_sink_input_move_to(si, sink) < 0) {
pa_pstream_send_error(c->pstream, tag, PA_ERR_INVALID);
return;
}
@@ -3006,7 +3902,7 @@ static void command_move_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag
if (idx_device != PA_INVALID_INDEX)
source = pa_idxset_get_by_index(c->protocol->core->sources, idx_device);
else
- source = pa_namereg_get(c->protocol->core, name, PA_NAMEREG_SOURCE, 1);
+ source = pa_namereg_get(c->protocol->core, name_device, PA_NAMEREG_SOURCE, 1);
CHECK_VALIDITY(c->pstream, so && source, tag, PA_ERR_NOENTITY);
@@ -3020,12 +3916,12 @@ static void command_move_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag
}
static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
uint32_t idx = PA_INVALID_INDEX;
const char *name = NULL;
- int b;
+ pa_bool_t b;
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(t);
if (pa_tagstruct_getu32(t, &idx) < 0 ||
@@ -3037,7 +3933,10 @@ static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa
}
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
- CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || !name || !*name || pa_utf8_valid(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx == PA_INVALID_INDEX || !name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || idx == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
if (command == PA_COMMAND_SUSPEND_SINK) {
@@ -3093,28 +3992,69 @@ static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa
pa_pstream_send_simple_ack(c->pstream, tag);
}
+static void command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
+ uint32_t idx = PA_INVALID_INDEX;
+ const char *name = NULL;
+ pa_module *m;
+ pa_native_protocol_ext_cb_t cb;
+
+ pa_native_connection_assert_ref(c);
+ pa_assert(t);
+
+ if (pa_tagstruct_getu32(t, &idx) < 0 ||
+ pa_tagstruct_gets(t, &name) < 0) {
+ protocol_error(c);
+ return;
+ }
+
+ CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
+ CHECK_VALIDITY(c->pstream, !name || pa_utf8_valid(name), tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, idx == PA_INVALID_INDEX || !name, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, !name || idx == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
+
+ if (idx != PA_INVALID_INDEX)
+ m = pa_idxset_get_by_index(c->protocol->core->modules, idx);
+ else {
+ for (m = pa_idxset_first(c->protocol->core->modules, &idx); m; m = pa_idxset_next(c->protocol->core->modules, &idx))
+ if (strcmp(name, m->name) == 0)
+ break;
+ }
+
+ CHECK_VALIDITY(c->pstream, m, tag, PA_ERR_NOEXTENSION);
+ CHECK_VALIDITY(c->pstream, m->load_once || idx != PA_INVALID_INDEX, tag, PA_ERR_INVALID);
+
+ cb = (pa_native_protocol_ext_cb_t) pa_hashmap_get(c->protocol->extensions, m);
+ CHECK_VALIDITY(c->pstream, m, tag, PA_ERR_NOEXTENSION);
+
+ if (cb(c->protocol, m, c, tag, t) < 0)
+ protocol_error(c);
+}
+
+
/*** pstream callbacks ***/
static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_creds *creds, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_assert(p);
pa_assert(packet);
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
if (pa_pdispatch_run(c->pdispatch, packet, creds, c) < 0) {
pa_log("invalid packet.");
- connection_unlink(c);
+ native_connection_unlink(c);
}
}
static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
output_stream *stream;
pa_assert(p);
pa_assert(chunk);
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
if (!(stream = OUTPUT_STREAM(pa_idxset_get_by_index(c->output_streams, channel)))) {
pa_log("client sent block for invalid stream.");
@@ -3122,6 +4062,8 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o
return;
}
+/* pa_log("got %lu bytes", (unsigned long) chunk->length); */
+
if (playback_stream_isinstance(stream)) {
playback_stream *ps = PLAYBACK_STREAM(stream);
@@ -3170,22 +4112,22 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o
}
static void pstream_die_callback(pa_pstream *p, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_assert(p);
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
- connection_unlink(c);
- pa_log_info("connection died.");
+ native_connection_unlink(c);
+ pa_log_info("Connection died.");
}
static void pstream_drain_callback(pa_pstream *p, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_assert(p);
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
- send_memblock(c);
+ native_connection_send_memblock(c);
}
static void pstream_revoke_callback(pa_pstream *p, uint32_t block_id, void *userdata) {
@@ -3211,31 +4153,33 @@ static void pstream_release_callback(pa_pstream *p, uint32_t block_id, void *use
static void client_kill_cb(pa_client *c) {
pa_assert(c);
- connection_unlink(CONNECTION(c->userdata));
+ native_connection_unlink(PA_NATIVE_CONNECTION(c->userdata));
+ pa_log_info("Connection killed.");
}
-/*** socket server callbacks ***/
+/*** module entry points ***/
static void auth_timeout(pa_mainloop_api*m, pa_time_event *e, const struct timeval *tv, void *userdata) {
- connection *c = CONNECTION(userdata);
+ pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
pa_assert(m);
pa_assert(tv);
- connection_assert_ref(c);
+ pa_native_connection_assert_ref(c);
pa_assert(c->auth_timeout_event == e);
- if (!c->authorized)
- connection_unlink(c);
+ if (!c->authorized) {
+ native_connection_unlink(c);
+ pa_log_info("Connection terminated due to authentication timeout.");
+ }
}
-static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, void *userdata) {
- pa_protocol_native *p = userdata;
- connection *c;
+void pa_native_protocol_connect(pa_native_protocol *p, pa_iochannel *io, pa_native_options *o) {
+ pa_native_connection *c;
char cname[256], pname[128];
- pa_assert(s);
- pa_assert(io);
pa_assert(p);
+ pa_assert(io);
+ pa_assert(o);
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
pa_log_warn("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
@@ -3243,15 +4187,24 @@ static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, vo
return;
}
- c = pa_msgobject_new(connection);
- c->parent.parent.free = connection_free;
- c->parent.process_msg = connection_process_msg;
+ c = pa_msgobject_new(pa_native_connection);
+ c->parent.parent.free = native_connection_free;
+ c->parent.process_msg = native_connection_process_msg;
+ c->protocol = p;
+ c->options = pa_native_options_ref(o);
+ c->authorized = FALSE;
- c->authorized = !!p->public;
+ if (o->auth_anonymous) {
+ pa_log_info("Client authenticated anonymously.");
+ c->authorized = TRUE;
+ }
+
+ if (!c->authorized &&
+ o->auth_ip_acl &&
+ pa_ip_acl_check(o->auth_ip_acl, pa_iochannel_get_recv_fd(io)) > 0) {
- if (!c->authorized && p->auth_ip_acl && pa_ip_acl_check(p->auth_ip_acl, pa_iochannel_get_recv_fd(io)) > 0) {
pa_log_info("Client authenticated by IP ACL.");
- c->authorized = 1;
+ c->authorized = TRUE;
}
if (!c->authorized) {
@@ -3262,17 +4215,18 @@ static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, vo
} else
c->auth_timeout_event = NULL;
+ c->is_local = pa_iochannel_socket_is_local(io);
c->version = 8;
- c->protocol = p;
+
pa_iochannel_socket_peer_to_string(io, pname, sizeof(pname));
pa_snprintf(cname, sizeof(cname), "Native client (%s)", pname);
c->client = pa_client_new(p->core, __FILE__, cname);
+ pa_proplist_sets(c->client->proplist, "native-protocol.peer", pname);
c->client->kill = client_kill_cb;
c->client->userdata = c;
- c->client->owner = p->module;
+ c->client->module = o->module;
c->pstream = pa_pstream_new(p->core->mainloop, io, p->core->mempool);
-
pa_pstream_set_recieve_packet_callback(c->pstream, pstream_packet_callback, c);
pa_pstream_set_recieve_memblock_callback(c->pstream, pstream_memblock_callback, c);
pa_pstream_set_die_callback(c->pstream, pstream_die_callback, c);
@@ -3293,167 +4247,250 @@ static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, vo
#ifdef HAVE_CREDS
if (pa_iochannel_creds_supported(io))
pa_iochannel_creds_enable(io);
-
#endif
+
+ pa_hook_fire(&p->hooks[PA_NATIVE_HOOK_CONNECTION_PUT], c);
}
-/*** module entry points ***/
+void pa_native_protocol_disconnect(pa_native_protocol *p, pa_module *m) {
+ pa_native_connection *c;
+ void *state = NULL;
-static int load_key(pa_protocol_native*p, const char*fn) {
pa_assert(p);
+ pa_assert(m);
- p->auth_cookie_in_property = 0;
+ while ((c = pa_idxset_iterate(p->connections, &state, NULL)))
+ if (c->options->module == m)
+ native_connection_unlink(c);
+}
- if (!fn && pa_authkey_prop_get(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME, p->auth_cookie, sizeof(p->auth_cookie)) >= 0) {
- pa_log_info("using already loaded auth cookie.");
- pa_authkey_prop_ref(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
- p->auth_cookie_in_property = 1;
- return 0;
- }
+static pa_native_protocol* native_protocol_new(pa_core *c) {
+ pa_native_protocol *p;
+ pa_native_hook_t h;
- if (!fn)
- fn = PA_NATIVE_COOKIE_FILE;
+ pa_assert(c);
- if (pa_authkey_load_auto(fn, p->auth_cookie, sizeof(p->auth_cookie)) < 0)
- return -1;
+ p = pa_xnew(pa_native_protocol, 1);
+ PA_REFCNT_INIT(p);
+ p->core = c;
+ p->connections = pa_idxset_new(NULL, NULL);
- pa_log_info("loading cookie from disk.");
+ p->servers = NULL;
- if (pa_authkey_prop_put(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME, p->auth_cookie, sizeof(p->auth_cookie)) >= 0)
- p->auth_cookie_in_property = 1;
+ p->extensions = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
- return 0;
+ for (h = 0; h < PA_NATIVE_HOOK_MAX; h++)
+ pa_hook_init(&p->hooks[h], p);
+
+ pa_assert_se(pa_shared_set(c, "native-protocol", p) >= 0);
+
+ return p;
}
-static pa_protocol_native* protocol_new_internal(pa_core *c, pa_module *m, pa_modargs *ma) {
- pa_protocol_native *p;
- pa_bool_t public = FALSE;
- const char *acl;
+pa_native_protocol* pa_native_protocol_get(pa_core *c) {
+ pa_native_protocol *p;
- pa_assert(c);
- pa_assert(ma);
+ if ((p = pa_shared_get(c, "native-protocol")))
+ return pa_native_protocol_ref(p);
- if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &public) < 0) {
- pa_log("auth-anonymous= expects a boolean argument.");
- return NULL;
- }
+ return native_protocol_new(c);
+}
- p = pa_xnew(pa_protocol_native, 1);
- p->core = c;
- p->module = m;
- p->public = public;
- p->server = NULL;
- p->auth_ip_acl = NULL;
+pa_native_protocol* pa_native_protocol_ref(pa_native_protocol *p) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
-#ifdef HAVE_CREDS
- {
- pa_bool_t a = 1;
- if (pa_modargs_get_value_boolean(ma, "auth-group-enabled", &a) < 0) {
- pa_log("auth-group-enabled= expects a boolean argument.");
- return NULL;
- }
- p->auth_group = a ? pa_xstrdup(pa_modargs_get_value(ma, "auth-group", c->is_system_instance ? PA_ACCESS_GROUP : NULL)) : NULL;
+ PA_REFCNT_INC(p);
- if (p->auth_group)
- pa_log_info("Allowing access to group '%s'.", p->auth_group);
- }
-#endif
+ return p;
+}
+void pa_native_protocol_unref(pa_native_protocol *p) {
+ pa_native_connection *c;
+ pa_native_hook_t h;
- if ((acl = pa_modargs_get_value(ma, "auth-ip-acl", NULL))) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
- if (!(p->auth_ip_acl = pa_ip_acl_new(acl))) {
- pa_log("Failed to parse IP ACL '%s'", acl);
- goto fail;
- }
- }
+ if (PA_REFCNT_DEC(p) > 0)
+ return;
- if (load_key(p, pa_modargs_get_value(ma, "cookie", NULL)) < 0)
- goto fail;
+ while ((c = pa_idxset_first(p->connections, NULL)))
+ native_connection_unlink(c);
- p->connections = pa_idxset_new(NULL, NULL);
+ pa_idxset_free(p->connections, NULL, NULL);
- return p;
+ pa_strlist_free(p->servers);
+
+ for (h = 0; h < PA_NATIVE_HOOK_MAX; h++)
+ pa_hook_done(&p->hooks[h]);
+
+ pa_hashmap_free(p->extensions, NULL, NULL);
+
+ pa_assert_se(pa_shared_remove(p->core, "native-protocol") >= 0);
-fail:
-#ifdef HAVE_CREDS
- pa_xfree(p->auth_group);
-#endif
- if (p->auth_ip_acl)
- pa_ip_acl_free(p->auth_ip_acl);
pa_xfree(p);
- return NULL;
}
-pa_protocol_native* pa_protocol_native_new(pa_core *core, pa_socket_server *server, pa_module *m, pa_modargs *ma) {
- char t[256];
- pa_protocol_native *p;
+void pa_native_protocol_add_server_string(pa_native_protocol *p, const char *name) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+ pa_assert(name);
- if (!(p = protocol_new_internal(core, m, ma)))
- return NULL;
+ p->servers = pa_strlist_prepend(p->servers, name);
- p->server = server;
- pa_socket_server_set_callback(p->server, on_connection, p);
+ pa_hook_fire(&p->hooks[PA_NATIVE_HOOK_SERVERS_CHANGED], p->servers);
+}
- if (pa_socket_server_get_address(p->server, t, sizeof(t))) {
- pa_strlist *l;
- l = pa_property_get(core, PA_NATIVE_SERVER_PROPERTY_NAME);
- l = pa_strlist_prepend(l, t);
- pa_property_replace(core, PA_NATIVE_SERVER_PROPERTY_NAME, l);
- }
+void pa_native_protocol_remove_server_string(pa_native_protocol *p, const char *name) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+ pa_assert(name);
- return p;
+ p->servers = pa_strlist_remove(p->servers, name);
+
+ pa_hook_fire(&p->hooks[PA_NATIVE_HOOK_SERVERS_CHANGED], p->servers);
}
-void pa_protocol_native_free(pa_protocol_native *p) {
- connection *c;
+pa_hook *pa_native_protocol_hooks(pa_native_protocol *p) {
pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
- while ((c = pa_idxset_first(p->connections, NULL)))
- connection_unlink(c);
- pa_idxset_free(p->connections, NULL, NULL);
+ return p->hooks;
+}
- if (p->server) {
- char t[256];
+pa_strlist *pa_native_protocol_servers(pa_native_protocol *p) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
- if (pa_socket_server_get_address(p->server, t, sizeof(t))) {
- pa_strlist *l;
- l = pa_property_get(p->core, PA_NATIVE_SERVER_PROPERTY_NAME);
- l = pa_strlist_remove(l, t);
+ return p->servers;
+}
- if (l)
- pa_property_replace(p->core, PA_NATIVE_SERVER_PROPERTY_NAME, l);
- else
- pa_property_remove(p->core, PA_NATIVE_SERVER_PROPERTY_NAME);
- }
+int pa_native_protocol_install_ext(pa_native_protocol *p, pa_module *m, pa_native_protocol_ext_cb_t cb) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+ pa_assert(m);
+ pa_assert(cb);
+ pa_assert(!pa_hashmap_get(p->extensions, m));
+
+ pa_assert_se(pa_hashmap_put(p->extensions, m, (void*) cb) == 0);
+ return 0;
+}
+
+void pa_native_protocol_remove_ext(pa_native_protocol *p, pa_module *m) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+ pa_assert(m);
- pa_socket_server_unref(p->server);
+ pa_assert_se(pa_hashmap_remove(p->extensions, m));
+}
+
+pa_native_options* pa_native_options_new(void) {
+ pa_native_options *o;
+
+ o = pa_xnew0(pa_native_options, 1);
+ PA_REFCNT_INIT(o);
+
+ return o;
+}
+
+pa_native_options* pa_native_options_ref(pa_native_options *o) {
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ PA_REFCNT_INC(o);
+
+ return o;
+}
+
+void pa_native_options_unref(pa_native_options *o) {
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ if (PA_REFCNT_DEC(o) > 0)
+ return;
+
+ pa_xfree(o->auth_group);
+
+ if (o->auth_ip_acl)
+ pa_ip_acl_free(o->auth_ip_acl);
+
+ if (o->auth_cookie)
+ pa_auth_cookie_unref(o->auth_cookie);
+
+ pa_xfree(o);
+}
+
+int pa_native_options_parse(pa_native_options *o, pa_core *c, pa_modargs *ma) {
+ pa_bool_t enabled;
+ const char *acl;
+
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+ pa_assert(ma);
+
+ if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &o->auth_anonymous) < 0) {
+ pa_log("auth-anonymous= expects a boolean argument.");
+ return -1;
}
- if (p->auth_cookie_in_property)
- pa_authkey_prop_unref(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
+ enabled = TRUE;
+ if (pa_modargs_get_value_boolean(ma, "auth-group-enabled", &enabled) < 0) {
+ pa_log("auth-group-enabled= expects a boolean argument.");
+ return -1;
+ }
- if (p->auth_ip_acl)
- pa_ip_acl_free(p->auth_ip_acl);
+ pa_xfree(o->auth_group);
+ o->auth_group = enabled ? pa_xstrdup(pa_modargs_get_value(ma, "auth-group", pa_in_system_mode() ? PA_ACCESS_GROUP : NULL)) : NULL;
-#ifdef HAVE_CREDS
- pa_xfree(p->auth_group);
+#ifndef HAVE_CREDS
+ if (o->auth_group)
+ pa_log_warn("Authentication group configured, but not available on local system. Ignoring.");
#endif
- pa_xfree(p);
-}
-pa_protocol_native* pa_protocol_native_new_iochannel(
- pa_core*core,
- pa_iochannel *io,
- pa_module *m,
- pa_modargs *ma) {
+ if ((acl = pa_modargs_get_value(ma, "auth-ip-acl", NULL))) {
+ pa_ip_acl *ipa;
- pa_protocol_native *p;
+ if (!(ipa = pa_ip_acl_new(acl))) {
+ pa_log("Failed to parse IP ACL '%s'", acl);
+ return -1;
+ }
- if (!(p = protocol_new_internal(core, m, ma)))
- return NULL;
+ if (o->auth_ip_acl)
+ pa_ip_acl_free(o->auth_ip_acl);
- on_connection(NULL, io, p);
+ o->auth_ip_acl = ipa;
+ }
- return p;
+ enabled = TRUE;
+ if (pa_modargs_get_value_boolean(ma, "auth-cookie-enabled", &enabled) < 0) {
+ pa_log("auth-cookie-enabled= expects a boolean argument.");
+ return -1;
+ }
+
+ if (o->auth_cookie)
+ pa_auth_cookie_unref(o->auth_cookie);
+
+ if (enabled) {
+ const char *cn;
+
+ /* The new name for this is 'auth-cookie', for compat reasons
+ * we check the old name too */
+ if (!(cn = pa_modargs_get_value(ma, "auth-cookie", NULL)))
+ if (!(cn = pa_modargs_get_value(ma, "cookie", NULL)))
+ cn = PA_NATIVE_COOKIE_FILE;
+
+ if (!(o->auth_cookie = pa_auth_cookie_get(c, cn, PA_NATIVE_COOKIE_LENGTH)))
+ return -1;
+
+ } else
+ o->auth_cookie = NULL;
+
+ return 0;
+}
+
+pa_pstream* pa_native_connection_get_pstream(pa_native_connection *c) {
+ pa_native_connection_assert_ref(c);
+
+ return c->pstream;
}
diff --git a/src/pulsecore/protocol-native.h b/src/pulsecore/protocol-native.h
index 6675343..06731c0 100644
--- a/src/pulsecore/protocol-native.h
+++ b/src/pulsecore/protocol-native.h
@@ -1,8 +1,6 @@
#ifndef fooprotocolnativehfoo
#define fooprotocolnativehfoo
-/* $Id: protocol-native.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -26,15 +24,66 @@
***/
#include <pulsecore/core.h>
-#include <pulsecore/socket-server.h>
+#include <pulsecore/ipacl.h>
+#include <pulsecore/auth-cookie.h>
+#include <pulsecore/iochannel.h>
#include <pulsecore/module.h>
#include <pulsecore/modargs.h>
+#include <pulsecore/strlist.h>
+#include <pulsecore/hook-list.h>
+#include <pulsecore/pstream.h>
+#include <pulsecore/tagstruct.h>
+
+typedef struct pa_native_protocol pa_native_protocol;
+
+typedef struct pa_native_connection pa_native_connection;
+
+typedef struct pa_native_options {
+ PA_REFCNT_DECLARE;
+
+ pa_module *module;
+
+ pa_bool_t auth_anonymous;
+ char *auth_group;
+ pa_ip_acl *auth_ip_acl;
+ pa_auth_cookie *auth_cookie;
+
+} pa_native_options;
+
+typedef enum pa_native_hook {
+ PA_NATIVE_HOOK_SERVERS_CHANGED,
+ PA_NATIVE_HOOK_CONNECTION_PUT,
+ PA_NATIVE_HOOK_CONNECTION_UNLINK,
+ PA_NATIVE_HOOK_MAX
+} pa_native_hook_t;
+
+pa_native_protocol* pa_native_protocol_get(pa_core *core);
+pa_native_protocol* pa_native_protocol_ref(pa_native_protocol *p);
+void pa_native_protocol_unref(pa_native_protocol *p);
+void pa_native_protocol_connect(pa_native_protocol *p, pa_iochannel *io, pa_native_options *a);
+void pa_native_protocol_disconnect(pa_native_protocol *p, pa_module *m);
+
+pa_hook *pa_native_protocol_hooks(pa_native_protocol *p);
+
+void pa_native_protocol_add_server_string(pa_native_protocol *p, const char *name);
+void pa_native_protocol_remove_server_string(pa_native_protocol *p, const char *name);
+pa_strlist *pa_native_protocol_servers(pa_native_protocol *p);
+
+typedef int (*pa_native_protocol_ext_cb_t)(
+ pa_native_protocol *p,
+ pa_module *m,
+ pa_native_connection *c,
+ uint32_t tag,
+ pa_tagstruct *t);
-typedef struct pa_protocol_native pa_protocol_native;
+int pa_native_protocol_install_ext(pa_native_protocol *p, pa_module *m, pa_native_protocol_ext_cb_t cb);
+void pa_native_protocol_remove_ext(pa_native_protocol *p, pa_module *m);
-pa_protocol_native* pa_protocol_native_new(pa_core*core, pa_socket_server *server, pa_module *m, pa_modargs *ma);
-void pa_protocol_native_free(pa_protocol_native *n);
+pa_pstream* pa_native_connection_get_pstream(pa_native_connection *c);
-pa_protocol_native* pa_protocol_native_new_iochannel(pa_core*core, pa_iochannel *io, pa_module *m, pa_modargs *ma);
+pa_native_options* pa_native_options_new(void);
+pa_native_options* pa_native_options_ref(pa_native_options *o);
+void pa_native_options_unref(pa_native_options *o);
+int pa_native_options_parse(pa_native_options *o, pa_core *c, pa_modargs *ma);
#endif
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
index 47454fd..743bf2e 100644
--- a/src/pulsecore/protocol-simple.c
+++ b/src/pulsecore/protocol-simple.c
@@ -1,5 +1,3 @@
-/* $Id: protocol-simple.c 2050 2007-11-13 17:37:44Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -32,6 +30,7 @@
#include <string.h>
#include <pulse/xmalloc.h>
+#include <pulse/timeval.h>
#include <pulsecore/sink-input.h>
#include <pulsecore/source-output.h>
@@ -42,6 +41,8 @@
#include <pulsecore/core-error.h>
#include <pulsecore/atomic.h>
#include <pulsecore/thread-mq.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/shared.h>
#include "protocol-simple.h"
@@ -50,19 +51,21 @@
typedef struct connection {
pa_msgobject parent;
- pa_protocol_simple *protocol;
+ pa_simple_protocol *protocol;
+ pa_simple_options *options;
pa_iochannel *io;
pa_sink_input *sink_input;
pa_source_output *source_output;
pa_client *client;
pa_memblockq *input_memblockq, *output_memblockq;
- int dead;
+ pa_bool_t dead;
struct {
pa_memblock *current_memblock;
- size_t memblock_index, fragment_size;
+ size_t memblock_index;
pa_atomic_t missing;
+ pa_bool_t underrun;
} playback;
} connection;
@@ -70,20 +73,11 @@ PA_DECLARE_CLASS(connection);
#define CONNECTION(o) (connection_cast(o))
static PA_DEFINE_CHECK_TYPE(connection, pa_msgobject);
-struct pa_protocol_simple {
- pa_module *module;
+struct pa_simple_protocol {
+ PA_REFCNT_DECLARE;
+
pa_core *core;
- pa_socket_server*server;
pa_idxset *connections;
-
- enum {
- RECORD = 1,
- PLAYBACK = 2,
- DUPLEX = 3
- } mode;
-
- pa_sample_spec sample_spec;
- char *source_name, *sink_name;
};
enum {
@@ -97,11 +91,11 @@ enum {
CONNECTION_MESSAGE_UNLINK_CONNECTION /* Please drop a aconnection now */
};
-
#define PLAYBACK_BUFFER_SECONDS (.5)
#define PLAYBACK_BUFFER_FRAGMENTS (10)
#define RECORD_BUFFER_SECONDS (5)
-#define RECORD_BUFFER_FRAGMENTS (100)
+#define DEFAULT_SINK_LATENCY (300*PA_USEC_PER_MSEC)
+#define DEFAULT_SOURCE_LATENCY (300*PA_USEC_PER_MSEC)
static void connection_unlink(connection *c) {
pa_assert(c);
@@ -109,6 +103,11 @@ static void connection_unlink(connection *c) {
if (!c->protocol)
return;
+ if (c->options) {
+ pa_simple_options_unref(c->options);
+ c->options = NULL;
+ }
+
if (c->sink_input) {
pa_sink_input_unlink(c->sink_input);
pa_sink_input_unref(c->sink_input);
@@ -140,8 +139,6 @@ static void connection_free(pa_object *o) {
connection *c = CONNECTION(o);
pa_assert(c);
- connection_unref(c);
-
if (c->playback.current_memblock)
pa_memblock_unref(c->playback.current_memblock);
@@ -158,27 +155,33 @@ static int do_read(connection *c) {
ssize_t r;
size_t l;
void *p;
+ size_t space;
connection_assert_ref(c);
- if (!c->sink_input || (l = pa_atomic_load(&c->playback.missing)) <= 0)
+ if (!c->sink_input || (l = (size_t) pa_atomic_load(&c->playback.missing)) <= 0)
return 0;
- if (l > c->playback.fragment_size)
- l = c->playback.fragment_size;
+ if (c->playback.current_memblock) {
- if (c->playback.current_memblock)
- if (pa_memblock_get_length(c->playback.current_memblock) - c->playback.memblock_index < l) {
+ space = pa_memblock_get_length(c->playback.current_memblock) - c->playback.memblock_index;
+
+ if (space <= 0) {
pa_memblock_unref(c->playback.current_memblock);
c->playback.current_memblock = NULL;
- c->playback.memblock_index = 0;
}
+ }
if (!c->playback.current_memblock) {
- pa_assert_se(c->playback.current_memblock = pa_memblock_new(c->protocol->core->mempool, l));
+ pa_assert_se(c->playback.current_memblock = pa_memblock_new(c->protocol->core->mempool, (size_t) -1));
c->playback.memblock_index = 0;
+
+ space = pa_memblock_get_length(c->playback.current_memblock);
}
+ if (l > space)
+ l = space;
+
p = pa_memblock_acquire(c->playback.current_memblock);
r = pa_iochannel_read(c->io, (uint8_t*) p + c->playback.memblock_index, l);
pa_memblock_release(c->playback.current_memblock);
@@ -194,12 +197,12 @@ static int do_read(connection *c) {
chunk.memblock = c->playback.current_memblock;
chunk.index = c->playback.memblock_index;
- chunk.length = r;
+ chunk.length = (size_t) r;
- c->playback.memblock_index += r;
+ c->playback.memblock_index += (size_t) r;
pa_asyncmsgq_post(c->sink_input->sink->asyncmsgq, PA_MSGOBJECT(c->sink_input), SINK_INPUT_MESSAGE_POST_DATA, NULL, 0, &chunk, NULL);
- pa_atomic_sub(&c->playback.missing, r);
+ pa_atomic_sub(&c->playback.missing, (int) r);
return 0;
}
@@ -237,7 +240,7 @@ static int do_write(connection *c) {
return -1;
}
- pa_memblockq_drop(c->output_memblockq, r);
+ pa_memblockq_drop(c->output_memblockq, (size_t) r);
return 0;
}
@@ -248,16 +251,16 @@ static void do_work(connection *c) {
if (c->dead)
return;
- if (pa_iochannel_is_readable(c->io)) {
+ if (pa_iochannel_is_readable(c->io))
if (do_read(c) < 0)
goto fail;
- } else if (pa_iochannel_is_hungup(c->io))
+
+ if (!c->sink_input && pa_iochannel_is_hungup(c->io))
goto fail;
- if (pa_iochannel_is_writable(c->io)) {
+ if (pa_iochannel_is_writable(c->io))
if (do_write(c) < 0)
goto fail;
- }
return;
@@ -266,7 +269,7 @@ fail:
if (c->sink_input) {
/* If there is a sink input, we first drain what we already have read before shutting down the connection */
- c->dead = 1;
+ c->dead = TRUE;
pa_iochannel_free(c->io);
c->io = NULL;
@@ -318,15 +321,19 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
/* New data from the main loop */
pa_memblockq_push_align(c->input_memblockq, chunk);
+ if (pa_memblockq_is_readable(c->input_memblockq) && c->playback.underrun) {
+ pa_log_debug("Requesting rewind due to end of underrun.");
+ pa_sink_input_request_rewind(c->sink_input, 0, FALSE, TRUE);
+ }
+
/* pa_log("got data, %u", pa_memblockq_get_length(c->input_memblockq)); */
return 0;
}
- case SINK_INPUT_MESSAGE_DISABLE_PREBUF: {
+ case SINK_INPUT_MESSAGE_DISABLE_PREBUF:
pa_memblockq_prebuf_disable(c->input_memblockq);
return 0;
- }
case PA_SINK_INPUT_MESSAGE_GET_LATENCY: {
pa_usec_t *r = userdata;
@@ -343,43 +350,64 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
}
/* Called from thread context */
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
connection *c;
- int r;
- pa_assert(i);
+ pa_sink_input_assert_ref(i);
c = CONNECTION(i->userdata);
connection_assert_ref(c);
pa_assert(chunk);
- r = pa_memblockq_peek(c->input_memblockq, chunk);
+ if (pa_memblockq_peek(c->input_memblockq, chunk) < 0) {
+
+ c->playback.underrun = TRUE;
-/* pa_log("peeked %u %i", r >= 0 ? chunk->length: 0, r); */
+ if (c->dead && pa_sink_input_safe_to_remove(i))
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(c), CONNECTION_MESSAGE_UNLINK_CONNECTION, NULL, 0, NULL, NULL);
+
+ return -1;
+ } else {
+ size_t m;
- if (c->dead && r < 0)
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(c), CONNECTION_MESSAGE_UNLINK_CONNECTION, NULL, 0, NULL, NULL);
+ chunk->length = PA_MIN(length, chunk->length);
- return r;
+ c->playback.underrun = FALSE;
+
+ pa_memblockq_drop(c->input_memblockq, chunk->length);
+ m = pa_memblockq_pop_missing(c->input_memblockq);
+
+ if (m > 0)
+ if (pa_atomic_add(&c->playback.missing, (int) m) <= 0)
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(c), CONNECTION_MESSAGE_REQUEST_DATA, NULL, 0, NULL, NULL);
+
+ return 0;
+ }
}
/* Called from thread context */
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
connection *c;
- size_t old, new;
- pa_assert(i);
+ pa_sink_input_assert_ref(i);
c = CONNECTION(i->userdata);
connection_assert_ref(c);
- pa_assert(length);
- old = pa_memblockq_missing(c->input_memblockq);
- pa_memblockq_drop(c->input_memblockq, length);
- new = pa_memblockq_missing(c->input_memblockq);
+ /* If we are in an underrun, then we don't rewind */
+ if (i->thread_info.underrun_for > 0)
+ return;
- if (new > old) {
- if (pa_atomic_add(&c->playback.missing, new - old) <= 0)
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(c), CONNECTION_MESSAGE_REQUEST_DATA, NULL, 0, NULL, NULL);
- }
+ pa_memblockq_rewind(c->input_memblockq, nbytes);
+}
+
+/* Called from thread context */
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ connection *c;
+
+ pa_sink_input_assert_ref(i);
+ c = CONNECTION(i->userdata);
+ connection_assert_ref(c);
+
+ pa_memblockq_set_maxrewind(c->input_memblockq, nbytes);
}
/* Called from main context */
@@ -395,7 +423,7 @@ static void sink_input_kill_cb(pa_sink_input *i) {
static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk) {
connection *c;
- pa_assert(o);
+ pa_source_output_assert_ref(o);
c = CONNECTION(o->userdata);
pa_assert(c);
pa_assert(chunk);
@@ -414,7 +442,7 @@ static void source_output_kill_cb(pa_source_output *o) {
static pa_usec_t source_output_get_latency_cb(pa_source_output *o) {
connection*c;
- pa_assert(o);
+ pa_source_output_assert_ref(o);
c = CONNECTION(o->userdata);
pa_assert(c);
@@ -446,14 +474,13 @@ static void io_callback(pa_iochannel*io, void *userdata) {
/*** socket_server callbacks ***/
-static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) {
- pa_protocol_simple *p = userdata;
+void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simple_options *o) {
connection *c = NULL;
- char cname[256];
+ char cname[256], pname[128];
- pa_assert(s);
- pa_assert(io);
pa_assert(p);
+ pa_assert(io);
+ pa_assert(o);
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
@@ -465,73 +492,101 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
c->parent.parent.free = connection_free;
c->parent.process_msg = connection_process_msg;
c->io = io;
+ pa_iochannel_set_callback(c->io, io_callback, c);
+
c->sink_input = NULL;
c->source_output = NULL;
c->input_memblockq = c->output_memblockq = NULL;
c->protocol = p;
+ c->options = pa_simple_options_ref(o);
c->playback.current_memblock = NULL;
c->playback.memblock_index = 0;
- c->playback.fragment_size = 0;
- c->dead = 0;
+ c->dead = FALSE;
+ c->playback.underrun = TRUE;
pa_atomic_store(&c->playback.missing, 0);
- pa_iochannel_socket_peer_to_string(io, cname, sizeof(cname));
+ pa_iochannel_socket_peer_to_string(io, pname, sizeof(pname));
+ pa_snprintf(cname, sizeof(cname), "Simple client (%s)", pname);
pa_assert_se(c->client = pa_client_new(p->core, __FILE__, cname));
- c->client->owner = p->module;
+ pa_proplist_sets(c->client->proplist, "simple-protocol.peer", pname);
+ c->client->module = o->module;
c->client->kill = client_kill_cb;
c->client->userdata = c;
- if (p->mode & PLAYBACK) {
+ if (o->playback) {
pa_sink_input_new_data data;
size_t l;
+ pa_sink *sink;
+
+ if (!(sink = pa_namereg_get(c->protocol->core, o->default_sink, PA_NAMEREG_SINK, TRUE))) {
+ pa_log("Failed to get sink.");
+ goto fail;
+ }
pa_sink_input_new_data_init(&data);
data.driver = __FILE__;
- data.name = c->client->name;
- pa_sink_input_new_data_set_sample_spec(&data, &p->sample_spec);
- data.module = p->module;
+ data.module = o->module;
data.client = c->client;
+ data.sink = sink;
+ pa_proplist_update(data.proplist, PA_UPDATE_MERGE, c->client->proplist);
+ pa_sink_input_new_data_set_sample_spec(&data, &o->sample_spec);
- if (!(c->sink_input = pa_sink_input_new(p->core, &data, 0))) {
+ c->sink_input = pa_sink_input_new(p->core, &data, 0);
+ pa_sink_input_new_data_done(&data);
+
+ if (!c->sink_input) {
pa_log("Failed to create sink input.");
goto fail;
}
c->sink_input->parent.process_msg = sink_input_process_msg;
- c->sink_input->peek = sink_input_peek_cb;
- c->sink_input->drop = sink_input_drop_cb;
+ c->sink_input->pop = sink_input_pop_cb;
+ c->sink_input->process_rewind = sink_input_process_rewind_cb;
+ c->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
c->sink_input->kill = sink_input_kill_cb;
c->sink_input->userdata = c;
- l = (size_t) (pa_bytes_per_second(&p->sample_spec)*PLAYBACK_BUFFER_SECONDS);
+ pa_sink_input_set_requested_latency(c->sink_input, DEFAULT_SINK_LATENCY);
+
+ l = (size_t) ((double) pa_bytes_per_second(&o->sample_spec)*PLAYBACK_BUFFER_SECONDS);
c->input_memblockq = pa_memblockq_new(
0,
l,
- 0,
- pa_frame_size(&p->sample_spec),
+ l,
+ pa_frame_size(&o->sample_spec),
(size_t) -1,
l/PLAYBACK_BUFFER_FRAGMENTS,
+ 0,
NULL);
- pa_iochannel_socket_set_rcvbuf(io, l/PLAYBACK_BUFFER_FRAGMENTS*5);
- c->playback.fragment_size = l/PLAYBACK_BUFFER_FRAGMENTS;
+ pa_iochannel_socket_set_rcvbuf(io, l);
- pa_atomic_store(&c->playback.missing, pa_memblockq_missing(c->input_memblockq));
+ pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq));
pa_sink_input_put(c->sink_input);
}
- if (p->mode & RECORD) {
+ if (o->record) {
pa_source_output_new_data data;
size_t l;
+ pa_source *source;
+
+ if (!(source = pa_namereg_get(c->protocol->core, o->default_source, PA_NAMEREG_SOURCE, TRUE))) {
+ pa_log("Failed to get source.");
+ goto fail;
+ }
pa_source_output_new_data_init(&data);
data.driver = __FILE__;
- data.name = c->client->name;
- pa_source_output_new_data_set_sample_spec(&data, &p->sample_spec);
- data.module = p->module;
+ data.module = o->module;
data.client = c->client;
+ data.source = source;
+ pa_proplist_update(data.proplist, PA_UPDATE_MERGE, c->client->proplist);
+ pa_source_output_new_data_set_sample_spec(&data, &o->sample_spec);
- if (!(c->source_output = pa_source_output_new(p->core, &data, 0))) {
+ c->source_output = pa_source_output_new(p->core, &data, 0);
+ pa_source_output_new_data_done(&data);
+
+ if (!c->source_output) {
pa_log("Failed to create source output.");
goto fail;
}
@@ -540,21 +595,23 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
c->source_output->get_latency = source_output_get_latency_cb;
c->source_output->userdata = c;
- l = (size_t) (pa_bytes_per_second(&p->sample_spec)*RECORD_BUFFER_SECONDS);
+ pa_source_output_set_requested_latency(c->source_output, DEFAULT_SOURCE_LATENCY);
+
+ l = (size_t) (pa_bytes_per_second(&o->sample_spec)*RECORD_BUFFER_SECONDS);
c->output_memblockq = pa_memblockq_new(
0,
l,
0,
- pa_frame_size(&p->sample_spec),
+ pa_frame_size(&o->sample_spec),
1,
0,
+ 0,
NULL);
- pa_iochannel_socket_set_sndbuf(io, l/RECORD_BUFFER_FRAGMENTS*2);
+ pa_iochannel_socket_set_sndbuf(io, l);
pa_source_output_put(c->source_output);
}
- pa_iochannel_set_callback(c->io, io_callback, c);
pa_idxset_put(p->connections, c, NULL);
return;
@@ -564,73 +621,140 @@ fail:
connection_unlink(c);
}
-pa_protocol_simple* pa_protocol_simple_new(pa_core *core, pa_socket_server *server, pa_module *m, pa_modargs *ma) {
- pa_protocol_simple* p = NULL;
- pa_bool_t enable;
+void pa_simple_protocol_disconnect(pa_simple_protocol *p, pa_module *m) {
+ connection *c;
+ void *state = NULL;
- pa_assert(core);
- pa_assert(server);
- pa_assert(ma);
+ pa_assert(p);
+ pa_assert(m);
+
+ while ((c = pa_idxset_iterate(p->connections, &state, NULL)))
+ if (c->options->module == m)
+ connection_unlink(c);
+}
+
+static pa_simple_protocol* simple_protocol_new(pa_core *c) {
+ pa_simple_protocol *p;
+
+ pa_assert(c);
- p = pa_xnew0(pa_protocol_simple, 1);
- p->module = m;
- p->core = core;
- p->server = server;
+ p = pa_xnew(pa_simple_protocol, 1);
+ PA_REFCNT_INIT(p);
+ p->core = c;
p->connections = pa_idxset_new(NULL, NULL);
- p->sample_spec = core->default_sample_spec;
- if (pa_modargs_get_sample_spec(ma, &p->sample_spec) < 0) {
- pa_log("Failed to parse sample type specification.");
- goto fail;
- }
+ pa_assert_se(pa_shared_set(c, "simple-protocol", p) >= 0);
- p->source_name = pa_xstrdup(pa_modargs_get_value(ma, "source", NULL));
- p->sink_name = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
+ return p;
+}
- enable = FALSE;
- if (pa_modargs_get_value_boolean(ma, "record", &enable) < 0) {
- pa_log("record= expects a numeric argument.");
- goto fail;
- }
- p->mode = enable ? RECORD : 0;
+pa_simple_protocol* pa_simple_protocol_get(pa_core *c) {
+ pa_simple_protocol *p;
- enable = 1;
- if (pa_modargs_get_value_boolean(ma, "playback", &enable) < 0) {
- pa_log("playback= expects a numeric argument.");
- goto fail;
- }
- p->mode |= enable ? PLAYBACK : 0;
+ if ((p = pa_shared_get(c, "simple-protocol")))
+ return pa_simple_protocol_ref(p);
- if ((p->mode & (RECORD|PLAYBACK)) == 0) {
- pa_log("neither playback nor recording enabled for protocol.");
- goto fail;
- }
+ return simple_protocol_new(c);
+}
+
+pa_simple_protocol* pa_simple_protocol_ref(pa_simple_protocol *p) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
- pa_socket_server_set_callback(p->server, on_connection, p);
+ PA_REFCNT_INC(p);
return p;
+}
-fail:
- if (p)
- pa_protocol_simple_free(p);
+void pa_simple_protocol_unref(pa_simple_protocol *p) {
+ connection *c;
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) >= 1);
+
+ if (PA_REFCNT_DEC(p) > 0)
+ return;
- return NULL;
+ while ((c = pa_idxset_first(p->connections, NULL)))
+ connection_unlink(c);
+
+ pa_idxset_free(p->connections, NULL, NULL);
+
+ pa_assert_se(pa_shared_remove(p->core, "simple-protocol") >= 0);
+
+ pa_xfree(p);
}
+pa_simple_options* pa_simple_options_new(void) {
+ pa_simple_options *o;
-void pa_protocol_simple_free(pa_protocol_simple *p) {
- connection *c;
- pa_assert(p);
+ o = pa_xnew0(pa_simple_options, 1);
+ PA_REFCNT_INIT(o);
- if (p->connections) {
- while((c = pa_idxset_first(p->connections, NULL)))
- connection_unlink(c);
+ o->record = FALSE;
+ o->playback = TRUE;
- pa_idxset_free(p->connections, NULL, NULL);
+ return o;
+}
+
+pa_simple_options* pa_simple_options_ref(pa_simple_options *o) {
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ PA_REFCNT_INC(o);
+
+ return o;
+}
+
+void pa_simple_options_unref(pa_simple_options *o) {
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+
+ if (PA_REFCNT_DEC(o) > 0)
+ return;
+
+ pa_xfree(o->default_sink);
+ pa_xfree(o->default_source);
+
+ pa_xfree(o);
+}
+
+int pa_simple_options_parse(pa_simple_options *o, pa_core *c, pa_modargs *ma) {
+ pa_bool_t enabled;
+
+ pa_assert(o);
+ pa_assert(PA_REFCNT_VALUE(o) >= 1);
+ pa_assert(ma);
+
+ o->sample_spec = c->default_sample_spec;
+ if (pa_modargs_get_sample_spec_and_channel_map(ma, &o->sample_spec, &o->channel_map, PA_CHANNEL_MAP_DEFAULT) < 0) {
+ pa_log("Failed to parse sample type specification.");
+ return -1;
}
- if (p->server)
- pa_socket_server_unref(p->server);
+ pa_xfree(o->default_source);
+ o->default_source = pa_xstrdup(pa_modargs_get_value(ma, "source", NULL));
- pa_xfree(p);
+ pa_xfree(o->default_sink);
+ o->default_sink = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
+
+ enabled = o->record;
+ if (pa_modargs_get_value_boolean(ma, "record", &enabled) < 0) {
+ pa_log("record= expects a boolean argument.");
+ return -1;
+ }
+ o->record = enabled;
+
+ enabled = o->playback;
+ if (pa_modargs_get_value_boolean(ma, "playback", &enabled) < 0) {
+ pa_log("playback= expects a boolean argument.");
+ return -1;
+ }
+ o->playback = enabled;
+
+ if (!o->playback && !o->record) {
+ pa_log("neither playback nor recording enabled for protocol.");
+ return -1;
+ }
+
+ return 0;
}
diff --git a/src/pulsecore/protocol-simple.h b/src/pulsecore/protocol-simple.h
index 9d589e6..c10eabe 100644
--- a/src/pulsecore/protocol-simple.h
+++ b/src/pulsecore/protocol-simple.h
@@ -1,8 +1,6 @@
#ifndef fooprotocolsimplehfoo
#define fooprotocolsimplehfoo
-/* $Id: protocol-simple.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -29,9 +27,31 @@
#include <pulsecore/core.h>
#include <pulsecore/modargs.h>
-typedef struct pa_protocol_simple pa_protocol_simple;
+typedef struct pa_simple_protocol pa_simple_protocol;
+
+typedef struct pa_simple_options {
+ PA_REFCNT_DECLARE;
+
+ pa_module *module;
+
+ char *default_sink, *default_source;
+
+ pa_sample_spec sample_spec;
+ pa_channel_map channel_map;
+
+ pa_bool_t record:1;
+ pa_bool_t playback:1;
+} pa_simple_options;
+
+pa_simple_protocol* pa_simple_protocol_get(pa_core*core);
+pa_simple_protocol* pa_simple_protocol_ref(pa_simple_protocol *p);
+void pa_simple_protocol_unref(pa_simple_protocol *p);
+void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simple_options *o);
+void pa_simple_protocol_disconnect(pa_simple_protocol *p, pa_module *m);
-pa_protocol_simple* pa_protocol_simple_new(pa_core *core, pa_socket_server *server, pa_module *m, pa_modargs *ma);
-void pa_protocol_simple_free(pa_protocol_simple *n);
+pa_simple_options* pa_simple_options_new(void);
+pa_simple_options* pa_simple_options_ref(pa_simple_options *o);
+void pa_simple_options_unref(pa_simple_options *o);
+int pa_simple_options_parse(pa_simple_options *o, pa_core *c, pa_modargs *ma);
#endif
diff --git a/src/pulsecore/pstream-util.c b/src/pulsecore/pstream-util.c
index 3796406..f84f486 100644
--- a/src/pulsecore/pstream-util.c
+++ b/src/pulsecore/pstream-util.c
@@ -1,5 +1,3 @@
-/* $Id: pstream-util.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/pstream-util.h b/src/pulsecore/pstream-util.h
index 29e9112..ae0d79c 100644
--- a/src/pulsecore/pstream-util.h
+++ b/src/pulsecore/pstream-util.h
@@ -1,8 +1,6 @@
#ifndef foopstreamutilhfoo
#define foopstreamutilhfoo
-/* $Id: pstream-util.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c
index c35ade1..7ff8edc 100644
--- a/src/pulsecore/pstream.c
+++ b/src/pulsecore/pstream.c
@@ -1,5 +1,3 @@
-/* $Id: pstream.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -98,7 +96,7 @@ struct item_info {
/* packet info */
pa_packet *packet;
#ifdef HAVE_CREDS
- int with_creds;
+ pa_bool_t with_creds;
pa_creds creds;
#endif
@@ -121,7 +119,7 @@ struct pa_pstream {
pa_queue *send_queue;
- int dead;
+ pa_bool_t dead;
struct {
pa_pstream_descriptor descriptor;
@@ -141,7 +139,7 @@ struct pa_pstream {
size_t index;
} read;
- int use_shm;
+ pa_bool_t use_shm;
pa_memimport *import;
pa_memexport *export;
@@ -167,7 +165,7 @@ struct pa_pstream {
#ifdef HAVE_CREDS
pa_creds read_creds, write_creds;
- int read_creds_valid, send_creds_now;
+ pa_bool_t read_creds_valid, send_creds_now;
#endif
};
@@ -239,7 +237,7 @@ pa_pstream *pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_mempool *poo
PA_REFCNT_INIT(p);
p->io = io;
pa_iochannel_set_callback(io, io_callback, p);
- p->dead = 0;
+ p->dead = FALSE;
p->mainloop = m;
p->defer_event = m->defer_new(m, defer_callback, p);
@@ -269,23 +267,23 @@ pa_pstream *pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_mempool *poo
p->mempool = pool;
- p->use_shm = 0;
+ p->use_shm = FALSE;
p->export = NULL;
/* We do importing unconditionally */
p->import = pa_memimport_new(p->mempool, memimport_release_cb, p);
- pa_iochannel_socket_set_rcvbuf(io, 1024*8);
- pa_iochannel_socket_set_sndbuf(io, 1024*8);
+ pa_iochannel_socket_set_rcvbuf(io, pa_mempool_block_size_max(p->mempool));
+ pa_iochannel_socket_set_sndbuf(io, pa_mempool_block_size_max(p->mempool));
#ifdef HAVE_CREDS
- p->send_creds_now = 0;
- p->read_creds_valid = 0;
+ p->send_creds_now = FALSE;
+ p->read_creds_valid = FALSE;
#endif
return p;
}
-static void item_free(void *item, PA_GCC_UNUSED void *q) {
+static void item_free(void *item, void *q) {
struct item_info *i = item;
pa_assert(i);
@@ -374,7 +372,7 @@ void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa
i = pa_xnew(struct item_info, 1);
i->type = PA_PSTREAM_ITEM_MEMBLOCK;
- n = MIN(length, bsm);
+ n = PA_MIN(length, bsm);
i->chunk.index = chunk->index + idx;
i->chunk.length = n;
i->chunk.memblock = pa_memblock_ref(chunk->memblock);
@@ -383,7 +381,7 @@ void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa
i->offset = offset;
i->seek_mode = seek_mode;
#ifdef HAVE_CREDS
- i->with_creds = 0;
+ i->with_creds = FALSE;
#endif
pa_queue_push(p->send_queue, i);
@@ -410,7 +408,7 @@ void pa_pstream_send_release(pa_pstream *p, uint32_t block_id) {
item->type = PA_PSTREAM_ITEM_SHMRELEASE;
item->block_id = block_id;
#ifdef HAVE_CREDS
- item->with_creds = 0;
+ item->with_creds = FALSE;
#endif
pa_queue_push(p->send_queue, item);
@@ -447,7 +445,7 @@ void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id) {
item->type = PA_PSTREAM_ITEM_SHMREVOKE;
item->block_id = block_id;
#ifdef HAVE_CREDS
- item->with_creds = 0;
+ item->with_creds = FALSE;
#endif
pa_queue_push(p->send_queue, item);
@@ -490,7 +488,7 @@ static void prepare_next_write_item(pa_pstream *p) {
pa_assert(p->write.current->packet);
p->write.data = p->write.current->packet->data;
- p->write.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH] = htonl(p->write.current->packet->length);
+ p->write.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH] = htonl((uint32_t) p->write.current->packet->length);
} else if (p->write.current->type == PA_PSTREAM_ITEM_SHMRELEASE) {
@@ -504,7 +502,7 @@ static void prepare_next_write_item(pa_pstream *p) {
} else {
uint32_t flags;
- int send_payload = 1;
+ pa_bool_t send_payload = TRUE;
pa_assert(p->write.current->type == PA_PSTREAM_ITEM_MEMBLOCK);
pa_assert(p->write.current->chunk.memblock);
@@ -513,7 +511,7 @@ static void prepare_next_write_item(pa_pstream *p) {
p->write.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI] = htonl((uint32_t) (((uint64_t) p->write.current->offset) >> 32));
p->write.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_LO] = htonl((uint32_t) ((uint64_t) p->write.current->offset));
- flags = p->write.current->seek_mode & PA_FLAG_SEEKMASK;
+ flags = (uint32_t) (p->write.current->seek_mode & PA_FLAG_SEEKMASK);
if (p->use_shm) {
uint32_t block_id, shm_id;
@@ -529,7 +527,7 @@ static void prepare_next_write_item(pa_pstream *p) {
&length) >= 0) {
flags |= PA_FLAG_SHMDATA;
- send_payload = 0;
+ send_payload = FALSE;
p->write.shm_info[PA_PSTREAM_SHM_BLOCKID] = htonl(block_id);
p->write.shm_info[PA_PSTREAM_SHM_SHMID] = htonl(shm_id);
@@ -544,7 +542,7 @@ static void prepare_next_write_item(pa_pstream *p) {
}
if (send_payload) {
- p->write.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH] = htonl(p->write.current->chunk.length);
+ p->write.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH] = htonl((uint32_t) p->write.current->chunk.length);
p->write.memchunk = p->write.current->chunk;
pa_memblock_ref(p->write.memchunk.memblock);
p->write.data = NULL;
@@ -599,7 +597,7 @@ static int do_write(pa_pstream *p) {
if ((r = pa_iochannel_write_with_creds(p->io, d, l, &p->write_creds)) < 0)
goto fail;
- p->send_creds_now = 0;
+ p->send_creds_now = FALSE;
} else
#endif
@@ -609,7 +607,7 @@ static int do_write(pa_pstream *p) {
if (release_memblock)
pa_memblock_release(release_memblock);
- p->write.index += r;
+ p->write.index += (size_t) r;
if (p->write.index >= PA_PSTREAM_DESCRIPTOR_SIZE + ntohl(p->write.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH])) {
pa_assert(p->write.current);
@@ -677,7 +675,7 @@ static int do_read(pa_pstream *p) {
if (release_memblock)
pa_memblock_release(release_memblock);
- p->read.index += r;
+ p->read.index += (size_t) r;
if (p->read.index == PA_PSTREAM_DESCRIPTOR_SIZE) {
uint32_t flags, length, channel;
@@ -771,7 +769,7 @@ static int do_read(pa_pstream *p) {
if (p->read.memblock && p->recieve_memblock_callback) {
/* Is this memblock data? Than pass it to the user */
- l = (p->read.index - r) < PA_PSTREAM_DESCRIPTOR_SIZE ? p->read.index - PA_PSTREAM_DESCRIPTOR_SIZE : (size_t) r;
+ l = (p->read.index - (size_t) r) < PA_PSTREAM_DESCRIPTOR_SIZE ? (size_t) (p->read.index - PA_PSTREAM_DESCRIPTOR_SIZE) : (size_t) r;
if (l > 0) {
pa_memchunk chunk;
@@ -875,7 +873,7 @@ frame_done:
p->read.data = NULL;
#ifdef HAVE_CREDS
- p->read_creds_valid = 0;
+ p->read_creds_valid = FALSE;
#endif
return 0;
@@ -935,16 +933,16 @@ void pa_pstream_set_revoke_callback(pa_pstream *p, pa_pstream_block_id_cb_t cb,
p->release_callback_userdata = userdata;
}
-int pa_pstream_is_pending(pa_pstream *p) {
- int b;
+pa_bool_t pa_pstream_is_pending(pa_pstream *p) {
+ pa_bool_t b;
pa_assert(p);
pa_assert(PA_REFCNT_VALUE(p) > 0);
if (p->dead)
- b = 0;
+ b = FALSE;
else
- b = p->write.current || !pa_queue_is_empty(p->send_queue);
+ b = p->write.current || !pa_queue_isempty(p->send_queue);
return b;
}
@@ -971,7 +969,7 @@ void pa_pstream_unlink(pa_pstream *p) {
if (p->dead)
return;
- p->dead = 1;
+ p->dead = TRUE;
if (p->import) {
pa_memimport_free(p->import);
@@ -999,7 +997,7 @@ void pa_pstream_unlink(pa_pstream *p) {
p->recieve_memblock_callback = NULL;
}
-void pa_pstream_use_shm(pa_pstream *p, int enable) {
+void pa_pstream_enable_shm(pa_pstream *p, pa_bool_t enable) {
pa_assert(p);
pa_assert(PA_REFCNT_VALUE(p) > 0);
@@ -1018,3 +1016,10 @@ void pa_pstream_use_shm(pa_pstream *p, int enable) {
}
}
}
+
+pa_bool_t pa_pstream_get_shm(pa_pstream *p) {
+ pa_assert(p);
+ pa_assert(PA_REFCNT_VALUE(p) > 0);
+
+ return p->use_shm;
+}
diff --git a/src/pulsecore/pstream.h b/src/pulsecore/pstream.h
index f505f60..a528b25 100644
--- a/src/pulsecore/pstream.h
+++ b/src/pulsecore/pstream.h
@@ -1,8 +1,6 @@
#ifndef foopstreamhfoo
#define foopstreamhfoo
-/* $Id: pstream.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -35,6 +33,7 @@
#include <pulsecore/iochannel.h>
#include <pulsecore/memchunk.h>
#include <pulsecore/creds.h>
+#include <pulsecore/macro.h>
typedef struct pa_pstream pa_pstream;
@@ -44,8 +43,11 @@ typedef void (*pa_pstream_notify_cb_t)(pa_pstream *p, void *userdata);
typedef void (*pa_pstream_block_id_cb_t)(pa_pstream *p, uint32_t block_id, void *userdata);
pa_pstream* pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_mempool *p);
-void pa_pstream_unref(pa_pstream*p);
+
pa_pstream* pa_pstream_ref(pa_pstream*p);
+void pa_pstream_unref(pa_pstream*p);
+
+void pa_pstream_unlink(pa_pstream *p);
void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_creds *creds);
void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk);
@@ -59,10 +61,9 @@ void pa_pstream_set_die_callback(pa_pstream *p, pa_pstream_notify_cb_t cb, void
void pa_pstream_set_release_callback(pa_pstream *p, pa_pstream_block_id_cb_t cb, void *userdata);
void pa_pstream_set_revoke_callback(pa_pstream *p, pa_pstream_block_id_cb_t cb, void *userdata);
-int pa_pstream_is_pending(pa_pstream *p);
+pa_bool_t pa_pstream_is_pending(pa_pstream *p);
-void pa_pstream_use_shm(pa_pstream *p, int enable);
-
-void pa_pstream_unlink(pa_pstream *p);
+void pa_pstream_enable_shm(pa_pstream *p, pa_bool_t enable);
+pa_bool_t pa_pstream_get_shm(pa_pstream *p);
#endif
diff --git a/src/pulsecore/queue.c b/src/pulsecore/queue.c
index cbab6ff..2c73a3d 100644
--- a/src/pulsecore/queue.c
+++ b/src/pulsecore/queue.c
@@ -1,9 +1,7 @@
-/* $Id: queue.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -54,13 +52,13 @@ pa_queue* pa_queue_new(void) {
return q;
}
-void pa_queue_free(pa_queue* q, void (*destroy)(void *p, void *userdata), void *userdata) {
+void pa_queue_free(pa_queue* q, pa_free2_cb_t free_func, void *userdata) {
void *data;
pa_assert(q);
while ((data = pa_queue_pop(q)))
- if (destroy)
- destroy(data, userdata);
+ if (free_func)
+ free_func(data, userdata);
pa_assert(!q->front);
pa_assert(!q->back);
@@ -96,6 +94,7 @@ void pa_queue_push(pa_queue *q, void *p) {
void* pa_queue_pop(pa_queue *q) {
void *p;
struct queue_entry *e;
+
pa_assert(q);
if (!(e = q->front))
@@ -118,7 +117,7 @@ void* pa_queue_pop(pa_queue *q) {
return p;
}
-int pa_queue_is_empty(pa_queue *q) {
+int pa_queue_isempty(pa_queue *q) {
pa_assert(q);
return q->length == 0;
diff --git a/src/pulsecore/queue.h b/src/pulsecore/queue.h
index 72c53c1..f3cec9b 100644
--- a/src/pulsecore/queue.h
+++ b/src/pulsecore/queue.h
@@ -1,12 +1,10 @@
-#ifndef fooqueuehfoo
-#define fooqueuehfoo
-
-/* $Id: queue.h 1426 2007-02-13 15:35:19Z ossman $ */
+#ifndef foopulsecorequeuehfoo
+#define foopulsecorequeuehfoo
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -24,6 +22,8 @@
USA.
***/
+#include <pulsecore/idxset.h>
+
typedef struct pa_queue pa_queue;
/* A simple implementation of the abstract data type queue. Stores
@@ -31,12 +31,13 @@ typedef struct pa_queue pa_queue;
pa_queue* pa_queue_new(void);
-/* Free the queue and run the specified callback function for every remaining entry. The callback function may be NULL. */
-void pa_queue_free(pa_queue* q, void (*destroy)(void *p, void *userdata), void *userdata);
+/* Free the queue and run the specified callback function for every
+ * remaining entry. The callback function may be NULL. */
+void pa_queue_free(pa_queue* q, pa_free2_cb_t free_func, void *userdata);
void pa_queue_push(pa_queue *q, void *p);
void* pa_queue_pop(pa_queue *q);
-int pa_queue_is_empty(pa_queue *q);
+int pa_queue_isempty(pa_queue *q);
#endif
diff --git a/src/pulsecore/random.c b/src/pulsecore/random.c
index c72876e..518c281 100644
--- a/src/pulsecore/random.c
+++ b/src/pulsecore/random.c
@@ -1,5 +1,3 @@
-/* $Id: random.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -39,7 +37,7 @@
#include "random.h"
-static int has_whined = 0;
+static pa_bool_t has_whined = TRUE;
static const char * const devices[] = { "/dev/urandom", "/dev/random", NULL };
@@ -64,7 +62,11 @@ static int random_proper(void *ret_data, size_t length) {
while (*device) {
ret = 0;
- if ((fd = open(*device, O_RDONLY)) >= 0) {
+ if ((fd = open(*device, O_RDONLY
+#ifdef O_NOCTTY
+ | O_NOCTTY
+#endif
+ )) >= 0) {
if ((r = pa_loop_read(fd, ret_data, length, NULL)) < 0 || (size_t) r != length)
ret = -1;
@@ -75,6 +77,8 @@ static int random_proper(void *ret_data, size_t length) {
if (ret == 0)
break;
+
+ device++;
}
return ret;
@@ -85,9 +89,11 @@ void pa_random_seed(void) {
unsigned int seed;
if (random_proper(&seed, sizeof(unsigned int)) < 0) {
- if (!has_whined)
+
+ if (!has_whined) {
pa_log_warn("Failed to get proper entropy. Falling back to seeding with current time.");
- has_whined = 1;
+ has_whined = TRUE;
+ }
seed = (unsigned int) time(NULL);
}
@@ -105,9 +111,10 @@ void pa_random(void *ret_data, size_t length) {
if (random_proper(ret_data, length) >= 0)
return;
- if (!has_whined)
+ if (!has_whined) {
pa_log_warn("Failed to get proper entropy. Falling back to unsecure pseudo RNG.");
- has_whined = 1;
+ has_whined = TRUE;
+ }
for (p = ret_data, l = length; l > 0; p++, l--)
*p = (uint8_t) rand();
diff --git a/src/pulsecore/random.h b/src/pulsecore/random.h
index d64a45e..36d7f9d 100644
--- a/src/pulsecore/random.h
+++ b/src/pulsecore/random.h
@@ -1,8 +1,6 @@
#ifndef foorandomhfoo
#define foorandomhfoo
-/* $Id: random.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/refcnt.h b/src/pulsecore/refcnt.h
index c0d66c2..291f450 100644
--- a/src/pulsecore/refcnt.h
+++ b/src/pulsecore/refcnt.h
@@ -1,8 +1,6 @@
#ifndef foopulserefcnthfoo
#define foopulserefcnthfoo
-/* $Id: refcnt.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -32,6 +30,9 @@
#define PA_REFCNT_INIT(p) \
pa_atomic_store(&(p)->_ref, 1)
+#define PA_REFCNT_INIT_ZERO(p) \
+ pa_atomic_store(&(p)->_ref, 0)
+
#define PA_REFCNT_INC(p) \
pa_atomic_inc(&(p)->_ref)
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index 49f7d9a..b2d512c 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -1,5 +1,3 @@
-/* $Id: resampler.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -31,6 +29,8 @@
#include <samplerate.h>
#endif
+#include <speex/speex_resampler.h>
+
#include <liboil/liboilfuncs.h>
#include <liboil/liboil.h>
@@ -40,14 +40,12 @@
#include <pulsecore/macro.h>
#include <pulsecore/strbuf.h>
-#include "speexwrap.h"
-
#include "ffmpeg/avcodec.h"
#include "resampler.h"
/* Number of samples of extra space we allow the resamplers to return */
-#define EXTRA_SAMPLES 128
+#define EXTRA_FRAMES 128
struct pa_resampler {
pa_resample_method_t method;
@@ -72,12 +70,22 @@ struct pa_resampler {
void (*impl_free)(pa_resampler *r);
void (*impl_update_rates)(pa_resampler *r);
void (*impl_resample)(pa_resampler *r, const pa_memchunk *in, unsigned in_samples, pa_memchunk *out, unsigned *out_samples);
+ void (*impl_reset)(pa_resampler *r);
struct { /* data specific to the trivial resampler */
unsigned o_counter;
unsigned i_counter;
} trivial;
+ struct { /* data specific to the peak finder pseudo resampler */
+ unsigned o_counter;
+ unsigned i_counter;
+
+ float max_f[PA_CHANNELS_MAX];
+ int16_t max_i[PA_CHANNELS_MAX];
+
+ } peaks;
+
#ifdef HAVE_LIBSAMPLERATE
struct { /* data specific to libsamplerate */
SRC_STATE *state;
@@ -98,6 +106,7 @@ static int copy_init(pa_resampler *r);
static int trivial_init(pa_resampler*r);
static int speex_init(pa_resampler*r);
static int ffmpeg_init(pa_resampler*r);
+static int peaks_init(pa_resampler*r);
#ifdef HAVE_LIBSAMPLERATE
static int libsamplerate_init(pa_resampler*r);
#endif
@@ -143,7 +152,8 @@ static int (* const init_table[])(pa_resampler*r) = {
[PA_RESAMPLER_SPEEX_FIXED_BASE+10] = speex_init,
[PA_RESAMPLER_FFMPEG] = ffmpeg_init,
[PA_RESAMPLER_AUTO] = NULL,
- [PA_RESAMPLER_COPY] = copy_init
+ [PA_RESAMPLER_COPY] = copy_init,
+ [PA_RESAMPLER_PEAKS] = peaks_init,
};
static inline size_t sample_size(pa_sample_format_t f) {
@@ -208,6 +218,7 @@ pa_resampler* pa_resampler_new(
r->impl_free = NULL;
r->impl_update_rates = NULL;
r->impl_resample = NULL;
+ r->impl_reset = NULL;
/* Fill sample specs */
r->i_ss = *a;
@@ -240,9 +251,9 @@ pa_resampler* pa_resampler_new(
if ((method >= PA_RESAMPLER_SPEEX_FIXED_BASE && method <= PA_RESAMPLER_SPEEX_FIXED_MAX) ||
(method == PA_RESAMPLER_FFMPEG))
r->work_format = PA_SAMPLE_S16NE;
- else if (method == PA_RESAMPLER_TRIVIAL || method == PA_RESAMPLER_COPY) {
+ else if (method == PA_RESAMPLER_TRIVIAL || method == PA_RESAMPLER_COPY || method == PA_RESAMPLER_PEAKS) {
- if (r->map_required || a->format != b->format) {
+ if (r->map_required || a->format != b->format || method == PA_RESAMPLER_PEAKS) {
if (a->format == PA_SAMPLE_S32NE || a->format == PA_SAMPLE_S32RE ||
a->format == PA_SAMPLE_FLOAT32NE || a->format == PA_SAMPLE_FLOAT32RE ||
@@ -345,6 +356,12 @@ size_t pa_resampler_request(pa_resampler *r, size_t out_length) {
return (((out_length / r->o_fz)*r->i_ss.rate)/r->o_ss.rate) * r->i_fz;
}
+size_t pa_resampler_result(pa_resampler *r, size_t in_length) {
+ pa_assert(r);
+
+ return (((in_length / r->i_fz)*r->o_ss.rate)/r->i_ss.rate) * r->o_fz;
+}
+
size_t pa_resampler_max_block_size(pa_resampler *r) {
size_t block_size_max;
pa_sample_spec ss;
@@ -356,22 +373,24 @@ size_t pa_resampler_max_block_size(pa_resampler *r) {
/* We deduce the "largest" sample spec we're using during the
* conversion */
- ss = r->i_ss;
- if (r->o_ss.channels > ss.channels)
- ss.channels = r->o_ss.channels;
+ ss.channels = (uint8_t) (PA_MAX(r->i_ss.channels, r->o_ss.channels));
/* We silently assume that the format enum is ordered by size */
- if (r->o_ss.format > ss.format)
- ss.format = r->o_ss.format;
- if (r->work_format > ss.format)
- ss.format = r->work_format;
+ ss.format = PA_MAX(r->i_ss.format, r->o_ss.format);
+ ss.format = PA_MAX(ss.format, r->work_format);
- if (r->o_ss.rate > ss.rate)
- ss.rate = r->o_ss.rate;
+ ss.rate = PA_MAX(r->i_ss.rate, r->o_ss.rate);
fs = pa_frame_size(&ss);
- return (((block_size_max/fs + EXTRA_SAMPLES)*r->i_ss.rate)/ss.rate)*r->i_fz;
+ return (((block_size_max/fs - EXTRA_FRAMES)*r->i_ss.rate)/ss.rate)*r->i_fz;
+}
+
+void pa_resampler_reset(pa_resampler *r) {
+ pa_assert(r);
+
+ if (r->impl_reset)
+ r->impl_reset(r);
}
pa_resample_method_t pa_resampler_get_method(pa_resampler *r) {
@@ -411,7 +430,8 @@ static const char * const resample_methods[] = {
"speex-fixed-10",
"ffmpeg",
"auto",
- "copy"
+ "copy",
+ "peaks"
};
const char *pa_resample_method_to_string(pa_resample_method_t m) {
@@ -622,7 +642,7 @@ static void calc_map_table(pa_resampler *r) {
if (n > 0)
for (ic = 0; ic < r->i_ss.channels; ic++)
if (on_left(r->i_cm.map[ic])) {
- r->map_table[oc][ic] = 1.0 / n;
+ r->map_table[oc][ic] = 1.0f / (float) n;
ic_connected[ic] = TRUE;
}
@@ -643,7 +663,7 @@ static void calc_map_table(pa_resampler *r) {
if (n > 0)
for (ic = 0; ic < r->i_ss.channels; ic++)
if (on_right(r->i_cm.map[ic])) {
- r->map_table[oc][ic] = 1.0 / n;
+ r->map_table[oc][ic] = 1.0f / (float) n;
ic_connected[ic] = TRUE;
}
@@ -664,7 +684,7 @@ static void calc_map_table(pa_resampler *r) {
if (n > 0) {
for (ic = 0; ic < r->i_ss.channels; ic++)
if (on_center(r->i_cm.map[ic])) {
- r->map_table[oc][ic] = 1.0 / n;
+ r->map_table[oc][ic] = 1.0f / (float) n;
ic_connected[ic] = TRUE;
}
} else {
@@ -681,7 +701,7 @@ static void calc_map_table(pa_resampler *r) {
if (n > 0)
for (ic = 0; ic < r->i_ss.channels; ic++)
if (on_left(r->i_cm.map[ic]) || on_right(r->i_cm.map[ic])) {
- r->map_table[oc][ic] = 1.0 / n;
+ r->map_table[oc][ic] = 1.0f / (float) n;
ic_connected[ic] = TRUE;
}
@@ -696,7 +716,11 @@ static void calc_map_table(pa_resampler *r) {
* channels for LFE. */
for (ic = 0; ic < r->i_ss.channels; ic++) {
- r->map_table[oc][ic] = 1.0 / r->i_ss.channels;
+
+ if (!(r->flags & PA_RESAMPLER_NO_LFE))
+ r->map_table[oc][ic] = 1.0f / (float) r->i_ss.channels;
+ else
+ r->map_table[oc][ic] = 0;
/* Please note that a channel connected to LFE
* doesn't really count as connected. */
@@ -743,12 +767,12 @@ static void calc_map_table(pa_resampler *r) {
for (ic = 0; ic < r->i_ss.channels; ic++) {
if (ic_connected[ic]) {
- r->map_table[oc][ic] *= .9;
+ r->map_table[oc][ic] *= .9f;
continue;
}
if (on_left(r->i_cm.map[ic]))
- r->map_table[oc][ic] = .1 / ic_unconnected_left;
+ r->map_table[oc][ic] = .1f / (float) ic_unconnected_left;
}
}
}
@@ -768,12 +792,12 @@ static void calc_map_table(pa_resampler *r) {
for (ic = 0; ic < r->i_ss.channels; ic++) {
if (ic_connected[ic]) {
- r->map_table[oc][ic] *= .9;
+ r->map_table[oc][ic] *= .9f;
continue;
}
if (on_right(r->i_cm.map[ic]))
- r->map_table[oc][ic] = .1 / ic_unconnected_right;
+ r->map_table[oc][ic] = .1f / (float) ic_unconnected_right;
}
}
}
@@ -794,12 +818,12 @@ static void calc_map_table(pa_resampler *r) {
for (ic = 0; ic < r->i_ss.channels; ic++) {
if (ic_connected[ic]) {
- r->map_table[oc][ic] *= .9;
+ r->map_table[oc][ic] *= .9f;
continue;
}
if (on_center(r->i_cm.map[ic])) {
- r->map_table[oc][ic] = .1 / ic_unconnected_center;
+ r->map_table[oc][ic] = .1f / (float) ic_unconnected_center;
mixed_in = TRUE;
}
}
@@ -820,18 +844,18 @@ static void calc_map_table(pa_resampler *r) {
for (ic = 0; ic < r->i_ss.channels; ic++) {
if (ic_connected[ic]) {
- r->map_table[oc][ic] *= .75;
+ r->map_table[oc][ic] *= .75f;
continue;
}
if (on_center(r->i_cm.map[ic]))
- r->map_table[oc][ic] = .375 / ic_unconnected_center;
+ r->map_table[oc][ic] = .375f / (float) ic_unconnected_center;
}
}
}
}
- if (ic_unconnected_lfe > 0) {
+ if (ic_unconnected_lfe > 0 && !(r->flags & PA_RESAMPLER_NO_LFE)) {
/* OK, so there is an unconnected LFE channel. Let's mix
* it into all channels, with factor 0.375 */
@@ -842,7 +866,7 @@ static void calc_map_table(pa_resampler *r) {
continue;
for (oc = 0; oc < r->o_ss.channels; oc++)
- r->map_table[oc][ic] = 0.375 / ic_unconnected_lfe;
+ r->map_table[oc][ic] = 0.375f / (float) ic_unconnected_lfe;
}
}
}
@@ -885,7 +909,7 @@ static pa_memchunk* convert_to_work_format(pa_resampler *r, pa_memchunk *input)
if (!r->to_work_format_func || !input->length)
return input;
- n_samples = (input->length / r->i_fz) * r->i_ss.channels;
+ n_samples = (unsigned) ((input->length / r->i_fz) * r->i_ss.channels);
r->buf1.index = 0;
r->buf1.length = r->w_sz * n_samples;
@@ -954,7 +978,7 @@ static pa_memchunk *remap_channels(pa_resampler *r, pa_memchunk *input) {
if (!r->map_required || !input->length)
return input;
- in_n_samples = input->length / r->w_sz;
+ in_n_samples = (unsigned) (input->length / r->w_sz);
n_frames = in_n_samples / r->i_ss.channels;
out_n_samples = n_frames * r->o_ss.channels;
@@ -974,8 +998,8 @@ static pa_memchunk *remap_channels(pa_resampler *r, pa_memchunk *input) {
memset(dst, 0, r->buf2.length);
- o_skip = r->w_sz * r->o_ss.channels;
- i_skip = r->w_sz * r->i_ss.channels;
+ o_skip = (int) (r->w_sz * r->o_ss.channels);
+ i_skip = (int) (r->w_sz * r->i_ss.channels);
switch (r->work_format) {
case PA_SAMPLE_FLOAT32NE:
@@ -993,7 +1017,7 @@ static pa_memchunk *remap_channels(pa_resampler *r, pa_memchunk *input) {
(float*) dst + oc, o_skip,
(float*) dst + oc, o_skip,
(float*) src + ic, i_skip,
- n_frames,
+ (int) n_frames,
&one, &r->map_table[oc][ic]);
}
}
@@ -1017,7 +1041,7 @@ static pa_memchunk *remap_channels(pa_resampler *r, pa_memchunk *input) {
(int16_t*) dst + oc, o_skip,
(int16_t*) dst + oc, o_skip,
(int16_t*) src + ic, i_skip,
- n_frames,
+ (int) n_frames,
&one, &one);
} else
@@ -1026,8 +1050,8 @@ static pa_memchunk *remap_channels(pa_resampler *r, pa_memchunk *input) {
(int16_t*) dst + oc, o_skip,
(int16_t*) dst + oc, o_skip,
(int16_t*) src + ic, i_skip,
- n_frames,
- 1.0, r->map_table[oc][ic]);
+ (int) n_frames,
+ 1.0f, r->map_table[oc][ic]);
}
}
@@ -1057,10 +1081,10 @@ static pa_memchunk *resample(pa_resampler *r, pa_memchunk *input) {
if (!r->impl_resample || !input->length)
return input;
- in_n_samples = input->length / r->w_sz;
- in_n_frames = in_n_samples / r->o_ss.channels;
+ in_n_samples = (unsigned) (input->length / r->w_sz);
+ in_n_frames = (unsigned) (in_n_samples / r->o_ss.channels);
- out_n_frames = ((in_n_frames*r->o_ss.rate)/r->i_ss.rate)+EXTRA_SAMPLES;
+ out_n_frames = ((in_n_frames*r->o_ss.rate)/r->i_ss.rate)+EXTRA_FRAMES;
out_n_samples = out_n_frames * r->o_ss.channels;
r->buf3.index = 0;
@@ -1092,8 +1116,8 @@ static pa_memchunk *convert_from_work_format(pa_resampler *r, pa_memchunk *input
if (!r->from_work_format_func || !input->length)
return input;
- n_samples = input->length / r->w_sz;
- n_frames = n_samples / r->o_ss.channels;
+ n_samples = (unsigned) (input->length / r->w_sz);
+ n_frames = n_samples / r->o_ss.channels;
r->buf4.index = 0;
r->buf4.length = r->o_fz * n_frames;
@@ -1158,10 +1182,10 @@ static void libsamplerate_resample(pa_resampler *r, const pa_memchunk *input, un
memset(&data, 0, sizeof(data));
data.data_in = (float*) ((uint8_t*) pa_memblock_acquire(input->memblock) + input->index);
- data.input_frames = in_n_frames;
+ data.input_frames = (long int) in_n_frames;
data.data_out = (float*) ((uint8_t*) pa_memblock_acquire(output->memblock) + output->index);
- data.output_frames = *out_n_frames;
+ data.output_frames = (long int) *out_n_frames;
data.src_ratio = (double) r->o_ss.rate / r->i_ss.rate;
data.end_of_input = 0;
@@ -1172,7 +1196,7 @@ static void libsamplerate_resample(pa_resampler *r, const pa_memchunk *input, un
pa_memblock_release(input->memblock);
pa_memblock_release(output->memblock);
- *out_n_frames = data.output_frames_gen;
+ *out_n_frames = (unsigned) data.output_frames_gen;
}
static void libsamplerate_update_rates(pa_resampler *r) {
@@ -1181,6 +1205,12 @@ static void libsamplerate_update_rates(pa_resampler *r) {
pa_assert_se(src_set_ratio(r->src.state, (double) r->o_ss.rate / r->i_ss.rate) == 0);
}
+static void libsamplerate_reset(pa_resampler *r) {
+ pa_assert(r);
+
+ pa_assert_se(src_reset(r->src.state) == 0);
+}
+
static void libsamplerate_free(pa_resampler *r) {
pa_assert(r);
@@ -1199,6 +1229,7 @@ static int libsamplerate_init(pa_resampler *r) {
r->impl_free = libsamplerate_free;
r->impl_update_rates = libsamplerate_update_rates;
r->impl_resample = libsamplerate_resample;
+ r->impl_reset = libsamplerate_reset;
return 0;
}
@@ -1218,7 +1249,7 @@ static void speex_resample_float(pa_resampler *r, const pa_memchunk *input, unsi
in = (float*) ((uint8_t*) pa_memblock_acquire(input->memblock) + input->index);
out = (float*) ((uint8_t*) pa_memblock_acquire(output->memblock) + output->index);
- pa_assert_se(paspfl_resampler_process_interleaved_float(r->speex.state, in, &inf, out, &outf) == 0);
+ pa_assert_se(speex_resampler_process_interleaved_float(r->speex.state, in, &inf, out, &outf) == 0);
pa_memblock_release(input->memblock);
pa_memblock_release(output->memblock);
@@ -1239,7 +1270,7 @@ static void speex_resample_int(pa_resampler *r, const pa_memchunk *input, unsign
in = (int16_t*) ((uint8_t*) pa_memblock_acquire(input->memblock) + input->index);
out = (int16_t*) ((uint8_t*) pa_memblock_acquire(output->memblock) + output->index);
- pa_assert_se(paspfx_resampler_process_interleaved_int(r->speex.state, in, &inf, out, &outf) == 0);
+ pa_assert_se(speex_resampler_process_interleaved_int(r->speex.state, in, &inf, out, &outf) == 0);
pa_memblock_release(input->memblock);
pa_memblock_release(output->memblock);
@@ -1251,12 +1282,13 @@ static void speex_resample_int(pa_resampler *r, const pa_memchunk *input, unsign
static void speex_update_rates(pa_resampler *r) {
pa_assert(r);
- if (r->method >= PA_RESAMPLER_SPEEX_FIXED_BASE && r->method <= PA_RESAMPLER_SPEEX_FIXED_MAX)
- pa_assert_se(paspfx_resampler_set_rate(r->speex.state, r->i_ss.rate, r->o_ss.rate) == 0);
- else {
- pa_assert(r->method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && r->method <= PA_RESAMPLER_SPEEX_FLOAT_MAX);
- pa_assert_se(paspfl_resampler_set_rate(r->speex.state, r->i_ss.rate, r->o_ss.rate) == 0);
- }
+ pa_assert_se(speex_resampler_set_rate(r->speex.state, r->i_ss.rate, r->o_ss.rate) == 0);
+}
+
+static void speex_reset(pa_resampler *r) {
+ pa_assert(r);
+
+ pa_assert_se(speex_resampler_reset_mem(r->speex.state) == 0);
}
static void speex_free(pa_resampler *r) {
@@ -1265,12 +1297,7 @@ static void speex_free(pa_resampler *r) {
if (!r->speex.state)
return;
- if (r->method >= PA_RESAMPLER_SPEEX_FIXED_BASE && r->method <= PA_RESAMPLER_SPEEX_FIXED_MAX)
- paspfx_resampler_destroy(r->speex.state);
- else {
- pa_assert(r->method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && r->method <= PA_RESAMPLER_SPEEX_FLOAT_MAX);
- paspfl_resampler_destroy(r->speex.state);
- }
+ speex_resampler_destroy(r->speex.state);
}
static int speex_init(pa_resampler *r) {
@@ -1280,28 +1307,25 @@ static int speex_init(pa_resampler *r) {
r->impl_free = speex_free;
r->impl_update_rates = speex_update_rates;
+ r->impl_reset = speex_reset;
if (r->method >= PA_RESAMPLER_SPEEX_FIXED_BASE && r->method <= PA_RESAMPLER_SPEEX_FIXED_MAX) {
- q = r->method - PA_RESAMPLER_SPEEX_FIXED_BASE;
-
- pa_log_info("Choosing speex quality setting %i.", q);
-
- if (!(r->speex.state = paspfx_resampler_init(r->o_ss.channels, r->i_ss.rate, r->o_ss.rate, q, &err)))
- return -1;
+ q = r->method - PA_RESAMPLER_SPEEX_FIXED_BASE;
r->impl_resample = speex_resample_int;
+
} else {
pa_assert(r->method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && r->method <= PA_RESAMPLER_SPEEX_FLOAT_MAX);
- q = r->method - PA_RESAMPLER_SPEEX_FLOAT_BASE;
-
- pa_log_info("Choosing speex quality setting %i.", q);
-
- if (!(r->speex.state = paspfl_resampler_init(r->o_ss.channels, r->i_ss.rate, r->o_ss.rate, q, &err)))
- return -1;
+ q = r->method - PA_RESAMPLER_SPEEX_FLOAT_BASE;
r->impl_resample = speex_resample_float;
}
+ pa_log_info("Choosing speex quality setting %i.", q);
+
+ if (!(r->speex.state = speex_resampler_init(r->o_ss.channels, r->i_ss.rate, r->o_ss.rate, q, &err)))
+ return -1;
+
return 0;
}
@@ -1334,7 +1358,7 @@ static void trivial_resample(pa_resampler *r, const pa_memchunk *input, unsigned
pa_assert(o_index * fz < pa_memblock_get_length(output->memblock));
oil_memcpy((uint8_t*) dst + fz * o_index,
- (uint8_t*) src + fz * j, fz);
+ (uint8_t*) src + fz * j, (int) fz);
}
pa_memblock_release(input->memblock);
@@ -1353,7 +1377,7 @@ static void trivial_resample(pa_resampler *r, const pa_memchunk *input, unsigned
}
}
-static void trivial_update_rates(pa_resampler *r) {
+static void trivial_update_rates_or_reset(pa_resampler *r) {
pa_assert(r);
r->trivial.i_counter = 0;
@@ -1366,8 +1390,126 @@ static int trivial_init(pa_resampler*r) {
r->trivial.o_counter = r->trivial.i_counter = 0;
r->impl_resample = trivial_resample;
- r->impl_update_rates = trivial_update_rates;
- r->impl_free = NULL;
+ r->impl_update_rates = trivial_update_rates_or_reset;
+ r->impl_reset = trivial_update_rates_or_reset;
+
+ return 0;
+}
+
+/* Peak finder implementation */
+
+static void peaks_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
+ size_t fz;
+ unsigned o_index;
+ void *src, *dst;
+ unsigned start = 0;
+
+ pa_assert(r);
+ pa_assert(input);
+ pa_assert(output);
+ pa_assert(out_n_frames);
+
+ fz = r->w_sz * r->o_ss.channels;
+
+ src = (uint8_t*) pa_memblock_acquire(input->memblock) + input->index;
+ dst = (uint8_t*) pa_memblock_acquire(output->memblock) + output->index;
+
+ for (o_index = 0;; o_index++, r->peaks.o_counter++) {
+ unsigned j;
+
+ j = ((r->peaks.o_counter * r->i_ss.rate) / r->o_ss.rate);
+
+ if (j > r->peaks.i_counter)
+ j -= r->peaks.i_counter;
+ else
+ j = 0;
+
+ pa_assert(o_index * fz < pa_memblock_get_length(output->memblock));
+
+ if (r->work_format == PA_SAMPLE_S16NE) {
+ unsigned i, c;
+ int16_t *s = (int16_t*) ((uint8_t*) src + fz * start);
+ int16_t *d = (int16_t*) ((uint8_t*) dst + fz * o_index);
+
+ for (i = start; i <= j && i < in_n_frames; i++)
+
+ for (c = 0; c < r->o_ss.channels; c++, s++) {
+ int16_t n;
+
+ n = (int16_t) (*s < 0 ? -*s : *s);
+
+ if (PA_UNLIKELY(n > r->peaks.max_i[c]))
+ r->peaks.max_i[c] = n;
+ }
+
+ if (i >= in_n_frames)
+ break;
+
+ for (c = 0; c < r->o_ss.channels; c++, d++) {
+ *d = r->peaks.max_i[c];
+ r->peaks.max_i[c] = 0;
+ }
+
+ } else {
+ unsigned i, c;
+ float *s = (float*) ((uint8_t*) src + fz * start);
+ float *d = (float*) ((uint8_t*) dst + fz * o_index);
+
+ pa_assert(r->work_format == PA_SAMPLE_FLOAT32NE);
+
+ for (i = start; i <= j && i < in_n_frames; i++)
+ for (c = 0; c < r->o_ss.channels; c++, s++) {
+ float n = fabsf(*s);
+
+ if (n > r->peaks.max_f[c])
+ r->peaks.max_f[c] = n;
+ }
+
+ if (i >= in_n_frames)
+ break;
+
+ for (c = 0; c < r->o_ss.channels; c++, d++) {
+ *d = r->peaks.max_f[c];
+ r->peaks.max_f[c] = 0;
+ }
+ }
+
+ start = j;
+ }
+
+ pa_memblock_release(input->memblock);
+ pa_memblock_release(output->memblock);
+
+ *out_n_frames = o_index;
+
+ r->peaks.i_counter += in_n_frames;
+
+ /* Normalize counters */
+ while (r->peaks.i_counter >= r->i_ss.rate) {
+ pa_assert(r->peaks.o_counter >= r->o_ss.rate);
+
+ r->peaks.i_counter -= r->i_ss.rate;
+ r->peaks.o_counter -= r->o_ss.rate;
+ }
+}
+
+static void peaks_update_rates_or_reset(pa_resampler *r) {
+ pa_assert(r);
+
+ r->peaks.i_counter = 0;
+ r->peaks.o_counter = 0;
+}
+
+static int peaks_init(pa_resampler*r) {
+ pa_assert(r);
+
+ r->peaks.o_counter = r->peaks.i_counter = 0;
+ memset(r->peaks.max_i, 0, sizeof(r->peaks.max_i));
+ memset(r->peaks.max_f, 0, sizeof(r->peaks.max_f));
+
+ r->impl_resample = peaks_resample;
+ r->impl_update_rates = peaks_update_rates_or_reset;
+ r->impl_reset = peaks_update_rates_or_reset;
return 0;
}
@@ -1394,7 +1536,7 @@ static void ffmpeg_resample(pa_resampler *r, const pa_memchunk *input, unsigned
p = pa_memblock_acquire(b);
/* Copy the remaining data into it */
- l = r->ffmpeg.buf[c].length;
+ l = (unsigned) r->ffmpeg.buf[c].length;
if (r->ffmpeg.buf[c].memblock) {
t = (int16_t*) ((uint8_t*) pa_memblock_acquire(r->ffmpeg.buf[c].memblock) + r->ffmpeg.buf[c].index);
memcpy(p, t, l);
@@ -1414,18 +1556,18 @@ static void ffmpeg_resample(pa_resampler *r, const pa_memchunk *input, unsigned
pa_memblock_release(input->memblock);
/* Calculate the resulting number of frames */
- in = in_n_frames + l / sizeof(int16_t);
+ in = (unsigned) in_n_frames + l / (unsigned) sizeof(int16_t);
/* Allocate buffer for the result */
w = pa_memblock_new(r->mempool, *out_n_frames * sizeof(int16_t));
q = pa_memblock_acquire(w);
/* Now, resample */
- used_frames = av_resample(r->ffmpeg.state,
- q, p,
- &consumed_frames,
- in, *out_n_frames,
- c >= (unsigned) r->o_ss.channels-1);
+ used_frames = (unsigned) av_resample(r->ffmpeg.state,
+ q, p,
+ &consumed_frames,
+ (int) in, (int) *out_n_frames,
+ c >= (unsigned) (r->o_ss.channels-1));
pa_memblock_release(b);
@@ -1433,8 +1575,8 @@ static void ffmpeg_resample(pa_resampler *r, const pa_memchunk *input, unsigned
pa_assert(consumed_frames <= (int) in);
if (consumed_frames < (int) in) {
r->ffmpeg.buf[c].memblock = b;
- r->ffmpeg.buf[c].index = consumed_frames * sizeof(int16_t);
- r->ffmpeg.buf[c].length = (in - consumed_frames) * sizeof(int16_t);
+ r->ffmpeg.buf[c].index = (size_t) consumed_frames * sizeof(int16_t);
+ r->ffmpeg.buf[c].length = (size_t) (in - (unsigned) consumed_frames) * sizeof(int16_t);
} else
pa_memblock_unref(b);
@@ -1476,7 +1618,7 @@ static int ffmpeg_init(pa_resampler *r) {
* internally only uses these hardcoded values, so let's use them
* here for now as well until ffmpeg makes this configurable. */
- if (!(r->ffmpeg.state = av_resample_init(r->o_ss.rate, r->i_ss.rate, 16, 10, 0, 0.8)))
+ if (!(r->ffmpeg.state = av_resample_init((int) r->o_ss.rate, (int) r->i_ss.rate, 16, 10, 0, 0.8)))
return -1;
r->impl_free = ffmpeg_free;
@@ -1495,9 +1637,5 @@ static int copy_init(pa_resampler *r) {
pa_assert(r->o_ss.rate == r->i_ss.rate);
- r->impl_free = NULL;
- r->impl_resample = NULL;
- r->impl_update_rates = NULL;
-
return 0;
}
diff --git a/src/pulsecore/resampler.h b/src/pulsecore/resampler.h
index 5d4373c..87110cc 100644
--- a/src/pulsecore/resampler.h
+++ b/src/pulsecore/resampler.h
@@ -1,8 +1,6 @@
#ifndef fooresamplerhfoo
#define fooresamplerhfoo
-/* $Id: resampler.h 2044 2007-11-11 02:30:59Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -46,13 +44,15 @@ typedef enum pa_resample_method {
PA_RESAMPLER_FFMPEG,
PA_RESAMPLER_AUTO, /* automatic select based on sample format */
PA_RESAMPLER_COPY,
+ PA_RESAMPLER_PEAKS,
PA_RESAMPLER_MAX
} pa_resample_method_t;
typedef enum pa_resample_flags {
- PA_RESAMPLER_VARIABLE_RATE = 1,
- PA_RESAMPLER_NO_REMAP = 2, /* implies NO_REMIX */
- PA_RESAMPLER_NO_REMIX = 4
+ PA_RESAMPLER_VARIABLE_RATE = 0x0001U,
+ PA_RESAMPLER_NO_REMAP = 0x0002U, /* implies NO_REMIX */
+ PA_RESAMPLER_NO_REMIX = 0x0004U,
+ PA_RESAMPLER_NO_LFE = 0x0008U
} pa_resample_flags_t;
pa_resampler* pa_resampler_new(
@@ -69,6 +69,9 @@ void pa_resampler_free(pa_resampler *r);
/* Returns the size of an input memory block which is required to return the specified amount of output data */
size_t pa_resampler_request(pa_resampler *r, size_t out_length);
+/* Inverse of pa_resampler_request() */
+size_t pa_resampler_result(pa_resampler *r, size_t in_length);
+
/* Returns the maximum size of input blocks we can process without needing bounce buffers larger than the mempool tile size. */
size_t pa_resampler_max_block_size(pa_resampler *r);
@@ -81,6 +84,9 @@ void pa_resampler_set_input_rate(pa_resampler *r, uint32_t rate);
/* Change the output rate of the resampler object */
void pa_resampler_set_output_rate(pa_resampler *r, uint32_t rate);
+/* Reinitialize state of the resampler, possibly due to seeking or other discontinuities */
+void pa_resampler_reset(pa_resampler *r);
+
/* Return the resampling method of the resampler object */
pa_resample_method_t pa_resampler_get_method(pa_resampler *r);
@@ -93,4 +99,5 @@ const char *pa_resample_method_to_string(pa_resample_method_t m);
/* Return 1 when the specified resampling method is supported */
int pa_resample_method_supported(pa_resample_method_t m);
+
#endif
diff --git a/src/pulsecore/rtclock.c b/src/pulsecore/rtclock.c
index 07d776e..f33de83 100644
--- a/src/pulsecore/rtclock.c
+++ b/src/pulsecore/rtclock.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -96,3 +94,24 @@ pa_usec_t pa_rtclock_usec(void) {
return pa_timeval_load(pa_rtclock_get(&tv));
}
+
+struct timeval* pa_rtclock_from_wallclock(struct timeval *tv) {
+
+#ifdef HAVE_CLOCK_GETTIME
+ struct timeval wc_now, rt_now;
+
+ pa_gettimeofday(&wc_now);
+ pa_rtclock_get(&rt_now);
+
+ pa_assert(tv);
+
+ if (pa_timeval_cmp(&wc_now, tv) < 0)
+ pa_timeval_add(&rt_now, pa_timeval_diff(tv, &wc_now));
+ else
+ pa_timeval_sub(&rt_now, pa_timeval_diff(&wc_now, tv));
+
+ *tv = rt_now;
+#endif
+
+ return tv;
+}
diff --git a/src/pulsecore/rtclock.h b/src/pulsecore/rtclock.h
index f0360af..aa2cdac 100644
--- a/src/pulsecore/rtclock.h
+++ b/src/pulsecore/rtclock.h
@@ -1,8 +1,6 @@
#ifndef foopulsertclockhfoo
#define foopulsertclockhfoo
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -25,6 +23,7 @@
***/
#include <pulsecore/macro.h>
+#include <pulse/sample.h>
struct timeval;
@@ -40,4 +39,6 @@ pa_bool_t pa_rtclock_hrtimer(void);
/* timer with a resolution better than this are considered high-resolution */
#define PA_HRTIMER_THRESHOLD_USEC 10
+struct timeval* pa_rtclock_from_wallclock(struct timeval *tv);
+
#endif
diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c
index 8300826..543262b 100644
--- a/src/pulsecore/rtpoll.c
+++ b/src/pulsecore/rtpoll.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -63,7 +61,6 @@ struct pa_rtpoll {
pa_bool_t timer_enabled;
struct timeval next_elapse;
- pa_usec_t period;
pa_bool_t scan_for_dead;
pa_bool_t running, installed, rebuild_needed, quit;
@@ -72,6 +69,7 @@ struct pa_rtpoll {
int rtsig;
sigset_t sigset_unblocked;
timer_t timer;
+ pa_bool_t timer_armed;
#ifdef __linux__
pa_bool_t dont_use_ppoll;
#endif
@@ -99,7 +97,7 @@ struct pa_rtpoll_item {
PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree);
-static void signal_handler_noop(int s) { }
+static void signal_handler_noop(int s) { /* write(2, "signal\n", 7); */ }
pa_rtpoll *pa_rtpoll_new(void) {
pa_rtpoll *p;
@@ -131,6 +129,7 @@ pa_rtpoll *pa_rtpoll_new(void) {
p->rtsig = -1;
sigemptyset(&p->sigset_unblocked);
p->timer = (timer_t) -1;
+ p->timer_armed = FALSE;
#endif
@@ -139,7 +138,6 @@ pa_rtpoll *pa_rtpoll_new(void) {
p->pollfd2 = pa_xnew(struct pollfd, p->n_pollfd_alloc);
p->n_pollfd_used = 0;
- p->period = 0;
memset(&p->next_elapse, 0, sizeof(p->next_elapse));
p->timer_enabled = FALSE;
@@ -368,15 +366,13 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) {
if (p->rebuild_needed)
rtpoll_rebuild(p);
+ memset(&timeout, 0, sizeof(timeout));
+
/* Calculate timeout */
- if (!wait || p->quit) {
- timeout.tv_sec = 0;
- timeout.tv_usec = 0;
- } else if (p->timer_enabled) {
+ if (wait && !p->quit && p->timer_enabled) {
struct timeval now;
pa_rtclock_get(&now);
- memset(&timeout, 0, sizeof(timeout));
if (pa_timeval_cmp(&p->next_elapse, &now) > 0)
pa_timeval_add(&timeout, pa_timeval_diff(&p->next_elapse, &now));
}
@@ -391,14 +387,14 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) {
struct timespec ts;
ts.tv_sec = timeout.tv_sec;
ts.tv_nsec = timeout.tv_usec * 1000;
- r = ppoll(p->pollfd, p->n_pollfd_used, p->timer_enabled ? &ts : NULL, p->rtsig < 0 ? NULL : &p->sigset_unblocked);
+ r = ppoll(p->pollfd, p->n_pollfd_used, (!wait || p->quit || p->timer_enabled) ? &ts : NULL, p->rtsig < 0 ? NULL : &p->sigset_unblocked);
}
#ifdef __linux__
else
#endif
#endif
- r = poll(p->pollfd, p->n_pollfd_used, p->timer_enabled ? (timeout.tv_sec*1000) + (timeout.tv_usec / 1000) : -1);
+ r = poll(p->pollfd, p->n_pollfd_used, (!wait || p->quit || p->timer_enabled) ? (int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)) : -1);
if (r < 0) {
if (errno == EAGAIN || errno == EINTR)
@@ -409,21 +405,6 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) {
reset_all_revents(p);
}
- if (p->timer_enabled) {
- if (p->period > 0) {
- struct timeval now;
- pa_rtclock_get(&now);
-
- pa_timeval_add(&p->next_elapse, p->period);
-
- /* Guarantee that the next timeout will happen in the future */
- if (pa_timeval_cmp(&p->next_elapse, &now) < 0)
- pa_timeval_add(&p->next_elapse, (pa_timeval_diff(&now, &p->next_elapse) / p->period + 1) * p->period);
-
- } else
- p->timer_enabled = FALSE;
- }
-
/* Let's tell everyone that we left the sleep */
for (i = p->items; i && i->priority < PA_RTPOLL_NEVER; i = i->next) {
@@ -481,26 +462,35 @@ static void update_timer(pa_rtpoll *p) {
if (p->timer != (timer_t) -1) {
struct itimerspec its;
- memset(&its, 0, sizeof(its));
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 };
+ sigset_t ss;
+
+ if (p->timer_armed) {
+ /* First disarm timer */
+ memset(&its, 0, sizeof(its));
+ pa_assert_se(timer_settime(p->timer, TIMER_ABSTIME, &its, NULL) == 0);
+
+ /* Remove a signal that might be waiting in the signal q */
+ pa_assert_se(sigemptyset(&ss) == 0);
+ pa_assert_se(sigaddset(&ss, p->rtsig) == 0);
+ sigtimedwait(&ss, NULL, &ts);
+ }
+ /* And install the new timer */
if (p->timer_enabled) {
+ memset(&its, 0, sizeof(its));
+
its.it_value.tv_sec = p->next_elapse.tv_sec;
its.it_value.tv_nsec = p->next_elapse.tv_usec*1000;
/* Make sure that 0,0 is not understood as
* "disarming" */
- if (its.it_value.tv_sec == 0)
+ if (its.it_value.tv_sec == 0 && its.it_value.tv_nsec == 0)
its.it_value.tv_nsec = 1;
-
- if (p->period > 0) {
- struct timeval tv;
- pa_timeval_store(&tv, p->period);
- its.it_interval.tv_sec = tv.tv_sec;
- its.it_interval.tv_nsec = tv.tv_usec*1000;
- }
+ pa_assert_se(timer_settime(p->timer, TIMER_ABSTIME, &its, NULL) == 0);
}
- pa_assert_se(timer_settime(p->timer, TIMER_ABSTIME, &its, NULL) == 0);
+ p->timer_armed = p->timer_enabled;
}
#ifdef __linux__
@@ -510,23 +500,10 @@ static void update_timer(pa_rtpoll *p) {
#endif
}
-void pa_rtpoll_set_timer_absolute(pa_rtpoll *p, const struct timeval *ts) {
+void pa_rtpoll_set_timer_absolute(pa_rtpoll *p, pa_usec_t usec) {
pa_assert(p);
- pa_assert(ts);
- p->next_elapse = *ts;
- p->period = 0;
- p->timer_enabled = TRUE;
-
- update_timer(p);
-}
-
-void pa_rtpoll_set_timer_periodic(pa_rtpoll *p, pa_usec_t usec) {
- pa_assert(p);
-
- p->period = usec;
- pa_rtclock_get(&p->next_elapse);
- pa_timeval_add(&p->next_elapse, usec);
+ pa_timeval_store(&p->next_elapse, usec);
p->timer_enabled = TRUE;
update_timer(p);
@@ -535,7 +512,9 @@ void pa_rtpoll_set_timer_periodic(pa_rtpoll *p, pa_usec_t usec) {
void pa_rtpoll_set_timer_relative(pa_rtpoll *p, pa_usec_t usec) {
pa_assert(p);
- p->period = 0;
+ /* Scheduling a timeout for more than an hour is very very suspicious */
+ pa_assert(usec <= PA_USEC_PER_SEC*60ULL*60ULL);
+
pa_rtclock_get(&p->next_elapse);
pa_timeval_add(&p->next_elapse, usec);
p->timer_enabled = TRUE;
@@ -546,7 +525,6 @@ void pa_rtpoll_set_timer_relative(pa_rtpoll *p, pa_usec_t usec) {
void pa_rtpoll_set_timer_disabled(pa_rtpoll *p) {
pa_assert(p);
- p->period = 0;
memset(&p->next_elapse, 0, sizeof(p->next_elapse));
p->timer_enabled = FALSE;
@@ -683,23 +661,23 @@ pa_rtpoll_item *pa_rtpoll_item_new_fdsem(pa_rtpoll *p, pa_rtpoll_priority_t prio
return i;
}
-static int asyncmsgq_before(pa_rtpoll_item *i) {
+static int asyncmsgq_read_before(pa_rtpoll_item *i) {
pa_assert(i);
- if (pa_asyncmsgq_before_poll(i->userdata) < 0)
+ if (pa_asyncmsgq_read_before_poll(i->userdata) < 0)
return 1; /* 1 means immediate restart of the loop */
return 0;
}
-static void asyncmsgq_after(pa_rtpoll_item *i) {
+static void asyncmsgq_read_after(pa_rtpoll_item *i) {
pa_assert(i);
pa_assert((i->pollfd[0].revents & ~POLLIN) == 0);
- pa_asyncmsgq_after_poll(i->userdata);
+ pa_asyncmsgq_read_after_poll(i->userdata);
}
-static int asyncmsgq_work(pa_rtpoll_item *i) {
+static int asyncmsgq_read_work(pa_rtpoll_item *i) {
pa_msgobject *object;
int code;
void *data;
@@ -725,7 +703,7 @@ static int asyncmsgq_work(pa_rtpoll_item *i) {
return 0;
}
-pa_rtpoll_item *pa_rtpoll_item_new_asyncmsgq(pa_rtpoll *p, pa_rtpoll_priority_t prio, pa_asyncmsgq *q) {
+pa_rtpoll_item *pa_rtpoll_item_new_asyncmsgq_read(pa_rtpoll *p, pa_rtpoll_priority_t prio, pa_asyncmsgq *q) {
pa_rtpoll_item *i;
struct pollfd *pollfd;
@@ -735,12 +713,47 @@ pa_rtpoll_item *pa_rtpoll_item_new_asyncmsgq(pa_rtpoll *p, pa_rtpoll_priority_t
i = pa_rtpoll_item_new(p, prio, 1);
pollfd = pa_rtpoll_item_get_pollfd(i, NULL);
- pollfd->fd = pa_asyncmsgq_get_fd(q);
+ pollfd->fd = pa_asyncmsgq_read_fd(q);
pollfd->events = POLLIN;
- i->before_cb = asyncmsgq_before;
- i->after_cb = asyncmsgq_after;
- i->work_cb = asyncmsgq_work;
+ i->before_cb = asyncmsgq_read_before;
+ i->after_cb = asyncmsgq_read_after;
+ i->work_cb = asyncmsgq_read_work;
+ i->userdata = q;
+
+ return i;
+}
+
+static int asyncmsgq_write_before(pa_rtpoll_item *i) {
+ pa_assert(i);
+
+ pa_asyncmsgq_write_before_poll(i->userdata);
+ return 0;
+}
+
+static void asyncmsgq_write_after(pa_rtpoll_item *i) {
+ pa_assert(i);
+
+ pa_assert((i->pollfd[0].revents & ~POLLIN) == 0);
+ pa_asyncmsgq_write_after_poll(i->userdata);
+}
+
+pa_rtpoll_item *pa_rtpoll_item_new_asyncmsgq_write(pa_rtpoll *p, pa_rtpoll_priority_t prio, pa_asyncmsgq *q) {
+ pa_rtpoll_item *i;
+ struct pollfd *pollfd;
+
+ pa_assert(p);
+ pa_assert(q);
+
+ i = pa_rtpoll_item_new(p, prio, 1);
+
+ pollfd = pa_rtpoll_item_get_pollfd(i, NULL);
+ pollfd->fd = pa_asyncmsgq_write_fd(q);
+ pollfd->events = POLLIN;
+
+ i->before_cb = asyncmsgq_write_before;
+ i->after_cb = asyncmsgq_write_after;
+ i->work_cb = NULL;
i->userdata = q;
return i;
diff --git a/src/pulsecore/rtpoll.h b/src/pulsecore/rtpoll.h
index 02f5c7c..08776ef 100644
--- a/src/pulsecore/rtpoll.h
+++ b/src/pulsecore/rtpoll.h
@@ -1,8 +1,6 @@
#ifndef foopulsertpollhfoo
#define foopulsertpollhfoo
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -74,8 +72,7 @@ void pa_rtpoll_install(pa_rtpoll *p);
* cleanly. */
int pa_rtpoll_run(pa_rtpoll *f, pa_bool_t wait);
-void pa_rtpoll_set_timer_absolute(pa_rtpoll *p, const struct timeval *ts);
-void pa_rtpoll_set_timer_periodic(pa_rtpoll *p, pa_usec_t usec);
+void pa_rtpoll_set_timer_absolute(pa_rtpoll *p, pa_usec_t usec);
void pa_rtpoll_set_timer_relative(pa_rtpoll *p, pa_usec_t usec);
void pa_rtpoll_set_timer_disabled(pa_rtpoll *p);
@@ -107,7 +104,8 @@ void pa_rtpoll_item_set_userdata(pa_rtpoll_item *i, void *userdata);
void* pa_rtpoll_item_get_userdata(pa_rtpoll_item *i);
pa_rtpoll_item *pa_rtpoll_item_new_fdsem(pa_rtpoll *p, pa_rtpoll_priority_t prio, pa_fdsem *s);
-pa_rtpoll_item *pa_rtpoll_item_new_asyncmsgq(pa_rtpoll *p, pa_rtpoll_priority_t prio, pa_asyncmsgq *q);
+pa_rtpoll_item *pa_rtpoll_item_new_asyncmsgq_read(pa_rtpoll *p, pa_rtpoll_priority_t prio, pa_asyncmsgq *q);
+pa_rtpoll_item *pa_rtpoll_item_new_asyncmsgq_write(pa_rtpoll *p, pa_rtpoll_priority_t prio, pa_asyncmsgq *q);
/* Requests the loop to exit. Will cause the next iteration of
* pa_rtpoll_run() to return 0 */
diff --git a/src/pulsecore/rtsig.c b/src/pulsecore/rtsig.c
index bfc49c8..4cd6aa8 100644
--- a/src/pulsecore/rtsig.c
+++ b/src/pulsecore/rtsig.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -42,7 +40,7 @@ static void _free_rtsig(void *p) {
pa_rtsig_put(PA_PTR_TO_INT(p));
}
-PA_STATIC_FLIST_DECLARE(rtsig_flist, pa_make_power_of_two(SIGRTMAX-SIGRTMIN+1), NULL);
+PA_STATIC_FLIST_DECLARE(rtsig_flist, pa_make_power_of_two((unsigned) (SIGRTMAX-SIGRTMIN+1)), NULL);
PA_STATIC_TLS_DECLARE(rtsig_tls, _free_rtsig);
static pa_atomic_t rtsig_current = PA_ATOMIC_INIT(-1);
diff --git a/src/pulsecore/rtsig.h b/src/pulsecore/rtsig.h
index 7830d27..e414122 100644
--- a/src/pulsecore/rtsig.h
+++ b/src/pulsecore/rtsig.h
@@ -1,8 +1,6 @@
#ifndef foopulsertsighfoo
#define foopulsertsighfoo
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c
index a94da30..7b9ac7b 100644
--- a/src/pulsecore/sample-util.c
+++ b/src/pulsecore/sample-util.c
@@ -1,5 +1,3 @@
-/* $Id: sample-util.c 2041 2007-11-09 17:11:45Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,6 +31,8 @@
#include <liboil/liboilfuncs.h>
#include <liboil/liboil.h>
+#include <pulse/timeval.h>
+
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
#include <pulsecore/g711.h>
@@ -42,29 +42,6 @@
#define PA_SILENCE_MAX (PA_PAGE_SIZE*16)
-pa_memblock *pa_silence_memblock_new(pa_mempool *pool, const pa_sample_spec *spec, size_t length) {
- size_t fs;
- pa_assert(pool);
- pa_assert(spec);
-
- if (length <= 0)
- length = pa_bytes_per_second(spec)/20; /* 50 ms */
-
- if (length > PA_SILENCE_MAX)
- length = PA_SILENCE_MAX;
-
- fs = pa_frame_size(spec);
-
- length = (length+fs-1)/fs;
-
- if (length <= 0)
- length = 1;
-
- length *= fs;
-
- return pa_silence_memblock(pa_memblock_new(pool, length), spec);
-}
-
pa_memblock *pa_silence_memblock(pa_memblock* b, const pa_sample_spec *spec) {
void *data;
@@ -74,10 +51,11 @@ pa_memblock *pa_silence_memblock(pa_memblock* b, const pa_sample_spec *spec) {
data = pa_memblock_acquire(b);
pa_silence_memory(data, pa_memblock_get_length(b), spec);
pa_memblock_release(b);
+
return b;
}
-void pa_silence_memchunk(pa_memchunk *c, const pa_sample_spec *spec) {
+pa_memchunk* pa_silence_memchunk(pa_memchunk *c, const pa_sample_spec *spec) {
void *data;
pa_assert(c);
@@ -87,53 +65,37 @@ void pa_silence_memchunk(pa_memchunk *c, const pa_sample_spec *spec) {
data = pa_memblock_acquire(c->memblock);
pa_silence_memory((uint8_t*) data+c->index, c->length, spec);
pa_memblock_release(c->memblock);
-}
-void pa_silence_memory(void *p, size_t length, const pa_sample_spec *spec) {
- uint8_t c = 0;
- pa_assert(p);
- pa_assert(length > 0);
- pa_assert(spec);
+ return c;
+}
- switch (spec->format) {
+static uint8_t silence_byte(pa_sample_format_t format) {
+ switch (format) {
case PA_SAMPLE_U8:
- c = 0x80;
- break;
+ return 0x80;
case PA_SAMPLE_S16LE:
case PA_SAMPLE_S16BE:
case PA_SAMPLE_S32LE:
case PA_SAMPLE_S32BE:
- case PA_SAMPLE_FLOAT32:
- case PA_SAMPLE_FLOAT32RE:
- c = 0;
- break;
+ case PA_SAMPLE_FLOAT32LE:
+ case PA_SAMPLE_FLOAT32BE:
+ return 0;
case PA_SAMPLE_ALAW:
- c = 0xd5;
- break;
+ return 0xd5;
case PA_SAMPLE_ULAW:
- c = 0xff;
- break;
+ return 0xff;
default:
pa_assert_not_reached();
}
-
- memset(p, c, length);
}
-static void calc_linear_integer_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_sample_spec *spec) {
- unsigned k;
-
- pa_assert(streams);
+void* pa_silence_memory(void *p, size_t length, const pa_sample_spec *spec) {
+ pa_assert(p);
+ pa_assert(length > 0);
pa_assert(spec);
- for (k = 0; k < nstreams; k++) {
- unsigned channel;
-
- for (channel = 0; channel < spec->channels; channel++) {
- pa_mix_info *m = streams + k;
- m->linear[channel].i = (int32_t) (pa_sw_volume_to_linear(m->volume.values[channel]) * 0x10000);
- }
- }
+ memset(p, silence_byte(spec->format), length);
+ return p;
}
static void calc_linear_integer_volume(int32_t linear[], const pa_cvolume *volume) {
@@ -143,33 +105,55 @@ static void calc_linear_integer_volume(int32_t linear[], const pa_cvolume *volum
pa_assert(volume);
for (channel = 0; channel < volume->channels; channel++)
- linear[channel] = (int32_t) (pa_sw_volume_to_linear(volume->values[channel]) * 0x10000);
+ linear[channel] = (int32_t) lrint(pa_sw_volume_to_linear(volume->values[channel]) * 0x10000);
}
-static void calc_linear_float_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_sample_spec *spec) {
- unsigned k;
+static void calc_linear_float_volume(float linear[], const pa_cvolume *volume) {
+ unsigned channel;
+
+ pa_assert(linear);
+ pa_assert(volume);
+
+ for (channel = 0; channel < volume->channels; channel++)
+ linear[channel] = (float) pa_sw_volume_to_linear(volume->values[channel]);
+}
+
+static void calc_linear_integer_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec) {
+ unsigned k, channel;
+ float linear[PA_CHANNELS_MAX];
pa_assert(streams);
pa_assert(spec);
+ pa_assert(volume);
+
+ calc_linear_float_volume(linear, volume);
for (k = 0; k < nstreams; k++) {
- unsigned channel;
for (channel = 0; channel < spec->channels; channel++) {
pa_mix_info *m = streams + k;
- m->linear[channel].f = pa_sw_volume_to_linear(m->volume.values[channel]);
+ m->linear[channel].i = (int32_t) lrint(pa_sw_volume_to_linear(m->volume.values[channel]) * linear[channel] * 0x10000);
}
}
}
-static void calc_linear_float_volume(float linear[], const pa_cvolume *volume) {
- unsigned channel;
+static void calc_linear_float_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec) {
+ unsigned k, channel;
+ float linear[PA_CHANNELS_MAX];
- pa_assert(linear);
+ pa_assert(streams);
+ pa_assert(spec);
pa_assert(volume);
- for (channel = 0; channel < volume->channels; channel++)
- linear[channel] = pa_sw_volume_to_linear(volume->values[channel]);
+ calc_linear_float_volume(linear, volume);
+
+ for (k = 0; k < nstreams; k++) {
+
+ for (channel = 0; channel < spec->channels; channel++) {
+ pa_mix_info *m = streams + k;
+ m->linear[channel].f = (float) (pa_sw_volume_to_linear(m->volume.values[channel]) * linear[channel]);
+ }
+ }
}
size_t pa_mix(
@@ -183,7 +167,8 @@ size_t pa_mix(
pa_cvolume full_volume;
unsigned k;
- size_t d = 0;
+ unsigned z;
+ void *end;
pa_assert(streams);
pa_assert(data);
@@ -193,45 +178,46 @@ size_t pa_mix(
if (!volume)
volume = pa_cvolume_reset(&full_volume, spec->channels);
+ if (mute || pa_cvolume_is_muted(volume) || nstreams <= 0) {
+ pa_silence_memory(data, length, spec);
+ return length;
+ }
+
for (k = 0; k < nstreams; k++)
streams[k].ptr = (uint8_t*) pa_memblock_acquire(streams[k].chunk.memblock) + streams[k].chunk.index;
+ for (z = 0; z < nstreams; z++)
+ if (length > streams[z].chunk.length)
+ length = streams[z].chunk.length;
+
+ end = (uint8_t*) data + length;
+
switch (spec->format) {
case PA_SAMPLE_S16NE:{
unsigned channel = 0;
- int32_t linear[PA_CHANNELS_MAX];
- calc_linear_integer_stream_volumes(streams, nstreams, spec);
- calc_linear_integer_volume(linear, volume);
+ calc_linear_integer_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d += sizeof(int16_t)) {
+ while (data < end) {
int32_t sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
int32_t v, cv = m->linear[channel].i;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- v = *((int16_t*) m->ptr);
- v = (v * cv) / 0x10000;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = *((int16_t*) m->ptr);
+ v = (v * cv) / 0x10000;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + sizeof(int16_t);
}
sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
- sum = (sum * linear[channel]) / 0x10000;
*((int16_t*) data) = (int16_t) sum;
data = (uint8_t*) data + sizeof(int16_t);
@@ -245,38 +231,28 @@ size_t pa_mix(
case PA_SAMPLE_S16RE:{
unsigned channel = 0;
- int32_t linear[PA_CHANNELS_MAX];
- calc_linear_integer_stream_volumes(streams, nstreams, spec);
- calc_linear_integer_volume(linear, volume);
+ calc_linear_integer_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d += sizeof(int16_t)) {
+ while (data < end) {
int32_t sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
int32_t v, cv = m->linear[channel].i;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- v = PA_INT16_SWAP(*((int16_t*) m->ptr));
- v = (v * cv) / 0x10000;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = PA_INT16_SWAP(*((int16_t*) m->ptr));
+ v = (v * cv) / 0x10000;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + sizeof(int16_t);
}
sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
- sum = (sum * linear[channel]) / 0x10000;
*((int16_t*) data) = PA_INT16_SWAP((int16_t) sum);
data = (uint8_t*) data + sizeof(int16_t);
@@ -290,39 +266,29 @@ size_t pa_mix(
case PA_SAMPLE_S32NE:{
unsigned channel = 0;
- int32_t linear[PA_CHANNELS_MAX];
- calc_linear_integer_stream_volumes(streams, nstreams, spec);
- calc_linear_integer_volume(linear, volume);
+ calc_linear_integer_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d += sizeof(int32_t)) {
+ while (data < end) {
int64_t sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
- int64_t v;
int32_t cv = m->linear[channel].i;
+ int64_t v;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- v = *((int32_t*) m->ptr);
- v = (v * cv) / 0x10000;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = *((int32_t*) m->ptr);
+ v = (v * cv) / 0x10000;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + sizeof(int32_t);
}
sum = PA_CLAMP_UNLIKELY(sum, -0x80000000LL, 0x7FFFFFFFLL);
- sum = (sum * linear[channel]) / 0x10000;
*((int32_t*) data) = (int32_t) sum;
data = (uint8_t*) data + sizeof(int32_t);
@@ -336,39 +302,29 @@ size_t pa_mix(
case PA_SAMPLE_S32RE:{
unsigned channel = 0;
- int32_t linear[PA_CHANNELS_MAX];
- calc_linear_integer_stream_volumes(streams, nstreams, spec);
- calc_linear_integer_volume(linear, volume);
+ calc_linear_integer_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d += sizeof(int32_t)) {
+ while (data < end) {
int64_t sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
- int64_t v;
int32_t cv = m->linear[channel].i;
+ int64_t v;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- v = PA_INT32_SWAP(*((int32_t*) m->ptr));
- v = (v * cv) / 0x10000;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = PA_INT32_SWAP(*((int32_t*) m->ptr));
+ v = (v * cv) / 0x10000;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + sizeof(int32_t);
}
sum = PA_CLAMP_UNLIKELY(sum, -0x80000000LL, 0x7FFFFFFFLL);
- sum = (sum * linear[channel]) / 0x10000;
*((int32_t*) data) = PA_INT32_SWAP((int32_t) sum);
data = (uint8_t*) data + sizeof(int32_t);
@@ -382,37 +338,27 @@ size_t pa_mix(
case PA_SAMPLE_U8: {
unsigned channel = 0;
- int32_t linear[PA_CHANNELS_MAX];
- calc_linear_integer_stream_volumes(streams, nstreams, spec);
- calc_linear_integer_volume(linear, volume);
+ calc_linear_integer_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d ++) {
+ while (data < end) {
int32_t sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
int32_t v, cv = m->linear[channel].i;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- v = (int32_t) *((uint8_t*) m->ptr) - 0x80;
- v = (v * cv) / 0x10000;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = (int32_t) *((uint8_t*) m->ptr) - 0x80;
+ v = (v * cv) / 0x10000;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + 1;
}
- sum = (sum * linear[channel]) / 0x10000;
sum = PA_CLAMP_UNLIKELY(sum, -0x80, 0x7F);
*((uint8_t*) data) = (uint8_t) (sum + 0x80);
@@ -427,39 +373,29 @@ size_t pa_mix(
case PA_SAMPLE_ULAW: {
unsigned channel = 0;
- int32_t linear[PA_CHANNELS_MAX];
- calc_linear_integer_stream_volumes(streams, nstreams, spec);
- calc_linear_integer_volume(linear, volume);
+ calc_linear_integer_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d ++) {
+ while (data < end) {
int32_t sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
int32_t v, cv = m->linear[channel].i;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- v = (int32_t) st_ulaw2linear16(*((uint8_t*) m->ptr));
- v = (v * cv) / 0x10000;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = (int32_t) st_ulaw2linear16(*((uint8_t*) m->ptr));
+ v = (v * cv) / 0x10000;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + 1;
}
sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
- sum = (sum * linear[channel]) / 0x10000;
- *((uint8_t*) data) = (uint8_t) st_14linear2ulaw(sum >> 2);
+ *((uint8_t*) data) = (uint8_t) st_14linear2ulaw((int16_t) sum >> 2);
data = (uint8_t*) data + 1;
@@ -472,39 +408,29 @@ size_t pa_mix(
case PA_SAMPLE_ALAW: {
unsigned channel = 0;
- int32_t linear[PA_CHANNELS_MAX];
- calc_linear_integer_stream_volumes(streams, nstreams, spec);
- calc_linear_integer_volume(linear, volume);
+ calc_linear_integer_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d ++) {
+ while (data < end) {
int32_t sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
int32_t v, cv = m->linear[channel].i;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- v = (int32_t) st_alaw2linear16(*((uint8_t*) m->ptr));
- v = (v * cv) / 0x10000;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = (int32_t) st_alaw2linear16(*((uint8_t*) m->ptr));
+ v = (v * cv) / 0x10000;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + 1;
}
sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
- sum = (sum * linear[channel]) / 0x10000;
- *((uint8_t*) data) = (uint8_t) st_13linear2alaw(sum >> 3);
+ *((uint8_t*) data) = (uint8_t) st_13linear2alaw((int16_t) sum >> 3);
data = (uint8_t*) data + 1;
@@ -517,37 +443,27 @@ size_t pa_mix(
case PA_SAMPLE_FLOAT32NE: {
unsigned channel = 0;
- float linear[PA_CHANNELS_MAX];
- calc_linear_float_stream_volumes(streams, nstreams, spec);
- calc_linear_float_volume(linear, volume);
+ calc_linear_float_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d += sizeof(float)) {
+ while (data < end) {
float sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
float v, cv = m->linear[channel].f;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- v = *((float*) m->ptr);
- v *= cv;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = *((float*) m->ptr);
+ v *= cv;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + sizeof(float);
}
- sum *= linear[channel];
*((float*) data) = sum;
data = (uint8_t*) data + sizeof(float);
@@ -563,38 +479,27 @@ size_t pa_mix(
unsigned channel = 0;
float linear[PA_CHANNELS_MAX];
- calc_linear_float_stream_volumes(streams, nstreams, spec);
- calc_linear_float_volume(linear, volume);
+ calc_linear_float_stream_volumes(streams, nstreams, volume, spec);
- for (d = 0;; d += sizeof(float)) {
+ while (data < end) {
float sum = 0;
unsigned i;
- if (PA_UNLIKELY(d >= length))
- goto finish;
-
for (i = 0; i < nstreams; i++) {
pa_mix_info *m = streams + i;
float v, cv = m->linear[channel].f;
- if (PA_UNLIKELY(d >= m->chunk.length))
- goto finish;
-
- if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
- v = 0;
- else {
- uint32_t z = *(uint32_t*) m->ptr;
- z = PA_UINT32_SWAP(z);
- v = *((float*) &z);
- v *= cv;
- }
+ if (PA_UNLIKELY(cv <= 0))
+ continue;
+ v = PA_FLOAT32_SWAP(*(float*) m->ptr);
+ v *= cv;
sum += v;
+
m->ptr = (uint8_t*) m->ptr + sizeof(float);
}
- sum *= linear[channel];
- *((uint32_t*) data) = PA_UINT32_SWAP(*(uint32_t*) &sum);
+ *((float*) data) = PA_FLOAT32_SWAP(sum);
data = (uint8_t*) data + sizeof(float);
@@ -606,16 +511,14 @@ size_t pa_mix(
}
default:
- pa_log_error("ERROR: Unable to mix audio data of format %s.", pa_sample_format_to_string(spec->format));
+ pa_log_error("Unable to mix audio data of format %s.", pa_sample_format_to_string(spec->format));
pa_assert_not_reached();
}
-finish:
-
for (k = 0; k < nstreams; k++)
pa_memblock_release(streams[k].chunk.memblock);
- return d;
+ return length;
}
@@ -631,6 +534,9 @@ void pa_volume_memchunk(
pa_assert(c->length % pa_frame_size(spec) == 0);
pa_assert(volume);
+ if (pa_memblock_is_silence(c->memblock))
+ return;
+
if (pa_cvolume_channels_equal_to(volume, PA_VOLUME_NORM))
return;
@@ -644,14 +550,15 @@ void pa_volume_memchunk(
switch (spec->format) {
case PA_SAMPLE_S16NE: {
- int16_t *d;
- size_t n;
+ int16_t *d, *e;
unsigned channel;
int32_t linear[PA_CHANNELS_MAX];
calc_linear_integer_volume(linear, volume);
- for (channel = 0, d = ptr, n = c->length/sizeof(int16_t); n > 0; d++, n--) {
+ e = (int16_t*) ptr + c->length/sizeof(int16_t);
+
+ for (channel = 0, d = ptr; d < e; d++) {
int32_t t;
t = (int32_t)(*d);
@@ -666,17 +573,18 @@ void pa_volume_memchunk(
}
case PA_SAMPLE_S16RE: {
- int16_t *d;
- size_t n;
+ int16_t *d, *e;
unsigned channel;
int32_t linear[PA_CHANNELS_MAX];
calc_linear_integer_volume(linear, volume);
- for (channel = 0, d = ptr, n = c->length/sizeof(int16_t); n > 0; d++, n--) {
+ e = (int16_t*) ptr + c->length/sizeof(int16_t);
+
+ for (channel = 0, d = ptr; d < e; d++) {
int32_t t;
- t = (int32_t)(PA_INT16_SWAP(*d));
+ t = (int32_t) PA_INT16_SWAP(*d);
t = (t * linear[channel]) / 0x10000;
t = PA_CLAMP_UNLIKELY(t, -0x8000, 0x7FFF);
*d = PA_INT16_SWAP((int16_t) t);
@@ -689,14 +597,15 @@ void pa_volume_memchunk(
}
case PA_SAMPLE_S32NE: {
- int32_t *d;
- size_t n;
+ int32_t *d, *e;
unsigned channel;
int32_t linear[PA_CHANNELS_MAX];
calc_linear_integer_volume(linear, volume);
- for (channel = 0, d = ptr, n = c->length/sizeof(int32_t); n > 0; d++, n--) {
+ e = (int32_t*) ptr + c->length/sizeof(int32_t);
+
+ for (channel = 0, d = ptr; d < e; d++) {
int64_t t;
t = (int64_t)(*d);
@@ -711,17 +620,18 @@ void pa_volume_memchunk(
}
case PA_SAMPLE_S32RE: {
- int32_t *d;
- size_t n;
+ int32_t *d, *e;
unsigned channel;
int32_t linear[PA_CHANNELS_MAX];
calc_linear_integer_volume(linear, volume);
- for (channel = 0, d = ptr, n = c->length/sizeof(int32_t); n > 0; d++, n--) {
+ e = (int32_t*) ptr + c->length/sizeof(int32_t);
+
+ for (channel = 0, d = ptr; d < e; d++) {
int64_t t;
- t = (int64_t)(PA_INT32_SWAP(*d));
+ t = (int64_t) PA_INT32_SWAP(*d);
t = (t * linear[channel]) / 0x10000;
t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL);
*d = PA_INT32_SWAP((int32_t) t);
@@ -734,14 +644,15 @@ void pa_volume_memchunk(
}
case PA_SAMPLE_U8: {
- uint8_t *d;
- size_t n;
+ uint8_t *d, *e;
unsigned channel;
int32_t linear[PA_CHANNELS_MAX];
calc_linear_integer_volume(linear, volume);
- for (channel = 0, d = ptr, n = c->length; n > 0; d++, n--) {
+ e = (uint8_t*) ptr + c->length;
+
+ for (channel = 0, d = ptr; d < e; d++) {
int32_t t;
t = (int32_t) *d - 0x80;
@@ -756,20 +667,21 @@ void pa_volume_memchunk(
}
case PA_SAMPLE_ULAW: {
- uint8_t *d;
- size_t n;
+ uint8_t *d, *e;
unsigned channel;
int32_t linear[PA_CHANNELS_MAX];
calc_linear_integer_volume(linear, volume);
- for (channel = 0, d = ptr, n = c->length; n > 0; d++, n--) {
+ e = (uint8_t*) ptr + c->length;
+
+ for (channel = 0, d = ptr; d < e; d++) {
int32_t t;
t = (int32_t) st_ulaw2linear16(*d);
t = (t * linear[channel]) / 0x10000;
t = PA_CLAMP_UNLIKELY(t, -0x8000, 0x7FFF);
- *d = (uint8_t) st_14linear2ulaw(t >> 2);
+ *d = (uint8_t) st_14linear2ulaw((int16_t) t >> 2);
if (PA_UNLIKELY(++channel >= spec->channels))
channel = 0;
@@ -778,20 +690,21 @@ void pa_volume_memchunk(
}
case PA_SAMPLE_ALAW: {
- uint8_t *d;
- size_t n;
+ uint8_t *d, *e;
unsigned channel;
int32_t linear[PA_CHANNELS_MAX];
calc_linear_integer_volume(linear, volume);
- for (channel = 0, d = ptr, n = c->length; n > 0; d++, n--) {
+ e = (uint8_t*) ptr + c->length;
+
+ for (channel = 0, d = ptr; d < e; d++) {
int32_t t;
t = (int32_t) st_alaw2linear16(*d);
t = (t * linear[channel]) / 0x10000;
t = PA_CLAMP_UNLIKELY(t, -0x8000, 0x7FFF);
- *d = (uint8_t) st_13linear2alaw(t >> 3);
+ *d = (uint8_t) st_13linear2alaw((int16_t) t >> 3);
if (PA_UNLIKELY(++channel >= spec->channels))
channel = 0;
@@ -806,8 +719,8 @@ void pa_volume_memchunk(
unsigned channel;
d = ptr;
- skip = spec->channels * sizeof(float);
- n = c->length/sizeof(float)/spec->channels;
+ skip = (int) (spec->channels * sizeof(float));
+ n = (unsigned) (c->length/sizeof(float)/spec->channels);
for (channel = 0; channel < spec->channels; channel ++) {
float v, *t;
@@ -817,28 +730,26 @@ void pa_volume_memchunk(
v = (float) pa_sw_volume_to_linear(volume->values[channel]);
t = d + channel;
- oil_scalarmult_f32(t, skip, t, skip, &v, n);
+ oil_scalarmult_f32(t, skip, t, skip, &v, (int) n);
}
break;
}
case PA_SAMPLE_FLOAT32RE: {
- uint32_t *d;
- size_t n;
+ float *d, *e;
unsigned channel;
float linear[PA_CHANNELS_MAX];
calc_linear_float_volume(linear, volume);
- for (channel = 0, d = ptr, n = c->length/sizeof(float); n > 0; d++, n--) {
+ e = (float*) ptr + c->length/sizeof(float);
+
+ for (channel = 0, d = ptr; d < e; d++) {
float t;
- uint32_t z;
- z = PA_UINT32_SWAP(*d);
- t = *(float*) &z;
+ t = PA_FLOAT32_SWAP(*d);
t *= linear[channel];
- z = *(uint32_t*) &t;
- *d = PA_UINT32_SWAP(z);
+ *d = PA_FLOAT32_SWAP(t);
if (PA_UNLIKELY(++channel >= spec->channels))
channel = 0;
@@ -897,7 +808,7 @@ void pa_interleave(const void *src[], unsigned channels, void *dst, size_t ss, u
d = (uint8_t*) dst + c * ss;
for (j = 0; j < n; j ++) {
- oil_memcpy(d, s, ss);
+ oil_memcpy(d, s, (int) ss);
s = (uint8_t*) s + ss;
d = (uint8_t*) d + fs;
}
@@ -925,9 +836,154 @@ void pa_deinterleave(const void *src, void *dst[], unsigned channels, size_t ss,
d = dst[c];
for (j = 0; j < n; j ++) {
- oil_memcpy(d, s, ss);
+ oil_memcpy(d, s, (int) ss);
s = (uint8_t*) s + fs;
d = (uint8_t*) d + ss;
}
}
}
+
+static pa_memblock *silence_memblock_new(pa_mempool *pool, uint8_t c) {
+ pa_memblock *b;
+ size_t length;
+ void *data;
+
+ pa_assert(pool);
+
+ length = PA_MIN(pa_mempool_block_size_max(pool), PA_SILENCE_MAX);
+
+ b = pa_memblock_new(pool, length);
+
+ data = pa_memblock_acquire(b);
+ memset(data, c, length);
+ pa_memblock_release(b);
+
+ pa_memblock_set_is_silence(b, TRUE);
+
+ return b;
+}
+
+void pa_silence_cache_init(pa_silence_cache *cache) {
+ pa_assert(cache);
+
+ memset(cache, 0, sizeof(pa_silence_cache));
+}
+
+void pa_silence_cache_done(pa_silence_cache *cache) {
+ pa_sample_format_t f;
+ pa_assert(cache);
+
+ for (f = 0; f < PA_SAMPLE_MAX; f++)
+ if (cache->blocks[f])
+ pa_memblock_unref(cache->blocks[f]);
+
+ memset(cache, 0, sizeof(pa_silence_cache));
+}
+
+pa_memchunk* pa_silence_memchunk_get(pa_silence_cache *cache, pa_mempool *pool, pa_memchunk* ret, const pa_sample_spec *spec, size_t length) {
+ pa_memblock *b;
+ size_t l;
+
+ pa_assert(cache);
+ pa_assert(pa_sample_spec_valid(spec));
+
+ if (!(b = cache->blocks[spec->format]))
+
+ switch (spec->format) {
+ case PA_SAMPLE_U8:
+ cache->blocks[PA_SAMPLE_U8] = b = silence_memblock_new(pool, 0x80);
+ break;
+ case PA_SAMPLE_S16LE:
+ case PA_SAMPLE_S16BE:
+ case PA_SAMPLE_S32LE:
+ case PA_SAMPLE_S32BE:
+ case PA_SAMPLE_FLOAT32LE:
+ case PA_SAMPLE_FLOAT32BE:
+ cache->blocks[PA_SAMPLE_S16LE] = b = silence_memblock_new(pool, 0);
+ cache->blocks[PA_SAMPLE_S16BE] = pa_memblock_ref(b);
+ cache->blocks[PA_SAMPLE_S32LE] = pa_memblock_ref(b);
+ cache->blocks[PA_SAMPLE_S32BE] = pa_memblock_ref(b);
+ cache->blocks[PA_SAMPLE_FLOAT32LE] = pa_memblock_ref(b);
+ cache->blocks[PA_SAMPLE_FLOAT32BE] = pa_memblock_ref(b);
+ break;
+ case PA_SAMPLE_ALAW:
+ cache->blocks[PA_SAMPLE_ALAW] = b = silence_memblock_new(pool, 0xd5);
+ break;
+ case PA_SAMPLE_ULAW:
+ cache->blocks[PA_SAMPLE_ULAW] = b = silence_memblock_new(pool, 0xff);
+ break;
+ default:
+ pa_assert_not_reached();
+ }
+
+ pa_assert(b);
+
+ ret->memblock = pa_memblock_ref(b);
+
+ l = pa_memblock_get_length(b);
+ if (length > l || length == 0)
+ length = l;
+
+ ret->length = pa_frame_align(length, spec);
+ ret->index = 0;
+
+ return ret;
+}
+
+void pa_sample_clamp(pa_sample_format_t format, void *dst, size_t dstr, const void *src, size_t sstr, unsigned n) {
+ const float *s;
+ float *d;
+
+ s = src; d = dst;
+
+ if (format == PA_SAMPLE_FLOAT32NE) {
+
+ float minus_one = -1.0, plus_one = 1.0;
+ oil_clip_f32(d, (int) dstr, s, (int) sstr, (int) n, &minus_one, &plus_one);
+
+ } else {
+ pa_assert(format == PA_SAMPLE_FLOAT32RE);
+
+ for (; n > 0; n--) {
+ float f;
+
+ f = PA_FLOAT32_SWAP(*s);
+ f = PA_CLAMP_UNLIKELY(f, -1.0f, 1.0f);
+ *d = PA_FLOAT32_SWAP(f);
+
+ s = (const float*) ((const uint8_t*) s + sstr);
+ d = (float*) ((uint8_t*) d + dstr);
+ }
+ }
+}
+
+/* Similar to pa_bytes_to_usec() but rounds up, not down */
+
+pa_usec_t pa_bytes_to_usec_round_up(uint64_t length, const pa_sample_spec *spec) {
+ size_t fs;
+ pa_usec_t usec;
+
+ pa_assert(spec);
+
+ fs = pa_frame_size(spec);
+ length = (length + fs - 1) / fs;
+
+ usec = (pa_usec_t) length * PA_USEC_PER_SEC;
+
+ return (usec + spec->rate - 1) / spec->rate;
+}
+
+/* Similar to pa_usec_to_bytes() but rounds up, not down */
+
+size_t pa_usec_to_bytes_round_up(pa_usec_t t, const pa_sample_spec *spec) {
+ uint64_t u;
+ pa_assert(spec);
+
+ u = (uint64_t) t * (uint64_t) spec->rate;
+
+ u = (u + PA_USEC_PER_SEC - 1) / PA_USEC_PER_SEC;
+
+ u *= pa_frame_size(spec);
+
+ return (size_t) u;
+}
diff --git a/src/pulsecore/sample-util.h b/src/pulsecore/sample-util.h
index 56fc5e1..06ecb72 100644
--- a/src/pulsecore/sample-util.h
+++ b/src/pulsecore/sample-util.h
@@ -1,8 +1,6 @@
#ifndef foosampleutilhfoo
#define foosampleutilhfoo
-/* $Id: sample-util.h 2041 2007-11-09 17:11:45Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,10 +28,18 @@
#include <pulsecore/memblock.h>
#include <pulsecore/memchunk.h>
-pa_memblock *pa_silence_memblock(pa_memblock* b, const pa_sample_spec *spec);
-pa_memblock *pa_silence_memblock_new(pa_mempool *pool, const pa_sample_spec *spec, size_t length);
-void pa_silence_memchunk(pa_memchunk *c, const pa_sample_spec *spec);
-void pa_silence_memory(void *p, size_t length, const pa_sample_spec *spec);
+typedef struct pa_silence_cache {
+ pa_memblock* blocks[PA_SAMPLE_MAX];
+} pa_silence_cache;
+
+void pa_silence_cache_init(pa_silence_cache *cache);
+void pa_silence_cache_done(pa_silence_cache *cache);
+
+void *pa_silence_memory(void *p, size_t length, const pa_sample_spec *spec);
+pa_memchunk* pa_silence_memchunk(pa_memchunk *c, const pa_sample_spec *spec);
+pa_memblock* pa_silence_memblock(pa_memblock *b, const pa_sample_spec *spec);
+
+pa_memchunk* pa_silence_memchunk_get(pa_silence_cache *cache, pa_mempool *pool, pa_memchunk* ret, const pa_sample_spec *spec, size_t length);
typedef struct pa_mix_info {
pa_memchunk chunk;
@@ -70,4 +76,9 @@ int pa_frame_aligned(size_t l, const pa_sample_spec *ss) PA_GCC_PURE;
void pa_interleave(const void *src[], unsigned channels, void *dst, size_t ss, unsigned n);
void pa_deinterleave(const void *src, void *dst[], unsigned channels, size_t ss, unsigned n);
+void pa_sample_clamp(pa_sample_format_t format, void *dst, size_t dstr, const void *src, size_t sstr, unsigned n);
+
+pa_usec_t pa_bytes_to_usec_round_up(uint64_t length, const pa_sample_spec *spec);
+size_t pa_usec_to_bytes_round_up(pa_usec_t t, const pa_sample_spec *spec);
+
#endif
diff --git a/src/pulsecore/sconv-s16be.c b/src/pulsecore/sconv-s16be.c
index 02785cb..e7e1449 100644
--- a/src/pulsecore/sconv-s16be.c
+++ b/src/pulsecore/sconv-s16be.c
@@ -1,5 +1,3 @@
-/* $Id: sconv-s16be.c 2037 2007-11-09 02:45:07Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/sconv-s16be.h b/src/pulsecore/sconv-s16be.h
index ffc4eb7..6058081 100644
--- a/src/pulsecore/sconv-s16be.h
+++ b/src/pulsecore/sconv-s16be.h
@@ -1,8 +1,6 @@
#ifndef foosconv_s16befoo
#define foosconv_s16befoo
-/* $Id: sconv-s16be.h 2037 2007-11-09 02:45:07Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/sconv-s16le.c b/src/pulsecore/sconv-s16le.c
index 895acc4..159c465 100644
--- a/src/pulsecore/sconv-s16le.c
+++ b/src/pulsecore/sconv-s16le.c
@@ -1,5 +1,3 @@
-/* $Id: sconv-s16le.c 2037 2007-11-09 02:45:07Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -72,13 +70,13 @@ void pa_sconv_s16le_to_float32ne(unsigned n, const int16_t *a, float *b) {
for (; n > 0; n--) {
int16_t s = *(a++);
- *(b++) = ((float) INT16_FROM(s))/0x7FFF;
+ *(b++) = ((float) INT16_FROM(s))/(float) 0x7FFF;
}
#else
{
static const double add = 0, factor = 1.0/0x7FFF;
- oil_scaleconv_f32_s16(b, a, n, &add, &factor);
+ oil_scaleconv_f32_s16(b, a, (int) n, &add, &factor);
}
#endif
}
@@ -97,7 +95,7 @@ void pa_sconv_s32le_to_float32ne(unsigned n, const int32_t *a, float *b) {
#else
{
static const double add = 0, factor = 1.0/0x7FFFFFFF;
- oil_scaleconv_f32_s32(b, a, n, &add, &factor);
+ oil_scaleconv_f32_s32(b, a, (int) n, &add, &factor);
}
#endif
}
@@ -112,15 +110,15 @@ void pa_sconv_s16le_from_float32ne(unsigned n, const float *a, int16_t *b) {
int16_t s;
float v = *(a++);
- v = PA_CLAMP_UNLIKELY(v, -1, 1);
- s = (int16_t) (v * 0x7FFF);
+ v = PA_CLAMP_UNLIKELY(v, -1.0f, 1.f);
+ s = (int16_t) lrintf(v * 0x7FFF);
*(b++) = INT16_TO(s);
}
#else
{
static const double add = 0, factor = 0x7FFF;
- oil_scaleconv_s16_f32(b, a, n, &add, &factor);
+ oil_scaleconv_s16_f32(b, a, (int) n, &add, &factor);
}
#endif
}
@@ -135,15 +133,15 @@ void pa_sconv_s32le_from_float32ne(unsigned n, const float *a, int32_t *b) {
int32_t s;
float v = *(a++);
- v = PA_CLAMP_UNLIKELY(v, -1, 1);
- s = (int32_t) ((double) v * (double) 0x7FFFFFFF);
+ v = PA_CLAMP_UNLIKELY(v, -1.0f, 1.0f);
+ s = (int32_t) lrint((double) v * (double) 0x7FFFFFFF);
*(b++) = INT32_TO(s);
}
#else
{
static const double add = 0, factor = 0x7FFFFFFF;
- oil_scaleconv_s32_f32(b, a, n, &add, &factor);
+ oil_scaleconv_s32_f32(b, a, (int) n, &add, &factor);
}
#endif
}
@@ -155,8 +153,7 @@ void pa_sconv_s16le_to_float32re(unsigned n, const int16_t *a, float *b) {
for (; n > 0; n--) {
int16_t s = *(a++);
float k = ((float) INT16_FROM(s))/0x7FFF;
- uint32_t *j = (uint32_t*) &k;
- *j = PA_UINT32_SWAP(*j);
+ k = PA_FLOAT32_SWAP(k);
*(b++) = k;
}
}
@@ -168,8 +165,7 @@ void pa_sconv_s32le_to_float32re(unsigned n, const int32_t *a, float *b) {
for (; n > 0; n--) {
int32_t s = *(a++);
float k = (float) (((double) INT32_FROM(s))/0x7FFFFFFF);
- uint32_t *j = (uint32_t*) &k;
- *j = PA_UINT32_SWAP(*j);
+ k = PA_FLOAT32_SWAP(k);
*(b++) = k;
}
}
@@ -181,10 +177,9 @@ void pa_sconv_s16le_from_float32re(unsigned n, const float *a, int16_t *b) {
for (; n > 0; n--) {
int16_t s;
float v = *(a++);
- uint32_t *j = (uint32_t*) &v;
- *j = PA_UINT32_SWAP(*j);
- v = PA_CLAMP_UNLIKELY(v, -1, 1);
- s = (int16_t) (v * 0x7FFF);
+ v = PA_FLOAT32_SWAP(v);
+ v = PA_CLAMP_UNLIKELY(v, -1.0f, 1.0f);
+ s = (int16_t) lrintf(v * 0x7FFF);
*(b++) = INT16_TO(s);
}
}
@@ -196,10 +191,9 @@ void pa_sconv_s32le_from_float32re(unsigned n, const float *a, int32_t *b) {
for (; n > 0; n--) {
int32_t s;
float v = *(a++);
- uint32_t *j = (uint32_t*) &v;
- *j = PA_UINT32_SWAP(*j);
- v = PA_CLAMP_UNLIKELY(v, -1, 1);
- s = (int32_t) ((double) v * 0x7FFFFFFF);
+ v = PA_FLOAT32_SWAP(v);
+ v = PA_CLAMP_UNLIKELY(v, -1.0f, 1.0f);
+ s = (int32_t) lrint((double) v * 0x7FFFFFFF);
*(b++) = INT32_TO(s);
}
}
@@ -221,7 +215,7 @@ void pa_sconv_s32le_to_s16re(unsigned n, const int32_t*a, int16_t *b) {
for (; n > 0; n--) {
int16_t s = (int16_t) (INT32_FROM(*a) >> 16);
- *b = PA_UINT32_SWAP(s);
+ *b = PA_INT16_SWAP(s);
a++;
b++;
}
@@ -243,7 +237,7 @@ void pa_sconv_s32le_from_s16re(unsigned n, const int16_t *a, int32_t *b) {
pa_assert(b);
for (; n > 0; n--) {
- int32_t s = ((int32_t) PA_UINT16_SWAP(*a)) << 16;
+ int32_t s = ((int32_t) PA_INT16_SWAP(*a)) << 16;
*b = INT32_TO(s);
a++;
b++;
diff --git a/src/pulsecore/sconv-s16le.h b/src/pulsecore/sconv-s16le.h
index aac74c4..8d4c87c 100644
--- a/src/pulsecore/sconv-s16le.h
+++ b/src/pulsecore/sconv-s16le.h
@@ -1,8 +1,6 @@
#ifndef foosconv_s16lefoo
#define foosconv_s16lefoo
-/* $Id: sconv-s16le.h 2037 2007-11-09 02:45:07Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/sconv.c b/src/pulsecore/sconv.c
index ae114f6..6c4d420 100644
--- a/src/pulsecore/sconv.c
+++ b/src/pulsecore/sconv.c
@@ -1,5 +1,3 @@
-/* $Id: sconv.c 2040 2007-11-09 14:20:12Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -48,7 +46,7 @@ static void u8_to_float32ne(unsigned n, const uint8_t *a, float *b) {
pa_assert(a);
pa_assert(b);
- oil_scaleconv_f32_u8(b, a, n, &add, &factor);
+ oil_scaleconv_f32_u8(b, a, (int) n, &add, &factor);
}
static void u8_from_float32ne(unsigned n, const float *a, uint8_t *b) {
@@ -57,7 +55,7 @@ static void u8_from_float32ne(unsigned n, const float *a, uint8_t *b) {
pa_assert(a);
pa_assert(b);
- oil_scaleconv_u8_f32(b, a, n, &add, &factor);
+ oil_scaleconv_u8_f32(b, a, (int) n, &add, &factor);
}
static void u8_to_s16ne(unsigned n, const uint8_t *a, int16_t *b) {
@@ -66,9 +64,9 @@ static void u8_to_s16ne(unsigned n, const uint8_t *a, int16_t *b) {
pa_assert(a);
pa_assert(b);
- oil_conv_s16_u8(b, 2, a, 1, n);
- oil_scalaradd_s16(b, 2, b, 2, &add, n);
- oil_scalarmult_s16(b, 2, b, 2, &factor, n);
+ oil_conv_s16_u8(b, 2, a, 1, (int) n);
+ oil_scalaradd_s16(b, 2, b, 2, &add, (int) n);
+ oil_scalarmult_s16(b, 2, b, 2, &factor, (int) n);
}
static void u8_from_s16ne(unsigned n, const int16_t *a, uint8_t *b) {
@@ -86,7 +84,7 @@ static void float32ne_to_float32ne(unsigned n, const float *a, float *b) {
pa_assert(a);
pa_assert(b);
- oil_memcpy(b, a, sizeof(float) * n);
+ oil_memcpy(b, a, (int) (sizeof(float) * n));
}
static void float32re_to_float32ne(unsigned n, const float *a, float *b) {
@@ -103,7 +101,7 @@ static void s16ne_to_s16ne(unsigned n, const int16_t *a, int16_t *b) {
pa_assert(a);
pa_assert(b);
- oil_memcpy(b, a, sizeof(int16_t) * n);
+ oil_memcpy(b, a, (int) (sizeof(int16_t) * n));
}
static void s16re_to_s16ne(unsigned n, const int16_t *a, int16_t *b) {
@@ -111,7 +109,7 @@ static void s16re_to_s16ne(unsigned n, const int16_t *a, int16_t *b) {
pa_assert(b);
for (; n > 0; n--, a++, b++)
- *b = PA_UINT16_SWAP(*a);
+ *b = PA_INT16_SWAP(*a);
}
/* ulaw */
@@ -130,9 +128,9 @@ static void ulaw_from_float32ne(unsigned n, const float *a, uint8_t *b) {
for (; n > 0; n--) {
float v = *(a++);
- v = PA_CLAMP_UNLIKELY(v, -1, 1);
+ v = PA_CLAMP_UNLIKELY(v, -1.0f, 1.0f);
v *= 0x1FFF;
- *(b++) = st_14linear2ulaw((int16_t) v);
+ *(b++) = st_14linear2ulaw((int16_t) lrintf(v));
}
}
@@ -168,9 +166,9 @@ static void alaw_from_float32ne(unsigned n, const float *a, uint8_t *b) {
for (; n > 0; n--, a++, b++) {
float v = *a;
- v = PA_CLAMP_UNLIKELY(v, -1, 1);
+ v = PA_CLAMP_UNLIKELY(v, -1.0f, 1.0f);
v *= 0xFFF;
- *b = st_13linear2alaw((int16_t) v);
+ *b = st_13linear2alaw((int16_t) lrintf(v));
}
}
@@ -179,7 +177,7 @@ static void alaw_to_s16ne(unsigned n, const int8_t *a, int16_t *b) {
pa_assert(b);
for (; n > 0; n--, a++, b++)
- *b = st_alaw2linear16(*a);
+ *b = st_alaw2linear16((uint8_t) *a);
}
static void alaw_from_s16ne(unsigned n, const int16_t *a, uint8_t *b) {
diff --git a/src/pulsecore/sconv.h b/src/pulsecore/sconv.h
index f2bdbba..5971036 100644
--- a/src/pulsecore/sconv.h
+++ b/src/pulsecore/sconv.h
@@ -1,8 +1,6 @@
#ifndef foosconvhfoo
#define foosconvhfoo
-/* $Id: sconv.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/semaphore-posix.c b/src/pulsecore/semaphore-posix.c
index 527bcbd..7c9f859 100644
--- a/src/pulsecore/semaphore-posix.c
+++ b/src/pulsecore/semaphore-posix.c
@@ -1,5 +1,3 @@
-/* $Id: semaphore-posix.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/semaphore-win32.c b/src/pulsecore/semaphore-win32.c
index f657634..41e0b8d 100644
--- a/src/pulsecore/semaphore-win32.c
+++ b/src/pulsecore/semaphore-win32.c
@@ -1,5 +1,3 @@
-/* $Id: mutex-win32.c 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/semaphore.h b/src/pulsecore/semaphore.h
index d1c9968..850ae81 100644
--- a/src/pulsecore/semaphore.h
+++ b/src/pulsecore/semaphore.h
@@ -1,8 +1,6 @@
#ifndef foopulsesemaphorehfoo
#define foopulsesemaphorehfoo
-/* $Id: semaphore.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/props.c b/src/pulsecore/shared.c
index cb7835b..77d919d 100644
--- a/src/pulsecore/props.c
+++ b/src/pulsecore/shared.c
@@ -1,5 +1,3 @@
-/* $Id: props.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,112 +27,112 @@
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
-#include "props.h"
+#include "shared.h"
-typedef struct pa_property {
- char *name; /* Points to memory allocated by the property subsystem */
+typedef struct pa_shared {
+ char *name; /* Points to memory allocated by the shared property system */
void *data; /* Points to memory maintained by the caller */
-} pa_property;
+} pa_shared;
-/* Allocate a new property object */
-static pa_property* property_new(const char *name, void *data) {
- pa_property* p;
+/* Allocate a new shared property object */
+static pa_shared* shared_new(const char *name, void *data) {
+ pa_shared* p;
pa_assert(name);
pa_assert(data);
- p = pa_xnew(pa_property, 1);
+ p = pa_xnew(pa_shared, 1);
p->name = pa_xstrdup(name);
p->data = data;
return p;
}
-/* Free a property object */
-static void property_free(pa_property *p) {
+/* Free a shared property object */
+static void shared_free(pa_shared *p) {
pa_assert(p);
pa_xfree(p->name);
pa_xfree(p);
}
-void* pa_property_get(pa_core *c, const char *name) {
- pa_property *p;
+void* pa_shared_get(pa_core *c, const char *name) {
+ pa_shared *p;
pa_assert(c);
pa_assert(name);
- pa_assert(c->properties);
+ pa_assert(c->shared);
- if (!(p = pa_hashmap_get(c->properties, name)))
+ if (!(p = pa_hashmap_get(c->shared, name)))
return NULL;
return p->data;
}
-int pa_property_set(pa_core *c, const char *name, void *data) {
- pa_property *p;
+int pa_shared_set(pa_core *c, const char *name, void *data) {
+ pa_shared *p;
pa_assert(c);
pa_assert(name);
pa_assert(data);
- pa_assert(c->properties);
+ pa_assert(c->shared);
- if (pa_hashmap_get(c->properties, name))
+ if (pa_hashmap_get(c->shared, name))
return -1;
- p = property_new(name, data);
- pa_hashmap_put(c->properties, p->name, p);
+ p = shared_new(name, data);
+ pa_hashmap_put(c->shared, p->name, p);
return 0;
}
-int pa_property_remove(pa_core *c, const char *name) {
- pa_property *p;
+int pa_shared_remove(pa_core *c, const char *name) {
+ pa_shared *p;
pa_assert(c);
pa_assert(name);
- pa_assert(c->properties);
+ pa_assert(c->shared);
- if (!(p = pa_hashmap_remove(c->properties, name)))
+ if (!(p = pa_hashmap_remove(c->shared, name)))
return -1;
- property_free(p);
+ shared_free(p);
return 0;
}
-void pa_property_init(pa_core *c) {
+void pa_shared_init(pa_core *c) {
pa_assert(c);
- c->properties = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
+ c->shared = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
}
-void pa_property_cleanup(pa_core *c) {
+void pa_shared_cleanup(pa_core *c) {
pa_assert(c);
- if (!c->properties)
+ if (!c->shared)
return;
- pa_assert(!pa_hashmap_size(c->properties));
+ pa_assert(pa_hashmap_isempty(c->shared));
- pa_hashmap_free(c->properties, NULL, NULL);
- c->properties = NULL;
+ pa_hashmap_free(c->shared, NULL, NULL);
+ c->shared = NULL;
}
-void pa_property_dump(pa_core *c, pa_strbuf *s) {
+void pa_shared_dump(pa_core *c, pa_strbuf *s) {
void *state = NULL;
- pa_property *p;
+ pa_shared *p;
pa_assert(c);
pa_assert(s);
- while ((p = pa_hashmap_iterate(c->properties, &state, NULL)))
+ while ((p = pa_hashmap_iterate(c->shared, &state, NULL)))
pa_strbuf_printf(s, "[%s] -> [%p]\n", p->name, p->data);
}
-int pa_property_replace(pa_core *c, const char *name, void *data) {
+int pa_shared_replace(pa_core *c, const char *name, void *data) {
pa_assert(c);
pa_assert(name);
- pa_property_remove(c, name);
- return pa_property_set(c, name, data);
+ pa_shared_remove(c, name);
+ return pa_shared_set(c, name, data);
}
diff --git a/src/pulsecore/props.h b/src/pulsecore/shared.h
index 332d095..dd3f94e 100644
--- a/src/pulsecore/props.h
+++ b/src/pulsecore/shared.h
@@ -1,7 +1,5 @@
-#ifndef foopropshfoo
-#define foopropshfoo
-
-/* $Id: props.h 1426 2007-02-13 15:35:19Z ossman $ */
+#ifndef foosharedshfoo
+#define foosharedshfoo
/***
This file is part of PulseAudio.
@@ -27,34 +25,37 @@
#include <pulsecore/core.h>
#include <pulsecore/strbuf.h>
-/* The property subsystem is to be used to share data between
+/* The shared property subsystem is to be used to share data between
* modules. Consider them to be kind of "global" variables for a
* core. Why not use the hashmap functions directly? The hashmap
* functions copy neither the key nor value, while this property
* system copies the key. Users of this system have to think about
* reference counting themselves. */
-/* Return a pointer to the value of the specified property. */
-void* pa_property_get(pa_core *c, const char *name);
+/* Note: please don't confuse this with the proplist framework in
+ * pulse/proplist.[ch]! */
+
+/* Return a pointer to the value of the specified shared property. */
+void* pa_shared_get(pa_core *c, const char *name);
-/* Set the property 'name' to 'data'. This function fails in case a
- * property by this name already exists. The property data is not
- * copied or reference counted. This is the caller's job. */
-int pa_property_set(pa_core *c, const char *name, void *data);
+/* Set the shared property 'name' to 'data'. This function fails in
+ * case a property by this name already exists. The property data is
+ * not copied or reference counted. This is the caller's job. */
+int pa_shared_set(pa_core *c, const char *name, void *data);
-/* Remove the specified property. Return non-zero on failure */
-int pa_property_remove(pa_core *c, const char *name);
+/* Remove the specified shared property. Return non-zero on failure */
+int pa_shared_remove(pa_core *c, const char *name);
-/* A combination of pa_property_remove() and pa_property_set() */
-int pa_property_replace(pa_core *c, const char *name, void *data);
+/* A combination of pa_shared_remove() and pa_shared_set() */
+int pa_shared_replace(pa_core *c, const char *name, void *data);
-/* Free all memory used by the property system */
-void pa_property_cleanup(pa_core *c);
+/* Free all memory used by the shared property system */
+void pa_shared_cleanup(pa_core *c);
-/* Initialize the properties subsystem */
-void pa_property_init(pa_core *c);
+/* Initialize the shared property system */
+void pa_shared_init(pa_core *c);
-/* Dump the current set of properties */
-void pa_property_dump(pa_core *c, pa_strbuf *s);
+/* Dump the current set of shared properties */
+void pa_shared_dump(pa_core *c, pa_strbuf *s);
#endif
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index bcc2a5e..b299757 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -1,5 +1,3 @@
-/* $Id: shm.c 2164 2008-03-27 23:32:57Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -42,6 +40,7 @@
#endif
#include <pulse/xmalloc.h>
+#include <pulse/gccmacro.h>
#include <pulsecore/core-error.h>
#include <pulsecore/log.h>
@@ -56,7 +55,7 @@
#define MADV_REMOVE 9
#endif
-#define MAX_SHM_SIZE (PA_ALIGN(1024*1024*20))
+#define MAX_SHM_SIZE (PA_ALIGN(1024*1024*64))
#ifdef __linux__
/* On Linux we know that the shared memory blocks are files in
@@ -69,14 +68,15 @@
#define SHM_MARKER ((int) 0xbeefcafe)
-/* We now put this SHM marker at the end of each segment. It's optional to not require a reboot when upgrading, though */
-struct shm_marker {
+/* We now put this SHM marker at the end of each segment. It's
+ * optional, to not require a reboot when upgrading, though */
+struct shm_marker PA_GCC_PACKED {
pa_atomic_t marker; /* 0xbeefcafe */
pa_atomic_t pid;
- void *_reserverd1;
- void *_reserverd2;
- void *_reserverd3;
- void *_reserverd4;
+ uint64_t *_reserverd1;
+ uint64_t *_reserverd2;
+ uint64_t *_reserverd3;
+ uint64_t *_reserverd4;
};
static char *segment_name(char *fn, size_t l, unsigned id) {
@@ -84,13 +84,13 @@ static char *segment_name(char *fn, size_t l, unsigned id) {
return fn;
}
-int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) {
+int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
char fn[32];
int fd = -1;
pa_assert(m);
pa_assert(size > 0);
- pa_assert(size < MAX_SHM_SIZE);
+ pa_assert(size <= MAX_SHM_SIZE);
pa_assert(mode >= 0600);
/* Each time we create a new SHM area, let's first drop all stale
@@ -105,7 +105,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) {
m->size = size;
#ifdef MAP_ANONYMOUS
- if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
+ if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, (off_t) 0)) == MAP_FAILED) {
pa_log("mmap() failed: %s", pa_cstrerror(errno));
goto fail;
}
@@ -122,7 +122,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) {
m->ptr = pa_xmalloc(m->size);
#endif
- m->do_unlink = 0;
+ m->do_unlink = FALSE;
} else {
#ifdef HAVE_SHM_OPEN
@@ -138,12 +138,12 @@ int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) {
m->size = size + PA_ALIGN(sizeof(struct shm_marker));
- if (ftruncate(fd, m->size) < 0) {
+ if (ftruncate(fd, (off_t) m->size) < 0) {
pa_log("ftruncate() failed: %s", pa_cstrerror(errno));
goto fail;
}
- if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+ if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t) 0)) == MAP_FAILED) {
pa_log("mmap() failed: %s", pa_cstrerror(errno));
goto fail;
}
@@ -155,7 +155,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) {
pa_atomic_store(&marker->marker, SHM_MARKER);
pa_assert_se(close(fd) == 0);
- m->do_unlink = 1;
+ m->do_unlink = TRUE;
#else
return -1;
#endif
@@ -235,7 +235,7 @@ void pa_shm_punch(pa_shm *m, size_t offset, size_t size) {
/* Align this to multiples of the page size */
ptr = (uint8_t*) m->ptr + offset;
- o = (uint8_t*) ptr - (uint8_t*) PA_PAGE_ALIGN_PTR(ptr);
+ o = (size_t) ((uint8_t*) ptr - (uint8_t*) PA_PAGE_ALIGN_PTR(ptr));
if (o > 0) {
ps = PA_PAGE_SIZE;
@@ -282,14 +282,16 @@ int pa_shm_attach_ro(pa_shm *m, unsigned id) {
goto fail;
}
- if (st.st_size <= 0 || st.st_size > MAX_SHM_SIZE+PA_ALIGN(sizeof(struct shm_marker)) || PA_ALIGN(st.st_size) != st.st_size) {
+ if (st.st_size <= 0 ||
+ st.st_size > (off_t) (MAX_SHM_SIZE+PA_ALIGN(sizeof(struct shm_marker))) ||
+ PA_ALIGN((size_t) st.st_size) != (size_t) st.st_size) {
pa_log("Invalid shared memory segment size");
goto fail;
}
- m->size = st.st_size;
+ m->size = (size_t) st.st_size;
- if ((m->ptr = mmap(NULL, m->size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+ if ((m->ptr = mmap(NULL, m->size, PROT_READ, MAP_SHARED, fd, (off_t) 0)) == MAP_FAILED) {
pa_log("mmap() failed: %s", pa_cstrerror(errno));
goto fail;
}
@@ -371,7 +373,7 @@ int pa_shm_cleanup(void) {
/* Ok, the owner of this shms segment is dead, so, let's remove the segment */
segment_name(fn, sizeof(fn), id);
- if (shm_unlink(fn) < 0 && errno != EACCES)
+ if (shm_unlink(fn) < 0 && errno != EACCES && errno != ENOENT)
pa_log_warn("Failed to remove SHM segment %s: %s\n", fn, pa_cstrerror(errno));
}
diff --git a/src/pulsecore/shm.h b/src/pulsecore/shm.h
index 89ccfa2..c2adbd0 100644
--- a/src/pulsecore/shm.h
+++ b/src/pulsecore/shm.h
@@ -1,8 +1,6 @@
#ifndef foopulseshmhfoo
#define foopulseshmhfoo
-/* $Id: shm.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,15 +24,17 @@
#include <sys/types.h>
+#include <pulsecore/macro.h>
+
typedef struct pa_shm {
unsigned id;
void *ptr;
size_t size;
- int do_unlink;
- int shared;
+ pa_bool_t do_unlink:1;
+ pa_bool_t shared:1;
} pa_shm;
-int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode);
+int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode);
int pa_shm_attach_ro(pa_shm *m, unsigned id);
void pa_shm_punch(pa_shm *m, size_t offset, size_t size);
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index fa0f208..4f70347 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1,5 +1,3 @@
-/* $Id: sink-input.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -38,12 +36,12 @@
#include <pulsecore/log.h>
#include <pulsecore/play-memblockq.h>
#include <pulsecore/namereg.h>
+#include <pulsecore/core-util.h>
#include "sink-input.h"
+#define MEMBLOCKQ_MAXLENGTH (32*1024*1024)
#define CONVERT_BUFFER_LENGTH (PA_PAGE_SIZE)
-#define SILENCE_BUFFER_LENGTH (PA_PAGE_SIZE*12)
-#define MOVE_BUFFER_LENGTH (PA_PAGE_SIZE*256)
static PA_DEFINE_CHECK_TYPE(pa_sink_input, pa_msgobject);
@@ -54,10 +52,18 @@ pa_sink_input_new_data* pa_sink_input_new_data_init(pa_sink_input_new_data *data
memset(data, 0, sizeof(*data));
data->resample_method = PA_RESAMPLER_INVALID;
+ data->proplist = pa_proplist_new();
return data;
}
+void pa_sink_input_new_data_set_sample_spec(pa_sink_input_new_data *data, const pa_sample_spec *spec) {
+ pa_assert(data);
+
+ if ((data->sample_spec_is_set = !!spec))
+ data->sample_spec = *spec;
+}
+
void pa_sink_input_new_data_set_channel_map(pa_sink_input_new_data *data, const pa_channel_map *map) {
pa_assert(data);
@@ -72,20 +78,39 @@ void pa_sink_input_new_data_set_volume(pa_sink_input_new_data *data, const pa_cv
data->volume = *volume;
}
-void pa_sink_input_new_data_set_sample_spec(pa_sink_input_new_data *data, const pa_sample_spec *spec) {
+void pa_sink_input_new_data_set_muted(pa_sink_input_new_data *data, pa_bool_t mute) {
pa_assert(data);
- if ((data->sample_spec_is_set = !!spec))
- data->sample_spec = *spec;
+ data->muted_is_set = TRUE;
+ data->muted = !!mute;
}
-void pa_sink_input_new_data_set_muted(pa_sink_input_new_data *data, pa_bool_t mute) {
+void pa_sink_input_new_data_done(pa_sink_input_new_data *data) {
pa_assert(data);
- data->muted_is_set = TRUE;
- data->muted = !!mute;
+ pa_proplist_free(data->proplist);
+}
+
+/* Called from main context */
+static void reset_callbacks(pa_sink_input *i) {
+ pa_assert(i);
+
+ i->pop = NULL;
+ i->process_rewind = NULL;
+ i->update_max_rewind = NULL;
+ i->update_max_request = NULL;
+ i->update_sink_requested_latency = NULL;
+ i->update_sink_latency_range = NULL;
+ i->attach = NULL;
+ i->detach = NULL;
+ i->suspend = NULL;
+ i->moved = NULL;
+ i->kill = NULL;
+ i->get_latency = NULL;
+ i->state_change = NULL;
}
+/* Called from main context */
pa_sink_input* pa_sink_input_new(
pa_core *core,
pa_sink_input_new_data *data,
@@ -102,10 +127,9 @@ pa_sink_input* pa_sink_input_new(
return NULL;
pa_return_null_if_fail(!data->driver || pa_utf8_valid(data->driver));
- pa_return_null_if_fail(!data->name || pa_utf8_valid(data->name));
if (!data->sink)
- data->sink = pa_namereg_get(core, NULL, PA_NAMEREG_SINK, 1);
+ data->sink = pa_namereg_get(core, NULL, PA_NAMEREG_SINK, TRUE);
pa_return_null_if_fail(data->sink);
pa_return_null_if_fail(pa_sink_get_state(data->sink) != PA_SINK_UNLINKED);
@@ -132,6 +156,9 @@ pa_sink_input* pa_sink_input_new(
pa_return_null_if_fail(pa_cvolume_valid(&data->volume));
pa_return_null_if_fail(data->volume.channels == data->sample_spec.channels);
+ if (!data->muted_is_set)
+ data->muted = FALSE;
+
if (flags & PA_SINK_INPUT_FIX_FORMAT)
data->sample_spec.format = data->sink->sample_spec.format;
@@ -150,9 +177,6 @@ pa_sink_input* pa_sink_input_new(
if (data->volume.channels != data->sample_spec.channels)
pa_cvolume_set(&data->volume, data->sample_spec.channels, pa_cvolume_avg(&data->volume));
- if (!data->muted_is_set)
- data->muted = 0;
-
if (data->resample_method == PA_RESAMPLER_INVALID)
data->resample_method = core->resample_method;
@@ -177,7 +201,8 @@ pa_sink_input* pa_sink_input_new(
data->resample_method,
((flags & PA_SINK_INPUT_VARIABLE_RATE) ? PA_RESAMPLER_VARIABLE_RATE : 0) |
((flags & PA_SINK_INPUT_NO_REMAP) ? PA_RESAMPLER_NO_REMAP : 0) |
- (core->disable_remixing || (flags & PA_SINK_INPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0)))) {
+ (core->disable_remixing || (flags & PA_SINK_INPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0) |
+ (core->disable_lfe_remixing ? PA_RESAMPLER_NO_LFE : 0)))) {
pa_log_warn("Unsupported resampling operation.");
return NULL;
}
@@ -192,7 +217,7 @@ pa_sink_input* pa_sink_input_new(
i->core = core;
i->state = PA_SINK_INPUT_INIT;
i->flags = flags;
- i->name = pa_xstrdup(data->name);
+ i->proplist = pa_proplist_copy(data->proplist);
i->driver = pa_xstrdup(data->driver);
i->module = data->module;
i->sink = data->sink;
@@ -215,33 +240,41 @@ pa_sink_input* pa_sink_input_new(
} else
i->sync_next = i->sync_prev = NULL;
- i->peek = NULL;
- i->drop = NULL;
- i->kill = NULL;
- i->get_latency = NULL;
- i->attach = NULL;
- i->detach = NULL;
- i->suspend = NULL;
- i->moved = NULL;
+ i->direct_outputs = pa_idxset_new(NULL, NULL);
+
+ reset_callbacks(i);
i->userdata = NULL;
i->thread_info.state = i->state;
+ i->thread_info.attached = FALSE;
pa_atomic_store(&i->thread_info.drained, 1);
i->thread_info.sample_spec = i->sample_spec;
- i->thread_info.silence_memblock = NULL;
- i->thread_info.move_silence = 0;
- pa_memchunk_reset(&i->thread_info.resampled_chunk);
i->thread_info.resampler = resampler;
i->thread_info.volume = i->volume;
i->thread_info.muted = i->muted;
- i->thread_info.attached = FALSE;
+ i->thread_info.requested_sink_latency = (pa_usec_t) -1;
+ i->thread_info.rewrite_nbytes = 0;
+ i->thread_info.rewrite_flush = FALSE;
+ i->thread_info.underrun_for = (uint64_t) -1;
+ i->thread_info.playing_for = 0;
+ i->thread_info.direct_outputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
+
+ i->thread_info.render_memblockq = pa_memblockq_new(
+ 0,
+ MEMBLOCKQ_MAXLENGTH,
+ 0,
+ pa_frame_size(&i->sink->sample_spec),
+ 0,
+ 1,
+ 0,
+ &i->sink->silence);
pa_assert_se(pa_idxset_put(core->sink_inputs, pa_sink_input_ref(i), &i->index) == 0);
pa_assert_se(pa_idxset_put(i->sink->inputs, i, NULL) == 0);
pa_log_info("Created input %u \"%s\" on %s with sample spec %s and channel map %s",
i->index,
- i->name,
+ pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME)),
i->sink->name,
pa_sample_spec_snprint(st, sizeof(st), &i->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map));
@@ -251,6 +284,7 @@ pa_sink_input* pa_sink_input_new(
return i;
}
+/* Called from main context */
static void update_n_corked(pa_sink_input *i, pa_sink_input_state_t state) {
pa_assert(i);
@@ -262,6 +296,7 @@ static void update_n_corked(pa_sink_input *i, pa_sink_input_state_t state) {
pa_sink_update_status(i->sink);
}
+/* Called from main context */
static int sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
pa_sink_input *ssync;
pa_assert(i);
@@ -272,8 +307,7 @@ static int sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
if (i->state == state)
return 0;
- if (pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL) < 0)
- return -1;
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL) == 0);
update_n_corked(i, state);
i->state = state;
@@ -287,14 +321,23 @@ static int sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
ssync->state = state;
}
- if (state != PA_SINK_INPUT_UNLINKED)
+ if (state != PA_SINK_INPUT_UNLINKED) {
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED], i);
+ for (ssync = i->sync_prev; ssync; ssync = ssync->sync_prev)
+ pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED], ssync);
+
+ for (ssync = i->sync_next; ssync; ssync = ssync->sync_next)
+ pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED], ssync);
+ }
+
return 0;
}
+/* Called from main context */
void pa_sink_input_unlink(pa_sink_input *i) {
pa_bool_t linked;
+ pa_source_output *o, *p = NULL;
pa_assert(i);
/* See pa_sink_unlink() for a couple of comments how this function
@@ -302,7 +345,7 @@ void pa_sink_input_unlink(pa_sink_input *i) {
pa_sink_input_ref(i);
- linked = PA_SINK_INPUT_LINKED(i->state);
+ linked = PA_SINK_INPUT_IS_LINKED(i->state);
if (linked)
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_UNLINK], i);
@@ -318,21 +361,20 @@ void pa_sink_input_unlink(pa_sink_input *i) {
if (pa_idxset_remove_by_data(i->sink->inputs, i, NULL))
pa_sink_input_unref(i);
- if (linked) {
- pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_REMOVE_INPUT, i, 0, NULL);
- sink_input_set_state(i, PA_SINK_INPUT_UNLINKED);
- pa_sink_update_status(i->sink);
- } else
- i->state = PA_SINK_INPUT_UNLINKED;
+ while ((o = pa_idxset_first(i->direct_outputs, NULL))) {
+ pa_assert(o != p);
+ pa_source_output_kill(o);
+ p = o;
+ }
- i->peek = NULL;
- i->drop = NULL;
- i->kill = NULL;
- i->get_latency = NULL;
- i->attach = NULL;
- i->detach = NULL;
- i->suspend = NULL;
- i->moved = NULL;
+ update_n_corked(i, PA_SINK_INPUT_UNLINKED);
+ i->state = PA_SINK_INPUT_UNLINKED;
+
+ if (linked)
+ if (i->sink->asyncmsgq)
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_REMOVE_INPUT, i, 0, NULL) == 0);
+
+ reset_callbacks(i);
if (linked) {
pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_REMOVE, i->index);
@@ -343,329 +385,431 @@ void pa_sink_input_unlink(pa_sink_input *i) {
pa_sink_input_unref(i);
}
+/* Called from main context */
static void sink_input_free(pa_object *o) {
pa_sink_input* i = PA_SINK_INPUT(o);
pa_assert(i);
pa_assert(pa_sink_input_refcnt(i) == 0);
- if (PA_SINK_INPUT_LINKED(i->state))
+ if (PA_SINK_INPUT_IS_LINKED(i->state))
pa_sink_input_unlink(i);
- pa_log_info("Freeing output %u \"%s\"", i->index, i->name);
+ pa_log_info("Freeing input %u \"%s\"", i->index, pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME)));
pa_assert(!i->thread_info.attached);
- if (i->thread_info.resampled_chunk.memblock)
- pa_memblock_unref(i->thread_info.resampled_chunk.memblock);
+ if (i->thread_info.render_memblockq)
+ pa_memblockq_free(i->thread_info.render_memblockq);
if (i->thread_info.resampler)
pa_resampler_free(i->thread_info.resampler);
- if (i->thread_info.silence_memblock)
- pa_memblock_unref(i->thread_info.silence_memblock);
+ if (i->proplist)
+ pa_proplist_free(i->proplist);
+
+ if (i->direct_outputs)
+ pa_idxset_free(i->direct_outputs, NULL, NULL);
+
+ if (i->thread_info.direct_outputs)
+ pa_hashmap_free(i->thread_info.direct_outputs, NULL, NULL);
- pa_xfree(i->name);
pa_xfree(i->driver);
pa_xfree(i);
}
+/* Called from main context */
void pa_sink_input_put(pa_sink_input *i) {
+ pa_sink_input_state_t state;
pa_sink_input_assert_ref(i);
pa_assert(i->state == PA_SINK_INPUT_INIT);
- pa_assert(i->peek);
- pa_assert(i->drop);
- i->thread_info.state = i->state = i->flags & PA_SINK_INPUT_START_CORKED ? PA_SINK_INPUT_CORKED : PA_SINK_INPUT_RUNNING;
+ /* The following fields must be initialized properly */
+ pa_assert(i->pop);
+ pa_assert(i->process_rewind);
+ pa_assert(i->kill);
+
i->thread_info.volume = i->volume;
i->thread_info.muted = i->muted;
- if (i->state == PA_SINK_INPUT_CORKED)
- i->sink->n_corked++;
+ state = i->flags & PA_SINK_INPUT_START_CORKED ? PA_SINK_INPUT_CORKED : PA_SINK_INPUT_RUNNING;
- pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_ADD_INPUT, i, 0, NULL);
- pa_sink_update_status(i->sink);
+ update_n_corked(i, state);
+ i->state = state;
+
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_ADD_INPUT, i, 0, NULL) == 0);
pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, i->index);
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_PUT], i);
-
- /* Please note that if you change something here, you have to
- change something in pa_sink_input_move() with the ghost stream
- registration too. */
}
+/* Called from main context */
void pa_sink_input_kill(pa_sink_input*i) {
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
- if (i->kill)
- i->kill(i);
+ i->kill(i);
}
-pa_usec_t pa_sink_input_get_latency(pa_sink_input *i) {
- pa_usec_t r = 0;
+/* Called from main context */
+pa_usec_t pa_sink_input_get_latency(pa_sink_input *i, pa_usec_t *sink_latency) {
+ pa_usec_t r[2] = { 0, 0 };
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
- if (pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_GET_LATENCY, &r, 0, NULL) < 0)
- r = 0;
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_GET_LATENCY, r, 0, NULL) == 0);
if (i->get_latency)
- r += i->get_latency(i);
+ r[0] += i->get_latency(i);
- return r;
+ if (sink_latency)
+ *sink_latency = r[1];
+
+ return r[0];
}
/* Called from thread context */
-int pa_sink_input_peek(pa_sink_input *i, size_t length, pa_memchunk *chunk, pa_cvolume *volume) {
- int ret = -1;
- int do_volume_adj_here;
- int volume_is_norm;
- size_t block_size_max;
+int pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, pa_memchunk *chunk, pa_cvolume *volume) {
+ pa_bool_t do_volume_adj_here;
+ pa_bool_t volume_is_norm;
+ size_t block_size_max_sink, block_size_max_sink_input;
+ size_t ilength;
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->thread_info.state));
- pa_assert(pa_frame_aligned(length, &i->sink->sample_spec));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->thread_info.state));
+ pa_assert(pa_frame_aligned(slength, &i->sink->sample_spec));
pa_assert(chunk);
pa_assert(volume);
- if (!i->peek || !i->drop || i->thread_info.state == PA_SINK_INPUT_CORKED)
- goto finish;
+/* pa_log_debug("peek"); */
+
+ if (!i->pop)
+ return -1;
+
+ pa_assert(i->thread_info.state == PA_SINK_INPUT_RUNNING ||
+ i->thread_info.state == PA_SINK_INPUT_CORKED ||
+ i->thread_info.state == PA_SINK_INPUT_DRAINED);
- pa_assert(i->thread_info.state == PA_SINK_INPUT_RUNNING || i->thread_info.state == PA_SINK_INPUT_DRAINED);
+ block_size_max_sink_input = i->thread_info.resampler ?
+ pa_resampler_max_block_size(i->thread_info.resampler) :
+ pa_frame_align(pa_mempool_block_size_max(i->sink->core->mempool), &i->sample_spec);
+
+ block_size_max_sink = pa_frame_align(pa_mempool_block_size_max(i->sink->core->mempool), &i->sink->sample_spec);
/* Default buffer size */
- if (length <= 0)
- length = pa_frame_align(CONVERT_BUFFER_LENGTH, &i->sink->sample_spec);
-
- /* Make sure the buffer fits in the mempool tile */
- block_size_max = pa_mempool_block_size_max(i->sink->core->mempool);
- if (length > block_size_max)
- length = pa_frame_align(block_size_max, &i->sink->sample_spec);
-
- if (i->thread_info.move_silence > 0) {
- size_t l;
-
- /* We have just been moved and shall play some silence for a
- * while until the old sink has drained its playback buffer */
-
- if (!i->thread_info.silence_memblock)
- i->thread_info.silence_memblock = pa_silence_memblock_new(
- i->sink->core->mempool,
- &i->sink->sample_spec,
- pa_frame_align(SILENCE_BUFFER_LENGTH, &i->sink->sample_spec));
-
- chunk->memblock = pa_memblock_ref(i->thread_info.silence_memblock);
- chunk->index = 0;
- l = pa_memblock_get_length(chunk->memblock);
- chunk->length = i->thread_info.move_silence < l ? i->thread_info.move_silence : l;
-
- ret = 0;
- do_volume_adj_here = 1;
- goto finish;
- }
+ if (slength <= 0)
+ slength = pa_frame_align(CONVERT_BUFFER_LENGTH, &i->sink->sample_spec);
- if (!i->thread_info.resampler) {
- do_volume_adj_here = 0; /* FIXME??? */
- ret = i->peek(i, length, chunk);
- goto finish;
- }
+ if (slength > block_size_max_sink)
+ slength = block_size_max_sink;
+
+ if (i->thread_info.resampler) {
+ ilength = pa_resampler_request(i->thread_info.resampler, slength);
+
+ if (ilength <= 0)
+ ilength = pa_frame_align(CONVERT_BUFFER_LENGTH, &i->sample_spec);
+ } else
+ ilength = slength;
+
+ if (ilength > block_size_max_sink_input)
+ ilength = block_size_max_sink_input;
+
+ /* If the channel maps of the sink and this stream differ, we need
+ * to adjust the volume *before* we resample. Otherwise we can do
+ * it after and leave it for the sink code */
do_volume_adj_here = !pa_channel_map_equal(&i->channel_map, &i->sink->channel_map);
volume_is_norm = pa_cvolume_is_norm(&i->thread_info.volume) && !i->thread_info.muted;
- while (!i->thread_info.resampled_chunk.memblock) {
+ while (!pa_memblockq_is_readable(i->thread_info.render_memblockq)) {
pa_memchunk tchunk;
- size_t l, rmbs;
- l = pa_resampler_request(i->thread_info.resampler, length);
+ /* There's nothing in our render queue. We need to fill it up
+ * with data from the implementor. */
- if (l <= 0)
- l = pa_frame_align(CONVERT_BUFFER_LENGTH, &i->sample_spec);
+ if (i->thread_info.state == PA_SINK_INPUT_CORKED ||
+ i->pop(i, ilength, &tchunk) < 0) {
- rmbs = pa_resampler_max_block_size(i->thread_info.resampler);
- if (l > rmbs)
- l = rmbs;
+ /* OK, we're corked or the implementor didn't give us any
+ * data, so let's just hand out silence */
+ pa_atomic_store(&i->thread_info.drained, 1);
- if ((ret = i->peek(i, l, &tchunk)) < 0)
- goto finish;
+ pa_memblockq_seek(i->thread_info.render_memblockq, (int64_t) slength, PA_SEEK_RELATIVE);
+ i->thread_info.playing_for = 0;
+ if (i->thread_info.underrun_for != (uint64_t) -1)
+ i->thread_info.underrun_for += ilength;
+ break;
+ }
+
+ pa_atomic_store(&i->thread_info.drained, 0);
pa_assert(tchunk.length > 0);
+ pa_assert(tchunk.memblock);
+
+ i->thread_info.underrun_for = 0;
+ i->thread_info.playing_for += tchunk.length;
+
+ while (tchunk.length > 0) {
+ pa_memchunk wchunk;
+
+ wchunk = tchunk;
+ pa_memblock_ref(wchunk.memblock);
- if (tchunk.length > l)
- tchunk.length = l;
+ if (wchunk.length > block_size_max_sink_input)
+ wchunk.length = block_size_max_sink_input;
- i->drop(i, tchunk.length);
+ /* It might be necessary to adjust the volume here */
+ if (do_volume_adj_here && !volume_is_norm) {
+ pa_memchunk_make_writable(&wchunk, 0);
- /* It might be necessary to adjust the volume here */
- if (do_volume_adj_here && !volume_is_norm) {
- pa_memchunk_make_writable(&tchunk, 0);
+ if (i->thread_info.muted)
+ pa_silence_memchunk(&wchunk, &i->thread_info.sample_spec);
+ else
+ pa_volume_memchunk(&wchunk, &i->thread_info.sample_spec, &i->thread_info.volume);
+ }
+
+ if (!i->thread_info.resampler)
+ pa_memblockq_push_align(i->thread_info.render_memblockq, &wchunk);
+ else {
+ pa_memchunk rchunk;
+ pa_resampler_run(i->thread_info.resampler, &wchunk, &rchunk);
- if (i->thread_info.muted)
- pa_silence_memchunk(&tchunk, &i->thread_info.sample_spec);
- else
- pa_volume_memchunk(&tchunk, &i->thread_info.sample_spec, &i->thread_info.volume);
+/* pa_log_debug("pushing %lu", (unsigned long) rchunk.length); */
+
+ if (rchunk.memblock) {
+ pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk);
+ pa_memblock_unref(rchunk.memblock);
+ }
+ }
+
+ pa_memblock_unref(wchunk.memblock);
+
+ tchunk.index += wchunk.length;
+ tchunk.length -= wchunk.length;
}
- pa_resampler_run(i->thread_info.resampler, &tchunk, &i->thread_info.resampled_chunk);
pa_memblock_unref(tchunk.memblock);
}
- pa_assert(i->thread_info.resampled_chunk.memblock);
- pa_assert(i->thread_info.resampled_chunk.length > 0);
+ pa_assert_se(pa_memblockq_peek(i->thread_info.render_memblockq, chunk) >= 0);
- *chunk = i->thread_info.resampled_chunk;
- pa_memblock_ref(i->thread_info.resampled_chunk.memblock);
+ pa_assert(chunk->length > 0);
+ pa_assert(chunk->memblock);
- ret = 0;
+/* pa_log_debug("peeking %lu", (unsigned long) chunk->length); */
-finish:
+ if (chunk->length > block_size_max_sink)
+ chunk->length = block_size_max_sink;
- if (ret >= 0)
- pa_atomic_store(&i->thread_info.drained, 0);
- else if (ret < 0)
- pa_atomic_store(&i->thread_info.drained, 1);
-
- if (ret >= 0) {
- /* Let's see if we had to apply the volume adjustment
- * ourselves, or if this can be done by the sink for us */
+ /* Let's see if we had to apply the volume adjustment ourselves,
+ * or if this can be done by the sink for us */
- if (do_volume_adj_here)
- /* We had different channel maps, so we already did the adjustment */
- pa_cvolume_reset(volume, i->sink->sample_spec.channels);
- else if (i->thread_info.muted)
- /* We've both the same channel map, so let's have the sink do the adjustment for us*/
- pa_cvolume_mute(volume, i->sink->sample_spec.channels);
- else
- *volume = i->thread_info.volume;
- }
+ if (do_volume_adj_here)
+ /* We had different channel maps, so we already did the adjustment */
+ pa_cvolume_reset(volume, i->sink->sample_spec.channels);
+ else if (i->thread_info.muted)
+ /* We've both the same channel map, so let's have the sink do the adjustment for us*/
+ pa_cvolume_mute(volume, i->sink->sample_spec.channels);
+ else
+ *volume = i->thread_info.volume;
- return ret;
+ return 0;
}
/* Called from thread context */
-void pa_sink_input_drop(pa_sink_input *i, size_t length) {
+void pa_sink_input_drop(pa_sink_input *i, size_t nbytes /* in sink sample spec */) {
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->thread_info.state));
- pa_assert(pa_frame_aligned(length, &i->sink->sample_spec));
- pa_assert(length > 0);
- if (!i->peek || !i->drop || i->thread_info.state == PA_SINK_INPUT_CORKED)
- return;
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->thread_info.state));
+ pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
+ pa_assert(nbytes > 0);
- if (i->thread_info.move_silence > 0) {
+/* pa_log_debug("dropping %lu", (unsigned long) nbytes); */
- if (i->thread_info.move_silence >= length) {
- i->thread_info.move_silence -= length;
- length = 0;
- } else {
- length -= i->thread_info.move_silence;
- i->thread_info.move_silence = 0;
- }
+ pa_memblockq_drop(i->thread_info.render_memblockq, nbytes);
+}
- if (i->thread_info.move_silence <= 0) {
- if (i->thread_info.silence_memblock) {
- pa_memblock_unref(i->thread_info.silence_memblock);
- i->thread_info.silence_memblock = NULL;
- }
- }
+/* Called from thread context */
+void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sample spec */) {
+ size_t lbq;
+ pa_bool_t called = FALSE;
+ pa_sink_input_assert_ref(i);
+
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->thread_info.state));
+ pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
- if (length <= 0)
- return;
+/* pa_log_debug("rewind(%lu, %lu)", (unsigned long) nbytes, (unsigned long) i->thread_info.rewrite_nbytes); */
+
+ lbq = pa_memblockq_get_length(i->thread_info.render_memblockq);
+
+ if (nbytes > 0) {
+ pa_log_debug("Have to rewind %lu bytes on render memblockq.", (unsigned long) nbytes);
+ pa_memblockq_rewind(i->thread_info.render_memblockq, nbytes);
}
- if (i->thread_info.resampled_chunk.memblock) {
- size_t l = length;
+ if (i->thread_info.rewrite_nbytes == (size_t) -1) {
- if (l > i->thread_info.resampled_chunk.length)
- l = i->thread_info.resampled_chunk.length;
+ /* We were asked to drop all buffered data, and rerequest new
+ * data from implementor the next time push() is called */
- i->thread_info.resampled_chunk.index += l;
- i->thread_info.resampled_chunk.length -= l;
+ pa_memblockq_flush_write(i->thread_info.render_memblockq);
- if (i->thread_info.resampled_chunk.length <= 0) {
- pa_memblock_unref(i->thread_info.resampled_chunk.memblock);
- pa_memchunk_reset(&i->thread_info.resampled_chunk);
- }
+ } else if (i->thread_info.rewrite_nbytes > 0) {
+ size_t max_rewrite, amount;
+
+ /* Calculate how much make sense to rewrite at most */
+ max_rewrite = nbytes + lbq;
- length -= l;
+ /* Transform into local domain */
+ if (i->thread_info.resampler)
+ max_rewrite = pa_resampler_request(i->thread_info.resampler, max_rewrite);
+
+ /* Calculate how much of the rewinded data should actually be rewritten */
+ amount = PA_MIN(i->thread_info.rewrite_nbytes, max_rewrite);
+
+ if (amount > 0) {
+ pa_log_debug("Have to rewind %lu bytes on implementor.", (unsigned long) amount);
+
+ /* Tell the implementor */
+ if (i->process_rewind)
+ i->process_rewind(i, amount);
+ called = TRUE;
+
+ /* Convert back to to sink domain */
+ if (i->thread_info.resampler)
+ amount = pa_resampler_result(i->thread_info.resampler, amount);
+
+ if (amount > 0)
+ /* Ok, now update the write pointer */
+ pa_memblockq_seek(i->thread_info.render_memblockq, - ((int64_t) amount), PA_SEEK_RELATIVE);
+
+ if (i->thread_info.rewrite_flush)
+ pa_memblockq_silence(i->thread_info.render_memblockq);
+
+ /* And reset the resampler */
+ if (i->thread_info.resampler)
+ pa_resampler_reset(i->thread_info.resampler);
+ }
}
- if (length > 0) {
+ if (!called)
+ if (i->process_rewind)
+ i->process_rewind(i, 0);
- if (i->thread_info.resampler) {
- /* So, we have a resampler. To avoid discontinuities we
- * have to actually read all data that could be read and
- * pass it through the resampler. */
+ i->thread_info.rewrite_nbytes = 0;
+ i->thread_info.rewrite_flush = FALSE;
+}
- while (length > 0) {
- pa_memchunk chunk;
- pa_cvolume volume;
+/* Called from thread context */
+void pa_sink_input_update_max_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */) {
+ pa_sink_input_assert_ref(i);
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->thread_info.state));
+ pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
- if (pa_sink_input_peek(i, length, &chunk, &volume) >= 0) {
- size_t l;
+ pa_memblockq_set_maxrewind(i->thread_info.render_memblockq, nbytes);
- pa_memblock_unref(chunk.memblock);
+ if (i->update_max_rewind)
+ i->update_max_rewind(i, i->thread_info.resampler ? pa_resampler_request(i->thread_info.resampler, nbytes) : nbytes);
+}
- l = chunk.length;
- if (l > length)
- l = length;
+/* Called from thread context */
+void pa_sink_input_update_max_request(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */) {
+ pa_sink_input_assert_ref(i);
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->thread_info.state));
+ pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
- pa_sink_input_drop(i, l);
- length -= l;
+ if (i->update_max_request)
+ i->update_max_request(i, i->thread_info.resampler ? pa_resampler_request(i->thread_info.resampler, nbytes) : nbytes);
+}
- } else {
- size_t l;
+/* Called from thread context */
+static pa_usec_t fixup_latency(pa_sink *s, pa_usec_t usec) {
+ pa_sink_assert_ref(s);
- l = pa_resampler_request(i->thread_info.resampler, length);
+ if (usec == (pa_usec_t) -1)
+ return usec;
- /* Hmmm, peeking failed, so let's at least drop
- * the right amount of data */
+ if (s->thread_info.max_latency > 0 && usec > s->thread_info.max_latency)
+ usec = s->thread_info.max_latency;
- if (l > 0)
- if (i->drop)
- i->drop(i, l);
+ if (s->thread_info.min_latency > 0 && usec < s->thread_info.min_latency)
+ usec = s->thread_info.min_latency;
- break;
- }
- }
+ return usec;
+}
- } else {
+/* Called from thread context */
+pa_usec_t pa_sink_input_set_requested_latency_within_thread(pa_sink_input *i, pa_usec_t usec) {
+ pa_sink_input_assert_ref(i);
- /* We have no resampler, hence let's just drop the data */
+ usec = fixup_latency(i->sink, usec);
+ i->thread_info.requested_sink_latency = usec;
+ pa_sink_invalidate_requested_latency(i->sink);
- if (i->drop)
- i->drop(i, length);
- }
- }
+ return usec;
+}
+
+/* Called from main context */
+pa_usec_t pa_sink_input_set_requested_latency(pa_sink_input *i, pa_usec_t usec) {
+ pa_sink_input_assert_ref(i);
+
+ if (PA_SINK_INPUT_IS_LINKED(i->state))
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY, &usec, 0, NULL) == 0);
+ else
+ /* If this sink input is not realized yet, we have to touch
+ * the thread info data directly */
+
+ i->thread_info.requested_sink_latency = usec;
+
+ return usec;
}
+/* Called from main context */
+pa_usec_t pa_sink_input_get_requested_latency(pa_sink_input *i) {
+ pa_usec_t usec = 0;
+
+ pa_sink_input_assert_ref(i);
+
+ if (PA_SINK_INPUT_IS_LINKED(i->state))
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_GET_REQUESTED_LATENCY, &usec, 0, NULL) == 0);
+ else
+ /* If this sink input is not realized yet, we have to touch
+ * the thread info data directly */
+ usec = i->thread_info.requested_sink_latency;
+
+ return usec;
+}
+
+/* Called from main context */
void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume) {
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
+ pa_assert(volume);
if (pa_cvolume_equal(&i->volume, volume))
return;
i->volume = *volume;
- pa_asyncmsgq_post(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME, pa_xnewdup(struct pa_cvolume, volume, 1), 0, NULL, pa_xfree);
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME, &i->volume, 0, NULL) == 0);
pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
}
+/* Called from main context */
const pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
return &i->volume;
}
+/* Called from main context */
void pa_sink_input_set_mute(pa_sink_input *i, pa_bool_t mute) {
pa_assert(i);
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
if (!i->muted == !mute)
return;
@@ -676,23 +820,26 @@ void pa_sink_input_set_mute(pa_sink_input *i, pa_bool_t mute) {
pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
}
-int pa_sink_input_get_mute(pa_sink_input *i) {
+/* Called from main context */
+pa_bool_t pa_sink_input_get_mute(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
- return !!i->muted;
+ return i->muted;
}
+/* Called from main context */
void pa_sink_input_cork(pa_sink_input *i, pa_bool_t b) {
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
sink_input_set_state(i, b ? PA_SINK_INPUT_CORKED : PA_SINK_INPUT_RUNNING);
}
+/* Called from main context */
int pa_sink_input_set_rate(pa_sink_input *i, uint32_t rate) {
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
pa_return_val_if_fail(i->thread_info.resampler, -1);
if (i->sample_spec.rate == rate)
@@ -706,39 +853,46 @@ int pa_sink_input_set_rate(pa_sink_input *i, uint32_t rate) {
return 0;
}
+/* Called from main context */
void pa_sink_input_set_name(pa_sink_input *i, const char *name) {
+ const char *old;
pa_sink_input_assert_ref(i);
- if (!i->name && !name)
+ if (!name && !pa_proplist_contains(i->proplist, PA_PROP_MEDIA_NAME))
return;
- if (i->name && name && !strcmp(i->name, name))
+ old = pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME);
+
+ if (old && name && !strcmp(old, name))
return;
- pa_xfree(i->name);
- i->name = pa_xstrdup(name);
+ if (name)
+ pa_proplist_sets(i->proplist, PA_PROP_MEDIA_NAME, name);
+ else
+ pa_proplist_unset(i->proplist, PA_PROP_MEDIA_NAME);
- if (PA_SINK_INPUT_LINKED(i->state)) {
- pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_NAME_CHANGED], i);
+ if (PA_SINK_INPUT_IS_LINKED(i->state)) {
+ pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_PROPLIST_CHANGED], i);
pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
}
}
+/* Called from main context */
pa_resample_method_t pa_sink_input_get_resample_method(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
return i->resample_method;
}
-int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
+/* Called from main context */
+int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest) {
pa_resampler *new_resampler;
pa_sink *origin;
- pa_usec_t silence_usec = 0;
- pa_sink_input_move_info info;
pa_sink_input_move_hook_data hook_data;
+ pa_source_output *o, *p = NULL;
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->state));
+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
pa_sink_assert_ref(dest);
origin = i->sink;
@@ -759,6 +913,13 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
return -1;
}
+ /* Kill directly connected outputs */
+ while ((o = pa_idxset_first(i->direct_outputs, NULL))) {
+ pa_assert(o != p);
+ pa_source_output_kill(o);
+ p = o;
+ }
+
if (i->thread_info.resampler &&
pa_sample_spec_equal(&origin->sample_spec, &dest->sample_spec) &&
pa_channel_map_equal(&origin->channel_map, &dest->channel_map))
@@ -790,71 +951,7 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
hook_data.destination = dest;
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_MOVE], &hook_data);
- memset(&info, 0, sizeof(info));
- info.sink_input = i;
-
- if (!immediately) {
- pa_usec_t old_latency, new_latency;
-
- /* Let's do a little bit of Voodoo for compensating latency
- * differences. We assume that the accuracy for our
- * estimations is still good enough, even though we do these
- * operations non-atomic. */
-
- old_latency = pa_sink_get_latency(origin);
- new_latency = pa_sink_get_latency(dest);
-
- /* The already resampled data should go to the old sink */
-
- if (old_latency >= new_latency) {
-
- /* The latency of the old sink is larger than the latency
- * of the new sink. Therefore to compensate for the
- * difference we to play silence on the new one for a
- * while */
-
- silence_usec = old_latency - new_latency;
-
- } else {
-
- /* The latency of new sink is larger than the latency of
- * the old sink. Therefore we have to precompute a little
- * and make sure that this is still played on the old
- * sink, until we can play the first sample on the new
- * sink.*/
-
- info.buffer_bytes = pa_usec_to_bytes(new_latency - old_latency, &origin->sample_spec);
- }
-
- /* Okey, let's move it */
-
- if (info.buffer_bytes > 0) {
-
- info.ghost_sink_input = pa_memblockq_sink_input_new(
- origin,
- "Ghost Stream",
- &origin->sample_spec,
- &origin->channel_map,
- NULL,
- NULL);
-
- info.ghost_sink_input->thread_info.state = info.ghost_sink_input->state = PA_SINK_INPUT_RUNNING;
- info.ghost_sink_input->thread_info.volume = info.ghost_sink_input->volume;
- info.ghost_sink_input->thread_info.muted = info.ghost_sink_input->muted;
-
- info.buffer = pa_memblockq_new(0, MOVE_BUFFER_LENGTH, 0, pa_frame_size(&origin->sample_spec), 0, 0, NULL);
- }
- }
-
- pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_REMOVE_INPUT_AND_BUFFER, &info, 0, NULL);
-
- if (info.ghost_sink_input) {
- /* Basically, do what pa_sink_input_put() does ...*/
-
- pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, info.ghost_sink_input->index);
- pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_PUT], info.ghost_sink_input);
- pa_sink_input_unref(info.ghost_sink_input);
- }
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_START_MOVE, i, 0, NULL) == 0);
pa_idxset_remove_by_data(origin->inputs, i, NULL);
pa_idxset_put(dest->inputs, i, NULL);
@@ -865,42 +962,31 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
dest->n_corked++;
}
- /* Replace resampler */
+ /* Replace resampler and render queue */
if (new_resampler != i->thread_info.resampler) {
+
if (i->thread_info.resampler)
pa_resampler_free(i->thread_info.resampler);
i->thread_info.resampler = new_resampler;
- /* if the resampler changed, the silence memblock is
- * probably invalid now, too */
- if (i->thread_info.silence_memblock) {
- pa_memblock_unref(i->thread_info.silence_memblock);
- i->thread_info.silence_memblock = NULL;
- }
- }
-
- /* Dump already resampled data */
- if (i->thread_info.resampled_chunk.memblock) {
- /* Hmm, this data has already been added to the ghost queue, presumably, hence let's sleep a little bit longer */
- silence_usec += pa_bytes_to_usec(i->thread_info.resampled_chunk.length, &origin->sample_spec);
- pa_memblock_unref(i->thread_info.resampled_chunk.memblock);
- pa_memchunk_reset(&i->thread_info.resampled_chunk);
+ pa_memblockq_free(i->thread_info.render_memblockq);
+
+ i->thread_info.render_memblockq = pa_memblockq_new(
+ 0,
+ MEMBLOCKQ_MAXLENGTH,
+ 0,
+ pa_frame_size(&i->sink->sample_spec),
+ 0,
+ 1,
+ 0,
+ &i->sink->silence);
}
- /* Calculate the new sleeping time */
- if (immediately)
- i->thread_info.move_silence = 0;
- else
- i->thread_info.move_silence = pa_usec_to_bytes(
- pa_bytes_to_usec(i->thread_info.move_silence, &origin->sample_spec) +
- silence_usec,
- &dest->sample_spec);
-
- pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_ADD_INPUT, i, 0, NULL);
-
pa_sink_update_status(origin);
pa_sink_update_status(dest);
+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_FINISH_MOVE, i, 0, NULL) == 0);
+
if (i->moved)
i->moved(i);
@@ -914,30 +1000,72 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
return 0;
}
-/* Called from thread context */
+/* Called from IO thread context */
+void pa_sink_input_set_state_within_thread(pa_sink_input *i, pa_sink_input_state_t state) {
+ pa_bool_t corking, uncorking;
+ pa_sink_input_assert_ref(i);
+
+ if (state == i->thread_info.state)
+ return;
+
+ if ((state == PA_SINK_INPUT_DRAINED || state == PA_SINK_INPUT_RUNNING) &&
+ !(i->thread_info.state == PA_SINK_INPUT_DRAINED || i->thread_info.state != PA_SINK_INPUT_RUNNING))
+ pa_atomic_store(&i->thread_info.drained, 1);
+
+ corking = state == PA_SINK_INPUT_CORKED && i->thread_info.state == PA_SINK_INPUT_RUNNING;
+ uncorking = i->thread_info.state == PA_SINK_INPUT_CORKED && state == PA_SINK_INPUT_RUNNING;
+
+ if (i->state_change)
+ i->state_change(i, state);
+
+ i->thread_info.state = state;
+
+ if (corking) {
+
+ pa_log_debug("Requesting rewind due to corking");
+
+ /* This will tell the implementing sink input driver to rewind
+ * so that the unplayed already mixed data is not lost */
+ pa_sink_input_request_rewind(i, 0, TRUE, TRUE);
+
+ } else if (uncorking) {
+
+ i->thread_info.underrun_for = (uint64_t) -1;
+ i->thread_info.playing_for = 0;
+
+ pa_log_debug("Requesting rewind due to uncorking");
+
+ /* OK, we're being uncorked. Make sure we're not rewound when
+ * the hw buffer is remixed and request a remix. */
+ pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
+ }
+}
+
+/* Called from thread context, except when it is not. */
int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk) {
pa_sink_input *i = PA_SINK_INPUT(o);
-
pa_sink_input_assert_ref(i);
- pa_assert(PA_SINK_INPUT_LINKED(i->thread_info.state));
switch (code) {
+
case PA_SINK_INPUT_MESSAGE_SET_VOLUME:
i->thread_info.volume = *((pa_cvolume*) userdata);
+ pa_sink_input_request_rewind(i, 0, TRUE, FALSE);
return 0;
case PA_SINK_INPUT_MESSAGE_SET_MUTE:
i->thread_info.muted = PA_PTR_TO_UINT(userdata);
+ pa_sink_input_request_rewind(i, 0, TRUE, FALSE);
return 0;
case PA_SINK_INPUT_MESSAGE_GET_LATENCY: {
pa_usec_t *r = userdata;
+ pa_usec_t sink_usec = 0;
- if (i->thread_info.resampled_chunk.memblock)
- *r += pa_bytes_to_usec(i->thread_info.resampled_chunk.length, &i->sink->sample_spec);
+ r[0] += pa_bytes_to_usec(pa_memblockq_get_length(i->thread_info.render_memblockq), &i->sink->sample_spec);
- if (i->thread_info.move_silence)
- *r += pa_bytes_to_usec(i->thread_info.move_silence, &i->sink->sample_spec);
+ if (i->sink->parent.process_msg(PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_GET_LATENCY, &sink_usec, 0, NULL) >= 0)
+ r[1] += sink_usec;
return 0;
}
@@ -952,26 +1080,28 @@ int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t
case PA_SINK_INPUT_MESSAGE_SET_STATE: {
pa_sink_input *ssync;
- if ((PA_PTR_TO_UINT(userdata) == PA_SINK_INPUT_DRAINED || PA_PTR_TO_UINT(userdata) == PA_SINK_INPUT_RUNNING) &&
- (i->thread_info.state != PA_SINK_INPUT_DRAINED) && (i->thread_info.state != PA_SINK_INPUT_RUNNING))
- pa_atomic_store(&i->thread_info.drained, 1);
+ pa_sink_input_set_state_within_thread(i, PA_PTR_TO_UINT(userdata));
- i->thread_info.state = PA_PTR_TO_UINT(userdata);
+ for (ssync = i->thread_info.sync_prev; ssync; ssync = ssync->thread_info.sync_prev)
+ pa_sink_input_set_state_within_thread(ssync, PA_PTR_TO_UINT(userdata));
- for (ssync = i->thread_info.sync_prev; ssync; ssync = ssync->thread_info.sync_prev) {
- if ((PA_PTR_TO_UINT(userdata) == PA_SINK_INPUT_DRAINED || PA_PTR_TO_UINT(userdata) == PA_SINK_INPUT_RUNNING) &&
- (ssync->thread_info.state != PA_SINK_INPUT_DRAINED) && (ssync->thread_info.state != PA_SINK_INPUT_RUNNING))
- pa_atomic_store(&ssync->thread_info.drained, 1);
- ssync->thread_info.state = PA_PTR_TO_UINT(userdata);
- }
+ for (ssync = i->thread_info.sync_next; ssync; ssync = ssync->thread_info.sync_next)
+ pa_sink_input_set_state_within_thread(ssync, PA_PTR_TO_UINT(userdata));
- for (ssync = i->thread_info.sync_next; ssync; ssync = ssync->thread_info.sync_next) {
- if ((PA_PTR_TO_UINT(userdata) == PA_SINK_INPUT_DRAINED || PA_PTR_TO_UINT(userdata) == PA_SINK_INPUT_RUNNING) &&
- (ssync->thread_info.state != PA_SINK_INPUT_DRAINED) && (ssync->thread_info.state != PA_SINK_INPUT_RUNNING))
- pa_atomic_store(&ssync->thread_info.drained, 1);
- ssync->thread_info.state = PA_PTR_TO_UINT(userdata);
- }
+ return 0;
+ }
+
+ case PA_SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY: {
+ pa_usec_t *usec = userdata;
+ *usec = pa_sink_input_set_requested_latency_within_thread(i, *usec);
+ return 0;
+ }
+
+ case PA_SINK_INPUT_MESSAGE_GET_REQUESTED_LATENCY: {
+ pa_usec_t *r = userdata;
+
+ *r = i->thread_info.requested_sink_latency;
return 0;
}
}
@@ -979,6 +1109,7 @@ int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t
return -1;
}
+/* Called from main thread */
pa_sink_input_state_t pa_sink_input_get_state(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
@@ -987,3 +1118,93 @@ pa_sink_input_state_t pa_sink_input_get_state(pa_sink_input *i) {
return i->state;
}
+
+/* Called from IO context */
+pa_bool_t pa_sink_input_safe_to_remove(pa_sink_input *i) {
+ pa_sink_input_assert_ref(i);
+
+ if (PA_SINK_INPUT_IS_LINKED(i->thread_info.state))
+ return pa_memblockq_is_empty(i->thread_info.render_memblockq);
+
+ return TRUE;
+}
+
+/* Called from IO context */
+void pa_sink_input_request_rewind(pa_sink_input *i, size_t nbytes /* in our sample spec */, pa_bool_t rewrite, pa_bool_t flush) {
+ size_t lbq;
+
+ /* If 'rewrite' is TRUE the sink is rewound as far as requested
+ * and possible and the exact value of this is passed back the
+ * implementor via process_rewind(). If 'flush' is also TRUE all
+ * already rendered data is also dropped.
+ *
+ * If 'rewrite' is FALSE the sink is rewound as far as requested
+ * and possible and the already rendered data is dropped so that
+ * in the next iteration we read new data from the
+ * implementor. This implies 'flush' is TRUE. */
+
+ pa_sink_input_assert_ref(i);
+ pa_assert(i->thread_info.rewrite_nbytes == 0);
+
+/* pa_log_debug("request rewrite %lu", (unsigned long) nbytes); */
+
+ /* We don't take rewind requests while we are corked */
+ if (i->thread_info.state == PA_SINK_INPUT_CORKED)
+ return;
+
+ pa_assert(rewrite || flush);
+
+ /* Calculate how much we can rewind locally without having to
+ * touch the sink */
+ if (rewrite)
+ lbq = pa_memblockq_get_length(i->thread_info.render_memblockq);
+ else
+ lbq = 0;
+
+ /* Check if rewinding for the maximum is requested, and if so, fix up */
+ if (nbytes <= 0) {
+
+ /* Calculate maximum number of bytes that could be rewound in theory */
+ nbytes = i->sink->thread_info.max_rewind + lbq;
+
+ /* Transform from sink domain */
+ if (i->thread_info.resampler)
+ nbytes = pa_resampler_request(i->thread_info.resampler, nbytes);
+ }
+
+ if (rewrite) {
+ /* Make sure to not overwrite over underruns */
+ if (nbytes > i->thread_info.playing_for)
+ nbytes = (size_t) i->thread_info.playing_for;
+
+ i->thread_info.rewrite_nbytes = nbytes;
+ } else
+ i->thread_info.rewrite_nbytes = (size_t) -1;
+
+ i->thread_info.rewrite_flush = flush && i->thread_info.rewrite_nbytes != 0;
+
+ /* Transform to sink domain */
+ if (i->thread_info.resampler)
+ nbytes = pa_resampler_result(i->thread_info.resampler, nbytes);
+
+ if (nbytes > lbq)
+ pa_sink_request_rewind(i->sink, nbytes - lbq);
+ else
+ /* This call will make sure process_rewind() is called later */
+ pa_sink_request_rewind(i->sink, 0);
+}
+
+/* Called from main context */
+pa_memchunk* pa_sink_input_get_silence(pa_sink_input *i, pa_memchunk *ret) {
+ pa_sink_input_assert_ref(i);
+ pa_assert(ret);
+
+ pa_silence_memchunk_get(
+ &i->sink->core->silence_cache,
+ i->sink->core->mempool,
+ ret,
+ &i->sample_spec,
+ i->thread_info.resampler ? pa_resampler_max_block_size(i->thread_info.resampler) : 0);
+
+ return ret;
+}
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index 3cbb28c..7663f22 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -1,8 +1,6 @@
#ifndef foopulsesinkinputhfoo
#define foopulsesinkinputhfoo
-/* $Id: sink-input.h 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -46,7 +44,7 @@ typedef enum pa_sink_input_state {
PA_SINK_INPUT_UNLINKED /*< The stream is dead */
} pa_sink_input_state_t;
-static inline pa_bool_t PA_SINK_INPUT_LINKED(pa_sink_input_state_t x) {
+static inline pa_bool_t PA_SINK_INPUT_IS_LINKED(pa_sink_input_state_t x) {
return x == PA_SINK_INPUT_DRAINED || x == PA_SINK_INPUT_RUNNING || x == PA_SINK_INPUT_CORKED;
}
@@ -73,12 +71,19 @@ struct pa_sink_input {
pa_sink_input_state_t state;
pa_sink_input_flags_t flags;
- char *name, *driver; /* may be NULL */
+ char *driver; /* may be NULL */
+ pa_proplist *proplist;
+
pa_module *module; /* may be NULL */
pa_client *client; /* may be NULL */
pa_sink *sink;
+ /* A sink input may be connected to multiple source outputs
+ * directly, so that they don't get mixed data of the entire
+ * source. */
+ pa_idxset *direct_outputs;
+
pa_sample_spec sample_spec;
pa_channel_map channel_map;
@@ -87,17 +92,38 @@ struct pa_sink_input {
pa_cvolume volume;
pa_bool_t muted;
- /* Returns the chunk of audio data (but doesn't drop it
- * yet!). Returns -1 on failure. Called from IO thread context. If
- * data needs to be generated from scratch then please in the
- * specified length. This is an optimization only. If less data is
- * available, it's fine to return a smaller block. If more data is
- * already ready, it is better to return the full block.*/
- int (*peek) (pa_sink_input *i, size_t length, pa_memchunk *chunk);
+ pa_resample_method_t resample_method;
- /* Drops the specified number of bytes, usually called right after
- * peek(), but not necessarily. Called from IO thread context. */
- void (*drop) (pa_sink_input *i, size_t length);
+ /* Returns the chunk of audio data and drops it from the
+ * queue. Returns -1 on failure. Called from IO thread context. If
+ * data needs to be generated from scratch then please in the
+ * specified length request_nbytes. This is an optimization
+ * only. If less data is available, it's fine to return a smaller
+ * block. If more data is already ready, it is better to return
+ * the full block. */
+ int (*pop) (pa_sink_input *i, size_t request_nbytes, pa_memchunk *chunk); /* may NOT be NULL */
+
+ /* Rewind the queue by the specified number of bytes. Called just
+ * before peek() if it is called at all. Only called if the sink
+ * input driver ever plans to call
+ * pa_sink_input_request_rewind(). Called from IO context. */
+ void (*process_rewind) (pa_sink_input *i, size_t nbytes); /* may NOT be NULL */
+
+ /* Called whenever the maximum rewindable size of the sink
+ * changes. Called from IO context. */
+ void (*update_max_rewind) (pa_sink_input *i, size_t nbytes); /* may be NULL */
+
+ /* Called whenever the maxiumum request size of the sink
+ * changes. Called from IO context. */
+ void (*update_max_request) (pa_sink_input *i, size_t nbytes); /* may be NULL */
+
+ /* Called whenever the configured latency of the sink
+ * changes. Called from IO context. */
+ void (*update_sink_requested_latency) (pa_sink_input *i); /* may be NULL */
+
+ /* Called whenver the latency range of the sink changes. Called
+ * from IO context. */
+ void (*update_sink_latency_range) (pa_sink_input *i); /* may be NULL */
/* If non-NULL this function is called when the input is first
* connected to a sink or when the rtpoll/asyncmsgq fields
@@ -120,15 +146,17 @@ struct pa_sink_input {
/* Supposed to unlink and destroy this stream. Called from main
* context. */
- void (*kill) (pa_sink_input *i); /* may be NULL */
+ void (*kill) (pa_sink_input *i); /* may NOT be NULL */
/* Return the current latency (i.e. length of bufferd audio) of
- this stream. Called from main context. If NULL a
- PA_SINK_INPUT_MESSAGE_GET_LATENCY message is sent to the IO thread
- instead. */
+ this stream. Called from main context. This is added to what the
+ PA_SINK_INPUT_MESSAGE_GET_LATENCY message sent to the IO thread
+ returns */
pa_usec_t (*get_latency) (pa_sink_input *i); /* may be NULL */
- pa_resample_method_t resample_method;
+ /* If non_NULL this function is called from thread context if the
+ * state changes. The old state is found in thread_info.state. */
+ void (*state_change) (pa_sink_input *i, pa_sink_input_state_t state); /* may be NULL */
struct {
pa_sink_input_state_t state;
@@ -138,19 +166,24 @@ struct pa_sink_input {
pa_sample_spec sample_spec;
- pa_memchunk resampled_chunk;
pa_resampler *resampler; /* may be NULL */
- /* Some silence to play before the actual data. This is used to
- * compensate for latency differences when moving a sink input
- * "hot" between sinks. */
- size_t move_silence;
- pa_memblock *silence_memblock; /* may be NULL */
+ /* We maintain a history of resampled audio data here. */
+ pa_memblockq *render_memblockq;
+
+ size_t rewrite_nbytes;
+ pa_bool_t rewrite_flush;
+ uint64_t underrun_for, playing_for;
pa_sink_input *sync_prev, *sync_next;
pa_cvolume volume;
pa_bool_t muted;
+
+ /* The requested latency for the sink */
+ pa_usec_t requested_sink_latency;
+
+ pa_hashmap *direct_outputs;
} thread_info;
void *userdata;
@@ -165,41 +198,46 @@ enum {
PA_SINK_INPUT_MESSAGE_GET_LATENCY,
PA_SINK_INPUT_MESSAGE_SET_RATE,
PA_SINK_INPUT_MESSAGE_SET_STATE,
+ PA_SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY,
+ PA_SINK_INPUT_MESSAGE_GET_REQUESTED_LATENCY,
PA_SINK_INPUT_MESSAGE_MAX
};
typedef struct pa_sink_input_new_data {
- const char *name, *driver;
+ pa_proplist *proplist;
+
+ const char *driver;
pa_module *module;
pa_client *client;
pa_sink *sink;
+ pa_resample_method_t resample_method;
+
+ pa_sink_input *sync_base;
+
pa_sample_spec sample_spec;
- pa_bool_t sample_spec_is_set;
pa_channel_map channel_map;
- pa_bool_t channel_map_is_set;
-
pa_cvolume volume;
- pa_bool_t volume_is_set;
- pa_bool_t muted;
- pa_bool_t muted_is_set;
+ pa_bool_t muted:1;
- pa_resample_method_t resample_method;
-
- pa_sink_input *sync_base;
+ pa_bool_t sample_spec_is_set:1;
+ pa_bool_t channel_map_is_set:1;
+ pa_bool_t volume_is_set:1;
+ pa_bool_t muted_is_set:1;
} pa_sink_input_new_data;
-typedef struct pa_sink_input_move_hook_data {
- pa_sink_input *sink_input;
- pa_sink *destination;
-} pa_sink_input_move_hook_data;
-
pa_sink_input_new_data* pa_sink_input_new_data_init(pa_sink_input_new_data *data);
void pa_sink_input_new_data_set_sample_spec(pa_sink_input_new_data *data, const pa_sample_spec *spec);
void pa_sink_input_new_data_set_channel_map(pa_sink_input_new_data *data, const pa_channel_map *map);
void pa_sink_input_new_data_set_volume(pa_sink_input_new_data *data, const pa_cvolume *volume);
void pa_sink_input_new_data_set_muted(pa_sink_input_new_data *data, pa_bool_t mute);
+void pa_sink_input_new_data_done(pa_sink_input_new_data *data);
+
+typedef struct pa_sink_input_move_hook_data {
+ pa_sink_input *sink_input;
+ pa_sink *destination;
+} pa_sink_input_move_hook_data;
/* To be called by the implementing module only */
@@ -213,39 +251,57 @@ void pa_sink_input_unlink(pa_sink_input* i);
void pa_sink_input_set_name(pa_sink_input *i, const char *name);
-/* Callable by everyone */
+pa_usec_t pa_sink_input_set_requested_latency(pa_sink_input *i, pa_usec_t usec);
+
+/* Request that the specified number of bytes already written out to
+the hw device is rewritten, if possible. Please note that this is
+only a kind request. The sink driver may not be able to fulfill it
+fully -- or at all. If the request for a rewrite was successful, the
+sink driver will call ->rewind() and pass the number of bytes that
+could be rewound in the HW device. This functionality is required for
+implementing the "zero latency" write-through functionality. */
+void pa_sink_input_request_rewind(pa_sink_input *i, size_t nbytes, pa_bool_t rewrite, pa_bool_t flush);
+
+void pa_sink_input_cork(pa_sink_input *i, pa_bool_t b);
+
+int pa_sink_input_set_rate(pa_sink_input *i, uint32_t rate);
+
+/* Callable by everyone from main thread*/
/* External code may request disconnection with this function */
void pa_sink_input_kill(pa_sink_input*i);
-pa_usec_t pa_sink_input_get_latency(pa_sink_input *i);
+pa_usec_t pa_sink_input_get_latency(pa_sink_input *i, pa_usec_t *sink_latency);
void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume);
const pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i);
void pa_sink_input_set_mute(pa_sink_input *i, pa_bool_t mute);
-int pa_sink_input_get_mute(pa_sink_input *i);
-
-void pa_sink_input_cork(pa_sink_input *i, pa_bool_t b);
-
-int pa_sink_input_set_rate(pa_sink_input *i, uint32_t rate);
+pa_bool_t pa_sink_input_get_mute(pa_sink_input *i);
pa_resample_method_t pa_sink_input_get_resample_method(pa_sink_input *i);
-int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately);
+int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest);
pa_sink_input_state_t pa_sink_input_get_state(pa_sink_input *i);
-/* To be used exclusively by the sink driver thread */
+pa_usec_t pa_sink_input_get_requested_latency(pa_sink_input *i);
+
+/* To be used exclusively by the sink driver IO thread */
int pa_sink_input_peek(pa_sink_input *i, size_t length, pa_memchunk *chunk, pa_cvolume *volume);
void pa_sink_input_drop(pa_sink_input *i, size_t length);
+void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */);
+void pa_sink_input_update_max_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */);
+void pa_sink_input_update_max_request(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */);
+
+void pa_sink_input_set_state_within_thread(pa_sink_input *i, pa_sink_input_state_t state);
+
int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk);
-typedef struct pa_sink_input_move_info {
- pa_sink_input *sink_input;
- pa_sink_input *ghost_sink_input;
- pa_memblockq *buffer;
- size_t buffer_bytes;
-} pa_sink_input_move_info;
+pa_usec_t pa_sink_input_set_requested_latency_within_thread(pa_sink_input *i, pa_usec_t usec);
+
+pa_bool_t pa_sink_input_safe_to_remove(pa_sink_input *i);
+
+pa_memchunk* pa_sink_input_get_silence(pa_sink_input *i, pa_memchunk *ret);
#endif
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 732ba76..e04fc08 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1,5 +1,3 @@
-/* $Id: sink.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,6 +31,7 @@
#include <pulse/introspect.h>
#include <pulse/utf8.h>
#include <pulse/xmalloc.h>
+#include <pulse/timeval.h>
#include <pulsecore/sink-input.h>
#include <pulsecore/namereg.h>
@@ -47,43 +46,130 @@
#define MAX_MIX_CHANNELS 32
#define MIX_BUFFER_LENGTH (PA_PAGE_SIZE)
-#define SILENCE_BUFFER_LENGTH (PA_PAGE_SIZE*12)
+#define DEFAULT_MIN_LATENCY (4*PA_USEC_PER_MSEC)
static PA_DEFINE_CHECK_TYPE(pa_sink, pa_msgobject);
static void sink_free(pa_object *s);
+pa_sink_new_data* pa_sink_new_data_init(pa_sink_new_data *data) {
+ pa_assert(data);
+
+ memset(data, 0, sizeof(*data));
+ data->proplist = pa_proplist_new();
+
+ return data;
+}
+
+void pa_sink_new_data_set_name(pa_sink_new_data *data, const char *name) {
+ pa_assert(data);
+
+ pa_xfree(data->name);
+ data->name = pa_xstrdup(name);
+}
+
+void pa_sink_new_data_set_sample_spec(pa_sink_new_data *data, const pa_sample_spec *spec) {
+ pa_assert(data);
+
+ if ((data->sample_spec_is_set = !!spec))
+ data->sample_spec = *spec;
+}
+
+void pa_sink_new_data_set_channel_map(pa_sink_new_data *data, const pa_channel_map *map) {
+ pa_assert(data);
+
+ if ((data->channel_map_is_set = !!map))
+ data->channel_map = *map;
+}
+
+void pa_sink_new_data_set_volume(pa_sink_new_data *data, const pa_cvolume *volume) {
+ pa_assert(data);
+
+ if ((data->volume_is_set = !!volume))
+ data->volume = *volume;
+}
+
+void pa_sink_new_data_set_muted(pa_sink_new_data *data, pa_bool_t mute) {
+ pa_assert(data);
+
+ data->muted_is_set = TRUE;
+ data->muted = !!mute;
+}
+
+void pa_sink_new_data_done(pa_sink_new_data *data) {
+ pa_assert(data);
+
+ pa_xfree(data->name);
+ pa_proplist_free(data->proplist);
+}
+
+/* Called from main context */
+static void reset_callbacks(pa_sink *s) {
+ pa_assert(s);
+
+ s->set_state = NULL;
+ s->get_volume = NULL;
+ s->set_volume = NULL;
+ s->get_mute = NULL;
+ s->set_mute = NULL;
+ s->request_rewind = NULL;
+ s->update_requested_latency = NULL;
+}
+
+/* Called from main context */
pa_sink* pa_sink_new(
pa_core *core,
- const char *driver,
- const char *name,
- int fail,
- const pa_sample_spec *spec,
- const pa_channel_map *map) {
+ pa_sink_new_data *data,
+ pa_sink_flags_t flags) {
pa_sink *s;
- char *n = NULL;
- char st[256];
- pa_channel_map tmap;
+ const char *name;
+ char st[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ pa_source_new_data source_data;
+ const char *dn;
pa_assert(core);
- pa_assert(name);
- pa_assert(spec);
+ pa_assert(data);
+ pa_assert(data->name);
- pa_return_null_if_fail(pa_sample_spec_valid(spec));
+ s = pa_msgobject_new(pa_sink);
- if (!map)
- pa_return_null_if_fail((map = pa_channel_map_init_auto(&tmap, spec->channels, PA_CHANNEL_MAP_DEFAULT)));
+ if (!(name = pa_namereg_register(core, data->name, PA_NAMEREG_SINK, s, data->namereg_fail))) {
+ pa_xfree(s);
+ return NULL;
+ }
- pa_return_null_if_fail(map && pa_channel_map_valid(map));
- pa_return_null_if_fail(map->channels == spec->channels);
- pa_return_null_if_fail(!driver || pa_utf8_valid(driver));
- pa_return_null_if_fail(name && pa_utf8_valid(name) && *name);
+ pa_sink_new_data_set_name(data, name);
- s = pa_msgobject_new(pa_sink);
+ if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_SINK_NEW], data) < 0) {
+ pa_xfree(s);
+ pa_namereg_unregister(core, name);
+ return NULL;
+ }
+
+ pa_return_null_if_fail(!data->driver || pa_utf8_valid(data->driver));
+ pa_return_null_if_fail(data->name && pa_utf8_valid(data->name) && data->name[0]);
+
+ pa_return_null_if_fail(data->sample_spec_is_set && pa_sample_spec_valid(&data->sample_spec));
+
+ if (!data->channel_map_is_set)
+ pa_return_null_if_fail(pa_channel_map_init_auto(&data->channel_map, data->sample_spec.channels, PA_CHANNEL_MAP_DEFAULT));
+
+ pa_return_null_if_fail(pa_channel_map_valid(&data->channel_map));
+ pa_return_null_if_fail(data->channel_map.channels == data->sample_spec.channels);
+
+ if (!data->volume_is_set)
+ pa_cvolume_reset(&data->volume, data->sample_spec.channels);
+
+ pa_return_null_if_fail(pa_cvolume_valid(&data->volume));
+ pa_return_null_if_fail(data->volume.channels == data->sample_spec.channels);
- if (!(name = pa_namereg_register(core, name, PA_NAMEREG_SINK, s, fail))) {
+ if (!data->muted_is_set)
+ data->muted = FALSE;
+
+ if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_SINK_FIXATE], data) < 0) {
pa_xfree(s);
+ pa_namereg_unregister(core, name);
return NULL;
}
@@ -92,80 +178,114 @@ pa_sink* pa_sink_new(
s->core = core;
s->state = PA_SINK_INIT;
- s->flags = 0;
+ s->flags = flags;
s->name = pa_xstrdup(name);
- s->description = NULL;
- s->driver = pa_xstrdup(driver);
- s->module = NULL;
+ s->proplist = pa_proplist_copy(data->proplist);
+ s->driver = pa_xstrdup(data->driver);
+ s->module = data->module;
- s->sample_spec = *spec;
- s->channel_map = *map;
+ s->sample_spec = data->sample_spec;
+ s->channel_map = data->channel_map;
s->inputs = pa_idxset_new(NULL, NULL);
s->n_corked = 0;
- pa_cvolume_reset(&s->volume, spec->channels);
- s->muted = FALSE;
- s->refresh_volume = s->refresh_mute = FALSE;
+ s->volume = data->volume;
+ s->muted = data->muted;
+ s->refresh_volume = s->refresh_muted = FALSE;
- s->get_latency = NULL;
- s->set_volume = NULL;
- s->get_volume = NULL;
- s->set_mute = NULL;
- s->get_mute = NULL;
- s->set_state = NULL;
+ reset_callbacks(s);
s->userdata = NULL;
s->asyncmsgq = NULL;
s->rtpoll = NULL;
- s->silence = NULL;
+
+ pa_silence_memchunk_get(
+ &core->silence_cache,
+ core->mempool,
+ &s->silence,
+ &s->sample_spec,
+ 0);
+
+ s->thread_info.inputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
+ pa_cvolume_reset(&s->thread_info.soft_volume, s->sample_spec.channels);
+ s->thread_info.soft_muted = FALSE;
+ s->thread_info.state = s->state;
+ s->thread_info.rewind_nbytes = 0;
+ s->thread_info.rewind_requested = FALSE;
+ s->thread_info.max_rewind = 0;
+ s->thread_info.max_request = 0;
+ s->thread_info.requested_latency_valid = FALSE;
+ s->thread_info.requested_latency = 0;
+ s->thread_info.min_latency = DEFAULT_MIN_LATENCY;
+ s->thread_info.max_latency = 0;
pa_assert_se(pa_idxset_put(core->sinks, s, &s->index) >= 0);
- pa_sample_spec_snprint(st, sizeof(st), spec);
- pa_log_info("Created sink %u \"%s\" with sample spec \"%s\"", s->index, s->name, st);
+ pa_log_info("Created sink %u \"%s\" with sample spec %s and channel map %s",
+ s->index,
+ s->name,
+ pa_sample_spec_snprint(st, sizeof(st), &s->sample_spec),
+ pa_channel_map_snprint(cm, sizeof(cm), &s->channel_map));
+
+ pa_source_new_data_init(&source_data);
+ pa_source_new_data_set_sample_spec(&source_data, &s->sample_spec);
+ pa_source_new_data_set_channel_map(&source_data, &s->channel_map);
+ source_data.name = pa_sprintf_malloc("%s.monitor", name);
+ source_data.driver = data->driver;
+ source_data.module = data->module;
+
+ dn = pa_proplist_gets(s->proplist, PA_PROP_DEVICE_DESCRIPTION);
+ pa_proplist_setf(source_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Monitor of %s", dn ? dn : s->name);
+ pa_proplist_sets(source_data.proplist, PA_PROP_DEVICE_CLASS, "monitor");
- n = pa_sprintf_malloc("%s.monitor", name);
+ s->monitor_source = pa_source_new(core, &source_data, 0);
- if (!(s->monitor_source = pa_source_new(core, driver, n, 0, spec, map)))
- pa_log_warn("Failed to create monitor source.");
- else {
- char *d;
- s->monitor_source->monitor_of = s;
- d = pa_sprintf_malloc("Monitor Source of %s", s->name);
- pa_source_set_description(s->monitor_source, d);
- pa_xfree(d);
+ pa_source_new_data_done(&source_data);
+
+ if (!s->monitor_source) {
+ pa_sink_unlink(s);
+ pa_sink_unref(s);
+ return NULL;
}
- pa_xfree(n);
+ s->monitor_source->monitor_of = s;
- s->thread_info.inputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
- s->thread_info.soft_volume = s->volume;
- s->thread_info.soft_muted = s->muted;
- s->thread_info.state = s->state;
+ pa_source_set_latency_range(s->monitor_source, s->thread_info.min_latency, s->thread_info.max_latency);
+ pa_source_set_max_rewind(s->monitor_source, s->thread_info.max_rewind);
return s;
}
+/* Called from main context */
static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
int ret;
pa_bool_t suspend_change;
+ pa_sink_state_t original_state;
pa_assert(s);
if (s->state == state)
return 0;
+ original_state = s->state;
+
suspend_change =
- (s->state == PA_SINK_SUSPENDED && PA_SINK_OPENED(state)) ||
- (PA_SINK_OPENED(s->state) && state == PA_SINK_SUSPENDED);
+ (original_state == PA_SINK_SUSPENDED && PA_SINK_IS_OPENED(state)) ||
+ (PA_SINK_IS_OPENED(original_state) && state == PA_SINK_SUSPENDED);
if (s->set_state)
if ((ret = s->set_state(s, state)) < 0)
- return -1;
+ return ret;
- if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL) < 0)
- return -1;
+ if (s->asyncmsgq)
+ if ((ret = pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL)) < 0) {
+
+ if (s->set_state)
+ s->set_state(s, original_state);
+
+ return ret;
+ }
s->state = state;
@@ -186,21 +306,34 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
return 0;
}
+/* Called from main context */
void pa_sink_put(pa_sink* s) {
pa_sink_assert_ref(s);
pa_assert(s->state == PA_SINK_INIT);
+
+ /* The following fields must be initialized properly when calling _put() */
pa_assert(s->asyncmsgq);
pa_assert(s->rtpoll);
+ pa_assert(!s->thread_info.min_latency || !s->thread_info.max_latency ||
+ s->thread_info.min_latency <= s->thread_info.max_latency);
+
+ if (!(s->flags & PA_SINK_HW_VOLUME_CTRL)) {
+ s->flags |= PA_SINK_DECIBEL_VOLUME;
+
+ s->thread_info.soft_volume = s->volume;
+ s->thread_info.soft_muted = s->muted;
+ }
pa_assert_se(sink_set_state(s, PA_SINK_IDLE) == 0);
pa_source_put(s->monitor_source);
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK | PA_SUBSCRIPTION_EVENT_NEW, s->index);
- pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_NEW_POST], s);
+ pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_PUT], s);
}
+/* Called from main context */
void pa_sink_unlink(pa_sink* s) {
pa_bool_t linked;
pa_sink_input *i, *j = NULL;
@@ -215,7 +348,7 @@ void pa_sink_unlink(pa_sink* s) {
* may be called multiple times on the same sink without bad
* effects. */
- linked = PA_SINK_LINKED(s->state);
+ linked = PA_SINK_IS_LINKED(s->state);
if (linked)
pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_UNLINK], s);
@@ -235,12 +368,7 @@ void pa_sink_unlink(pa_sink* s) {
else
s->state = PA_SINK_UNLINKED;
- s->get_latency = NULL;
- s->get_volume = NULL;
- s->set_volume = NULL;
- s->set_mute = NULL;
- s->get_mute = NULL;
- s->set_state = NULL;
+ reset_callbacks(s);
if (s->monitor_source)
pa_source_unlink(s->monitor_source);
@@ -251,6 +379,7 @@ void pa_sink_unlink(pa_sink* s) {
}
}
+/* Called from main context */
static void sink_free(pa_object *o) {
pa_sink *s = PA_SINK(o);
pa_sink_input *i;
@@ -258,7 +387,7 @@ static void sink_free(pa_object *o) {
pa_assert(s);
pa_assert(pa_sink_refcnt(s) == 0);
- if (PA_SINK_LINKED(s->state))
+ if (PA_SINK_IS_LINKED(s->state))
pa_sink_unlink(s);
pa_log_info("Freeing sink %u \"%s\"", s->index, s->name);
@@ -275,18 +404,21 @@ static void sink_free(pa_object *o) {
pa_hashmap_free(s->thread_info.inputs, NULL, NULL);
- if (s->silence)
- pa_memblock_unref(s->silence);
+ if (s->silence.memblock)
+ pa_memblock_unref(s->silence.memblock);
pa_xfree(s->name);
- pa_xfree(s->description);
pa_xfree(s->driver);
+
+ if (s->proplist)
+ pa_proplist_free(s->proplist);
+
pa_xfree(s);
}
+/* Called from main context */
void pa_sink_set_asyncmsgq(pa_sink *s, pa_asyncmsgq *q) {
pa_sink_assert_ref(s);
- pa_assert(q);
s->asyncmsgq = q;
@@ -294,18 +426,19 @@ void pa_sink_set_asyncmsgq(pa_sink *s, pa_asyncmsgq *q) {
pa_source_set_asyncmsgq(s->monitor_source, q);
}
+/* Called from main context */
void pa_sink_set_rtpoll(pa_sink *s, pa_rtpoll *p) {
pa_sink_assert_ref(s);
- pa_assert(p);
s->rtpoll = p;
if (s->monitor_source)
pa_source_set_rtpoll(s->monitor_source, p);
}
+/* Called from main context */
int pa_sink_update_status(pa_sink*s) {
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
if (s->state == PA_SINK_SUSPENDED)
return 0;
@@ -313,9 +446,10 @@ int pa_sink_update_status(pa_sink*s) {
return sink_set_state(s, pa_sink_used_by(s) ? PA_SINK_RUNNING : PA_SINK_IDLE);
}
+/* Called from main context */
int pa_sink_suspend(pa_sink *s, pa_bool_t suspend) {
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
if (suspend)
return sink_set_state(s, PA_SINK_SUSPENDED);
@@ -323,17 +457,35 @@ int pa_sink_suspend(pa_sink *s, pa_bool_t suspend) {
return sink_set_state(s, pa_sink_used_by(s) ? PA_SINK_RUNNING : PA_SINK_IDLE);
}
-void pa_sink_ping(pa_sink *s) {
+/* Called from IO thread context */
+void pa_sink_process_rewind(pa_sink *s, size_t nbytes) {
+ pa_sink_input *i;
+ void *state = NULL;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->thread_info.state));
- pa_asyncmsgq_post(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_PING, NULL, 0, NULL, NULL);
+ s->thread_info.rewind_nbytes = 0;
+ s->thread_info.rewind_requested = FALSE;
+
+ if (nbytes > 0)
+ pa_log_debug("Processing rewind...");
+
+ while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL))) {
+ pa_sink_input_assert_ref(i);
+ pa_sink_input_process_rewind(i, nbytes);
+ }
+
+ if (nbytes > 0)
+ if (s->monitor_source && PA_SOURCE_IS_OPENED(s->monitor_source->thread_info.state))
+ pa_source_process_rewind(s->monitor_source, nbytes);
}
-static unsigned fill_mix_info(pa_sink *s, size_t length, pa_mix_info *info, unsigned maxinfo) {
+/* Called from IO thread context */
+static unsigned fill_mix_info(pa_sink *s, size_t *length, pa_mix_info *info, unsigned maxinfo) {
pa_sink_input *i;
unsigned n = 0;
void *state = NULL;
+ size_t mixlength = *length;
pa_sink_assert_ref(s);
pa_assert(info);
@@ -341,9 +493,17 @@ static unsigned fill_mix_info(pa_sink *s, size_t length, pa_mix_info *info, unsi
while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)) && maxinfo > 0) {
pa_sink_input_assert_ref(i);
- if (pa_sink_input_peek(i, length, &info->chunk, &info->volume) < 0)
+ if (pa_sink_input_peek(i, *length, &info->chunk, &info->volume) < 0)
continue;
+ if (mixlength == 0 || info->chunk.length < mixlength)
+ mixlength = info->chunk.length;
+
+ if (pa_memblock_is_silence(info->chunk.memblock)) {
+ pa_memblock_unref(info->chunk.memblock);
+ continue;
+ }
+
info->userdata = pa_sink_input_ref(i);
pa_assert(info->chunk.memblock);
@@ -354,27 +514,32 @@ static unsigned fill_mix_info(pa_sink *s, size_t length, pa_mix_info *info, unsi
maxinfo--;
}
+ if (mixlength > 0)
+ *length = mixlength;
+
return n;
}
-static void inputs_drop(pa_sink *s, pa_mix_info *info, unsigned n, size_t length) {
+/* Called from IO thread context */
+static void inputs_drop(pa_sink *s, pa_mix_info *info, unsigned n, pa_memchunk *result) {
pa_sink_input *i;
void *state = NULL;
unsigned p = 0;
unsigned n_unreffed = 0;
pa_sink_assert_ref(s);
+ pa_assert(result);
+ pa_assert(result->memblock);
+ pa_assert(result->length > 0);
/* We optimize for the case where the order of the inputs has not changed */
while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL))) {
unsigned j;
- pa_mix_info* m;
+ pa_mix_info* m = NULL;
pa_sink_input_assert_ref(i);
- m = NULL;
-
/* Let's try to find the matching entry info the pa_mix_info array */
for (j = 0; j < n; j ++) {
@@ -389,14 +554,47 @@ static void inputs_drop(pa_sink *s, pa_mix_info *info, unsigned n, size_t length
}
/* Drop read data */
- pa_sink_input_drop(i, length);
+ pa_sink_input_drop(i, result->length);
+
+ if (s->monitor_source && PA_SOURCE_IS_OPENED(pa_source_get_state(s->monitor_source))) {
+
+ if (pa_hashmap_size(i->thread_info.direct_outputs) > 0) {
+ void *ostate = NULL;
+ pa_source_output *o;
+ pa_memchunk c;
+
+ if (m && m->chunk.memblock) {
+ c = m->chunk;
+ pa_memblock_ref(c.memblock);
+ pa_assert(result->length <= c.length);
+ c.length = result->length;
+
+ pa_memchunk_make_writable(&c, 0);
+ pa_volume_memchunk(&c, &s->sample_spec, &m->volume);
+ } else {
+ c = s->silence;
+ pa_memblock_ref(c.memblock);
+ pa_assert(result->length <= c.length);
+ c.length = result->length;
+ }
+
+ while ((o = pa_hashmap_iterate(i->thread_info.direct_outputs, &ostate, NULL))) {
+ pa_source_output_assert_ref(o);
+ pa_assert(o->direct_on_input == i);
+ pa_source_post_direct(s->monitor_source, o, &c);
+ }
+
+ pa_memblock_unref(c.memblock);
+ }
+ }
if (m) {
- pa_sink_input_unref(m->userdata);
- m->userdata = NULL;
if (m->chunk.memblock)
pa_memblock_unref(m->chunk.memblock);
- pa_memchunk_reset(&m->chunk);
+ pa_memchunk_reset(&m->chunk);
+
+ pa_sink_input_unref(m->userdata);
+ m->userdata = NULL;
n_unreffed += 1;
}
@@ -413,20 +611,27 @@ static void inputs_drop(pa_sink *s, pa_mix_info *info, unsigned n, size_t length
pa_memblock_unref(info->chunk.memblock);
}
}
+
+ if (s->monitor_source && PA_SOURCE_IS_OPENED(pa_source_get_state(s->monitor_source)))
+ pa_source_post(s->monitor_source, result);
}
+/* Called from IO thread context */
void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) {
pa_mix_info info[MAX_MIX_CHANNELS];
unsigned n;
size_t block_size_max;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_OPENED(s->thread_info.state));
+ pa_assert(PA_SINK_IS_OPENED(s->thread_info.state));
pa_assert(pa_frame_aligned(length, &s->sample_spec));
pa_assert(result);
pa_sink_ref(s);
+ pa_assert(!s->thread_info.rewind_requested);
+ pa_assert(s->thread_info.rewind_nbytes == 0);
+
if (length <= 0)
length = pa_frame_align(MIX_BUFFER_LENGTH, &s->sample_spec);
@@ -436,24 +641,15 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) {
pa_assert(length > 0);
- n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, length, info, MAX_MIX_CHANNELS) : 0;
+ n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, &length, info, MAX_MIX_CHANNELS) : 0;
if (n == 0) {
- if (length > SILENCE_BUFFER_LENGTH)
- length = pa_frame_align(SILENCE_BUFFER_LENGTH, &s->sample_spec);
-
- pa_assert(length > 0);
-
- if (!s->silence || pa_memblock_get_length(s->silence) < length) {
- if (s->silence)
- pa_memblock_unref(s->silence);
- s->silence = pa_silence_memblock_new(s->core->mempool, &s->sample_spec, length);
- }
+ *result = s->silence;
+ pa_memblock_ref(result->memblock);
- result->memblock = pa_memblock_ref(s->silence);
- result->length = length;
- result->index = 0;
+ if (result->length > length)
+ result->length = length;
} else if (n == 1) {
pa_cvolume volume;
@@ -478,27 +674,30 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) {
result->memblock = pa_memblock_new(s->core->mempool, length);
ptr = pa_memblock_acquire(result->memblock);
- result->length = pa_mix(info, n, ptr, length, &s->sample_spec, &s->thread_info.soft_volume, s->thread_info.soft_muted);
+ result->length = pa_mix(info, n,
+ ptr, length,
+ &s->sample_spec,
+ &s->thread_info.soft_volume,
+ s->thread_info.soft_muted);
pa_memblock_release(result->memblock);
result->index = 0;
}
if (s->thread_info.state == PA_SINK_RUNNING)
- inputs_drop(s, info, n, result->length);
-
- if (s->monitor_source && PA_SOURCE_OPENED(pa_source_get_state(s->monitor_source)))
- pa_source_post(s->monitor_source, result);
+ inputs_drop(s, info, n, result);
pa_sink_unref(s);
}
+/* Called from IO thread context */
void pa_sink_render_into(pa_sink*s, pa_memchunk *target) {
pa_mix_info info[MAX_MIX_CHANNELS];
unsigned n;
+ size_t length, block_size_max;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_OPENED(s->thread_info.state));
+ pa_assert(PA_SINK_IS_OPENED(s->thread_info.state));
pa_assert(target);
pa_assert(target->memblock);
pa_assert(target->length > 0);
@@ -506,34 +705,49 @@ void pa_sink_render_into(pa_sink*s, pa_memchunk *target) {
pa_sink_ref(s);
- n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, target->length, info, MAX_MIX_CHANNELS) : 0;
+ pa_assert(!s->thread_info.rewind_requested);
+ pa_assert(s->thread_info.rewind_nbytes == 0);
+
+ length = target->length;
+ block_size_max = pa_mempool_block_size_max(s->core->mempool);
+ if (length > block_size_max)
+ length = pa_frame_align(block_size_max, &s->sample_spec);
+
+ pa_assert(length > 0);
+
+ n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, &length, info, MAX_MIX_CHANNELS) : 0;
if (n == 0) {
+ if (target->length > length)
+ target->length = length;
+
pa_silence_memchunk(target, &s->sample_spec);
} else if (n == 1) {
- if (target->length > info[0].chunk.length)
- target->length = info[0].chunk.length;
+ pa_cvolume volume;
+
+ if (target->length > length)
+ target->length = length;
+
+ pa_sw_cvolume_multiply(&volume, &s->thread_info.soft_volume, &info[0].volume);
- if (s->thread_info.soft_muted)
+ if (s->thread_info.soft_muted || pa_cvolume_is_muted(&volume))
pa_silence_memchunk(target, &s->sample_spec);
else {
- void *src, *ptr;
- pa_cvolume volume;
+ pa_memchunk vchunk;
- ptr = pa_memblock_acquire(target->memblock);
- src = pa_memblock_acquire(info[0].chunk.memblock);
+ vchunk = info[0].chunk;
+ pa_memblock_ref(vchunk.memblock);
- memcpy((uint8_t*) ptr + target->index,
- (uint8_t*) src + info[0].chunk.index,
- target->length);
+ if (vchunk.length > length)
+ vchunk.length = length;
- pa_memblock_release(target->memblock);
- pa_memblock_release(info[0].chunk.memblock);
-
- pa_sw_cvolume_multiply(&volume, &s->thread_info.soft_volume, &info[0].volume);
+ if (!pa_cvolume_is_norm(&volume)) {
+ pa_memchunk_make_writable(&vchunk, 0);
+ pa_volume_memchunk(&vchunk, &s->sample_spec, &volume);
+ }
- if (!pa_cvolume_is_norm(&volume))
- pa_volume_memchunk(target, &s->sample_spec, &volume);
+ pa_memchunk_memcpy(target, &vchunk);
+ pa_memblock_unref(vchunk.memblock);
}
} else {
@@ -542,8 +756,7 @@ void pa_sink_render_into(pa_sink*s, pa_memchunk *target) {
ptr = pa_memblock_acquire(target->memblock);
target->length = pa_mix(info, n,
- (uint8_t*) ptr + target->index,
- target->length,
+ (uint8_t*) ptr + target->index, length,
&s->sample_spec,
&s->thread_info.soft_volume,
s->thread_info.soft_muted);
@@ -552,20 +765,18 @@ void pa_sink_render_into(pa_sink*s, pa_memchunk *target) {
}
if (s->thread_info.state == PA_SINK_RUNNING)
- inputs_drop(s, info, n, target->length);
-
- if (s->monitor_source && PA_SOURCE_OPENED(pa_source_get_state(s->monitor_source)))
- pa_source_post(s->monitor_source, target);
+ inputs_drop(s, info, n, target);
pa_sink_unref(s);
}
+/* Called from IO thread context */
void pa_sink_render_into_full(pa_sink *s, pa_memchunk *target) {
pa_memchunk chunk;
size_t l, d;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_OPENED(s->thread_info.state));
+ pa_assert(PA_SINK_IS_OPENED(s->thread_info.state));
pa_assert(target);
pa_assert(target->memblock);
pa_assert(target->length > 0);
@@ -573,6 +784,9 @@ void pa_sink_render_into_full(pa_sink *s, pa_memchunk *target) {
pa_sink_ref(s);
+ pa_assert(!s->thread_info.rewind_requested);
+ pa_assert(s->thread_info.rewind_nbytes == 0);
+
l = target->length;
d = 0;
while (l > 0) {
@@ -589,13 +803,17 @@ void pa_sink_render_into_full(pa_sink *s, pa_memchunk *target) {
pa_sink_unref(s);
}
+/* Called from IO thread context */
void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result) {
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_OPENED(s->thread_info.state));
+ pa_assert(PA_SINK_IS_OPENED(s->thread_info.state));
pa_assert(length > 0);
pa_assert(pa_frame_aligned(length, &s->sample_spec));
pa_assert(result);
+ pa_assert(!s->thread_info.rewind_requested);
+ pa_assert(s->thread_info.rewind_nbytes == 0);
+
/*** This needs optimization ***/
result->index = 0;
@@ -605,62 +823,29 @@ void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result) {
pa_sink_render_into_full(s, result);
}
-void pa_sink_skip(pa_sink *s, size_t length) {
- pa_sink_input *i;
- void *state = NULL;
-
- pa_sink_assert_ref(s);
- pa_assert(PA_SINK_OPENED(s->thread_info.state));
- pa_assert(length > 0);
- pa_assert(pa_frame_aligned(length, &s->sample_spec));
-
- if (pa_source_used_by(s->monitor_source)) {
- pa_memchunk chunk;
-
- /* If something is connected to our monitor source, we have to
- * pass valid data to it */
-
- while (length > 0) {
- pa_sink_render(s, length, &chunk);
- pa_memblock_unref(chunk.memblock);
-
- pa_assert(chunk.length <= length);
- length -= chunk.length;
- }
-
- } else {
- /* Ok, noone cares about the rendered data, so let's not even render it */
-
- while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL))) {
- pa_sink_input_assert_ref(i);
- pa_sink_input_drop(i, length);
- }
- }
-}
-
+/* Called from main thread */
pa_usec_t pa_sink_get_latency(pa_sink *s) {
pa_usec_t usec = 0;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
- if (!PA_SINK_OPENED(s->state))
- return 0;
-
- if (s->get_latency)
- return s->get_latency(s);
+ /* The returned value is supposed to be in the time domain of the sound card! */
- if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
+ if (!PA_SINK_IS_OPENED(s->state))
return 0;
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) == 0);
+
return usec;
}
+/* Called from main thread */
void pa_sink_set_volume(pa_sink *s, const pa_cvolume *volume) {
- int changed;
+ pa_bool_t changed;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
pa_assert(volume);
changed = !pa_cvolume_equal(volume, &s->volume);
@@ -670,37 +855,50 @@ void pa_sink_set_volume(pa_sink *s, const pa_cvolume *volume) {
s->set_volume = NULL;
if (!s->set_volume)
- pa_asyncmsgq_post(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_VOLUME, pa_xnewdup(struct pa_cvolume, volume, 1), 0, NULL, pa_xfree);
+ pa_sink_set_soft_volume(s, volume);
if (changed)
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
}
-const pa_cvolume *pa_sink_get_volume(pa_sink *s) {
- struct pa_cvolume old_volume;
+/* Called from main thread */
+void pa_sink_set_soft_volume(pa_sink *s, const pa_cvolume *volume) {
+ pa_sink_assert_ref(s);
+ pa_assert(volume);
+ if (PA_SINK_IS_LINKED(s->state))
+ pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_VOLUME, volume, 0, NULL);
+ else
+ s->thread_info.soft_volume = *volume;
+}
+
+/* Called from main thread */
+const pa_cvolume *pa_sink_get_volume(pa_sink *s, pa_bool_t force_refresh) {
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
- old_volume = s->volume;
+ if (s->refresh_volume || force_refresh) {
+ struct pa_cvolume old_volume = s->volume;
- if (s->get_volume && s->get_volume(s) < 0)
- s->get_volume = NULL;
+ if (s->get_volume && s->get_volume(s) < 0)
+ s->get_volume = NULL;
- if (!s->get_volume && s->refresh_volume)
- pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_VOLUME, &s->volume, 0, NULL);
+ if (!s->get_volume)
+ pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_VOLUME, &s->volume, 0, NULL);
- if (!pa_cvolume_equal(&old_volume, &s->volume))
- pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ if (!pa_cvolume_equal(&old_volume, &s->volume))
+ pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ }
return &s->volume;
}
+/* Called from main thread */
void pa_sink_set_mute(pa_sink *s, pa_bool_t mute) {
- int changed;
+ pa_bool_t changed;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
changed = s->muted != mute;
s->muted = mute;
@@ -715,71 +913,66 @@ void pa_sink_set_mute(pa_sink *s, pa_bool_t mute) {
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
}
-pa_bool_t pa_sink_get_mute(pa_sink *s) {
- pa_bool_t old_muted;
+/* Called from main thread */
+pa_bool_t pa_sink_get_mute(pa_sink *s, pa_bool_t force_refresh) {
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
- old_muted = s->muted;
+ if (s->refresh_muted || force_refresh) {
+ pa_bool_t old_muted = s->muted;
- if (s->get_mute && s->get_mute(s) < 0)
- s->get_mute = NULL;
+ if (s->get_mute && s->get_mute(s) < 0)
+ s->get_mute = NULL;
- if (!s->get_mute && s->refresh_mute)
- pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_MUTE, &s->muted, 0, NULL);
+ if (!s->get_mute)
+ pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_MUTE, &s->muted, 0, NULL);
- if (old_muted != s->muted)
- pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ if (old_muted != s->muted)
+ pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ }
return s->muted;
}
-void pa_sink_set_module(pa_sink *s, pa_module *m) {
- pa_sink_assert_ref(s);
-
- if (s->module == m)
- return;
-
- s->module = m;
-
- if (s->monitor_source)
- pa_source_set_module(s->monitor_source, m);
-
- pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
-}
-
+/* Called from main thread */
void pa_sink_set_description(pa_sink *s, const char *description) {
+ const char *old;
pa_sink_assert_ref(s);
- if (!description && !s->description)
+ if (!description && !pa_proplist_contains(s->proplist, PA_PROP_DEVICE_DESCRIPTION))
return;
- if (description && s->description && !strcmp(description, s->description))
+ old = pa_proplist_gets(s->proplist, PA_PROP_DEVICE_DESCRIPTION);
+
+ if (old && description && !strcmp(old, description))
return;
- pa_xfree(s->description);
- s->description = pa_xstrdup(description);
+ if (description)
+ pa_proplist_sets(s->proplist, PA_PROP_DEVICE_DESCRIPTION, description);
+ else
+ pa_proplist_unset(s->proplist, PA_PROP_DEVICE_DESCRIPTION);
if (s->monitor_source) {
char *n;
- n = pa_sprintf_malloc("Monitor Source of %s", s->description? s->description : s->name);
+ n = pa_sprintf_malloc("Monitor Source of %s", description ? description : s->name);
pa_source_set_description(s->monitor_source, n);
pa_xfree(n);
}
- if (PA_SINK_LINKED(s->state)) {
+ if (PA_SINK_IS_LINKED(s->state)) {
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
- pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_DESCRIPTION_CHANGED], s);
+ pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_PROPLIST_CHANGED], s);
}
}
+/* Called from main thread */
unsigned pa_sink_linked_by(pa_sink *s) {
unsigned ret;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
ret = pa_idxset_size(s->inputs);
@@ -792,31 +985,36 @@ unsigned pa_sink_linked_by(pa_sink *s) {
return ret;
}
+/* Called from main thread */
unsigned pa_sink_used_by(pa_sink *s) {
unsigned ret;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
ret = pa_idxset_size(s->inputs);
pa_assert(ret >= s->n_corked);
- ret -= s->n_corked;
/* Streams connected to our monitor source do not matter for
* pa_sink_used_by()!.*/
- return ret;
+ return ret - s->n_corked;
}
+/* Called from IO thread, except when it is not */
int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk) {
pa_sink *s = PA_SINK(o);
pa_sink_assert_ref(s);
- pa_assert(s->thread_info.state != PA_SINK_UNLINKED);
switch ((pa_sink_message_t) code) {
case PA_SINK_MESSAGE_ADD_INPUT: {
pa_sink_input *i = PA_SINK_INPUT(userdata);
+
+ /* If you change anything here, make sure to change the
+ * sink input handling a few lines down at
+ * PA_SINK_MESSAGE_FINISH_MOVE, too. */
+
pa_hashmap_put(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index), pa_sink_input_ref(i));
/* Since the caller sleeps in pa_sink_input_put(), we can
@@ -841,9 +1039,21 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
if (i->attach)
i->attach(i);
- /* If you change anything here, make sure to change the
- * ghost sink input handling a few lines down at
- * PA_SINK_MESSAGE_REMOVE_INPUT_AND_BUFFER, too. */
+ pa_sink_input_set_state_within_thread(i, i->state);
+
+ /* The requested latency of the sink input needs to be
+ * fixed up and then configured on the sink */
+
+ if (i->thread_info.requested_sink_latency != (pa_usec_t) -1)
+ pa_sink_input_set_requested_latency_within_thread(i, i->thread_info.requested_sink_latency);
+
+ pa_sink_input_update_max_rewind(i, s->thread_info.max_rewind);
+ pa_sink_input_update_max_request(i, s->thread_info.max_request);
+
+ /* We don't rewind here automatically. This is left to the
+ * sink input implementor because some sink inputs need a
+ * slow start, i.e. need some time to buffer client
+ * samples before beginning streaming. */
return 0;
}
@@ -853,11 +1063,13 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
/* If you change anything here, make sure to change the
* sink input handling a few lines down at
- * PA_SINK_MESSAGE_REMOVE_INPUT_AND_BUFFER, too. */
+ * PA_SINK_MESSAGE_PREPAPRE_MOVE, too. */
if (i->detach)
i->detach(i);
+ pa_sink_input_set_state_within_thread(i, i->state);
+
pa_assert(i->thread_info.attached);
i->thread_info.attached = FALSE;
@@ -865,8 +1077,8 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
* we can safely access data outside of thread_info even
* though it is mutable */
- pa_assert(!i->thread_info.sync_prev);
- pa_assert(!i->thread_info.sync_next);
+ pa_assert(!i->sync_prev);
+ pa_assert(!i->sync_next);
if (i->thread_info.sync_prev) {
i->thread_info.sync_prev->thread_info.sync_next = i->thread_info.sync_prev->sync_next;
@@ -881,82 +1093,95 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
if (pa_hashmap_remove(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index)))
pa_sink_input_unref(i);
+ pa_sink_invalidate_requested_latency(s);
+ pa_sink_request_rewind(s, (size_t) -1);
+
return 0;
}
- case PA_SINK_MESSAGE_REMOVE_INPUT_AND_BUFFER: {
- pa_sink_input_move_info *info = userdata;
- int volume_is_norm;
+ case PA_SINK_MESSAGE_START_MOVE: {
+ pa_sink_input *i = PA_SINK_INPUT(userdata);
/* We don't support moving synchronized streams. */
- pa_assert(!info->sink_input->sync_prev);
- pa_assert(!info->sink_input->sync_next);
- pa_assert(!info->sink_input->thread_info.sync_next);
- pa_assert(!info->sink_input->thread_info.sync_prev);
+ pa_assert(!i->sync_prev);
+ pa_assert(!i->sync_next);
+ pa_assert(!i->thread_info.sync_next);
+ pa_assert(!i->thread_info.sync_prev);
- if (info->sink_input->detach)
- info->sink_input->detach(info->sink_input);
+ if (i->thread_info.state != PA_SINK_INPUT_CORKED) {
+ pa_usec_t usec = 0;
+ size_t sink_nbytes, total_nbytes;
- pa_assert(info->sink_input->thread_info.attached);
- info->sink_input->thread_info.attached = FALSE;
+ /* Get the latency of the sink */
+ if (PA_MSGOBJECT(s)->process_msg(PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
+ usec = 0;
- if (info->ghost_sink_input) {
- pa_assert(info->buffer_bytes > 0);
- pa_assert(info->buffer);
+ sink_nbytes = pa_usec_to_bytes(usec, &s->sample_spec);
+ total_nbytes = sink_nbytes + pa_memblockq_get_length(i->thread_info.render_memblockq);
- volume_is_norm = pa_cvolume_is_norm(&info->sink_input->thread_info.volume);
+ if (total_nbytes > 0) {
+ i->thread_info.rewrite_nbytes = i->thread_info.resampler ? pa_resampler_request(i->thread_info.resampler, total_nbytes) : total_nbytes;
+ i->thread_info.rewrite_flush = TRUE;
+ pa_sink_input_process_rewind(i, sink_nbytes);
+ }
+ }
- pa_log_debug("Buffering %lu bytes ...", (unsigned long) info->buffer_bytes);
+ if (i->detach)
+ i->detach(i);
- while (info->buffer_bytes > 0) {
- pa_memchunk memchunk;
- pa_cvolume volume;
- size_t n;
+ pa_assert(i->thread_info.attached);
+ i->thread_info.attached = FALSE;
- if (pa_sink_input_peek(info->sink_input, info->buffer_bytes, &memchunk, &volume) < 0)
- break;
+ /* Let's remove the sink input ...*/
+ if (pa_hashmap_remove(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index)))
+ pa_sink_input_unref(i);
- n = memchunk.length > info->buffer_bytes ? info->buffer_bytes : memchunk.length;
- pa_sink_input_drop(info->sink_input, n);
- memchunk.length = n;
+ pa_sink_invalidate_requested_latency(s);
- if (!volume_is_norm) {
- pa_memchunk_make_writable(&memchunk, 0);
- pa_volume_memchunk(&memchunk, &s->sample_spec, &volume);
- }
+ pa_log_debug("Requesting rewind due to started move");
+ pa_sink_request_rewind(s, (size_t) -1);
- if (pa_memblockq_push(info->buffer, &memchunk) < 0) {
- pa_memblock_unref(memchunk.memblock);
- break;
- }
+ return 0;
+ }
- pa_memblock_unref(memchunk.memblock);
- info->buffer_bytes -= n;
- }
+ case PA_SINK_MESSAGE_FINISH_MOVE: {
+ pa_sink_input *i = PA_SINK_INPUT(userdata);
- /* Add the remaining already resampled chunk to the buffer */
- if (info->sink_input->thread_info.resampled_chunk.memblock)
- pa_memblockq_push(info->buffer, &info->sink_input->thread_info.resampled_chunk);
+ /* We don't support moving synchronized streams. */
+ pa_assert(!i->sync_prev);
+ pa_assert(!i->sync_next);
+ pa_assert(!i->thread_info.sync_next);
+ pa_assert(!i->thread_info.sync_prev);
- pa_memblockq_sink_input_set_queue(info->ghost_sink_input, info->buffer);
+ pa_hashmap_put(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index), pa_sink_input_ref(i));
- pa_log_debug("Buffered %lu bytes ...", (unsigned long) pa_memblockq_get_length(info->buffer));
- }
+ pa_assert(!i->thread_info.attached);
+ i->thread_info.attached = TRUE;
- /* Let's remove the sink input ...*/
- if (pa_hashmap_remove(s->thread_info.inputs, PA_UINT32_TO_PTR(info->sink_input->index)))
- pa_sink_input_unref(info->sink_input);
+ if (i->attach)
+ i->attach(i);
+
+ if (i->thread_info.requested_sink_latency != (pa_usec_t) -1)
+ pa_sink_input_set_requested_latency_within_thread(i, i->thread_info.requested_sink_latency);
+
+ pa_sink_input_update_max_rewind(i, s->thread_info.max_rewind);
+ pa_sink_input_update_max_request(i, s->thread_info.max_request);
+
+ if (i->thread_info.state != PA_SINK_INPUT_CORKED) {
+ pa_usec_t usec = 0;
+ size_t nbytes;
+
+ /* Get the latency of the sink */
+ if (PA_MSGOBJECT(s)->process_msg(PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
+ usec = 0;
- /* .. and add the ghost sink input instead */
- if (info->ghost_sink_input) {
- pa_hashmap_put(s->thread_info.inputs, PA_UINT32_TO_PTR(info->ghost_sink_input->index), pa_sink_input_ref(info->ghost_sink_input));
- info->ghost_sink_input->thread_info.sync_prev = info->ghost_sink_input->thread_info.sync_next = NULL;
+ nbytes = pa_usec_to_bytes(usec, &s->sample_spec);
- pa_assert(!info->ghost_sink_input->thread_info.attached);
- info->ghost_sink_input->thread_info.attached = TRUE;
+ if (nbytes > 0)
+ pa_sink_input_drop(i, nbytes);
- if (info->ghost_sink_input->attach)
- info->ghost_sink_input->attach(info->ghost_sink_input);
+ pa_log_debug("Requesting rewind due to finished move");
+ pa_sink_request_rewind(s, nbytes);
}
return 0;
@@ -964,10 +1189,14 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
case PA_SINK_MESSAGE_SET_VOLUME:
s->thread_info.soft_volume = *((pa_cvolume*) userdata);
+
+ pa_sink_request_rewind(s, (size_t) -1);
return 0;
case PA_SINK_MESSAGE_SET_MUTE:
s->thread_info.soft_muted = PA_PTR_TO_UINT(userdata);
+
+ pa_sink_request_rewind(s, (size_t) -1);
return 0;
case PA_SINK_MESSAGE_GET_VOLUME:
@@ -978,9 +1207,6 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
*((pa_bool_t*) userdata) = s->thread_info.soft_muted;
return 0;
- case PA_SINK_MESSAGE_PING:
- return 0;
-
case PA_SINK_MESSAGE_SET_STATE:
s->thread_info.state = PA_PTR_TO_UINT(userdata);
@@ -988,17 +1214,53 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
case PA_SINK_MESSAGE_DETACH:
- /* We're detaching all our input streams so that the
- * asyncmsgq and rtpoll fields can be changed without
- * problems */
+ /* Detach all streams */
pa_sink_detach_within_thread(s);
- break;
+ return 0;
case PA_SINK_MESSAGE_ATTACH:
/* Reattach all streams */
pa_sink_attach_within_thread(s);
- break;
+ return 0;
+
+ case PA_SINK_MESSAGE_GET_REQUESTED_LATENCY: {
+
+ pa_usec_t *usec = userdata;
+ *usec = pa_sink_get_requested_latency_within_thread(s);
+
+ if (*usec == (pa_usec_t) -1)
+ *usec = s->thread_info.max_latency;
+
+ return 0;
+ }
+
+ case PA_SINK_MESSAGE_SET_LATENCY_RANGE: {
+ pa_usec_t *r = userdata;
+
+ pa_sink_update_latency_range(s, r[0], r[1]);
+
+ return 0;
+ }
+
+ case PA_SINK_MESSAGE_GET_LATENCY_RANGE: {
+ pa_usec_t *r = userdata;
+
+ r[0] = s->thread_info.min_latency;
+ r[1] = s->thread_info.max_latency;
+
+ return 0;
+ }
+
+ case PA_SINK_MESSAGE_GET_MAX_REWIND:
+
+ *((size_t*) userdata) = s->thread_info.max_rewind;
+ return 0;
+
+ case PA_SINK_MESSAGE_GET_MAX_REQUEST:
+
+ *((size_t*) userdata) = s->thread_info.max_request;
+ return 0;
case PA_SINK_MESSAGE_GET_LATENCY:
case PA_SINK_MESSAGE_MAX:
@@ -1008,6 +1270,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
return -1;
}
+/* Called from main thread */
int pa_sink_suspend_all(pa_core *c, pa_bool_t suspend) {
pa_sink *sink;
uint32_t idx;
@@ -1021,26 +1284,29 @@ int pa_sink_suspend_all(pa_core *c, pa_bool_t suspend) {
return ret;
}
+/* Called from main thread */
void pa_sink_detach(pa_sink *s) {
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
- pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_DETACH, NULL, 0, NULL);
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_DETACH, NULL, 0, NULL) == 0);
}
+/* Called from main thread */
void pa_sink_attach(pa_sink *s) {
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->state));
+ pa_assert(PA_SINK_IS_LINKED(s->state));
- pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_ATTACH, NULL, 0, NULL);
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_ATTACH, NULL, 0, NULL) == 0);
}
+/* Called from IO thread */
void pa_sink_detach_within_thread(pa_sink *s) {
pa_sink_input *i;
void *state = NULL;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->thread_info.state));
+ pa_assert(PA_SINK_IS_LINKED(s->thread_info.state));
while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)))
if (i->detach)
@@ -1050,12 +1316,13 @@ void pa_sink_detach_within_thread(pa_sink *s) {
pa_source_detach_within_thread(s->monitor_source);
}
+/* Called from IO thread */
void pa_sink_attach_within_thread(pa_sink *s) {
pa_sink_input *i;
void *state = NULL;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_LINKED(s->thread_info.state));
+ pa_assert(PA_SINK_IS_LINKED(s->thread_info.state));
while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)))
if (i->attach)
@@ -1064,3 +1331,232 @@ void pa_sink_attach_within_thread(pa_sink *s) {
if (s->monitor_source)
pa_source_attach_within_thread(s->monitor_source);
}
+
+/* Called from IO thread */
+void pa_sink_request_rewind(pa_sink*s, size_t nbytes) {
+ pa_sink_assert_ref(s);
+ pa_assert(PA_SINK_IS_LINKED(s->thread_info.state));
+
+ if (nbytes == (size_t) -1)
+ nbytes = s->thread_info.max_rewind;
+
+ nbytes = PA_MIN(nbytes, s->thread_info.max_rewind);
+
+ if (s->thread_info.rewind_requested &&
+ nbytes <= s->thread_info.rewind_nbytes)
+ return;
+
+ s->thread_info.rewind_nbytes = nbytes;
+ s->thread_info.rewind_requested = TRUE;
+
+ if (s->request_rewind)
+ s->request_rewind(s);
+}
+
+/* Called from IO thread */
+pa_usec_t pa_sink_get_requested_latency_within_thread(pa_sink *s) {
+ pa_usec_t result = (pa_usec_t) -1;
+ pa_sink_input *i;
+ void *state = NULL;
+ pa_usec_t monitor_latency;
+
+ pa_sink_assert_ref(s);
+
+ if (s->thread_info.requested_latency_valid)
+ return s->thread_info.requested_latency;
+
+ while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)))
+
+ if (i->thread_info.requested_sink_latency != (pa_usec_t) -1 &&
+ (result == (pa_usec_t) -1 || result > i->thread_info.requested_sink_latency))
+ result = i->thread_info.requested_sink_latency;
+
+ monitor_latency = pa_source_get_requested_latency_within_thread(s->monitor_source);
+
+ if (monitor_latency != (pa_usec_t) -1 &&
+ (result == (pa_usec_t) -1 || result > monitor_latency))
+ result = monitor_latency;
+
+ if (result != (pa_usec_t) -1) {
+ if (s->thread_info.max_latency > 0 && result > s->thread_info.max_latency)
+ result = s->thread_info.max_latency;
+
+ if (s->thread_info.min_latency > 0 && result < s->thread_info.min_latency)
+ result = s->thread_info.min_latency;
+ }
+
+ s->thread_info.requested_latency = result;
+ s->thread_info.requested_latency_valid = TRUE;
+
+ return result;
+}
+
+/* Called from main thread */
+pa_usec_t pa_sink_get_requested_latency(pa_sink *s) {
+ pa_usec_t usec = 0;
+
+ pa_sink_assert_ref(s);
+ pa_assert(PA_SINK_IS_LINKED(s->state));
+
+ if (!PA_SINK_IS_OPENED(s->state))
+ return 0;
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_REQUESTED_LATENCY, &usec, 0, NULL) == 0);
+ return usec;
+}
+
+/* Called from IO thread */
+void pa_sink_set_max_rewind(pa_sink *s, size_t max_rewind) {
+ pa_sink_input *i;
+ void *state = NULL;
+
+ pa_sink_assert_ref(s);
+
+ if (max_rewind == s->thread_info.max_rewind)
+ return;
+
+ s->thread_info.max_rewind = max_rewind;
+
+ if (PA_SINK_IS_LINKED(s->thread_info.state)) {
+ while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)))
+ pa_sink_input_update_max_rewind(i, s->thread_info.max_rewind);
+ }
+
+ if (s->monitor_source)
+ pa_source_set_max_rewind(s->monitor_source, s->thread_info.max_rewind);
+}
+
+/* Called from IO thread */
+void pa_sink_set_max_request(pa_sink *s, size_t max_request) {
+ void *state = NULL;
+
+ pa_sink_assert_ref(s);
+
+ if (max_request == s->thread_info.max_request)
+ return;
+
+ s->thread_info.max_request = max_request;
+
+ if (PA_SINK_IS_LINKED(s->thread_info.state)) {
+ pa_sink_input *i;
+
+ while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)))
+ pa_sink_input_update_max_request(i, s->thread_info.max_request);
+ }
+}
+
+/* Called from IO thread */
+void pa_sink_invalidate_requested_latency(pa_sink *s) {
+ pa_sink_input *i;
+ void *state = NULL;
+
+ pa_sink_assert_ref(s);
+
+ s->thread_info.requested_latency_valid = FALSE;
+
+ if (s->update_requested_latency)
+ s->update_requested_latency(s);
+
+ while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)))
+ if (i->update_sink_requested_latency)
+ i->update_sink_requested_latency(i);
+}
+
+/* Called from main thread */
+void pa_sink_set_latency_range(pa_sink *s, pa_usec_t min_latency, pa_usec_t max_latency) {
+ pa_sink_assert_ref(s);
+
+ /* min_latency == 0: no limit
+ * min_latency == (size_t) -1: default limit
+ * min_latency anything else: specified limit
+ *
+ * Similar for max_latency */
+
+ if (min_latency == (pa_usec_t) -1)
+ min_latency = DEFAULT_MIN_LATENCY;
+
+ if (max_latency == (pa_usec_t) -1)
+ max_latency = min_latency;
+
+ pa_assert(!min_latency || !max_latency ||
+ min_latency <= max_latency);
+
+ if (PA_SINK_IS_LINKED(s->state)) {
+ pa_usec_t r[2];
+
+ r[0] = min_latency;
+ r[1] = max_latency;
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_LATENCY_RANGE, r, 0, NULL) == 0);
+ } else {
+ s->thread_info.min_latency = min_latency;
+ s->thread_info.max_latency = max_latency;
+
+ s->monitor_source->thread_info.min_latency = min_latency;
+ s->monitor_source->thread_info.max_latency = max_latency;
+
+ s->thread_info.requested_latency_valid = s->monitor_source->thread_info.requested_latency_valid = FALSE;
+ }
+}
+
+/* Called from main thread */
+void pa_sink_get_latency_range(pa_sink *s, pa_usec_t *min_latency, pa_usec_t *max_latency) {
+ pa_sink_assert_ref(s);
+ pa_assert(min_latency);
+ pa_assert(max_latency);
+
+ if (PA_SINK_IS_LINKED(s->state)) {
+ pa_usec_t r[2] = { 0, 0 };
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY_RANGE, r, 0, NULL) == 0);
+
+ *min_latency = r[0];
+ *max_latency = r[1];
+ } else {
+ *min_latency = s->thread_info.min_latency;
+ *max_latency = s->thread_info.max_latency;
+ }
+}
+
+/* Called from IO thread */
+void pa_sink_update_latency_range(pa_sink *s, pa_usec_t min_latency, pa_usec_t max_latency) {
+ pa_sink_input *i;
+ void *state = NULL;
+
+ pa_sink_assert_ref(s);
+
+ s->thread_info.min_latency = min_latency;
+ s->thread_info.max_latency = max_latency;
+
+ while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)))
+ if (i->update_sink_latency_range)
+ i->update_sink_latency_range(i);
+
+ pa_sink_invalidate_requested_latency(s);
+
+ pa_source_update_latency_range(s->monitor_source, min_latency, max_latency);
+}
+
+size_t pa_sink_get_max_rewind(pa_sink *s) {
+ size_t r;
+ pa_sink_assert_ref(s);
+
+ if (!PA_SINK_IS_LINKED(s->state))
+ return s->thread_info.max_rewind;
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_MAX_REWIND, &r, 0, NULL) == 0);
+
+ return r;
+}
+
+size_t pa_sink_get_max_request(pa_sink *s) {
+ size_t r;
+ pa_sink_assert_ref(s);
+
+ if (!PA_SINK_IS_LINKED(s->state))
+ return s->thread_info.max_request;
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_MAX_REQUEST, &r, 0, NULL) == 0);
+
+ return r;
+}
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index 31eb8cd..672bdd3 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -1,8 +1,6 @@
#ifndef foopulsesinkhfoo
#define foopulsesinkhfoo
-/* $Id: sink.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,7 +31,6 @@ typedef struct pa_sink pa_sink;
#include <pulse/channelmap.h>
#include <pulse/volume.h>
-#include <pulsecore/core-def.h>
#include <pulsecore/core.h>
#include <pulsecore/idxset.h>
#include <pulsecore/source.h>
@@ -52,11 +49,11 @@ typedef enum pa_sink_state {
PA_SINK_UNLINKED
} pa_sink_state_t;
-static inline pa_bool_t PA_SINK_OPENED(pa_sink_state_t x) {
+static inline pa_bool_t PA_SINK_IS_OPENED(pa_sink_state_t x) {
return x == PA_SINK_RUNNING || x == PA_SINK_IDLE;
}
-static inline pa_bool_t PA_SINK_LINKED(pa_sink_state_t x) {
+static inline pa_bool_t PA_SINK_IS_LINKED(pa_sink_state_t x) {
return x == PA_SINK_RUNNING || x == PA_SINK_IDLE || x == PA_SINK_SUSPENDED;
}
@@ -69,7 +66,8 @@ struct pa_sink {
pa_sink_flags_t flags;
char *name;
- char *description, *driver; /* may be NULL */
+ char *driver; /* may be NULL */
+ pa_proplist *proplist;
pa_module *module; /* may be NULL */
@@ -82,29 +80,76 @@ struct pa_sink {
pa_cvolume volume;
pa_bool_t muted;
- pa_bool_t refresh_volume;
- pa_bool_t refresh_mute;
- int (*set_state)(pa_sink *s, pa_sink_state_t state); /* may be NULL */
- int (*set_volume)(pa_sink *s); /* dito */
- int (*get_volume)(pa_sink *s); /* dito */
- int (*get_mute)(pa_sink *s); /* dito */
- int (*set_mute)(pa_sink *s); /* dito */
- pa_usec_t (*get_latency)(pa_sink *s); /* dito */
+ pa_bool_t refresh_volume:1;
+ pa_bool_t refresh_muted:1;
pa_asyncmsgq *asyncmsgq;
pa_rtpoll *rtpoll;
+ pa_memchunk silence;
+
+ /* Called when the main loop requests a state change. Called from
+ * main loop context. If returns -1 the state change will be
+ * inhibited */
+ int (*set_state)(pa_sink *s, pa_sink_state_t state); /* may be NULL */
+
+ /* Callled when the volume is queried. Called from main loop
+ * context. If this is NULL a PA_SINK_MESSAGE_GET_VOLUME message
+ * will be sent to the IO thread instead. If refresh_volume is
+ * FALSE neither this function is called nor a message is sent. */
+ int (*get_volume)(pa_sink *s); /* may be NULL */
+
+ /* Called when the volume shall be changed. Called from main loop
+ * context. If this is NULL a PA_SINK_MESSAGE_SET_VOLUME message
+ * will be sent to the IO thread instead. */
+ int (*set_volume)(pa_sink *s); /* dito */
+
+ /* Called when the mute setting is queried. Called from main loop
+ * context. If this is NULL a PA_SINK_MESSAGE_GET_MUTE message
+ * will be sent to the IO thread instead. If refresh_mute is
+ * FALSE neither this function is called nor a message is sent.*/
+ int (*get_mute)(pa_sink *s); /* dito */
+
+ /* Called when the mute setting shall be changed. Called from main
+ * loop context. If this is NULL a PA_SINK_MESSAGE_SET_MUTE
+ * message will be sent to the IO thread instead. */
+ int (*set_mute)(pa_sink *s); /* dito */
+
+ /* Called when a rewind request is issued. Called from IO thread
+ * context. */
+ void (*request_rewind)(pa_sink *s); /* dito */
+
+ /* Called when a the requested latency is changed. Called from IO
+ * thread context. */
+ void (*update_requested_latency)(pa_sink *s); /* dito */
+
/* Contains copies of the above data so that the real-time worker
* thread can work without access locking */
struct {
pa_sink_state_t state;
pa_hashmap *inputs;
pa_cvolume soft_volume;
- pa_bool_t soft_muted;
- } thread_info;
+ pa_bool_t soft_muted:1;
+
+ pa_bool_t requested_latency_valid:1;
+ pa_usec_t requested_latency;
+
+ /* The number of bytes streams need to keep around as history to
+ * be able to satisfy every DMA buffer rewrite */
+ size_t max_rewind;
- pa_memblock *silence;
+ /* The number of bytes streams need to keep around to satisfy
+ * every DMA write request */
+ size_t max_request;
+
+ /* Maximum of what clients requested to rewind in this cycle */
+ size_t rewind_nbytes;
+ pa_bool_t rewind_requested;
+
+ pa_usec_t min_latency; /* we won't go below this latency */
+ pa_usec_t max_latency; /* An upper limit for the latencies */
+ } thread_info;
void *userdata;
};
@@ -120,52 +165,85 @@ typedef enum pa_sink_message {
PA_SINK_MESSAGE_GET_MUTE,
PA_SINK_MESSAGE_SET_MUTE,
PA_SINK_MESSAGE_GET_LATENCY,
+ PA_SINK_MESSAGE_GET_REQUESTED_LATENCY,
PA_SINK_MESSAGE_SET_STATE,
- PA_SINK_MESSAGE_PING,
- PA_SINK_MESSAGE_REMOVE_INPUT_AND_BUFFER,
+ PA_SINK_MESSAGE_START_MOVE,
+ PA_SINK_MESSAGE_FINISH_MOVE,
PA_SINK_MESSAGE_ATTACH,
PA_SINK_MESSAGE_DETACH,
+ PA_SINK_MESSAGE_SET_LATENCY_RANGE,
+ PA_SINK_MESSAGE_GET_LATENCY_RANGE,
+ PA_SINK_MESSAGE_GET_MAX_REWIND,
+ PA_SINK_MESSAGE_GET_MAX_REQUEST,
PA_SINK_MESSAGE_MAX
} pa_sink_message_t;
+typedef struct pa_sink_new_data {
+ char *name;
+ pa_proplist *proplist;
+
+ const char *driver;
+ pa_module *module;
+
+ pa_sample_spec sample_spec;
+ pa_channel_map channel_map;
+ pa_cvolume volume;
+ pa_bool_t muted :1;
+
+ pa_bool_t sample_spec_is_set:1;
+ pa_bool_t channel_map_is_set:1;
+ pa_bool_t volume_is_set:1;
+ pa_bool_t muted_is_set:1;
+
+ pa_bool_t namereg_fail:1;
+} pa_sink_new_data;
+
+pa_sink_new_data* pa_sink_new_data_init(pa_sink_new_data *data);
+void pa_sink_new_data_set_name(pa_sink_new_data *data, const char *name);
+void pa_sink_new_data_set_sample_spec(pa_sink_new_data *data, const pa_sample_spec *spec);
+void pa_sink_new_data_set_channel_map(pa_sink_new_data *data, const pa_channel_map *map);
+void pa_sink_new_data_set_volume(pa_sink_new_data *data, const pa_cvolume *volume);
+void pa_sink_new_data_set_muted(pa_sink_new_data *data, pa_bool_t mute);
+void pa_sink_new_data_done(pa_sink_new_data *data);
+
/* To be called exclusively by the sink driver, from main context */
pa_sink* pa_sink_new(
pa_core *core,
- const char *driver,
- const char *name,
- int namereg_fail,
- const pa_sample_spec *spec,
- const pa_channel_map *map);
+ pa_sink_new_data *data,
+ pa_sink_flags_t flags);
void pa_sink_put(pa_sink *s);
void pa_sink_unlink(pa_sink* s);
-void pa_sink_set_module(pa_sink *sink, pa_module *m);
void pa_sink_set_description(pa_sink *s, const char *description);
void pa_sink_set_asyncmsgq(pa_sink *s, pa_asyncmsgq *q);
void pa_sink_set_rtpoll(pa_sink *s, pa_rtpoll *p);
+void pa_sink_set_latency_range(pa_sink *s, pa_usec_t min_latency, pa_usec_t max_latency);
+
void pa_sink_detach(pa_sink *s);
void pa_sink_attach(pa_sink *s);
/* May be called by everyone, from main context */
+/* The returned value is supposed to be in the time domain of the sound card! */
pa_usec_t pa_sink_get_latency(pa_sink *s);
+pa_usec_t pa_sink_get_requested_latency(pa_sink *s);
+void pa_sink_get_latency_range(pa_sink *s, pa_usec_t *min_latency, pa_usec_t *max_latency);
+
+size_t pa_sink_get_max_rewind(pa_sink *s);
+size_t pa_sink_get_max_request(pa_sink *s);
int pa_sink_update_status(pa_sink*s);
int pa_sink_suspend(pa_sink *s, pa_bool_t suspend);
int pa_sink_suspend_all(pa_core *c, pa_bool_t suspend);
-/* Sends a ping message to the sink thread, to make it wake up and
- * check for data to process even if there is no real message is
- * sent */
-void pa_sink_ping(pa_sink *s);
-
void pa_sink_set_volume(pa_sink *sink, const pa_cvolume *volume);
-const pa_cvolume *pa_sink_get_volume(pa_sink *sink);
+void pa_sink_set_soft_volume(pa_sink *s, const pa_cvolume *volume);
+const pa_cvolume *pa_sink_get_volume(pa_sink *sink, pa_bool_t force_refresh);
void pa_sink_set_mute(pa_sink *sink, pa_bool_t mute);
-pa_bool_t pa_sink_get_mute(pa_sink *sink);
+pa_bool_t pa_sink_get_mute(pa_sink *sink, pa_bool_t force_refres);
unsigned pa_sink_linked_by(pa_sink *s); /* Number of connected streams */
unsigned pa_sink_used_by(pa_sink *s); /* Number of connected streams which are not corked */
@@ -178,11 +256,24 @@ void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result);
void pa_sink_render_into(pa_sink*s, pa_memchunk *target);
void pa_sink_render_into_full(pa_sink *s, pa_memchunk *target);
-void pa_sink_skip(pa_sink *s, size_t length);
+void pa_sink_process_rewind(pa_sink *s, size_t nbytes);
int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk);
void pa_sink_attach_within_thread(pa_sink *s);
void pa_sink_detach_within_thread(pa_sink *s);
+pa_usec_t pa_sink_get_requested_latency_within_thread(pa_sink *s);
+
+void pa_sink_set_max_rewind(pa_sink *s, size_t max_rewind);
+void pa_sink_set_max_request(pa_sink *s, size_t max_request);
+
+void pa_sink_update_latency_range(pa_sink *s, pa_usec_t min_latency, pa_usec_t max_latency);
+
+/* To be called exclusively by sink input drivers, from IO context */
+
+void pa_sink_request_rewind(pa_sink*s, size_t nbytes);
+
+void pa_sink_invalidate_requested_latency(pa_sink *s);
+
#endif
diff --git a/src/pulsecore/sioman.c b/src/pulsecore/sioman.c
index 7e4b9e5..7e5b186 100644
--- a/src/pulsecore/sioman.c
+++ b/src/pulsecore/sioman.c
@@ -1,5 +1,3 @@
-/* $Id: sioman.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/sioman.h b/src/pulsecore/sioman.h
index 8a30dce..d0cacc9 100644
--- a/src/pulsecore/sioman.h
+++ b/src/pulsecore/sioman.h
@@ -1,8 +1,6 @@
#ifndef foosiomanhfoo
#define foosiomanhfoo
-/* $Id: sioman.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/socket-client.c b/src/pulsecore/socket-client.c
index 579d286..6739eff 100644
--- a/src/pulsecore/socket-client.c
+++ b/src/pulsecore/socket-client.c
@@ -1,5 +1,3 @@
-/* $Id: socket-client.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -61,6 +59,7 @@
#include <pulsecore/core-error.h>
#include <pulsecore/socket-util.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/socket-util.h>
#include <pulsecore/log.h>
#include <pulsecore/parseaddr.h>
#include <pulsecore/macro.h>
@@ -77,9 +76,9 @@ struct pa_socket_client {
pa_io_event *io_event;
pa_time_event *timeout_event;
pa_defer_event *defer_event;
- void (*callback)(pa_socket_client*c, pa_iochannel *io, void *userdata);
+ pa_socket_client_cb_t callback;
void *userdata;
- int local;
+ pa_bool_t local;
#ifdef HAVE_LIBASYNCNS
asyncns_t *asyncns;
asyncns_query_t * asyncns_query;
@@ -87,7 +86,7 @@ struct pa_socket_client {
#endif
};
-static pa_socket_client*pa_socket_client_new(pa_mainloop_api *m) {
+static pa_socket_client* socket_client_new(pa_mainloop_api *m) {
pa_socket_client *c;
pa_assert(m);
@@ -96,11 +95,11 @@ static pa_socket_client*pa_socket_client_new(pa_mainloop_api *m) {
c->mainloop = m;
c->fd = -1;
c->io_event = NULL;
- c->defer_event = NULL;
c->timeout_event = NULL;
+ c->defer_event = NULL;
c->callback = NULL;
c->userdata = NULL;
- c->local = 0;
+ c->local = FALSE;
#ifdef HAVE_LIBASYNCNS
c->asyncns = NULL;
@@ -119,15 +118,15 @@ static void free_events(pa_socket_client *c) {
c->io_event = NULL;
}
- if (c->defer_event) {
- c->mainloop->defer_free(c->defer_event);
- c->defer_event = NULL;
- }
-
if (c->timeout_event) {
c->mainloop->time_free(c->timeout_event);
c->timeout_event = NULL;
}
+
+ if (c->defer_event) {
+ c->mainloop->defer_free(c->defer_event);
+ c->defer_event = NULL;
+ }
}
static void do_call(pa_socket_client *c) {
@@ -177,7 +176,7 @@ finish:
pa_socket_client_unref(c);
}
-static void connect_fixed_cb(pa_mainloop_api *m, pa_defer_event *e, void *userdata) {
+static void connect_defer_cb(pa_mainloop_api *m, pa_defer_event *e, void *userdata) {
pa_socket_client *c = userdata;
pa_assert(m);
@@ -188,7 +187,7 @@ static void connect_fixed_cb(pa_mainloop_api *m, pa_defer_event *e, void *userda
do_call(c);
}
-static void connect_io_cb(pa_mainloop_api*m, pa_io_event *e, int fd, PA_GCC_UNUSED pa_io_event_flags_t f, void *userdata) {
+static void connect_io_cb(pa_mainloop_api*m, pa_io_event *e, int fd, pa_io_event_flags_t f, void *userdata) {
pa_socket_client *c = userdata;
pa_assert(m);
@@ -223,7 +222,7 @@ static int do_connect(pa_socket_client *c, const struct sockaddr *sa, socklen_t
pa_assert_se(c->io_event = c->mainloop->io_new(c->mainloop, c->fd, PA_IO_EVENT_OUTPUT, connect_io_cb, c));
} else
- pa_assert_se(c->defer_event = c->mainloop->defer_new(c->mainloop, connect_fixed_cb, c));
+ pa_assert_se(c->defer_event = c->mainloop->defer_new(c->mainloop, connect_defer_cb, c));
return 0;
}
@@ -252,8 +251,7 @@ pa_socket_client* pa_socket_client_new_unix(pa_mainloop_api *m, const char *file
memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_UNIX;
- strncpy(sa.sun_path, filename, sizeof(sa.sun_path)-1);
- sa.sun_path[sizeof(sa.sun_path) - 1] = 0;
+ pa_strlcpy(sa.sun_path, filename, sizeof(sa.sun_path));
return pa_socket_client_new_sockaddr(m, (struct sockaddr*) &sa, sizeof(sa));
}
@@ -271,22 +269,7 @@ static int sockaddr_prepare(pa_socket_client *c, const struct sockaddr *sa, size
pa_assert(sa);
pa_assert(salen);
- switch (sa->sa_family) {
- case AF_UNIX:
- c->local = 1;
- break;
-
- case AF_INET:
- c->local = ((const struct sockaddr_in*) sa)->sin_addr.s_addr == INADDR_LOOPBACK;
- break;
-
- case AF_INET6:
- c->local = memcmp(&((const struct sockaddr_in6*) sa)->sin6_addr, &in6addr_loopback, sizeof(struct in6_addr)) == 0;
- break;
-
- default:
- c->local = 0;
- }
+ c->local = pa_socket_address_is_local(sa);
if ((c->fd = socket(sa->sa_family, SOCK_STREAM, 0)) < 0) {
pa_log("socket(): %s", pa_cstrerror(errno));
@@ -294,12 +277,13 @@ static int sockaddr_prepare(pa_socket_client *c, const struct sockaddr *sa, size
}
pa_make_fd_cloexec(c->fd);
+
if (sa->sa_family == AF_INET || sa->sa_family == AF_INET6)
pa_make_tcp_socket_low_delay(c->fd);
else
pa_make_socket_low_delay(c->fd);
- if (do_connect(c, sa, salen) < 0)
+ if (do_connect(c, sa, (socklen_t) salen) < 0)
return -1;
return 0;
@@ -312,7 +296,7 @@ pa_socket_client* pa_socket_client_new_sockaddr(pa_mainloop_api *m, const struct
pa_assert(sa);
pa_assert(salen > 0);
- pa_assert_se(c = pa_socket_client_new(m));
+ pa_assert_se(c = socket_client_new(m));
if (sockaddr_prepare(c, sa, salen) < 0)
goto fail;
@@ -361,7 +345,7 @@ pa_socket_client* pa_socket_client_ref(pa_socket_client *c) {
return c;
}
-void pa_socket_client_set_callback(pa_socket_client *c, void (*on_connection)(pa_socket_client *c, pa_iochannel*io, void *userdata), void *userdata) {
+void pa_socket_client_set_callback(pa_socket_client *c, pa_socket_client_cb_t on_connection, void *userdata) {
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
@@ -386,7 +370,7 @@ pa_socket_client* pa_socket_client_new_ipv6(pa_mainloop_api *m, uint8_t address[
#ifdef HAVE_LIBASYNCNS
-static void asyncns_cb(pa_mainloop_api*m, pa_io_event *e, int fd, PA_GCC_UNUSED pa_io_event_flags_t f, void *userdata) {
+static void asyncns_cb(pa_mainloop_api*m, pa_io_event *e, int fd, pa_io_event_flags_t f, void *userdata) {
pa_socket_client *c = userdata;
struct addrinfo *res = NULL;
int ret;
@@ -453,7 +437,7 @@ static void start_timeout(pa_socket_client *c) {
pa_assert(!c->timeout_event);
pa_gettimeofday(&tv);
- pa_timeval_add(&tv, CONNECT_TIMEOUT * 1000000);
+ pa_timeval_add(&tv, CONNECT_TIMEOUT * PA_USEC_PER_SEC);
c->timeout_event = c->mainloop->time_new(c->mainloop, &tv, timeout_cb, c);
}
@@ -489,23 +473,22 @@ pa_socket_client* pa_socket_client_new_string(pa_mainloop_api *m, const char*nam
hints.ai_family = a.type == PA_PARSED_ADDRESS_TCP4 ? PF_INET : (a.type == PA_PARSED_ADDRESS_TCP6 ? PF_INET6 : PF_UNSPEC);
hints.ai_socktype = SOCK_STREAM;
-#ifdef HAVE_LIBASYNCNS
+#if defined(HAVE_LIBASYNCNS)
{
asyncns_t *asyncns;
if (!(asyncns = asyncns_new(1)))
goto finish;
- c = pa_socket_client_new(m);
+ pa_assert_se(c = socket_client_new(m));
c->asyncns = asyncns;
c->asyncns_io_event = m->io_new(m, asyncns_fd(c->asyncns), PA_IO_EVENT_INPUT, asyncns_cb, c);
c->asyncns_query = asyncns_getaddrinfo(c->asyncns, a.path_or_host, port, &hints);
pa_assert(c->asyncns_query);
start_timeout(c);
}
-#else /* HAVE_LIBASYNCNS */
+#elif defined(HAVE_GETADDRINFO)
{
-#ifdef HAVE_GETADDRINFO
int ret;
struct addrinfo *res = NULL;
@@ -520,7 +503,9 @@ pa_socket_client* pa_socket_client_new_string(pa_mainloop_api *m, const char*nam
}
freeaddrinfo(res);
-#else /* HAVE_GETADDRINFO */
+ }
+#else
+ {
struct hostent *host = NULL;
struct sockaddr_in s;
@@ -546,7 +531,6 @@ pa_socket_client* pa_socket_client_new_string(pa_mainloop_api *m, const char*nam
if ((c = pa_socket_client_new_sockaddr(m, (struct sockaddr*)&s, sizeof(s))))
start_timeout(c);
-#endif /* HAVE_GETADDRINFO */
}
#endif /* HAVE_LIBASYNCNS */
}
@@ -561,7 +545,7 @@ finish:
/* Return non-zero when the target sockaddr is considered
local. "local" means UNIX socket or TCP socket on localhost. Other
local IP addresses are not considered local. */
-int pa_socket_client_is_local(pa_socket_client *c) {
+pa_bool_t pa_socket_client_is_local(pa_socket_client *c) {
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
diff --git a/src/pulsecore/socket-client.h b/src/pulsecore/socket-client.h
index 4befad0..9ceeadd 100644
--- a/src/pulsecore/socket-client.h
+++ b/src/pulsecore/socket-client.h
@@ -1,8 +1,6 @@
#ifndef foosocketclienthfoo
#define foosocketclienthfoo
-/* $Id: socket-client.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -34,17 +32,19 @@ struct sockaddr;
typedef struct pa_socket_client pa_socket_client;
+typedef void (*pa_socket_client_cb_t)(pa_socket_client *c, pa_iochannel*io, void *userdata);
+
pa_socket_client* pa_socket_client_new_ipv4(pa_mainloop_api *m, uint32_t address, uint16_t port);
pa_socket_client* pa_socket_client_new_ipv6(pa_mainloop_api *m, uint8_t address[16], uint16_t port);
pa_socket_client* pa_socket_client_new_unix(pa_mainloop_api *m, const char *filename);
pa_socket_client* pa_socket_client_new_sockaddr(pa_mainloop_api *m, const struct sockaddr *sa, size_t salen);
pa_socket_client* pa_socket_client_new_string(pa_mainloop_api *m, const char *a, uint16_t default_port);
-void pa_socket_client_unref(pa_socket_client *c);
pa_socket_client* pa_socket_client_ref(pa_socket_client *c);
+void pa_socket_client_unref(pa_socket_client *c);
-void pa_socket_client_set_callback(pa_socket_client *c, void (*on_connection)(pa_socket_client *c, pa_iochannel*io, void *userdata), void *userdata);
+void pa_socket_client_set_callback(pa_socket_client *c, pa_socket_client_cb_t on_connection, void *userdata);
-int pa_socket_client_is_local(pa_socket_client *c);
+pa_bool_t pa_socket_client_is_local(pa_socket_client *c);
#endif
diff --git a/src/pulsecore/socket-server.c b/src/pulsecore/socket-server.c
index 1b9dd64..a600e0a 100644
--- a/src/pulsecore/socket-server.c
+++ b/src/pulsecore/socket-server.c
@@ -1,5 +1,3 @@
-/* $Id: socket-server.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -83,7 +81,7 @@ struct pa_socket_server {
char *filename;
char *tcpwrap_service;
- void (*on_connection)(pa_socket_server*s, pa_iochannel *io, void *userdata);
+ pa_socket_server_on_connection_cb_t on_connection;
void *userdata;
pa_io_event *io_event;
@@ -91,7 +89,7 @@ struct pa_socket_server {
enum { SOCKET_SERVER_GENERIC, SOCKET_SERVER_IPV4, SOCKET_SERVER_UNIX, SOCKET_SERVER_IPV6 } type;
};
-static void callback(pa_mainloop_api *mainloop, pa_io_event *e, int fd, PA_GCC_UNUSED pa_io_event_flags_t f, void *userdata) {
+static void callback(pa_mainloop_api *mainloop, pa_io_event *e, int fd, pa_io_event_flags_t f, void *userdata) {
pa_socket_server *s = userdata;
pa_iochannel *io;
int nfd;
@@ -195,13 +193,13 @@ pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *file
pa_make_fd_cloexec(fd);
+ memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_UNIX;
- strncpy(sa.sun_path, filename, sizeof(sa.sun_path)-1);
- sa.sun_path[sizeof(sa.sun_path) - 1] = 0;
+ pa_strlcpy(sa.sun_path, filename, sizeof(sa.sun_path));
pa_make_socket_low_delay(fd);
- if (bind(fd, (struct sockaddr*) &sa, SUN_LEN(&sa)) < 0) {
+ if (bind(fd, (struct sockaddr*) &sa, (socklen_t) SUN_LEN(&sa)) < 0) {
pa_log("bind(): %s", pa_cstrerror(errno));
goto fail;
}
@@ -295,7 +293,7 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad
pa_socket_server *ss;
int fd = -1;
struct sockaddr_in6 sa;
- int on = 1;
+ int on;
pa_assert(m);
pa_assert(port > 0);
@@ -308,11 +306,13 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad
pa_make_fd_cloexec(fd);
#ifdef IPV6_V6ONLY
+ on = 1;
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0)
pa_log("setsockopt(IPPROTO_IPV6, IPV6_V6ONLY): %s", pa_cstrerror(errno));
#endif
#ifdef SO_REUSEADDR
+ on = 1;
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
pa_log("setsockopt(SOL_SOCKET, SO_REUSEADDR, 1): %s", pa_cstrerror(errno));
#endif
@@ -426,7 +426,7 @@ void pa_socket_server_unref(pa_socket_server *s) {
socket_server_free(s);
}
-void pa_socket_server_set_callback(pa_socket_server*s, void (*on_connection)(pa_socket_server*s, pa_iochannel *io, void *userdata), void *userdata) {
+void pa_socket_server_set_callback(pa_socket_server*s, pa_socket_server_on_connection_cb_t on_connection, void *userdata) {
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
@@ -507,7 +507,6 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) {
}
pa_snprintf(c, l, "tcp:[%s]:%u", ip, (unsigned) ntohs(sa.sin_port));
-
}
return c;
diff --git a/src/pulsecore/socket-server.h b/src/pulsecore/socket-server.h
index eb40d53..1edfb43 100644
--- a/src/pulsecore/socket-server.h
+++ b/src/pulsecore/socket-server.h
@@ -1,8 +1,6 @@
#ifndef foosocketserverhfoo
#define foosocketserverhfoo
-/* $Id: socket-server.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -47,7 +45,9 @@ pa_socket_server* pa_socket_server_new_ipv6_string(pa_mainloop_api *m, const cha
void pa_socket_server_unref(pa_socket_server*s);
pa_socket_server* pa_socket_server_ref(pa_socket_server *s);
-void pa_socket_server_set_callback(pa_socket_server*s, void (*on_connection)(pa_socket_server*s, pa_iochannel *io, void *userdata), void *userdata);
+typedef void (*pa_socket_server_on_connection_cb_t)(pa_socket_server*s, pa_iochannel *io, void *userdata);
+
+void pa_socket_server_set_callback(pa_socket_server*s, pa_socket_server_on_connection_cb_t connection_cb, void *userdata);
char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l);
diff --git a/src/pulsecore/socket-util.c b/src/pulsecore/socket-util.c
index 67d7d8b..f721f69 100644
--- a/src/pulsecore/socket-util.c
+++ b/src/pulsecore/socket-util.c
@@ -1,5 +1,3 @@
-/* $Id: socket-util.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -129,8 +127,8 @@ void pa_socket_peer_to_string(int fd, char *c, size_t l) {
return;
#endif
}
-
}
+
#ifndef OS_IS_WIN32
pa_snprintf(c, l, "Unknown network client");
return;
@@ -284,3 +282,40 @@ int pa_unix_socket_remove_stale(const char *fn) {
}
#endif /* HAVE_SYS_UN_H */
+
+
+pa_bool_t pa_socket_address_is_local(const struct sockaddr *sa) {
+ pa_assert(sa);
+
+ switch (sa->sa_family) {
+ case AF_UNIX:
+ return TRUE;
+
+ case AF_INET:
+ return ((const struct sockaddr_in*) sa)->sin_addr.s_addr == INADDR_LOOPBACK;
+
+ case AF_INET6:
+ return memcmp(&((const struct sockaddr_in6*) sa)->sin6_addr, &in6addr_loopback, sizeof(struct in6_addr)) == 0;
+
+ default:
+ return FALSE;
+ }
+}
+
+pa_bool_t pa_socket_is_local(int fd) {
+
+ union {
+ struct sockaddr sa;
+ struct sockaddr_in in;
+ struct sockaddr_in6 in6;
+#ifdef HAVE_SYS_UN_H
+ struct sockaddr_un un;
+#endif
+ } sa;
+ socklen_t sa_len = sizeof(sa);
+
+ if (getpeername(fd, &sa.sa, &sa_len) < 0)
+ return FALSE;
+
+ return pa_socket_address_is_local(&sa.sa);
+}
diff --git a/src/pulsecore/socket-util.h b/src/pulsecore/socket-util.h
index 411a927..7a40285 100644
--- a/src/pulsecore/socket-util.h
+++ b/src/pulsecore/socket-util.h
@@ -1,8 +1,6 @@
#ifndef foosocketutilhfoo
#define foosocketutilhfoo
-/* $Id: socket-util.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -26,6 +24,9 @@
***/
#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <pulsecore/macro.h>
void pa_socket_peer_to_string(int fd, char *c, size_t l);
@@ -39,4 +40,7 @@ int pa_socket_set_rcvbuf(int fd, size_t l);
int pa_unix_socket_is_stale(const char *fn);
int pa_unix_socket_remove_stale(const char *fn);
+pa_bool_t pa_socket_address_is_local(const struct sockaddr *sa);
+pa_bool_t pa_socket_is_local(int fd);
+
#endif
diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c
index bd511c7..c30c16e 100644
--- a/src/pulsecore/sound-file-stream.c
+++ b/src/pulsecore/sound-file-stream.c
@@ -1,9 +1,7 @@
-/* $Id: sound-file-stream.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
- Copyright 2004-2006 Lennart Poettering
+ Copyright 2004-2008 Lennart Poettering
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
@@ -35,23 +33,30 @@
#include <sndfile.h>
#include <pulse/xmalloc.h>
+#include <pulse/util.h>
#include <pulsecore/core-error.h>
#include <pulsecore/sink-input.h>
#include <pulsecore/log.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/sample-util.h>
#include "sound-file-stream.h"
+#define MEMBLOCKQ_MAXLENGTH (16*1024*1024)
+
typedef struct file_stream {
pa_msgobject parent;
pa_core *core;
- SNDFILE *sndfile;
pa_sink_input *sink_input;
- pa_memchunk memchunk;
+
+ SNDFILE *sndfile;
sf_count_t (*readf_function)(SNDFILE *sndfile, void *ptr, sf_count_t frames);
- size_t drop;
+
+ /* We need this memblockq here to easily fulfill rewind requests
+ * (even beyond the file start!) */
+ pa_memblockq *memblockq;
} file_stream;
enum {
@@ -62,6 +67,7 @@ PA_DECLARE_CLASS(file_stream);
#define FILE_STREAM(o) (file_stream_cast(o))
static PA_DEFINE_CHECK_TYPE(file_stream, pa_msgobject);
+/* Called from main context */
static void file_stream_unlink(file_stream *u) {
pa_assert(u);
@@ -69,7 +75,6 @@ static void file_stream_unlink(file_stream *u) {
return;
pa_sink_input_unlink(u->sink_input);
-
pa_sink_input_unref(u->sink_input);
u->sink_input = NULL;
@@ -77,14 +82,13 @@ static void file_stream_unlink(file_stream *u) {
file_stream_unref(u);
}
+/* Called from main context */
static void file_stream_free(pa_object *o) {
file_stream *u = FILE_STREAM(o);
pa_assert(u);
- file_stream_unlink(u);
-
- if (u->memchunk.memblock)
- pa_memblock_unref(u->memchunk.memblock);
+ if (u->memblockq)
+ pa_memblockq_free(u->memblockq);
if (u->sndfile)
sf_close(u->sndfile);
@@ -92,6 +96,7 @@ static void file_stream_free(pa_object *o) {
pa_xfree(u);
}
+/* Called from main context */
static int file_stream_process_msg(pa_msgobject *o, int code, void*userdata, int64_t offset, pa_memchunk *chunk) {
file_stream *u = FILE_STREAM(o);
file_stream_assert_ref(u);
@@ -105,117 +110,122 @@ static int file_stream_process_msg(pa_msgobject *o, int code, void*userdata, int
return 0;
}
+/* Called from main context */
static void sink_input_kill_cb(pa_sink_input *i) {
+ file_stream *u;
+
pa_sink_input_assert_ref(i);
+ u = FILE_STREAM(i->userdata);
+ file_stream_assert_ref(u);
- file_stream_unlink(FILE_STREAM(i->userdata));
+ file_stream_unlink(u);
}
-static int sink_input_peek_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+/* Called from IO thread context */
+static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
file_stream *u;
- pa_assert(i);
- pa_assert(chunk);
+ pa_sink_input_assert_ref(i);
u = FILE_STREAM(i->userdata);
file_stream_assert_ref(u);
- if (!u->sndfile)
- return -1;
-
- for (;;) {
+ /* If we are added for the first time, ask for a rewinding so that
+ * we are heard right-away. */
+ if (PA_SINK_INPUT_IS_LINKED(state) &&
+ i->thread_info.state == PA_SINK_INPUT_INIT)
+ pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
+}
- if (!u->memchunk.memblock) {
+/* Called from IO thread context */
+static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+ file_stream *u;
- u->memchunk.memblock = pa_memblock_new(i->sink->core->mempool, length);
- u->memchunk.index = 0;
+ pa_sink_input_assert_ref(i);
+ pa_assert(chunk);
+ u = FILE_STREAM(i->userdata);
+ file_stream_assert_ref(u);
- if (u->readf_function) {
- sf_count_t n;
- void *p;
- size_t fs = pa_frame_size(&i->sample_spec);
+ if (!u->memblockq)
+ return -1;
- p = pa_memblock_acquire(u->memchunk.memblock);
- n = u->readf_function(u->sndfile, p, length/fs);
- pa_memblock_release(u->memchunk.memblock);
+ for (;;) {
+ pa_memchunk tchunk;
+ size_t fs;
+ void *p;
+ sf_count_t n;
+
+ if (pa_memblockq_peek(u->memblockq, chunk) >= 0) {
+ chunk->length = PA_MIN(chunk->length, length);
+ pa_memblockq_drop(u->memblockq, chunk->length);
+ return 0;
+ }
- if (n <= 0)
- n = 0;
+ if (!u->sndfile)
+ break;
- u->memchunk.length = n * fs;
- } else {
- sf_count_t n;
- void *p;
+ tchunk.memblock = pa_memblock_new(i->sink->core->mempool, length);
+ tchunk.index = 0;
- p = pa_memblock_acquire(u->memchunk.memblock);
- n = sf_read_raw(u->sndfile, p, length);
- pa_memblock_release(u->memchunk.memblock);
+ p = pa_memblock_acquire(tchunk.memblock);
- if (n <= 0)
- n = 0;
+ if (u->readf_function) {
+ fs = pa_frame_size(&i->sample_spec);
+ n = u->readf_function(u->sndfile, p, (sf_count_t) (length/fs));
+ } else {
+ fs = 1;
+ n = sf_read_raw(u->sndfile, p, (sf_count_t) length);
+ }
- u->memchunk.length = n;
- }
+ pa_memblock_release(tchunk.memblock);
- if (u->memchunk.length <= 0) {
+ if (n <= 0) {
+ pa_memblock_unref(tchunk.memblock);
- pa_memblock_unref(u->memchunk.memblock);
- pa_memchunk_reset(&u->memchunk);
+ sf_close(u->sndfile);
+ u->sndfile = NULL;
+ break;
+ }
- pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u), FILE_STREAM_MESSAGE_UNLINK, NULL, 0, NULL, NULL);
+ tchunk.length = (size_t) n * fs;
- sf_close(u->sndfile);
- u->sndfile = NULL;
+ pa_memblockq_push(u->memblockq, &tchunk);
+ pa_memblock_unref(tchunk.memblock);
+ }
- return -1;
- }
- }
+ if (pa_sink_input_safe_to_remove(i)) {
+ pa_memblockq_free(u->memblockq);
+ u->memblockq = NULL;
- pa_assert(u->memchunk.memblock);
- pa_assert(u->memchunk.length > 0);
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u), FILE_STREAM_MESSAGE_UNLINK, NULL, 0, NULL, NULL);
+ }
- if (u->drop < u->memchunk.length) {
- u->memchunk.index += u->drop;
- u->memchunk.length -= u->drop;
- u->drop = 0;
- break;
- }
+ return -1;
+ }
- u->drop -= u->memchunk.length;
- pa_memblock_unref(u->memchunk.memblock);
- pa_memchunk_reset(&u->memchunk);
- }
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
+ file_stream *u;
- *chunk = u->memchunk;
- pa_memblock_ref(chunk->memblock);
+ pa_sink_input_assert_ref(i);
+ u = FILE_STREAM(i->userdata);
+ file_stream_assert_ref(u);
- pa_assert(chunk->length > 0);
- pa_assert(u->drop <= 0);
+ if (!u->memblockq)
+ return;
- return 0;
+ pa_memblockq_rewind(u->memblockq, nbytes);
}
-static void sink_input_drop_cb(pa_sink_input *i, size_t length) {
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
file_stream *u;
- pa_assert(i);
- pa_assert(length > 0);
+ pa_sink_input_assert_ref(i);
u = FILE_STREAM(i->userdata);
file_stream_assert_ref(u);
- if (u->memchunk.memblock) {
-
- if (length < u->memchunk.length) {
- u->memchunk.index += length;
- u->memchunk.length -= length;
- return;
- }
-
- length -= u->memchunk.length;
- pa_memblock_unref(u->memchunk.memblock);
- pa_memchunk_reset(&u->memchunk);
- }
+ if (!u->memblockq)
+ return;
- u->drop += length;
+ pa_memblockq_set_maxrewind(u->memblockq, nbytes);
}
int pa_play_file(
@@ -237,10 +247,9 @@ int pa_play_file(
u->parent.process_msg = file_stream_process_msg;
u->core = sink->core;
u->sink_input = NULL;
- pa_memchunk_reset(&u->memchunk);
u->sndfile = NULL;
u->readf_function = NULL;
- u->drop = 0;
+ u->memblockq = NULL;
memset(&sfinfo, 0, sizeof(sfinfo));
@@ -301,8 +310,8 @@ int pa_play_file(
break;
}
- ss.rate = sfinfo.samplerate;
- ss.channels = sfinfo.channels;
+ ss.rate = (uint32_t) sfinfo.samplerate;
+ ss.channels = (uint8_t) sfinfo.channels;
if (!pa_sample_spec_valid(&ss)) {
pa_log("Unsupported sample format in file %s", fname);
@@ -312,18 +321,26 @@ int pa_play_file(
pa_sink_input_new_data_init(&data);
data.sink = sink;
data.driver = __FILE__;
- data.name = fname;
pa_sink_input_new_data_set_sample_spec(&data, &ss);
pa_sink_input_new_data_set_volume(&data, volume);
+ pa_proplist_sets(data.proplist, PA_PROP_MEDIA_NAME, pa_path_get_filename(fname));
+ pa_proplist_sets(data.proplist, PA_PROP_MEDIA_FILENAME, fname);
- if (!(u->sink_input = pa_sink_input_new(sink->core, &data, 0)))
+ u->sink_input = pa_sink_input_new(sink->core, &data, 0);
+ pa_sink_input_new_data_done(&data);
+
+ if (!u->sink_input)
goto fail;
- u->sink_input->peek = sink_input_peek_cb;
- u->sink_input->drop = sink_input_drop_cb;
+ u->sink_input->pop = sink_input_pop_cb;
+ u->sink_input->process_rewind = sink_input_process_rewind_cb;
+ u->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
u->sink_input->kill = sink_input_kill_cb;
+ u->sink_input->state_change = sink_input_state_change_cb;
u->sink_input->userdata = u;
+ u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL);
+
pa_sink_input_put(u->sink_input);
/* The reference to u is dangling here, because we want to keep
diff --git a/src/pulsecore/sound-file-stream.h b/src/pulsecore/sound-file-stream.h
index 928056a..4cc6914 100644
--- a/src/pulsecore/sound-file-stream.h
+++ b/src/pulsecore/sound-file-stream.h
@@ -1,8 +1,6 @@
#ifndef foosoundfilestreamhfoo
#define foosoundfilestreamhfoo
-/* $Id: sound-file-stream.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/sound-file.c b/src/pulsecore/sound-file.c
index 24f0ca1..380cef1 100644
--- a/src/pulsecore/sound-file.c
+++ b/src/pulsecore/sound-file.c
@@ -1,5 +1,3 @@
-/* $Id: sound-file.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -91,7 +89,7 @@ int pa_sound_file_load(
case SF_FORMAT_PCM_U8:
case SF_FORMAT_PCM_S8:
ss->format = PA_SAMPLE_S16NE;
- readf_function = (sf_count_t (*)(SNDFILE *sndfile, void *ptr, sf_count_t frames)) sf_readf_short;
+ readf_function = (sf_count_t (*)(SNDFILE *sndfile, void *_ptr, sf_count_t frames)) sf_readf_short;
break;
case SF_FORMAT_ULAW:
@@ -106,12 +104,12 @@ int pa_sound_file_load(
case SF_FORMAT_DOUBLE:
default:
ss->format = PA_SAMPLE_FLOAT32NE;
- readf_function = (sf_count_t (*)(SNDFILE *sndfile, void *ptr, sf_count_t frames)) sf_readf_float;
+ readf_function = (sf_count_t (*)(SNDFILE *sndfile, void *_ptr, sf_count_t frames)) sf_readf_float;
break;
}
- ss->rate = sfinfo.samplerate;
- ss->channels = sfinfo.channels;
+ ss->rate = (uint32_t) sfinfo.samplerate;
+ ss->channels = (uint8_t) sfinfo.channels;
if (!pa_sample_spec_valid(ss)) {
pa_log("Unsupported sample format in file %s", fname);
@@ -119,12 +117,9 @@ int pa_sound_file_load(
}
if (map)
- if (!pa_channel_map_init_auto(map, ss->channels, PA_CHANNEL_MAP_DEFAULT)) {
- pa_log("Unsupported channel map in file %s", fname);
- goto finish;
- }
+ pa_channel_map_init_extend(map, ss->channels, PA_CHANNEL_MAP_DEFAULT);
- if ((l = pa_frame_size(ss) * sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) {
+ if ((l = pa_frame_size(ss) * (size_t) sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) {
pa_log("File too large");
goto finish;
}
@@ -136,7 +131,7 @@ int pa_sound_file_load(
ptr = pa_memblock_acquire(chunk->memblock);
if ((readf_function && readf_function(sf, ptr, sfinfo.frames) != sfinfo.frames) ||
- (!readf_function && sf_read_raw(sf, ptr, l) != (sf_count_t) l)) {
+ (!readf_function && sf_read_raw(sf, ptr, (sf_count_t) l) != (sf_count_t) l)) {
pa_log("Premature file end");
goto finish;
}
@@ -194,15 +189,15 @@ int pa_sound_file_too_big_to_cache(const char *fname) {
break;
}
- ss.rate = sfinfo.samplerate;
- ss.channels = sfinfo.channels;
+ ss.rate = (uint32_t) sfinfo.samplerate;
+ ss.channels = (uint8_t) sfinfo.channels;
if (!pa_sample_spec_valid(&ss)) {
pa_log("Unsupported sample format in file %s", fname);
return -1;
}
- if ((pa_frame_size(&ss) * sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) {
+ if ((pa_frame_size(&ss) * (size_t) sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) {
pa_log("File too large: %s", fname);
return 1;
}
diff --git a/src/pulsecore/sound-file.h b/src/pulsecore/sound-file.h
index 9f7a8cf..e4d703d 100644
--- a/src/pulsecore/sound-file.h
+++ b/src/pulsecore/sound-file.h
@@ -1,8 +1,6 @@
#ifndef soundfilehfoo
#define soundfilehfoo
-/* $Id: sound-file.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 5892d06..d76f6e4 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -1,5 +1,3 @@
-/* $Id: source-output.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -32,12 +30,16 @@
#include <pulse/utf8.h>
#include <pulse/xmalloc.h>
+#include <pulsecore/sample-util.h>
#include <pulsecore/core-subscribe.h>
#include <pulsecore/log.h>
#include <pulsecore/namereg.h>
+#include <pulsecore/core-util.h>
#include "source-output.h"
+#define MEMBLOCKQ_MAXLENGTH (32*1024*1024)
+
static PA_DEFINE_CHECK_TYPE(pa_source_output, pa_msgobject);
static void source_output_free(pa_object* mo);
@@ -47,9 +49,18 @@ pa_source_output_new_data* pa_source_output_new_data_init(pa_source_output_new_d
memset(data, 0, sizeof(*data));
data->resample_method = PA_RESAMPLER_INVALID;
+ data->proplist = pa_proplist_new();
+
return data;
}
+void pa_source_output_new_data_set_sample_spec(pa_source_output_new_data *data, const pa_sample_spec *spec) {
+ pa_assert(data);
+
+ if ((data->sample_spec_is_set = !!spec))
+ data->sample_spec = *spec;
+}
+
void pa_source_output_new_data_set_channel_map(pa_source_output_new_data *data, const pa_channel_map *map) {
pa_assert(data);
@@ -57,13 +68,31 @@ void pa_source_output_new_data_set_channel_map(pa_source_output_new_data *data,
data->channel_map = *map;
}
-void pa_source_output_new_data_set_sample_spec(pa_source_output_new_data *data, const pa_sample_spec *spec) {
+void pa_source_output_new_data_done(pa_source_output_new_data *data) {
pa_assert(data);
- if ((data->sample_spec_is_set = !!spec))
- data->sample_spec = *spec;
+ pa_proplist_free(data->proplist);
}
+/* Called from main context */
+static void reset_callbacks(pa_source_output *o) {
+ pa_assert(o);
+
+ o->push = NULL;
+ o->process_rewind = NULL;
+ o->update_max_rewind = NULL;
+ o->update_source_requested_latency = NULL;
+ o->update_source_latency_range = NULL;
+ o->attach = NULL;
+ o->detach = NULL;
+ o->suspend = NULL;
+ o->moved = NULL;
+ o->kill = NULL;
+ o->get_latency = NULL;
+ o->state_change = NULL;
+}
+
+/* Called from main context */
pa_source_output* pa_source_output_new(
pa_core *core,
pa_source_output_new_data *data,
@@ -80,14 +109,15 @@ pa_source_output* pa_source_output_new(
return NULL;
pa_return_null_if_fail(!data->driver || pa_utf8_valid(data->driver));
- pa_return_null_if_fail(!data->name || pa_utf8_valid(data->name));
if (!data->source)
- data->source = pa_namereg_get(core, NULL, PA_NAMEREG_SOURCE, 1);
+ data->source = pa_namereg_get(core, NULL, PA_NAMEREG_SOURCE, TRUE);
pa_return_null_if_fail(data->source);
pa_return_null_if_fail(pa_source_get_state(data->source) != PA_SOURCE_UNLINKED);
+ pa_return_null_if_fail(!data->direct_on_input || data->direct_on_input->sink == data->source->monitor_of);
+
if (!data->sample_spec_is_set)
data->sample_spec = data->source->sample_spec;
@@ -141,7 +171,8 @@ pa_source_output* pa_source_output_new(
data->resample_method,
((flags & PA_SOURCE_OUTPUT_VARIABLE_RATE) ? PA_RESAMPLER_VARIABLE_RATE : 0) |
((flags & PA_SOURCE_OUTPUT_NO_REMAP) ? PA_RESAMPLER_NO_REMAP : 0) |
- (core->disable_remixing || (flags & PA_SOURCE_OUTPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0)))) {
+ (core->disable_remixing || (flags & PA_SOURCE_OUTPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0) |
+ (core->disable_lfe_remixing ? PA_RESAMPLER_NO_LFE : 0)))) {
pa_log_warn("Unsupported resampling operation.");
return NULL;
}
@@ -156,7 +187,7 @@ pa_source_output* pa_source_output_new(
o->core = core;
o->state = PA_SOURCE_OUTPUT_INIT;
o->flags = flags;
- o->name = pa_xstrdup(data->name);
+ o->proplist = pa_proplist_copy(data->proplist);
o->driver = pa_xstrdup(data->driver);
o->module = data->module;
o->source = data->source;
@@ -166,26 +197,37 @@ pa_source_output* pa_source_output_new(
o->sample_spec = data->sample_spec;
o->channel_map = data->channel_map;
- o->push = NULL;
- o->kill = NULL;
- o->get_latency = NULL;
- o->detach = NULL;
- o->attach = NULL;
- o->suspend = NULL;
- o->moved = NULL;
+ o->direct_on_input = data->direct_on_input;
+
+ reset_callbacks(o);
o->userdata = NULL;
o->thread_info.state = o->state;
o->thread_info.attached = FALSE;
o->thread_info.sample_spec = o->sample_spec;
o->thread_info.resampler = resampler;
+ o->thread_info.requested_source_latency = (pa_usec_t) -1;
+ o->thread_info.direct_on_input = o->direct_on_input;
+
+ o->thread_info.delay_memblockq = pa_memblockq_new(
+ 0,
+ MEMBLOCKQ_MAXLENGTH,
+ 0,
+ pa_frame_size(&o->source->sample_spec),
+ 0,
+ 1,
+ 0,
+ &o->source->silence);
pa_assert_se(pa_idxset_put(core->source_outputs, o, &o->index) == 0);
pa_assert_se(pa_idxset_put(o->source->outputs, pa_source_output_ref(o), NULL) == 0);
+ if (o->direct_on_input)
+ pa_assert_se(pa_idxset_put(o->direct_on_input->direct_outputs, o, NULL) == 0);
+
pa_log_info("Created output %u \"%s\" on %s with sample spec %s and channel map %s",
o->index,
- o->name,
+ pa_strnull(pa_proplist_gets(o->proplist, PA_PROP_MEDIA_NAME)),
o->source->name,
pa_sample_spec_snprint(st, sizeof(st), &o->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &o->channel_map));
@@ -195,22 +237,28 @@ pa_source_output* pa_source_output_new(
return o;
}
-static int source_output_set_state(pa_source_output *o, pa_source_output_state_t state) {
+/* Called from main context */
+static void update_n_corked(pa_source_output *o, pa_source_output_state_t state) {
pa_assert(o);
- if (o->state == state)
- return 0;
-
- if (pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o), PA_SOURCE_OUTPUT_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL) < 0)
- return -1;
-
if (o->state == PA_SOURCE_OUTPUT_CORKED && state != PA_SOURCE_OUTPUT_CORKED)
pa_assert_se(o->source->n_corked -- >= 1);
else if (o->state != PA_SOURCE_OUTPUT_CORKED && state == PA_SOURCE_OUTPUT_CORKED)
o->source->n_corked++;
pa_source_update_status(o->source);
+}
+
+/* Called from main context */
+static int source_output_set_state(pa_source_output *o, pa_source_output_state_t state) {
+ pa_assert(o);
+ if (o->state == state)
+ return 0;
+
+ pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o), PA_SOURCE_OUTPUT_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL) == 0);
+
+ update_n_corked(o, state);
o->state = state;
if (state != PA_SOURCE_OUTPUT_UNLINKED)
@@ -219,6 +267,7 @@ static int source_output_set_state(pa_source_output *o, pa_source_output_state_t
return 0;
}
+/* Called from main context */
void pa_source_output_unlink(pa_source_output*o) {
pa_bool_t linked;
pa_assert(o);
@@ -228,29 +277,25 @@ void pa_source_output_unlink(pa_source_output*o) {
pa_source_output_ref(o);
- linked = PA_SOURCE_OUTPUT_LINKED(o->state);
+ linked = PA_SOURCE_OUTPUT_IS_LINKED(o->state);
if (linked)
pa_hook_fire(&o->source->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK], o);
+ if (o->direct_on_input)
+ pa_idxset_remove_by_data(o->direct_on_input->direct_outputs, o, NULL);
pa_idxset_remove_by_data(o->source->core->source_outputs, o, NULL);
if (pa_idxset_remove_by_data(o->source->outputs, o, NULL))
pa_source_output_unref(o);
- if (linked) {
- pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_REMOVE_OUTPUT, o, 0, NULL);
- source_output_set_state(o, PA_SOURCE_OUTPUT_UNLINKED);
- pa_source_update_status(o->source);
- } else
- o->state = PA_SOURCE_OUTPUT_UNLINKED;
+ update_n_corked(o, PA_SOURCE_OUTPUT_UNLINKED);
+ o->state = PA_SOURCE_OUTPUT_UNLINKED;
- o->push = NULL;
- o->kill = NULL;
- o->get_latency = NULL;
- o->attach = NULL;
- o->detach = NULL;
- o->suspend = NULL;
- o->moved = NULL;
+ if (linked)
+ if (o->source->asyncmsgq)
+ pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_REMOVE_OUTPUT, o, 0, NULL) == 0);
+
+ reset_callbacks(o);
if (linked) {
pa_subscription_post(o->source->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_REMOVE, o->index);
@@ -261,106 +306,249 @@ void pa_source_output_unlink(pa_source_output*o) {
pa_source_output_unref(o);
}
+/* Called from main context */
static void source_output_free(pa_object* mo) {
pa_source_output *o = PA_SOURCE_OUTPUT(mo);
+ pa_assert(o);
pa_assert(pa_source_output_refcnt(o) == 0);
- if (PA_SOURCE_OUTPUT_LINKED(o->state))
+ if (PA_SOURCE_OUTPUT_IS_LINKED(o->state))
pa_source_output_unlink(o);
- pa_log_info("Freeing output %u \"%s\"", o->index, o->name);
+ pa_log_info("Freeing output %u \"%s\"", o->index, pa_strnull(pa_proplist_gets(o->proplist, PA_PROP_MEDIA_NAME)));
pa_assert(!o->thread_info.attached);
+ if (o->thread_info.delay_memblockq)
+ pa_memblockq_free(o->thread_info.delay_memblockq);
+
if (o->thread_info.resampler)
pa_resampler_free(o->thread_info.resampler);
- pa_xfree(o->name);
+ if (o->proplist)
+ pa_proplist_free(o->proplist);
+
pa_xfree(o->driver);
pa_xfree(o);
}
+/* Called from main context */
void pa_source_output_put(pa_source_output *o) {
+ pa_source_output_state_t state;
pa_source_output_assert_ref(o);
pa_assert(o->state == PA_SOURCE_OUTPUT_INIT);
+
+ /* The following fields must be initialized properly */
pa_assert(o->push);
+ pa_assert(o->kill);
- o->thread_info.state = o->state = o->flags & PA_SOURCE_OUTPUT_START_CORKED ? PA_SOURCE_OUTPUT_CORKED : PA_SOURCE_OUTPUT_RUNNING;
+ state = o->flags & PA_SOURCE_OUTPUT_START_CORKED ? PA_SOURCE_OUTPUT_CORKED : PA_SOURCE_OUTPUT_RUNNING;
- if (o->state == PA_SOURCE_OUTPUT_CORKED)
- o->source->n_corked++;
+ update_n_corked(o, state);
+ o->state = state;
- pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_ADD_OUTPUT, o, 0, NULL);
- pa_source_update_status(o->source);
+ pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_ADD_OUTPUT, o, 0, NULL) == 0);
pa_subscription_post(o->source->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_NEW, o->index);
-
pa_hook_fire(&o->source->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_PUT], o);
}
+/* Called from main context */
void pa_source_output_kill(pa_source_output*o) {
pa_source_output_assert_ref(o);
- pa_assert(PA_SOURCE_OUTPUT_LINKED(o->state));
+ pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->state));
- if (o->kill)
- o->kill(o);
+ o->kill(o);
}
-pa_usec_t pa_source_output_get_latency(pa_source_output *o) {
- pa_usec_t r = 0;
+/* Called from main context */
+pa_usec_t pa_source_output_get_latency(pa_source_output *o, pa_usec_t *source_latency) {
+ pa_usec_t r[2] = { 0, 0 };
pa_source_output_assert_ref(o);
- pa_assert(PA_SOURCE_OUTPUT_LINKED(o->state));
+ pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->state));
- if (pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o), PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY, &r, 0, NULL) < 0)
- r = 0;
+ pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o), PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY, r, 0, NULL) == 0);
if (o->get_latency)
- r += o->get_latency(o);
+ r[0] += o->get_latency(o);
- return r;
+ if (source_latency)
+ *source_latency = r[1];
+
+ return r[0];
}
/* Called from thread context */
void pa_source_output_push(pa_source_output *o, const pa_memchunk *chunk) {
- pa_memchunk rchunk;
+ size_t length;
+ size_t limit, mbs = 0;
pa_source_output_assert_ref(o);
- pa_assert(PA_SOURCE_OUTPUT_LINKED(o->thread_info.state));
+ pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->thread_info.state));
pa_assert(chunk);
- pa_assert(chunk->length);
+ pa_assert(pa_frame_aligned(chunk->length, &o->source->sample_spec));
- if (!o->push || o->state == PA_SOURCE_OUTPUT_CORKED)
+ if (!o->push || o->thread_info.state == PA_SOURCE_OUTPUT_CORKED)
return;
- pa_assert(o->state == PA_SOURCE_OUTPUT_RUNNING);
+ pa_assert(o->thread_info.state == PA_SOURCE_OUTPUT_RUNNING);
- if (!o->thread_info.resampler) {
- o->push(o, chunk);
- return;
+ if (pa_memblockq_push(o->thread_info.delay_memblockq, chunk) < 0) {
+ pa_log_debug("Delay queue overflow!");
+ pa_memblockq_seek(o->thread_info.delay_memblockq, (int64_t) chunk->length, PA_SEEK_RELATIVE);
+ }
+
+ limit = o->process_rewind ? 0 : o->source->thread_info.max_rewind;
+
+ /* Implement the delay queue */
+ while ((length = pa_memblockq_get_length(o->thread_info.delay_memblockq)) > limit) {
+ pa_memchunk qchunk;
+
+ length -= limit;
+
+ pa_assert_se(pa_memblockq_peek(o->thread_info.delay_memblockq, &qchunk) >= 0);
+
+ if (qchunk.length > length)
+ qchunk.length = length;
+
+ pa_assert(qchunk.length > 0);
+
+ if (!o->thread_info.resampler)
+ o->push(o, &qchunk);
+ else {
+ pa_memchunk rchunk;
+
+ if (mbs == 0)
+ mbs = pa_resampler_max_block_size(o->thread_info.resampler);
+
+ if (qchunk.length > mbs)
+ qchunk.length = mbs;
+
+ pa_resampler_run(o->thread_info.resampler, &qchunk, &rchunk);
+
+ if (rchunk.length > 0)
+ o->push(o, &rchunk);
+
+ if (rchunk.memblock)
+ pa_memblock_unref(rchunk.memblock);
+ }
+
+ pa_memblock_unref(qchunk.memblock);
+ pa_memblockq_drop(o->thread_info.delay_memblockq, qchunk.length);
}
+}
+
+/* Called from thread context */
+void pa_source_output_process_rewind(pa_source_output *o, size_t nbytes /* in source sample spec */) {
+ pa_source_output_assert_ref(o);
- pa_resampler_run(o->thread_info.resampler, chunk, &rchunk);
- if (!rchunk.length)
+ pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->thread_info.state));
+ pa_assert(pa_frame_aligned(nbytes, &o->source->sample_spec));
+
+ if (nbytes <= 0)
return;
- pa_assert(rchunk.memblock);
- o->push(o, &rchunk);
- pa_memblock_unref(rchunk.memblock);
+ if (o->process_rewind) {
+ pa_assert(pa_memblockq_get_length(o->thread_info.delay_memblockq) == 0);
+
+ if (o->thread_info.resampler)
+ nbytes = pa_resampler_result(o->thread_info.resampler, nbytes);
+
+ pa_log_debug("Have to rewind %lu bytes on implementor.", (unsigned long) nbytes);
+
+ if (nbytes > 0)
+ o->process_rewind(o, nbytes);
+
+ if (o->thread_info.resampler)
+ pa_resampler_reset(o->thread_info.resampler);
+
+ } else
+ pa_memblockq_rewind(o->thread_info.delay_memblockq, nbytes);
+}
+
+/* Called from thread context */
+void pa_source_output_update_max_rewind(pa_source_output *o, size_t nbytes /* in the source's sample spec */) {
+ pa_source_output_assert_ref(o);
+ pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->thread_info.state));
+ pa_assert(pa_frame_aligned(nbytes, &o->source->sample_spec));
+
+ if (o->update_max_rewind)
+ o->update_max_rewind(o, o->thread_info.resampler ? pa_resampler_result(o->thread_info.resampler, nbytes) : nbytes);
+}
+
+/* Called from thread context */
+static pa_usec_t fixup_latency(pa_source *s, pa_usec_t usec) {
+ pa_source_assert_ref(s);
+
+ if (usec == (pa_usec_t) -1)
+ return usec;
+
+ if (s->thread_info.max_latency > 0 && usec > s->thread_info.max_latency)
+ usec = s->thread_info.max_latency;
+
+ if (s->thread_info.min_latency > 0 && usec < s->thread_info.min_latency)
+ usec = s->thread_info.min_latency;
+
+ return usec;
+}
+
+/* Called from thread context */
+pa_usec_t pa_source_output_set_requested_latency_within_thread(pa_source_output *o, pa_usec_t usec) {
+ pa_source_output_assert_ref(o);
+
+ usec = fixup_latency(o->source, usec);
+ o->thread_info.requested_source_latency = usec;
+ pa_source_invalidate_requested_latency(o->source);
+
+ return usec;
+}
+
+/* Called from main context */
+pa_usec_t pa_source_output_set_requested_latency(pa_source_output *o, pa_usec_t usec) {
+ pa_source_output_assert_ref(o);
+
+ if (PA_SOURCE_OUTPUT_IS_LINKED(o->state))
+ pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o), PA_SOURCE_OUTPUT_MESSAGE_SET_REQUESTED_LATENCY, &usec, 0, NULL) == 0);
+ else
+ /* If this source output is not realized yet, we have to touch
+ * the thread info data directly */
+
+ o->thread_info.requested_source_latency = usec;
+
+ return usec;
+}
+
+/* Called from main context */
+pa_usec_t pa_source_output_get_requested_latency(pa_source_output *o) {
+ pa_usec_t usec = 0;
+
+ pa_source_output_assert_ref(o);
+
+ if (PA_SOURCE_OUTPUT_IS_LINKED(o->state))
+ pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o), PA_SOURCE_OUTPUT_MESSAGE_GET_REQUESTED_LATENCY, &usec, 0, NULL) == 0);
+ else
+ /* If this source output is not realized yet, we have to touch
+ * the thread info data directly */
+ usec = o->thread_info.requested_source_latency;
+
+ return usec;
}
+/* Called from main context */
void pa_source_output_cork(pa_source_output *o, pa_bool_t b) {
pa_source_output_assert_ref(o);
- pa_assert(PA_SOURCE_OUTPUT_LINKED(o->state));
+ pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->state));
source_output_set_state(o, b ? PA_SOURCE_OUTPUT_CORKED : PA_SOURCE_OUTPUT_RUNNING);
}
+/* Called from main context */
int pa_source_output_set_rate(pa_source_output *o, uint32_t rate) {
pa_source_output_assert_ref(o);
- pa_assert(PA_SOURCE_OUTPUT_LINKED(o->state));
+ pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->state));
pa_return_val_if_fail(o->thread_info.resampler, -1);
if (o->sample_spec.rate == rate)
@@ -374,37 +562,45 @@ int pa_source_output_set_rate(pa_source_output *o, uint32_t rate) {
return 0;
}
+/* Called from main context */
void pa_source_output_set_name(pa_source_output *o, const char *name) {
+ const char *old;
pa_source_output_assert_ref(o);
- if (!o->name && !name)
+ if (!name && !pa_proplist_contains(o->proplist, PA_PROP_MEDIA_NAME))
return;
- if (o->name && name && !strcmp(o->name, name))
+ old = pa_proplist_gets(o->proplist, PA_PROP_MEDIA_NAME);
+
+ if (old && name && !strcmp(old, name))
return;
- pa_xfree(o->name);
- o->name = pa_xstrdup(name);
+ if (name)
+ pa_proplist_sets(o->proplist, PA_PROP_MEDIA_NAME, name);
+ else
+ pa_proplist_unset(o->proplist, PA_PROP_MEDIA_NAME);
- if (PA_SOURCE_OUTPUT_LINKED(o->state)) {
- pa_hook_fire(&o->source->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_NAME_CHANGED], o);
+ if (PA_SOURCE_OUTPUT_IS_LINKED(o->state)) {
+ pa_hook_fire(&o->source->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_PROPLIST_CHANGED], o);
pa_subscription_post(o->source->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
}
}
+/* Called from main context */
pa_resample_method_t pa_source_output_get_resample_method(pa_source_output *o) {
pa_source_output_assert_ref(o);
return o->resample_method;
}
+/* Called from main context */
int pa_source_output_move_to(pa_source_output *o, pa_source *dest) {
pa_source *origin;
- pa_resampler *new_resampler = NULL;
+ pa_resampler *new_resampler;
pa_source_output_move_hook_data hook_data;
pa_source_output_assert_ref(o);
- pa_assert(PA_SOURCE_OUTPUT_LINKED(o->state));
+ pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->state));
pa_source_assert_ref(dest);
origin = o->source;
@@ -415,6 +611,9 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest) {
if (o->flags & PA_SOURCE_OUTPUT_DONT_MOVE)
return -1;
+ if (o->direct_on_input)
+ return -1;
+
if (pa_idxset_size(dest->outputs) >= PA_MAX_OUTPUTS_PER_SOURCE) {
pa_log_warn("Failed to move source output: too many outputs per source.");
return -1;
@@ -444,14 +643,15 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest) {
pa_log_warn("Unsupported resampling operation.");
return -1;
}
- }
+ } else
+ new_resampler = NULL;
hook_data.source_output = o;
hook_data.destination = dest;
pa_hook_fire(&o->source->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_MOVE], &hook_data);
/* Okey, let's move it */
- pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_REMOVE_OUTPUT, o, 0, NULL);
+ pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_REMOVE_OUTPUT, o, 0, NULL) == 0);
pa_idxset_remove_by_data(origin->outputs, o, NULL);
pa_idxset_put(dest->outputs, o, NULL);
@@ -467,13 +667,25 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest) {
if (o->thread_info.resampler)
pa_resampler_free(o->thread_info.resampler);
o->thread_info.resampler = new_resampler;
- }
- pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_ADD_OUTPUT, o, 0, NULL);
+ pa_memblockq_free(o->thread_info.delay_memblockq);
+
+ o->thread_info.delay_memblockq = pa_memblockq_new(
+ 0,
+ MEMBLOCKQ_MAXLENGTH,
+ 0,
+ pa_frame_size(&o->source->sample_spec),
+ 0,
+ 1,
+ 0,
+ &o->source->silence);
+ }
pa_source_update_status(origin);
pa_source_update_status(dest);
+ pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_ADD_OUTPUT, o, 0, NULL) == 0);
+
if (o->moved)
o->moved(o);
@@ -487,26 +699,61 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest) {
return 0;
}
-/* Called from thread context */
+/* Called from IO thread context */
+void pa_source_output_set_state_within_thread(pa_source_output *o, pa_source_output_state_t state) {
+ pa_source_output_assert_ref(o);
+
+ if (state == o->thread_info.state)
+ return;
+
+ if (o->state_change)
+ o->state_change(o, state);
+
+ o->thread_info.state = state;
+}
+
+/* Called from IO thread context, except when it is not */
int pa_source_output_process_msg(pa_msgobject *mo, int code, void *userdata, int64_t offset, pa_memchunk* chunk) {
pa_source_output *o = PA_SOURCE_OUTPUT(mo);
-
pa_source_output_assert_ref(o);
- pa_assert(PA_SOURCE_OUTPUT_LINKED(o->thread_info.state));
switch (code) {
- case PA_SOURCE_OUTPUT_MESSAGE_SET_RATE: {
+ case PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY: {
+ pa_usec_t *r = userdata;
+ pa_usec_t source_usec = 0;
+
+ r[0] += pa_bytes_to_usec(pa_memblockq_get_length(o->thread_info.delay_memblockq), &o->source->sample_spec);
+
+ if (o->source->parent.process_msg(PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_GET_LATENCY, &source_usec, 0, NULL) >= 0)
+ r[1] += source_usec;
+
+ return 0;
+ }
+
+ case PA_SOURCE_OUTPUT_MESSAGE_SET_RATE:
o->thread_info.sample_spec.rate = PA_PTR_TO_UINT(userdata);
pa_resampler_set_output_rate(o->thread_info.resampler, PA_PTR_TO_UINT(userdata));
+ return 0;
+
+ case PA_SOURCE_OUTPUT_MESSAGE_SET_STATE:
+
+ pa_source_output_set_state_within_thread(o, PA_PTR_TO_UINT(userdata));
+ return 0;
+
+ case PA_SOURCE_OUTPUT_MESSAGE_SET_REQUESTED_LATENCY: {
+ pa_usec_t *usec = userdata;
+
+ *usec = pa_source_output_set_requested_latency_within_thread(o, *usec);
return 0;
}
- case PA_SOURCE_OUTPUT_MESSAGE_SET_STATE: {
- o->thread_info.state = PA_PTR_TO_UINT(userdata);
+ case PA_SOURCE_OUTPUT_MESSAGE_GET_REQUESTED_LATENCY: {
+ pa_usec_t *r = userdata;
+ *r = o->thread_info.requested_source_latency;
return 0;
}
}
diff --git a/src/pulsecore/source-output.h b/src/pulsecore/source-output.h
index 52de1c6..a7aac81 100644
--- a/src/pulsecore/source-output.h
+++ b/src/pulsecore/source-output.h
@@ -1,8 +1,6 @@
#ifndef foopulsesourceoutputhfoo
#define foopulsesourceoutputhfoo
-/* $Id: source-output.h 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -42,7 +40,7 @@ typedef enum pa_source_output_state {
PA_SOURCE_OUTPUT_UNLINKED
} pa_source_output_state_t;
-static inline pa_bool_t PA_SOURCE_OUTPUT_LINKED(pa_source_output_state_t x) {
+static inline pa_bool_t PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_state_t x) {
return x == PA_SOURCE_OUTPUT_RUNNING || x == PA_SOURCE_OUTPUT_CORKED;
}
@@ -62,21 +60,45 @@ struct pa_source_output {
uint32_t index;
pa_core *core;
+
pa_source_output_state_t state;
pa_source_output_flags_t flags;
- char *name, *driver; /* may be NULL */
+ char *driver; /* may be NULL */
+ pa_proplist *proplist;
+
pa_module *module; /* may be NULL */
pa_client *client; /* may be NULL */
pa_source *source;
+ /* A source output can monitor just a single input of a sink, in which case we find it here */
+ pa_sink_input *direct_on_input; /* may be NULL */
+
pa_sample_spec sample_spec;
pa_channel_map channel_map;
+ pa_resample_method_t resample_method;
+
/* Pushes a new memchunk into the output. Called from IO thread
* context. */
- void (*push)(pa_source_output *o, const pa_memchunk *chunk);
+ void (*push)(pa_source_output *o, const pa_memchunk *chunk); /* may NOT be NULL */
+
+ /* Only relevant for monitor sources right now: called when the
+ * recorded stream is rewound. Called from IO context */
+ void (*process_rewind)(pa_source_output *o, size_t nbytes); /* may be NULL */
+
+ /* Called whenever the maximum rewindable size of the source
+ * changes. Called from IO thread context. */
+ void (*update_max_rewind) (pa_source_output *o, size_t nbytes); /* may be NULL */
+
+ /* Called whenever the configured latency of the source
+ * changes. Called from IO context. */
+ void (*update_source_requested_latency) (pa_source_output *o); /* may be NULL */
+
+ /* Called whenver the latency range of the source changes. Called
+ * from IO context. */
+ void (*update_source_latency_range) (pa_source_output *o); /* may be NULL */
/* If non-NULL this function is called when the output is first
* connected to a source. Called from IO thread context */
@@ -87,24 +109,26 @@ struct pa_source_output {
void (*detach) (pa_source_output *o); /* may be NULL */
/* If non-NULL called whenever the the source this output is attached
- * to changes. Called from main context */
- void (*moved) (pa_source_output *o); /* may be NULL */
-
- /* If non-NULL called whenever the the source this output is attached
* to suspends or resumes. Called from main context */
void (*suspend) (pa_source_output *o, pa_bool_t b); /* may be NULL */
+ /* If non-NULL called whenever the the source this output is attached
+ * to changes. Called from main context */
+ void (*moved) (pa_source_output *o); /* may be NULL */
+
/* Supposed to unlink and destroy this stream. Called from main
* context. */
- void (*kill)(pa_source_output* o); /* may be NULL */
+ void (*kill)(pa_source_output* o); /* may NOT be NULL */
/* Return the current latency (i.e. length of bufferd audio) of
- this stream. Called from main context. If NULL a
- PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY message is sent to the IO
- thread instead. */
+ this stream. Called from main context. This is added to what the
+ PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY message sent to the IO thread
+ returns */
pa_usec_t (*get_latency) (pa_source_output *o); /* may be NULL */
- pa_resample_method_t resample_method;
+ /* If non_NULL this function is called from thread context if the
+ * state changes. The old state is found in thread_info.state. */
+ void (*state_change) (pa_source_output *o, pa_source_output_state_t state); /* may be NULL */
struct {
pa_source_output_state_t state;
@@ -114,6 +138,15 @@ struct pa_source_output {
pa_sample_spec sample_spec;
pa_resampler* resampler; /* may be NULL */
+
+ /* We maintain a delay memblockq here for source outputs that
+ * don't implement rewind() */
+ pa_memblockq *delay_memblockq;
+
+ /* The requested latency for the source */
+ pa_usec_t requested_source_latency;
+
+ pa_sink_input *direct_on_input; /* may be NULL */
} thread_info;
void *userdata;
@@ -126,34 +159,40 @@ enum {
PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY,
PA_SOURCE_OUTPUT_MESSAGE_SET_RATE,
PA_SOURCE_OUTPUT_MESSAGE_SET_STATE,
+ PA_SOURCE_OUTPUT_MESSAGE_SET_REQUESTED_LATENCY,
+ PA_SOURCE_OUTPUT_MESSAGE_GET_REQUESTED_LATENCY,
PA_SOURCE_OUTPUT_MESSAGE_MAX
};
typedef struct pa_source_output_new_data {
- const char *name, *driver;
+ pa_proplist *proplist;
+ pa_sink_input *direct_on_input;
+
+ const char *driver;
pa_module *module;
pa_client *client;
pa_source *source;
+ pa_resample_method_t resample_method;
+
pa_sample_spec sample_spec;
- pa_bool_t sample_spec_is_set;
pa_channel_map channel_map;
- pa_bool_t channel_map_is_set;
- pa_resample_method_t resample_method;
+ pa_bool_t sample_spec_is_set:1;
+ pa_bool_t channel_map_is_set:1;
} pa_source_output_new_data;
+pa_source_output_new_data* pa_source_output_new_data_init(pa_source_output_new_data *data);
+void pa_source_output_new_data_set_sample_spec(pa_source_output_new_data *data, const pa_sample_spec *spec);
+void pa_source_output_new_data_set_channel_map(pa_source_output_new_data *data, const pa_channel_map *map);
+void pa_source_output_new_data_done(pa_source_output_new_data *data);
+
typedef struct pa_source_output_move_hook_data {
pa_source_output *source_output;
pa_source *destination;
} pa_source_output_move_hook_data;
-pa_source_output_new_data* pa_source_output_new_data_init(pa_source_output_new_data *data);
-void pa_source_output_new_data_set_sample_spec(pa_source_output_new_data *data, const pa_sample_spec *spec);
-void pa_source_output_new_data_set_channel_map(pa_source_output_new_data *data, const pa_channel_map *map);
-void pa_source_output_new_data_set_volume(pa_source_output_new_data *data, const pa_cvolume *volume);
-
/* To be called by the implementing module only */
pa_source_output* pa_source_output_new(
@@ -166,16 +205,18 @@ void pa_source_output_unlink(pa_source_output*o);
void pa_source_output_set_name(pa_source_output *i, const char *name);
+pa_usec_t pa_source_output_set_requested_latency(pa_source_output *i, pa_usec_t usec);
+
+void pa_source_output_cork(pa_source_output *i, pa_bool_t b);
+
+int pa_source_output_set_rate(pa_source_output *o, uint32_t rate);
+
/* Callable by everyone */
/* External code may request disconnection with this funcion */
void pa_source_output_kill(pa_source_output*o);
-pa_usec_t pa_source_output_get_latency(pa_source_output *i);
-
-void pa_source_output_cork(pa_source_output *i, pa_bool_t b);
-
-int pa_source_output_set_rate(pa_source_output *o, uint32_t rate);
+pa_usec_t pa_source_output_get_latency(pa_source_output *i, pa_usec_t *source_latency);
pa_resample_method_t pa_source_output_get_resample_method(pa_source_output *o);
@@ -183,9 +224,18 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest);
#define pa_source_output_get_state(o) ((o)->state)
+pa_usec_t pa_source_output_get_requested_latency(pa_source_output *o);
+
/* To be used exclusively by the source driver thread */
void pa_source_output_push(pa_source_output *o, const pa_memchunk *chunk);
+void pa_source_output_process_rewind(pa_source_output *o, size_t nbytes);
+void pa_source_output_update_max_rewind(pa_source_output *o, size_t nbytes);
+
+void pa_source_output_set_state_within_thread(pa_source_output *o, pa_source_output_state_t state);
+
int pa_source_output_process_msg(pa_msgobject *mo, int code, void *userdata, int64_t offset, pa_memchunk *chunk);
+pa_usec_t pa_source_output_set_requested_latency_within_thread(pa_source_output *o, pa_usec_t usec);
+
#endif
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index c691eea..edbbf01 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -1,5 +1,3 @@
-/* $Id: source.c 2159 2008-03-27 23:29:32Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -32,6 +30,7 @@
#include <pulse/utf8.h>
#include <pulse/xmalloc.h>
+#include <pulse/timeval.h>
#include <pulsecore/source-output.h>
#include <pulsecore/namereg.h>
@@ -41,40 +40,127 @@
#include "source.h"
+#define DEFAULT_MIN_LATENCY (4*PA_USEC_PER_MSEC)
+
static PA_DEFINE_CHECK_TYPE(pa_source, pa_msgobject);
static void source_free(pa_object *o);
+pa_source_new_data* pa_source_new_data_init(pa_source_new_data *data) {
+ pa_assert(data);
+
+ memset(data, 0, sizeof(*data));
+ data->proplist = pa_proplist_new();
+
+ return data;
+}
+
+void pa_source_new_data_set_name(pa_source_new_data *data, const char *name) {
+ pa_assert(data);
+
+ pa_xfree(data->name);
+ data->name = pa_xstrdup(name);
+}
+
+void pa_source_new_data_set_sample_spec(pa_source_new_data *data, const pa_sample_spec *spec) {
+ pa_assert(data);
+
+ if ((data->sample_spec_is_set = !!spec))
+ data->sample_spec = *spec;
+}
+
+void pa_source_new_data_set_channel_map(pa_source_new_data *data, const pa_channel_map *map) {
+ pa_assert(data);
+
+ if ((data->channel_map_is_set = !!map))
+ data->channel_map = *map;
+}
+
+void pa_source_new_data_set_volume(pa_source_new_data *data, const pa_cvolume *volume) {
+ pa_assert(data);
+
+ if ((data->volume_is_set = !!volume))
+ data->volume = *volume;
+}
+
+void pa_source_new_data_set_muted(pa_source_new_data *data, pa_bool_t mute) {
+ pa_assert(data);
+
+ data->muted_is_set = TRUE;
+ data->muted = !!mute;
+}
+
+void pa_source_new_data_done(pa_source_new_data *data) {
+ pa_assert(data);
+
+ pa_xfree(data->name);
+ pa_proplist_free(data->proplist);
+}
+
+/* Called from main context */
+static void reset_callbacks(pa_source *s) {
+ pa_assert(s);
+
+ s->set_state = NULL;
+ s->get_volume = NULL;
+ s->set_volume = NULL;
+ s->get_mute = NULL;
+ s->set_mute = NULL;
+ s->update_requested_latency = NULL;
+}
+
+/* Called from main context */
pa_source* pa_source_new(
pa_core *core,
- const char *driver,
- const char *name,
- int fail,
- const pa_sample_spec *spec,
- const pa_channel_map *map) {
+ pa_source_new_data *data,
+ pa_source_flags_t flags) {
pa_source *s;
- char st[256];
- pa_channel_map tmap;
+ const char *name;
+ char st[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
pa_assert(core);
- pa_assert(name);
- pa_assert(spec);
+ pa_assert(data);
+ pa_assert(data->name);
- pa_return_null_if_fail(pa_sample_spec_valid(spec));
+ s = pa_msgobject_new(pa_source);
- if (!map)
- pa_return_null_if_fail(map = pa_channel_map_init_auto(&tmap, spec->channels, PA_CHANNEL_MAP_DEFAULT));
+ if (!(name = pa_namereg_register(core, data->name, PA_NAMEREG_SOURCE, s, data->namereg_fail))) {
+ pa_xfree(s);
+ return NULL;
+ }
- pa_return_null_if_fail(map && pa_channel_map_valid(map));
- pa_return_null_if_fail(map->channels == spec->channels);
- pa_return_null_if_fail(!driver || pa_utf8_valid(driver));
- pa_return_null_if_fail(pa_utf8_valid(name) && *name);
+ pa_source_new_data_set_name(data, name);
- s = pa_msgobject_new(pa_source);
+ if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_SOURCE_NEW], data) < 0) {
+ pa_xfree(s);
+ pa_namereg_unregister(core, name);
+ return NULL;
+ }
+
+ pa_return_null_if_fail(!data->driver || pa_utf8_valid(data->driver));
+ pa_return_null_if_fail(data->name && pa_utf8_valid(data->name) && data->name[0]);
+
+ pa_return_null_if_fail(data->sample_spec_is_set && pa_sample_spec_valid(&data->sample_spec));
+
+ if (!data->channel_map_is_set)
+ pa_return_null_if_fail(pa_channel_map_init_auto(&data->channel_map, data->sample_spec.channels, PA_CHANNEL_MAP_DEFAULT));
- if (!(name = pa_namereg_register(core, name, PA_NAMEREG_SOURCE, s, fail))) {
+ pa_return_null_if_fail(pa_channel_map_valid(&data->channel_map));
+ pa_return_null_if_fail(data->channel_map.channels == data->sample_spec.channels);
+
+ if (!data->volume_is_set)
+ pa_cvolume_reset(&data->volume, data->sample_spec.channels);
+
+ pa_return_null_if_fail(pa_cvolume_valid(&data->volume));
+ pa_return_null_if_fail(data->volume.channels == data->sample_spec.channels);
+
+ if (!data->muted_is_set)
+ data->muted = FALSE;
+
+ if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_SOURCE_FIXATE], data) < 0) {
pa_xfree(s);
+ pa_namereg_unregister(core, name);
return NULL;
}
@@ -83,66 +169,86 @@ pa_source* pa_source_new(
s->core = core;
s->state = PA_SOURCE_INIT;
- s->flags = 0;
+ s->flags = flags;
s->name = pa_xstrdup(name);
- s->description = NULL;
- s->driver = pa_xstrdup(driver);
- s->module = NULL;
+ s->proplist = pa_proplist_copy(data->proplist);
+ s->driver = pa_xstrdup(data->driver);
+ s->module = data->module;
- s->sample_spec = *spec;
- s->channel_map = *map;
+ s->sample_spec = data->sample_spec;
+ s->channel_map = data->channel_map;
s->outputs = pa_idxset_new(NULL, NULL);
s->n_corked = 0;
s->monitor_of = NULL;
- pa_cvolume_reset(&s->volume, spec->channels);
- s->muted = FALSE;
+ s->volume = data->volume;
+ s->muted = data->muted;
s->refresh_volume = s->refresh_muted = FALSE;
- s->get_latency = NULL;
- s->set_volume = NULL;
- s->get_volume = NULL;
- s->set_mute = NULL;
- s->get_mute = NULL;
- s->set_state = NULL;
+ reset_callbacks(s);
s->userdata = NULL;
s->asyncmsgq = NULL;
s->rtpoll = NULL;
- pa_assert_se(pa_idxset_put(core->sources, s, &s->index) >= 0);
-
- pa_sample_spec_snprint(st, sizeof(st), spec);
- pa_log_info("Created source %u \"%s\" with sample spec \"%s\"", s->index, s->name, st);
+ pa_silence_memchunk_get(
+ &core->silence_cache,
+ core->mempool,
+ &s->silence,
+ &s->sample_spec,
+ 0);
s->thread_info.outputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
- s->thread_info.soft_volume = s->volume;
- s->thread_info.soft_muted = s->muted;
+ pa_cvolume_reset(&s->thread_info.soft_volume, s->sample_spec.channels);
+ s->thread_info.soft_muted = FALSE;
s->thread_info.state = s->state;
+ s->thread_info.max_rewind = 0;
+ s->thread_info.requested_latency_valid = FALSE;
+ s->thread_info.requested_latency = 0;
+ s->thread_info.min_latency = DEFAULT_MIN_LATENCY;
+ s->thread_info.max_latency = 0;
+
+ pa_assert_se(pa_idxset_put(core->sources, s, &s->index) >= 0);
+
+ pa_log_info("Created source %u \"%s\" with sample spec %s and channel map %s",
+ s->index,
+ s->name,
+ pa_sample_spec_snprint(st, sizeof(st), &s->sample_spec),
+ pa_channel_map_snprint(cm, sizeof(cm), &s->channel_map));
return s;
}
+/* Called from main context */
static int source_set_state(pa_source *s, pa_source_state_t state) {
int ret;
pa_bool_t suspend_change;
+ pa_source_state_t original_state;
pa_assert(s);
if (s->state == state)
return 0;
+ original_state = s->state;
+
suspend_change =
- (s->state == PA_SOURCE_SUSPENDED && PA_SOURCE_OPENED(state)) ||
- (PA_SOURCE_OPENED(s->state) && state == PA_SOURCE_SUSPENDED);
+ (original_state == PA_SOURCE_SUSPENDED && PA_SOURCE_IS_OPENED(state)) ||
+ (PA_SOURCE_IS_OPENED(original_state) && state == PA_SOURCE_SUSPENDED);
if (s->set_state)
if ((ret = s->set_state(s, state)) < 0)
- return -1;
+ return ret;
+
+ if (s->asyncmsgq)
+ if ((ret = pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL)) < 0) {
- if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL) < 0)
- return -1;
+ if (s->set_state)
+ s->set_state(s, original_state);
+
+ return ret;
+ }
s->state = state;
@@ -154,7 +260,7 @@ static int source_set_state(pa_source *s, pa_source_state_t state) {
for (o = PA_SOURCE_OUTPUT(pa_idxset_first(s->outputs, &idx)); o; o = PA_SOURCE_OUTPUT(pa_idxset_next(s->outputs, &idx)))
if (o->suspend)
- o->suspend(o, state == PA_SINK_SUSPENDED);
+ o->suspend(o, state == PA_SOURCE_SUSPENDED);
}
if (state != PA_SOURCE_UNLINKED) /* if we enter UNLINKED state pa_source_unlink() will fire the apropriate events */
@@ -163,19 +269,32 @@ static int source_set_state(pa_source *s, pa_source_state_t state) {
return 0;
}
+/* Called from main context */
void pa_source_put(pa_source *s) {
pa_source_assert_ref(s);
- pa_assert(s->state == PA_SINK_INIT);
- pa_assert(s->rtpoll);
+ pa_assert(s->state == PA_SOURCE_INIT);
+
+ /* The following fields must be initialized properly when calling _put() */
pa_assert(s->asyncmsgq);
+ pa_assert(s->rtpoll);
+ pa_assert(!s->thread_info.min_latency || !s->thread_info.max_latency ||
+ s->thread_info.min_latency <= s->thread_info.max_latency);
+
+ if (!(s->flags & PA_SOURCE_HW_VOLUME_CTRL)) {
+ s->flags |= PA_SOURCE_DECIBEL_VOLUME;
+
+ s->thread_info.soft_volume = s->volume;
+ s->thread_info.soft_muted = s->muted;
+ }
pa_assert_se(source_set_state(s, PA_SOURCE_IDLE) == 0);
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE | PA_SUBSCRIPTION_EVENT_NEW, s->index);
- pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_NEW_POST], s);
+ pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_PUT], s);
}
+/* Called from main context */
void pa_source_unlink(pa_source *s) {
pa_bool_t linked;
pa_source_output *o, *j = NULL;
@@ -185,7 +304,7 @@ void pa_source_unlink(pa_source *s) {
/* See pa_sink_unlink() for a couple of comments how this function
* works. */
- linked = PA_SOURCE_LINKED(s->state);
+ linked = PA_SOURCE_IS_LINKED(s->state);
if (linked)
pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK], s);
@@ -205,12 +324,7 @@ void pa_source_unlink(pa_source *s) {
else
s->state = PA_SOURCE_UNLINKED;
- s->get_latency = NULL;
- s->get_volume = NULL;
- s->set_volume = NULL;
- s->set_mute = NULL;
- s->get_mute = NULL;
- s->set_state = NULL;
+ reset_callbacks(s);
if (linked) {
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE | PA_SUBSCRIPTION_EVENT_REMOVE, s->index);
@@ -218,6 +332,7 @@ void pa_source_unlink(pa_source *s) {
}
}
+/* Called from main context */
static void source_free(pa_object *o) {
pa_source_output *so;
pa_source *s = PA_SOURCE(o);
@@ -225,7 +340,7 @@ static void source_free(pa_object *o) {
pa_assert(s);
pa_assert(pa_source_refcnt(s) == 0);
- if (PA_SOURCE_LINKED(s->state))
+ if (PA_SOURCE_IS_LINKED(s->state))
pa_source_unlink(s);
pa_log_info("Freeing source %u \"%s\"", s->index, s->name);
@@ -237,15 +352,36 @@ static void source_free(pa_object *o) {
pa_hashmap_free(s->thread_info.outputs, NULL, NULL);
+ if (s->silence.memblock)
+ pa_memblock_unref(s->silence.memblock);
+
pa_xfree(s->name);
- pa_xfree(s->description);
pa_xfree(s->driver);
+
+ if (s->proplist)
+ pa_proplist_free(s->proplist);
+
pa_xfree(s);
}
+/* Called from main context */
+void pa_source_set_asyncmsgq(pa_source *s, pa_asyncmsgq *q) {
+ pa_source_assert_ref(s);
+
+ s->asyncmsgq = q;
+}
+
+/* Called from main context */
+void pa_source_set_rtpoll(pa_source *s, pa_rtpoll *p) {
+ pa_source_assert_ref(s);
+
+ s->rtpoll = p;
+}
+
+/* Called from main context */
int pa_source_update_status(pa_source*s) {
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
if (s->state == PA_SOURCE_SUSPENDED)
return 0;
@@ -253,9 +389,10 @@ int pa_source_update_status(pa_source*s) {
return source_set_state(s, pa_source_used_by(s) ? PA_SOURCE_RUNNING : PA_SOURCE_IDLE);
}
+/* Called from main context */
int pa_source_suspend(pa_source *s, pa_bool_t suspend) {
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
if (suspend)
return source_set_state(s, PA_SOURCE_SUSPENDED);
@@ -263,19 +400,32 @@ int pa_source_suspend(pa_source *s, pa_bool_t suspend) {
return source_set_state(s, pa_source_used_by(s) ? PA_SOURCE_RUNNING : PA_SOURCE_IDLE);
}
-void pa_source_ping(pa_source *s) {
+/* Called from IO thread context */
+void pa_source_process_rewind(pa_source *s, size_t nbytes) {
+ pa_source_output *o;
+ void *state = NULL;
+
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_OPENED(s->thread_info.state));
+
+ if (nbytes <= 0)
+ return;
+
+ pa_log_debug("Processing rewind...");
- pa_asyncmsgq_post(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_PING, NULL, 0, NULL, NULL);
+ while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL))) {
+ pa_source_output_assert_ref(o);
+ pa_source_output_process_rewind(o, nbytes);
+ }
}
+/* Called from IO thread context */
void pa_source_post(pa_source*s, const pa_memchunk *chunk) {
pa_source_output *o;
void *state = NULL;
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_OPENED(s->thread_info.state));
+ pa_assert(PA_SOURCE_IS_OPENED(s->thread_info.state));
pa_assert(chunk);
if (s->thread_info.state != PA_SOURCE_RUNNING)
@@ -292,40 +442,75 @@ void pa_source_post(pa_source*s, const pa_memchunk *chunk) {
else
pa_volume_memchunk(&vchunk, &s->sample_spec, &s->thread_info.soft_volume);
- while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
- pa_source_output_push(o, &vchunk);
+ while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL))) {
+ pa_source_output_assert_ref(o);
+
+ if (!o->thread_info.direct_on_input)
+ pa_source_output_push(o, &vchunk);
+ }
pa_memblock_unref(vchunk.memblock);
} else {
- while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
- pa_source_output_push(o, chunk);
+ while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL))) {
+ pa_source_output_assert_ref(o);
+
+ if (!o->thread_info.direct_on_input)
+ pa_source_output_push(o, chunk);
+ }
}
}
+/* Called from IO thread context */
+void pa_source_post_direct(pa_source*s, pa_source_output *o, const pa_memchunk *chunk) {
+ pa_source_assert_ref(s);
+ pa_assert(PA_SOURCE_IS_OPENED(s->thread_info.state));
+ pa_source_output_assert_ref(o);
+ pa_assert(o->thread_info.direct_on_input);
+ pa_assert(chunk);
+
+ if (s->thread_info.state != PA_SOURCE_RUNNING)
+ return;
+
+ if (s->thread_info.soft_muted || !pa_cvolume_is_norm(&s->thread_info.soft_volume)) {
+ pa_memchunk vchunk = *chunk;
+
+ pa_memblock_ref(vchunk.memblock);
+ pa_memchunk_make_writable(&vchunk, 0);
+
+ if (s->thread_info.soft_muted || pa_cvolume_is_muted(&s->thread_info.soft_volume))
+ pa_silence_memchunk(&vchunk, &s->sample_spec);
+ else
+ pa_volume_memchunk(&vchunk, &s->sample_spec, &s->thread_info.soft_volume);
+
+ pa_source_output_push(o, &vchunk);
+
+ pa_memblock_unref(vchunk.memblock);
+ } else
+ pa_source_output_push(o, chunk);
+}
+
+/* Called from main thread */
pa_usec_t pa_source_get_latency(pa_source *s) {
pa_usec_t usec;
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
- if (!PA_SOURCE_OPENED(s->state))
+ if (!PA_SOURCE_IS_OPENED(s->state))
return 0;
- if (s->get_latency)
- return s->get_latency(s);
-
- if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0)
- return 0;
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_LATENCY, &usec, 0, NULL) == 0);
return usec;
}
+/* Called from main thread */
void pa_source_set_volume(pa_source *s, const pa_cvolume *volume) {
- int changed;
+ pa_bool_t changed;
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
pa_assert(volume);
changed = !pa_cvolume_equal(volume, &s->volume);
@@ -335,37 +520,50 @@ void pa_source_set_volume(pa_source *s, const pa_cvolume *volume) {
s->set_volume = NULL;
if (!s->set_volume)
- pa_asyncmsgq_post(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_VOLUME, pa_xnewdup(struct pa_cvolume, volume, 1), 0, NULL, pa_xfree);
+ pa_source_set_soft_volume(s, volume);
if (changed)
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
}
-const pa_cvolume *pa_source_get_volume(pa_source *s) {
- pa_cvolume old_volume;
+/* Called from main thread */
+void pa_source_set_soft_volume(pa_source *s, const pa_cvolume *volume) {
+ pa_source_assert_ref(s);
+ pa_assert(volume);
+ if (PA_SOURCE_IS_LINKED(s->state))
+ pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_VOLUME, volume, 0, NULL);
+ else
+ s->thread_info.soft_volume = *volume;
+}
+
+/* Called from main thread */
+const pa_cvolume *pa_source_get_volume(pa_source *s, pa_bool_t force_refresh) {
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
- old_volume = s->volume;
+ if (s->refresh_volume || force_refresh) {
+ pa_cvolume old_volume = s->volume;
- if (s->get_volume && s->get_volume(s) < 0)
- s->get_volume = NULL;
+ if (s->get_volume && s->get_volume(s) < 0)
+ s->get_volume = NULL;
- if (!s->get_volume && s->refresh_volume)
- pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_VOLUME, &s->volume, 0, NULL);
+ if (!s->get_volume)
+ pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_VOLUME, &s->volume, 0, NULL);
- if (!pa_cvolume_equal(&old_volume, &s->volume))
- pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ if (!pa_cvolume_equal(&old_volume, &s->volume))
+ pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ }
return &s->volume;
}
+/* Called from main thread */
void pa_source_set_mute(pa_source *s, pa_bool_t mute) {
- int changed;
+ pa_bool_t changed;
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
changed = s->muted != mute;
s->muted = mute;
@@ -380,81 +578,66 @@ void pa_source_set_mute(pa_source *s, pa_bool_t mute) {
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
}
-pa_bool_t pa_source_get_mute(pa_source *s) {
- pa_bool_t old_muted;
+/* Called from main thread */
+pa_bool_t pa_source_get_mute(pa_source *s, pa_bool_t force_refresh) {
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
- old_muted = s->muted;
+ if (s->refresh_muted || force_refresh) {
+ pa_bool_t old_muted = s->muted;
- if (s->get_mute && s->get_mute(s) < 0)
- s->get_mute = NULL;
+ if (s->get_mute && s->get_mute(s) < 0)
+ s->get_mute = NULL;
- if (!s->get_mute && s->refresh_muted)
- pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_MUTE, &s->muted, 0, NULL);
+ if (!s->get_mute)
+ pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_MUTE, &s->muted, 0, NULL);
- if (old_muted != s->muted)
- pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ if (old_muted != s->muted)
+ pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ }
return s->muted;
}
-void pa_source_set_module(pa_source *s, pa_module *m) {
- pa_source_assert_ref(s);
-
- if (m == s->module)
- return;
-
- s->module = m;
-
- pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
-}
-
+/* Called from main thread */
void pa_source_set_description(pa_source *s, const char *description) {
+ const char *old;
pa_source_assert_ref(s);
- if (!description && !s->description)
+ if (!description && !pa_proplist_contains(s->proplist, PA_PROP_DEVICE_DESCRIPTION))
return;
- if (description && s->description && !strcmp(description, s->description))
+ old = pa_proplist_gets(s->proplist, PA_PROP_DEVICE_DESCRIPTION);
+
+ if (old && description && !strcmp(old, description))
return;
- pa_xfree(s->description);
- s->description = pa_xstrdup(description);
+ if (description)
+ pa_proplist_sets(s->proplist, PA_PROP_DEVICE_DESCRIPTION, description);
+ else
+ pa_proplist_unset(s->proplist, PA_PROP_DEVICE_DESCRIPTION);
- if (PA_SOURCE_LINKED(s->state)) {
- pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_DESCRIPTION_CHANGED], s);
+ if (PA_SOURCE_IS_LINKED(s->state)) {
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_PROPLIST_CHANGED], s);
}
}
-void pa_source_set_asyncmsgq(pa_source *s, pa_asyncmsgq *q) {
- pa_source_assert_ref(s);
- pa_assert(q);
-
- s->asyncmsgq = q;
-}
-
-void pa_source_set_rtpoll(pa_source *s, pa_rtpoll *p) {
- pa_source_assert_ref(s);
- pa_assert(p);
-
- s->rtpoll = p;
-}
-
+/* Called from main thread */
unsigned pa_source_linked_by(pa_source *s) {
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
return pa_idxset_size(s->outputs);
}
+/* Called from main thread */
unsigned pa_source_used_by(pa_source *s) {
unsigned ret;
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
ret = pa_idxset_size(s->outputs);
pa_assert(ret >= s->n_corked);
@@ -462,37 +645,65 @@ unsigned pa_source_used_by(pa_source *s) {
return ret - s->n_corked;
}
+/* Called from IO thread, except when it is not */
int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_t offset, pa_memchunk *chunk) {
pa_source *s = PA_SOURCE(object);
pa_source_assert_ref(s);
- pa_assert(s->thread_info.state != PA_SOURCE_UNLINKED);
switch ((pa_source_message_t) code) {
+
case PA_SOURCE_MESSAGE_ADD_OUTPUT: {
pa_source_output *o = PA_SOURCE_OUTPUT(userdata);
+
pa_hashmap_put(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index), pa_source_output_ref(o));
+ if (o->direct_on_input) {
+ o->thread_info.direct_on_input = o->direct_on_input;
+ pa_hashmap_put(o->thread_info.direct_on_input->thread_info.direct_outputs, PA_UINT32_TO_PTR(o->index), o);
+ }
+
pa_assert(!o->thread_info.attached);
o->thread_info.attached = TRUE;
if (o->attach)
o->attach(o);
+ pa_source_output_set_state_within_thread(o, o->state);
+
+ if (o->thread_info.requested_source_latency != (pa_usec_t) -1)
+ pa_source_output_set_requested_latency_within_thread(o, o->thread_info.requested_source_latency);
+
+ pa_source_output_update_max_rewind(o, s->thread_info.max_rewind);
+
+ /* We don't just invalidate the requested latency here,
+ * because if we are in a move we might need to fix up the
+ * requested latency. */
+ pa_source_output_set_requested_latency_within_thread(o, o->thread_info.requested_source_latency);
+
return 0;
}
case PA_SOURCE_MESSAGE_REMOVE_OUTPUT: {
pa_source_output *o = PA_SOURCE_OUTPUT(userdata);
+ pa_source_output_set_state_within_thread(o, o->state);
+
if (o->detach)
o->detach(o);
pa_assert(o->thread_info.attached);
o->thread_info.attached = FALSE;
+ if (o->thread_info.direct_on_input) {
+ pa_hashmap_remove(o->thread_info.direct_on_input->thread_info.direct_outputs, PA_UINT32_TO_PTR(o->index));
+ o->thread_info.direct_on_input = NULL;
+ }
+
if (pa_hashmap_remove(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index)))
pa_source_output_unref(o);
+ pa_source_invalidate_requested_latency(s);
+
return 0;
}
@@ -512,28 +723,65 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_
*((pa_bool_t*) userdata) = s->thread_info.soft_muted;
return 0;
- case PA_SOURCE_MESSAGE_PING:
- return 0;
-
case PA_SOURCE_MESSAGE_SET_STATE:
s->thread_info.state = PA_PTR_TO_UINT(userdata);
return 0;
case PA_SOURCE_MESSAGE_DETACH:
- /* We're detaching all our output streams so that the
- * asyncmsgq and rtpoll fields can be changed without
- * problems */
+ /* Detach all streams */
pa_source_detach_within_thread(s);
- break;
+ return 0;
case PA_SOURCE_MESSAGE_ATTACH:
/* Reattach all streams */
pa_source_attach_within_thread(s);
- break;
+ return 0;
+
+ case PA_SOURCE_MESSAGE_GET_REQUESTED_LATENCY: {
+
+ pa_usec_t *usec = userdata;
+ *usec = pa_source_get_requested_latency_within_thread(s);
+
+ if (*usec == (pa_usec_t) -1)
+ *usec = s->thread_info.max_latency;
+
+ return 0;
+ }
+
+ case PA_SOURCE_MESSAGE_SET_LATENCY_RANGE: {
+ pa_usec_t *r = userdata;
+
+ pa_source_update_latency_range(s, r[0], r[1]);
+
+ return 0;
+ }
+
+ case PA_SOURCE_MESSAGE_GET_LATENCY_RANGE: {
+ pa_usec_t *r = userdata;
+
+ r[0] = s->thread_info.min_latency;
+ r[1] = s->thread_info.max_latency;
+
+ return 0;
+ }
+
+ case PA_SOURCE_MESSAGE_GET_MAX_REWIND:
+
+ *((size_t*) userdata) = s->thread_info.max_rewind;
+ return 0;
case PA_SOURCE_MESSAGE_GET_LATENCY:
+
+ if (s->monitor_of) {
+ *((pa_usec_t*) userdata) = 0;
+ return 0;
+ }
+
+ /* Implementors need to overwrite this implementation! */
+ return -1;
+
case PA_SOURCE_MESSAGE_MAX:
;
}
@@ -541,6 +789,7 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_
return -1;
}
+/* Called from main thread */
int pa_source_suspend_all(pa_core *c, pa_bool_t suspend) {
uint32_t idx;
pa_source *source;
@@ -554,41 +803,207 @@ int pa_source_suspend_all(pa_core *c, pa_bool_t suspend) {
return ret;
}
+/* Called from main thread */
void pa_source_detach(pa_source *s) {
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
- pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_DETACH, NULL, 0, NULL);
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_DETACH, NULL, 0, NULL) == 0);
}
+/* Called from main thread */
void pa_source_attach(pa_source *s) {
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
- pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_ATTACH, NULL, 0, NULL);
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_ATTACH, NULL, 0, NULL) == 0);
}
+/* Called from IO thread */
void pa_source_detach_within_thread(pa_source *s) {
pa_source_output *o;
void *state = NULL;
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->thread_info.state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->thread_info.state));
while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
if (o->detach)
o->detach(o);
}
+/* Called from IO thread */
void pa_source_attach_within_thread(pa_source *s) {
pa_source_output *o;
void *state = NULL;
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_LINKED(s->thread_info.state));
+ pa_assert(PA_SOURCE_IS_LINKED(s->thread_info.state));
while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
if (o->attach)
o->attach(o);
+}
+
+/* Called from IO thread */
+pa_usec_t pa_source_get_requested_latency_within_thread(pa_source *s) {
+ pa_usec_t result = (pa_usec_t) -1;
+ pa_source_output *o;
+ void *state = NULL;
+
+ pa_source_assert_ref(s);
+
+ if (s->thread_info.requested_latency_valid)
+ return s->thread_info.requested_latency;
+
+ while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
+
+ if (o->thread_info.requested_source_latency != (pa_usec_t) -1 &&
+ (result == (pa_usec_t) -1 || result > o->thread_info.requested_source_latency))
+ result = o->thread_info.requested_source_latency;
+
+ if (result != (pa_usec_t) -1) {
+ if (s->thread_info.max_latency > 0 && result > s->thread_info.max_latency)
+ result = s->thread_info.max_latency;
+
+ if (s->thread_info.min_latency > 0 && result < s->thread_info.min_latency)
+ result = s->thread_info.min_latency;
+ }
+
+ s->thread_info.requested_latency = result;
+ s->thread_info.requested_latency_valid = TRUE;
+
+ return result;
+}
+
+/* Called from main thread */
+pa_usec_t pa_source_get_requested_latency(pa_source *s) {
+ pa_usec_t usec;
+
+ pa_source_assert_ref(s);
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
+
+ if (!PA_SOURCE_IS_OPENED(s->state))
+ return 0;
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_REQUESTED_LATENCY, &usec, 0, NULL) == 0);
+
+ return usec;
+}
+
+/* Called from IO thread */
+void pa_source_set_max_rewind(pa_source *s, size_t max_rewind) {
+ pa_source_output *o;
+ void *state = NULL;
+
+ pa_source_assert_ref(s);
+
+ if (max_rewind == s->thread_info.max_rewind)
+ return;
+
+ s->thread_info.max_rewind = max_rewind;
+
+ if (PA_SOURCE_IS_LINKED(s->thread_info.state)) {
+ while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
+ pa_source_output_update_max_rewind(o, s->thread_info.max_rewind);
+ }
+}
+
+void pa_source_invalidate_requested_latency(pa_source *s) {
+ pa_source_output *o;
+ void *state = NULL;
+
+ pa_source_assert_ref(s);
+
+ s->thread_info.requested_latency_valid = FALSE;
+
+ if (s->update_requested_latency)
+ s->update_requested_latency(s);
+
+ while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
+ if (o->update_source_requested_latency)
+ o->update_source_requested_latency(o);
+
+ if (s->monitor_of)
+ pa_sink_invalidate_requested_latency(s->monitor_of);
+}
+
+void pa_source_set_latency_range(pa_source *s, pa_usec_t min_latency, pa_usec_t max_latency) {
+ pa_source_assert_ref(s);
+
+ /* min_latency == 0: no limit
+ * min_latency == (size_t) -1: default limit
+ * min_latency anything else: specified limit
+ *
+ * Similar for max_latency */
+
+ if (min_latency == (pa_usec_t) -1)
+ min_latency = DEFAULT_MIN_LATENCY;
+
+ if (max_latency == (pa_usec_t) -1)
+ max_latency = min_latency;
+
+ pa_assert(!min_latency || !max_latency ||
+ min_latency <= max_latency);
+
+ if (PA_SOURCE_IS_LINKED(s->state)) {
+ pa_usec_t r[2];
+
+ r[0] = min_latency;
+ r[1] = max_latency;
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_LATENCY_RANGE, r, 0, NULL) == 0);
+ } else {
+ s->thread_info.min_latency = min_latency;
+ s->thread_info.max_latency = max_latency;
+
+ s->thread_info.requested_latency_valid = FALSE;
+ }
+}
+
+void pa_source_get_latency_range(pa_source *s, pa_usec_t *min_latency, pa_usec_t *max_latency) {
+ pa_source_assert_ref(s);
+ pa_assert(min_latency);
+ pa_assert(max_latency);
+
+ if (PA_SOURCE_IS_LINKED(s->state)) {
+ pa_usec_t r[2] = { 0, 0 };
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_LATENCY_RANGE, r, 0, NULL) == 0);
+
+ *min_latency = r[0];
+ *max_latency = r[1];
+ } else {
+ *min_latency = s->thread_info.min_latency;
+ *max_latency = s->thread_info.max_latency;
+ }
+}
+
+/* Called from IO thread */
+void pa_source_update_latency_range(pa_source *s, pa_usec_t min_latency, pa_usec_t max_latency) {
+ pa_source_output *o;
+ void *state = NULL;
+
+ pa_source_assert_ref(s);
+
+ s->thread_info.min_latency = min_latency;
+ s->thread_info.max_latency = max_latency;
+
+ while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
+ if (o->update_source_latency_range)
+ o->update_source_latency_range(o);
+
+ pa_source_invalidate_requested_latency(s);
+}
+
+size_t pa_source_get_max_rewind(pa_source *s) {
+ size_t r;
+ pa_source_assert_ref(s);
+
+ if (!PA_SOURCE_IS_LINKED(s->state))
+ return s->thread_info.max_rewind;
+
+ pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_MAX_REWIND, &r, 0, NULL) == 0);
+ return r;
}
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h
index 7310a65..cae7869 100644
--- a/src/pulsecore/source.h
+++ b/src/pulsecore/source.h
@@ -1,8 +1,6 @@
#ifndef foopulsesourcehfoo
#define foopulsesourcehfoo
-/* $Id: source.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,7 +31,6 @@ typedef struct pa_source pa_source;
#include <pulse/channelmap.h>
#include <pulse/volume.h>
-#include <pulsecore/core-def.h>
#include <pulsecore/core.h>
#include <pulsecore/idxset.h>
#include <pulsecore/memblock.h>
@@ -43,6 +40,7 @@ typedef struct pa_source pa_source;
#include <pulsecore/asyncmsgq.h>
#include <pulsecore/msgobject.h>
#include <pulsecore/rtpoll.h>
+#include <pulsecore/source-output.h>
#define PA_MAX_OUTPUTS_PER_SOURCE 32
@@ -54,11 +52,11 @@ typedef enum pa_source_state {
PA_SOURCE_UNLINKED
} pa_source_state_t;
-static inline pa_bool_t PA_SOURCE_OPENED(pa_source_state_t x) {
+static inline pa_bool_t PA_SOURCE_IS_OPENED(pa_source_state_t x) {
return x == PA_SOURCE_RUNNING || x == PA_SOURCE_IDLE;
}
-static inline pa_bool_t PA_SOURCE_LINKED(pa_source_state_t x) {
+static inline pa_bool_t PA_SOURCE_IS_LINKED(pa_source_state_t x) {
return x == PA_SOURCE_RUNNING || x == PA_SOURCE_IDLE || x == PA_SOURCE_SUSPENDED;
}
@@ -71,7 +69,8 @@ struct pa_source {
pa_source_flags_t flags;
char *name;
- char *description, *driver; /* may be NULL */
+ char *driver; /* may be NULL */
+ pa_proplist *proplist;
pa_module *module; /* may be NULL */
@@ -84,18 +83,45 @@ struct pa_source {
pa_cvolume volume;
pa_bool_t muted;
- pa_bool_t refresh_volume;
- pa_bool_t refresh_muted;
+ pa_bool_t refresh_volume:1;
+ pa_bool_t refresh_muted:1;
+
+ pa_asyncmsgq *asyncmsgq;
+ pa_rtpoll *rtpoll;
+
+ pa_memchunk silence;
+
+ /* Called when the main loop requests a state change. Called from
+ * main loop context. If returns -1 the state change will be
+ * inhibited */
int (*set_state)(pa_source*source, pa_source_state_t state); /* may be NULL */
- int (*set_volume)(pa_source *s); /* dito */
+
+ /* Callled when the volume is queried. Called from main loop
+ * context. If this is NULL a PA_SOURCE_MESSAGE_GET_VOLUME message
+ * will be sent to the IO thread instead. If refresh_volume is
+ * FALSE neither this function is called nor a message is sent. */
int (*get_volume)(pa_source *s); /* dito */
- int (*set_mute)(pa_source *s); /* dito */
+
+ /* Called when the volume shall be changed. Called from main loop
+ * context. If this is NULL a PA_SOURCE_MESSAGE_SET_VOLUME message
+ * will be sent to the IO thread instead. */
+ int (*set_volume)(pa_source *s); /* dito */
+
+ /* Called when the mute setting is queried. Called from main loop
+ * context. If this is NULL a PA_SOURCE_MESSAGE_GET_MUTE message
+ * will be sent to the IO thread instead. If refresh_mute is
+ * FALSE neither this function is called nor a message is sent.*/
int (*get_mute)(pa_source *s); /* dito */
- pa_usec_t (*get_latency)(pa_source *s); /* dito */
- pa_asyncmsgq *asyncmsgq;
- pa_rtpoll *rtpoll;
+ /* Called when the mute setting shall be changed. Called from main
+ * loop context. If this is NULL a PA_SOURCE_MESSAGE_SET_MUTE
+ * message will be sent to the IO thread instead. */
+ int (*set_mute)(pa_source *s); /* dito */
+
+ /* Called when a the requested latency is changed. Called from IO
+ * thread context. */
+ void (*update_requested_latency)(pa_source *s); /* dito */
/* Contains copies of the above data so that the real-time worker
* thread can work without access locking */
@@ -103,7 +129,17 @@ struct pa_source {
pa_source_state_t state;
pa_hashmap *outputs;
pa_cvolume soft_volume;
- pa_bool_t soft_muted;
+ pa_bool_t soft_muted:1;
+
+ pa_bool_t requested_latency_valid:1;
+ pa_usec_t requested_latency;
+
+ /* Then number of bytes this source will be rewound for at
+ * max. (Only used on monitor sources) */
+ size_t max_rewind;
+
+ pa_usec_t min_latency; /* we won't go below this latency */
+ pa_usec_t max_latency; /* An upper limit for the latencies */
} thread_info;
void *userdata;
@@ -120,48 +156,81 @@ typedef enum pa_source_message {
PA_SOURCE_MESSAGE_GET_MUTE,
PA_SOURCE_MESSAGE_SET_MUTE,
PA_SOURCE_MESSAGE_GET_LATENCY,
+ PA_SOURCE_MESSAGE_GET_REQUESTED_LATENCY,
PA_SOURCE_MESSAGE_SET_STATE,
- PA_SOURCE_MESSAGE_PING,
PA_SOURCE_MESSAGE_ATTACH,
PA_SOURCE_MESSAGE_DETACH,
+ PA_SOURCE_MESSAGE_SET_LATENCY_RANGE,
+ PA_SOURCE_MESSAGE_GET_LATENCY_RANGE,
+ PA_SOURCE_MESSAGE_GET_MAX_REWIND,
PA_SOURCE_MESSAGE_MAX
} pa_source_message_t;
+typedef struct pa_source_new_data {
+ char *name;
+ pa_proplist *proplist;
+
+ const char *driver;
+ pa_module *module;
+
+ pa_sample_spec sample_spec;
+ pa_channel_map channel_map;
+ pa_cvolume volume;
+ pa_bool_t muted:1;
+
+ pa_bool_t volume_is_set:1;
+ pa_bool_t muted_is_set:1;
+ pa_bool_t sample_spec_is_set:1;
+ pa_bool_t channel_map_is_set:1;
+
+ pa_bool_t namereg_fail:1;
+} pa_source_new_data;
+
+pa_source_new_data* pa_source_new_data_init(pa_source_new_data *data);
+void pa_source_new_data_set_name(pa_source_new_data *data, const char *name);
+void pa_source_new_data_set_sample_spec(pa_source_new_data *data, const pa_sample_spec *spec);
+void pa_source_new_data_set_channel_map(pa_source_new_data *data, const pa_channel_map *map);
+void pa_source_new_data_set_volume(pa_source_new_data *data, const pa_cvolume *volume);
+void pa_source_new_data_set_muted(pa_source_new_data *data, pa_bool_t mute);
+void pa_source_new_data_done(pa_source_new_data *data);
+
/* To be called exclusively by the source driver, from main context */
pa_source* pa_source_new(
pa_core *core,
- const char *driver,
- const char *name,
- int namereg_fail,
- const pa_sample_spec *spec,
- const pa_channel_map *map);
+ pa_source_new_data *data,
+ pa_source_flags_t flags);
void pa_source_put(pa_source *s);
void pa_source_unlink(pa_source *s);
-void pa_source_set_module(pa_source *s, pa_module *m);
void pa_source_set_description(pa_source *s, const char *description);
void pa_source_set_asyncmsgq(pa_source *s, pa_asyncmsgq *q);
void pa_source_set_rtpoll(pa_source *s, pa_rtpoll *p);
+void pa_source_set_latency_range(pa_source *s, pa_usec_t min_latency, pa_usec_t max_latency);
+
void pa_source_detach(pa_source *s);
void pa_source_attach(pa_source *s);
/* May be called by everyone, from main context */
+/* The returned value is supposed to be in the time domain of the sound card! */
pa_usec_t pa_source_get_latency(pa_source *s);
+pa_usec_t pa_source_get_requested_latency(pa_source *s);
+void pa_source_get_latency_range(pa_source *s, pa_usec_t *min_latency, pa_usec_t *max_latency);
+
+size_t pa_source_get_max_rewind(pa_source *s);
int pa_source_update_status(pa_source*s);
int pa_source_suspend(pa_source *s, pa_bool_t suspend);
int pa_source_suspend_all(pa_core *c, pa_bool_t suspend);
-void pa_source_ping(pa_source *s);
-
void pa_source_set_volume(pa_source *source, const pa_cvolume *volume);
-const pa_cvolume *pa_source_get_volume(pa_source *source);
+void pa_source_set_soft_volume(pa_source *s, const pa_cvolume *volume);
+const pa_cvolume *pa_source_get_volume(pa_source *source, pa_bool_t force_refresh);
void pa_source_set_mute(pa_source *source, pa_bool_t mute);
-pa_bool_t pa_source_get_mute(pa_source *source);
+pa_bool_t pa_source_get_mute(pa_source *source, pa_bool_t force_refresh);
unsigned pa_source_linked_by(pa_source *s); /* Number of connected streams */
unsigned pa_source_used_by(pa_source *s); /* Number of connected streams that are not corked */
@@ -169,11 +238,22 @@ unsigned pa_source_used_by(pa_source *s); /* Number of connected streams that ar
/* To be called exclusively by the source driver, from IO context */
-void pa_source_post(pa_source*s, const pa_memchunk *b);
+void pa_source_post(pa_source*s, const pa_memchunk *chunk);
+void pa_source_post_direct(pa_source*s, pa_source_output *o, const pa_memchunk *chunk);
+void pa_source_process_rewind(pa_source *s, size_t nbytes);
int pa_source_process_msg(pa_msgobject *o, int code, void *userdata, int64_t, pa_memchunk *chunk);
void pa_source_attach_within_thread(pa_source *s);
void pa_source_detach_within_thread(pa_source *s);
+pa_usec_t pa_source_get_requested_latency_within_thread(pa_source *s);
+
+void pa_source_set_max_rewind(pa_source *s, size_t max_rewind);
+void pa_source_update_latency_range(pa_source *s, pa_usec_t min_latency, pa_usec_t max_latency);
+
+/* To be called exclusively by source output drivers, from IO context */
+
+void pa_source_invalidate_requested_latency(pa_source *s);
+
#endif
diff --git a/src/pulsecore/speex/arch.h b/src/pulsecore/speex/arch.h
deleted file mode 100644
index 9987c8f..0000000
--- a/src/pulsecore/speex/arch.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/* Copyright (C) 2003 Jean-Marc Valin */
-/**
- @file arch.h
- @brief Various architecture definitions Speex
-*/
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- - Neither the name of the Xiph.org Foundation nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef ARCH_H
-#define ARCH_H
-
-#ifndef SPEEX_VERSION
-#define SPEEX_MAJOR_VERSION 1 /**< Major Speex version. */
-#define SPEEX_MINOR_VERSION 1 /**< Minor Speex version. */
-#define SPEEX_MICRO_VERSION 15 /**< Micro Speex version. */
-#define SPEEX_EXTRA_VERSION "" /**< Extra Speex version. */
-#define SPEEX_VERSION "speex-1.2beta3" /**< Speex version string. */
-#endif
-
-/* A couple test to catch stupid option combinations */
-#ifdef FIXED_POINT
-
-#ifdef FLOATING_POINT
-#error You cannot compile as floating point and fixed point at the same time
-#endif
-#ifdef _USE_SSE
-#error SSE is only for floating-point
-#endif
-#if ((defined (ARM4_ASM)||defined (ARM4_ASM)) && defined(BFIN_ASM)) || (defined (ARM4_ASM)&&defined(ARM5E_ASM))
-#error Make up your mind. What CPU do you have?
-#endif
-#ifdef VORBIS_PSYCHO
-#error Vorbis-psy model currently not implemented in fixed-point
-#endif
-
-#else
-
-#ifndef FLOATING_POINT
-#error You now need to define either FIXED_POINT or FLOATING_POINT
-#endif
-#if defined (ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
-#error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions?
-#endif
-#ifdef FIXED_POINT_DEBUG
-#error "Don't you think enabling fixed-point is a good thing to do if you want to debug that?"
-#endif
-
-
-#endif
-
-#ifndef OUTSIDE_SPEEX
-#include "speex/speex_types.h"
-#endif
-
-#define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */
-#define ABS16(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 16-bit value. */
-#define MIN16(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 16-bit value. */
-#define MAX16(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 16-bit value. */
-#define ABS32(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 32-bit value. */
-#define MIN32(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 32-bit value. */
-#define MAX32(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 32-bit value. */
-
-#ifdef FIXED_POINT
-
-typedef spx_int16_t spx_word16_t;
-typedef spx_int32_t spx_word32_t;
-typedef spx_word32_t spx_mem_t;
-typedef spx_word16_t spx_coef_t;
-typedef spx_word16_t spx_lsp_t;
-typedef spx_word32_t spx_sig_t;
-
-#define Q15ONE 32767
-
-#define LPC_SCALING 8192
-#define SIG_SCALING 16384
-#define LSP_SCALING 8192.
-#define GAMMA_SCALING 32768.
-#define GAIN_SCALING 64
-#define GAIN_SCALING_1 0.015625
-
-#define LPC_SHIFT 13
-#define LSP_SHIFT 13
-#define SIG_SHIFT 14
-#define GAIN_SHIFT 6
-
-#define VERY_SMALL 0
-#define VERY_LARGE32 ((spx_word32_t)2147483647)
-#define VERY_LARGE16 ((spx_word16_t)32767)
-#define Q15_ONE ((spx_word16_t)32767)
-
-
-#ifdef FIXED_DEBUG
-#include "fixed_debug.h"
-#else
-
-#include "fixed_generic.h"
-
-#ifdef ARM5E_ASM
-#include "fixed_arm5e.h"
-#elif defined (ARM4_ASM)
-#include "fixed_arm4.h"
-#elif defined (ARM5E_ASM)
-#include "fixed_arm5e.h"
-#elif defined (BFIN_ASM)
-#include "fixed_bfin.h"
-#endif
-
-#endif
-
-
-#else
-
-typedef float spx_mem_t;
-typedef float spx_coef_t;
-typedef float spx_lsp_t;
-typedef float spx_sig_t;
-typedef float spx_word16_t;
-typedef float spx_word32_t;
-
-#define Q15ONE 1.0f
-#define LPC_SCALING 1.f
-#define SIG_SCALING 1.f
-#define LSP_SCALING 1.f
-#define GAMMA_SCALING 1.f
-#define GAIN_SCALING 1.f
-#define GAIN_SCALING_1 1.f
-
-
-#define VERY_SMALL 1e-15f
-#define VERY_LARGE32 1e15f
-#define VERY_LARGE16 1e15f
-#define Q15_ONE ((spx_word16_t)1.f)
-
-#define QCONST16(x,bits) (x)
-#define QCONST32(x,bits) (x)
-
-#define NEG16(x) (-(x))
-#define NEG32(x) (-(x))
-#define EXTRACT16(x) (x)
-#define EXTEND32(x) (x)
-#define SHR16(a,shift) (a)
-#define SHL16(a,shift) (a)
-#define SHR32(a,shift) (a)
-#define SHL32(a,shift) (a)
-#define PSHR16(a,shift) (a)
-#define PSHR32(a,shift) (a)
-#define VSHR32(a,shift) (a)
-#define SATURATE16(x,a) (x)
-#define SATURATE32(x,a) (x)
-
-#define PSHR(a,shift) (a)
-#define SHR(a,shift) (a)
-#define SHL(a,shift) (a)
-#define SATURATE(x,a) (x)
-
-#define ADD16(a,b) ((a)+(b))
-#define SUB16(a,b) ((a)-(b))
-#define ADD32(a,b) ((a)+(b))
-#define SUB32(a,b) ((a)-(b))
-#define MULT16_16_16(a,b) ((a)*(b))
-#define MULT16_16(a,b) ((spx_word32_t)(a)*(spx_word32_t)(b))
-#define MAC16_16(c,a,b) ((c)+(spx_word32_t)(a)*(spx_word32_t)(b))
-
-#define MULT16_32_Q11(a,b) ((a)*(b))
-#define MULT16_32_Q13(a,b) ((a)*(b))
-#define MULT16_32_Q14(a,b) ((a)*(b))
-#define MULT16_32_Q15(a,b) ((a)*(b))
-#define MULT16_32_P15(a,b) ((a)*(b))
-
-#define MAC16_32_Q11(c,a,b) ((c)+(a)*(b))
-#define MAC16_32_Q15(c,a,b) ((c)+(a)*(b))
-
-#define MAC16_16_Q11(c,a,b) ((c)+(a)*(b))
-#define MAC16_16_Q13(c,a,b) ((c)+(a)*(b))
-#define MAC16_16_P13(c,a,b) ((c)+(a)*(b))
-#define MULT16_16_Q11_32(a,b) ((a)*(b))
-#define MULT16_16_Q13(a,b) ((a)*(b))
-#define MULT16_16_Q14(a,b) ((a)*(b))
-#define MULT16_16_Q15(a,b) ((a)*(b))
-#define MULT16_16_P15(a,b) ((a)*(b))
-#define MULT16_16_P13(a,b) ((a)*(b))
-#define MULT16_16_P14(a,b) ((a)*(b))
-
-#define DIV32_16(a,b) (((spx_word32_t)(a))/(spx_word16_t)(b))
-#define PDIV32_16(a,b) (((spx_word32_t)(a))/(spx_word16_t)(b))
-#define DIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
-#define PDIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
-
-
-#endif
-
-
-#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
-
-/* 2 on TI C5x DSP */
-#define BYTES_PER_CHAR 2
-#define BITS_PER_CHAR 16
-#define LOG2_BITS_PER_CHAR 4
-
-#else
-
-#define BYTES_PER_CHAR 1
-#define BITS_PER_CHAR 8
-#define LOG2_BITS_PER_CHAR 3
-
-#endif
-
-
-
-#ifdef FIXED_DEBUG
-long long spx_mips=0;
-#endif
-
-
-#endif
diff --git a/src/pulsecore/speex/fixed_generic.h b/src/pulsecore/speex/fixed_generic.h
deleted file mode 100644
index 547e22c..0000000
--- a/src/pulsecore/speex/fixed_generic.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Copyright (C) 2003 Jean-Marc Valin */
-/**
- @file fixed_generic.h
- @brief Generic fixed-point operations
-*/
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- - Neither the name of the Xiph.org Foundation nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef FIXED_GENERIC_H
-#define FIXED_GENERIC_H
-
-#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
-#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
-
-#define NEG16(x) (-(x))
-#define NEG32(x) (-(x))
-#define EXTRACT16(x) ((spx_word16_t)(x))
-#define EXTEND32(x) ((spx_word32_t)(x))
-#define SHR16(a,shift) ((a) >> (shift))
-#define SHL16(a,shift) ((a) << (shift))
-#define SHR32(a,shift) ((a) >> (shift))
-#define SHL32(a,shift) ((a) << (shift))
-#define PSHR16(a,shift) (SHR16((a)+((1<<((shift))>>1)),shift))
-#define PSHR32(a,shift) (SHR32((a)+((1<<((shift))>>1)),shift))
-#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
-#define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
-#define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
-
-#define SHR(a,shift) ((a) >> (shift))
-#define SHL(a,shift) ((spx_word32_t)(a) << (shift))
-#define PSHR(a,shift) (SHR((a)+((1<<((shift))>>1)),shift))
-#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
-
-
-#define ADD16(a,b) ((spx_word16_t)((spx_word16_t)(a)+(spx_word16_t)(b)))
-#define SUB16(a,b) ((spx_word16_t)(a)-(spx_word16_t)(b))
-#define ADD32(a,b) ((spx_word32_t)(a)+(spx_word32_t)(b))
-#define SUB32(a,b) ((spx_word32_t)(a)-(spx_word32_t)(b))
-
-
-/* result fits in 16 bits */
-#define MULT16_16_16(a,b) ((((spx_word16_t)(a))*((spx_word16_t)(b))))
-
-/* (spx_word32_t)(spx_word16_t) gives TI compiler a hint that it's 16x16->32 multiply */
-#define MULT16_16(a,b) (((spx_word32_t)(spx_word16_t)(a))*((spx_word32_t)(spx_word16_t)(b)))
-
-#define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b))))
-#define MULT16_32_Q12(a,b) ADD32(MULT16_16((a),SHR((b),12)), SHR(MULT16_16((a),((b)&0x00000fff)),12))
-#define MULT16_32_Q13(a,b) ADD32(MULT16_16((a),SHR((b),13)), SHR(MULT16_16((a),((b)&0x00001fff)),13))
-#define MULT16_32_Q14(a,b) ADD32(MULT16_16((a),SHR((b),14)), SHR(MULT16_16((a),((b)&0x00003fff)),14))
-
-#define MULT16_32_Q11(a,b) ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11))
-#define MAC16_32_Q11(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11)))
-
-#define MULT16_32_P15(a,b) ADD32(MULT16_16((a),SHR((b),15)), PSHR(MULT16_16((a),((b)&0x00007fff)),15))
-#define MULT16_32_Q15(a,b) ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))
-#define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15)))
-
-
-#define MAC16_16_Q11(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),11)))
-#define MAC16_16_Q13(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),13)))
-#define MAC16_16_P13(c,a,b) (ADD32((c),SHR(ADD32(4096,MULT16_16((a),(b))),13)))
-
-#define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11))
-#define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13))
-#define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14))
-#define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15))
-
-#define MULT16_16_P13(a,b) (SHR(ADD32(4096,MULT16_16((a),(b))),13))
-#define MULT16_16_P14(a,b) (SHR(ADD32(8192,MULT16_16((a),(b))),14))
-#define MULT16_16_P15(a,b) (SHR(ADD32(16384,MULT16_16((a),(b))),15))
-
-#define MUL_16_32_R15(a,bh,bl) ADD32(MULT16_16((a),(bh)), SHR(MULT16_16((a),(bl)),15))
-
-#define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b))))
-#define PDIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word16_t)(b))))
-#define DIV32(a,b) (((spx_word32_t)(a))/((spx_word32_t)(b)))
-#define PDIV32(a,b) (((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word32_t)(b)))
-
-#endif
diff --git a/src/pulsecore/speex/resample.c b/src/pulsecore/speex/resample.c
deleted file mode 100644
index 1e59200..0000000
--- a/src/pulsecore/speex/resample.c
+++ /dev/null
@@ -1,1121 +0,0 @@
-/* Copyright (C) 2007 Jean-Marc Valin
-
- File: resample.c
- Arbitrary resampling code
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- The design goals of this code are:
- - Very fast algorithm
- - SIMD-friendly algorithm
- - Low memory requirement
- - Good *perceptual* quality (and not best SNR)
-
- Warning: This resampler is relatively new. Although I think I got rid of
- all the major bugs and I don't expect the API to change anymore, there
- may be something I've missed. So use with caution.
-
- This algorithm is based on this original resampling algorithm:
- Smith, Julius O. Digital Audio Resampling Home Page
- Center for Computer Research in Music and Acoustics (CCRMA),
- Stanford University, 2007.
- Web published at http://www-ccrma.stanford.edu/~jos/resample/.
-
- There is one main difference, though. This resampler uses cubic
- interpolation instead of linear interpolation in the above paper. This
- makes the table much smaller and makes it possible to compute that table
- on a per-stream basis. In turn, being able to tweak the table for each
- stream makes it possible to both reduce complexity on simple ratios
- (e.g. 2/3), and get rid of the rounding operations in the inner loop.
- The latter both reduces CPU time and makes the algorithm more SIMD-friendly.
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef OUTSIDE_SPEEX
-#include <stdlib.h>
-static void *speex_alloc (int size) {return calloc(size,1);}
-static void *speex_realloc (void *ptr, int size) {return realloc(ptr, size);}
-static void speex_free (void *ptr) {free(ptr);}
-#include "speex_resampler.h"
-#include "arch.h"
-#else /* OUTSIDE_SPEEX */
-
-#include "speex/speex_resampler.h"
-#include "arch.h"
-#include "os_support.h"
-#endif /* OUTSIDE_SPEEX */
-
-#include <math.h>
-
-#ifndef M_PI
-#define M_PI 3.14159263
-#endif
-
-#ifdef FIXED_POINT
-#define WORD2INT(x) ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x)))
-#else
-#define WORD2INT(x) ((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : floor(.5+(x))))
-#endif
-
-/*#define float double*/
-#define FILTER_SIZE 64
-#define OVERSAMPLE 8
-
-#define IMAX(a,b) ((a) > (b) ? (a) : (b))
-#define IMIN(a,b) ((a) < (b) ? (a) : (b))
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-typedef int (*resampler_basic_func)(SpeexResamplerState *, spx_uint32_t , const spx_word16_t *, spx_uint32_t *, spx_word16_t *, spx_uint32_t *);
-
-struct SpeexResamplerState_ {
- spx_uint32_t in_rate;
- spx_uint32_t out_rate;
- spx_uint32_t num_rate;
- spx_uint32_t den_rate;
-
- int quality;
- spx_uint32_t nb_channels;
- spx_uint32_t filt_len;
- spx_uint32_t mem_alloc_size;
- int int_advance;
- int frac_advance;
- float cutoff;
- spx_uint32_t oversample;
- int initialised;
- int started;
-
- /* These are per-channel */
- spx_int32_t *last_sample;
- spx_uint32_t *samp_frac_num;
- spx_uint32_t *magic_samples;
-
- spx_word16_t *mem;
- spx_word16_t *sinc_table;
- spx_uint32_t sinc_table_length;
- resampler_basic_func resampler_ptr;
-
- int in_stride;
- int out_stride;
-} ;
-
-static double kaiser12_table[68] = {
- 0.99859849, 1.00000000, 0.99859849, 0.99440475, 0.98745105, 0.97779076,
- 0.96549770, 0.95066529, 0.93340547, 0.91384741, 0.89213598, 0.86843014,
- 0.84290116, 0.81573067, 0.78710866, 0.75723148, 0.72629970, 0.69451601,
- 0.66208321, 0.62920216, 0.59606986, 0.56287762, 0.52980938, 0.49704014,
- 0.46473455, 0.43304576, 0.40211431, 0.37206735, 0.34301800, 0.31506490,
- 0.28829195, 0.26276832, 0.23854851, 0.21567274, 0.19416736, 0.17404546,
- 0.15530766, 0.13794294, 0.12192957, 0.10723616, 0.09382272, 0.08164178,
- 0.07063950, 0.06075685, 0.05193064, 0.04409466, 0.03718069, 0.03111947,
- 0.02584161, 0.02127838, 0.01736250, 0.01402878, 0.01121463, 0.00886058,
- 0.00691064, 0.00531256, 0.00401805, 0.00298291, 0.00216702, 0.00153438,
- 0.00105297, 0.00069463, 0.00043489, 0.00025272, 0.00013031, 0.0000527734,
- 0.00001000, 0.00000000};
-/*
-static double kaiser12_table[36] = {
- 0.99440475, 1.00000000, 0.99440475, 0.97779076, 0.95066529, 0.91384741,
- 0.86843014, 0.81573067, 0.75723148, 0.69451601, 0.62920216, 0.56287762,
- 0.49704014, 0.43304576, 0.37206735, 0.31506490, 0.26276832, 0.21567274,
- 0.17404546, 0.13794294, 0.10723616, 0.08164178, 0.06075685, 0.04409466,
- 0.03111947, 0.02127838, 0.01402878, 0.00886058, 0.00531256, 0.00298291,
- 0.00153438, 0.00069463, 0.00025272, 0.0000527734, 0.00000500, 0.00000000};
-*/
-static double kaiser10_table[36] = {
- 0.99537781, 1.00000000, 0.99537781, 0.98162644, 0.95908712, 0.92831446,
- 0.89005583, 0.84522401, 0.79486424, 0.74011713, 0.68217934, 0.62226347,
- 0.56155915, 0.50119680, 0.44221549, 0.38553619, 0.33194107, 0.28205962,
- 0.23636152, 0.19515633, 0.15859932, 0.12670280, 0.09935205, 0.07632451,
- 0.05731132, 0.04193980, 0.02979584, 0.02044510, 0.01345224, 0.00839739,
- 0.00488951, 0.00257636, 0.00115101, 0.00035515, 0.00000000, 0.00000000};
-
-static double kaiser8_table[36] = {
- 0.99635258, 1.00000000, 0.99635258, 0.98548012, 0.96759014, 0.94302200,
- 0.91223751, 0.87580811, 0.83439927, 0.78875245, 0.73966538, 0.68797126,
- 0.63451750, 0.58014482, 0.52566725, 0.47185369, 0.41941150, 0.36897272,
- 0.32108304, 0.27619388, 0.23465776, 0.19672670, 0.16255380, 0.13219758,
- 0.10562887, 0.08273982, 0.06335451, 0.04724088, 0.03412321, 0.02369490,
- 0.01563093, 0.00959968, 0.00527363, 0.00233883, 0.00050000, 0.00000000};
-
-static double kaiser6_table[36] = {
- 0.99733006, 1.00000000, 0.99733006, 0.98935595, 0.97618418, 0.95799003,
- 0.93501423, 0.90755855, 0.87598009, 0.84068475, 0.80211977, 0.76076565,
- 0.71712752, 0.67172623, 0.62508937, 0.57774224, 0.53019925, 0.48295561,
- 0.43647969, 0.39120616, 0.34752997, 0.30580127, 0.26632152, 0.22934058,
- 0.19505503, 0.16360756, 0.13508755, 0.10953262, 0.08693120, 0.06722600,
- 0.05031820, 0.03607231, 0.02432151, 0.01487334, 0.00752000, 0.00000000};
-
-struct FuncDef {
- double *table;
- int oversample;
-};
-
-static struct FuncDef _KAISER12 = {kaiser12_table, 64};
-#define KAISER12 (&_KAISER12)
-/*static struct FuncDef _KAISER12 = {kaiser12_table, 32};
-#define KAISER12 (&_KAISER12)*/
-static struct FuncDef _KAISER10 = {kaiser10_table, 32};
-#define KAISER10 (&_KAISER10)
-static struct FuncDef _KAISER8 = {kaiser8_table, 32};
-#define KAISER8 (&_KAISER8)
-static struct FuncDef _KAISER6 = {kaiser6_table, 32};
-#define KAISER6 (&_KAISER6)
-
-struct QualityMapping {
- int base_length;
- int oversample;
- float downsample_bandwidth;
- float upsample_bandwidth;
- struct FuncDef *window_func;
-};
-
-
-/* This table maps conversion quality to internal parameters. There are two
- reasons that explain why the up-sampling bandwidth is larger than the
- down-sampling bandwidth:
- 1) When up-sampling, we can assume that the spectrum is already attenuated
- close to the Nyquist rate (from an A/D or a previous resampling filter)
- 2) Any aliasing that occurs very close to the Nyquist rate will be masked
- by the sinusoids/noise just below the Nyquist rate (guaranteed only for
- up-sampling).
-*/
-static const struct QualityMapping quality_map[11] = {
- { 8, 4, 0.830f, 0.860f, KAISER6 }, /* Q0 */
- { 16, 4, 0.850f, 0.880f, KAISER6 }, /* Q1 */
- { 32, 4, 0.882f, 0.910f, KAISER6 }, /* Q2 */ /* 82.3% cutoff ( ~60 dB stop) 6 */
- { 48, 8, 0.895f, 0.917f, KAISER8 }, /* Q3 */ /* 84.9% cutoff ( ~80 dB stop) 8 */
- { 64, 8, 0.921f, 0.940f, KAISER8 }, /* Q4 */ /* 88.7% cutoff ( ~80 dB stop) 8 */
- { 80, 16, 0.922f, 0.940f, KAISER10}, /* Q5 */ /* 89.1% cutoff (~100 dB stop) 10 */
- { 96, 16, 0.940f, 0.945f, KAISER10}, /* Q6 */ /* 91.5% cutoff (~100 dB stop) 10 */
- {128, 16, 0.950f, 0.950f, KAISER10}, /* Q7 */ /* 93.1% cutoff (~100 dB stop) 10 */
- {160, 16, 0.960f, 0.960f, KAISER10}, /* Q8 */ /* 94.5% cutoff (~100 dB stop) 10 */
- {192, 32, 0.968f, 0.968f, KAISER12}, /* Q9 */ /* 95.5% cutoff (~100 dB stop) 10 */
- {256, 32, 0.975f, 0.975f, KAISER12}, /* Q10 */ /* 96.6% cutoff (~100 dB stop) 10 */
-};
-/*8,24,40,56,80,104,128,160,200,256,320*/
-static double compute_func(float x, struct FuncDef *func)
-{
- float y, frac;
- double interp[4];
- int ind;
- y = x*func->oversample;
- ind = (int)floor(y);
- frac = (y-ind);
- /* CSE with handle the repeated powers */
- interp[3] = -0.1666666667*frac + 0.1666666667*(frac*frac*frac);
- interp[2] = frac + 0.5*(frac*frac) - 0.5*(frac*frac*frac);
- /*interp[2] = 1.f - 0.5f*frac - frac*frac + 0.5f*frac*frac*frac;*/
- interp[0] = -0.3333333333*frac + 0.5*(frac*frac) - 0.1666666667*(frac*frac*frac);
- /* Just to make sure we don't have rounding problems */
- interp[1] = 1.f-interp[3]-interp[2]-interp[0];
-
- /*sum = frac*accum[1] + (1-frac)*accum[2];*/
- return interp[0]*func->table[ind] + interp[1]*func->table[ind+1] + interp[2]*func->table[ind+2] + interp[3]*func->table[ind+3];
-}
-
-#if 0
-#include <stdio.h>
-int main(int argc, char **argv)
-{
- int i;
- for (i=0;i<256;i++)
- {
- printf ("%f\n", compute_func(i/256., KAISER12));
- }
- return 0;
-}
-#endif
-
-#ifdef FIXED_POINT
-/* The slow way of computing a sinc for the table. Should improve that some day */
-static spx_word16_t sinc(float cutoff, float x, int N, struct FuncDef *window_func)
-{
- /*fprintf (stderr, "%f ", x);*/
- float xx = x * cutoff;
- if (fabs(x)<1e-6f)
- return WORD2INT(32768.*cutoff);
- else if (fabs(x) > .5f*N)
- return 0;
- /*FIXME: Can it really be any slower than this? */
- return WORD2INT(32768.*cutoff*sin(M_PI*xx)/(M_PI*xx) * compute_func(fabs(2.*x/N), window_func));
-}
-#else
-/* The slow way of computing a sinc for the table. Should improve that some day */
-static spx_word16_t sinc(float cutoff, float x, int N, struct FuncDef *window_func)
-{
- /*fprintf (stderr, "%f ", x);*/
- float xx = x * cutoff;
- if (fabs(x)<1e-6)
- return cutoff;
- else if (fabs(x) > .5*N)
- return 0;
- /*FIXME: Can it really be any slower than this? */
- return cutoff*sin(M_PI*xx)/(M_PI*xx) * compute_func(fabs(2.*x/N), window_func);
-}
-#endif
-
-#ifdef FIXED_POINT
-static void cubic_coef(spx_word16_t x, spx_word16_t interp[4])
-{
- /* Compute interpolation coefficients. I'm not sure whether this corresponds to cubic interpolation
- but I know it's MMSE-optimal on a sinc */
- spx_word16_t x2, x3;
- x2 = MULT16_16_P15(x, x);
- x3 = MULT16_16_P15(x, x2);
- interp[0] = PSHR32(MULT16_16(QCONST16(-0.16667f, 15),x) + MULT16_16(QCONST16(0.16667f, 15),x3),15);
- interp[1] = EXTRACT16(EXTEND32(x) + SHR32(SUB32(EXTEND32(x2),EXTEND32(x3)),1));
- interp[3] = PSHR32(MULT16_16(QCONST16(-0.33333f, 15),x) + MULT16_16(QCONST16(.5f,15),x2) - MULT16_16(QCONST16(0.16667f, 15),x3),15);
- /* Just to make sure we don't have rounding problems */
- interp[2] = Q15_ONE-interp[0]-interp[1]-interp[3];
- if (interp[2]<32767)
- interp[2]+=1;
-}
-#else
-static void cubic_coef(spx_word16_t frac, spx_word16_t interp[4])
-{
- /* Compute interpolation coefficients. I'm not sure whether this corresponds to cubic interpolation
- but I know it's MMSE-optimal on a sinc */
- interp[0] = -0.16667f*frac + 0.16667f*frac*frac*frac;
- interp[1] = frac + 0.5f*frac*frac - 0.5f*frac*frac*frac;
- /*interp[2] = 1.f - 0.5f*frac - frac*frac + 0.5f*frac*frac*frac;*/
- interp[3] = -0.33333f*frac + 0.5f*frac*frac - 0.16667f*frac*frac*frac;
- /* Just to make sure we don't have rounding problems */
- interp[2] = 1.-interp[0]-interp[1]-interp[3];
-}
-#endif
-
-static int resampler_basic_direct_single(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
-{
- int N = st->filt_len;
- int out_sample = 0;
- spx_word16_t *mem;
- int last_sample = st->last_sample[channel_index];
- spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index];
- mem = st->mem + channel_index * st->mem_alloc_size;
- while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len))
- {
- int j;
- spx_word32_t sum=0;
-
- /* We already have all the filter coefficients pre-computed in the table */
- const spx_word16_t *ptr;
- /* Do the memory part */
- for (j=0;last_sample-N+1+j < 0;j++)
- {
- sum += MULT16_16(mem[last_sample+j],st->sinc_table[samp_frac_num*st->filt_len+j]);
- }
-
- /* Do the new part */
- ptr = in+st->in_stride*(last_sample-N+1+j);
- for (;j<N;j++)
- {
- sum += MULT16_16(*ptr,st->sinc_table[samp_frac_num*st->filt_len+j]);
- ptr += st->in_stride;
- }
-
- *out = PSHR32(sum,15);
- out += st->out_stride;
- out_sample++;
- last_sample += st->int_advance;
- samp_frac_num += st->frac_advance;
- if (samp_frac_num >= st->den_rate)
- {
- samp_frac_num -= st->den_rate;
- last_sample++;
- }
- }
- st->last_sample[channel_index] = last_sample;
- st->samp_frac_num[channel_index] = samp_frac_num;
- return out_sample;
-}
-
-#ifdef FIXED_POINT
-#else
-/* This is the same as the previous function, except with a double-precision accumulator */
-static int resampler_basic_direct_double(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
-{
- int N = st->filt_len;
- int out_sample = 0;
- spx_word16_t *mem;
- int last_sample = st->last_sample[channel_index];
- spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index];
- mem = st->mem + channel_index * st->mem_alloc_size;
- while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len))
- {
- int j;
- double sum=0;
-
- /* We already have all the filter coefficients pre-computed in the table */
- const spx_word16_t *ptr;
- /* Do the memory part */
- for (j=0;last_sample-N+1+j < 0;j++)
- {
- sum += MULT16_16(mem[last_sample+j],(double)st->sinc_table[samp_frac_num*st->filt_len+j]);
- }
-
- /* Do the new part */
- ptr = in+st->in_stride*(last_sample-N+1+j);
- for (;j<N;j++)
- {
- sum += MULT16_16(*ptr,(double)st->sinc_table[samp_frac_num*st->filt_len+j]);
- ptr += st->in_stride;
- }
-
- *out = sum;
- out += st->out_stride;
- out_sample++;
- last_sample += st->int_advance;
- samp_frac_num += st->frac_advance;
- if (samp_frac_num >= st->den_rate)
- {
- samp_frac_num -= st->den_rate;
- last_sample++;
- }
- }
- st->last_sample[channel_index] = last_sample;
- st->samp_frac_num[channel_index] = samp_frac_num;
- return out_sample;
-}
-#endif
-
-static int resampler_basic_interpolate_single(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
-{
- int N = st->filt_len;
- int out_sample = 0;
- spx_word16_t *mem;
- int last_sample = st->last_sample[channel_index];
- spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index];
- mem = st->mem + channel_index * st->mem_alloc_size;
- while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len))
- {
- int j;
- spx_word32_t sum=0;
-
- /* We need to interpolate the sinc filter */
- spx_word32_t accum[4] = {0.f,0.f, 0.f, 0.f};
- spx_word16_t interp[4];
- const spx_word16_t *ptr;
- int offset;
- spx_word16_t frac;
- offset = samp_frac_num*st->oversample/st->den_rate;
-#ifdef FIXED_POINT
- frac = PDIV32(SHL32((samp_frac_num*st->oversample) % st->den_rate,15),st->den_rate);
-#else
- frac = ((float)((samp_frac_num*st->oversample) % st->den_rate))/st->den_rate;
-#endif
- /* This code is written like this to make it easy to optimise with SIMD.
- For most DSPs, it would be best to split the loops in two because most DSPs
- have only two accumulators */
- for (j=0;last_sample-N+1+j < 0;j++)
- {
- spx_word16_t curr_mem = mem[last_sample+j];
- accum[0] += MULT16_16(curr_mem,st->sinc_table[4+(j+1)*st->oversample-offset-2]);
- accum[1] += MULT16_16(curr_mem,st->sinc_table[4+(j+1)*st->oversample-offset-1]);
- accum[2] += MULT16_16(curr_mem,st->sinc_table[4+(j+1)*st->oversample-offset]);
- accum[3] += MULT16_16(curr_mem,st->sinc_table[4+(j+1)*st->oversample-offset+1]);
- }
- ptr = in+st->in_stride*(last_sample-N+1+j);
- /* Do the new part */
- for (;j<N;j++)
- {
- spx_word16_t curr_in = *ptr;
- ptr += st->in_stride;
- accum[0] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset-2]);
- accum[1] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset-1]);
- accum[2] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset]);
- accum[3] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset+1]);
- }
- cubic_coef(frac, interp);
- sum = MULT16_32_Q15(interp[0],accum[0]) + MULT16_32_Q15(interp[1],accum[1]) + MULT16_32_Q15(interp[2],accum[2]) + MULT16_32_Q15(interp[3],accum[3]);
-
- *out = PSHR32(sum,15);
- out += st->out_stride;
- out_sample++;
- last_sample += st->int_advance;
- samp_frac_num += st->frac_advance;
- if (samp_frac_num >= st->den_rate)
- {
- samp_frac_num -= st->den_rate;
- last_sample++;
- }
- }
- st->last_sample[channel_index] = last_sample;
- st->samp_frac_num[channel_index] = samp_frac_num;
- return out_sample;
-}
-
-#ifdef FIXED_POINT
-#else
-/* This is the same as the previous function, except with a double-precision accumulator */
-static int resampler_basic_interpolate_double(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
-{
- int N = st->filt_len;
- int out_sample = 0;
- spx_word16_t *mem;
- int last_sample = st->last_sample[channel_index];
- spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index];
- mem = st->mem + channel_index * st->mem_alloc_size;
- while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len))
- {
- int j;
- spx_word32_t sum=0;
-
- /* We need to interpolate the sinc filter */
- double accum[4] = {0.f,0.f, 0.f, 0.f};
- float interp[4];
- const spx_word16_t *ptr;
- float alpha = ((float)samp_frac_num)/st->den_rate;
- int offset = samp_frac_num*st->oversample/st->den_rate;
- float frac = alpha*st->oversample - offset;
- /* This code is written like this to make it easy to optimise with SIMD.
- For most DSPs, it would be best to split the loops in two because most DSPs
- have only two accumulators */
- for (j=0;last_sample-N+1+j < 0;j++)
- {
- double curr_mem = mem[last_sample+j];
- accum[0] += MULT16_16(curr_mem,st->sinc_table[4+(j+1)*st->oversample-offset-2]);
- accum[1] += MULT16_16(curr_mem,st->sinc_table[4+(j+1)*st->oversample-offset-1]);
- accum[2] += MULT16_16(curr_mem,st->sinc_table[4+(j+1)*st->oversample-offset]);
- accum[3] += MULT16_16(curr_mem,st->sinc_table[4+(j+1)*st->oversample-offset+1]);
- }
- ptr = in+st->in_stride*(last_sample-N+1+j);
- /* Do the new part */
- for (;j<N;j++)
- {
- double curr_in = *ptr;
- ptr += st->in_stride;
- accum[0] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset-2]);
- accum[1] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset-1]);
- accum[2] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset]);
- accum[3] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset+1]);
- }
- cubic_coef(frac, interp);
- sum = interp[0]*accum[0] + interp[1]*accum[1] + interp[2]*accum[2] + interp[3]*accum[3];
-
- *out = PSHR32(sum,15);
- out += st->out_stride;
- out_sample++;
- last_sample += st->int_advance;
- samp_frac_num += st->frac_advance;
- if (samp_frac_num >= st->den_rate)
- {
- samp_frac_num -= st->den_rate;
- last_sample++;
- }
- }
- st->last_sample[channel_index] = last_sample;
- st->samp_frac_num[channel_index] = samp_frac_num;
- return out_sample;
-}
-#endif
-
-static void update_filter(SpeexResamplerState *st)
-{
- spx_uint32_t old_length;
-
- old_length = st->filt_len;
- st->oversample = quality_map[st->quality].oversample;
- st->filt_len = quality_map[st->quality].base_length;
-
- if (st->num_rate > st->den_rate)
- {
- /* down-sampling */
- st->cutoff = quality_map[st->quality].downsample_bandwidth * st->den_rate / st->num_rate;
- /* FIXME: divide the numerator and denominator by a certain amount if they're too large */
- st->filt_len = st->filt_len*st->num_rate / st->den_rate;
- /* Round down to make sure we have a multiple of 4 */
- st->filt_len &= (~0x3);
- if (2*st->den_rate < st->num_rate)
- st->oversample >>= 1;
- if (4*st->den_rate < st->num_rate)
- st->oversample >>= 1;
- if (8*st->den_rate < st->num_rate)
- st->oversample >>= 1;
- if (16*st->den_rate < st->num_rate)
- st->oversample >>= 1;
- if (st->oversample < 1)
- st->oversample = 1;
- } else {
- /* up-sampling */
- st->cutoff = quality_map[st->quality].upsample_bandwidth;
- }
-
- /* Choose the resampling type that requires the least amount of memory */
- if (st->den_rate <= st->oversample)
- {
- spx_uint32_t i;
- if (!st->sinc_table)
- st->sinc_table = (spx_word16_t *)speex_alloc(st->filt_len*st->den_rate*sizeof(spx_word16_t));
- else if (st->sinc_table_length < st->filt_len*st->den_rate)
- {
- st->sinc_table = (spx_word16_t *)speex_realloc(st->sinc_table,st->filt_len*st->den_rate*sizeof(spx_word16_t));
- st->sinc_table_length = st->filt_len*st->den_rate;
- }
- for (i=0;i<st->den_rate;i++)
- {
- spx_int32_t j;
- for (j=0;j<st->filt_len;j++)
- {
- st->sinc_table[i*st->filt_len+j] = sinc(st->cutoff,((j-(spx_int32_t)st->filt_len/2+1)-((float)i)/st->den_rate), st->filt_len, quality_map[st->quality].window_func);
- }
- }
-#ifdef FIXED_POINT
- st->resampler_ptr = resampler_basic_direct_single;
-#else
- if (st->quality>8)
- st->resampler_ptr = resampler_basic_direct_double;
- else
- st->resampler_ptr = resampler_basic_direct_single;
-#endif
- /*fprintf (stderr, "resampler uses direct sinc table and normalised cutoff %f\n", cutoff);*/
- } else {
- spx_int32_t i;
- if (!st->sinc_table)
- st->sinc_table = (spx_word16_t *)speex_alloc((st->filt_len*st->oversample+8)*sizeof(spx_word16_t));
- else if (st->sinc_table_length < st->filt_len*st->oversample+8)
- {
- st->sinc_table = (spx_word16_t *)speex_realloc(st->sinc_table,(st->filt_len*st->oversample+8)*sizeof(spx_word16_t));
- st->sinc_table_length = st->filt_len*st->oversample+8;
- }
- for (i=-4;i<(spx_int32_t)(st->oversample*st->filt_len+4);i++)
- st->sinc_table[i+4] = sinc(st->cutoff,(i/(float)st->oversample - st->filt_len/2), st->filt_len, quality_map[st->quality].window_func);
-#ifdef FIXED_POINT
- st->resampler_ptr = resampler_basic_interpolate_single;
-#else
- if (st->quality>8)
- st->resampler_ptr = resampler_basic_interpolate_double;
- else
- st->resampler_ptr = resampler_basic_interpolate_single;
-#endif
- /*fprintf (stderr, "resampler uses interpolated sinc table and normalised cutoff %f\n", cutoff);*/
- }
- st->int_advance = st->num_rate/st->den_rate;
- st->frac_advance = st->num_rate%st->den_rate;
-
-
- /* Here's the place where we update the filter memory to take into account
- the change in filter length. It's probably the messiest part of the code
- due to handling of lots of corner cases. */
- if (!st->mem)
- {
- spx_uint32_t i;
- st->mem = (spx_word16_t*)speex_alloc(st->nb_channels*(st->filt_len-1) * sizeof(spx_word16_t));
- for (i=0;i<st->nb_channels*(st->filt_len-1);i++)
- st->mem[i] = 0;
- st->mem_alloc_size = st->filt_len-1;
- /*speex_warning("init filter");*/
- } else if (!st->started)
- {
- spx_uint32_t i;
- st->mem = (spx_word16_t*)speex_realloc(st->mem, st->nb_channels*(st->filt_len-1) * sizeof(spx_word16_t));
- for (i=0;i<st->nb_channels*(st->filt_len-1);i++)
- st->mem[i] = 0;
- st->mem_alloc_size = st->filt_len-1;
- /*speex_warning("reinit filter");*/
- } else if (st->filt_len > old_length)
- {
- spx_int32_t i;
- /* Increase the filter length */
- /*speex_warning("increase filter size");*/
- int old_alloc_size = st->mem_alloc_size;
- if (st->filt_len-1 > st->mem_alloc_size)
- {
- st->mem = (spx_word16_t*)speex_realloc(st->mem, st->nb_channels*(st->filt_len-1) * sizeof(spx_word16_t));
- st->mem_alloc_size = st->filt_len-1;
- }
- for (i=st->nb_channels-1;i>=0;i--)
- {
- spx_int32_t j;
- spx_uint32_t olen = old_length;
- /*if (st->magic_samples[i])*/
- {
- /* Try and remove the magic samples as if nothing had happened */
-
- /* FIXME: This is wrong but for now we need it to avoid going over the array bounds */
- olen = old_length + 2*st->magic_samples[i];
- for (j=old_length-2+st->magic_samples[i];j>=0;j--)
- st->mem[i*st->mem_alloc_size+j+st->magic_samples[i]] = st->mem[i*old_alloc_size+j];
- for (j=0;j<st->magic_samples[i];j++)
- st->mem[i*st->mem_alloc_size+j] = 0;
- st->magic_samples[i] = 0;
- }
- if (st->filt_len > olen)
- {
- /* If the new filter length is still bigger than the "augmented" length */
- /* Copy data going backward */
- for (j=0;j<olen-1;j++)
- st->mem[i*st->mem_alloc_size+(st->filt_len-2-j)] = st->mem[i*st->mem_alloc_size+(olen-2-j)];
- /* Then put zeros for lack of anything better */
- for (;j<st->filt_len-1;j++)
- st->mem[i*st->mem_alloc_size+(st->filt_len-2-j)] = 0;
- /* Adjust last_sample */
- st->last_sample[i] += (st->filt_len - olen)/2;
- } else {
- /* Put back some of the magic! */
- st->magic_samples[i] = (olen - st->filt_len)/2;
- for (j=0;j<st->filt_len-1+st->magic_samples[i];j++)
- st->mem[i*st->mem_alloc_size+j] = st->mem[i*st->mem_alloc_size+j+st->magic_samples[i]];
- }
- }
- } else if (st->filt_len < old_length)
- {
- spx_uint32_t i;
- /* Reduce filter length, this a bit tricky. We need to store some of the memory as "magic"
- samples so they can be used directly as input the next time(s) */
- for (i=0;i<st->nb_channels;i++)
- {
- spx_uint32_t j;
- spx_uint32_t old_magic = st->magic_samples[i];
- st->magic_samples[i] = (old_length - st->filt_len)/2;
- /* We must copy some of the memory that's no longer used */
- /* Copy data going backward */
- for (j=0;j<st->filt_len-1+st->magic_samples[i]+old_magic;j++)
- st->mem[i*st->mem_alloc_size+j] = st->mem[i*st->mem_alloc_size+j+st->magic_samples[i]];
- st->magic_samples[i] += old_magic;
- }
- }
-
-}
-
-SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err)
-{
- return speex_resampler_init_frac(nb_channels, in_rate, out_rate, in_rate, out_rate, quality, err);
-}
-
-SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels, spx_uint32_t ratio_num, spx_uint32_t ratio_den, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err)
-{
- spx_uint32_t i;
- SpeexResamplerState *st;
- if (quality > 10 || quality < 0)
- {
- if (err)
- *err = RESAMPLER_ERR_INVALID_ARG;
- return NULL;
- }
- st = (SpeexResamplerState *)speex_alloc(sizeof(SpeexResamplerState));
- st->initialised = 0;
- st->started = 0;
- st->in_rate = 0;
- st->out_rate = 0;
- st->num_rate = 0;
- st->den_rate = 0;
- st->quality = -1;
- st->sinc_table_length = 0;
- st->mem_alloc_size = 0;
- st->filt_len = 0;
- st->mem = 0;
- st->resampler_ptr = 0;
-
- st->cutoff = 1.f;
- st->nb_channels = nb_channels;
- st->in_stride = 1;
- st->out_stride = 1;
-
- /* Per channel data */
- st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(int));
- st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
- st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
- for (i=0;i<nb_channels;i++)
- {
- st->last_sample[i] = 0;
- st->magic_samples[i] = 0;
- st->samp_frac_num[i] = 0;
- }
-
- speex_resampler_set_quality(st, quality);
- speex_resampler_set_rate_frac(st, ratio_num, ratio_den, in_rate, out_rate);
-
-
- update_filter(st);
-
- st->initialised = 1;
- if (err)
- *err = RESAMPLER_ERR_SUCCESS;
-
- return st;
-}
-
-void speex_resampler_destroy(SpeexResamplerState *st)
-{
- speex_free(st->mem);
- speex_free(st->sinc_table);
- speex_free(st->last_sample);
- speex_free(st->magic_samples);
- speex_free(st->samp_frac_num);
- speex_free(st);
-}
-
-
-
-static int speex_resampler_process_native(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len)
-{
- int j=0;
- int N = st->filt_len;
- int out_sample = 0;
- spx_word16_t *mem;
- spx_uint32_t tmp_out_len = 0;
- mem = st->mem + channel_index * st->mem_alloc_size;
- st->started = 1;
-
- /* Handle the case where we have samples left from a reduction in filter length */
- if (st->magic_samples[channel_index])
- {
- int istride_save;
- spx_uint32_t tmp_in_len;
- spx_uint32_t tmp_magic;
-
- istride_save = st->in_stride;
- tmp_in_len = st->magic_samples[channel_index];
- tmp_out_len = *out_len;
- /* magic_samples needs to be set to zero to avoid infinite recursion */
- tmp_magic = st->magic_samples[channel_index];
- st->magic_samples[channel_index] = 0;
- st->in_stride = 1;
- speex_resampler_process_native(st, channel_index, mem+N-1, &tmp_in_len, out, &tmp_out_len);
- st->in_stride = istride_save;
- /*speex_warning_int("extra samples:", tmp_out_len);*/
- /* If we couldn't process all "magic" input samples, save the rest for next time */
- if (tmp_in_len < tmp_magic)
- {
- spx_uint32_t i;
- st->magic_samples[channel_index] = tmp_magic-tmp_in_len;
- for (i=0;i<st->magic_samples[channel_index];i++)
- mem[N-1+i]=mem[N-1+i+tmp_in_len];
- }
- out += tmp_out_len*st->out_stride;
- *out_len -= tmp_out_len;
- }
-
- /* Call the right resampler through the function ptr */
- out_sample = st->resampler_ptr(st, channel_index, in, in_len, out, out_len);
-
- if (st->last_sample[channel_index] < (spx_int32_t)*in_len)
- *in_len = st->last_sample[channel_index];
- *out_len = out_sample+tmp_out_len;
- st->last_sample[channel_index] -= *in_len;
-
- for (j=0;j<N-1-(spx_int32_t)*in_len;j++)
- mem[j] = mem[j+*in_len];
- for (;j<N-1;j++)
- mem[j] = in[st->in_stride*(j+*in_len-N+1)];
-
- return RESAMPLER_ERR_SUCCESS;
-}
-
-#define FIXED_STACK_ALLOC 1024
-
-#ifdef FIXED_POINT
-int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len)
-{
- spx_uint32_t i;
- int istride_save, ostride_save;
-#ifdef VAR_ARRAYS
- spx_word16_t x[*in_len];
- spx_word16_t y[*out_len];
- /*VARDECL(spx_word16_t *x);
- VARDECL(spx_word16_t *y);
- ALLOC(x, *in_len, spx_word16_t);
- ALLOC(y, *out_len, spx_word16_t);*/
- istride_save = st->in_stride;
- ostride_save = st->out_stride;
- for (i=0;i<*in_len;i++)
- x[i] = WORD2INT(in[i*st->in_stride]);
- st->in_stride = st->out_stride = 1;
- speex_resampler_process_native(st, channel_index, x, in_len, y, out_len);
- st->in_stride = istride_save;
- st->out_stride = ostride_save;
- for (i=0;i<*out_len;i++)
- out[i*st->out_stride] = y[i];
-#else
- spx_word16_t x[FIXED_STACK_ALLOC];
- spx_word16_t y[FIXED_STACK_ALLOC];
- spx_uint32_t ilen=*in_len, olen=*out_len;
- istride_save = st->in_stride;
- ostride_save = st->out_stride;
- while (ilen && olen)
- {
- spx_uint32_t ichunk, ochunk;
- ichunk = ilen;
- ochunk = olen;
- if (ichunk>FIXED_STACK_ALLOC)
- ichunk=FIXED_STACK_ALLOC;
- if (ochunk>FIXED_STACK_ALLOC)
- ochunk=FIXED_STACK_ALLOC;
- for (i=0;i<ichunk;i++)
- x[i] = WORD2INT(in[i*st->in_stride]);
- st->in_stride = st->out_stride = 1;
- speex_resampler_process_native(st, channel_index, x, &ichunk, y, &ochunk);
- st->in_stride = istride_save;
- st->out_stride = ostride_save;
- for (i=0;i<ochunk;i++)
- out[i*st->out_stride] = y[i];
- out += ochunk;
- in += ichunk;
- ilen -= ichunk;
- olen -= ochunk;
- }
- *in_len -= ilen;
- *out_len -= olen;
-#endif
- return RESAMPLER_ERR_SUCCESS;
-}
-int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
-{
- return speex_resampler_process_native(st, channel_index, in, in_len, out, out_len);
-}
-#else
-int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len)
-{
- return speex_resampler_process_native(st, channel_index, in, in_len, out, out_len);
-}
-int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
-{
- spx_uint32_t i;
- int istride_save, ostride_save;
-#ifdef VAR_ARRAYS
- spx_word16_t x[*in_len];
- spx_word16_t y[*out_len];
- /*VARDECL(spx_word16_t *x);
- VARDECL(spx_word16_t *y);
- ALLOC(x, *in_len, spx_word16_t);
- ALLOC(y, *out_len, spx_word16_t);*/
- istride_save = st->in_stride;
- ostride_save = st->out_stride;
- for (i=0;i<*in_len;i++)
- x[i] = in[i*st->in_stride];
- st->in_stride = st->out_stride = 1;
- speex_resampler_process_native(st, channel_index, x, in_len, y, out_len);
- st->in_stride = istride_save;
- st->out_stride = ostride_save;
- for (i=0;i<*out_len;i++)
- out[i*st->out_stride] = WORD2INT(y[i]);
-#else
- spx_word16_t x[FIXED_STACK_ALLOC];
- spx_word16_t y[FIXED_STACK_ALLOC];
- spx_uint32_t ilen=*in_len, olen=*out_len;
- istride_save = st->in_stride;
- ostride_save = st->out_stride;
- while (ilen && olen)
- {
- spx_uint32_t ichunk, ochunk;
- ichunk = ilen;
- ochunk = olen;
- if (ichunk>FIXED_STACK_ALLOC)
- ichunk=FIXED_STACK_ALLOC;
- if (ochunk>FIXED_STACK_ALLOC)
- ochunk=FIXED_STACK_ALLOC;
- for (i=0;i<ichunk;i++)
- x[i] = in[i*st->in_stride];
- st->in_stride = st->out_stride = 1;
- speex_resampler_process_native(st, channel_index, x, &ichunk, y, &ochunk);
- st->in_stride = istride_save;
- st->out_stride = ostride_save;
- for (i=0;i<ochunk;i++)
- out[i*st->out_stride] = WORD2INT(y[i]);
- out += ochunk;
- in += ichunk;
- ilen -= ichunk;
- olen -= ochunk;
- }
- *in_len -= ilen;
- *out_len -= olen;
-#endif
- return RESAMPLER_ERR_SUCCESS;
-}
-#endif
-
-int speex_resampler_process_interleaved_float(SpeexResamplerState *st, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len)
-{
- spx_uint32_t i;
- int istride_save, ostride_save;
- spx_uint32_t bak_len = *out_len;
- istride_save = st->in_stride;
- ostride_save = st->out_stride;
- st->in_stride = st->out_stride = st->nb_channels;
- for (i=0;i<st->nb_channels;i++)
- {
- *out_len = bak_len;
- speex_resampler_process_float(st, i, in+i, in_len, out+i, out_len);
- }
- st->in_stride = istride_save;
- st->out_stride = ostride_save;
- return RESAMPLER_ERR_SUCCESS;
-}
-
-
-int speex_resampler_process_interleaved_int(SpeexResamplerState *st, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
-{
- spx_uint32_t i;
- int istride_save, ostride_save;
- spx_uint32_t bak_len = *out_len;
- istride_save = st->in_stride;
- ostride_save = st->out_stride;
- st->in_stride = st->out_stride = st->nb_channels;
- for (i=0;i<st->nb_channels;i++)
- {
- *out_len = bak_len;
- speex_resampler_process_int(st, i, in+i, in_len, out+i, out_len);
- }
- st->in_stride = istride_save;
- st->out_stride = ostride_save;
- return RESAMPLER_ERR_SUCCESS;
-}
-
-int speex_resampler_set_rate(SpeexResamplerState *st, spx_uint32_t in_rate, spx_uint32_t out_rate)
-{
- return speex_resampler_set_rate_frac(st, in_rate, out_rate, in_rate, out_rate);
-}
-
-void speex_resampler_get_rate(SpeexResamplerState *st, spx_uint32_t *in_rate, spx_uint32_t *out_rate)
-{
- *in_rate = st->in_rate;
- *out_rate = st->out_rate;
-}
-
-int speex_resampler_set_rate_frac(SpeexResamplerState *st, spx_uint32_t ratio_num, spx_uint32_t ratio_den, spx_uint32_t in_rate, spx_uint32_t out_rate)
-{
- spx_uint32_t fact;
- spx_uint32_t old_den;
- spx_uint32_t i;
- if (st->in_rate == in_rate && st->out_rate == out_rate && st->num_rate == ratio_num && st->den_rate == ratio_den)
- return RESAMPLER_ERR_SUCCESS;
-
- old_den = st->den_rate;
- st->in_rate = in_rate;
- st->out_rate = out_rate;
- st->num_rate = ratio_num;
- st->den_rate = ratio_den;
- /* FIXME: This is terribly inefficient, but who cares (at least for now)? */
- for (fact=2;fact<=IMIN(st->num_rate, st->den_rate);fact++)
- {
- while ((st->num_rate % fact == 0) && (st->den_rate % fact == 0))
- {
- st->num_rate /= fact;
- st->den_rate /= fact;
- }
- }
-
- if (old_den > 0)
- {
- for (i=0;i<st->nb_channels;i++)
- {
- st->samp_frac_num[i]=st->samp_frac_num[i]*st->den_rate/old_den;
- /* Safety net */
- if (st->samp_frac_num[i] >= st->den_rate)
- st->samp_frac_num[i] = st->den_rate-1;
- }
- }
-
- if (st->initialised)
- update_filter(st);
- return RESAMPLER_ERR_SUCCESS;
-}
-
-void speex_resampler_get_ratio(SpeexResamplerState *st, spx_uint32_t *ratio_num, spx_uint32_t *ratio_den)
-{
- *ratio_num = st->num_rate;
- *ratio_den = st->den_rate;
-}
-
-int speex_resampler_set_quality(SpeexResamplerState *st, int quality)
-{
- if (quality > 10 || quality < 0)
- return RESAMPLER_ERR_INVALID_ARG;
- if (st->quality == quality)
- return RESAMPLER_ERR_SUCCESS;
- st->quality = quality;
- if (st->initialised)
- update_filter(st);
- return RESAMPLER_ERR_SUCCESS;
-}
-
-void speex_resampler_get_quality(SpeexResamplerState *st, int *quality)
-{
- *quality = st->quality;
-}
-
-void speex_resampler_set_input_stride(SpeexResamplerState *st, spx_uint32_t stride)
-{
- st->in_stride = stride;
-}
-
-void speex_resampler_get_input_stride(SpeexResamplerState *st, spx_uint32_t *stride)
-{
- *stride = st->in_stride;
-}
-
-void speex_resampler_set_output_stride(SpeexResamplerState *st, spx_uint32_t stride)
-{
- st->out_stride = stride;
-}
-
-void speex_resampler_get_output_stride(SpeexResamplerState *st, spx_uint32_t *stride)
-{
- *stride = st->out_stride;
-}
-
-int speex_resampler_skip_zeros(SpeexResamplerState *st)
-{
- spx_uint32_t i;
- for (i=0;i<st->nb_channels;i++)
- st->last_sample[i] = st->filt_len/2;
- return RESAMPLER_ERR_SUCCESS;
-}
-
-int speex_resampler_reset_mem(SpeexResamplerState *st)
-{
- spx_uint32_t i;
- for (i=0;i<st->nb_channels*(st->filt_len-1);i++)
- st->mem[i] = 0;
- return RESAMPLER_ERR_SUCCESS;
-}
-
-const char *speex_resampler_strerror(int err)
-{
- switch (err)
- {
- case RESAMPLER_ERR_SUCCESS:
- return "Success.";
- case RESAMPLER_ERR_ALLOC_FAILED:
- return "Memory allocation failed.";
- case RESAMPLER_ERR_BAD_STATE:
- return "Bad resampler state.";
- case RESAMPLER_ERR_INVALID_ARG:
- return "Invalid argument.";
- case RESAMPLER_ERR_PTR_OVERLAP:
- return "Input and output buffers overlap.";
- default:
- return "Unknown error. Bad error code or strange version mismatch.";
- }
-}
diff --git a/src/pulsecore/speex/speex_resampler.h b/src/pulsecore/speex/speex_resampler.h
deleted file mode 100644
index 8629eeb..0000000
--- a/src/pulsecore/speex/speex_resampler.h
+++ /dev/null
@@ -1,328 +0,0 @@
-/* Copyright (C) 2007 Jean-Marc Valin
-
- File: speex_resampler.h
- Resampling code
-
- The design goals of this code are:
- - Very fast algorithm
- - Low memory requirement
- - Good *perceptual* quality (and not best SNR)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-#ifndef SPEEX_RESAMPLER_H
-#define SPEEX_RESAMPLER_H
-
-#ifdef OUTSIDE_SPEEX
-
-/********* WARNING: MENTAL SANITY ENDS HERE *************/
-
-/* If the resampler is defined outside of Speex, we change the symbol names so that
- there won't be any clash if linking with Speex later on. */
-
-/* #define RANDOM_PREFIX your software name here */
-#ifndef RANDOM_PREFIX
-#error "Please define RANDOM_PREFIX (above) to something specific to your project to prevent symbol name clashes"
-#endif
-
-#define CAT_PREFIX2(a,b) a ## b
-#define CAT_PREFIX(a,b) CAT_PREFIX2(a, b)
-
-#define speex_resampler_init CAT_PREFIX(RANDOM_PREFIX,_resampler_init)
-#define speex_resampler_init_frac CAT_PREFIX(RANDOM_PREFIX,_resampler_init_frac)
-#define speex_resampler_destroy CAT_PREFIX(RANDOM_PREFIX,_resampler_destroy)
-#define speex_resampler_process_float CAT_PREFIX(RANDOM_PREFIX,_resampler_process_float)
-#define speex_resampler_process_int CAT_PREFIX(RANDOM_PREFIX,_resampler_process_int)
-#define speex_resampler_process_interleaved_float CAT_PREFIX(RANDOM_PREFIX,_resampler_process_interleaved_float)
-#define speex_resampler_process_interleaved_int CAT_PREFIX(RANDOM_PREFIX,_resampler_process_interleaved_int)
-#define speex_resampler_set_rate CAT_PREFIX(RANDOM_PREFIX,_resampler_set_rate)
-#define speex_resampler_get_rate CAT_PREFIX(RANDOM_PREFIX,_resampler_get_rate)
-#define speex_resampler_set_rate_frac CAT_PREFIX(RANDOM_PREFIX,_resampler_set_rate_frac)
-#define speex_resampler_get_ratio CAT_PREFIX(RANDOM_PREFIX,_resampler_get_ratio)
-#define speex_resampler_set_quality CAT_PREFIX(RANDOM_PREFIX,_resampler_set_quality)
-#define speex_resampler_get_quality CAT_PREFIX(RANDOM_PREFIX,_resampler_get_quality)
-#define speex_resampler_set_input_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_set_input_stride)
-#define speex_resampler_get_input_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_get_input_stride)
-#define speex_resampler_set_output_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_set_output_stride)
-#define speex_resampler_get_output_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_get_output_stride)
-#define speex_resampler_skip_zeros CAT_PREFIX(RANDOM_PREFIX,_resampler_skip_zeros)
-#define speex_resampler_reset_mem CAT_PREFIX(RANDOM_PREFIX,_resampler_reset_mem)
-#define speex_resampler_strerror CAT_PREFIX(RANDOM_PREFIX,_resampler_strerror)
-
-#define spx_int16_t short
-#define spx_int32_t int
-#define spx_uint16_t unsigned short
-#define spx_uint32_t unsigned int
-
-#else /* OUTSIDE_SPEEX */
-
-#include "speex/speex_types.h"
-
-#endif /* OUTSIDE_SPEEX */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SPEEX_RESAMPLER_QUALITY_MAX 10
-#define SPEEX_RESAMPLER_QUALITY_MIN 0
-#define SPEEX_RESAMPLER_QUALITY_DEFAULT 4
-#define SPEEX_RESAMPLER_QUALITY_VOIP 3
-#define SPEEX_RESAMPLER_QUALITY_DESKTOP 5
-
-enum {
- RESAMPLER_ERR_SUCCESS = 0,
- RESAMPLER_ERR_ALLOC_FAILED = 1,
- RESAMPLER_ERR_BAD_STATE = 2,
- RESAMPLER_ERR_INVALID_ARG = 3,
- RESAMPLER_ERR_PTR_OVERLAP = 4,
-
- RESAMPLER_ERR_MAX_ERROR
-};
-
-struct SpeexResamplerState_;
-typedef struct SpeexResamplerState_ SpeexResamplerState;
-
-/** Create a new resampler with integer input and output rates.
- * @param nb_channels Number of channels to be processed
- * @param in_rate Input sampling rate (integer number of Hz).
- * @param out_rate Output sampling rate (integer number of Hz).
- * @param quality Resampling quality between 0 and 10, where 0 has poor quality
- * and 10 has very high quality.
- * @return Newly created resampler state
- * @retval NULL Error: not enough memory
- */
-SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels,
- spx_uint32_t in_rate,
- spx_uint32_t out_rate,
- int quality,
- int *err);
-
-/** Create a new resampler with fractional input/output rates. The sampling
- * rate ratio is an arbitrary rational number with both the numerator and
- * denominator being 32-bit integers.
- * @param nb_channels Number of channels to be processed
- * @param ratio_num Numerator of the sampling rate ratio
- * @param ratio_den Denominator of the sampling rate ratio
- * @param in_rate Input sampling rate rounded to the nearest integer (in Hz).
- * @param out_rate Output sampling rate rounded to the nearest integer (in Hz).
- * @param quality Resampling quality between 0 and 10, where 0 has poor quality
- * and 10 has very high quality.
- * @return Newly created resampler state
- * @retval NULL Error: not enough memory
- */
-SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels,
- spx_uint32_t ratio_num,
- spx_uint32_t ratio_den,
- spx_uint32_t in_rate,
- spx_uint32_t out_rate,
- int quality,
- int *err);
-
-/** Destroy a resampler state.
- * @param st Resampler state
- */
-void speex_resampler_destroy(SpeexResamplerState *st);
-
-/** Resample a float array. The input and output buffers must *not* overlap.
- * @param st Resampler state
- * @param channel_index Index of the channel to process for the multi-channel
- * base (0 otherwise)
- * @param in Input buffer
- * @param in_len Number of input samples in the input buffer. Returns the
- * number of samples processed
- * @param out Output buffer
- * @param out_len Size of the output buffer. Returns the number of samples written
- */
-int speex_resampler_process_float(SpeexResamplerState *st,
- spx_uint32_t channel_index,
- const float *in,
- spx_uint32_t *in_len,
- float *out,
- spx_uint32_t *out_len);
-
-/** Resample an int array. The input and output buffers must *not* overlap.
- * @param st Resampler state
- * @param channel_index Index of the channel to process for the multi-channel
- * base (0 otherwise)
- * @param in Input buffer
- * @param in_len Number of input samples in the input buffer. Returns the number
- * of samples processed
- * @param out Output buffer
- * @param out_len Size of the output buffer. Returns the number of samples written
- */
-int speex_resampler_process_int(SpeexResamplerState *st,
- spx_uint32_t channel_index,
- const spx_int16_t *in,
- spx_uint32_t *in_len,
- spx_int16_t *out,
- spx_uint32_t *out_len);
-
-/** Resample an interleaved float array. The input and output buffers must *not* overlap.
- * @param st Resampler state
- * @param in Input buffer
- * @param in_len Number of input samples in the input buffer. Returns the number
- * of samples processed. This is all per-channel.
- * @param out Output buffer
- * @param out_len Size of the output buffer. Returns the number of samples written.
- * This is all per-channel.
- */
-int speex_resampler_process_interleaved_float(SpeexResamplerState *st,
- const float *in,
- spx_uint32_t *in_len,
- float *out,
- spx_uint32_t *out_len);
-
-/** Resample an interleaved int array. The input and output buffers must *not* overlap.
- * @param st Resampler state
- * @param in Input buffer
- * @param in_len Number of input samples in the input buffer. Returns the number
- * of samples processed. This is all per-channel.
- * @param out Output buffer
- * @param out_len Size of the output buffer. Returns the number of samples written.
- * This is all per-channel.
- */
-int speex_resampler_process_interleaved_int(SpeexResamplerState *st,
- const spx_int16_t *in,
- spx_uint32_t *in_len,
- spx_int16_t *out,
- spx_uint32_t *out_len);
-
-/** Set (change) the input/output sampling rates (integer value).
- * @param st Resampler state
- * @param in_rate Input sampling rate (integer number of Hz).
- * @param out_rate Output sampling rate (integer number of Hz).
- */
-int speex_resampler_set_rate(SpeexResamplerState *st,
- spx_uint32_t in_rate,
- spx_uint32_t out_rate);
-
-/** Get the current input/output sampling rates (integer value).
- * @param st Resampler state
- * @param in_rate Input sampling rate (integer number of Hz) copied.
- * @param out_rate Output sampling rate (integer number of Hz) copied.
- */
-void speex_resampler_get_rate(SpeexResamplerState *st,
- spx_uint32_t *in_rate,
- spx_uint32_t *out_rate);
-
-/** Set (change) the input/output sampling rates and resampling ratio
- * (fractional values in Hz supported).
- * @param st Resampler state
- * @param ratio_num Numerator of the sampling rate ratio
- * @param ratio_den Denominator of the sampling rate ratio
- * @param in_rate Input sampling rate rounded to the nearest integer (in Hz).
- * @param out_rate Output sampling rate rounded to the nearest integer (in Hz).
- */
-int speex_resampler_set_rate_frac(SpeexResamplerState *st,
- spx_uint32_t ratio_num,
- spx_uint32_t ratio_den,
- spx_uint32_t in_rate,
- spx_uint32_t out_rate);
-
-/** Get the current resampling ratio. This will be reduced to the least
- * common denominator.
- * @param st Resampler state
- * @param ratio_num Numerator of the sampling rate ratio copied
- * @param ratio_den Denominator of the sampling rate ratio copied
- */
-void speex_resampler_get_ratio(SpeexResamplerState *st,
- spx_uint32_t *ratio_num,
- spx_uint32_t *ratio_den);
-
-/** Set (change) the conversion quality.
- * @param st Resampler state
- * @param quality Resampling quality between 0 and 10, where 0 has poor
- * quality and 10 has very high quality.
- */
-int speex_resampler_set_quality(SpeexResamplerState *st,
- int quality);
-
-/** Get the conversion quality.
- * @param st Resampler state
- * @param quality Resampling quality between 0 and 10, where 0 has poor
- * quality and 10 has very high quality.
- */
-void speex_resampler_get_quality(SpeexResamplerState *st,
- int *quality);
-
-/** Set (change) the input stride.
- * @param st Resampler state
- * @param stride Input stride
- */
-void speex_resampler_set_input_stride(SpeexResamplerState *st,
- spx_uint32_t stride);
-
-/** Get the input stride.
- * @param st Resampler state
- * @param stride Input stride copied
- */
-void speex_resampler_get_input_stride(SpeexResamplerState *st,
- spx_uint32_t *stride);
-
-/** Set (change) the output stride.
- * @param st Resampler state
- * @param stride Output stride
- */
-void speex_resampler_set_output_stride(SpeexResamplerState *st,
- spx_uint32_t stride);
-
-/** Get the output stride.
- * @param st Resampler state copied
- * @param stride Output stride
- */
-void speex_resampler_get_output_stride(SpeexResamplerState *st,
- spx_uint32_t *stride);
-
-/** Make sure that the first samples to go out of the resamplers don't have
- * leading zeros. This is only useful before starting to use a newly created
- * resampler. It is recommended to use that when resampling an audio file, as
- * it will generate a file with the same length. For real-time processing,
- * it is probably easier not to use this call (so that the output duration
- * is the same for the first frame).
- * @param st Resampler state
- */
-int speex_resampler_skip_zeros(SpeexResamplerState *st);
-
-/** Reset a resampler so a new (unrelated) stream can be processed.
- * @param st Resampler state
- */
-int speex_resampler_reset_mem(SpeexResamplerState *st);
-
-/** Returns the English meaning for an error code
- * @param err Error code
- * @return English string
- */
-const char *speex_resampler_strerror(int err);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/pulsecore/speexwrap.h b/src/pulsecore/speexwrap.h
deleted file mode 100644
index 8deca5c..0000000
--- a/src/pulsecore/speexwrap.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef foopulsespeexwraphfoo
-#define foopulsespeexwraphfoo
-
-/* $Id: speexwrap.h 1971 2007-10-28 19:13:50Z lennart $ */
-
-/***
- This file is part of PulseAudio.
-
- Copyright 2004-2006 Lennart Poettering
- Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
-
- PulseAudio is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
- or (at your option) any later version.
-
- PulseAudio is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with PulseAudio; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA.
-***/
-
-/* We define a minimal version of speex_resampler.h however define one
- * version for fixed and another one for float. Yes, somewhat ugly */
-
-#define spx_int16_t short
-#define spx_int32_t int
-#define spx_uint16_t unsigned short
-#define spx_uint32_t unsigned int
-
-typedef struct SpeexResamplerState_ SpeexResamplerState;
-
-SpeexResamplerState *paspfx_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err);
-void paspfx_resampler_destroy(SpeexResamplerState *st);
-int paspfx_resampler_process_interleaved_int(SpeexResamplerState *st, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len);
-int paspfx_resampler_set_rate(SpeexResamplerState *st, spx_uint32_t in_rate, spx_uint32_t out_rate);
-
-SpeexResamplerState *paspfl_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err);
-void paspfl_resampler_destroy(SpeexResamplerState *st);
-int paspfl_resampler_process_interleaved_float(SpeexResamplerState *st, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len);
-int paspfl_resampler_set_rate(SpeexResamplerState *st, spx_uint32_t in_rate, spx_uint32_t out_rate);
-
-#endif
diff --git a/src/pulsecore/start-child.c b/src/pulsecore/start-child.c
index e01011d..7774bde 100644
--- a/src/pulsecore/start-child.c
+++ b/src/pulsecore/start-child.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -68,11 +66,6 @@ int pa_start_child_for_read(const char *name, const char *argv1, pid_t *pid) {
return pipe_fds[0];
} else {
-#ifdef __linux__
- DIR* d;
-#endif
- int max_fd, i;
-
/* child */
pa_reset_priority();
@@ -89,48 +82,9 @@ int pa_start_child_for_read(const char *name, const char *argv1, pid_t *pid) {
pa_close(2);
pa_assert_se(open("/dev/null", O_WRONLY) == 2);
-#ifdef __linux__
-
- if ((d = opendir("/proc/self/fd/"))) {
-
- struct dirent *de;
-
- while ((de = readdir(d))) {
- char *e = NULL;
- int fd;
-
- if (de->d_name[0] == '.')
- continue;
-
- errno = 0;
- fd = strtol(de->d_name, &e, 10);
- pa_assert(errno == 0 && e && *e == 0);
-
- if (fd >= 3 && dirfd(d) != fd)
- pa_close(fd);
- }
-
- closedir(d);
- } else {
-
-#endif
-
- max_fd = 1024;
-
-#ifdef HAVE_SYS_RESOURCE_H
- {
- struct rlimit r;
- if (getrlimit(RLIMIT_NOFILE, &r) == 0)
- max_fd = r.rlim_max;
- }
-#endif
-
- for (i = 3; i < max_fd; i++)
- pa_close(i);
-
-#ifdef __linux__
- }
-#endif
+ pa_close_all(-1);
+ pa_reset_sigs(-1);
+ pa_unblock_sigs(-1);
#ifdef PR_SET_PDEATHSIG
/* On Linux we can use PR_SET_PDEATHSIG to have the helper
@@ -141,16 +95,6 @@ int pa_start_child_for_read(const char *name, const char *argv1, pid_t *pid) {
prctl(PR_SET_PDEATHSIG, SIGTERM, 0, 0, 0);
#endif
-#ifdef SIGPIPE
- /* Make sure that SIGPIPE kills the child process */
- signal(SIGPIPE, SIG_DFL);
-#endif
-
-#ifdef SIGTERM
- /* Make sure that SIGTERM kills the child process */
- signal(SIGTERM, SIG_DFL);
-#endif
-
execl(name, name, argv1, NULL);
_exit(1);
}
diff --git a/src/pulsecore/start-child.h b/src/pulsecore/start-child.h
index 359b504..0b5ff66 100644
--- a/src/pulsecore/start-child.h
+++ b/src/pulsecore/start-child.h
@@ -1,8 +1,6 @@
#ifndef foopulsestartchildhfoo
#define foopulsestartchildhfoo
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/strbuf.c b/src/pulsecore/strbuf.c
index d9a6701..540faef 100644
--- a/src/pulsecore/strbuf.c
+++ b/src/pulsecore/strbuf.c
@@ -1,5 +1,3 @@
-/* $Id: strbuf.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -79,7 +77,7 @@ char *pa_strbuf_tostring(pa_strbuf *sb) {
pa_assert(sb);
- e = t = pa_xnew(char, sb->length+1);
+ e = t = pa_xmalloc(sb->length+1);
for (c = sb->head; c; c = c->next) {
pa_assert((size_t) (e-t) <= sb->length);
@@ -152,8 +150,8 @@ void pa_strbuf_putsn(pa_strbuf *sb, const char *t, size_t l) {
/* Append a printf() style formatted string to the string buffer. */
/* The following is based on an example from the GNU libc documentation */
-int pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) {
- int size = 100;
+size_t pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) {
+ size_t size = 100;
struct chunk *c = NULL;
pa_assert(sb);
@@ -170,14 +168,14 @@ int pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) {
CHUNK_TO_TEXT(c)[size-1] = 0;
va_end(ap);
- if (r > -1 && r < size) {
- c->length = r;
+ if (r > -1 && (size_t) r < size) {
+ c->length = (size_t) r;
append(sb, c);
- return r;
+ return (size_t) r;
}
if (r > -1) /* glibc 2.1 */
- size = r+1;
+ size = (size_t) r+1;
else /* glibc 2.0 */
size *= 2;
}
diff --git a/src/pulsecore/strbuf.h b/src/pulsecore/strbuf.h
index ca402b7..ac68d7b 100644
--- a/src/pulsecore/strbuf.h
+++ b/src/pulsecore/strbuf.h
@@ -1,8 +1,6 @@
#ifndef foostrbufhfoo
#define foostrbufhfoo
-/* $Id: strbuf.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -24,7 +22,7 @@
USA.
***/
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
typedef struct pa_strbuf pa_strbuf;
@@ -33,7 +31,7 @@ void pa_strbuf_free(pa_strbuf *sb);
char *pa_strbuf_tostring(pa_strbuf *sb);
char *pa_strbuf_tostring_free(pa_strbuf *sb);
-int pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) PA_GCC_PRINTF_ATTR(2,3);
+size_t pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) PA_GCC_PRINTF_ATTR(2,3);
void pa_strbuf_puts(pa_strbuf *sb, const char *t);
void pa_strbuf_putsn(pa_strbuf *sb, const char *t, size_t m);
diff --git a/src/pulsecore/strlist.c b/src/pulsecore/strlist.c
index 6421f76..f587a2f 100644
--- a/src/pulsecore/strlist.c
+++ b/src/pulsecore/strlist.c
@@ -1,5 +1,3 @@
-/* $Id: strlist.c 1984 2007-10-29 20:30:15Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/strlist.h b/src/pulsecore/strlist.h
index 250a46c..1cb7537 100644
--- a/src/pulsecore/strlist.h
+++ b/src/pulsecore/strlist.h
@@ -1,8 +1,6 @@
#ifndef foostrlisthfoo
#define foostrlisthfoo
-/* $Id: strlist.h 1984 2007-10-29 20:30:15Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/tagstruct.c b/src/pulsecore/tagstruct.c
index 4fa3924..62a3014 100644
--- a/src/pulsecore/tagstruct.c
+++ b/src/pulsecore/tagstruct.c
@@ -1,5 +1,3 @@
-/* $Id: tagstruct.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -42,12 +40,14 @@
#include "tagstruct.h"
+#define MAX_TAG_SIZE (64*1024)
+
struct pa_tagstruct {
uint8_t *data;
size_t length, allocated;
size_t rindex;
- int dynamic;
+ pa_bool_t dynamic;
};
pa_tagstruct *pa_tagstruct_new(const uint8_t* data, size_t length) {
@@ -154,18 +154,18 @@ void pa_tagstruct_put_arbitrary(pa_tagstruct *t, const void *p, size_t length) {
extend(t, 5+length);
t->data[t->length] = PA_TAG_ARBITRARY;
- tmp = htonl(length);
+ tmp = htonl((uint32_t) length);
memcpy(t->data+t->length+1, &tmp, 4);
if (length)
memcpy(t->data+t->length+5, p, length);
t->length += 5+length;
}
-void pa_tagstruct_put_boolean(pa_tagstruct*t, int b) {
+void pa_tagstruct_put_boolean(pa_tagstruct*t, pa_bool_t b) {
pa_assert(t);
extend(t, 1);
- t->data[t->length] = b ? PA_TAG_BOOLEAN_TRUE : PA_TAG_BOOLEAN_FALSE;
+ t->data[t->length] = (uint8_t) (b ? PA_TAG_BOOLEAN_TRUE : PA_TAG_BOOLEAN_FALSE);
t->length += 1;
}
@@ -175,9 +175,9 @@ void pa_tagstruct_put_timeval(pa_tagstruct*t, const struct timeval *tv) {
extend(t, 9);
t->data[t->length] = PA_TAG_TIMEVAL;
- tmp = htonl(tv->tv_sec);
+ tmp = htonl((uint32_t) tv->tv_sec);
memcpy(t->data+t->length+1, &tmp, 4);
- tmp = htonl(tv->tv_usec);
+ tmp = htonl((uint32_t) tv->tv_usec);
memcpy(t->data+t->length+5, &tmp, 4);
t->length += 9;
}
@@ -228,7 +228,7 @@ void pa_tagstruct_put_channel_map(pa_tagstruct *t, const pa_channel_map *map) {
unsigned i;
pa_assert(t);
- extend(t, 2 + map->channels);
+ extend(t, 2 + (size_t) map->channels);
t->data[t->length++] = PA_TAG_CHANNEL_MAP;
t->data[t->length++] = map->channels;
@@ -254,6 +254,32 @@ void pa_tagstruct_put_cvolume(pa_tagstruct *t, const pa_cvolume *cvolume) {
}
}
+void pa_tagstruct_put_proplist(pa_tagstruct *t, pa_proplist *p) {
+ void *state = NULL;
+ pa_assert(t);
+ pa_assert(p);
+
+ extend(t, 1);
+
+ t->data[t->length++] = PA_TAG_PROPLIST;
+
+ for (;;) {
+ const char *k;
+ const void *d;
+ size_t l;
+
+ if (!(k = pa_proplist_iterate(p, &state)))
+ break;
+
+ pa_tagstruct_puts(t, k);
+ pa_assert_se(pa_proplist_get(p, k, &d, &l) >= 0);
+ pa_tagstruct_putu32(t, (uint32_t) l);
+ pa_tagstruct_put_arbitrary(t, d, l);
+ }
+
+ pa_tagstruct_puts(t, NULL);
+}
+
int pa_tagstruct_gets(pa_tagstruct*t, const char **s) {
int error = 0;
size_t n;
@@ -379,7 +405,7 @@ const uint8_t* pa_tagstruct_data(pa_tagstruct*t, size_t *l) {
return t->data;
}
-int pa_tagstruct_get_boolean(pa_tagstruct*t, int *b) {
+int pa_tagstruct_get_boolean(pa_tagstruct*t, pa_bool_t *b) {
pa_assert(t);
pa_assert(b);
@@ -387,9 +413,9 @@ int pa_tagstruct_get_boolean(pa_tagstruct*t, int *b) {
return -1;
if (t->data[t->rindex] == PA_TAG_BOOLEAN_TRUE)
- *b = 1;
+ *b = TRUE;
else if (t->data[t->rindex] == PA_TAG_BOOLEAN_FALSE)
- *b = 0;
+ *b = FALSE;
else
return -1;
@@ -409,9 +435,9 @@ int pa_tagstruct_get_timeval(pa_tagstruct*t, struct timeval *tv) {
return -1;
memcpy(&tv->tv_sec, t->data+t->rindex+1, 4);
- tv->tv_sec = ntohl(tv->tv_sec);
+ tv->tv_sec = (time_t) ntohl((uint32_t) tv->tv_sec);
memcpy(&tv->tv_usec, t->data+t->rindex+5, 4);
- tv->tv_usec = ntohl(tv->tv_usec);
+ tv->tv_usec = (suseconds_t) ntohl((uint32_t) tv->tv_usec);
t->rindex += 9;
return 0;
}
@@ -497,7 +523,7 @@ int pa_tagstruct_get_channel_map(pa_tagstruct *t, pa_channel_map *map) {
for (i = 0; i < map->channels; i ++)
map->map[i] = (int8_t) t->data[t->rindex + 2 + i];
- t->rindex += 2 + map->channels;
+ t->rindex += 2 + (size_t) map->channels;
return 0;
}
@@ -529,6 +555,52 @@ int pa_tagstruct_get_cvolume(pa_tagstruct *t, pa_cvolume *cvolume) {
return 0;
}
+int pa_tagstruct_get_proplist(pa_tagstruct *t, pa_proplist *p) {
+ size_t saved_rindex;
+
+ pa_assert(t);
+ pa_assert(p);
+
+ if (t->rindex+1 > t->length)
+ return -1;
+
+ if (t->data[t->rindex] != PA_TAG_PROPLIST)
+ return -1;
+
+ saved_rindex = t->rindex;
+ t->rindex++;
+
+ for (;;) {
+ const char *k;
+ const void *d;
+ uint32_t length;
+
+ if (pa_tagstruct_gets(t, &k) < 0)
+ goto fail;
+
+ if (!k)
+ break;
+
+ if (pa_tagstruct_getu32(t, &length) < 0)
+ goto fail;
+
+ if (length > MAX_TAG_SIZE)
+ goto fail;
+
+ if (pa_tagstruct_get_arbitrary(t, &d, length) < 0)
+ goto fail;
+
+ if (pa_proplist_set(p, k, d, length) < 0)
+ goto fail;
+ }
+
+ return 0;
+
+fail:
+ t->rindex = saved_rindex;
+ return -1;
+}
+
void pa_tagstruct_put(pa_tagstruct *t, ...) {
va_list va;
pa_assert(t);
@@ -591,6 +663,10 @@ void pa_tagstruct_put(pa_tagstruct *t, ...) {
pa_tagstruct_put_cvolume(t, va_arg(va, pa_cvolume *));
break;
+ case PA_TAG_PROPLIST:
+ pa_tagstruct_put_proplist(t, va_arg(va, pa_proplist *));
+ break;
+
default:
pa_assert_not_reached();
}
@@ -643,7 +719,7 @@ int pa_tagstruct_get(pa_tagstruct *t, ...) {
case PA_TAG_BOOLEAN_TRUE:
case PA_TAG_BOOLEAN_FALSE:
- ret = pa_tagstruct_get_boolean(t, va_arg(va, int*));
+ ret = pa_tagstruct_get_boolean(t, va_arg(va, pa_bool_t*));
break;
case PA_TAG_TIMEVAL:
@@ -662,6 +738,10 @@ int pa_tagstruct_get(pa_tagstruct *t, ...) {
ret = pa_tagstruct_get_cvolume(t, va_arg(va, pa_cvolume *));
break;
+ case PA_TAG_PROPLIST:
+ ret = pa_tagstruct_get_proplist(t, va_arg(va, pa_proplist *));
+ break;
+
default:
pa_assert_not_reached();
}
diff --git a/src/pulsecore/tagstruct.h b/src/pulsecore/tagstruct.h
index 7739a4c..e7d0705 100644
--- a/src/pulsecore/tagstruct.h
+++ b/src/pulsecore/tagstruct.h
@@ -1,8 +1,6 @@
#ifndef footagstructhfoo
#define footagstructhfoo
-/* $Id: tagstruct.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -32,6 +30,10 @@
#include <pulse/sample.h>
#include <pulse/channelmap.h>
#include <pulse/volume.h>
+#include <pulse/proplist.h>
+#include <pulse/gccmacro.h>
+
+#include <pulsecore/macro.h>
typedef struct pa_tagstruct pa_tagstruct;
@@ -51,7 +53,8 @@ enum {
PA_TAG_TIMEVAL = 'T',
PA_TAG_USEC = 'U' /* 64bit unsigned */,
PA_TAG_CHANNEL_MAP = 'm',
- PA_TAG_CVOLUME = 'v'
+ PA_TAG_CVOLUME = 'v',
+ PA_TAG_PROPLIST = 'P'
};
pa_tagstruct *pa_tagstruct_new(const uint8_t* data, size_t length);
@@ -70,11 +73,12 @@ void pa_tagstruct_putu64(pa_tagstruct*t, uint64_t i);
void pa_tagstruct_puts64(pa_tagstruct*t, int64_t i);
void pa_tagstruct_put_sample_spec(pa_tagstruct *t, const pa_sample_spec *ss);
void pa_tagstruct_put_arbitrary(pa_tagstruct*t, const void *p, size_t length);
-void pa_tagstruct_put_boolean(pa_tagstruct*t, int b);
+void pa_tagstruct_put_boolean(pa_tagstruct*t, pa_bool_t b);
void pa_tagstruct_put_timeval(pa_tagstruct*t, const struct timeval *tv);
void pa_tagstruct_put_usec(pa_tagstruct*t, pa_usec_t u);
void pa_tagstruct_put_channel_map(pa_tagstruct *t, const pa_channel_map *map);
void pa_tagstruct_put_cvolume(pa_tagstruct *t, const pa_cvolume *cvolume);
+void pa_tagstruct_put_proplist(pa_tagstruct *t, pa_proplist *p);
int pa_tagstruct_get(pa_tagstruct *t, ...);
@@ -85,11 +89,12 @@ int pa_tagstruct_getu64(pa_tagstruct*t, uint64_t *i);
int pa_tagstruct_gets64(pa_tagstruct*t, int64_t *i);
int pa_tagstruct_get_sample_spec(pa_tagstruct *t, pa_sample_spec *ss);
int pa_tagstruct_get_arbitrary(pa_tagstruct *t, const void **p, size_t length);
-int pa_tagstruct_get_boolean(pa_tagstruct *t, int *b);
+int pa_tagstruct_get_boolean(pa_tagstruct *t, pa_bool_t *b);
int pa_tagstruct_get_timeval(pa_tagstruct*t, struct timeval *tv);
int pa_tagstruct_get_usec(pa_tagstruct*t, pa_usec_t *u);
int pa_tagstruct_get_channel_map(pa_tagstruct *t, pa_channel_map *map);
int pa_tagstruct_get_cvolume(pa_tagstruct *t, pa_cvolume *v);
+int pa_tagstruct_get_proplist(pa_tagstruct *t, pa_proplist *p);
#endif
diff --git a/src/pulsecore/thread-mq.c b/src/pulsecore/thread-mq.c
index 9b87942..34f92a7 100644
--- a/src/pulsecore/thread-mq.c
+++ b/src/pulsecore/thread-mq.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -43,15 +41,15 @@
PA_STATIC_TLS_DECLARE_NO_FREE(thread_mq);
-static void asyncmsgq_cb(pa_mainloop_api*api, pa_io_event* e, int fd, pa_io_event_flags_t events, void *userdata) {
+static void asyncmsgq_read_cb(pa_mainloop_api*api, pa_io_event* e, int fd, pa_io_event_flags_t events, void *userdata) {
pa_thread_mq *q = userdata;
pa_asyncmsgq *aq;
- pa_assert(pa_asyncmsgq_get_fd(q->outq) == fd);
+ pa_assert(pa_asyncmsgq_read_fd(q->outq) == fd);
pa_assert(events == PA_IO_EVENT_INPUT);
pa_asyncmsgq_ref(aq = q->outq);
- pa_asyncmsgq_after_poll(aq);
+ pa_asyncmsgq_write_after_poll(aq);
for (;;) {
pa_msgobject *object;
@@ -68,14 +66,24 @@ static void asyncmsgq_cb(pa_mainloop_api*api, pa_io_event* e, int fd, pa_io_even
pa_asyncmsgq_done(aq, ret);
}
- if (pa_asyncmsgq_before_poll(aq) == 0)
+ if (pa_asyncmsgq_read_before_poll(aq) == 0)
break;
}
pa_asyncmsgq_unref(aq);
}
-void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop) {
+static void asyncmsgq_write_cb(pa_mainloop_api*api, pa_io_event* e, int fd, pa_io_event_flags_t events, void *userdata) {
+ pa_thread_mq *q = userdata;
+
+ pa_assert(pa_asyncmsgq_write_fd(q->inq) == fd);
+ pa_assert(events == PA_IO_EVENT_INPUT);
+
+ pa_asyncmsgq_write_after_poll(q->inq);
+ pa_asyncmsgq_write_before_poll(q->inq);
+}
+
+void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop, pa_rtpoll *rtpoll) {
pa_assert(q);
pa_assert(mainloop);
@@ -83,15 +91,22 @@ void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop) {
pa_assert_se(q->inq = pa_asyncmsgq_new(0));
pa_assert_se(q->outq = pa_asyncmsgq_new(0));
- pa_assert_se(pa_asyncmsgq_before_poll(q->outq) == 0);
- pa_assert_se(q->io_event = mainloop->io_new(mainloop, pa_asyncmsgq_get_fd(q->outq), PA_IO_EVENT_INPUT, asyncmsgq_cb, q));
+ pa_assert_se(pa_asyncmsgq_read_before_poll(q->outq) == 0);
+ pa_assert_se(q->read_event = mainloop->io_new(mainloop, pa_asyncmsgq_read_fd(q->outq), PA_IO_EVENT_INPUT, asyncmsgq_read_cb, q));
+
+ pa_asyncmsgq_write_before_poll(q->inq);
+ pa_assert_se(q->write_event = mainloop->io_new(mainloop, pa_asyncmsgq_write_fd(q->inq), PA_IO_EVENT_INPUT, asyncmsgq_write_cb, q));
+
+ pa_rtpoll_item_new_asyncmsgq_read(rtpoll, PA_RTPOLL_EARLY, q->inq);
+ pa_rtpoll_item_new_asyncmsgq_write(rtpoll, PA_RTPOLL_LATE, q->outq);
}
void pa_thread_mq_done(pa_thread_mq *q) {
pa_assert(q);
- q->mainloop->io_free(q->io_event);
- q->io_event = NULL;
+ q->mainloop->io_free(q->read_event);
+ q->mainloop->io_free(q->write_event);
+ q->read_event = q->write_event = NULL;
pa_asyncmsgq_unref(q->inq);
pa_asyncmsgq_unref(q->outq);
diff --git a/src/pulsecore/thread-mq.h b/src/pulsecore/thread-mq.h
index 13b6e01..3b5e0e7 100644
--- a/src/pulsecore/thread-mq.h
+++ b/src/pulsecore/thread-mq.h
@@ -1,8 +1,6 @@
#ifndef foopulsethreadmqhfoo
#define foopulsethreadmqhfoo
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -26,6 +24,7 @@
#include <pulse/mainloop-api.h>
#include <pulsecore/asyncmsgq.h>
+#include <pulsecore/rtpoll.h>
/* Two way communication between a thread and a mainloop. Before the
* thread is started a pa_pthread_mq should be initialized and than
@@ -34,10 +33,10 @@
typedef struct pa_thread_mq {
pa_mainloop_api *mainloop;
pa_asyncmsgq *inq, *outq;
- pa_io_event *io_event;
+ pa_io_event *read_event, *write_event;
} pa_thread_mq;
-void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop);
+void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop, pa_rtpoll *rtpoll);
void pa_thread_mq_done(pa_thread_mq *q);
/* Install the specified pa_thread_mq object for the current thread */
diff --git a/src/pulsecore/thread-posix.c b/src/pulsecore/thread-posix.c
index 78cfd30..ade398f 100644
--- a/src/pulsecore/thread-posix.c
+++ b/src/pulsecore/thread-posix.c
@@ -1,5 +1,3 @@
-/* $Id: thread-posix.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -43,6 +41,7 @@ struct pa_thread {
pa_thread_func_t thread_func;
void *userdata;
pa_atomic_t running;
+ pa_bool_t joined;
};
struct pa_tls {
@@ -84,6 +83,7 @@ pa_thread* pa_thread_new(pa_thread_func_t thread_func, void *userdata) {
t = pa_xnew(pa_thread, 1);
t->thread_func = thread_func;
t->userdata = userdata;
+ t->joined = FALSE;
pa_atomic_store(&t->running, 0);
if (pthread_create(&t->id, NULL, internal_thread_func, t) < 0) {
@@ -117,7 +117,12 @@ void pa_thread_free(pa_thread *t) {
int pa_thread_join(pa_thread *t) {
pa_assert(t);
+ pa_assert(t->thread_func);
+ if (t->joined)
+ return -1;
+
+ t->joined = TRUE;
return pthread_join(t->id, NULL);
}
@@ -134,6 +139,7 @@ pa_thread* pa_thread_self(void) {
t->id = pthread_self();
t->thread_func = NULL;
t->userdata = NULL;
+ t->joined = TRUE;
pa_atomic_store(&t->running, 2);
PA_STATIC_TLS_SET(current_thread, t);
@@ -194,4 +200,3 @@ void *pa_tls_set(pa_tls *t, void *userdata) {
pa_assert_se(pthread_setspecific(t->key, userdata) == 0);
return r;
}
-
diff --git a/src/pulsecore/thread-win32.c b/src/pulsecore/thread-win32.c
index 0163be1..c40d334 100644
--- a/src/pulsecore/thread-win32.c
+++ b/src/pulsecore/thread-win32.c
@@ -1,5 +1,3 @@
-/* $Id: thread-win32.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/thread.h b/src/pulsecore/thread.h
index 060d8ae..eabe9ba 100644
--- a/src/pulsecore/thread.h
+++ b/src/pulsecore/thread.h
@@ -1,8 +1,6 @@
#ifndef foopulsethreadhfoo
#define foopulsethreadhfoo
-/* $Id: thread.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -27,6 +25,7 @@
#include <pulse/def.h>
#include <pulsecore/once.h>
+#include <pulsecore/core-util.h>
#ifndef PACKAGE
#error "Please include config.h before including this file!"
@@ -71,6 +70,8 @@ void *pa_tls_set(pa_tls *t, void *userdata);
static void name##_tls_destructor(void) PA_GCC_DESTRUCTOR; \
static void name##_tls_destructor(void) { \
static void (*_free_cb)(void*) = free_cb; \
+ if (!pa_in_valgrind()) \
+ return; \
if (!name##_tls.tls) \
return; \
if (_free_cb) { \
@@ -88,7 +89,7 @@ void *pa_tls_set(pa_tls *t, void *userdata);
} \
struct __stupid_useless_struct_to_allow_trailing_semicolon
-#ifdef HAVE_TLS_BUILTIN
+#ifdef SUPPORT_TLS___THREAD
/* An optimized version of the above that requires no dynamic
* allocation if the compiler supports __thread */
#define PA_STATIC_TLS_DECLARE_NO_FREE(name) \
diff --git a/src/pulsecore/time-smoother.c b/src/pulsecore/time-smoother.c
index 1ef4bb1..6a2ffaa 100644
--- a/src/pulsecore/time-smoother.c
+++ b/src/pulsecore/time-smoother.c
@@ -1,5 +1,3 @@
-/* $Id: time-smoother.c 1977 2007-10-29 16:38:57Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -34,7 +32,7 @@
#include "time-smoother.h"
-#define HISTORY_MAX 50
+#define HISTORY_MAX 64
/*
* Implementation of a time smoothing algorithm to synchronize remote
@@ -61,7 +59,6 @@
struct pa_smoother {
pa_usec_t adjust_time, history_time;
- pa_bool_t monotonic;
pa_usec_t time_offset;
@@ -70,27 +67,34 @@ struct pa_smoother {
pa_usec_t ex, ey; /* Point e, which we estimated before and need to smooth to */
double de; /* Gradient we estimated for point e */
+ pa_usec_t ry; /* The original y value for ex */
/* History of last measurements */
pa_usec_t history_x[HISTORY_MAX], history_y[HISTORY_MAX];
unsigned history_idx, n_history;
/* To even out for monotonicity */
- pa_usec_t last_y;
+ pa_usec_t last_y, last_x;
/* Cached parameters for our interpolation polynomial y=ax^3+b^2+cx */
double a, b, c;
pa_bool_t abc_valid;
- pa_bool_t paused;
+ pa_bool_t monotonic:1;
+ pa_bool_t paused:1;
+
pa_usec_t pause_time;
+
+ unsigned min_history;
};
-pa_smoother* pa_smoother_new(pa_usec_t adjust_time, pa_usec_t history_time, pa_bool_t monotonic) {
+pa_smoother* pa_smoother_new(pa_usec_t adjust_time, pa_usec_t history_time, pa_bool_t monotonic, unsigned min_history) {
pa_smoother *s;
pa_assert(adjust_time > 0);
pa_assert(history_time > 0);
+ pa_assert(min_history >= 2);
+ pa_assert(min_history <= HISTORY_MAX);
s = pa_xnew(pa_smoother, 1);
s->adjust_time = adjust_time;
@@ -101,18 +105,20 @@ pa_smoother* pa_smoother_new(pa_usec_t adjust_time, pa_usec_t history_time, pa_b
s->px = s->py = 0;
s->dp = 1;
- s->ex = s->ey = 0;
+ s->ex = s->ey = s->ry = 0;
s->de = 1;
s->history_idx = 0;
s->n_history = 0;
- s->last_y = 0;
+ s->last_y = s->last_x = 0;
s->abc_valid = FALSE;
s->paused = FALSE;
+ s->min_history = min_history;
+
return s;
}
@@ -122,39 +128,58 @@ void pa_smoother_free(pa_smoother* s) {
pa_xfree(s);
}
+#define REDUCE(x) \
+ do { \
+ x = (x) % HISTORY_MAX; \
+ } while(FALSE)
+
+#define REDUCE_INC(x) \
+ do { \
+ x = ((x)+1) % HISTORY_MAX; \
+ } while(FALSE)
+
+
static void drop_old(pa_smoother *s, pa_usec_t x) {
- unsigned j;
- /* First drop items from history which are too old, but make sure
- * to always keep two entries in the history */
+ /* Drop items from history which are too old, but make sure to
+ * always keep min_history in the history */
- for (j = s->n_history; j > 2; j--) {
+ while (s->n_history > s->min_history) {
- if (s->history_x[s->history_idx] + s->history_time >= x) {
+ if (s->history_x[s->history_idx] + s->history_time >= x)
/* This item is still valid, and thus all following ones
* are too, so let's quit this loop */
break;
- }
/* Item is too old, let's drop it */
- s->history_idx ++;
- while (s->history_idx >= HISTORY_MAX)
- s->history_idx -= HISTORY_MAX;
+ REDUCE_INC(s->history_idx);
s->n_history --;
}
}
static void add_to_history(pa_smoother *s, pa_usec_t x, pa_usec_t y) {
- unsigned j;
+ unsigned j, i;
pa_assert(s);
+ /* First try to update an existing history entry */
+ i = s->history_idx;
+ for (j = s->n_history; j > 0; j--) {
+
+ if (s->history_x[i] == x) {
+ s->history_y[i] = y;
+ return;
+ }
+
+ REDUCE_INC(i);
+ }
+
+ /* Drop old entries */
drop_old(s, x);
/* Calculate position for new entry */
j = s->history_idx + s->n_history;
- while (j >= HISTORY_MAX)
- j -= HISTORY_MAX;
+ REDUCE(j);
/* Fill in entry */
s->history_x[j] = x;
@@ -164,8 +189,9 @@ static void add_to_history(pa_smoother *s, pa_usec_t x, pa_usec_t y) {
s->n_history ++;
/* And make sure we don't store more entries than fit in */
- if (s->n_history >= HISTORY_MAX) {
+ if (s->n_history > HISTORY_MAX) {
s->history_idx += s->n_history - HISTORY_MAX;
+ REDUCE(s->history_idx);
s->n_history = HISTORY_MAX;
}
}
@@ -175,25 +201,22 @@ static double avg_gradient(pa_smoother *s, pa_usec_t x) {
int64_t ax = 0, ay = 0, k, t;
double r;
- drop_old(s, x);
+ /* Too few measurements, assume gradient of 1 */
+ if (s->n_history < s->min_history)
+ return 1;
/* First, calculate average of all measurements */
i = s->history_idx;
for (j = s->n_history; j > 0; j--) {
- ax += s->history_x[i];
- ay += s->history_y[i];
+ ax += (int64_t) s->history_x[i];
+ ay += (int64_t) s->history_y[i];
c++;
- i++;
- while (i >= HISTORY_MAX)
- i -= HISTORY_MAX;
+ REDUCE_INC(i);
}
- /* Too few measurements, assume gradient of 1 */
- if (c < 2)
- return 1;
-
+ pa_assert(c >= s->min_history);
ax /= c;
ay /= c;
@@ -210,14 +233,45 @@ static double avg_gradient(pa_smoother *s, pa_usec_t x) {
k += dx*dy;
t += dx*dx;
- i++;
- while (i >= HISTORY_MAX)
- i -= HISTORY_MAX;
+ REDUCE_INC(i);
}
- r = (double) k / t;
+ r = (double) k / (double) t;
+
+ return (s->monotonic && r < 0) ? 0 : r;
+}
+
+static void calc_abc(pa_smoother *s) {
+ pa_usec_t ex, ey, px, py;
+ int64_t kx, ky;
+ double de, dp;
+
+ pa_assert(s);
+
+ if (s->abc_valid)
+ return;
+
+ /* We have two points: (ex|ey) and (px|py) with two gradients at
+ * these points de and dp. We do a polynomial
+ * interpolation of degree 3 with these 6 values */
+
+ ex = s->ex; ey = s->ey;
+ px = s->px; py = s->py;
+ de = s->de; dp = s->dp;
- return s->monotonic && r < 0 ? 0 : r;
+ pa_assert(ex < px);
+
+ /* To increase the dynamic range and symplify calculation, we
+ * move these values to the origin */
+ kx = (int64_t) px - (int64_t) ex;
+ ky = (int64_t) py - (int64_t) ey;
+
+ /* Calculate a, b, c for y=ax^3+bx^2+cx */
+ s->c = de;
+ s->b = (((double) (3*ky)/ (double) kx - dp - (double) (2*de))) / (double) kx;
+ s->a = (dp/(double) kx - 2*s->b - de/(double) kx) / (double) (3*kx);
+
+ s->abc_valid = TRUE;
}
static void estimate(pa_smoother *s, pa_usec_t x, pa_usec_t *y, double *deriv) {
@@ -230,7 +284,7 @@ static void estimate(pa_smoother *s, pa_usec_t x, pa_usec_t *y, double *deriv) {
/* The requested point is right of the point where we wanted
* to be on track again, thus just linearly estimate */
- t = (int64_t) s->py + (int64_t) (s->dp * (x - s->px));
+ t = (int64_t) s->py + (int64_t) llrint(s->dp * (double) (x - s->px));
if (t < 0)
t = 0;
@@ -241,60 +295,34 @@ static void estimate(pa_smoother *s, pa_usec_t x, pa_usec_t *y, double *deriv) {
*deriv = s->dp;
} else {
+ double tx, ty;
- if (!s->abc_valid) {
- pa_usec_t ex, ey, px, py;
- int64_t kx, ky;
- double de, dp;
-
- /* Ok, we're not yet on track, thus let's interpolate, and
- * make sure that the first derivative is smooth */
-
- /* We have two points: (ex|ey) and (px|py) with two gradients
- * at these points de and dp. We do a polynomial interpolation
- * of degree 3 with these 6 values */
+ /* Ok, we're not yet on track, thus let's interpolate, and
+ * make sure that the first derivative is smooth */
- ex = s->ex; ey = s->ey;
- px = s->px; py = s->py;
- de = s->de; dp = s->dp;
+ calc_abc(s);
- pa_assert(ex < px);
-
- /* To increase the dynamic range and symplify calculation, we
- * move these values to the origin */
- kx = (int64_t) px - (int64_t) ex;
- ky = (int64_t) py - (int64_t) ey;
-
- /* Calculate a, b, c for y=ax^3+b^2+cx */
- s->c = de;
- s->b = (((double) (3*ky)/kx - dp - 2*de)) / kx;
- s->a = (dp/kx - 2*s->b - de/kx) / (3*kx);
-
- s->abc_valid = TRUE;
- }
+ tx = (double) x;
/* Move to origin */
- x -= s->ex;
+ tx -= (double) s->ex;
/* Horner scheme */
- *y = (pa_usec_t) ((double) x * (s->c + (double) x * (s->b + (double) x * s->a)));
+ ty = (tx * (s->c + tx * (s->b + tx * s->a)));
/* Move back from origin */
- *y += s->ey;
+ ty += (double) s->ey;
+
+ *y = ty >= 0 ? (pa_usec_t) lrint(ty) : 0;
/* Horner scheme */
if (deriv)
- *deriv = s->c + ((double) x * (s->b*2 + (double) x * s->a*3));
+ *deriv = s->c + (tx * (s->b*2 + tx * s->a*3));
}
/* Guarantee monotonicity */
if (s->monotonic) {
- if (*y < s->last_y)
- *y = s->last_y;
- else
- s->last_y = *y;
-
if (deriv && *deriv < 0)
*deriv = 0;
}
@@ -303,23 +331,26 @@ static void estimate(pa_smoother *s, pa_usec_t x, pa_usec_t *y, double *deriv) {
void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y) {
pa_usec_t ney;
double nde;
+ pa_bool_t is_new;
pa_assert(s);
- pa_assert(x >= s->time_offset);
/* Fix up x value */
if (s->paused)
x = s->pause_time;
- pa_assert(x >= s->time_offset);
- x -= s->time_offset;
+ x = PA_LIKELY(x >= s->time_offset) ? x - s->time_offset : 0;
- pa_assert(x >= s->ex);
+ is_new = x >= s->ex;
- /* First, we calculate the position we'd estimate for x, so that
- * we can adjust our position smoothly from this one */
- estimate(s, x, &ney, &nde);
- s->ex = x; s->ey = ney; s->de = nde;
+ if (is_new) {
+ /* First, we calculate the position we'd estimate for x, so that
+ * we can adjust our position smoothly from this one */
+ estimate(s, x, &ney, &nde);
+ s->ex = x; s->ey = ney; s->de = nde;
+
+ s->ry = y;
+ }
/* Then, we add the new measurement to our history */
add_to_history(s, x, y);
@@ -328,28 +359,44 @@ void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y) {
s->dp = avg_gradient(s, x);
/* And calculate when we want to be on track again */
- s->px = x + s->adjust_time;
- s->py = y + s->dp *s->adjust_time;
+ s->px = s->ex + s->adjust_time;
+ s->py = s->ry + (pa_usec_t) lrint(s->dp * (double) s->adjust_time);
s->abc_valid = FALSE;
+
+/* pa_log_debug("put(%llu | %llu) = %llu", (unsigned long long) (x + s->time_offset), (unsigned long long) x, (unsigned long long) y); */
}
pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x) {
pa_usec_t y;
pa_assert(s);
- pa_assert(x >= s->time_offset);
/* Fix up x value */
if (s->paused)
x = s->pause_time;
- pa_assert(x >= s->time_offset);
- x -= s->time_offset;
+ x = PA_LIKELY(x >= s->time_offset) ? x - s->time_offset : 0;
- pa_assert(x >= s->ex);
+ if (s->monotonic)
+ if (x <= s->last_x)
+ x = s->last_x;
estimate(s, x, &y, NULL);
+
+ if (s->monotonic) {
+
+ /* Make sure the querier doesn't jump forth and back. */
+ s->last_x = x;
+
+ if (y < s->last_y)
+ y = s->last_y;
+ else
+ s->last_y = y;
+ }
+
+/* pa_log_debug("get(%llu | %llu) = %llu", (unsigned long long) (x + s->time_offset), (unsigned long long) x, (unsigned long long) y); */
+
return y;
}
@@ -357,6 +404,8 @@ void pa_smoother_set_time_offset(pa_smoother *s, pa_usec_t offset) {
pa_assert(s);
s->time_offset = offset;
+
+/* pa_log_debug("offset(%llu)", (unsigned long long) offset); */
}
void pa_smoother_pause(pa_smoother *s, pa_usec_t x) {
@@ -365,6 +414,8 @@ void pa_smoother_pause(pa_smoother *s, pa_usec_t x) {
if (s->paused)
return;
+/* pa_log_debug("pause(%llu)", (unsigned long long) x); */
+
s->paused = TRUE;
s->pause_time = x;
}
@@ -375,8 +426,42 @@ void pa_smoother_resume(pa_smoother *s, pa_usec_t x) {
if (!s->paused)
return;
- pa_assert(x >= s->pause_time);
+ if (x < s->pause_time)
+ x = s->pause_time;
+
+/* pa_log_debug("resume(%llu)", (unsigned long long) x); */
s->paused = FALSE;
s->time_offset += x - s->pause_time;
}
+
+pa_usec_t pa_smoother_translate(pa_smoother *s, pa_usec_t x, pa_usec_t y_delay) {
+ pa_usec_t ney;
+ double nde;
+
+ pa_assert(s);
+
+ /* Fix up x value */
+ if (s->paused)
+ x = s->pause_time;
+
+ x = PA_LIKELY(x >= s->time_offset) ? x - s->time_offset : 0;
+
+ estimate(s, x, &ney, &nde);
+
+ /* Play safe and take the larger gradient, so that we wakeup
+ * earlier when this is used for sleeping */
+ if (s->dp > nde)
+ nde = s->dp;
+
+/* pa_log_debug("translate(%llu) = %llu (%0.2f)", (unsigned long long) y_delay, (unsigned long long) ((double) y_delay / nde), nde); */
+
+ return (pa_usec_t) lrint((double) y_delay / nde);
+}
+
+void pa_smoother_reset(pa_smoother *s) {
+ pa_assert(s);
+
+ s->n_history = 0;
+ s->abc_valid = FALSE;
+}
diff --git a/src/pulsecore/time-smoother.h b/src/pulsecore/time-smoother.h
index ec6a018..2051e64 100644
--- a/src/pulsecore/time-smoother.h
+++ b/src/pulsecore/time-smoother.h
@@ -1,8 +1,6 @@
#ifndef foopulsetimesmootherhfoo
#define foopulsetimesmootherhfoo
-/* $Id: time-smoother.h 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,15 +27,23 @@
typedef struct pa_smoother pa_smoother;
-pa_smoother* pa_smoother_new(pa_usec_t adjust_time, pa_usec_t history_time, pa_bool_t monotonic);
+pa_smoother* pa_smoother_new(pa_usec_t x_adjust_time, pa_usec_t x_history_time, pa_bool_t monotonic, unsigned min_history);
void pa_smoother_free(pa_smoother* s);
+/* Adds a new value to our dataset. x = local/system time, y = remote time */
void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y);
+
+/* Returns an interpolated value based on the dataset. x = local/system time, return value = remote time */
pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x);
-void pa_smoother_set_time_offset(pa_smoother *s, pa_usec_t offset);
+/* Translates a time span from the remote time domain to the local one. x = local/system time when to estimate, y_delay = remote time span */
+pa_usec_t pa_smoother_translate(pa_smoother *s, pa_usec_t x, pa_usec_t y_delay);
+
+void pa_smoother_set_time_offset(pa_smoother *s, pa_usec_t x_offset);
void pa_smoother_pause(pa_smoother *s, pa_usec_t x);
void pa_smoother_resume(pa_smoother *s, pa_usec_t x);
+void pa_smoother_reset(pa_smoother *s);
+
#endif
diff --git a/src/pulsecore/tokenizer.c b/src/pulsecore/tokenizer.c
index bea0fdc..07a9f3a 100644
--- a/src/pulsecore/tokenizer.c
+++ b/src/pulsecore/tokenizer.c
@@ -1,5 +1,3 @@
-/* $Id: tokenizer.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -29,14 +27,14 @@
#include <stdlib.h>
#include <pulse/xmalloc.h>
+#include <pulse/gccmacro.h>
#include <pulsecore/dynarray.h>
-#include <pulsecore/gccmacro.h>
#include <pulsecore/macro.h>
#include "tokenizer.h"
-static void token_free(void *p, PA_GCC_UNUSED void *userdata) {
+static void token_free(void *p, void *userdata) {
pa_xfree(p);
}
diff --git a/src/pulsecore/tokenizer.h b/src/pulsecore/tokenizer.h
index f1d3a95..d51cd73 100644
--- a/src/pulsecore/tokenizer.h
+++ b/src/pulsecore/tokenizer.h
@@ -1,8 +1,6 @@
#ifndef footokenizerhfoo
#define footokenizerhfoo
-/* $Id: tokenizer.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c
index 31343af..7f91ba3 100644
--- a/src/pulsecore/x11prop.c
+++ b/src/pulsecore/x11prop.c
@@ -1,5 +1,3 @@
-/* $Id: x11prop.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -34,7 +32,7 @@
void pa_x11_set_prop(Display *d, const char *name, const char *data) {
Atom a = XInternAtom(d, name, False);
- XChangeProperty(d, RootWindow(d, 0), a, XA_STRING, 8, PropModeReplace, (const unsigned char*) data, strlen(data)+1);
+ XChangeProperty(d, RootWindow(d, 0), a, XA_STRING, 8, PropModeReplace, (const unsigned char*) data, (int) (strlen(data)+1));
}
void pa_x11_del_prop(Display *d, const char *name) {
@@ -51,7 +49,7 @@ char* pa_x11_get_prop(Display *d, const char *name, char *p, size_t l) {
char *ret = NULL;
Atom a = XInternAtom(d, name, False);
- if (XGetWindowProperty(d, RootWindow(d, 0), a, 0, (l+2)/4, False, XA_STRING, &actual_type, &actual_format, &nitems, &nbytes_after, &prop) != Success)
+ if (XGetWindowProperty(d, RootWindow(d, 0), a, 0, (long) ((l+2)/4), False, XA_STRING, &actual_type, &actual_format, &nitems, &nbytes_after, &prop) != Success)
goto finish;
if (actual_type != XA_STRING)
diff --git a/src/pulsecore/x11prop.h b/src/pulsecore/x11prop.h
index c965345..c5998d3 100644
--- a/src/pulsecore/x11prop.h
+++ b/src/pulsecore/x11prop.h
@@ -1,8 +1,6 @@
#ifndef foox11prophfoo
#define foox11prophfoo
-/* $Id: x11prop.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/pulsecore/x11wrap.c b/src/pulsecore/x11wrap.c
index 79b8aa7..332ebb2 100644
--- a/src/pulsecore/x11wrap.c
+++ b/src/pulsecore/x11wrap.c
@@ -1,5 +1,3 @@
-/* $Id: x11wrap.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -31,7 +29,7 @@
#include <pulsecore/llist.h>
#include <pulsecore/log.h>
-#include <pulsecore/props.h>
+#include <pulsecore/shared.h>
#include <pulsecore/core-util.h>
#include <pulsecore/macro.h>
@@ -63,7 +61,8 @@ struct pa_x11_wrapper {
struct pa_x11_client {
PA_LLIST_FIELDS(pa_x11_client);
pa_x11_wrapper *wrapper;
- int (*callback)(pa_x11_wrapper *w, XEvent *e, void *userdata);
+ pa_x11_event_cb_t event_cb;
+ pa_x11_kill_cb_t kill_cb;
void *userdata;
};
@@ -72,21 +71,27 @@ static void work(pa_x11_wrapper *w) {
pa_assert(w);
pa_assert(PA_REFCNT_VALUE(w) >= 1);
+ pa_x11_wrapper_ref(w);
+
while (XPending(w->display)) {
- pa_x11_client *c;
+ pa_x11_client *c, *n;
XEvent e;
XNextEvent(w->display, &e);
- for (c = w->clients; c; c = c->next) {
- pa_assert(c->callback);
- if (c->callback(w, &e, c->userdata) != 0)
- break;
+ for (c = w->clients; c; c = n) {
+ n = c->next;
+
+ if (c->event_cb)
+ if (c->event_cb(w, &e, c->userdata) != 0)
+ break;
}
}
+
+ pa_x11_wrapper_unref(w);
}
/* IO notification event for the X11 display connection */
-static void display_io_event(pa_mainloop_api *m, pa_io_event *e, int fd, PA_GCC_UNUSED pa_io_event_flags_t f, void *userdata) {
+static void display_io_event(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event_flags_t f, void *userdata) {
pa_x11_wrapper *w = userdata;
pa_assert(m);
@@ -113,7 +118,7 @@ static void defer_event(pa_mainloop_api *m, pa_defer_event *e, void *userdata) {
}
/* IO notification event for X11 internal connections */
-static void internal_io_event(pa_mainloop_api *m, pa_io_event *e, int fd, PA_GCC_UNUSED pa_io_event_flags_t f, void *userdata) {
+static void internal_io_event(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event_flags_t f, void *userdata) {
pa_x11_wrapper *w = userdata;
pa_assert(m);
@@ -187,7 +192,7 @@ static pa_x11_wrapper* x11_wrapper_new(pa_core *c, const char *name, const char
XAddConnectionWatch(d, x11_watch, (XPointer) w);
- pa_assert_se(pa_property_set(c, w->property_name, w) >= 0);
+ pa_assert_se(pa_shared_set(c, w->property_name, w) >= 0);
return w;
}
@@ -195,7 +200,7 @@ static pa_x11_wrapper* x11_wrapper_new(pa_core *c, const char *name, const char
static void x11_wrapper_free(pa_x11_wrapper*w) {
pa_assert(w);
- pa_assert_se(pa_property_remove(w->core, w->property_name) >= 0);
+ pa_assert_se(pa_shared_remove(w->core, w->property_name) >= 0);
pa_assert(!w->clients);
@@ -218,8 +223,9 @@ pa_x11_wrapper* pa_x11_wrapper_get(pa_core *c, const char *name) {
pa_core_assert_ref(c);
- pa_snprintf(t, sizeof(t), "x11-wrapper%s%s", name ? "-" : "", name ? name : "");
- if ((w = pa_property_get(c, t)))
+ pa_snprintf(t, sizeof(t), "x11-wrapper%s%s", name ? "@" : "", name ? name : "");
+
+ if ((w = pa_shared_get(c, t)))
return pa_x11_wrapper_ref(w);
return x11_wrapper_new(c, name, t);
@@ -237,8 +243,10 @@ void pa_x11_wrapper_unref(pa_x11_wrapper* w) {
pa_assert(w);
pa_assert(PA_REFCNT_VALUE(w) >= 1);
- if (PA_REFCNT_DEC(w) <= 0)
- x11_wrapper_free(w);
+ if (PA_REFCNT_DEC(w) > 0)
+ return;
+
+ x11_wrapper_free(w);
}
Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w) {
@@ -251,7 +259,24 @@ Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w) {
return w->display;
}
-pa_x11_client* pa_x11_client_new(pa_x11_wrapper *w, int (*cb)(pa_x11_wrapper *w, XEvent *e, void *userdata), void *userdata) {
+void pa_x11_wrapper_kill(pa_x11_wrapper *w) {
+ pa_x11_client *c, *n;
+
+ pa_assert(w);
+
+ pa_x11_wrapper_ref(w);
+
+ for (c = w->clients; c; c = n) {
+ n = c->next;
+
+ if (c->kill_cb)
+ c->kill_cb(w, c->userdata);
+ }
+
+ pa_x11_wrapper_unref(w);
+}
+
+pa_x11_client* pa_x11_client_new(pa_x11_wrapper *w, pa_x11_event_cb_t event_cb, pa_x11_kill_cb_t kill_cb, void *userdata) {
pa_x11_client *c;
pa_assert(w);
@@ -259,7 +284,8 @@ pa_x11_client* pa_x11_client_new(pa_x11_wrapper *w, int (*cb)(pa_x11_wrapper *w,
c = pa_xnew(pa_x11_client, 1);
c->wrapper = w;
- c->callback = cb;
+ c->event_cb = event_cb;
+ c->kill_cb = kill_cb;
c->userdata = userdata;
PA_LLIST_PREPEND(pa_x11_client, w->clients, c);
diff --git a/src/pulsecore/x11wrap.h b/src/pulsecore/x11wrap.h
index 89dacef..badc3a1 100644
--- a/src/pulsecore/x11wrap.h
+++ b/src/pulsecore/x11wrap.h
@@ -1,8 +1,6 @@
#ifndef foox11wraphfoo
#define foox11wraphfoo
-/* $Id: x11wrap.h 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -30,6 +28,11 @@
typedef struct pa_x11_wrapper pa_x11_wrapper;
+typedef struct pa_x11_client pa_x11_client;
+
+typedef int (*pa_x11_event_cb_t)(pa_x11_wrapper *w, XEvent *e, void *userdata);
+typedef void (*pa_x11_kill_cb_t)(pa_x11_wrapper *w, void *userdata);
+
/* Return the X11 wrapper for this core. In case no wrapper was
existant before, allocate a new one */
pa_x11_wrapper* pa_x11_wrapper_get(pa_core *c, const char *name);
@@ -43,10 +46,11 @@ void pa_x11_wrapper_unref(pa_x11_wrapper* w);
/* Return the X11 display object for this connection */
Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w);
-typedef struct pa_x11_client pa_x11_client;
+/* Kill the connection to the X11 display */
+void pa_x11_wrapper_kill(pa_x11_wrapper *w);
/* Register an X11 client, that is called for each X11 event */
-pa_x11_client* pa_x11_client_new(pa_x11_wrapper *w, int (*cb)(pa_x11_wrapper *w, XEvent *e, void *userdata), void *userdata);
+pa_x11_client* pa_x11_client_new(pa_x11_wrapper *w, pa_x11_event_cb_t event_cb, pa_x11_kill_cb_t kill_cb, void *userdata);
/* Free an X11 client object */
void pa_x11_client_free(pa_x11_client *c);
diff --git a/src/tests/asyncmsgq-test.c b/src/tests/asyncmsgq-test.c
index de3dc38..08ad3dd 100644
--- a/src/tests/asyncmsgq-test.c
+++ b/src/tests/asyncmsgq-test.c
@@ -1,5 +1,3 @@
-/* $Id: asyncmsgq-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/asyncq-test.c b/src/tests/asyncq-test.c
index f1446c0..4e8a120 100644
--- a/src/tests/asyncq-test.c
+++ b/src/tests/asyncq-test.c
@@ -1,5 +1,3 @@
-/* $Id: asyncq-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -44,7 +42,7 @@ static void producer(void *_q) {
pa_asyncq_push(q, PA_UINT_TO_PTR(i+1), 1);
}
- pa_asyncq_push(q, PA_UINT_TO_PTR(-1), 1);
+ pa_asyncq_push(q, PA_UINT_TO_PTR(-1), TRUE);
printf("pushed end\n");
}
@@ -56,7 +54,7 @@ static void consumer(void *_q) {
sleep(1);
for (i = 0;; i++) {
- p = pa_asyncq_pop(q, 1);
+ p = pa_asyncq_pop(q, TRUE);
if (p == PA_UINT_TO_PTR(-1))
break;
diff --git a/src/tests/channelmap-test.c b/src/tests/channelmap-test.c
index dea6582..6cf58fb 100644
--- a/src/tests/channelmap-test.c
+++ b/src/tests/channelmap-test.c
@@ -1,12 +1,14 @@
-/* $Id: channelmap-test.c 1418 2007-01-04 13:43:45Z ossman $ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <assert.h>
#include <pulse/channelmap.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
-int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
+int main(int argc, char *argv[]) {
char cm[PA_CHANNEL_MAP_SNPRINT_MAX];
pa_channel_map map, map2;
@@ -22,12 +24,15 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map));
+ pa_channel_map_init_extend(&map, 14, PA_CHANNEL_MAP_ALSA);
+
+ fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map));
+
pa_channel_map_parse(&map2, cm);
assert(pa_channel_map_equal(&map, &map2));
pa_channel_map_parse(&map2, "left,test");
-
return 0;
}
diff --git a/src/tests/close-test.c b/src/tests/close-test.c
new file mode 100644
index 0000000..7a6fec5
--- /dev/null
+++ b/src/tests/close-test.c
@@ -0,0 +1,20 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#include <fcntl.h>
+
+#include <pulsecore/core-util.h>
+
+int main(int argc, char *argv[]) {
+
+ open("/dev/null", O_RDONLY);
+ open("/dev/null", O_RDONLY);
+ open("/dev/null", O_RDONLY);
+ open("/dev/null", O_RDONLY);
+
+ pa_close_all(5, -1);
+
+ return 0;
+}
diff --git a/src/tests/cpulimit-test.c b/src/tests/cpulimit-test.c
index 84a4902..fdc0162 100644
--- a/src/tests/cpulimit-test.c
+++ b/src/tests/cpulimit-test.c
@@ -1,5 +1,3 @@
-/* $Id: cpulimit-test.c 1418 2007-01-04 13:43:45Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -30,7 +28,7 @@
#include <signal.h>
#include <pulse/mainloop.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
#ifdef TEST2
#include <pulse/mainloop-signal.h>
@@ -44,7 +42,7 @@ static time_t start;
#ifdef TEST2
-static void func(pa_mainloop_api *m, PA_GCC_UNUSED pa_signal_event *e, PA_GCC_UNUSED int sig, PA_GCC_UNUSED void *userdata) {
+static void func(pa_mainloop_api *m, pa_signal_event *e, int sig, void *userdata) {
time_t now;
time(&now);
@@ -57,7 +55,7 @@ static void func(pa_mainloop_api *m, PA_GCC_UNUSED pa_signal_event *e, PA_GCC_UN
#endif
-int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
+int main(int argc, char *argv[]) {
pa_mainloop *m;
m = pa_mainloop_new();
diff --git a/src/tests/envelope-test.c b/src/tests/envelope-test.c
new file mode 100644
index 0000000..4a72f5a
--- /dev/null
+++ b/src/tests/envelope-test.c
@@ -0,0 +1,246 @@
+/***
+ This file is part of PulseAudio.
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <pulse/sample.h>
+#include <pulse/volume.h>
+#include <pulse/timeval.h>
+
+#include <pulsecore/envelope.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/endianmacros.h>
+#include <pulsecore/memblock.h>
+#include <pulsecore/sample-util.h>
+
+#include <liboil/liboil.h>
+
+const pa_envelope_def ramp_down = {
+ .n_points = 2,
+ .points_x = { 100*PA_USEC_PER_MSEC, 300*PA_USEC_PER_MSEC },
+ .points_y = {
+ .f = { 1.0f, 0.2f },
+ .i = { 0x10000, 0x10000/5 }
+ }
+};
+
+const pa_envelope_def ramp_up = {
+ .n_points = 2,
+ .points_x = { 100*PA_USEC_PER_MSEC, 300*PA_USEC_PER_MSEC },
+ .points_y = {
+ .f = { 0.2f, 1.0f },
+ .i = { 0x10000/5, 0x10000 }
+ }
+};
+
+const pa_envelope_def ramp_down2 = {
+ .n_points = 2,
+ .points_x = { 50*PA_USEC_PER_MSEC, 900*PA_USEC_PER_MSEC },
+ .points_y = {
+ .f = { 0.8f, 0.7f },
+ .i = { 0x10000*4/5, 0x10000*7/10 }
+ }
+};
+
+const pa_envelope_def ramp_up2 = {
+ .n_points = 2,
+ .points_x = { 50*PA_USEC_PER_MSEC, 900*PA_USEC_PER_MSEC },
+ .points_y = {
+ .f = { 0.7f, 0.9f },
+ .i = { 0x10000*7/10, 0x10000*9/10 }
+ }
+};
+
+static void dump_block(const pa_sample_spec *ss, const pa_memchunk *chunk) {
+ void *d;
+ unsigned i;
+
+ static unsigned j = 0;
+
+ d = pa_memblock_acquire(chunk->memblock);
+
+ switch (ss->format) {
+
+ case PA_SAMPLE_U8:
+ case PA_SAMPLE_ULAW:
+ case PA_SAMPLE_ALAW: {
+ uint8_t *u = d;
+
+ for (i = 0; i < chunk->length / pa_frame_size(ss); i++)
+ printf("0x%02x ", *(u++));
+
+ break;
+ }
+
+ case PA_SAMPLE_S16NE:
+ case PA_SAMPLE_S16RE: {
+ int16_t *u = d;
+
+ for (i = 0; i < chunk->length / pa_frame_size(ss); i++)
+ printf("%i\t%i\n", j++, *(u++));
+
+ break;
+ }
+
+ case PA_SAMPLE_S32NE:
+ case PA_SAMPLE_S32RE: {
+ int32_t *u = d;
+
+ for (i = 0; i < chunk->length / pa_frame_size(ss); i++)
+ printf("%i\t%i\n", j++, *(u++));
+
+ break;
+ }
+
+ case PA_SAMPLE_FLOAT32NE:
+ case PA_SAMPLE_FLOAT32RE: {
+ float *u = d;
+
+ for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
+ printf("%i\t%1.3g\n", j++, PA_MAYBE_FLOAT32_SWAP(ss->format == PA_SAMPLE_FLOAT32RE, *u));
+ u++;
+ }
+
+ break;
+ }
+
+ default:
+ pa_assert_not_reached();
+ }
+
+ printf("\n");
+
+ pa_memblock_release(chunk->memblock);
+}
+
+static pa_memblock * generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
+ pa_memblock *block;
+ void *d;
+ unsigned n_samples;
+
+ block = pa_memblock_new(pool, pa_bytes_per_second(ss));
+ n_samples = (unsigned) (pa_memblock_get_length(block) / pa_sample_size(ss));
+
+ d = pa_memblock_acquire(block);
+
+ switch (ss->format) {
+
+ case PA_SAMPLE_S16NE:
+ case PA_SAMPLE_S16RE: {
+ int16_t *i;
+
+ for (i = d; n_samples > 0; n_samples--, i++)
+ *i = 0x7FFF;
+
+ break;
+ }
+
+ case PA_SAMPLE_S32NE:
+ case PA_SAMPLE_S32RE: {
+ int32_t *i;
+
+ for (i = d; n_samples > 0; n_samples--, i++)
+ *i = 0x7FFFFFFF;
+
+ break;
+ }
+
+ case PA_SAMPLE_FLOAT32RE:
+ case PA_SAMPLE_FLOAT32NE: {
+ float *f;
+
+ for (f = d; n_samples > 0; n_samples--, f++)
+ *f = PA_MAYBE_FLOAT32_SWAP(ss->format == PA_SAMPLE_FLOAT32RE, 1.0f);
+
+ break;
+ }
+
+ default:
+ pa_assert_not_reached();
+ }
+
+ pa_memblock_release(block);
+ return block;
+}
+
+int main(int argc, char *argv[]) {
+ pa_mempool *pool;
+ pa_memblock *block;
+ pa_memchunk chunk;
+ pa_envelope *envelope;
+ pa_envelope_item *item1, *item2;
+
+ const pa_sample_spec ss = {
+ .format = PA_SAMPLE_S16NE,
+ .channels = 1,
+ .rate = 200
+ };
+
+ const pa_cvolume v = {
+ .channels = 1,
+ .values = { PA_VOLUME_NORM, PA_VOLUME_NORM/2 }
+ };
+
+ oil_init();
+ pa_log_set_maximal_level(PA_LOG_DEBUG);
+
+ pa_assert_se(pool = pa_mempool_new(FALSE, 0));
+ pa_assert_se(envelope = pa_envelope_new(&ss));
+
+ block = generate_block(pool, &ss);
+
+ chunk.memblock = pa_memblock_ref(block);
+ chunk.length = pa_memblock_get_length(block);
+ chunk.index = 0;
+
+ pa_volume_memchunk(&chunk, &ss, &v);
+
+ item1 = pa_envelope_add(envelope, &ramp_down);
+ item2 = pa_envelope_add(envelope, &ramp_down2);
+ pa_envelope_apply(envelope, &chunk);
+ dump_block(&ss, &chunk);
+
+ pa_memblock_unref(chunk.memblock);
+
+ chunk.memblock = pa_memblock_ref(block);
+ chunk.length = pa_memblock_get_length(block);
+ chunk.index = 0;
+
+ item1 = pa_envelope_replace(envelope, item1, &ramp_up);
+ item2 = pa_envelope_replace(envelope, item2, &ramp_up2);
+ pa_envelope_apply(envelope, &chunk);
+ dump_block(&ss, &chunk);
+
+ pa_memblock_unref(chunk.memblock);
+
+ pa_envelope_remove(envelope, item1);
+ pa_envelope_remove(envelope, item2);
+ pa_envelope_free(envelope);
+
+ pa_memblock_unref(block);
+
+ pa_mempool_free(pool);
+
+ return 0;
+}
diff --git a/src/tests/flist-test.c b/src/tests/flist-test.c
index dadf293..b2c648d 100644
--- a/src/tests/flist-test.c
+++ b/src/tests/flist-test.c
@@ -1,5 +1,3 @@
-/* $Id: flist-test.c 1439 2007-05-22 23:37:27Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/get-binary-name-test.c b/src/tests/get-binary-name-test.c
index 5973576..7c7a899 100644
--- a/src/tests/get-binary-name-test.c
+++ b/src/tests/get-binary-name-test.c
@@ -1,5 +1,3 @@
-/* $Id: get-binary-name-test.c 1418 2007-01-04 13:43:45Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/hook-list-test.c b/src/tests/hook-list-test.c
index c72c30a..452e477 100644
--- a/src/tests/hook-list-test.c
+++ b/src/tests/hook-list-test.c
@@ -1,5 +1,3 @@
-/* $Id: hook-list-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -7,12 +5,12 @@
#include <pulsecore/hook-list.h>
#include <pulsecore/log.h>
-static pa_hook_result_t func1(const char*hook_data, const char*call_data, const char*slot_data) {
+static pa_hook_result_t func1(const char *hook_data, const char *call_data, const char *slot_data) {
pa_log("(func1) hook=%s call=%s slot=%s", hook_data, call_data, slot_data);
return PA_HOOK_OK;
}
-static pa_hook_result_t func2(const char*hook_data, const char*call_data, const char*slot_data) {
+static pa_hook_result_t func2(const char *hook_data, const char *call_data, const char *slot_data) {
pa_log("(func2) hook=%s call=%s slot=%s", hook_data, call_data, slot_data);
return PA_HOOK_OK;
}
@@ -23,9 +21,9 @@ int main(int argc, char *argv[]) {
pa_hook_init(&hook, (void*) "hook");
- pa_hook_connect(&hook, (pa_hook_cb_t) func1, (void*) "slot1");
- slot = pa_hook_connect(&hook, (pa_hook_cb_t) func2, (void*) "slot2");
- pa_hook_connect(&hook, (pa_hook_cb_t) func1, (void*) "slot3");
+ pa_hook_connect(&hook, PA_HOOK_LATE, (pa_hook_cb_t) func1, (void*) "slot1");
+ slot = pa_hook_connect(&hook, PA_HOOK_NORMAL, (pa_hook_cb_t) func2, (void*) "slot2");
+ pa_hook_connect(&hook, PA_HOOK_NORMAL, (pa_hook_cb_t) func1, (void*) "slot3");
pa_hook_fire(&hook, (void*) "call1");
@@ -33,7 +31,7 @@ int main(int argc, char *argv[]) {
pa_hook_fire(&hook, (void*) "call2");
- pa_hook_free(&hook);
+ pa_hook_done(&hook);
return 0;
}
diff --git a/src/tests/interpol-test.c b/src/tests/interpol-test.c
index 564ddb9..9d93077 100644
--- a/src/tests/interpol-test.c
+++ b/src/tests/interpol-test.c
@@ -1,5 +1,3 @@
-/* $Id: interpol-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -42,10 +40,9 @@ static pa_context *context = NULL;
static pa_stream *stream = NULL;
static pa_mainloop_api *mainloop_api = NULL;
-static void stream_write_cb(pa_stream *p, size_t length, void *userdata) {
-
+static void stream_write_cb(pa_stream *p, size_t nbytes, void *userdata) {
/* Just some silence */
- pa_stream_write(p, pa_xmalloc0(length), length, pa_xfree, 0, PA_SEEK_RELATIVE);
+ pa_stream_write(p, pa_xmalloc0(nbytes), nbytes, pa_xfree, 0, PA_SEEK_RELATIVE);
}
/* This is called whenever the context status changes */
@@ -63,7 +60,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
static const pa_sample_spec ss = {
.format = PA_SAMPLE_S16LE,
.rate = 44100,
- .channels = 1
+ .channels = 2
};
fprintf(stderr, "Connection established.\n");
@@ -112,9 +109,10 @@ int main(int argc, char *argv[]) {
pa_threaded_mainloop_start(m);
for (k = 0; k < 5000; k++) {
- int success = 0, changed = 0;
+ pa_bool_t success = FALSE, changed = FALSE;
pa_usec_t t, rtc;
struct timeval now, tv;
+ pa_bool_t playing = FALSE;
pa_threaded_mainloop_lock(m);
@@ -122,22 +120,26 @@ int main(int argc, char *argv[]) {
const pa_timing_info *info;
if (pa_stream_get_time(stream, &t) >= 0)
- success = 1;
+ success = TRUE;
- if ((info = pa_stream_get_timing_info(stream)))
- if (last_info.tv_usec != info->timestamp.tv_usec || last_info.tv_sec != info->timestamp.tv_sec) {
- changed = 1;
+ if ((info = pa_stream_get_timing_info(stream))) {
+ if (memcmp(&last_info, &info->timestamp, sizeof(struct timeval))) {
+ changed = TRUE;
last_info = info->timestamp;
}
+ if (info->playing)
+ playing = TRUE;
+ }
}
pa_threaded_mainloop_unlock(m);
- if (success) {
- pa_gettimeofday(&now);
+ pa_gettimeofday(&now);
+ if (success) {
rtc = pa_timeval_diff(&now, &start);
- printf("%i\t%llu\t%llu\t%llu\t%llu\t%u\n", k, (unsigned long long) rtc, (unsigned long long) t, (unsigned long long) (rtc-old_rtc), (unsigned long long) (t-old_t), changed);
+ printf("%i\t%llu\t%llu\t%llu\t%llu\t%u\t%u\n", k, (unsigned long long) rtc, (unsigned long long) t, (unsigned long long) (rtc-old_rtc), (unsigned long long) (t-old_t), changed, playing);
+ fflush(stdout);
old_t = t;
old_rtc = rtc;
}
diff --git a/src/tests/ipacl-test.c b/src/tests/ipacl-test.c
index f363d1a..bcdd469 100644
--- a/src/tests/ipacl-test.c
+++ b/src/tests/ipacl-test.c
@@ -1,5 +1,3 @@
-/* $Id: ipacl-test.c 1418 2007-01-04 13:43:45Z ossman $ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/src/tests/lock-autospawn-test.c b/src/tests/lock-autospawn-test.c
new file mode 100644
index 0000000..80cfda6
--- /dev/null
+++ b/src/tests/lock-autospawn-test.c
@@ -0,0 +1,109 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/poll.h>
+#include <string.h>
+
+#include <pulsecore/macro.h>
+#include <pulsecore/thread.h>
+#include <pulsecore/lock-autospawn.h>
+#include <pulse/util.h>
+
+static void thread_func(void*k) {
+ pa_assert_se(pa_autospawn_lock_init() >= 0);
+
+ pa_log("%i, Trying to acquire lock.", PA_PTR_TO_INT(k));
+
+ pa_assert_se(pa_autospawn_lock_acquire(TRUE) > 0);
+
+ pa_log("%i, Got the lock!, Sleeping for 5s", PA_PTR_TO_INT(k));
+
+ pa_msleep(5000);
+
+ pa_log("%i, Releasing", PA_PTR_TO_INT(k));
+
+ pa_autospawn_lock_release();
+
+ pa_autospawn_lock_done(FALSE);
+}
+
+static void thread_func2(void *k) {
+ int fd;
+
+ pa_assert_se((fd = pa_autospawn_lock_init()) >= 0);
+
+ pa_log("%i, Trying to acquire lock.", PA_PTR_TO_INT(k));
+
+ for (;;) {
+ struct pollfd pollfd;
+ int j;
+
+ if ((j = pa_autospawn_lock_acquire(FALSE)) > 0)
+ break;
+
+ pa_assert(j == 0);
+
+ memset(&pollfd, 0, sizeof(pollfd));
+ pollfd.fd = fd;
+ pollfd.events = POLLIN;
+
+ pa_assert_se(poll(&pollfd, 1, -1) == 1);
+
+ pa_log("%i, woke up", PA_PTR_TO_INT(k));
+ }
+
+ pa_log("%i, Got the lock!, Sleeping for 5s", PA_PTR_TO_INT(k));
+
+ pa_msleep(5000);
+
+ pa_log("%i, Releasing", PA_PTR_TO_INT(k));
+
+ pa_autospawn_lock_release();
+
+ pa_autospawn_lock_done(FALSE);
+}
+
+int main(int argc, char**argv) {
+ pa_thread *a, *b, *c, *d;
+
+ pa_assert_se((a = pa_thread_new(thread_func, PA_INT_TO_PTR(1))));
+ pa_assert_se((b = pa_thread_new(thread_func2, PA_INT_TO_PTR(2))));
+ pa_assert_se((c = pa_thread_new(thread_func2, PA_INT_TO_PTR(3))));
+ pa_assert_se((d = pa_thread_new(thread_func, PA_INT_TO_PTR(4))));
+
+ pa_thread_join(a);
+ pa_thread_join(b);
+ pa_thread_join(c);
+ pa_thread_join(d);
+
+ pa_thread_free(a);
+ pa_thread_free(b);
+ pa_thread_free(c);
+ pa_thread_free(d);
+
+ pa_log("End");
+
+ return 0;
+}
diff --git a/src/tests/mainloop-test.c b/src/tests/mainloop-test.c
index 892d0e2..2580fa7 100644
--- a/src/tests/mainloop-test.c
+++ b/src/tests/mainloop-test.c
@@ -1,5 +1,3 @@
-/* $Id: mainloop-test.c 1418 2007-01-04 13:43:45Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -29,9 +27,9 @@
#include <assert.h>
#include <pulse/timeval.h>
+#include <pulse/gccmacro.h>
#include <pulsecore/core-util.h>
-#include <pulsecore/gccmacro.h>
#ifdef GLIB_MAIN_LOOP
@@ -68,7 +66,7 @@ static void tcb(pa_mainloop_api*a, pa_time_event *e, const struct timeval *tv, v
#endif
}
-int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
+int main(int argc, char *argv[]) {
pa_mainloop_api *a;
pa_io_event *ioe;
pa_time_event *te;
diff --git a/src/tests/mcalign-test.c b/src/tests/mcalign-test.c
index e8485af..92e3e14 100644
--- a/src/tests/mcalign-test.c
+++ b/src/tests/mcalign-test.c
@@ -1,5 +1,3 @@
-/* $Id: mcalign-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -31,24 +29,25 @@
#include <stdlib.h>
#include <time.h>
+#include <pulse/gccmacro.h>
+
#include <pulsecore/core-util.h>
#include <pulsecore/mcalign.h>
-#include <pulsecore/gccmacro.h>
/* A simple program for testing pa_mcalign */
-int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
+int main(int argc, char *argv[]) {
pa_mempool *p;
pa_mcalign *a;
pa_memchunk c;
- p = pa_mempool_new(0);
+ p = pa_mempool_new(FALSE, 0);
a = pa_mcalign_new(11);
pa_memchunk_reset(&c);
- srand(time(NULL));
+ srand((unsigned) time(NULL));
for (;;) {
ssize_t r;
@@ -63,7 +62,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
l = pa_memblock_get_length(c.memblock) - c.index;
- l = l <= 1 ? l : rand() % (l-1) +1 ;
+ l = l <= 1 ? l : (size_t) rand() % (l-1) +1;
p = pa_memblock_acquire(c.memblock);
@@ -75,11 +74,11 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
pa_memblock_release(c.memblock);
- c.length = r;
+ c.length = (size_t) r;
pa_mcalign_push(a, &c);
fprintf(stderr, "Read %ld bytes\n", (long)r);
- c.index += r;
+ c.index += (size_t) r;
if (c.index >= pa_memblock_get_length(c.memblock)) {
pa_memblock_unref(c.memblock);
diff --git a/src/tests/memblock-test.c b/src/tests/memblock-test.c
index 00713f1..37b5b40 100644
--- a/src/tests/memblock-test.c
+++ b/src/tests/memblock-test.c
@@ -1,5 +1,3 @@
-/* $Id: memblock-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -80,9 +78,9 @@ int main(int argc, char *argv[]) {
const char txt[] = "This is a test!";
- pool_a = pa_mempool_new(1);
- pool_b = pa_mempool_new(1);
- pool_c = pa_mempool_new(1);
+ pool_a = pa_mempool_new(TRUE, 0);
+ pool_b = pa_mempool_new(TRUE, 0);
+ pool_c = pa_mempool_new(TRUE, 0);
pa_mempool_get_shm_id(pool_a, &id_a);
pa_mempool_get_shm_id(pool_b, &id_b);
diff --git a/src/tests/memblockq-test.c b/src/tests/memblockq-test.c
index 7cb9f64..c53945b 100644
--- a/src/tests/memblockq-test.c
+++ b/src/tests/memblockq-test.c
@@ -1,5 +1,3 @@
-/* $Id: memblockq-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -31,22 +29,48 @@
#include <pulsecore/memblockq.h>
#include <pulsecore/log.h>
+static void dump(pa_memblockq *bq) {
+ printf(">");
+
+ for (;;) {
+ pa_memchunk out;
+ char *e;
+ size_t n;
+ void *q;
+
+ if (pa_memblockq_peek(bq, &out) < 0)
+ break;
+
+ q = pa_memblock_acquire(out.memblock);
+ for (e = (char*) q + out.index, n = 0; n < out.length; n++)
+ printf("%c", *e);
+ pa_memblock_release(out.memblock);
+
+ pa_memblock_unref(out.memblock);
+ pa_memblockq_drop(bq, out.length);
+ }
+
+ printf("<\n");
+}
+
int main(int argc, char *argv[]) {
int ret;
pa_mempool *p;
pa_memblockq *bq;
pa_memchunk chunk1, chunk2, chunk3, chunk4;
- pa_memblock *silence;
+ pa_memchunk silence;
pa_log_set_maximal_level(PA_LOG_DEBUG);
- p = pa_mempool_new(0);
+ p = pa_mempool_new(FALSE, 0);
- silence = pa_memblock_new_fixed(p, (char*) "__", 2, 1);
- assert(silence);
+ silence.memblock = pa_memblock_new_fixed(p, (char*) "__", 2, 1);
+ assert(silence.memblock);
+ silence.index = 0;
+ silence.length = pa_memblock_get_length(silence.memblock);
- bq = pa_memblockq_new(0, 40, 10, 2, 4, 4, silence);
+ bq = pa_memblockq_new(0, 40, 10, 2, 4, 4, 40, &silence);
assert(bq);
chunk1.memblock = pa_memblock_new_fixed(p, (char*) "11", 2, 1);
@@ -72,13 +96,13 @@ int main(int argc, char *argv[]) {
ret = pa_memblockq_push(bq, &chunk1);
assert(ret == 0);
- ret = pa_memblockq_push(bq, &chunk1);
+ ret = pa_memblockq_push(bq, &chunk2);
assert(ret == 0);
- ret = pa_memblockq_push(bq, &chunk2);
+ ret = pa_memblockq_push(bq, &chunk3);
assert(ret == 0);
- ret = pa_memblockq_push(bq, &chunk2);
+ ret = pa_memblockq_push(bq, &chunk4);
assert(ret == 0);
pa_memblockq_seek(bq, -6, 0);
@@ -86,7 +110,7 @@ int main(int argc, char *argv[]) {
assert(ret == 0);
pa_memblockq_seek(bq, -2, 0);
- ret = pa_memblockq_push(bq, &chunk3);
+ ret = pa_memblockq_push(bq, &chunk1);
assert(ret == 0);
pa_memblockq_seek(bq, -10, 0);
@@ -119,35 +143,22 @@ int main(int argc, char *argv[]) {
ret = pa_memblockq_push(bq, &chunk3);
assert(ret == 0);
- pa_memblockq_shorten(bq, pa_memblockq_get_length(bq)-2);
+ pa_memblockq_seek(bq, 30, PA_SEEK_RELATIVE);
- printf(">");
+ dump(bq);
- for (;;) {
- pa_memchunk out;
- char *e;
- size_t n;
+ pa_memblockq_rewind(bq, 52);
- if (pa_memblockq_peek(bq, &out) < 0)
- break;
-
- p = pa_memblock_acquire(out.memblock);
- for (e = (char*) p + out.index, n = 0; n < out.length; n++)
- printf("%c", *e);
- pa_memblock_release(out.memblock);
-
- pa_memblock_unref(out.memblock);
- pa_memblockq_drop(bq, out.length);
- }
-
- printf("<\n");
+ dump(bq);
pa_memblockq_free(bq);
- pa_memblock_unref(silence);
+ pa_memblock_unref(silence.memblock);
pa_memblock_unref(chunk1.memblock);
pa_memblock_unref(chunk2.memblock);
pa_memblock_unref(chunk3.memblock);
pa_memblock_unref(chunk4.memblock);
+ pa_mempool_free(p);
+
return 0;
}
diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c
index d07b1b0..cc21ab0 100644
--- a/src/tests/mix-test.c
+++ b/src/tests/mix-test.c
@@ -1,5 +1,3 @@
-/* $Id: resampler-test.c 2037 2007-11-09 02:45:07Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -168,16 +166,16 @@ static pa_memblock* generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
case PA_SAMPLE_FLOAT32RE: {
float *u = d;
- u[0] = 0.0;
- u[1] = -1.0;
- u[2] = 1.0;
- u[3] = 4711;
- u[4] = 0.222;
- u[5] = 0.33;
- u[6] = -.3;
- u[7] = 99;
- u[8] = -0.555;
- u[9] = -.123;
+ u[0] = 0.0f;
+ u[1] = -1.0f;
+ u[2] = 1.0f;
+ u[3] = 4711.0f;
+ u[4] = 0.222f;
+ u[5] = 0.33f;
+ u[6] = -.3f;
+ u[7] = 99.0f;
+ u[8] = -0.555f;
+ u[9] = -.123f;
if (ss->format == PA_SAMPLE_FLOAT32RE)
for (i = 0; i < 10; i++)
@@ -203,7 +201,7 @@ int main(int argc, char *argv[]) {
oil_init();
pa_log_set_maximal_level(PA_LOG_DEBUG);
- pa_assert_se(pool = pa_mempool_new(FALSE));
+ pa_assert_se(pool = pa_mempool_new(FALSE, 0));
a.channels = 1;
a.rate = 44100;
@@ -223,6 +221,8 @@ int main(int argc, char *argv[]) {
i.length = pa_memblock_get_length(i.memblock);
i.index = 0;
+ dump_block(&a, &i);
+
/* Make a copy */
j = i;
pa_memblock_ref(j.memblock);
@@ -231,6 +231,8 @@ int main(int argc, char *argv[]) {
/* Adjust volume of the copy */
pa_volume_memchunk(&j, &a, &v);
+ dump_block(&a, &j);
+
m[0].chunk = i;
m[0].volume.values[0] = PA_VOLUME_NORM;
m[0].volume.channels = a.channels;
@@ -246,8 +248,6 @@ int main(int argc, char *argv[]) {
pa_mix(m, 2, ptr, k.length, &a, NULL, FALSE);
pa_memblock_release(k.memblock);
- dump_block(&a, &i);
- dump_block(&a, &j);
dump_block(&a, &k);
pa_memblock_unref(i.memblock);
diff --git a/src/tests/pacat-simple.c b/src/tests/pacat-simple.c
index 57c0a8e..ffe3176 100644
--- a/src/tests/pacat-simple.c
+++ b/src/tests/pacat-simple.c
@@ -1,5 +1,3 @@
-/* $Id: pacat-simple.c 1418 2007-01-04 13:43:45Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -31,11 +29,11 @@
#include <pulse/simple.h>
#include <pulse/error.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
#define BUFSIZE 1024
-int main(PA_GCC_UNUSED int argc, char*argv[]) {
+int main(int argc, char*argv[]) {
/* The Sample format to use */
static const pa_sample_spec ss = {
@@ -96,7 +94,7 @@ int main(PA_GCC_UNUSED int argc, char*argv[]) {
}
/* ... and play it */
- if (pa_simple_write(s, buf, r, &error) < 0) {
+ if (pa_simple_write(s, buf, (size_t) r, &error) < 0) {
fprintf(stderr, __FILE__": pa_simple_write() failed: %s\n", pa_strerror(error));
goto finish;
}
diff --git a/src/tests/parec-simple.c b/src/tests/parec-simple.c
index 4b8e439..c9d3bef 100644
--- a/src/tests/parec-simple.c
+++ b/src/tests/parec-simple.c
@@ -1,5 +1,3 @@
-/* $Id: parec-simple.c 1418 2007-01-04 13:43:45Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -30,7 +28,7 @@
#include <pulse/simple.h>
#include <pulse/error.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
#define BUFSIZE 1024
@@ -49,13 +47,13 @@ static ssize_t loop_write(int fd, const void*data, size_t size) {
ret += r;
data = (const uint8_t*) data + r;
- size -= r;
+ size -= (size_t) r;
}
return ret;
}
-int main(PA_GCC_UNUSED int argc, char*argv[]) {
+int main(int argc, char*argv[]) {
/* The sample type to use */
static const pa_sample_spec ss = {
.format = PA_SAMPLE_S16LE,
@@ -74,7 +72,6 @@ int main(PA_GCC_UNUSED int argc, char*argv[]) {
for (;;) {
uint8_t buf[BUFSIZE];
- ssize_t r;
/* Record some data ... */
if (pa_simple_read(s, buf, sizeof(buf), &error) < 0) {
@@ -83,7 +80,7 @@ int main(PA_GCC_UNUSED int argc, char*argv[]) {
}
/* And write it to STDOUT */
- if ((r = loop_write(STDOUT_FILENO, buf, sizeof(buf))) <= 0) {
+ if (loop_write(STDOUT_FILENO, buf, sizeof(buf)) != sizeof(buf)) {
fprintf(stderr, __FILE__": write() failed: %s\n", strerror(errno));
goto finish;
}
diff --git a/src/tests/prioq-test.c b/src/tests/prioq-test.c
new file mode 100644
index 0000000..120b512
--- /dev/null
+++ b/src/tests/prioq-test.c
@@ -0,0 +1,44 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulsecore/prioq.h>
+#include <pulsecore/macro.h>
+
+#define N 1024
+
+int main(int argc, char *argv[]) {
+ pa_prioq *q;
+ unsigned i;
+
+ srand(0);
+
+ q = pa_prioq_new(pa_idxset_trivial_compare_func);
+
+ /* Fill in 1024 */
+ for (i = 0; i < N; i++)
+ pa_prioq_put(q, PA_UINT_TO_PTR((unsigned) rand()));
+
+ /* Remove half of it again */
+ for (i = 0; i < N/2; i++){
+ unsigned u = PA_PTR_TO_UINT(pa_prioq_pop(q));
+ pa_log("%16u", u);
+ }
+
+ pa_log("Refilling");
+
+ /* Fill in another 1024 */
+ for (i = 0; i < N; i++)
+ pa_prioq_put(q, PA_UINT_TO_PTR((unsigned) rand()));
+
+
+ /* Remove everything */
+ while (!pa_prioq_isempty(q)) {
+ unsigned u = PA_PTR_TO_UINT(pa_prioq_pop(q));
+ pa_log("%16u", u);
+ }
+
+ pa_prioq_free(q, NULL, NULL);
+
+ return 0;
+}
diff --git a/src/tests/proplist-test.c b/src/tests/proplist-test.c
new file mode 100644
index 0000000..20041af
--- /dev/null
+++ b/src/tests/proplist-test.c
@@ -0,0 +1,60 @@
+/***
+ This file is part of PulseAudio.
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <pulse/proplist.h>
+#include <pulse/xmalloc.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/core-util.h>
+
+int main(int argc, char*argv[]) {
+ pa_proplist *a, *b;
+ char *s, *t;
+
+ a = pa_proplist_new();
+ pa_assert_se(pa_proplist_sets(a, PA_PROP_MEDIA_TITLE, "Brandenburgische Konzerte") == 0);
+ pa_assert_se(pa_proplist_sets(a, PA_PROP_MEDIA_ARTIST, "Johann Sebastian Bach") == 0);
+
+ b = pa_proplist_new();
+ pa_assert_se(pa_proplist_sets(b, PA_PROP_MEDIA_TITLE, "Goldbergvariationen") == 0);
+ pa_assert_se(pa_proplist_set(b, PA_PROP_MEDIA_ICON, "\0\1\2\3\4\5\6\7", 8) == 0);
+
+ pa_proplist_update(a, PA_UPDATE_MERGE, b);
+
+ pa_assert_se(!pa_proplist_gets(a, PA_PROP_MEDIA_ICON));
+
+ printf("%s\n", pa_strnull(pa_proplist_gets(a, PA_PROP_MEDIA_TITLE)));
+ pa_assert_se(pa_proplist_unset(b, PA_PROP_MEDIA_TITLE) == 0);
+
+ s = pa_proplist_to_string(a);
+ t = pa_proplist_to_string(b);
+ printf("---\n%s---\n%s", s, t);
+ pa_xfree(s);
+ pa_xfree(t);
+
+ pa_proplist_free(a);
+ pa_proplist_free(b);
+
+ return 0;
+}
diff --git a/src/tests/queue-test.c b/src/tests/queue-test.c
index 821ddef..ceae4e4 100644
--- a/src/tests/queue-test.c
+++ b/src/tests/queue-test.c
@@ -1,5 +1,3 @@
-/* $Id: queue-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -39,12 +37,12 @@ int main(int argc, char *argv[]) {
pa_assert_se(q = pa_queue_new());
- pa_assert(pa_queue_is_empty(q));
+ pa_assert(pa_queue_isempty(q));
pa_queue_push(q, (void*) "eins");
pa_log("%s\n", (char*) pa_queue_pop(q));
- pa_assert(pa_queue_is_empty(q));
+ pa_assert(pa_queue_isempty(q));
pa_queue_push(q, (void*) "zwei");
pa_queue_push(q, (void*) "drei");
@@ -58,7 +56,7 @@ int main(int argc, char *argv[]) {
pa_log("%s\n", (char*) pa_queue_pop(q));
pa_log("%s\n", (char*) pa_queue_pop(q));
- pa_assert(pa_queue_is_empty(q));
+ pa_assert(pa_queue_isempty(q));
pa_queue_push(q, (void*) "sechs");
pa_queue_push(q, (void*) "sieben");
diff --git a/src/tests/remix-test.c b/src/tests/remix-test.c
index d97cf08..3538d7d 100644
--- a/src/tests/remix-test.c
+++ b/src/tests/remix-test.c
@@ -1,5 +1,3 @@
-/* $Id: remix-test.c 2044 2007-11-11 02:30:59Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -60,7 +58,7 @@ int main(int argc, char *argv[]) {
oil_init();
pa_log_set_maximal_level(PA_LOG_DEBUG);
- pa_assert_se(pool = pa_mempool_new(FALSE));
+ pa_assert_se(pool = pa_mempool_new(FALSE, 0));
for (i = 0; maps[i].channels > 0; i++)
for (j = 0; maps[j].channels > 0; j++) {
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index 98499af..2d59186 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -1,5 +1,3 @@
-/* $Id: resampler-test.c 2044 2007-11-11 02:30:59Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -168,16 +166,16 @@ static pa_memblock* generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
case PA_SAMPLE_FLOAT32RE: {
float *u = d;
- u[0] = 0.0;
- u[1] = -1.0;
- u[2] = 1.0;
- u[3] = 4711;
- u[4] = 0.222;
- u[5] = 0.33;
- u[6] = -.3;
- u[7] = 99;
- u[8] = -0.555;
- u[9] = -.123;
+ u[0] = 0.0f;
+ u[1] = -1.0f;
+ u[2] = 1.0f;
+ u[3] = 4711.0f;
+ u[4] = 0.222f;
+ u[5] = 0.33f;
+ u[6] = -.3f;
+ u[7] = 99.0f;
+ u[8] = -0.555f;
+ u[9] = -.123f;
if (ss->format == PA_SAMPLE_FLOAT32RE)
for (i = 0; i < 10; i++)
@@ -203,7 +201,7 @@ int main(int argc, char *argv[]) {
oil_init();
pa_log_set_maximal_level(PA_LOG_DEBUG);
- pa_assert_se(pool = pa_mempool_new(FALSE));
+ pa_assert_se(pool = pa_mempool_new(FALSE, 0));
a.channels = b.channels = 1;
a.rate = b.rate = 44100;
diff --git a/src/tests/rtpoll-test.c b/src/tests/rtpoll-test.c
index e649377..953fd61 100644
--- a/src/tests/rtpoll-test.c
+++ b/src/tests/rtpoll-test.c
@@ -1,5 +1,3 @@
-/* $Id: thread-test.c 1621 2007-08-10 22:00:22Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -67,7 +65,7 @@ int main(int argc, char *argv[]) {
pa_rtpoll_item_set_before_callback(w, worker);
pa_rtpoll_install(p);
- pa_rtpoll_set_timer_periodic(p, 10000000); /* 10 s */
+ pa_rtpoll_set_timer_relative(p, 10000000); /* 10 s */
pa_rtpoll_run(p, 1);
diff --git a/src/tests/rtstutter.c b/src/tests/rtstutter.c
new file mode 100644
index 0000000..6b0cb8f
--- /dev/null
+++ b/src/tests/rtstutter.c
@@ -0,0 +1,117 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <time.h>
+#include <sched.h>
+#include <inttypes.h>
+#include <string.h>
+#include <pthread.h>
+
+#include <pulse/timeval.h>
+#include <pulse/gccmacro.h>
+
+#include <pulsecore/log.h>
+#include <pulsecore/macro.h>
+
+static int msec_lower, msec_upper;
+
+static void* work(void *p) PA_GCC_NORETURN;
+
+static void* work(void *p) {
+ cpu_set_t mask;
+ struct sched_param param;
+
+ pa_log_notice("CPU%i: Created thread.", PA_PTR_TO_INT(p));
+
+ memset(&param, 0, sizeof(param));
+ param.sched_priority = 12;
+ pa_assert_se(pthread_setschedparam(pthread_self(), SCHED_FIFO, &param) == 0);
+
+ CPU_ZERO(&mask);
+ CPU_SET((size_t) PA_PTR_TO_INT(p), &mask);
+ pa_assert_se(pthread_setaffinity_np(pthread_self(), sizeof(mask), &mask) == 0);
+
+ for (;;) {
+ struct timespec now, end;
+ uint64_t nsec;
+
+ pa_log_notice("CPU%i: Sleeping for 1s", PA_PTR_TO_INT(p));
+ sleep(1);
+
+ pa_assert_se(clock_gettime(CLOCK_REALTIME, &end) == 0);
+
+ nsec =
+ (uint64_t) ((((double) rand())*(double)(msec_upper-msec_lower)*PA_NSEC_PER_MSEC)/RAND_MAX) +
+ (uint64_t) ((uint64_t) msec_lower*PA_NSEC_PER_MSEC);
+
+ pa_log_notice("CPU%i: Freezing for %ims", PA_PTR_TO_INT(p), (int) (nsec/PA_NSEC_PER_MSEC));
+
+ end.tv_sec += (time_t) (nsec / PA_NSEC_PER_SEC);
+ end.tv_nsec += (long int) (nsec % PA_NSEC_PER_SEC);
+
+ while ((pa_usec_t) end.tv_nsec > PA_NSEC_PER_SEC) {
+ end.tv_sec++;
+ end.tv_nsec -= (long int) PA_NSEC_PER_SEC;
+ }
+
+ do {
+ pa_assert_se(clock_gettime(CLOCK_REALTIME, &now) == 0);
+ } while (now.tv_sec < end.tv_sec ||
+ (now.tv_sec == end.tv_sec && now.tv_nsec < end.tv_nsec));
+ }
+}
+
+int main(int argc, char*argv[]) {
+ int n;
+
+ srand((unsigned) time(NULL));
+
+ if (argc >= 3) {
+ msec_lower = atoi(argv[1]);
+ msec_upper = atoi(argv[2]);
+ } else if (argc >= 2) {
+ msec_lower = 0;
+ msec_upper = atoi(argv[1]);
+ } else {
+ msec_lower = 0;
+ msec_upper = 1000;
+ }
+
+ pa_assert(msec_upper > 0);
+ pa_assert(msec_upper >= msec_lower);
+
+ pa_log_notice("Creating random latencies in the range of %ims to %ims.", msec_lower, msec_upper);
+
+ for (n = 1; n < sysconf(_SC_NPROCESSORS_CONF); n++) {
+ pthread_t t;
+ pa_assert_se(pthread_create(&t, NULL, work, PA_INT_TO_PTR(n)) == 0);
+ }
+
+ work(PA_INT_TO_PTR(0));
+
+ return 0;
+}
diff --git a/src/tests/sig2str-test.c b/src/tests/sig2str-test.c
index 7e8c0e6..d64a890 100644
--- a/src/tests/sig2str-test.c
+++ b/src/tests/sig2str-test.c
@@ -1,5 +1,3 @@
-/* $Id: sig2str-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c
index b26d1fe..15700ec 100644
--- a/src/tests/smoother-test.c
+++ b/src/tests/smoother-test.c
@@ -1,5 +1,3 @@
-/* $Id: smoother-test.c 2191 2008-03-29 23:09:48Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -47,26 +45,26 @@ int main(int argc, char*argv[]) {
srand(0);
- for (m = 0, u = 0; u < PA_ELEMENTSOF(msec)-2; u+= 2) {
+ for (m = 0, u = 0; u < PA_ELEMENTSOF(msec); u+= 2) {
- msec[u] = m+1;
- msec[u+1] = m + rand() % 2000 - 1000;
+ msec[u] = m+1 + (rand() % 100) - 50;
+ msec[u+1] = m + (rand() % 2000) - 1000;
m += rand() % 100;
+ if (msec[u] < 0)
+ msec[u] = 0;
+
if (msec[u+1] < 0)
msec[u+1] = 0;
}
- msec[PA_ELEMENTSOF(msec)-2] = 0;
- msec[PA_ELEMENTSOF(msec)-1] = 0;
-
- s = pa_smoother_new(1000*PA_USEC_PER_MSEC, 2000*PA_USEC_PER_MSEC, TRUE);
+ s = pa_smoother_new(700*PA_USEC_PER_MSEC, 2000*PA_USEC_PER_MSEC, TRUE, 6);
for (x = 0, u = 0; x < PA_USEC_PER_SEC * 10; x += PA_USEC_PER_MSEC) {
- while (msec[u] > 0 && (pa_usec_t) msec[u]*PA_USEC_PER_MSEC < x) {
- pa_smoother_put(s, msec[u]*PA_USEC_PER_MSEC, msec[u+1]*PA_USEC_PER_MSEC);
+ while (u < PA_ELEMENTSOF(msec) && (pa_usec_t) msec[u]*PA_USEC_PER_MSEC < x) {
+ pa_smoother_put(s, (pa_usec_t) msec[u] * PA_USEC_PER_MSEC, (pa_usec_t) msec[u+1] * PA_USEC_PER_MSEC);
printf("%i\t\t%i\n", msec[u], msec[u+1]);
u += 2;
}
diff --git a/src/tests/stripnul.c b/src/tests/stripnul.c
new file mode 100644
index 0000000..2b8aa08
--- /dev/null
+++ b/src/tests/stripnul.c
@@ -0,0 +1,70 @@
+/***
+ This file is part of PulseAudio.
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+
+#include <pulse/xmalloc.h>
+#include <pulsecore/macro.h>
+
+int main(int argc, char *argv[]) {
+ FILE *i, *o;
+ size_t granularity;
+ pa_bool_t found;
+ uint8_t *zero;
+
+ pa_assert_se(argc >= 2);
+ pa_assert_se((granularity = (size_t) atoi(argv[1])) >= 1);
+ pa_assert_se((i = (argc >= 3) ? fopen(argv[2], "r") : stdin));
+ pa_assert_se((o = (argc >= 4) ? fopen(argv[3], "w") : stdout));
+
+ zero = pa_xmalloc0(granularity);
+
+ for (;;) {
+ uint8_t buffer[16*1024], *p;
+ size_t k;
+
+ k = fread(buffer, granularity, sizeof(buffer)/granularity, i);
+
+ if (k <= 0)
+ break;
+
+ if (found)
+ pa_assert_se(fwrite(buffer, granularity, k, o) == k);
+ else {
+ for (p = buffer; ((size_t) (p-buffer)/granularity) < k; p += granularity)
+ if (memcmp(p, zero, granularity)) {
+ size_t left;
+ found = TRUE;
+ left = (size_t) (k - (size_t) (p-buffer)/granularity);
+ pa_assert_se(fwrite(p, granularity, left, o) == left);
+ break;
+ }
+ }
+ }
+
+ fflush(o);
+
+ return 0;
+}
diff --git a/src/tests/strlist-test.c b/src/tests/strlist-test.c
index 47770b5..10f370c 100644
--- a/src/tests/strlist-test.c
+++ b/src/tests/strlist-test.c
@@ -1,10 +1,11 @@
#include <stdio.h>
#include <pulse/xmalloc.h>
+#include <pulse/gccmacro.h>
+
#include <pulsecore/strlist.h>
-#include <pulsecore/gccmacro.h>
-int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char* argv[]) {
+int main(int argc, char* argv[]) {
char *t, *u;
pa_strlist *l = NULL;
diff --git a/src/tests/sync-playback.c b/src/tests/sync-playback.c
index defa50b..42c479a 100644
--- a/src/tests/sync-playback.c
+++ b/src/tests/sync-playback.c
@@ -1,5 +1,3 @@
-/* $Id: sync-playback.c 1418 2007-01-04 13:43:45Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -56,9 +54,10 @@ static const pa_sample_spec sample_spec = {
static const pa_buffer_attr buffer_attr = {
.maxlength = SAMPLE_HZ*sizeof(float)*NSTREAMS, /* exactly space for the entire play time */
- .tlength = 0,
+ .tlength = (uint32_t) -1,
.prebuf = 0, /* Setting prebuf to 0 guarantees us the the streams will run synchronously, no matter what */
- .minreq = 0
+ .minreq = (uint32_t) -1,
+ .fragsize = 0
};
static void nop_free_cb(void *p) {}
@@ -90,7 +89,7 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
fprintf(stderr, "Writing data to stream %i.\n", i);
- r = pa_stream_write(s, data, sizeof(data), nop_free_cb, sizeof(data) * i, PA_SEEK_ABSOLUTE);
+ r = pa_stream_write(s, data, sizeof(data), nop_free_cb, (int64_t) sizeof(data) * (int64_t) i, PA_SEEK_ABSOLUTE);
assert(r == 0);
/* Be notified when this stream is drained */
diff --git a/src/tests/thread-mainloop-test.c b/src/tests/thread-mainloop-test.c
index 7302e6b..263cd57 100644
--- a/src/tests/thread-mainloop-test.c
+++ b/src/tests/thread-mainloop-test.c
@@ -1,5 +1,3 @@
-/* $Id: thread-mainloop-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -30,8 +28,8 @@
#include <pulse/timeval.h>
#include <pulse/util.h>
#include <pulse/thread-mainloop.h>
+#include <pulse/gccmacro.h>
-#include <pulsecore/gccmacro.h>
#include <pulsecore/macro.h>
static void tcb(pa_mainloop_api*a, pa_time_event *e, const struct timeval *tv, void *userdata) {
@@ -41,7 +39,7 @@ static void tcb(pa_mainloop_api*a, pa_time_event *e, const struct timeval *tv, v
fprintf(stderr, "TIME EVENT END\n");
}
-int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
+int main(int argc, char *argv[]) {
pa_mainloop_api *a;
pa_threaded_mainloop *m;
struct timeval tv;
diff --git a/src/tests/thread-test.c b/src/tests/thread-test.c
index dd5ce3e..f29b5e7 100644
--- a/src/tests/thread-test.c
+++ b/src/tests/thread-test.c
@@ -1,5 +1,3 @@
-/* $Id: thread-test.c 1971 2007-10-28 19:13:50Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/utf8-test.c b/src/tests/utf8-test.c
index 7962ebc..f1708ad 100644
--- a/src/tests/utf8-test.c
+++ b/src/tests/utf8-test.c
@@ -1,5 +1,3 @@
-/* $Id: utf8-test.c 1418 2007-01-04 13:43:45Z ossman $ */
-
#include <stdio.h>
#include <assert.h>
diff --git a/src/tests/voltest.c b/src/tests/voltest.c
index 2bdefda..5bfc97e 100644
--- a/src/tests/voltest.c
+++ b/src/tests/voltest.c
@@ -1,12 +1,11 @@
-/* $Id: voltest.c 1418 2007-01-04 13:43:45Z ossman $ */
-
#include <stdio.h>
#include <pulse/volume.h>
-#include <pulsecore/gccmacro.h>
+#include <pulse/gccmacro.h>
-int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
+int main(int argc, char *argv[]) {
pa_volume_t v;
+ pa_cvolume cv;
for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) {
@@ -15,6 +14,17 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
printf("Volume: %3i; percent: %i%%; decibel %0.2f; linear = %0.2f; volume(decibel): %3i; volume(linear): %3i\n",
v, (v*100)/PA_VOLUME_NORM, dB, f, pa_sw_volume_from_dB(dB), pa_sw_volume_from_linear(f));
+ }
+
+ for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) {
+ char s[PA_CVOLUME_SNPRINT_MAX], t[PA_SW_CVOLUME_SNPRINT_DB_MAX];
+
+ pa_cvolume_set(&cv, 2, v);
+
+ printf("Volume: %3i [%s] [%s]\n",
+ v,
+ pa_cvolume_snprint(s, sizeof(s), &cv),
+ pa_sw_cvolume_snprint_dB(t, sizeof(t), &cv));
}
diff --git a/src/utils/pabrowse.c b/src/utils/pabrowse.c
index 7e3e6fc..f2ed955 100644
--- a/src/utils/pabrowse.c
+++ b/src/utils/pabrowse.c
@@ -1,5 +1,3 @@
-/* $Id: pabrowse.c 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 8e28214..99df5b9 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -1,5 +1,3 @@
-/* $Id: pacat.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -35,14 +33,14 @@
#include <stdlib.h>
#include <getopt.h>
#include <fcntl.h>
+#include <locale.h>
+#include <pulse/i18n.h>
#include <pulse/pulseaudio.h>
#define TIME_EVENT_USEC 50000
-#if PA_API_VERSION < 10
-#error Invalid PulseAudio API version
-#endif
+#define CLEAR_LINE "\x1B[K"
static enum { RECORD, PLAYBACK } mode = PLAYBACK;
@@ -71,6 +69,8 @@ static int channel_map_set = 0;
static pa_stream_flags_t flags = 0;
+static size_t latency = 0, process_time=0;
+
/* A shortcut for terminating the application */
static void quit(int ret) {
assert(mainloop_api);
@@ -90,7 +90,7 @@ static void do_stream_write(size_t length) {
l = buffer_length;
if (pa_stream_write(stream, (uint8_t*) buffer + buffer_index, l, NULL, 0, PA_SEEK_RELATIVE) < 0) {
- fprintf(stderr, "pa_stream_write() failed: %s\n", pa_strerror(pa_context_errno(context)));
+ fprintf(stderr, _("pa_stream_write() failed: %s\n"), pa_strerror(pa_context_errno(context)));
quit(1);
return;
}
@@ -129,7 +129,7 @@ static void stream_read_callback(pa_stream *s, size_t length, void *userdata) {
mainloop_api->io_enable(stdio_event, PA_IO_EVENT_OUTPUT);
if (pa_stream_peek(s, &data, &length) < 0) {
- fprintf(stderr, "pa_stream_peek() failed: %s\n", pa_strerror(pa_context_errno(context)));
+ fprintf(stderr, _("pa_stream_peek() failed: %s\n"), pa_strerror(pa_context_errno(context)));
quit(1);
return;
}
@@ -138,9 +138,9 @@ static void stream_read_callback(pa_stream *s, size_t length, void *userdata) {
assert(length > 0);
if (buffer) {
- fprintf(stderr, "Buffer overrun, dropping incoming data\n");
+ fprintf(stderr, _("Buffer overrun, dropping incoming data\n"));
if (pa_stream_drop(s) < 0) {
- fprintf(stderr, "pa_stream_drop() failed: %s\n", pa_strerror(pa_context_errno(context)));
+ fprintf(stderr, _("pa_stream_drop() failed: %s\n"), pa_strerror(pa_context_errno(context)));
quit(1);
}
return;
@@ -166,25 +166,25 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
const pa_buffer_attr *a;
char cmt[PA_CHANNEL_MAP_SNPRINT_MAX], sst[PA_SAMPLE_SPEC_SNPRINT_MAX];
- fprintf(stderr, "Stream successfully created.\n");
+ fprintf(stderr, _("Stream successfully created.\n"));
if (!(a = pa_stream_get_buffer_attr(s)))
- fprintf(stderr, "pa_stream_get_buffer_attr() failed: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
+ fprintf(stderr, _("pa_stream_get_buffer_attr() failed: %s\n"), pa_strerror(pa_context_errno(pa_stream_get_context(s))));
else {
if (mode == PLAYBACK)
- fprintf(stderr, "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n", a->maxlength, a->tlength, a->prebuf, a->minreq);
+ fprintf(stderr, _("Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n"), a->maxlength, a->tlength, a->prebuf, a->minreq);
else {
assert(mode == RECORD);
- fprintf(stderr, "Buffer metrics: maxlength=%u, fragsize=%u\n", a->maxlength, a->fragsize);
+ fprintf(stderr, _("Buffer metrics: maxlength=%u, fragsize=%u\n"), a->maxlength, a->fragsize);
}
}
- fprintf(stderr, "Using sample spec '%s', channel map '%s'.\n",
+ fprintf(stderr, _("Using sample spec '%s', channel map '%s'.\n"),
pa_sample_spec_snprint(sst, sizeof(sst), pa_stream_get_sample_spec(s)),
pa_channel_map_snprint(cmt, sizeof(cmt), pa_stream_get_channel_map(s)));
- fprintf(stderr, "Connected to device %s (%u, %ssuspended).\n",
+ fprintf(stderr, _("Connected to device %s (%u, %ssuspended).\n"),
pa_stream_get_device_name(s),
pa_stream_get_device_index(s),
pa_stream_is_suspended(s) ? "" : "not ");
@@ -194,7 +194,7 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
case PA_STREAM_FAILED:
default:
- fprintf(stderr, "Stream error: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
+ fprintf(stderr, _("Stream error: %s\n"), pa_strerror(pa_context_errno(pa_stream_get_context(s))));
quit(1);
}
}
@@ -204,17 +204,38 @@ static void stream_suspended_callback(pa_stream *s, void *userdata) {
if (verbose) {
if (pa_stream_is_suspended(s))
- fprintf(stderr, "Stream device suspended.\n");
+ fprintf(stderr, _("Stream device suspended.%s \n"), CLEAR_LINE);
else
- fprintf(stderr, "Stream device resumed.\n");
+ fprintf(stderr, _("Stream device resumed.%s \n"), CLEAR_LINE);
}
}
+static void stream_underflow_callback(pa_stream *s, void *userdata) {
+ assert(s);
+
+ if (verbose)
+ fprintf(stderr, _("Stream underrun.%s \n"), CLEAR_LINE);
+}
+
+static void stream_overflow_callback(pa_stream *s, void *userdata) {
+ assert(s);
+
+ if (verbose)
+ fprintf(stderr, _("Stream overrun.%s \n"), CLEAR_LINE);
+}
+
+static void stream_started_callback(pa_stream *s, void *userdata) {
+ assert(s);
+
+ if (verbose)
+ fprintf(stderr, _("Stream started.%s \n"), CLEAR_LINE);
+}
+
static void stream_moved_callback(pa_stream *s, void *userdata) {
assert(s);
if (verbose)
- fprintf(stderr, "Stream moved to device %s (%u, %ssuspended).\n", pa_stream_get_device_name(s), pa_stream_get_device_index(s), pa_stream_is_suspended(s) ? "" : "not ");
+ fprintf(stderr, _("Stream moved to device %s (%u, %ssuspended).%s \n"), pa_stream_get_device_name(s), pa_stream_get_device_index(s), pa_stream_is_suspended(s) ? "" : _("not "), CLEAR_LINE);
}
/* This is called whenever the context status changes */
@@ -229,15 +250,16 @@ static void context_state_callback(pa_context *c, void *userdata) {
case PA_CONTEXT_READY: {
int r;
+ pa_buffer_attr buffer_attr;
assert(c);
assert(!stream);
if (verbose)
- fprintf(stderr, "Connection established.\n");
+ fprintf(stderr, _("Connection established.%s \n"), CLEAR_LINE);
if (!(stream = pa_stream_new(c, stream_name, &sample_spec, channel_map_set ? &channel_map : NULL))) {
- fprintf(stderr, "pa_stream_new() failed: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("pa_stream_new() failed: %s\n"), pa_strerror(pa_context_errno(c)));
goto fail;
}
@@ -246,17 +268,29 @@ static void context_state_callback(pa_context *c, void *userdata) {
pa_stream_set_read_callback(stream, stream_read_callback, NULL);
pa_stream_set_suspended_callback(stream, stream_suspended_callback, NULL);
pa_stream_set_moved_callback(stream, stream_moved_callback, NULL);
+ pa_stream_set_underflow_callback(stream, stream_underflow_callback, NULL);
+ pa_stream_set_overflow_callback(stream, stream_overflow_callback, NULL);
+ pa_stream_set_started_callback(stream, stream_started_callback, NULL);
+
+ if (latency > 0) {
+ memset(&buffer_attr, 0, sizeof(buffer_attr));
+ buffer_attr.tlength = (uint32_t) latency;
+ buffer_attr.minreq = (uint32_t) process_time;
+ buffer_attr.maxlength = (uint32_t) -1;
+ buffer_attr.prebuf = (uint32_t) -1;
+ flags |= PA_STREAM_ADJUST_LATENCY;
+ }
if (mode == PLAYBACK) {
pa_cvolume cv;
- if ((r = pa_stream_connect_playback(stream, device, NULL, flags, pa_cvolume_set(&cv, sample_spec.channels, volume), NULL)) < 0) {
- fprintf(stderr, "pa_stream_connect_playback() failed: %s\n", pa_strerror(pa_context_errno(c)));
+ if ((r = pa_stream_connect_playback(stream, device, latency > 0 ? &buffer_attr : NULL, flags, pa_cvolume_set(&cv, sample_spec.channels, volume), NULL)) < 0) {
+ fprintf(stderr, _("pa_stream_connect_playback() failed: %s\n"), pa_strerror(pa_context_errno(c)));
goto fail;
}
} else {
- if ((r = pa_stream_connect_record(stream, device, NULL, flags)) < 0) {
- fprintf(stderr, "pa_stream_connect_record() failed: %s\n", pa_strerror(pa_context_errno(c)));
+ if ((r = pa_stream_connect_record(stream, device, latency > 0 ? &buffer_attr : NULL, flags)) < 0) {
+ fprintf(stderr, _("pa_stream_connect_record() failed: %s\n"), pa_strerror(pa_context_errno(c)));
goto fail;
}
}
@@ -270,7 +304,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
case PA_CONTEXT_FAILED:
default:
- fprintf(stderr, "Connection failure: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Connection failure: %s\n"), pa_strerror(pa_context_errno(c)));
goto fail;
}
@@ -291,12 +325,12 @@ static void stream_drain_complete(pa_stream*s, int success, void *userdata) {
pa_operation *o;
if (!success) {
- fprintf(stderr, "Failed to drain stream: %s\n", pa_strerror(pa_context_errno(context)));
+ fprintf(stderr, _("Failed to drain stream: %s\n"), pa_strerror(pa_context_errno(context)));
quit(1);
}
if (verbose)
- fprintf(stderr, "Playback stream drained.\n");
+ fprintf(stderr, _("Playback stream drained.\n"));
pa_stream_disconnect(stream);
pa_stream_unref(stream);
@@ -306,7 +340,7 @@ static void stream_drain_complete(pa_stream*s, int success, void *userdata) {
pa_context_disconnect(context);
else {
if (verbose)
- fprintf(stderr, "Draining connection to server.\n");
+ fprintf(stderr, _("Draining connection to server.\n"));
}
}
@@ -332,13 +366,13 @@ static void stdin_callback(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_even
if ((r = read(fd, buffer, l)) <= 0) {
if (r == 0) {
if (verbose)
- fprintf(stderr, "Got EOF.\n");
+ fprintf(stderr, _("Got EOF.\n"));
if (stream) {
pa_operation *o;
if (!(o = pa_stream_drain(stream, stream_drain_complete, NULL))) {
- fprintf(stderr, "pa_stream_drain(): %s\n", pa_strerror(pa_context_errno(context)));
+ fprintf(stderr, _("pa_stream_drain(): %s\n"), pa_strerror(pa_context_errno(context)));
quit(1);
return;
}
@@ -348,7 +382,7 @@ static void stdin_callback(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_even
quit(0);
} else {
- fprintf(stderr, "read() failed: %s\n", strerror(errno));
+ fprintf(stderr, _("read() failed: %s\n"), strerror(errno));
quit(1);
}
@@ -357,7 +391,7 @@ static void stdin_callback(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_even
return;
}
- buffer_length = r;
+ buffer_length = (uint32_t) r;
buffer_index = 0;
if (w)
@@ -380,7 +414,7 @@ static void stdout_callback(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_eve
assert(buffer_length);
if ((r = write(fd, (uint8_t*) buffer+buffer_index, buffer_length)) <= 0) {
- fprintf(stderr, "write() failed: %s\n", strerror(errno));
+ fprintf(stderr, _("write() failed: %s\n"), strerror(errno));
quit(1);
mainloop_api->io_free(stdio_event);
@@ -388,8 +422,8 @@ static void stdout_callback(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_eve
return;
}
- buffer_length -= r;
- buffer_index += r;
+ buffer_length -= (uint32_t) r;
+ buffer_index += (uint32_t) r;
if (!buffer_length) {
pa_xfree(buffer);
@@ -401,28 +435,28 @@ static void stdout_callback(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_eve
/* UNIX signal to quit recieved */
static void exit_signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void *userdata) {
if (verbose)
- fprintf(stderr, "Got signal, exiting.\n");
+ fprintf(stderr, _("Got signal, exiting.\n"));
quit(0);
}
/* Show the current latency */
static void stream_update_timing_callback(pa_stream *s, int success, void *userdata) {
- pa_usec_t latency, usec;
+ pa_usec_t l, usec;
int negative = 0;
assert(s);
if (!success ||
pa_stream_get_time(s, &usec) < 0 ||
- pa_stream_get_latency(s, &latency, &negative) < 0) {
- fprintf(stderr, "Failed to get latency: %s\n", pa_strerror(pa_context_errno(context)));
+ pa_stream_get_latency(s, &l, &negative) < 0) {
+ fprintf(stderr, _("Failed to get latency: %s\n"), pa_strerror(pa_context_errno(context)));
quit(1);
return;
}
- fprintf(stderr, "Time: %0.3f sec; Latency: %0.0f usec. \r",
+ fprintf(stderr, _("Time: %0.3f sec; Latency: %0.0f usec. \r"),
(float) usec / 1000000,
- (float) latency * (negative?-1:1));
+ (float) l * (negative?-1.0f:1.0f));
}
/* Someone requested that the latency is shown */
@@ -440,7 +474,7 @@ static void time_event_callback(pa_mainloop_api*m, pa_time_event *e, const struc
if (stream && pa_stream_get_state(stream) == PA_STREAM_READY) {
pa_operation *o;
if (!(o = pa_stream_update_timing_info(stream, stream_update_timing_callback, NULL)))
- fprintf(stderr, "pa_stream_update_timing_info() failed: %s\n", pa_strerror(pa_context_errno(context)));
+ fprintf(stderr, _("pa_stream_update_timing_info() failed: %s\n"), pa_strerror(pa_context_errno(context)));
else
pa_operation_unref(o);
}
@@ -453,7 +487,7 @@ static void time_event_callback(pa_mainloop_api*m, pa_time_event *e, const struc
static void help(const char *argv0) {
- printf("%s [options]\n\n"
+ printf(_("%s [options]\n\n"
" -h, --help Show this help\n"
" --version Show version\n\n"
" -r, --record Create a connection for recording\n"
@@ -466,7 +500,7 @@ static void help(const char *argv0) {
" --volume=VOLUME Specify the initial (linear) volume in range 0...65536\n"
" --rate=SAMPLERATE The sample rate in Hz (defaults to 44100)\n"
" --format=SAMPLEFORMAT The sample type, one of s16le, s16be, u8, float32le,\n"
- " float32be, ulaw, alaw (defaults to s16ne)\n"
+ " float32be, ulaw, alaw, s32le, s32be (defaults to s16ne)\n"
" --channels=CHANNELS The number of channels, 1 for mono, 2 for stereo\n"
" (defaults to 2)\n"
" --channel-map=CHANNELMAP Channel map to use instead of the default\n"
@@ -478,6 +512,8 @@ static void help(const char *argv0) {
" from the sink the stream is being connected to.\n"
" --no-remix Don't upmix or downmix channels.\n"
" --no-remap Map channels by index instead of name.\n"
+ " --latency=BYTES Request the specified latency in bytes.\n"
+ " --process-time=BYTES Request the specified process time per request in bytes.\n")
,
argv0);
}
@@ -494,7 +530,9 @@ enum {
ARG_FIX_RATE,
ARG_FIX_CHANNELS,
ARG_NO_REMAP,
- ARG_NO_REMIX
+ ARG_NO_REMIX,
+ ARG_LATENCY,
+ ARG_PROCESS_TIME
};
int main(int argc, char *argv[]) {
@@ -504,28 +542,33 @@ int main(int argc, char *argv[]) {
pa_time_event *time_event = NULL;
static const struct option long_options[] = {
- {"record", 0, NULL, 'r'},
- {"playback", 0, NULL, 'p'},
- {"device", 1, NULL, 'd'},
- {"server", 1, NULL, 's'},
- {"client-name", 1, NULL, 'n'},
- {"stream-name", 1, NULL, ARG_STREAM_NAME},
- {"version", 0, NULL, ARG_VERSION},
- {"help", 0, NULL, 'h'},
- {"verbose", 0, NULL, 'v'},
- {"volume", 1, NULL, ARG_VOLUME},
- {"rate", 1, NULL, ARG_SAMPLERATE},
- {"format", 1, NULL, ARG_SAMPLEFORMAT},
- {"channels", 1, NULL, ARG_CHANNELS},
- {"channel-map", 1, NULL, ARG_CHANNELMAP},
- {"fix-format", 0, NULL, ARG_FIX_FORMAT},
- {"fix-rate", 0, NULL, ARG_FIX_RATE},
- {"fix-channels",0, NULL, ARG_FIX_CHANNELS},
- {"no-remap", 0, NULL, ARG_NO_REMAP},
- {"no-remix", 0, NULL, ARG_NO_REMIX},
- {NULL, 0, NULL, 0}
+ {"record", 0, NULL, 'r'},
+ {"playback", 0, NULL, 'p'},
+ {"device", 1, NULL, 'd'},
+ {"server", 1, NULL, 's'},
+ {"client-name", 1, NULL, 'n'},
+ {"stream-name", 1, NULL, ARG_STREAM_NAME},
+ {"version", 0, NULL, ARG_VERSION},
+ {"help", 0, NULL, 'h'},
+ {"verbose", 0, NULL, 'v'},
+ {"volume", 1, NULL, ARG_VOLUME},
+ {"rate", 1, NULL, ARG_SAMPLERATE},
+ {"format", 1, NULL, ARG_SAMPLEFORMAT},
+ {"channels", 1, NULL, ARG_CHANNELS},
+ {"channel-map", 1, NULL, ARG_CHANNELMAP},
+ {"fix-format", 0, NULL, ARG_FIX_FORMAT},
+ {"fix-rate", 0, NULL, ARG_FIX_RATE},
+ {"fix-channels", 0, NULL, ARG_FIX_CHANNELS},
+ {"no-remap", 0, NULL, ARG_NO_REMAP},
+ {"no-remix", 0, NULL, ARG_NO_REMIX},
+ {"latency", 1, NULL, ARG_LATENCY},
+ {"process-time", 1, NULL, ARG_PROCESS_TIME},
+ {NULL, 0, NULL, 0}
};
+ setlocale(LC_ALL, "");
+ bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
+
if (!(bn = strrchr(argv[0], '/')))
bn = argv[0];
else
@@ -545,7 +588,7 @@ int main(int argc, char *argv[]) {
goto quit;
case ARG_VERSION:
- printf("pacat "PACKAGE_VERSION"\nCompiled with libpulse %s\nLinked with libpulse %s\n", pa_get_headers_version(), pa_get_library_version());
+ printf(_("pacat %s\nCompiled with libpulse %s\nLinked with libpulse %s\n"), PACKAGE_VERSION, pa_get_headers_version(), pa_get_library_version());
ret = 0;
goto quit;
@@ -583,12 +626,12 @@ int main(int argc, char *argv[]) {
case ARG_VOLUME: {
int v = atoi(optarg);
- volume = v < 0 ? 0 : v;
+ volume = v < 0 ? 0U : (pa_volume_t) v;
break;
}
case ARG_CHANNELS:
- sample_spec.channels = atoi(optarg);
+ sample_spec.channels = (uint8_t) atoi(optarg);
break;
case ARG_SAMPLEFORMAT:
@@ -596,12 +639,12 @@ int main(int argc, char *argv[]) {
break;
case ARG_SAMPLERATE:
- sample_spec.rate = atoi(optarg);
+ sample_spec.rate = (uint32_t) atoi(optarg);
break;
case ARG_CHANNELMAP:
if (!pa_channel_map_parse(&channel_map, optarg)) {
- fprintf(stderr, "Invalid channel map\n");
+ fprintf(stderr, _("Invalid channel map '%s'\n"), optarg);
goto quit;
}
@@ -628,25 +671,39 @@ int main(int argc, char *argv[]) {
flags |= PA_STREAM_NO_REMAP_CHANNELS;
break;
+ case ARG_LATENCY:
+ if (((latency = (size_t) atoi(optarg))) <= 0) {
+ fprintf(stderr, _("Invalid latency specification '%s'\n"), optarg);
+ goto quit;
+ }
+ break;
+
+ case ARG_PROCESS_TIME:
+ if (((process_time = (size_t) atoi(optarg))) <= 0) {
+ fprintf(stderr, _("Invalid process time specification '%s'\n"), optarg);
+ goto quit;
+ }
+ break;
+
default:
goto quit;
}
}
if (!pa_sample_spec_valid(&sample_spec)) {
- fprintf(stderr, "Invalid sample specification\n");
+ fprintf(stderr, _("Invalid sample specification\n"));
goto quit;
}
- if (channel_map_set && channel_map.channels != sample_spec.channels) {
- fprintf(stderr, "Channel map doesn't match sample specification\n");
+ if (channel_map_set && pa_channel_map_compatible(&channel_map, &sample_spec)) {
+ fprintf(stderr, _("Channel map doesn't match sample specification\n"));
goto quit;
}
if (verbose) {
char t[PA_SAMPLE_SPEC_SNPRINT_MAX];
pa_sample_spec_snprint(t, sizeof(t), &sample_spec);
- fprintf(stderr, "Opening a %s stream with sample specification '%s'.\n", mode == RECORD ? "recording" : "playback", t);
+ fprintf(stderr, _("Opening a %s stream with sample specification '%s'.\n"), mode == RECORD ? _("recording") : _("playback"), t);
}
if (!(optind >= argc)) {
@@ -654,12 +711,12 @@ int main(int argc, char *argv[]) {
int fd;
if ((fd = open(argv[optind], mode == PLAYBACK ? O_RDONLY : O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) {
- fprintf(stderr, "open(): %s\n", strerror(errno));
+ fprintf(stderr, _("open(): %s\n"), strerror(errno));
goto quit;
}
if (dup2(fd, mode == PLAYBACK ? 0 : 1) < 0) {
- fprintf(stderr, "dup2(): %s\n", strerror(errno));
+ fprintf(stderr, _("dup2(): %s\n"), strerror(errno));
goto quit;
}
@@ -669,7 +726,7 @@ int main(int argc, char *argv[]) {
stream_name = pa_xstrdup(argv[optind]);
} else {
- fprintf(stderr, "Too many arguments.\n");
+ fprintf(stderr, _("Too many arguments.\n"));
goto quit;
}
}
@@ -682,7 +739,7 @@ int main(int argc, char *argv[]) {
/* Set up a new main loop */
if (!(m = pa_mainloop_new())) {
- fprintf(stderr, "pa_mainloop_new() failed.\n");
+ fprintf(stderr, _("pa_mainloop_new() failed.\n"));
goto quit;
}
@@ -703,20 +760,23 @@ int main(int argc, char *argv[]) {
mode == PLAYBACK ? STDIN_FILENO : STDOUT_FILENO,
mode == PLAYBACK ? PA_IO_EVENT_INPUT : PA_IO_EVENT_OUTPUT,
mode == PLAYBACK ? stdin_callback : stdout_callback, NULL))) {
- fprintf(stderr, "io_new() failed.\n");
+ fprintf(stderr, _("io_new() failed.\n"));
goto quit;
}
/* Create a new connection context */
if (!(context = pa_context_new(mainloop_api, client_name))) {
- fprintf(stderr, "pa_context_new() failed.\n");
+ fprintf(stderr, _("pa_context_new() failed.\n"));
goto quit;
}
pa_context_set_state_callback(context, context_state_callback, NULL);
/* Connect the context */
- pa_context_connect(context, server, 0, NULL);
+ if (pa_context_connect(context, server, 0, NULL) < 0) {
+ fprintf(stderr, _("pa_context_connect() failed: %s"), pa_strerror(pa_context_errno(context)));
+ goto quit;
+ }
if (verbose) {
struct timeval tv;
@@ -725,14 +785,14 @@ int main(int argc, char *argv[]) {
pa_timeval_add(&tv, TIME_EVENT_USEC);
if (!(time_event = mainloop_api->time_new(mainloop_api, &tv, time_event_callback, NULL))) {
- fprintf(stderr, "time_new() failed.\n");
+ fprintf(stderr, _("time_new() failed.\n"));
goto quit;
}
}
/* Run the main loop */
if (pa_mainloop_run(m, &ret) < 0) {
- fprintf(stderr, "pa_mainloop_run() failed.\n");
+ fprintf(stderr, _("pa_mainloop_run() failed.\n"));
goto quit;
}
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
index d411cc6..2c89c8d 100644
--- a/src/utils/pacmd.c
+++ b/src/utils/pacmd.c
@@ -1,5 +1,3 @@
-/* $Id: pacmd.c 2067 2007-11-21 01:30:40Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -33,15 +31,18 @@
#include <errno.h>
#include <string.h>
#include <sys/un.h>
+#include <locale.h>
#include <pulse/error.h>
#include <pulse/util.h>
+#include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/log.h>
#include <pulsecore/pid.h>
-int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
+int main(int argc, char*argv[]) {
pid_t pid ;
int fd = -1;
int ret = 1, i;
@@ -49,26 +50,35 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
char ibuf[256], obuf[256];
size_t ibuf_index, ibuf_length, obuf_index, obuf_length;
fd_set ifds, ofds;
+ char *cli;
+
+ setlocale(LC_ALL, "");
+ bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
if (pa_pid_file_check_running(&pid, "pulseaudio") < 0) {
- pa_log("no PulseAudio daemon running");
+ pa_log("No PulseAudio daemon running");
goto fail;
}
if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
- pa_log("socket(PF_UNIX, SOCK_STREAM, 0): %s", strerror(errno));
+ pa_log(_("socket(PF_UNIX, SOCK_STREAM, 0): %s"), strerror(errno));
goto fail;
}
memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_UNIX;
- pa_runtime_path("cli", sa.sun_path, sizeof(sa.sun_path));
+
+ if (!(cli = pa_runtime_path("cli")))
+ goto fail;
+
+ pa_strlcpy(sa.sun_path, cli, sizeof(sa.sun_path));
+ pa_xfree(cli);
for (i = 0; i < 5; i++) {
int r;
if ((r = connect(fd, (struct sockaddr*) &sa, sizeof(sa))) < 0 && (errno != ECONNREFUSED && errno != ENOENT)) {
- pa_log("connect(): %s", strerror(errno));
+ pa_log(_("connect(): %s"), strerror(errno));
goto fail;
}
@@ -76,7 +86,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
break;
if (pa_pid_file_kill(SIGUSR2, NULL, "pulseaudio") < 0) {
- pa_log("failed to kill PulseAudio daemon.");
+ pa_log(_("Failed to kill PulseAudio daemon."));
goto fail;
}
@@ -84,7 +94,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
}
if (i >= 5) {
- pa_log("daemon not responding.");
+ pa_log(_("Daemon not responding."));
goto fail;
}
@@ -99,7 +109,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
for (;;) {
if (select(FD_SETSIZE, &ifds, &ofds, NULL, NULL) < 0) {
- pa_log("select(): %s", strerror(errno));
+ pa_log(_("select(): %s"), strerror(errno));
goto fail;
}
@@ -111,7 +121,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
if (r == 0)
break;
- pa_log("read(): %s", strerror(errno));
+ pa_log(_("read(): %s"), strerror(errno));
goto fail;
}
@@ -127,7 +137,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
if (r == 0)
break;
- pa_log("read(): %s", strerror(errno));
+ pa_log(_("read(): %s"), strerror(errno));
goto fail;
}
@@ -140,7 +150,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
assert(obuf_length);
if ((r = write(1, obuf + obuf_index, obuf_length)) < 0) {
- pa_log("write(): %s", strerror(errno));
+ pa_log(_("write(): %s"), strerror(errno));
goto fail;
}
@@ -154,7 +164,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
assert(ibuf_length);
if ((r = write(fd, ibuf + ibuf_index, ibuf_length)) < 0) {
- pa_log("write(): %s", strerror(errno));
+ pa_log(_("write(): %s"), strerror(errno));
goto fail;
}
@@ -177,7 +187,6 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
FD_SET(fd, &ofds);
}
-
ret = 0;
fail:
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 863af24..2f430ca 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -1,5 +1,3 @@
-/* $Id: pactl.c 2182 2008-03-28 00:47:31Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -34,16 +32,14 @@
#include <stdlib.h>
#include <limits.h>
#include <getopt.h>
+#include <locale.h>
#include <sndfile.h>
+#include <pulse/i18n.h>
#include <pulse/pulseaudio.h>
#include <pulsecore/core-util.h>
-#if PA_API_VERSION < 10
-#error Invalid PulseAudio API version
-#endif
-
#define BUFSIZE 1024
static pa_context *context = NULL;
@@ -108,19 +104,19 @@ static void complete_action(void) {
static void stat_callback(pa_context *c, const pa_stat_info *i, void *userdata) {
char s[128];
if (!i) {
- fprintf(stderr, "Failed to get statistics: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get statistics: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
pa_bytes_snprint(s, sizeof(s), i->memblock_total_size);
- printf("Currently in use: %u blocks containing %s bytes total.\n", i->memblock_total, s);
+ printf(_("Currently in use: %u blocks containing %s bytes total.\n"), i->memblock_total, s);
pa_bytes_snprint(s, sizeof(s), i->memblock_allocated_size);
- printf("Allocated during whole lifetime: %u blocks containing %s bytes total.\n", i->memblock_allocated, s);
+ printf(_("Allocated during whole lifetime: %u blocks containing %s bytes total.\n"), i->memblock_allocated, s);
pa_bytes_snprint(s, sizeof(s), i->scache_size);
- printf("Sample cache size: %s\n", s);
+ printf(_("Sample cache size: %s\n"), s);
complete_action();
}
@@ -129,21 +125,21 @@ static void get_server_info_callback(pa_context *c, const pa_server_info *i, voi
char s[PA_SAMPLE_SPEC_SNPRINT_MAX];
if (!i) {
- fprintf(stderr, "Failed to get server information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get server information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec);
- printf("User name: %s\n"
+ printf(_("User name: %s\n"
"Host Name: %s\n"
"Server Name: %s\n"
"Server Version: %s\n"
"Default Sample Specification: %s\n"
"Default Sink: %s\n"
"Default Source: %s\n"
- "Cookie: %08x\n",
+ "Cookie: %08x\n"),
i->user_name,
i->host_name,
i->server_name,
@@ -158,9 +154,10 @@ static void get_server_info_callback(pa_context *c, const pa_server_info *i, voi
static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_last, void *userdata) {
char s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char *pl;
if (is_last < 0) {
- fprintf(stderr, "Failed to get sink information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get sink information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -176,38 +173,43 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
printf("\n");
nl = 1;
- printf("*** Sink #%u ***\n"
+ printf(_("*** Sink #%u ***\n"
"Name: %s\n"
"Driver: %s\n"
- "Description: %s\n"
"Sample Specification: %s\n"
"Channel Map: %s\n"
"Owner Module: %u\n"
"Volume: %s\n"
- "Monitor Source: %u\n"
- "Latency: %0.0f usec\n"
- "Flags: %s%s%s\n",
+ "Monitor Source: %s\n"
+ "Latency: %0.0f usec, configured %0.0f usec\n"
+ "Flags: %s%s%s%s%s%s\n"
+ "Properties:\n%s"),
i->index,
i->name,
- i->driver,
- i->description,
+ pa_strnull(i->driver),
pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
i->owner_module,
- i->mute ? "muted" : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
- i->monitor_source,
- (double) i->latency,
+ i->mute ? _("muted") : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+ pa_strnull(i->monitor_source_name),
+ (double) i->latency, (double) i->configured_latency,
+ i->flags & PA_SINK_HARDWARE ? "HARDWARE " : "",
+ i->flags & PA_SINK_NETWORK ? "NETWORK " : "",
+ i->flags & PA_SINK_HW_MUTE_CTRL ? "HW_MUTE_CTRL " : "",
i->flags & PA_SINK_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
+ i->flags & PA_SINK_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
i->flags & PA_SINK_LATENCY ? "LATENCY " : "",
- i->flags & PA_SINK_HARDWARE ? "HARDWARE" : "");
+ pl = pa_proplist_to_string(i->proplist));
+ pa_xfree(pl);
}
static void get_source_info_callback(pa_context *c, const pa_source_info *i, int is_last, void *userdata) {
- char s[PA_SAMPLE_SPEC_SNPRINT_MAX], t[32], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char *pl;
if (is_last < 0) {
- fprintf(stderr, "Failed to get source information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get source information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -223,40 +225,42 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int
printf("\n");
nl = 1;
- snprintf(t, sizeof(t), "%u", i->monitor_of_sink);
-
- printf("*** Source #%u ***\n"
+ printf(_("*** Source #%u ***\n"
"Name: %s\n"
"Driver: %s\n"
- "Description: %s\n"
"Sample Specification: %s\n"
"Channel Map: %s\n"
"Owner Module: %u\n"
"Volume: %s\n"
"Monitor of Sink: %s\n"
- "Latency: %0.0f usec\n"
- "Flags: %s%s%s\n",
+ "Latency: %0.0f usec, configured %0.0f usec\n"
+ "Flags: %s%s%s%s%s%s\n"
+ "Properties:\n%s"),
i->index,
i->name,
- i->driver,
- i->description,
+ pa_strnull(i->driver),
pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
i->owner_module,
i->mute ? "muted" : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
- i->monitor_of_sink != PA_INVALID_INDEX ? t : "no",
- (double) i->latency,
+ i->monitor_of_sink_name ? i->monitor_of_sink_name : _("n/a"),
+ (double) i->latency, (double) i->configured_latency,
+ i->flags & PA_SOURCE_HARDWARE ? "HARDWARE " : "",
+ i->flags & PA_SOURCE_NETWORK ? "NETWORK " : "",
+ i->flags & PA_SOURCE_HW_MUTE_CTRL ? "HW_MUTE_CTRL " : "",
i->flags & PA_SOURCE_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
+ i->flags & PA_SOURCE_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
i->flags & PA_SOURCE_LATENCY ? "LATENCY " : "",
- i->flags & PA_SOURCE_HARDWARE ? "HARDWARE" : "");
+ pl = pa_proplist_to_string(i->proplist));
+ pa_xfree(pl);
}
static void get_module_info_callback(pa_context *c, const pa_module_info *i, int is_last, void *userdata) {
char t[32];
if (is_last < 0) {
- fprintf(stderr, "Failed to get module information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get module information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -274,23 +278,24 @@ static void get_module_info_callback(pa_context *c, const pa_module_info *i, int
snprintf(t, sizeof(t), "%u", i->n_used);
- printf("*** Module #%u ***\n"
+ printf(_("*** Module #%u ***\n"
"Name: %s\n"
"Argument: %s\n"
"Usage counter: %s\n"
- "Auto unload: %s\n",
+ "Auto unload: %s\n"),
i->index,
i->name,
i->argument ? i->argument : "",
- i->n_used != PA_INVALID_INDEX ? t : "n/a",
- i->auto_unload ? "yes" : "no");
+ i->n_used != PA_INVALID_INDEX ? t : _("n/a"),
+ pa_yes_no(i->auto_unload));
}
static void get_client_info_callback(pa_context *c, const pa_client_info *i, int is_last, void *userdata) {
char t[32];
+ char *pl;
if (is_last < 0) {
- fprintf(stderr, "Failed to get client information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get client information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -308,21 +313,24 @@ static void get_client_info_callback(pa_context *c, const pa_client_info *i, int
snprintf(t, sizeof(t), "%u", i->owner_module);
- printf("*** Client #%u ***\n"
- "Name: %s\n"
+ printf(_("*** Client #%u ***\n"
"Driver: %s\n"
- "Owner Module: %s\n",
+ "Owner Module: %s\n"
+ "Properties:\n%s"),
i->index,
- i->name,
- i->driver,
- i->owner_module != PA_INVALID_INDEX ? t : "n/a");
+ pa_strnull(i->driver),
+ i->owner_module != PA_INVALID_INDEX ? t : _("n/a"),
+ pl = pa_proplist_to_string(i->proplist));
+
+ pa_xfree(pl);
}
static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info *i, int is_last, void *userdata) {
char t[32], k[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char *pl;
if (is_last < 0) {
- fprintf(stderr, "Failed to get sink input information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get sink input information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -341,8 +349,7 @@ static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info
snprintf(t, sizeof(t), "%u", i->owner_module);
snprintf(k, sizeof(k), "%u", i->client);
- printf("*** Sink Input #%u ***\n"
- "Name: %s\n"
+ printf(_("*** Sink Input #%u ***\n"
"Driver: %s\n"
"Owner Module: %s\n"
"Client: %s\n"
@@ -352,27 +359,30 @@ static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info
"Volume: %s\n"
"Buffer Latency: %0.0f usec\n"
"Sink Latency: %0.0f usec\n"
- "Resample method: %s\n",
+ "Resample method: %s\n"
+ "Properties:\n%s"),
i->index,
- i->name,
- i->driver,
- i->owner_module != PA_INVALID_INDEX ? t : "n/a",
- i->client != PA_INVALID_INDEX ? k : "n/a",
+ pa_strnull(i->driver),
+ i->owner_module != PA_INVALID_INDEX ? t : _("n/a"),
+ i->client != PA_INVALID_INDEX ? k : _("n/a"),
i->sink,
pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
- i->mute ? "muted" : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
+ i->mute ? _("muted") : pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
(double) i->buffer_usec,
(double) i->sink_usec,
- i->resample_method ? i->resample_method : "n/a");
-}
+ i->resample_method ? i->resample_method : _("n/a"),
+ pl = pa_proplist_to_string(i->proplist));
+ pa_xfree(pl);
+}
static void get_source_output_info_callback(pa_context *c, const pa_source_output_info *i, int is_last, void *userdata) {
char t[32], k[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char *pl;
if (is_last < 0) {
- fprintf(stderr, "Failed to get source output information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get source output information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -392,8 +402,7 @@ static void get_source_output_info_callback(pa_context *c, const pa_source_outpu
snprintf(t, sizeof(t), "%u", i->owner_module);
snprintf(k, sizeof(k), "%u", i->client);
- printf("*** Source Output #%u ***\n"
- "Name: %s\n"
+ printf(_("*** Source Output #%u ***\n"
"Driver: %s\n"
"Owner Module: %s\n"
"Client: %s\n"
@@ -402,25 +411,29 @@ static void get_source_output_info_callback(pa_context *c, const pa_source_outpu
"Channel Map: %s\n"
"Buffer Latency: %0.0f usec\n"
"Source Latency: %0.0f usec\n"
- "Resample method: %s\n",
+ "Resample method: %s\n"
+ "Properties:\n%s"),
i->index,
- i->name,
- i->driver,
- i->owner_module != PA_INVALID_INDEX ? t : "n/a",
- i->client != PA_INVALID_INDEX ? k : "n/a",
+ pa_strnull(i->driver),
+ i->owner_module != PA_INVALID_INDEX ? t : _("n/a"),
+ i->client != PA_INVALID_INDEX ? k : _("n/a"),
i->source,
pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
(double) i->buffer_usec,
(double) i->source_usec,
- i->resample_method ? i->resample_method : "n/a");
+ i->resample_method ? i->resample_method : _("n/a"),
+ pl = pa_proplist_to_string(i->proplist));
+
+ pa_xfree(pl);
}
static void get_sample_info_callback(pa_context *c, const pa_sample_info *i, int is_last, void *userdata) {
char t[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char *pl;
if (is_last < 0) {
- fprintf(stderr, "Failed to get sample information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get sample information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -439,7 +452,7 @@ static void get_sample_info_callback(pa_context *c, const pa_sample_info *i, int
pa_bytes_snprint(t, sizeof(t), i->bytes);
- printf("*** Sample #%u ***\n"
+ printf(_("*** Sample #%u ***\n"
"Name: %s\n"
"Volume: %s\n"
"Sample Specification: %s\n"
@@ -447,21 +460,25 @@ static void get_sample_info_callback(pa_context *c, const pa_sample_info *i, int
"Duration: %0.1fs\n"
"Size: %s\n"
"Lazy: %s\n"
- "Filename: %s\n",
+ "Filename: %s\n"
+ "Properties:\n%s"),
i->index,
i->name,
pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
- pa_sample_spec_valid(&i->sample_spec) ? pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec) : "n/a",
- pa_sample_spec_valid(&i->sample_spec) ? pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map) : "n/a",
+ pa_sample_spec_valid(&i->sample_spec) ? pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec) : _("n/a"),
+ pa_sample_spec_valid(&i->sample_spec) ? pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map) : _("n/a"),
(double) i->duration/1000000,
t,
- i->lazy ? "yes" : "no",
- i->filename ? i->filename : "n/a");
+ pa_yes_no(i->lazy),
+ i->filename ? i->filename : _("n/a"),
+ pl = pa_proplist_to_string(i->proplist));
+
+ pa_xfree(pl);
}
static void get_autoload_info_callback(pa_context *c, const pa_autoload_info *i, int is_last, void *userdata) {
if (is_last < 0) {
- fprintf(stderr, "Failed to get autoload information: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failed to get autoload information: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -477,21 +494,21 @@ static void get_autoload_info_callback(pa_context *c, const pa_autoload_info *i,
printf("\n");
nl = 1;
- printf("*** Autoload Entry #%u ***\n"
+ printf(_("*** Autoload Entry #%u ***\n"
"Name: %s\n"
"Type: %s\n"
"Module: %s\n"
- "Argument: %s\n",
+ "Argument: %s\n"),
i->index,
i->name,
- i->type == PA_AUTOLOAD_SINK ? "sink" : "source",
+ i->type == PA_AUTOLOAD_SINK ? _("sink") : _("source"),
i->module,
i->argument ? i->argument : "");
}
static void simple_callback(pa_context *c, int success, void *userdata) {
if (!success) {
- fprintf(stderr, "Failure: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failure: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -501,7 +518,7 @@ static void simple_callback(pa_context *c, int success, void *userdata) {
static void index_callback(pa_context *c, uint32_t idx, void *userdata) {
if (idx == PA_INVALID_INDEX) {
- fprintf(stderr, "Failure: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failure: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -525,7 +542,7 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
case PA_STREAM_FAILED:
default:
- fprintf(stderr, "Failed to upload sample: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
+ fprintf(stderr, _("Failed to upload sample: %s\n"), pa_strerror(pa_context_errno(pa_stream_get_context(s))));
quit(1);
}
}
@@ -538,11 +555,11 @@ static void stream_write_callback(pa_stream *s, size_t length, void *userdata) {
d = pa_xmalloc(length);
assert(sample_length >= length);
- l = length/pa_frame_size(&sample_spec);
+ l = (sf_count_t) (length/pa_frame_size(&sample_spec));
if ((sf_readf_float(sndfile, d, l)) != l) {
pa_xfree(d);
- fprintf(stderr, "Premature end of file\n");
+ fprintf(stderr, _("Premature end of file\n"));
quit(1);
}
@@ -590,8 +607,8 @@ static void context_state_callback(pa_context *c, void *userdata) {
break;
case EXIT:
- pa_operation_unref(pa_context_exit_daemon(c, NULL, NULL));
- drain();
+ pa_operation_unref(pa_context_exit_daemon(c, simple_callback, NULL));
+ break;
case LIST:
actions = 8;
@@ -646,19 +663,19 @@ static void context_state_callback(pa_context *c, void *userdata) {
case PA_CONTEXT_FAILED:
default:
- fprintf(stderr, "Connection failure: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Connection failure: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
}
}
static void exit_signal_callback(pa_mainloop_api *m, pa_signal_event *e, int sig, void *userdata) {
- fprintf(stderr, "Got SIGINT, exiting.\n");
+ fprintf(stderr, _("Got SIGINT, exiting.\n"));
quit(0);
}
static void help(const char *argv0) {
- printf("%s [options] stat\n"
+ printf(_("%s [options] stat\n"
"%s [options] list\n"
"%s [options] exit\n"
"%s [options] upload-sample FILENAME [NAME]\n"
@@ -673,7 +690,7 @@ static void help(const char *argv0) {
" -h, --help Show this help\n"
" --version Show version\n\n"
" -s, --server=SERVER The name of the server to connect to\n"
- " -n, --client-name=NAME How to call this client on the server\n",
+ " -n, --client-name=NAME How to call this client on the server\n"),
argv0, argv0, argv0, argv0, argv0, argv0, argv0, argv0, argv0, argv0, argv0, argv0);
}
@@ -693,6 +710,9 @@ int main(int argc, char *argv[]) {
{NULL, 0, NULL, 0}
};
+ setlocale(LC_ALL, "");
+ bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
+
if (!(bn = strrchr(argv[0], '/')))
bn = argv[0];
else
@@ -706,7 +726,12 @@ int main(int argc, char *argv[]) {
goto quit;
case ARG_VERSION:
- printf("pactl "PACKAGE_VERSION"\nCompiled with libpulse %s\nLinked with libpulse %s\n", pa_get_headers_version(), pa_get_library_version());
+ printf(_("pactl %s\n"
+ "Compiled with libpulse %s\n"
+ "Linked with libpulse %s\n"),
+ PACKAGE_VERSION,
+ pa_get_headers_version(),
+ pa_get_library_version());
ret = 0;
goto quit;
@@ -740,7 +765,7 @@ int main(int argc, char *argv[]) {
action = UPLOAD_SAMPLE;
if (optind+1 >= argc) {
- fprintf(stderr, "Please specify a sample file to load\n");
+ fprintf(stderr, _("Please specify a sample file to load\n"));
goto quit;
}
@@ -762,19 +787,19 @@ int main(int argc, char *argv[]) {
memset(&sfinfo, 0, sizeof(sfinfo));
if (!(sndfile = sf_open(argv[optind+1], SFM_READ, &sfinfo))) {
- fprintf(stderr, "Failed to open sound file.\n");
+ fprintf(stderr, _("Failed to open sound file.\n"));
goto quit;
}
- sample_spec.format = PA_SAMPLE_FLOAT32;
- sample_spec.rate = sfinfo.samplerate;
- sample_spec.channels = sfinfo.channels;
+ sample_spec.format = PA_SAMPLE_FLOAT32;
+ sample_spec.rate = (uint32_t) sfinfo.samplerate;
+ sample_spec.channels = (uint8_t) sfinfo.channels;
- sample_length = sfinfo.frames*pa_frame_size(&sample_spec);
+ sample_length = (size_t)sfinfo.frames*pa_frame_size(&sample_spec);
} else if (!strcmp(argv[optind], "play-sample")) {
action = PLAY_SAMPLE;
if (argc != optind+2 && argc != optind+3) {
- fprintf(stderr, "You have to specify a sample name to play\n");
+ fprintf(stderr, _("You have to specify a sample name to play\n"));
goto quit;
}
@@ -786,7 +811,7 @@ int main(int argc, char *argv[]) {
} else if (!strcmp(argv[optind], "remove-sample")) {
action = REMOVE_SAMPLE;
if (argc != optind+2) {
- fprintf(stderr, "You have to specify a sample name to remove\n");
+ fprintf(stderr, _("You have to specify a sample name to remove\n"));
goto quit;
}
@@ -794,20 +819,20 @@ int main(int argc, char *argv[]) {
} else if (!strcmp(argv[optind], "move-sink-input")) {
action = MOVE_SINK_INPUT;
if (argc != optind+3) {
- fprintf(stderr, "You have to specify a sink input index and a sink\n");
+ fprintf(stderr, _("You have to specify a sink input index and a sink\n"));
goto quit;
}
- sink_input_idx = atoi(argv[optind+1]);
+ sink_input_idx = (uint32_t) atoi(argv[optind+1]);
sink_name = pa_xstrdup(argv[optind+2]);
} else if (!strcmp(argv[optind], "move-source-output")) {
action = MOVE_SOURCE_OUTPUT;
if (argc != optind+3) {
- fprintf(stderr, "You have to specify a source output index and a source\n");
+ fprintf(stderr, _("You have to specify a source output index and a source\n"));
goto quit;
}
- source_output_idx = atoi(argv[optind+1]);
+ source_output_idx = (uint32_t) atoi(argv[optind+1]);
source_name = pa_xstrdup(argv[optind+2]);
} else if (!strcmp(argv[optind], "load-module")) {
int i;
@@ -817,7 +842,7 @@ int main(int argc, char *argv[]) {
action = LOAD_MODULE;
if (argc <= optind+1) {
- fprintf(stderr, "You have to specify a module name and arguments.\n");
+ fprintf(stderr, _("You have to specify a module name and arguments.\n"));
goto quit;
}
@@ -827,7 +852,7 @@ int main(int argc, char *argv[]) {
n += strlen(argv[i])+1;
if (n > 0) {
- p = module_args = pa_xnew0(char, n);
+ p = module_args = pa_xmalloc(n);
for (i = optind+2; i < argc; i++)
p += sprintf(p, "%s%s", p == module_args ? "" : " ", argv[i]);
@@ -837,17 +862,17 @@ int main(int argc, char *argv[]) {
action = UNLOAD_MODULE;
if (argc != optind+2) {
- fprintf(stderr, "You have to specify a module index\n");
+ fprintf(stderr, _("You have to specify a module index\n"));
goto quit;
}
- module_index = atoi(argv[optind+1]);
+ module_index = (uint32_t) atoi(argv[optind+1]);
} else if (!strcmp(argv[optind], "suspend-sink")) {
action = SUSPEND_SINK;
if (argc > optind+3 || optind+1 >= argc) {
- fprintf(stderr, "You may not specify more than one sink. You have to specify at least one boolean value.\n");
+ fprintf(stderr, _("You may not specify more than one sink. You have to specify at least one boolean value.\n"));
goto quit;
}
@@ -860,7 +885,7 @@ int main(int argc, char *argv[]) {
action = SUSPEND_SOURCE;
if (argc > optind+3 || optind+1 >= argc) {
- fprintf(stderr, "You may not specify more than one source. You have to specify at least one boolean value.\n");
+ fprintf(stderr, _("You may not specify more than one source. You have to specify at least one boolean value.\n"));
goto quit;
}
@@ -868,16 +893,20 @@ int main(int argc, char *argv[]) {
if (argc > optind+2)
source_name = pa_xstrdup(argv[optind+1]);
+ } else if (!strcmp(argv[optind], "help")) {
+ help(bn);
+ ret = 0;
+ goto quit;
}
}
if (action == NONE) {
- fprintf(stderr, "No valid command specified.\n");
+ fprintf(stderr, _("No valid command specified.\n"));
goto quit;
}
if (!(m = pa_mainloop_new())) {
- fprintf(stderr, "pa_mainloop_new() failed.\n");
+ fprintf(stderr, _("pa_mainloop_new() failed.\n"));
goto quit;
}
@@ -891,7 +920,7 @@ int main(int argc, char *argv[]) {
#endif
if (!(context = pa_context_new(mainloop_api, client_name))) {
- fprintf(stderr, "pa_context_new() failed.\n");
+ fprintf(stderr, _("pa_context_new() failed.\n"));
goto quit;
}
@@ -899,7 +928,7 @@ int main(int argc, char *argv[]) {
pa_context_connect(context, server, 0, NULL);
if (pa_mainloop_run(m, &ret) < 0) {
- fprintf(stderr, "pa_mainloop_run() failed.\n");
+ fprintf(stderr, _("pa_mainloop_run() failed.\n"));
goto quit;
}
diff --git a/src/utils/padsp b/src/utils/padsp
index 54a455a..4fe175c 100755
--- a/src/utils/padsp
+++ b/src/utils/padsp
@@ -1,7 +1,5 @@
#!/bin/sh
-# $Id: padsp 1426 2007-02-13 15:35:19Z ossman $
-#
# This file is part of PulseAudio.
#
# Copyright 2006 Lennart Poettering
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index c9897e9..2e6e557 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -1,5 +1,3 @@
-/* $Id: padsp.c 2183 2008-03-28 00:51:36Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -53,8 +51,8 @@
#endif
#include <pulse/pulseaudio.h>
+#include <pulse/gccmacro.h>
#include <pulsecore/llist.h>
-#include <pulsecore/gccmacro.h>
/* On some systems SIOCINQ isn't defined, but FIONREAD is just an alias */
#if !defined(SIOCINQ) && defined(FIONREAD)
@@ -302,7 +300,6 @@ static int padsp_disabled(void) {
if (!sym_resolved) {
sym = (int*) dlsym(RTLD_DEFAULT, "__padsp_disabled__");
sym_resolved = 1;
-
}
pthread_mutex_unlock(&func_mutex);
@@ -316,7 +313,7 @@ static int dsp_cloak_enable(void) {
if (padsp_disabled() & 1)
return 0;
- if (getenv("PADSP_NO_DSP"))
+ if (getenv("PADSP_NO_DSP") || getenv("PULSE_INTERNAL"))
return 0;
return 1;
@@ -326,7 +323,7 @@ static int sndstat_cloak_enable(void) {
if (padsp_disabled() & 2)
return 0;
- if (getenv("PADSP_NO_SNDSTAT"))
+ if (getenv("PADSP_NO_SNDSTAT") || getenv("PULSE_INTERNAL"))
return 0;
return 1;
@@ -336,7 +333,7 @@ static int mixer_cloak_enable(void) {
if (padsp_disabled() & 4)
return 0;
- if (getenv("PADSP_NO_MIXER"))
+ if (getenv("PADSP_NO_MIXER") || getenv("PULSE_INTERNAL"))
return 0;
return 1;
@@ -425,7 +422,7 @@ static void fd_info_unref(fd_info *i) {
pthread_mutex_lock(&i->mutex);
assert(i->ref >= 1);
r = --i->ref;
- debug(DEBUG_LEVEL_VERBOSE, __FILE__": ref--, now %i\n", i->ref);
+ debug(DEBUG_LEVEL_VERBOSE, __FILE__": ref--, now %i\n", i->ref);
pthread_mutex_unlock(&i->mutex);
if (r <= 0)
@@ -501,7 +498,6 @@ static void atfork_prepare(void) {
pthread_mutex_lock(&func_mutex);
-
debug(DEBUG_LEVEL_NORMAL, __FILE__": atfork_prepare() exit\n");
}
@@ -553,12 +549,14 @@ static void atfork_child(void) {
}
if (i->app_fd >= 0) {
- close(i->app_fd);
+ LOAD_CLOSE_FUNC();
+ _close(i->app_fd);
i->app_fd = -1;
}
if (i->thread_fd >= 0) {
- close(i->thread_fd);
+ LOAD_CLOSE_FUNC();
+ _close(i->thread_fd);
i->thread_fd = -1;
}
@@ -751,7 +749,7 @@ static void fix_metrics(fd_info *i) {
/* Number of fragments set? */
if (i->n_fragments < 2) {
if (i->fragment_size > 0) {
- i->n_fragments = pa_bytes_per_second(&i->sample_spec) / 2 / i->fragment_size;
+ i->n_fragments = (unsigned) (pa_bytes_per_second(&i->sample_spec) / 2 / i->fragment_size);
if (i->n_fragments < 2)
i->n_fragments = 2;
} else
@@ -867,7 +865,7 @@ static int fd_info_copy_data(fd_info *i, int force) {
return -1;
}
- if (pa_stream_write(i->play_stream, i->buf, r, free, 0, PA_SEEK_RELATIVE) < 0) {
+ if (pa_stream_write(i->play_stream, i->buf, (size_t) r, free, 0LL, PA_SEEK_RELATIVE) < 0) {
debug(DEBUG_LEVEL_NORMAL, __FILE__": pa_stream_write(): %s\n", pa_strerror(pa_context_errno(i->context)));
return -1;
}
@@ -875,7 +873,7 @@ static int fd_info_copy_data(fd_info *i, int force) {
i->buf = NULL;
assert(n >= (size_t) r);
- n -= r;
+ n -= (size_t) r;
}
if (n >= i->fragment_size)
@@ -919,7 +917,7 @@ static int fd_info_copy_data(fd_info *i, int force) {
}
assert((size_t)r <= len - i->rec_offset);
- i->rec_offset += r;
+ i->rec_offset += (size_t) r;
if (i->rec_offset == len) {
if (pa_stream_drop(i->rec_stream) < 0) {
@@ -930,7 +928,7 @@ static int fd_info_copy_data(fd_info *i, int force) {
}
assert(n >= (size_t) r);
- n -= r;
+ n -= (size_t) r;
}
if (n >= i->fragment_size)
@@ -946,6 +944,10 @@ static int fd_info_copy_data(fd_info *i, int force) {
api->io_enable(i->io_event, i->io_flags);
}
+ /* So, we emptied the socket now, let's tell dsp_empty_socket()
+ * about this */
+ pa_threaded_mainloop_signal(i->mainloop, 0);
+
return 0;
}
@@ -1001,12 +1003,12 @@ static int create_playback_stream(fd_info *i) {
pa_stream_set_latency_update_callback(i->play_stream, stream_latency_update_cb, i);
memset(&attr, 0, sizeof(attr));
- attr.maxlength = i->fragment_size * (i->n_fragments+1);
- attr.tlength = i->fragment_size * i->n_fragments;
- attr.prebuf = i->fragment_size;
- attr.minreq = i->fragment_size;
+ attr.maxlength = (uint32_t) (i->fragment_size * (i->n_fragments+1));
+ attr.tlength = (uint32_t) (i->fragment_size * i->n_fragments);
+ attr.prebuf = (uint32_t) i->fragment_size;
+ attr.minreq = (uint32_t) i->fragment_size;
- flags = PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE;
+ flags = PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_EARLY_REQUESTS;
if (i->play_precork) {
flags |= PA_STREAM_START_CORKED;
debug(DEBUG_LEVEL_NORMAL, __FILE__": creating stream corked\n");
@@ -1016,9 +1018,9 @@ static int create_playback_stream(fd_info *i) {
goto fail;
}
- n = i->fragment_size;
+ n = (int) i->fragment_size;
setsockopt(i->app_fd, SOL_SOCKET, SO_SNDBUF, &n, sizeof(n));
- n = i->fragment_size;
+ n = (int) i->fragment_size;
setsockopt(i->thread_fd, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n));
return 0;
@@ -1045,8 +1047,8 @@ static int create_record_stream(fd_info *i) {
pa_stream_set_latency_update_callback(i->rec_stream, stream_latency_update_cb, i);
memset(&attr, 0, sizeof(attr));
- attr.maxlength = i->fragment_size * (i->n_fragments+1);
- attr.fragsize = i->fragment_size;
+ attr.maxlength = (uint32_t) (i->fragment_size * (i->n_fragments+1));
+ attr.fragsize = (uint32_t) i->fragment_size;
flags = PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE;
if (i->rec_precork) {
@@ -1058,9 +1060,9 @@ static int create_record_stream(fd_info *i) {
goto fail;
}
- n = i->fragment_size;
+ n = (int) i->fragment_size;
setsockopt(i->app_fd, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n));
- n = i->fragment_size;
+ n = (int) i->fragment_size;
setsockopt(i->thread_fd, SOL_SOCKET, SO_SNDBUF, &n, sizeof(n));
return 0;
@@ -1477,7 +1479,7 @@ int open(const char *filename, int flags, ...) {
if (flags & O_CREAT) {
va_start(args, flags);
if (sizeof(mode_t) < sizeof(int))
- mode = va_arg(args, int);
+ mode = (mode_t) va_arg(args, int);
else
mode = va_arg(args, mode_t);
va_end(args);
@@ -2253,7 +2255,7 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
for (;;) {
pa_usec_t usec;
- PLAYBACK_STREAM_CHECK_DEAD_GOTO(i, exit_loop);
+ PLAYBACK_STREAM_CHECK_DEAD_GOTO(i, exit_loop2);
if (pa_stream_get_time(i->play_stream, &usec) >= 0) {
size_t k = pa_usec_to_bytes(usec, &i->sample_spec);
@@ -2275,6 +2277,8 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
pa_threaded_mainloop_wait(i->mainloop);
}
+ exit_loop2:
+
pa_threaded_mainloop_unlock(i->mainloop);
debug(DEBUG_LEVEL_NORMAL, __FILE__": GETOPTR bytes=%i, blocks=%i, ptr=%i\n", info->bytes, info->blocks, info->ptr);
diff --git a/src/utils/paplay.c b/src/utils/paplay.c
index ecb4b71..df2edf6 100644
--- a/src/utils/paplay.c
+++ b/src/utils/paplay.c
@@ -1,5 +1,3 @@
-/* $Id: paplay.c 2025 2007-11-05 23:56:30Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -39,10 +37,7 @@
#include <sndfile.h>
#include <pulse/pulseaudio.h>
-
-#if PA_API_VERSION < 9
-#error Invalid PulseAudio API version
-#endif
+#include <pulse/i18n.h>
static pa_context *context = NULL;
static pa_stream *stream = NULL;
@@ -77,12 +72,12 @@ static void stream_drain_complete(pa_stream*s, int success, void *userdata) {
pa_operation *o;
if (!success) {
- fprintf(stderr, "Failed to drain stream: %s\n", pa_strerror(pa_context_errno(context)));
+ fprintf(stderr, _("Failed to drain stream: %s\n"), pa_strerror(pa_context_errno(context)));
quit(1);
}
if (verbose)
- fprintf(stderr, "Playback stream drained.\n");
+ fprintf(stderr, _("Playback stream drained.\n"));
pa_stream_disconnect(stream);
pa_stream_unref(stream);
@@ -94,7 +89,7 @@ static void stream_drain_complete(pa_stream*s, int success, void *userdata) {
pa_operation_unref(o);
if (verbose)
- fprintf(stderr, "Draining connection to server.\n");
+ fprintf(stderr, _("Draining connection to server.\n"));
}
}
@@ -112,14 +107,14 @@ static void stream_write_callback(pa_stream *s, size_t length, void *userdata) {
if (readf_function) {
size_t k = pa_frame_size(&sample_spec);
- if ((bytes = readf_function(sndfile, data, length/k)) > 0)
- bytes *= k;
+ if ((bytes = readf_function(sndfile, data, (sf_count_t) (length/k))) > 0)
+ bytes *= (sf_count_t) k;
} else
- bytes = sf_read_raw(sndfile, data, length);
+ bytes = sf_read_raw(sndfile, data, (sf_count_t) length);
if (bytes > 0)
- pa_stream_write(s, data, bytes, pa_xfree, 0, PA_SEEK_RELATIVE);
+ pa_stream_write(s, data, (size_t) bytes, pa_xfree, 0, PA_SEEK_RELATIVE);
else
pa_xfree(data);
@@ -141,12 +136,12 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
case PA_STREAM_READY:
if (verbose)
- fprintf(stderr, "Stream successfully created\n");
+ fprintf(stderr, _("Stream successfully created\n"));
break;
case PA_STREAM_FAILED:
default:
- fprintf(stderr, "Stream errror: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
+ fprintf(stderr, _("Stream errror: %s\n"), pa_strerror(pa_context_errno(pa_stream_get_context(s))));
quit(1);
}
}
@@ -167,7 +162,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
assert(c && !stream);
if (verbose)
- fprintf(stderr, "Connection established.\n");
+ fprintf(stderr, _("Connection established.\n"));
stream = pa_stream_new(c, stream_name, &sample_spec, channel_map_set ? &channel_map : NULL);
assert(stream);
@@ -185,7 +180,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
case PA_CONTEXT_FAILED:
default:
- fprintf(stderr, "Connection failure: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Connection failure: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
}
}
@@ -193,14 +188,14 @@ static void context_state_callback(pa_context *c, void *userdata) {
/* UNIX signal to quit recieved */
static void exit_signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void *userdata) {
if (verbose)
- fprintf(stderr, "Got SIGINT, exiting.\n");
+ fprintf(stderr, _("Got SIGINT, exiting.\n"));
quit(0);
}
static void help(const char *argv0) {
- printf("%s [options] [FILE]\n\n"
+ printf(_("%s [options] [FILE]\n\n"
" -h, --help Show this help\n"
" --version Show version\n\n"
" -v, --verbose Enable verbose operation\n\n"
@@ -209,7 +204,7 @@ static void help(const char *argv0) {
" -n, --client-name=NAME How to call this client on the server\n"
" --stream-name=NAME How to call this stream on the server\n"
" --volume=VOLUME Specify the initial (linear) volume in range 0...65536\n"
- " --channel-map=CHANNELMAP Set the channel map to the use\n",
+ " --channel-map=CHANNELMAP Set the channel map to the use\n"),
argv0);
}
@@ -241,6 +236,7 @@ int main(int argc, char *argv[]) {
};
setlocale(LC_ALL, "");
+ bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
if (!(bn = strrchr(argv[0], '/')))
bn = argv[0];
@@ -256,7 +252,8 @@ int main(int argc, char *argv[]) {
goto quit;
case ARG_VERSION:
- printf("paplay "PACKAGE_VERSION"\nCompiled with libpulse %s\nLinked with libpulse %s\n", pa_get_headers_version(), pa_get_library_version());
+ printf(_("paplay %s\nCompiled with libpulse %s\n"
+ "Linked with libpulse %s\n"), PACKAGE_VERSION, pa_get_headers_version(), pa_get_library_version());
ret = 0;
goto quit;
@@ -286,13 +283,13 @@ int main(int argc, char *argv[]) {
case ARG_VOLUME: {
int v = atoi(optarg);
- volume = v < 0 ? 0 : v;
+ volume = v < 0 ? 0U : (pa_volume_t) v;
break;
}
case ARG_CHANNELMAP:
if (!pa_channel_map_parse(&channel_map, optarg)) {
- fprintf(stderr, "Invalid channel map\n");
+ fprintf(stderr, _("Invalid channel map\n"));
goto quit;
}
@@ -314,12 +311,12 @@ int main(int argc, char *argv[]) {
sndfile = sf_open_fd(STDIN_FILENO, SFM_READ, &sfinfo, 0);
if (!sndfile) {
- fprintf(stderr, "Failed to open file '%s'\n", filename);
+ fprintf(stderr, _("Failed to open file '%s'\n"), filename);
goto quit;
}
- sample_spec.rate = sfinfo.samplerate;
- sample_spec.channels = sfinfo.channels;
+ sample_spec.rate = (uint32_t) sfinfo.samplerate;
+ sample_spec.channels = (uint8_t) sfinfo.channels;
readf_function = NULL;
@@ -350,7 +347,7 @@ int main(int argc, char *argv[]) {
assert(pa_sample_spec_valid(&sample_spec));
if (channel_map_set && channel_map.channels != sample_spec.channels) {
- fprintf(stderr, "Channel map doesn't match file.\n");
+ fprintf(stderr, _("Channel map doesn't match file.\n"));
goto quit;
}
@@ -376,12 +373,12 @@ int main(int argc, char *argv[]) {
if (verbose) {
char t[PA_SAMPLE_SPEC_SNPRINT_MAX];
pa_sample_spec_snprint(t, sizeof(t), &sample_spec);
- fprintf(stderr, "Using sample spec '%s'\n", t);
+ fprintf(stderr, _("Using sample spec '%s'\n"), t);
}
/* Set up a new main loop */
if (!(m = pa_mainloop_new())) {
- fprintf(stderr, "pa_mainloop_new() failed.\n");
+ fprintf(stderr, _("pa_mainloop_new() failed.\n"));
goto quit;
}
@@ -396,7 +393,7 @@ int main(int argc, char *argv[]) {
/* Create a new connection context */
if (!(context = pa_context_new(mainloop_api, client_name))) {
- fprintf(stderr, "pa_context_new() failed.\n");
+ fprintf(stderr, _("pa_context_new() failed.\n"));
goto quit;
}
@@ -407,7 +404,7 @@ int main(int argc, char *argv[]) {
/* Run the main loop */
if (pa_mainloop_run(m, &ret) < 0) {
- fprintf(stderr, "pa_mainloop_run() failed.\n");
+ fprintf(stderr, _("pa_mainloop_run() failed.\n"));
goto quit;
}
diff --git a/src/utils/pasuspender.c b/src/utils/pasuspender.c
index b73e1d6..8a59d5e 100644
--- a/src/utils/pasuspender.c
+++ b/src/utils/pasuspender.c
@@ -1,5 +1,3 @@
-/* $Id: pasuspender.c 2028 2007-11-07 13:52:07Z lennart $ */
-
/***
This file is part of PulseAudio.
@@ -37,20 +35,16 @@
#include <stdlib.h>
#include <limits.h>
#include <getopt.h>
-
-#include <sndfile.h>
+#include <locale.h>
#ifdef __linux__
#include <sys/prctl.h>
#endif
+#include <pulse/i18n.h>
#include <pulse/pulseaudio.h>
#include <pulsecore/macro.h>
-#if PA_API_VERSION < 10
-#error Invalid PulseAudio API version
-#endif
-
#define BUFSIZE 1024
static pa_context *context = NULL;
@@ -84,7 +78,7 @@ static void start_child(void) {
if ((child_pid = fork()) < 0) {
- fprintf(stderr, "fork(): %s\n", strerror(errno));
+ fprintf(stderr, _("fork(): %s\n"), strerror(errno));
quit(1);
} else if (child_pid == 0) {
@@ -95,7 +89,7 @@ static void start_child(void) {
#endif
if (execvp(child_argv[0], child_argv) < 0)
- fprintf(stderr, "execvp(): %s\n", strerror(errno));
+ fprintf(stderr, _("execvp(): %s\n"), strerror(errno));
_exit(1);
@@ -112,7 +106,7 @@ static void suspend_complete(pa_context *c, int success, void *userdata) {
n++;
if (!success) {
- fprintf(stderr, "Failure to suspend: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failure to suspend: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -127,7 +121,7 @@ static void resume_complete(pa_context *c, int success, void *userdata) {
n++;
if (!success) {
- fprintf(stderr, "Failure to resume: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Failure to resume: %s\n"), pa_strerror(pa_context_errno(c)));
quit(1);
return;
}
@@ -150,7 +144,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
pa_operation_unref(pa_context_suspend_sink_by_index(c, PA_INVALID_INDEX, 1, suspend_complete, NULL));
pa_operation_unref(pa_context_suspend_source_by_index(c, PA_INVALID_INDEX, 1, suspend_complete, NULL));
} else {
- fprintf(stderr, "WARNING: Sound server is not local, not suspending.\n");
+ fprintf(stderr, _("WARNING: Sound server is not local, not suspending.\n"));
start_child();
}
@@ -162,7 +156,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
case PA_CONTEXT_FAILED:
default:
- fprintf(stderr, "Connection failure: %s\n", pa_strerror(pa_context_errno(c)));
+ fprintf(stderr, _("Connection failure: %s\n"), pa_strerror(pa_context_errno(c)));
pa_context_unref(context);
context = NULL;
@@ -179,7 +173,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
}
static void sigint_callback(pa_mainloop_api *m, pa_signal_event *e, int sig, void *userdata) {
- fprintf(stderr, "Got SIGINT, exiting.\n");
+ fprintf(stderr, _("Got SIGINT, exiting.\n"));
quit(0);
}
@@ -197,7 +191,7 @@ static void sigchld_callback(pa_mainloop_api *m, pa_signal_event *e, int sig, vo
if (WIFEXITED(status))
child_ret = WEXITSTATUS(status);
else if (WIFSIGNALED(status)) {
- fprintf(stderr, "WARNING: Child process terminated by signal %u\n", WTERMSIG(status));
+ fprintf(stderr, _("WARNING: Child process terminated by signal %u\n"), WTERMSIG(status));
child_ret = 1;
}
@@ -215,10 +209,10 @@ static void sigchld_callback(pa_mainloop_api *m, pa_signal_event *e, int sig, vo
static void help(const char *argv0) {
- printf("%s [options] ... \n\n"
+ printf(_("%s [options] ... \n\n"
" -h, --help Show this help\n"
" --version Show version\n"
- " -s, --server=SERVER The name of the server to connect to\n\n",
+ " -s, --server=SERVER The name of the server to connect to\n\n"),
argv0);
}
@@ -238,6 +232,9 @@ int main(int argc, char *argv[]) {
{NULL, 0, NULL, 0}
};
+ setlocale(LC_ALL, "");
+ bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
+
if (!(bn = strrchr(argv[0], '/')))
bn = argv[0];
else
@@ -251,7 +248,12 @@ int main(int argc, char *argv[]) {
goto quit;
case ARG_VERSION:
- printf("pasuspender "PACKAGE_VERSION"\nCompiled with libpulse %s\nLinked with libpulse %s\n", pa_get_headers_version(), pa_get_library_version());
+ printf(_("pasuspender %s\n"
+ "Compiled with libpulse %s\n"
+ "Linked with libpulse %s\n"),
+ PACKAGE_VERSION,
+ pa_get_headers_version(),
+ pa_get_library_version());
ret = 0;
goto quit;
@@ -275,7 +277,7 @@ int main(int argc, char *argv[]) {
}
if (!(m = pa_mainloop_new())) {
- fprintf(stderr, "pa_mainloop_new() failed.\n");
+ fprintf(stderr, _("pa_mainloop_new() failed.\n"));
goto quit;
}
@@ -288,7 +290,7 @@ int main(int argc, char *argv[]) {
#endif
if (!(context = pa_context_new(mainloop_api, bn))) {
- fprintf(stderr, "pa_context_new() failed.\n");
+ fprintf(stderr, _("pa_context_new() failed.\n"));
goto quit;
}
@@ -296,7 +298,7 @@ int main(int argc, char *argv[]) {
pa_context_connect(context, server, PA_CONTEXT_NOAUTOSPAWN, NULL);
if (pa_mainloop_run(m, &ret) < 0) {
- fprintf(stderr, "pa_mainloop_run() failed.\n");
+ fprintf(stderr, _("pa_mainloop_run() failed.\n"));
goto quit;
}
diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c
index 6d3c962..50d621d 100644
--- a/src/utils/pax11publish.c
+++ b/src/utils/pax11publish.c
@@ -1,5 +1,3 @@
-/* $Id: pax11publish.c 1426 2007-02-13 15:35:19Z ossman $ */
-
/***
This file is part of PulseAudio.
@@ -29,11 +27,13 @@
#include <getopt.h>
#include <string.h>
#include <assert.h>
+#include <locale.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <pulse/util.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/log.h>
@@ -49,17 +49,20 @@ int main(int argc, char *argv[]) {
Display *d = NULL;
enum { DUMP, EXPORT, IMPORT, REMOVE } mode = DUMP;
+ setlocale(LC_ALL, "");
+ bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
+
while ((c = getopt(argc, argv, "deiD:S:O:I:c:hr")) != -1) {
switch (c) {
case 'D' :
dname = optarg;
break;
case 'h':
- printf("%s [-D display] [-S server] [-O sink] [-I source] [-c file] [-d|-e|-i|-r]\n\n"
+ printf(_("%s [-D display] [-S server] [-O sink] [-I source] [-c file] [-d|-e|-i|-r]\n\n"
" -d Show current PulseAudio data attached to X11 display (default)\n"
" -e Export local PulseAudio data to X11 display\n"
" -i Import PulseAudio data from X11 display to local environment variables and cookie file.\n"
- " -r Remove PulseAudio data from X11 display\n",
+ " -r Remove PulseAudio data from X11 display\n"),
pa_path_get_filename(argv[0]));
ret = 0;
goto finish;
@@ -88,13 +91,13 @@ int main(int argc, char *argv[]) {
server = optarg;
break;
default:
- fprintf(stderr, "Failed to parse command line.\n");
+ fprintf(stderr, _("Failed to parse command line.\n"));
goto finish;
}
}
if (!(d = XOpenDisplay(dname))) {
- pa_log("XOpenDisplay() failed");
+ pa_log(_("XOpenDisplay() failed"));
goto finish;
}
@@ -102,13 +105,13 @@ int main(int argc, char *argv[]) {
case DUMP: {
char t[1024];
if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t)))
- printf("Server: %s\n", t);
+ printf(_("Server: %s\n"), t);
if (pa_x11_get_prop(d, "PULSE_SOURCE", t, sizeof(t)))
- printf("Source: %s\n", t);
+ printf(_("Source: %s\n"), t);
if (pa_x11_get_prop(d, "PULSE_SINK", t, sizeof(t)))
- printf("Sink: %s\n", t);
+ printf(_("Sink: %s\n"), t);
if (pa_x11_get_prop(d, "PULSE_COOKIE", t, sizeof(t)))
- printf("Cookie: %s\n", t);
+ printf(_("Cookie: %s\n"), t);
break;
}
@@ -126,12 +129,12 @@ int main(int argc, char *argv[]) {
uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
size_t l;
if ((l = pa_parsehex(t, cookie, sizeof(cookie))) != sizeof(cookie)) {
- fprintf(stderr, "Failed to parse cookie data\n");
+ fprintf(stderr, _("Failed to parse cookie data\n"));
goto finish;
}
if (pa_authkey_save(cookie_file, cookie, l) < 0) {
- fprintf(stderr, "Failed to save cookie data\n");
+ fprintf(stderr, _("Failed to save cookie data\n"));
goto finish;
}
}
@@ -146,12 +149,12 @@ int main(int argc, char *argv[]) {
assert(conf);
if (pa_client_conf_load(conf, NULL) < 0) {
- fprintf(stderr, "Failed to load client configuration file.\n");
+ fprintf(stderr, _("Failed to load client configuration file.\n"));
goto finish;
}
if (pa_client_conf_env(conf) < 0) {
- fprintf(stderr, "Failed to read environment configuration data.\n");
+ fprintf(stderr, _("Failed to read environment configuration data.\n"));
goto finish;
}
@@ -168,7 +171,7 @@ int main(int argc, char *argv[]) {
else {
char hn[256];
if (!pa_get_fqdn(hn, sizeof(hn))) {
- fprintf(stderr, "Failed to get FQDN.\n");
+ fprintf(stderr, _("Failed to get FQDN.\n"));
goto finish;
}
@@ -188,7 +191,7 @@ int main(int argc, char *argv[]) {
pa_client_conf_free(conf);
if (pa_authkey_load_auto(cookie_file, cookie, sizeof(cookie)) < 0) {
- fprintf(stderr, "Failed to load cookie data\n");
+ fprintf(stderr, _("Failed to load cookie data\n"));
goto finish;
}
@@ -205,7 +208,7 @@ int main(int argc, char *argv[]) {
break;
default:
- fprintf(stderr, "No yet implemented.\n");
+ fprintf(stderr, _("Not yet implemented.\n"));
goto finish;
}
diff --git a/todo b/todo
index dc2b882..da993a2 100644
--- a/todo
+++ b/todo
@@ -1,5 +1,3 @@
-*** $Id: todo 1971 2007-10-28 19:13:50Z lennart $ ***
-
Build System:
- Remove symdef files and use macros (like most other projects)
- Use own name mangling scheme instead of ltdl's, which will eliminate the
@@ -11,11 +9,10 @@ Porting:
I18N:
- iconv stuff sent from utils to server (UTF-8)
- iconv sample loading in server
-- Document utf8.h, timeval.h and util.h
- gettextify pulseaudio
Cleanups:
-- drop dependency of libpolyp on libX11, instead use an external mini binary
+- drop dependency of libpulse on libX11, instead use an external mini binary
- module-tunnel: improve latency calculation
- use software volume when hardware doesn't support all channels (alsa done)
- using POSIX monotonous clocks wherever possible instead of gettimeofday()
@@ -30,22 +27,17 @@ Auth/Crypto:
- sasl auth
Features:
-- alsa driver with hw mixing
-- "window manager for sound"
- chroot()
- use scatter/gather io for sockets
- CODECs to reduce bandwidth usage (plug-in based)
- multiline configuration statements
- paplay needs to set a channel map. our default is only correct for AIFF.
(we need help from libsndfile for this)
-- Fix a way for the threading API to handle state and subscription callbacks
- in a nice way.
- examine if it is possible to mimic esd's handling of half duplex cards
(switch to capture when a recording client connects and drop playback during
that time)
- Support for device selection in waveout driver
- add an API to libpulse for allocating memory from the pa_context memory pool
-- allow buffer metric changes during runtime
- better ".include" command in configuration files. should have glob support.
- recursive .if
@@ -55,5 +47,3 @@ Long term:
Backends for:
- portaudio (semi-done)
-- sdl
-- xine (needs update)