Commit Graph

1518 Commits

Author SHA1 Message Date
Avuton Olrich 5339f63a2b Fix compilation error (missing ,)
git-svn-id: https://svn.musicpd.org/mpd/trunk@6289 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-27 00:16:17 +00:00
J. Alexander Treuman d306019f5c "unable open" -> "unable to open"
git-svn-id: https://svn.musicpd.org/mpd/trunk@6278 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 18:21:51 +00:00
J. Alexander Treuman 93e68adc79 After changing ERROR();exit() to FATAL(), gcc incorrectly detects some
uninitialized variables and non-returning functions that return.  Let's
tell it to stfu.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6277 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 18:20:53 +00:00
J. Alexander Treuman bba444524e Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a single
call to FATAL().

git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 18:15:54 +00:00
J. Alexander Treuman dba45a5992 Cleaning up pcm_getSampleRateConverter.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6275 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 17:33:59 +00:00
J. Alexander Treuman 665ab83761 Exit with an error if channel count isn't 1 or 2.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6274 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 17:04:54 +00:00
J. Alexander Treuman 355d18a593 Make pcm_convertAudioFormat return the buffer size. This is necessary
because lsr may return less than the input buffer size, and the rest of the
audio code needs to know the new size.  This fixes the clicking that was
introduced with recent changes to the lsr code.  A huge thanks to remiss
for figuring this out.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6273 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 16:39:55 +00:00
J. Alexander Treuman b3726bcc93 Adding format conversion and stored playlists to my AUTHORS entry. I
heavily modified both sets of code, and I think it's useful for people to
know who's responsible/familiar with what.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6272 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 15:12:11 +00:00
J. Alexander Treuman 29819576eb weather -> whether
git-svn-id: https://svn.musicpd.org/mpd/trunk@6271 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 15:05:06 +00:00
J. Alexander Treuman 425c6e9502 Changing calls to strdup to xstrdup.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6270 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 15:04:54 +00:00
J. Alexander Treuman d14a655901 Cleaning up addToStoredPlaylist. Now we call freeJustSong if adding a URL.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6269 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 15:00:38 +00:00
J. Alexander Treuman f16e372871 Make sure StoredPlaylists always contain UTF-8 paths that are either
relative paths in the DB or URLs.  The main functional difference is that
playlistmove and playlistdelete will rewrite playlists in the correct
encoding and remove invalid lines instead of potentially modifying them.
The specific changes are:

appendSongToStoredPlaylist:
* Don't convert to FS charset
* Don't prepend music_directory if saving absolute paths

writeStoredPlaylistToPath:
* Convert to FS charset
* Prepend music_directory if saving absolute paths

loadStoredPlaylist:
* Make sure each line is either in the DB or a URL

loadPlaylist:
* Don't bother checking paths, since it's done in loadStoredPlaylist now

