aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/oss_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-07-25database, ...: remove EINTR checks after stdio callsMax Kellermann1-1/+1
MPD doesn't have child processes anymore, and thus we're not expecting to receive SIGCHLD very often. Since hard disk access isn't interrupted by signals anyway, we don't need those excessive checks.
2010-05-14output/oss: 24 bit support via OSS4Max Kellermann1-0/+34
Added #ifdefs on the macros AFMT_S24_NE and other OSS4 extensions.
2010-05-13output/oss: rewrite of the audio format detectionMax Kellermann1-301/+324
Removed the "supported" / "unsupported" arrays, and auto-detect on every open() call, just like the ALSA output plugin.
2010-05-13output/oss: use the *_NE macrosMax Kellermann1-8/+2
Removed the macro AFMT_S16_MPD.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-02audio_format: changed "bits" to "enum sample_format"Max Kellermann1-4/+5
This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value.
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-11-10fd_util: removed creat_cloexec()Max Kellermann1-2/+2
Add a "mode" argument to open_cloexec() instead.
2009-11-07set the close-on-exec flag on all file descriptorsMax Kellermann1-3/+7
Added the "fd_util" library, which attempts to use the new thread-safe Linux system calls pipe2(), accept4() and the options O_CLOEXEC, SOCK_CLOEXEC. Without these, it falls back to FD_CLOEXEC, which is not thread safe. This is particularly important for the "pipe" output plugin (and others, such as JACK/PulseAudio), because we were heavily leaking file descriptors to child processes.
2009-10-20mixer/{oss,alsa}: renamed the mixer source filesMax Kellermann1-1/+2
2009-03-26output_plugin: replaced output_plugin.get_mixer() with mixer_pluginMax Kellermann1-20/+1
The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
2009-03-14mixer_api: moved mixer_plugin imports to mixer_list.hMax Kellermann1-1/+1
This patch allows the output plugins to import only mixer_list.h, instead of the full mixer_api.h (which would expose internal structures).
2009-03-14mixer_api: moved functions to mixer_control.cMax Kellermann1-0/+1
mixer_control.h should provide the functions needed to manipulate a mixer, without exposing the internal mixer API (which is provided by mixer_api.h).
2009-03-13all: Update copyright header.Avuton Olrich1-9/+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-03-01output: removed duplicate debug messages from pluginsMax Kellermann1-5/+0
The MPD core logs the audio format of all audio outputs. Remove the duplicate message from the plugins.
2009-02-26output_plugin: report errors with GErrorMax Kellermann1-32/+43
Use GLib's GError library for reporting output device failures. Note that some init() methods don't clean up properly after a failure, but that's ok for now, because the MPD core will abort anyway.
2009-02-26oss: moved code from oss_open() to oss_setup()Max Kellermann1-13/+26
Eliminate one label and a bunch of gotos.
2009-02-26oss: convert OSS_STAT_* to an enumMax Kellermann1-10/+15
Use C instead of CPP.
2009-02-26oss: return bool instead of intMax Kellermann1-10/+10
Return type of oss_find_supported_param(), oss_can_convert() and oss_find_unsupported_param() should be bool instead of int.
2009-02-26oss: use unsigned integersMax Kellermann1-14/+9
Convert the num_supported and num_unsupported variables from signed to unsigned.
2009-02-26oss: no CamelCaseMax Kellermann1-107/+125
Renamed types, functions and variables.
2009-02-25output_plugin: don't pass audio_output object to method init()Max Kellermann1-2/+1
audio_output_get_name() has been removed, which was the only function left in output_api.h. The output plugin doesn't need the audio_output object at all, remove the parameter from the init() method.
2009-02-23output: pass the music chunk pointer as void*, not char*Max Kellermann1-2/+2
The meaning of the chunk depends on the audio format; don't suggest a specific format by declaring the pointer as "char*", pass "void*" instead.
2009-02-23output_api: play() returns a lengthMax Kellermann1-10/+7
The old API required an output plugin to not return until all data passed to the play() method is consumed. Some output plugins have to loop to fulfill that requirement, and may block during that. Simplify these, by letting them consume only part of the buffer: make play() return the length of the consumed data.
2009-02-16output_plugin: replaced method "control()" with "mixer()"Max Kellermann1-8/+9
The output plugin shouldn't know any specifics of the mixer API. Make it return the mixer object, and let the caller deal with it.
2009-01-25use g_free() instead of free()Max Kellermann1-1/+1
On some platforms, g_free() must be used for memory allocated by GLib. This patch intends to correct a lot of occurrences, but is probably not complete.
2009-01-25mixer: removed mixer_configure(), configure mixer in mixer_new()Max Kellermann1-4/+2
Allocate the mixer object when it is configured. Merged mixer_configure() into mixer_new(). mixer_new() was quite useless anyway.
2009-01-25mixer: return a mixer struct pointerMax Kellermann1-8/+10
Don't use statically allocated mixer objects.
2009-01-25conf: allow param==NULLMax Kellermann1-9/+7
Return the default value in the conf_get_block_*() functions when param==NULL was passed. This simplifies a lot of code, because all initialization can be done in one code path, regardless whether configuration is present.
2009-01-25conf: const pointers in block get functionsMax Kellermann1-2/+2
All config_get_block_*() functions should accept constant config_param pointers.
2009-01-18conf: added config_get_block_string()Max Kellermann1-3/+4
This replaces lots of getBlockParam() invocations.
2009-01-17conf: no CamelCase, part IMax Kellermann1-5/+6
Renamed functions, types, variables.
2009-01-16oss: evaluate the oss_open() return value properlyMax Kellermann1-1/+1
It returns bool, not int.
2009-01-10Introducing mixer apiViliam Mateicka1-8/+8
This patch tryes to introduce pluggable mixer (struct mixer_plugin) along with some basic infrastructure (mixer_* functions). Instance of mixer (struct mixer) is used in alsa and oss output plugin
2009-01-05fix G_BYTE_ORDER checkMax Kellermann1-1/+1
"#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
2009-01-05use GLib byte order macrosMax Kellermann1-2/+2
2009-01-04renaming mixer.h to mixer_api.hViliam Mateicka1-1/+1
2009-01-01output plugins: don't include gcc.hMax Kellermann1-2/+3
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2008-12-31Moving mixers to audio outputsViliam Mateicka1-0/+19
2008-11-25oss: use GLib instead of utils.h/log.hMax Kellermann1-55/+56
2008-10-29output: close device on play errorMax Kellermann1-1/+0
When an output plugin fails to play a chunk, close it. This replaces various manual close() calls in nearly all plugins.
2008-10-29output: use bool for return values and flagsMax Kellermann1-16/+17
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
2008-10-29oss: check and override audio_format properlyMax Kellermann1-0/+7
Don't accept 24 bit audio. Force MPD to use 16 bit if anything other than 8 or 16 bit is selected.
2008-10-26output: don't compile plugins which are disabledMax Kellermann1-8/+0
Don't compile the sources of disabled output plugins at all.
2008-10-26renamed src/audioOutputs/ to src/output/Max Kellermann1-0/+0
Again, no CamelCase in the directory name.
2008-10-14oss: use unsigned integer for ioctl constantsMax Kellermann1-12/+12
The OSS constants overflow a signed integer, use unsigned instead.
2008-10-14oss: convert several macros to enumMax Kellermann1-19/+25
C enums are nicer than CPP macros.
2008-10-11oss: fix opening default OSS deviceMax Kellermann1-1/+1
Leftover from the output API changes: oss_open_default() was changed to return a void*, but it still returned "0" to report success. Report the OssData pointer instead.
2008-10-10oss: added OssData.audio_formatMax Kellermann1-19/+20
This replaces the separate properties channels, sampleRate, bits.
2008-10-10audio_format: renamed sampleRate to sample_rateMax Kellermann1-2/+2
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.