introspect, thread-mainloop: Fix Doxygen "since" tags
build-sys: Bump sonames

The bigger than usual bump in libpulse-simple was warranted by the
change in pa_simple_flush() that allows also record streams to be
flushed. There are no changes to the function signature, but it's in
practice a change in the ABI anyway, because new clients using the new
possibility won't work with older versions of the library.

libpulse-mainloop-glib got a bug fix in commit
68156d3f79b67c77f88050e6c9de180698377c64.
build-sys: Add tests/runtime-test-util.h to the tarball

The file is used by three test binaries, but none of them mentioned
it in Makefile.am, which caused the file to be left out of the
tarball.
build-sys: Move ORC_SOURCE definitions outside of "if HAVE_ORC"

Not having ORC_SOURCE defined results in different tarballs depending on
whether the dev issuing 'make dist' has orc support enabled or disabled.

Specifying ORC_SOURCE unconditionally addresses that, without causing
negative effects on users not having orc in the end.
daemon: Remove deprecated Encoding from .desktop files

Encoding is deprecated according to
http://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
caps: Don't require --without-caps on FreeBSD

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=72580
device-manager: Don't try to use unlinked devices

This fixes an assertion crash:

[pulseaudio] source.c: Assertion 'PA_SOURCE_IS_LINKED(s->state)' failed at pulsecore/source.c:734, function pa_source_update_status(). Aborting.

The crash happened when a Bluetooth headset profile was changed from
a2dp to hsp. During the profile change three devices are created:
a sink, a monitor source for the sink, and a regular source. First
pa_sink/source_new() are called for each device, and that puts the
devices to u->core->sinks/sources. Then, pa_sink_put() is called for
the sink, and that in turn calls pa_source_put() for the source. At
that point module-device-manager decides to reroute all source
outputs. The non-monitor source that the Bluetooth card created hasn't
been linked yet at this stage, because it will only be linked after
the sink and the monitor source have been linked. So,
module-device-manager should take into account during the rerouting
that not all sinks and sources are necessarily linked. This patch does
that.

Reported-By: Iskren Hadzhinedev <i.hadzhinedev@gmail.com>
module: Replace rindex() with strrchr()

rindex() appears to be "non-standard" to an extent, and it caused a
build failure on mingw32.

From the man page of rindex(): "POSIX.1-2008 removes the
specifications of index() and rindex(), recommending strchr(3) and
strrchr(3) instead."
resampler: Extend fit_buf() helper to copy leftover data to new buffer

the patch changes the interface of the (internal) fit_buf() function:
fit_buf() manages the memblock of the buf chunk, it reallocates the memblock
if the requested number of bytes ('len') if larger than the memblock's size ('size')
and optionally preserves 'copy' bytes

the code should be in line with the comment now

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
resampler: Implement leftover handling in convert_to_work_format()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
resampler: Resample first followed by remapping if have more out channels than in channels

Reintroduces a cleaned-up version of commit 30ce3a14e5ae1cd316a18bec95b831c07ac57a1a which
was reverted by 1ce71cbd8206d1be59ac62274ad83cdbe693a96a; for more information see
http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/17479/focus=17487

The patch intends to reduce computational load when resampling AND remapping. The PA
resampler performs the following steps:

sample format conversion -> remapping -> resampling -> sample format conversion

In case the number of output channels is higher than the number of input channels, the
resampler has to be run more often than necessary. E.g. in case of mono to 4-channel remapping,
the resampler runs on 4 channels separately.

To ímprove this, the PA resampler pipeline is made adaptive:

if out-channels <= in-channels:
  sample format conversion -> remapping -> resampling -> sample format conversion
if out-channels > in-channels:
  sample format conversion -> resampling -> remapping -> sample format conversion

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
card-restore: Fix a memory leak

entry_read() may set entry->profile, so we need to free that string
before we can replace it with a new string.
thread-win32: Implement pa_thread_free_nojoin()

This fixes a build error with mingw32:

pulsecore/.libs/libpulsecommon_4.99_la-lock-autospawn.o: In function `unref':
/home/abuild/rpmbuild/BUILD/pulseaudio-4.99.2/src/pulsecore/lock-autospawn.c:123: undefined reference to `pa_thread_free_nojoin'
collect2: error: ld returned 1 exit status

pa_thread_free_nojoin() was initially only implemented for the pthread
based pa_thread backend, because it was incorrectly assumed that
autospawning (the only user of pa_thread_free_nojoin()) is not used on
Windows.

Reported-By: Michael DePaulo <mikedep333@gmail.com>