aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* converted MpdTagItem.type to an enumMax Kellermann2008-08-301-0/+2
| | | | | Don't use CPP macros when you can use C enum... this also allows better type checking.
* enable -Wpointer-arith, -Wstrict-prototypesMax Kellermann2008-08-304-6/+8
| | | | | | Also enable -Wunused-parameter - this forces us to add the gcc "unused" attribute to a lot of parameters (mostly library callback functions), but it's worth it during code refactorizations.
* jack: initialize audioOutput->dataMax Kellermann2008-06-131-1/+3
| | | | | | | | | | | | | Initialize audioOutput->data with NULL in jack_initDriver(). Previously, this was never initialized, although the other functions relied on it being NULL prior to jack_openDevice(). This patch addresses bug 0001641[1]. In contrast to the patch provided by the bug reporter, it moves the initialization before the "!param" check. [1] - http://musicpd.org/mantis/view.php?id=1641 git-svn-id: https://svn.musicpd.org/mpd/trunk@7375 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed another shadow warningMax Kellermann2008-04-121-11/+11
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7307 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* use size_t and constant pointer in ao pluginsMax Kellermann2008-04-1210-31/+59
| | | | | | | The audio output plugins should get a constant pointer, because they must not modify the buffer. Since the size is a non-negative buffer size in bytes, we should change its type to size_t. git-svn-id: https://svn.musicpd.org/mpd/trunk@7293 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* yet more unsigned integersMax Kellermann2008-04-121-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7287 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* whitespace cleanupMax Kellermann2008-04-121-7/+7
| | | | | Clean up some space indentations, replace with tabs. git-svn-id: https://svn.musicpd.org/mpd/trunk@7239 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* eliminated duplicate initializationMax Kellermann2008-03-262-4/+4
| | | | | | | Local variables which are never read before the first assignment don't need initialization. Saves a few bytes of text. Also don't reset variables which are never read until function return. git-svn-id: https://svn.musicpd.org/mpd/trunk@7199 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* parse/initialize with the correct data typeMax Kellermann2008-03-261-1/+1
| | | | | | | When we expect an integer as result, why would we use the double precision floating point parser? strtol() is a better match, although we should probably check for overflows... git-svn-id: https://svn.musicpd.org/mpd/trunk@7198 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* explicitly downcastMax Kellermann2008-03-262-3/+3
| | | | | | | | Tools like "sparse" check for missing downcasts, since implicit cast may be dangerous. Although that does not change the compiler result, it may make the code more readable (IMHO), because you always see when there may be data cut off. git-svn-id: https://svn.musicpd.org/mpd/trunk@7196 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix -Wconst warningsMax Kellermann2008-02-051-6/+11
| | | | | | [ew: cleaned up the dirty union hack a bit] Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed "comparison between signed and unsigned"Max Kellermann2008-01-261-1/+1
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7146 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed -Wshadow warningsMax Kellermann2008-01-261-44/+44
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed invalid C prototypesMax Kellermann2008-01-261-1/+1
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7142 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-039-60/+12
| | | | | | | | | | | | | This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Know about SND_PCM_STATE_RUNNING, might fix some bugsQball Cow2007-12-161-0/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7077 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* conf: use getBoolBlockParam for block params, tooEric Wong2007-09-052-13/+7
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6858 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* adding \n to a bunch of error message stringsJ. Alexander Treuman2007-08-272-4/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6826 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* export FATAL() with noreturn attributeEric Wong2007-08-271-3/+1
| | | | | | | | | | | | | | | | | | | | | This attribute was set in log.c, but not exported to other modules in log.h This allows us to remove some unneccessary variable initializations that were added in r6277. I did audioOutput_shout.c a bit differently, to avoid some jumps. before: $ size src/mpd text data bss dec hex filename 225546 4040 14600 244186 3b9da src/mpd after: $ size src/mpd text data bss dec hex filename 224698 4040 14600 243338 3b68a src/mpd git-svn-id: https://svn.musicpd.org/mpd/trunk@6821 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* audioOutputs/audioOutput_shout: adding timers backJ. Alexander Treuman2007-08-111-27/+80
| | | | | | | The shout plugin will now feign playback until the connect timeout is hit, preventing connection attempts from blocking playback on local outputs. Note that this patch is very different from remiss' original one. git-svn-id: https://svn.musicpd.org/mpd/trunk@6738 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Use parsePath for the fifo output's path parameter.J. Alexander Treuman2007-06-131-9/+9
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6623 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Adding FIFO audio output. This is pretty much identical to the old one,J. Alexander Treuman2007-06-131-0/+299
| | | | | except that it now uses a timer for throttling. git-svn-id: https://svn.musicpd.org/mpd/trunk@6621 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Use <= when comparing (current time - start time) to a timeout. This wayJ. Alexander Treuman2007-06-121-2/+2
| | | | | | | if the clock ticks right after we get the start time and the timeout is only one second, we'll still wait a full second instead of returning immediately. git-svn-id: https://svn.musicpd.org/mpd/trunk@6557 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Make the shout timeout configurable. The default is still 2 seconds.J. Alexander Treuman2007-06-121-2/+13
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6556 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Redoing remiss's shout patch. This time, just block on open() instead ofJ. Alexander Treuman2007-06-121-96/+29
| | | | | | | | | | | | | pretending to play while we wait for the connection to timeout. This removes the need for timers, and thus removes the now unnecessary timer_get_runtime_* function(s) from the timer code. The changes made compared to the pre-patch shout plugin are: * Block while connecting, timing out after 2 seconds. * Close the device, and not just the connection, if play returns -1. * Remove sd->last_err (it's always assigned before use). * Some minor cleanups. git-svn-id: https://svn.musicpd.org/mpd/trunk@6555 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* This should resolve some of the timing issues experienced after switching ↵Roger Bystrøm2007-06-091-8/+76
| | | | | | | | | | | from blocking to non-blocking shout api * Wait ten seconds before declearing the shout server unreachable * Fix a state where it would never attempt to connect if it had previously failed It isn't perfect yet, but I'd like some testing on it from other setups git-svn-id: https://svn.musicpd.org/mpd/trunk@6523 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* dmix fix, don't call snd_pcm_drain unless we're already in the RUNNINGWarren Dukes2007-06-081-1/+3
| | | | | | | state (when users press stop, previous snd_pcm_drop(), then snd_pcm_drain() was called. this would lockup dmix) git-svn-id: https://svn.musicpd.org/mpd/trunk@6517 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Move the timing code from the null plugin to timer.c, so it can be easilyJ. Alexander Treuman2007-05-301-74/+19
| | | | | used in other plugins (fifo, shout, etc.). git-svn-id: https://svn.musicpd.org/mpd/trunk@6397 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Adding a null output plugin.J. Alexander Treuman2007-05-301-0/+129
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6393 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix compilation error (missing ,)Avuton Olrich2007-05-271-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6289 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* After changing ERROR();exit() to FATAL(), gcc incorrectly detects someJ. Alexander Treuman2007-05-261-3/+2
| | | | | | 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
* Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a singleJ. Alexander Treuman2007-05-263-45/+24
| | | | | call to FATAL(). git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Changing some DEBUG/ERROR/FATAL messages in the JACK plugin.J. Alexander Treuman2007-05-231-18/+13
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6232 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Only a few changes in jack_playAudio.José Anarch2007-04-111-13/+19
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5909 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Now process and playAudio use mutexes.José Anarch2007-04-091-52/+20
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5897 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Don't allow "true" as a value for use_mmap for consistency with other "yesJ. Alexander Treuman2007-04-091-2/+1
| | | | | or no" parameters. git-svn-id: https://svn.musicpd.org/mpd/trunk@5896 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* The massive copyright updateAvuton Olrich2007-04-058-9/+9
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Another patch from JoseAvuton Olrich2007-03-231-50/+29
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5733 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add new update from Jose for JACKAvuton Olrich2007-03-231-31/+71
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5729 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix some error messages concerning _ao output driverQball Cow2007-01-211-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5268 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* José Anarch: JACK updatesAvuton Olrich2007-01-201-40/+63
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5267 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* jack: fix type warning in error messageEric Wong2007-01-141-2/+2
| | | | | | | | just casting to int because it's the simplest (%z is not well-supported) Noticed-by: avuton on a 64-bit machine git-svn-id: https://svn.musicpd.org/mpd/trunk@5257 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Don't initialize globals to zero (or NULL)Eric Wong2007-01-142-2/+2
| | | | | | | | Some compilers and linkers aren't smart enough to optimize this, as global variables are implictly initialized to zero. As a result, binaries are a bit smaller as more goes in the .bss and less in the text section. git-svn-id: https://svn.musicpd.org/mpd/trunk@5254 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* jack: fix double-free in finish routineEric Wong2007-01-141-3/+12
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5252 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* jack: fix potential segfaults in parsing bad configs for 'ports'Eric Wong2007-01-141-5/+21
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5251 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* jack: fix multiple segfaults when jackd hasn't been startedEric Wong2007-01-141-8/+17
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5250 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* jack: strdup => xstrdup for error checkingEric Wong2007-01-141-4/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5249 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* jack: declare global variables as staticEric Wong2007-01-141-3/+3
| | | | | | | There's no reason they shouldn't be static. Additionally, output_ports doesn't need to be initialized to NULLs; that is (and has always been) implicit (for all global variables) git-svn-id: https://svn.musicpd.org/mpd/trunk@5247 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* And a fix for the warnings in the last patch for JACKAvuton Olrich2006-12-301-4/+5
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5192 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* A JACK patch to fix some old issues, from author.Avuton Olrich2006-12-301-170/+189
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5191 09075e82-0dd4-0310-85a5-a0d7c8717e4f