aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann2008-09-071-8/+8
| | | | | Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
* audio: don't pass "fd" to printAudioDevices()Max Kellermann2008-09-071-1/+2
| | | | Pass the client struct instead.
* audio: don't pass "fd" to {en,dis}ableAudioDevice()Max Kellermann2008-09-071-2/+2
| | | | No protocol code in the audio output library.
* include cleanupMax Kellermann2008-09-061-1/+2
| | | | As usual, include only headers which are really needed.
* tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann2008-08-291-1/+1
| | | | | Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
* pass constant pointersMax Kellermann2008-08-291-1/+1
| | | | And again, convert arguments to const.
* moved struct AudioFormat to audio_format.hMax Kellermann2008-08-261-12/+1
| | | | | We want to expose the AudioFormat structure to plugins; remove some clutter by moving its declaration to a separate header file.
* remove audioDeviceStates from playerData and getPlayerDataEric Wong2008-06-021-2/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7372 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* const pointers in audio.cMax Kellermann2008-04-121-5/+6
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7344 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* clean up CPP includesMax Kellermann2008-04-121-2/+0
| | | | | | | | | Try to only include headers which are really needed. We should particularly check all "headers including other headers". The long-term goal is to have a manageable, small API for plugins (decoders, output) without so many mpd internals cluttering the namespace. git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* use size_t in audio.cMax Kellermann2008-04-121-1/+1
| | | | | | | Buffer sizes should be size_t. This is safe here, at least not unsafer than without the patch. I have no idea why audioBufferSize and audioBufferPos were explicitly declared as signed integer. git-svn-id: https://svn.musicpd.org/mpd/trunk@7296 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* moved expression to audioFormatSizeToTime()Max Kellermann2008-04-121-0/+5
| | | | | | | The multi-line expression which calculates sizeToTime is hard to read, partly because "cb->audioFormat." is too long. Create a separate inline function in audio.h for that. git-svn-id: https://svn.musicpd.org/mpd/trunk@7277 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* audio: use a machine word for array sizesMax Kellermann2008-03-261-3/+3
| | | | | | | | we do not save anything by limiting a variable to an unsigned char, since the compiler aligns it at machine word size anyway. however by using the full machine word, we save one instruction, and we remove the useless artificial limitation to 255. git-svn-id: https://svn.musicpd.org/mpd/trunk@7203 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-031-2/+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
* silence is constant, as is the buffer we pass to playAudioEric Wong2008-01-011-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7123 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
* Fix warnings for -Wmissing-prototypesAvuton Olrich2006-08-201-8/+8
| | | | | | Add -Wmissing-prototypes if compiling with gcc Static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* audio: remove AUDIO_MAX_DEVICES limitEric Wong2006-08-011-2/+2
| | | | | | | Some people have more than 8 devices (the old limit). It's pretty easy to support as many as our hardware and OS allows so we might as well. git-svn-id: https://svn.musicpd.org/mpd/trunk@4513 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Standardize state_file handling routines.Eric Wong2006-07-301-2/+2
| | | | | This way it's easier to manage and extend. git-svn-id: https://svn.musicpd.org/mpd/trunk@4494 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* interface/connection malloc reductions from mpd-keEric Wong2006-07-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch massively reduces the amount of heap allocations at the interface/command layer. Most commands with minimal output should not allocate memory from the heap at all. Things like repeatedly polling status, currentsong, and volume changes should be faster as a result, and more importantly, not a source of memory fragmentation. These changes should be safe in that there's no way for a remote-client to corrupt memory or otherwise do bad stuff to MPD, but an extra set of eyes to review would be good. Of course there's never any warranty :) No longer do we use FILE * structures in the interface, which means we don't have to allocate any new memory for most connections. Now, before you go on about losing the buffering that FILE * +implies+, remember that myfprintf() never took advantage of any of the stdio buffering features. To reduce the diff and make bugs easier to spot in the diff, I've kept myfprintf in places where we write to files (and not network interfaces). Expect myfprintf to go away entirely soon (we'll use fprintf for writing regular files). git-svn-id: https://svn.musicpd.org/mpd/trunk@4483 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-201-2/+2
| | | | | | 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
* Committing qball's patch to list supported audio outputs in --versionJ. Alexander Treuman2006-07-161-0/+1
| | | 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-1/+1
| | | | | the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Commit Jat's patch for bug 1281Qball Cow2006-05-081-0/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4136 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* rewrite statefile code for audio devicesEric Wong2006-03-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the words of the original author, it was 'crappy'. I tend to agree :) The code has also been broken for at least the past few months, and nobody bothered fixing it The previous format it was overly complex: 5 lines to describe each device. The new format is one-line per-device: audio_device_state:%d:%s %d - 0 for disabled, any integer for enabled %s - name of the device as specified in the config file, whitespace and all Incompatibilities: * Output names are now _required_ to be unique. This is required because the new format relies solely on the name of the audio device. Relying on the device IDs internal to MPD was a bad idea anyways since the user usually has none or very little idea how they're generated, and adding a new device or removing one from a config would throw things off completely. This is also just a Good Idea(TM) because it makes things less confusing to users when they see it in their clients. * Output states are not preserved from the previous format. Not a big deal, since the previous code was never officially released. Also, it's been broken for months now, so I doubt anybody would notice :) git-svn-id: https://svn.musicpd.org/mpd/trunk@3928 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Saving state of output-device in state-file. (This is a temporary solution, ↵Qball Cow2005-08-231-0/+4
| | | | | rewrite of state-file is planned for 0.13) git-svn-id: https://svn.musicpd.org/mpd/trunk@3449 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* implemented dropping of current buffered audio, works for oss, but there seemsWarren Dukes2005-03-051-0/+2
| | | | | 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
* new command "devices", prints devices and their statesWarren Dukes2004-11-021-0/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2486 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* new commands: enalbe_device, and disable_device, (maybe these commands ↵Warren Dukes2004-11-021-0/+6
| | | | | | | should be toggles instead of two seperate commands?) also, on close device, close the shout connection git-svn-id: https://svn.musicpd.org/mpd/trunk@2485 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* enabling and disabling individual audioOutputs is mostly done, just needWarren Dukes2004-11-021-0/+3
| | | | | to add the command hooks git-svn-id: https://svn.musicpd.org/mpd/trunk@2484 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* abstract out audioFormat conversion from shout plugin to the audioOutput layer,Warren Dukes2004-11-021-0/+2
| | | | | 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
* try to fix metadata on initially playing (metadata being sent before device ↵Warren Dukes2004-10-261-1/+1
| | | | | is open) git-svn-id: https://svn.musicpd.org/mpd/trunk@2344 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix a big time bug in metadataChunk (off by one in an array assignment)Warren Dukes2004-10-251-0/+5
| | | | | also, now we have metadata in our streams git-svn-id: https://svn.musicpd.org/mpd/trunk@2337 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* configure shout encoding quality and audio formatWarren Dukes2004-10-231-0/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2307 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* minor little changes to audio junkWarren Dukes2004-10-201-2/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2278 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* definition for audioOutput plugin interfaceWarren Dukes2004-09-061-1/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2111 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix a few bugs in mp3_decode and minimize alsa underruns by playing silence ↵Warren Dukes2004-06-191-0/+2
| | | | | when switch songs git-svn-id: https://svn.musicpd.org/mpd/trunk@1572 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* stuff for configuring the audio output format (sampling rate, channels, bits)Warren Dukes2004-05-101-2/+8
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@967 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add vim shiznit to end of all source filesWarren Dukes2004-04-141-0/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* volatile fun-nessWarren Dukes2004-04-121-3/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@705 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* more volatile stuffWarren Dukes2004-04-111-3/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@699 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add --disable-audio configure optionWarren Dukes2004-04-111-4/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@679 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* bunch of autotool cleanupsWarren Dukes2004-03-181-0/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@271 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* audio cleanupsWarren Dukes2004-02-271-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@109 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add xfade and audio to status, remove crossfade no args optionsWarren Dukes2004-02-271-3/+5
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@75 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* import from SF CVSWarren Dukes2004-02-231-0/+50
git-svn-id: https://svn.musicpd.org/mpd/trunk@1 09075e82-0dd4-0310-85a5-a0d7c8717e4f