Commit Graph

1137 Commits

Author SHA1 Message Date
J. Alexander Treuman
649a037e8d Use ERROR only once for our ogg vorbis errors, so we don't get a timestamp mid line
git-svn-id: https://svn.musicpd.org/mpd/trunk@4402 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-19 15:58:11 +00:00
Avuton Olrich
9f6364af45 Remove the internal mp4ff dependency
git-svn-id: https://svn.musicpd.org/mpd/trunk@4401 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-19 15:54:53 +00:00
J. Alexander Treuman
9774768b97 Initialize sigaction.sa_mask to an empty set in a few places we forgot to
git-svn-id: https://svn.musicpd.org/mpd/trunk@4400 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-18 23:38:21 +00:00
J. Alexander Treuman
ec19a53f23 Fix VBR mp3 seek accuracy bug
git-svn-id: https://svn.musicpd.org/mpd/trunk@4399 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-18 23:28:25 +00:00
J. Alexander Treuman
6ea0ba392a Cleaned up parse_xing, added support for Info magic, and added a parse_extension_headers function for when LAME tag support is added
git-svn-id: https://svn.musicpd.org/mpd/trunk@4398 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-18 18:18:02 +00:00
J. Alexander Treuman
e7566b9643 Reindenting parse_xing, since I need to work on it and it's a mess
git-svn-id: https://svn.musicpd.org/mpd/trunk@4397 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-18 16:28:58 +00:00
J. Alexander Treuman
e6b0d82c2e Don't bother freeing a bunch of stuff at exit, since it takes far too long and accomplishes nothing.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4396 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-18 15:50:10 +00:00
Eric Wong
47037c6ac9 Some more autotools fixes/hacks/workarounds
autogen.sh:
Detect more strange paths for aclocal on different
packaging systems.  This should help encourage more
people to run svn code on their systems.

configure.ac:
Tested on FreeBSD (6.1).  Darwin, OpenBSD, NetBSD info
gleaned off the Makefile distributed with git.

m4/shout.m4:
The Shout 2.2 port on a FreeBSD 6.1 machine seemed
problematic when it's compiled against pthreads, so this is
a gross hack to force -lpthread on it

git-svn-id: https://svn.musicpd.org/mpd/trunk@4390 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-18 09:55:15 +00:00
Eric Wong
16c72e9742 inputPlugins/oggflac_plugin.c: remove unused var
git-svn-id: https://svn.musicpd.org/mpd/trunk@4389 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-18 09:55:06 +00:00
Warren Dukes
0bf396d610 some quick hacks to avoid signedness warnings with gcc4
git-svn-id: https://svn.musicpd.org/mpd/trunk@4387 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 21:46:32 +00:00
Eric Wong
7fdcd56a99 makedist.sh: followup on bundled id3tag/mad removals
git-svn-id: https://svn.musicpd.org/mpd/trunk@4386 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 08:41:38 +00:00
Eric Wong
7e3bca3aa3 configure.ac: oops, unbreak configure :x
git-svn-id: https://svn.musicpd.org/mpd/trunk@4385 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 08:37:57 +00:00
Eric Wong
b545a7e57d Fix some autotools related problems
Huge thanks to gnarlie for helping me find and diagnose
several problems stemming from autogen.sh on FreeBSD 6.1

We require autoconf 2.58 for autogen.sh, but it seems like
that's always been the case, we just never caught it before :/

"bash ./configure" just about sums up what I want to do right now...