git-svn-id: https://svn.musicpd.org/mpd/trunk@6266 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 14:09:09 +00:00
J. Alexander Treuman f4d959a07b More formatting/error message cleanups in storedPlaylist.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6265 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 00:48:53 +00:00
J. Alexander Treuman fd645486a1 Don't call freeStoredPlaylist(sp) inside an if (!sp) block. It causes
segfaults.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6264 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 00:28:07 +00:00
J. Alexander Treuman fc094c08d3 Cleaning up formatting and error messages in storedPlaylist.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6263 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-25 20:25:11 +00:00
J. Alexander Treuman 2814b7cfc6 Reverting to the full lsr API. Turns out the simple API needs all of the
audio at once, so it won't work for us.  The old full API code was still
heavily broken, as each call to pcm_convertSampleRate() used the same
state, even if it was processing two streams of audio.  The new code keeps
a separate state for each audio stream that's being converted.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6255 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24 21:15:37 +00:00
J. Alexander Treuman 7ba357a04e Adding rename command, for renaming stored playlists.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6246 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24 18:07:19 +00:00
J. Alexander Treuman 0d7d2ebf80 Cleaning up error messages in storedPlaylist.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6245 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24 17:25:21 +00:00
J. Alexander Treuman c408bd5e90 Don't list playlists in lsinfo if the path isn't the root directory (they
can't be loaded anyway).

git-svn-id: https://svn.musicpd.org/mpd/trunk@6244 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24 17:06:59 +00:00
J. Alexander Treuman 93b96edacc Adding a note to mpdconf.example about increasing buffer_before_play if you
hear skipping when changing songs.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6240 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 14:13:46 +00:00
J. Alexander Treuman 4c8d69f058 Updating the audio_buffer_size and buffer_before_play entries in
mpd.conf.5.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6239 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 14:10:58 +00:00
J. Alexander Treuman cee4ba72e1 Changing some DEBUG/ERROR/FATAL messages in the JACK plugin.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6232 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 12:24:12 +00:00
J. Alexander Treuman bad8c806f1 Adding JACK documentation to mpd.conf.5.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6231 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 12:07:40 +00:00
J. Alexander Treuman 495e1b6cf9 Tidying up pcm_utils.c a bit more.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6230 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 11:04:04 +00:00
J. Alexander Treuman fbb3a94f17 Switching to the lsr simple API. The problem with the full API is that the
number of channels is specified when the converter state is created.
Previously this was only done once, thus breaking horribly when the input
audio suddenly had a different channel count.  A new state could be created
every time the number of channels changes, but this could happen many times
a second if resampling to two different formats at once.  The simple API
doesn't have this problem, as channel count is an argument to the
conversion function itself.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6229 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 10:31:07 +00:00
J. Alexander Treuman a70ecdc00c Just specify mimeType as NULL in mpc's InputPlugin struct.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6225 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22 23:34:26 +00:00
J. Alexander Treuman 407497c40a Split pcm_convertAudioFormat into separate functions for bitrate, channel,
and samplerate conversion.  This makes the code much easier to read, and
fixes a few bugs that were previously there.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6224 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22 23:11:36 +00:00
J. Alexander Treuman e6d7663b10 Cleaning up/correcting some comments.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6200 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22 15:21:56 +00:00
J. Alexander Treuman f2850a66f0 Reindenting
git-svn-id: https://svn.musicpd.org/mpd/trunk@6199 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22 15:02:25 +00:00
J. Alexander Treuman 92ff09881a Fail loading the playlist on errors mid-file. The same code is used for
playlistadd, playlistdelete, etc. and would've caused the playlist to be
rewritten only up to the line with the error.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6133 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-16 20:35:13 +00:00
J. Alexander Treuman a2a101004b Adding pat to AUTHORS.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6129 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-16 19:47:32 +00:00
J. Alexander Treuman 6cfe421cd6 Committing pat's rewrite of the stored playlist code. This also adds two
new commands: playlistmove and playlistdelete.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6116 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-16 12:02:10 +00:00
J. Alexander Treuman 6f68587ad5 Changing "//" comments to "/* */" comments.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6112 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-15 23:23:09 +00:00
J. Alexander Treuman f63c6ca86d Fixing some code that was rendered unreadable by indent.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5955 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-26 00:48:37 +00:00
J. Alexander Treuman 472e70e74e Forgot to change the associated fdprintf format to %li.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5952 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-26 00:13:14 +00:00
J. Alexander Treuman dc4e2a3f5e Changing SearchStats.playTime from int to unsigned long.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5951 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-26 00:11:30 +00:00
J. Alexander Treuman 7a8a9c10e1 Adding count command. It's usage is identical to find, but instead of
returning a list of matching songs, the number of results and total play
time of the results are returned.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5950 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 23:46:11 +00:00
J. Alexander Treuman 7fd9859540 Adding ChangeLog entry for previous commit.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5949 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:39:30 +00:00
J. Alexander Treuman ebaa3f4338 Set directory_dbModTime when writing the db, so that it will be set after
initial db creation.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5948 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:34:30 +00:00
J. Alexander Treuman 179ab7efe8 fials -> fails
git-svn-id: https://svn.musicpd.org/mpd/trunk@5947 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:18:47 +00:00
J. Alexander Treuman 18e20b8d2c Remove the now unused struct stat from initMp3Directory().
git-svn-id: https://svn.musicpd.org/mpd/trunk@5946 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:08:05 +00:00
J. Alexander Treuman bf6da4f399 initMp3Directory() is only called when (re)creating the db, but before the
db file is written.  So don't try to set directory_dbModTime to the mtime
of the db file, since it will be incorrect.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5945 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:06:47 +00:00
J. Alexander Treuman f67b6b896f Removing references to options.updateDB in main.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5944 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 18:47:34 +00:00
J. Alexander Treuman bee795f2c1 mpd.conf.5 claimed the default alsa device was "hw:0,0", but it's actually
"default".

git-svn-id: https://svn.musicpd.org/mpd/trunk@5943 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 18:22:23 +00:00
José Anarch 51ec5b1542 Only a few changes in jack_playAudio.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5909 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-11 17:41:10 +00:00
José Anarch de5667b288 Now process and playAudio use mutexes.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5897 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09 20:18:11 +00:00
J. Alexander Treuman 95c411224a Don't allow "true" as a value for use_mmap for consistency with other "yes
or no" parameters.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5896 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09 13:05:50 +00:00
J. Alexander Treuman 745fa0c284 Noting the defaults for use_mmap and gapless_mp3_playback in mpd.conf.5.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5895 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09 13:01:18 +00:00
J. Alexander Treuman b8341e6902 Cleaning up some comments.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5894 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09 12:24:48 +00:00
J. Alexander Treuman f953c2cd37 Updating ChangeLog.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5892 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-08 15:52:41 +00:00