aboutsummaryrefslogtreecommitdiffstats
path: root/src/timer.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-08-14timer: use monotonic clock if availableMax Kellermann1-13/+4
2011-12-13timer: fix time unit mixup in timer_delay()Max Kellermann1-1/+1
The local variable was already divided by 1000, and the return value was being divided by 1000 again - doh! This caused delays in the httpd output plugin that were too small by three orders of magnitude, and the buffer was filled too quickly.
2011-08-27rename 'Timer' to 'struct timer'Jonathan Neuschäfer1-8/+8
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-11-18timer: fix integer overflow in timer_delay()Max Kellermann1-1/+1
Fixes a regression: for output_plugin.delay(), we added a method to the timer class which returns the delay in milliseconds. This fails to detect negative values, because the unsigned integer is divided by 1000, and then casted to signed.
2010-11-05output_plugin: add method delay()Max Kellermann1-3/+3
This method is used to reduce the delay of commands issued to the shout plugin.
2010-11-05timer: add function timer_delay()Max Kellermann1-0/+13
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-11-12include config.h in all sourcesMax Kellermann1-0/+1
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-02-19utils: use g_usleep() instead of my_usleep()Max Kellermann1-2/+1
Now that I've found this nice function in the GLib docs, we can finally remove our custom sleep function. Still all those callers of g_usleep() have to be migrated one day to use events, instead of regular polling.
2009-01-03timer: use GLib instead of utils.hMax Kellermann1-4/+5
2008-10-10audio_format: added audio_format_frame_size()Max Kellermann1-1/+1
A frame contains one sample per channel, thus it is sample_size * channels. This patch includes some cleanup for various locations where the sample size for 24 bit audio was still 3 bytes (instead of 4).
2008-10-10audio_format: renamed sampleRate to sample_rateMax Kellermann1-1/+1
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
2008-10-08don't include os_compat.hMax Kellermann1-1/+4
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-09-09timer: constant pointersMax Kellermann1-1/+1
The audio_format argument to timer_new() should be constant, because it is not modified. The same is true for ShoutData.audioFormat.
2008-09-07audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann1-1/+2
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
2008-01-26fixed -Wshadow warningsMax Kellermann1-4/+4
Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-4/+1
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
2007-06-12Redoing remiss's shout patch. This time, just block on open() instead ofJ. Alexander Treuman1-7/+1
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
2007-06-09switching to us instead of ms on runtimeRoger Bystrøm1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@6522 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09Added timer_get_runtime_ms to know how long the timer has been runningRoger Bystrøm1-1/+7
git-svn-id: https://svn.musicpd.org/mpd/trunk@6521 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-30Move the timing code from the null plugin to timer.c, so it can be easilyJ. Alexander Treuman1-0/+80
used in other plugins (fifo, shout, etc.). git-svn-id: https://svn.musicpd.org/mpd/trunk@6397 09075e82-0dd4-0310-85a5-a0d7c8717e4f