Commit Graph

1522 Commits

Author SHA1 Message Date
J. Alexander Treuman 6d5950bbe7 Typo found by bensonk.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4769 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-12 23:23:29 +00:00
J. Alexander Treuman bb5e87bd3d New example config.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4768 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-12 23:16:14 +00:00
J. Alexander Treuman 0c33afabe9 replaygain -> ReplayGain in docs
git-svn-id: https://svn.musicpd.org/mpd/trunk@4767 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-12 22:28:58 +00:00
J. Alexander Treuman ac7dd43ad8 Note that mpd will scan for an audio output if none is specified.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4766 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-12 21:52:49 +00:00
J. Alexander Treuman 32c5f5a8f0 Deleting bs directory from svn.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4765 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-12 21:50:09 +00:00
Eric Wong 48b54d7a71 m4/lib*FLAC.m4: fix typos, -INONE/include no longer mis-added to CFLAGS
git-svn-id: https://svn.musicpd.org/mpd/trunk@4763 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-12 06:50:21 +00:00
Eric Wong ca84702d8d tag.c: remove unnecessary #includes
git-svn-id: https://svn.musicpd.org/mpd/trunk@4762 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-11 23:45:25 +00:00
Eric Wong a077a38a85 configure.ac: fix tremor detection usage
git-svn-id: https://svn.musicpd.org/mpd/trunk@4761 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-11 23:41:07 +00:00
Qball Cow f3aa34badb Hopefully fix endian problem mac x86/ppc
git-svn-id: https://svn.musicpd.org/mpd/trunk@4750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-09 10:01:25 +00:00
Eric Wong f5c7f3da31 utils.c: fix xrealloc
(based on suggested patch by Jan-Benedict Glaw):
> While hacking mpd, I noticed that an assert()ion in xrealloc is wrong.
> A null size is perfectly legal, so we shouldn't assert on that.

Since some C libraries return NULL when size == 0, we'll make
sure we get a free()-able pointer since some of those C
libraries also barf on free(NULL).

git-svn-id: https://svn.musicpd.org/mpd/trunk@4740 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-07 19:26:51 +00:00
Eric Wong 12d253118d configure.ac: fix an obvious typo for setting mpcdec libs
git-svn-id: https://svn.musicpd.org/mpd/trunk@4739 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-06 09:29:06 +00:00
Eric Wong b78b0a7f09 remove bs; oops, didn't mean to commit that
git-svn-id: https://svn.musicpd.org/mpd/trunk@4738 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-06 09:28:16 +00:00
Eric Wong 412cb1ee10 bs: a work in progress..
git-svn-id: https://svn.musicpd.org/mpd/trunk@4737 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-06 09:26:51 +00:00
Eric Wong 7b6d45f50f gcc.h: make sure __GNUC__ is defined before checking it's value
git-svn-id: https://svn.musicpd.org/mpd/trunk@4724 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-30 07:56:22 +00:00
J. Alexander Treuman 76779449b9 Fixing up the new 0.12 ChangeLog entry some more.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4722 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 23:50:38 +00:00
J. Alexander Treuman 0e9114e3ad Removing id3v1_encoding from 0.12 ChangeLog entry, since it was already listed in the 0.11.5 entry. Also correcting a couple of typos in that old entry.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4721 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 23:47:15 +00:00
J. Alexander Treuman 806acdd4f4 Rearrange mpd.conf.5 and conf.[ch] to use the more logical ordering of config parameters that the new (yet to be committed) mpdconf.example will use.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4715 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 20:47:50 +00:00
J. Alexander Treuman 6018a1b4f8 Note that default for metadata_to_use doesn't include comments
git-svn-id: https://svn.musicpd.org/mpd/trunk@4714 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 20:10:40 +00:00
J. Alexander Treuman 26a6ba7a77 Add id3v1_encoding to the mpd.conf man page.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4713 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 19:34:31 +00:00
J. Alexander Treuman 648b03e4a9 Update ChangeLog. Please keep this up to date as you make changes from now on.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4710 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 18:12:18 +00:00
J. Alexander Treuman 00b4ce40a8 Removing mp1/mp2 from TODO
git-svn-id: https://svn.musicpd.org/mpd/trunk@4707 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 16:47:22 +00:00
J. Alexander Treuman 72640290cf Updating INSTALL
git-svn-id: https://svn.musicpd.org/mpd/trunk@4706 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 16:44:29 +00:00
J. Alexander Treuman ebba9491ca Adding directions for updating to 0.12.0 to UPGRADING
git-svn-id: https://svn.musicpd.org/mpd/trunk@4705 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28 15:42:32 +00:00
Eric Wong 90847fc881 Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors
I'm checking for zero-size allocations and assert()-ing them,
so we can more easily get backtraces and debug problems, but we'll
also allow -DNDEBUG people to live on the edge if they wish.