git-svn-id: https://svn.musicpd.org/mpd/trunk@4384 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 08:22:50 +00:00
Eric Wong
c919ffd1bf audioOutput_mvp: remove unused variable
git-svn-id: https://svn.musicpd.org/mpd/trunk@4383 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 01:49:56 +00:00
Eric Wong
6f013cd9c4 inputPlugins/*_plugin.c: static-fication
Nothing here is ever exported for linkage besides the
InputPlugin structure, so mark them static to save a few bytes.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4382 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 01:47:32 +00:00
Eric Wong
5f50870222 alsa: fix memory leaks from snd_*_open*()
ALSA uses a global config structure that's overwritten (and not
free'd) every time one of those functions is called, so we have
to manually call snd_config_update_free_global() to release it.

Hint taken from MEMORY-LEAK in the ALSA source code

git-svn-id: https://svn.musicpd.org/mpd/trunk@4381 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 01:28:38 +00:00
Eric Wong
368034e199 sparse: replace 0 (integer) usage with NULL where appropriate
Probably pedantic, but yes, might as well in case we run into
strange platforms where NULL is something strange.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4380 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 00:15:52 +00:00
Eric Wong
232dcf4b94 sparse: fix a enum type mismatch in flac_plugin
Both values are compiled to zero, but this is more correct
since we're using the correct enum (in the unlikely case that
the FLAC library breaks compatibility).

git-svn-id: https://svn.musicpd.org/mpd/trunk@4379 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 00:15:49 +00:00
Eric Wong
a234780aab sparse: ANSI-fy function declarations
These are just warnings from sparse, but it makes the output
easier to read.  I ran this through a quick perl script, but
of course verified the output by looking at the diff and making
sure the thing still compiles.

here's the quick perl script I wrote to generate this patch:
----------- 8< -----------
use Tie::File;
defined(my $pid = open my $fh, '-|') or die $!;
if (!$pid) {
open STDERR, '>&STDOUT' or die $!;
exec 'sparse', @ARGV or die $!;
}
my $na = 'warning: non-ANSI function declaration of function';
while (<$fh>) {
print STDERR $_;
if (/^(.+?\.[ch]):(\d+):(\d+): $na '(\w+)'/o) {
my ($f, $l, $pos, $func) = ($1, $2, $3, $4);
$l--;
tie my @x, 'Tie::File', $f or die "$!: $f";
print '-', $x[$l], "\n";
$x[$l] =~ s/\b($func\s*)\(\s*\)/$1(void)/;
print '+', $x[$l], "\n";
untie @x;
}
}

git-svn-id: https://svn.musicpd.org/mpd/trunk@4378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 00:15:34 +00:00
Eric Wong
0c24fc0cb3 add sparse-check target to makefiles
sparse is a semantic parser developed for the Linux kernel,
but works for any project written (ANSI) C.

You can get sparse via git here:
git clone git://www.kernel.org/pub/scm/devel/sparse/sparse.git

git-svn-id: https://svn.musicpd.org/mpd/trunk@4377 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 00:15:31 +00:00
Avuton Olrich
e570f13d74 If no input plugin is supported, fail to configure.
(useless daemon)

git-svn-id: https://svn.musicpd.org/mpd/trunk@4376 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 21:58:52 +00:00
J. Alexander Treuman
39615044e3 Will the leaks never end?!
git-svn-id: https://svn.musicpd.org/mpd/trunk@4375 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 19:55:01 +00:00
J. Alexander Treuman
25c37e9276 Sigh, another memory leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@4374 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 19:40:09 +00:00
J. Alexander Treuman
fefd214b8e One more leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@4373 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 19:20:40 +00:00
J. Alexander Treuman
93c8aa8b71 Fixing what looks like a *huge* memory leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@4372 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 19:00:52 +00:00
J. Alexander Treuman
5d1df8e25c Fixing a whopping 4 memory leaks
git-svn-id: https://svn.musicpd.org/mpd/trunk@4371 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 18:22:03 +00:00
Avuton Olrich
8d630f30e8 Now really remove libmad and libid3tag directories
git-svn-id: https://svn.musicpd.org/mpd/trunk@4370 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 17:51:07 +00:00
Avuton Olrich
2001db8c18 Remove hosted libid3tag & libmad
git-svn-id: https://svn.musicpd.org/mpd/trunk@4369 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 17:49:15 +00:00
J. Alexander Treuman
939b40c45c Move remaining 0.12 goals to 0.13
git-svn-id: https://svn.musicpd.org/mpd/trunk@4368 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 17:35:32 +00:00
J. Alexander Treuman
db07f98398 Split audio output parameters documentation in mpd.conf.5 into output-specific sections, since we have a lot of output-specific parameters now
git-svn-id: https://svn.musicpd.org/mpd/trunk@4367 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 17:32:59 +00:00
Eric Wong
b8a0f1ae6d OSS: handle device disconnects and reconnects (w/o needing a mpd restart)
Like the ALSA patches, this allows OSS devices to be disconnected
during playback and MPD will be able to reopen and reuse them without
restarting.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4366 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 16:53:04 +00:00
Eric Wong
ea6dc826a1 volume: gracefully handle disconnected ALSA mixers
This should help with the previous set of patches against the ALSA
audio output.  We should have fully disconnectable/reconnectable ALSA devices
now.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4365 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 16:52:49 +00:00
Eric Wong
6b2167a444 audio: attempt to gracefully handle disconnected/reconnected devices
Currently only ALSA is supported/tested, and only if the mixer
device is not on the audio device being disconnected (software
mixer).

This patch allows me to disconnect my Headroom Total Airhead USB
sound card, and resume playback (skips to the next song, which
should be fixed) when the device is plugged back in.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4364 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 16:52:29 +00:00
Eric Wong
8224e837ef audioOutput_alsa: add use_mmap, period_time, buffer_time options
ALSA support in libao supports configuring of these variables,
and some hardware setups may benefit from having these things
as tweakable.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4363 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 16:52:19 +00:00
Eric Wong
3c8e88b053 audioOutput_alsa: calculate period size from sample rate
... instead of hard-coding it to a ridiculously high value that
makes bandwidth-starved devices unhappy.

libao (in SVN) does the same thing, and this calculation was indeed
taken from it.

Low-bandwidth USB (1.1) sound devices seem to need this to prevent
underrun / broken pipe errors (during hw setup, no less) from being
triggered.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4362 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 16:52:06 +00:00
Eric Wong
b59aa75720 remove the glib library dependency
We never used many features from it, so there's no point in
keeping it and forcing people to install a non-standard library.
It may be standard on many GNU/Linux distributions, but there
are many other UNIXes out there.  This makes life much easier
for people cross-compiling (like me :)

git-svn-id: https://svn.musicpd.org/mpd/trunk@4361 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 16:50:54 +00:00
J. Alexander Treuman
210ab3b971 Removing MPD-Protocol.xml, since it's old, very incomplete, and will likely never be finished
git-svn-id: https://svn.musicpd.org/mpd/trunk@4360 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 16:00:48 +00:00
J. Alexander Treuman
184bd51ca2 Added a warning to COMMANDS that it's out of date
git-svn-id: https://svn.musicpd.org/mpd/trunk@4359 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 15:58:40 +00:00
J. Alexander Treuman
9768d96954 Fix more shank typos in mpdconf.example. Thanks to ves for reporting them.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4358 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 15:28:51 +00:00
J. Alexander Treuman
b38157fc76 Committing qball's patch to list supported audio outputs in --version
git-svn-id: https://svn.musicpd.org/mpd/trunk@4357 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 14:57:26 +00:00
Eric Wong
5070f8bc78 command.c: fix a format-string error (go sparse!)
git-svn-id: https://svn.musicpd.org/mpd/trunk@4356 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 13:58:02 +00:00
Eric Wong
b4df8b8f88 De-inline non-trivial, non-performance-critical functions
Functions that should stay inlined should have an explanation
attached to them.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4355 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 13:42:57 +00:00
Eric Wong
563e4c95fd main: static-fication, ANSI fixes
git-svn-id: https://svn.musicpd.org/mpd/trunk@4354 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 13:16:52 +00:00
Eric Wong
37bdf3f3d2 Avoid spewing messages to the console
Just setupLogOutput and redirect things to the logs before
spawning the main process.  We've already daemonized at this
point, so we've already proven that we can fork, but we haven't
done it yet.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4353 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 12:41:18 +00:00
Eric Wong
f621d55e3f Fix underquoted defintion warnings from newer automake
git-svn-id: https://svn.musicpd.org/mpd/trunk@4352 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 11:02:52 +00:00
Eric Wong
b77b187b7c autogen.sh: fix for automake16, automake17, etc...
Just for gnarlie :)

git-svn-id: https://svn.musicpd.org/mpd/trunk@4351 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 10:12:46 +00:00
Eric Wong
34b5b2631f autogen.sh: allow AM_VERSIONs > 1.6 to be used more easily
Also, allow AM_FORCE_VERSION to be defined by developers

git-svn-id: https://svn.musicpd.org/mpd/trunk@4350 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 09:42:39 +00:00
Eric Wong
6735acbf32 configure.ac: remove uncessary grep usage
git-svn-id: https://svn.musicpd.org/mpd/trunk@4349 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 09:42:28 +00:00
Avuton Olrich
32fd264ffc [CLEANUP] Fix indentation to be like the rest of
the repository

git-svn-id: https://svn.musicpd.org/mpd/trunk@4348 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 05:16:53 +00:00
Avuton Olrich
3ad41fdda6 [CLEANUP] Remove unused code
Cleanup whitespace->tabs

git-svn-id: https://svn.musicpd.org/mpd/trunk@4347 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15 05:04:16 +00:00