aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs (unfollow)
Commit message (Collapse)AuthorFilesLines
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
2006-07-15De-inline non-trivial, non-performance-critical functionsEric Wong1-1/+1
Functions that should stay inlined should have an explanation attached to them. git-svn-id: https://svn.musicpd.org/mpd/trunk@4355 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15[CLEANUP] Fix indentation to be like the rest ofAvuton Olrich1-126/+130
the repository git-svn-id: https://svn.musicpd.org/mpd/trunk@4348 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Use audio_output { name } for the stream name in PulseAudio, but do it The ↵J. Alexander Treuman1-7/+2
Right Way git-svn-id: https://svn.musicpd.org/mpd/trunk@4342 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Use audio_output { name } for the stream name in PulseAudioJ. Alexander Treuman1-4/+8
git-svn-id: https://svn.musicpd.org/mpd/trunk@4340 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman7-7/+7
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Use a macro to declare disabled audio output pluginsJ. Alexander Treuman7-93/+13
git-svn-id: https://svn.musicpd.org/mpd/trunk@4321 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich7-6/+24
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Add PulseAudio supportJ. Alexander Treuman1-0/+193
git-svn-id: https://svn.musicpd.org/mpd/trunk@4316 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-12OSS: correctly check for the device in oss_testDefault()Eric Wong1-3/+4
open(2) returns -1 on error (if the device does not exist), and -1 is true. Also, put shank's name in the copyright header since half the code is his (including this bug :P). git-svn-id: https://svn.musicpd.org/mpd/trunk@4310 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-05Remove unnecessary include, has always been pulledAvuton Olrich1-1/+0
in by vorbisenc.h git-svn-id: https://svn.musicpd.org/mpd/trunk@4298 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-06-11Reverting patch to "fix" the alsa plugin when used with dmix. It ended up ↵J. Alexander Treuman1-1/+2
breaking the alsa rate plugin, and dmix seems to work fine without it. Thanks to Skee from #mpd for testing. git-svn-id: https://svn.musicpd.org/mpd/trunk@4269 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-03-25src/audioOutputs/audioOutput_oss.c: fix for big-endian machinesEric Wong1-15/+19
Patch by Qball. Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@3935 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-03-16Hopefully the last of the spelling fixes :>Eric Wong1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@3923 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-12-12potential fix for bug #466Warren Dukes1-6/+6
git-svn-id: https://svn.musicpd.org/mpd/trunk@3726 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-11-19remove C++ style commentsEric Wong3-19/+21
git-svn-id: https://svn.musicpd.org/mpd/trunk@3689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-11-19gcc 2.95 fixesEric Wong4-5/+8
audioOutput_osx.c, aac_decode.c, mp4_decode.c have NOT been thoroughly checked, but I nevertheless managed to eyeball and fix one incompatibility in audioOutput_osx.c All other files have been build successfully with gcc 2.95 git-svn-id: https://svn.musicpd.org/mpd/trunk@3688 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-10-02Fixed (tested in Fink and DarwinPorts) osX output pluginQball Cow1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@3500 09075e82-0dd4-0310-85a5-a0d7c8717e4f