We do not rely on errno when checking for OOM errors because
some implementations of malloc do not set it, and malloc
is commonly overridden by userspace wrappers.

I've spent some time looking through the source and didn't find any
obvious places where we would explicitly allocate 0 bytes, so we
shouldn't trip any of those assertions.

We also avoid allocating zero bytes because C libraries don't
handle this consistently (some return NULL, some not); and it's
dangerous either way.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4690 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26 06:25:57 +00:00
Eric Wong be554c2596 audioOutputs_oss: [trivial] make loop interation consistent with others
git-svn-id: https://svn.musicpd.org/mpd/trunk@4689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26 06:25:52 +00:00
Eric Wong f3981eab58 audio.c: [trivial] remove unnecessary include
git-svn-id: https://svn.musicpd.org/mpd/trunk@4688 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26 06:25:49 +00:00
Eric Wong 45f28394c0 command.c: rerun mpd-indent.sh, no code changes
leave out initCommands to keep jat happy, and keep labels
at the left hand side

git-svn-id: https://svn.musicpd.org/mpd/trunk@4687 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26 06:25:44 +00:00
J. Alexander Treuman 5b7c3c8707 Fix an esoteric gcc warning
git-svn-id: https://svn.musicpd.org/mpd/trunk@4684 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-25 00:29:41 +00:00
Eric Wong 64a4c635de audiofile_plugin: use afSetVirtualSampleFormat, too
This finally fixes a bug from over two years ago playing a wave file
(oprah.wav) with the following characteristics (from sfinfo):

File Format    Microsoft RIFF WAVE Format (wave)
Data Format    8-bit integer (unsigned, little endian)
Audio Data     986827 bytes begins at offset 58 (3a hex)
1 channel, 986827 frames
Sampling Rate  22050.00 Hz
Duration       44.754 seconds

Of course, this has been regression tested with all the files
that the previous commit got working.  Thanks to Michael Pruett
(audiofile author) for the hint and shame on me for forgetting
about it for over two years :x

git-svn-id: https://svn.musicpd.org/mpd/trunk@4682 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-24 21:59:19 +00:00
Eric Wong b8fe818ae7 audiofile_plugin: fix for playing mono .au files with 8000Hz sample rate
Use the 'Virtual' variants of afGetSampleFormat, afGetChannels,
afGetVirtualFrameSize in the audiofile library, since it already does
the necessary abstraction for us.

Of course, I've regression tested these changes against my
standard 44100Hz/2ch/16bit wave files and they continue to play
fine.

