aboutsummaryrefslogtreecommitdiffstats
path: root/src/playerData.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* The massive copyright updateAvuton Olrich2007-04-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix a few warnings on 64-bit machinesEric Wong2006-08-181-1/+1
| | | | | | | | 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
* Several bugfixes during exit found by valgrindEric Wong2006-08-141-0/+5
| | | | | | | | | | | | | | | | | 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
* merge changes from mpd-tree:Warren Dukes2006-08-061-13/+6
| | | | | | -use tree for tagTracker -eliminate the master process git-svn-id: https://svn.musicpd.org/mpd/trunk@4571 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* audio: get rid of the myAudioDevicesEnabled arrayEric Wong2006-08-011-2/+2
| | | | | | | It just made things more confusing. We'll just store the states in playerData_pd->audioDevicesStates and be done with it (it's a unsigned byte now). git-svn-id: https://svn.musicpd.org/mpd/trunk@4514 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* audio: remove AUDIO_MAX_DEVICES limitEric Wong2006-08-011-0/+6
| | | | | | | Some people have more than 8 devices (the old limit). It's pretty easy to support as many as our hardware and OS allows so we might as well. git-svn-id: https://svn.musicpd.org/mpd/trunk@4513 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* playerData: move player_pid into the main playerData structureEric Wong2006-08-011-20/+2
| | | | | No point in doing all that extra work for one variable... git-svn-id: https://svn.musicpd.org/mpd/trunk@4511 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Several fixes uncovered with -pedanticEric Wong2006-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | playerData.c: proper error checking directory.c: properly check myFgets() for errors (it returns NULL on error) inputPlugins/mp3_plugin.c get rid of commas at the end of enums interface.c: we weren't using long long, so strtoll isn't needed get rid of void-pointer arithmetic sllist.c: get rid of void-pointer arithmetic compress.c: get rid of C++ comments, some compilers don't accept them Note that I personally like void pointer arithmetic, but some ancient compilers don't support them :( git-svn-id: https://svn.musicpd.org/mpd/trunk@4510 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-201-52/+59
| | | | | | Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* sparse: replace 0 (integer) usage with NULL where appropriateEric Wong2006-07-171-2/+2
| | | | | | 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
* sparse: ANSI-fy function declarationsEric Wong2006-07-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix the undefined reference to `playerInitReal'Avuton Olrich2006-07-141-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4343 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Change shank's email addressJ. Alexander Treuman2006-07-141-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Huge header update, update the copyright and addAvuton Olrich2006-07-131-1/+1
| | | | | the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix some uninitialized variables (found by valgrind)Eric Wong2006-03-161-0/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3925 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* DJWLindenaar balanced tree and master process patchQball Cow2005-11-161-0/+26
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3669 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* set buffer_before_play default to 0%Warren Dukes2005-03-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3018 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* merge shank-rewrite-config changesWarren Dukes2004-10-281-13/+27
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2375 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* mechanism for updating metadata while decodingWarren Dukes2004-06-061-11/+4
| | | | | | | vorbis comments are updated on the fly for streams need to decode icy metadata buffering of metadata needs to be hardened, to ensure that player has already read a particular metachunk or passed over it git-svn-id: https://svn.musicpd.org/mpd/trunk@1358 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* todo updateWarren Dukes2004-06-061-6/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1352 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* ogg voribs comment parsing on the fly in the decoderWarren Dukes2004-06-011-0/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1279 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* some stream metadata fixesWarren Dukes2004-05-311-1/+7
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1266 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* icynames are now copied to title of streamsWarren Dukes2004-05-311-3/+7
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1258 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* new OutputBuffer abstraction stuff, implemented for mp3, now need toWarren Dukes2004-05-071-1/+1
| | | | | implement in other decoders git-svn-id: https://svn.musicpd.org/mpd/trunk@940 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add vim shiznit to end of all source filesWarren Dukes2004-04-141-0/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* adjust scaling of software volumeWarren Dukes2004-04-111-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@681 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* use EXIT_SUCCESS and EXIT_FAILUREWarren Dukes2004-04-021-6/+6
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@591 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* use 16-bit signed ints for storing positions in the ring bufferWarren Dukes2004-04-011-0/+5
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@576 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* memset erroredFile to 0Warren Dukes2004-03-011-0/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@127 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix a typecastWarren Dukes2004-03-011-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@126 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* put decode_pid in shared mem, so if player process dies, the masterWarren Dukes2004-02-271-0/+1
| | | | | can still kill the decode process. git-svn-id: https://svn.musicpd.org/mpd/trunk@107 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* some more cleanupsWarren Dukes2004-02-251-12/+12
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@60 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* cleanup logging, need to be careful with SECURE and DEBUGWarren Dukes2004-02-251-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@58 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* be more careful with string manipulations, use strncpy as much as possibleWarren Dukes2004-02-251-2/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@56 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* import from SF CVSWarren Dukes2004-02-231-0/+124
git-svn-id: https://svn.musicpd.org/mpd/trunk@1 09075e82-0dd4-0310-85a5-a0d7c8717e4f