aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs (unfollow)
Commit message (Collapse)AuthorFilesLines
2007-04-11Only a few changes in jack_playAudio.José Anarch1-13/+19
git-svn-id: https://svn.musicpd.org/mpd/trunk@5909 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09Now process and playAudio use mutexes.José Anarch1-52/+20
git-svn-id: https://svn.musicpd.org/mpd/trunk@5897 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09Don't allow "true" as a value for use_mmap for consistency with other "yesJ. Alexander Treuman1-2/+1
or no" parameters. git-svn-id: https://svn.musicpd.org/mpd/trunk@5896 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05The massive copyright updateAvuton Olrich8-9/+9
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-03-23Another patch from JoseAvuton Olrich1-50/+29
git-svn-id: https://svn.musicpd.org/mpd/trunk@5733 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-03-23Add new update from Jose for JACKAvuton Olrich1-31/+71
git-svn-id: https://svn.musicpd.org/mpd/trunk@5729 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-21Fix some error messages concerning _ao output driverQball Cow1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@5268 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-20José Anarch: JACK updatesAvuton Olrich1-40/+63
git-svn-id: https://svn.musicpd.org/mpd/trunk@5267 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-14jack: fix type warning in error messageEric Wong1-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
2007-01-14Don't initialize globals to zero (or NULL)Eric Wong2-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
2007-01-14jack: fix double-free in finish routineEric Wong1-3/+12
git-svn-id: https://svn.musicpd.org/mpd/trunk@5252 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-14jack: fix potential segfaults in parsing bad configs for 'ports'Eric Wong1-5/+21
git-svn-id: https://svn.musicpd.org/mpd/trunk@5251 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-14jack: fix multiple segfaults when jackd hasn't been startedEric Wong1-8/+17
git-svn-id: https://svn.musicpd.org/mpd/trunk@5250 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-14jack: strdup => xstrdup for error checkingEric Wong1-4/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@5249 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-14jack: declare global variables as staticEric Wong1-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
2006-12-30And a fix for the warnings in the last patch for JACKAvuton Olrich1-4/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@5192 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-12-30A JACK patch to fix some old issues, from author.Avuton Olrich1-170/+189
git-svn-id: https://svn.musicpd.org/mpd/trunk@5191 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-11-07audioOutput_alsa: print out the bitrate we wanted to setEric Wong1-1/+1
..and not the enum value that corresponds to that bitrate git-svn-id: https://svn.musicpd.org/mpd/trunk@5030 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-10-18remove some unneccesary includes from the audioOutput'sWarren Dukes7-21/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@4913 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-10-18jack patch from anarch (and some type fixes for mp4 and acc plugins)Warren Dukes1-0/+380
git-svn-id: https://svn.musicpd.org/mpd/trunk@4912 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-10-11audioOutput_shout: use shout_set_nonblockingEric Wong1-3/+17
This patch should continue to allow mpd to play as well as possible to icecast servers while avoiding stalls on local devices. This has eliminated ALSA underrun errors for me while streaming to a remote host while the network connection was bad. Of course, this makes opening a connection non-blocking, too, so myShout_openShoutConn is a bit more complex. git-svn-id: https://svn.musicpd.org/mpd/trunk@4898 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-10-10Allow an ogg quality of -1 to be specified.J. Alexander Treuman1-5/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@4893 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-09Hopefully fix endian problem mac x86/ppcQball Cow1-2/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@4750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26Replace strdup and {c,re,m}alloc with x* variants to check for OOM errorsEric Wong7-18/+18
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-26audioOutputs_oss: [trivial] make loop interation consistent with othersEric Wong1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20trivial: labels should be on the left-most column, no tabbingEric Wong2-3/+3
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-12audioOutput_alsa.c: avoid changing our internal period and buffer time valuesEric Wong1-6/+9
Passing a ref to snd_pcm_hw_params_set_{buffer,period}_time_near can modify our internal {period,buffer}_time members inside the AlsaData structure, making re-initializing the device across sample/bit rate and channel changes non-idempotent. git-svn-id: https://svn.musicpd.org/mpd/trunk@4616 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-11Spelling & GrammarAvuton Olrich2-4/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@4612 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-08audioOutput_pulse: ansi-fy function declarations (sparse)Eric Wong1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@4599 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-08more sparse cleanupsEric Wong2-3/+3
* less-commonly compiled things like ao/mvp outputs * Adding -Wno-transparent-union to SPARSE_FLAGS makes it check inside decode.c, directory.c, player.c, and sig_handlers.c * remove unused variables leftover from the master process in sig_handlers.c git-svn-id: https://svn.musicpd.org/mpd/trunk@4598 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01audioOutput_oss: cleanups (stolen from -ke)Eric Wong1-73/+58
git-svn-id: https://svn.musicpd.org/mpd/trunk@4518 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-26Remove the fifo plugin. It's currently useless for the average user, and ↵J. Alexander Treuman1-251/+0
making it more presentable isn't something I'm willing to do before 0.12. It will likely be added back after 0.12, along with some very experimental stuff to make it more usable. git-svn-id: https://svn.musicpd.org/mpd/trunk@4472 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-24audioOutput_alsa: better period_size auto-configurationEric Wong1-13/+20
We'll try setting an initial value of 50ms, and halve it each time snd_pcm_hw_params fails with -EPIPE. This way we'll can use a larger (50ms) period_size whenever a device supports it, and automatically pick smaller ones if we can't set larger ones. This removes the calculation borrowed from libao (svn) as well. Other minor things: "Alsa" => "ALSA" in error messages _US appended to *_TIME constants so we won't get confused (shank's request) git-svn-id: https://svn.musicpd.org/mpd/trunk@4438 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-23Renaming stat struct to st, for consistency with the rest of mpdJ. Alexander Treuman1-5/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@4435 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-23chang the default period_time to 50ms. On my setup, setting the period_time ↵Warren Dukes1-1/+4
to 0ms sounds like complete crap. 50ms is the default that xmms has used for years, so lets just stick with that. git-svn-id: https://svn.musicpd.org/mpd/trunk@4433 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-22Adding fifo output pluginJ. Alexander Treuman1-0/+251
git-svn-id: https://svn.musicpd.org/mpd/trunk@4423 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-21audioOutput_alsa: oops, I broke autodetection in r4363, fixedEric Wong1-1/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@4416 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20#include <string.h> in PulseAudio output for correctnessJ. Alexander Treuman1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4412 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich6-18/+18
Add a few new options for indent to try to make things a bit cleaner git-svn-id: https://svn.musicpd.org/mpd/trunk@4411 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich6-716/+796
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
2006-07-19s/ad/pd/ in the PluseAudio plugin (I forgot to rename when copying from alsa)J. Alexander Treuman1-31/+31
git-svn-id: https://svn.musicpd.org/mpd/trunk@4404 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-19Throttle PuleAudio connection attempts so we don't spam the error logJ. Alexander Treuman1-5/+24
git-svn-id: https://svn.musicpd.org/mpd/trunk@4403 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17audioOutput_mvp: remove unused variableEric Wong1-1/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@4383 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17alsa: fix memory leaks from snd_*_open*()Eric Wong1-0/+2
ALSA uses a global config structure that's overwritten (and not free'd) every time one of those functions is called, so we have to manually call snd_config_update_free_global() to release it. Hint taken from MEMORY-LEAK in the ALSA source code git-svn-id: https://svn.musicpd.org/mpd/trunk@4381 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17sparse: replace 0 (integer) usage with NULL where appropriateEric Wong1-4/+5
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
2006-07-17sparse: ANSI-fy function declarationsEric Wong3-5/+5
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
2006-07-16OSS: handle device disconnects and reconnects (w/o needing a mpd restart)Eric Wong1-10/+11
Like the ALSA patches, this allows OSS devices to be disconnected during playback and MPD will be able to reopen and reuse them without restarting. git-svn-id: https://svn.musicpd.org/mpd/trunk@4366 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16audio: attempt to gracefully handle disconnected/reconnected devicesEric Wong1-0/+5
Currently only ALSA is supported/tested, and only if the mixer device is not on the audio device being disconnected (software mixer). This patch allows me to disconnect my Headroom Total Airhead USB sound card, and resume playback (skips to the next song, which should be fixed) when the device is plugged back in. git-svn-id: https://svn.musicpd.org/mpd/trunk@4364 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16audioOutput_alsa: add use_mmap, period_time, buffer_time optionsEric Wong1-15/+23
ALSA support in libao supports configuring of these variables, and some hardware setups may benefit from having these things as tweakable. git-svn-id: https://svn.musicpd.org/mpd/trunk@4363 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16audioOutput_alsa: calculate period size from sample rateEric Wong1-2/+5
... instead of hard-coding it to a ridiculously high value that makes bandwidth-starved devices unhappy. libao (in SVN) does the same thing, and this calculation was indeed taken from it. Low-bandwidth USB (1.1) sound devices seem to need this to prevent underrun / broken pipe errors (during hw setup, no less) from being triggered. git-svn-id: https://svn.musicpd.org/mpd/trunk@4362 09075e82-0dd4-0310-85a5-a0d7c8717e4f