aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Tidying up some code.J. Alexander Treuman2007-06-091-17/+10
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6527 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Only call finishDriverFunc if there is one. The null plugin doesn't haveJ. Alexander Treuman2007-05-301-1/+2
| | | | | one now, and trying to call NULL was causing a segfault at exit. git-svn-id: https://svn.musicpd.org/mpd/trunk@6398 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a singleJ. Alexander Treuman2007-05-261-6/+3
| | | | | call to FATAL(). git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Make pcm_convertAudioFormat return the buffer size. This is necessaryJ. Alexander Treuman2007-05-261-8/+6
| | | | | | | | because lsr may return less than the input buffer size, and the rest of the audio code needs to know the new size. This fixes the clicking that was introduced with recent changes to the lsr code. A huge thanks to remiss for figuring this out. git-svn-id: https://svn.musicpd.org/mpd/trunk@6273 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Reverting to the full lsr API. Turns out the simple API needs all of theJ. Alexander Treuman2007-05-241-4/+6
| | | | | | | | audio at once, so it won't work for us. The old full API code was still heavily broken, as each call to pcm_convertSampleRate() used the same state, even if it was processing two streams of audio. The new code keeps a separate state for each audio stream that's being converted. git-svn-id: https://svn.musicpd.org/mpd/trunk@6255 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Split pcm_convertAudioFormat into separate functions for bitrate, channel,J. Alexander Treuman2007-05-221-5/+3
| | | | | | and samplerate conversion. This makes the code much easier to read, and fixes a few bugs that were previously there. git-svn-id: https://svn.musicpd.org/mpd/trunk@6224 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* The massive copyright updateAvuton Olrich2007-04-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* an attempted fix for bug 1368Warren Dukes2006-10-171-20/+26
| | | | | - don't close and reopen an audioOutput when it has a fixed output format, and closing and reopening the device is unneccessary when the input audio format changes git-svn-id: https://svn.musicpd.org/mpd/trunk@4908 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Replace strdup and {c,re,m}alloc with x* variants to check for OOM errorsEric Wong2006-08-261-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Spelling & GrammarAvuton Olrich2006-08-111-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4612 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* audio: malloc reductionsEric Wong2006-08-011-33/+26
| | | | | | | | | | | | | Just malloc all of the audioOutput array in one shot to avoid fragmentation and to improve cache locality when iterating through the array. We also know name and type members of the AudioOutput struct won't change in the config, so there's no need to strdup them. newAudioOutput => initAudioOutput git-svn-id: https://svn.musicpd.org/mpd/trunk@4515 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* remove deprecated myfprintf wrapperEric Wong2006-07-301-2/+3
| | | | | | | This shaves another 5-6k because we've removed the paranoid fflush() calls after every fprintf. Now we only fflush() when we need to git-svn-id: https://svn.musicpd.org/mpd/trunk@4493 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-201-1/+1
| | | | | | 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
* Add mpd-indent.shAvuton Olrich2006-07-201-85/+98
| | | | | | 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: ANSI-fy function declarationsEric Wong2006-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Committing qball's patch to list supported audio outputs in --versionJ. Alexander Treuman2006-07-161-0/+12
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4357 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-0/+18
| | | | | the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* don't require format parameter for audio_output optionsWarren Dukes2005-06-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3318 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* forgot to parse the format string of audio_output'sWarren Dukes2005-05-291-11/+14
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3296 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* if no audioOutput specified, we no attempt to detect if there exists a ↵Warren Dukes2005-03-121-38/+70
| | | | | usable oss or alsa device git-svn-id: https://svn.musicpd.org/mpd/trunk@3057 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* we ne allow audioOutput plugins to set the final outAudioFormat that will be ↵Warren Dukes2005-03-081-9/+16
| | | | | used. we now use alsa's _near functions to detect what to use. git-svn-id: https://svn.musicpd.org/mpd/trunk@3038 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* implemented dropping of current buffered audio, works for oss, but there seemsWarren Dukes2005-03-051-0/+5
| | | | | to be a "blip" for alsa devices, needs more work git-svn-id: https://svn.musicpd.org/mpd/trunk@3011 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* don't need to pass audioFormat to openDeviceFuncWarren Dukes2004-11-191-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2708 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* ok, now song->url is only the filename, not the full path to the songWarren Dukes2004-11-111-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2602 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add a buffer to audio layer, so we only send data to audio devices 32 times ↵Warren Dukes2004-11-091-2/+0
| | | | | per second git-svn-id: https://svn.musicpd.org/mpd/trunk@2553 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* see if this fixes the clients disconnecting issuesWarren Dukes2004-11-081-2/+9
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2552 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* abstract out audioFormat conversion from shout plugin to the audioOutput layer,Warren Dukes2004-11-021-7/+82
| | | | | now format can be specified for each different audioOutput device git-svn-id: https://svn.musicpd.org/mpd/trunk@2474 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* now np's OSS stuff actually worksWarren Dukes2004-11-021-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2459 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* begin integrating np's oss codeWarren Dukes2004-10-291-0/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2394 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix user being parsed as a pathWarren Dukes2004-10-281-0/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2377 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* merge shank-rewrite-config changesWarren Dukes2004-10-281-5/+35
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2375 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* also, don't need the device open to send the metadataWarren Dukes2004-10-261-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2347 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix a big time bug in metadataChunk (off by one in an array assignment)Warren Dukes2004-10-251-0/+6
| | | | | also, now we have metadata in our streams git-svn-id: https://svn.musicpd.org/mpd/trunk@2337 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* shout audioOutput will now connect and disconnect from icecast serverWarren Dukes2004-10-201-2/+5
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2285 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* some small cleanupsWarren Dukes2004-10-201-1/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2280 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* ok, now we're using some of the new audioOutput layer stuff, needs some ↵Warren Dukes2004-10-201-0/+1
| | | | | serious testing, and there maybe some serios BREAKAGE git-svn-id: https://svn.musicpd.org/mpd/trunk@2279 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* some work on the new audioOutput layerWarren Dukes2004-10-201-4/+18
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2277 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add audioOutput.cWarren Dukes2004-10-101-0/+43
git-svn-id: https://svn.musicpd.org/mpd/trunk@2205 09075e82-0dd4-0310-85a5-a0d7c8717e4f