Files tested:
english.au (Linus Torvalds pronouncing 'Linux' in English)
B01.Red_Bright_Heart.au (Chinese opera, sounds correct to me even though
I don't actually understand the words)

git-svn-id: https://svn.musicpd.org/mpd/trunk@4681 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-24 20:54:40 +00:00
J. Alexander Treuman c81f4e2c04 Bumping version to rc3
git-svn-id: https://svn.musicpd.org/mpd/trunk@4675 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-24 12:25:22 +00:00
J. Alexander Treuman 25555cd1b0 Use strcasecmp to check for replaygain id3v2 tags, since apparently some apps write them in all caps.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4672 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-23 19:10:47 +00:00
J. Alexander Treuman 87327cb931 Instead of ignoring mp2/mp3 files that start with a layer 1 frame, just skip the layer 1 frames looking for a layer 2 or 3 frame.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4671 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-23 14:06:16 +00:00
J. Alexander Treuman 30bf8f89f4 If a frame header decode loses sync, just try again instead of trying to decode a frame (which will automatically decode the next header without allowing us to do some checks on it).
git-svn-id: https://svn.musicpd.org/mpd/trunk@4670 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-23 13:43:23 +00:00
J. Alexander Treuman 103dd654f0 Skip layer 2 frames in mp3s and vice versa. Also drop support for layer 1, since it hasn't been tested.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4669 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-23 13:20:24 +00:00
Eric Wong 67de7ea116 fix Replay Gain reading for FLAC and OggFLAC
This bug was NOT introduced in my OggFLAC additions, honest!

As far as I can see, it was introduced way back in r2482, but
nobody ever noticed until the post here:
http://www.musicpd.org/forum/index.php?topic=1152.0

While we're at it, clean up some of the variable typing.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4664 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-22 06:36:56 +00:00
Eric Wong 504d3425f2 get rid of the pointless xopen wrapper, open(2) does not throw errno = EINTR
git-svn-id: https://svn.musicpd.org/mpd/trunk@4663 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-22 06:36:51 +00:00
Eric Wong 72c12ff768 oggvorbis_plugin.c: update message to match changed function name
I'm not using __FUNCTION__ or __func__ because compiler support
for these is still a bit iffy as far as I know...

git-svn-id: https://svn.musicpd.org/mpd/trunk@4662 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20 10:13:59 +00:00
Eric Wong ee223bf02b trivial: labels should be on the left-most column, no tabbing
Unfortunately there doesn't seem to be an indent switch for this,
but we have find + perl:

find src -name '*.[ch]' | xargs perl -i -p -e \
's/^\s+(\w+):/$1:/g unless /^\s+default:/'

This is a followup to r4605, and there are no actual code
changes in this.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4661 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20 10:13:54 +00:00
Eric Wong f8b07de3d4 inputPlugins/_ogg_common.c: check for read errors correctly
git-svn-id: https://svn.musicpd.org/mpd/trunk@4660 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20 10:13:50 +00:00
Avuton Olrich aa487e6c75 This fixes 5 potential bugs where the conditional would always be true.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4659 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20 03:11:12 +00:00
Avuton Olrich 54a1a9f2b6 Fix missing initializer in DISABLED_AUDIO_OUTPUT_PLUGIN();
git-svn-id: https://svn.musicpd.org/mpd/trunk@4658 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20 01:06:27 +00:00
Avuton Olrich f79a70d1b9 Fix warnings for -Wmissing-prototypes
Add -Wmissing-prototypes if compiling with gcc
Static where possible

git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20 00:50:44 +00:00
Eric Wong 9caade4eb1 fix a few warnings on 64-bit machines
size_t is bigger than int on most 64-bit machines, so cast
size_t to long when passing them to printf-like functions.

Ideally we'd use %z, but many compilers don't support it.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4656 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-18 07:02:54 +00:00
J. Alexander Treuman a6297f81f3 Cast isostr to char * to fix yet another warning
git-svn-id: https://svn.musicpd.org/mpd/trunk@4655 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-18 04:10:41 +00:00
J. Alexander Treuman 7c3a5596fd Change type of isostr to fix warning
git-svn-id: https://svn.musicpd.org/mpd/trunk@4654 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-18 04:08:44 +00:00
J. Alexander Treuman 459e096581 Bumping some version numbers to rc2
git-svn-id: https://svn.musicpd.org/mpd/trunk@4653 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-18 01:39:30 +00:00
J. Alexander Treuman 8f86c41d97 Avoid an unnecessary encoding conversion when converting id3v1 tags. Also make getID3Info static.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4642 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-15 00:47:19 +00:00
Eric Wong c2e1ccd968 tag.c: fix segfault on failed id3v1 character conversion
convStrDup() returns NULL if character conversion fails,
so make sure we check the return values and drop the
tag if we can't get a conversion.

This should close bug 1313:
http://musicpd.org/mantis/view.php?id=1313

git-svn-id: https://svn.musicpd.org/mpd/trunk@4641 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-15 00:04:34 +00:00
Eric Wong e5df85db15 Several bugfixes during exit found by valgrind
First, make sure we call finishPlaylist() before
closeMp3Directory() since the latter will free non-SONG_TYPE_URL
songs in playlist, which causes an invalid read when we try to
look for SONG_TYPE_URL songs to free in finishPlaylist.

Secondly, make sure our children have all exited before freeing
the playerData.  If we do not, slowly-delivered signals can
trigger a race condition in the signal handlers of the decode
and player processes which rely on getPlayerData.  To avoid
waitpid-ing too long (or at all), move the freePlayerData() call
farther down in main() (this won't affect anything else)
to give the OS a better chance to deliver signals and finish running
sig handlers for terminated children.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4640 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-14 23:31:08 +00:00