aboutsummaryrefslogtreecommitdiffstats
path: root/src/output (follow)
Commit message (Collapse)AuthorAgeFilesLines
* oss: moved code from oss_open() to oss_setup()Max Kellermann2009-02-261-13/+26
| | | | Eliminate one label and a bunch of gotos.
* oss: convert OSS_STAT_* to an enumMax Kellermann2009-02-261-10/+15
| | | | Use C instead of CPP.
* oss: return bool instead of intMax Kellermann2009-02-261-10/+10
| | | | | Return type of oss_find_supported_param(), oss_can_convert() and oss_find_unsupported_param() should be bool instead of int.
* oss: use unsigned integersMax Kellermann2009-02-261-14/+9
| | | | | Convert the num_supported and num_unsupported variables from signed to unsigned.
* oss: no CamelCaseMax Kellermann2009-02-261-107/+125
| | | | Renamed types, functions and variables.
* alsa: fall back to 16 bit audioMax Kellermann2009-02-251-3/+8
| | | | When the sample format is unknown, fall back to 16 bit samples.
* alsa: moved code from alsa_open() to alsa_setup()Max Kellermann2009-02-251-32/+49
| | | | | | Simplify error handling a bit by moving some code into a separate function. This eliminates a good bunch of gotos, but that's not finished yet.
* mvp: check for reopen errorsMax Kellermann2009-02-251-2/+7
| | | | | When the MVP device has been closed in the cancel() method, and the play() method attempts to reopen it, check for errors.
* mvp: moved code to mvp_find_sample_rate()Max Kellermann2009-02-251-9/+17
| | | | Moved the table lookup code to a separate function.
* mvp: make the mvp_sample_rates array constMax Kellermann2009-02-251-1/+1
| | | | The array must never be modified, it's a constant lookup table.
* mvp: fall back to 16 bit audio samplesMax Kellermann2009-02-251-1/+5
| | | | | | Looks like the MVP audio output only supports 16 and 24 bit audio samples. If MPD generates any other sample formats, force it to use 16 bit.
* mvp: fall back to stereoMax Kellermann2009-02-251-1/+5
| | | | When the channel count is greater than 2, fall back to stereo sound.
* mvp: mvp_set_pcm_params() returns boolMax Kellermann2009-02-251-9/+14
| | | | | Return true/false instead of 0/-1. Also check its return value in mvp_output_open().
* mvp: pass audio_format struct to mvp_set_pcm_params()Max Kellermann2009-02-251-13/+23
| | | | | Pass a pointer to the audio_format struct instead of 3 separate integers.
* mvp: removed big_endian parameter from mvp_set_pcm_params()Max Kellermann2009-02-251-16/+3
| | | | | Don't pass the big_endian flag to mvp_set_pcm_params(), do a simple "G_BYTE_ORDER==G_LITTLE_ENDIAN" instead.
* mvp: use G_N_ELEMENTS(mvp_sample_rates)Max Kellermann2009-02-251-5/+2
| | | | | Instead of manually calculating the number of elements in the mvp_sample_rates array, use GLib's convenience macro G_N_ELEMENTS().
* mvp: no CamelCaseMax Kellermann2009-02-251-34/+38
| | | | Renamed types, functions and variables.
* fifo: return bool valuesMax Kellermann2009-02-251-12/+12
| | | | Return true/false for success/failure instead of returning 0/-1.
* fifo: no CamelCaseMax Kellermann2009-02-251-43/+50
| | | | Renamed types, functions and variables.
* fifo: removed timer!=NULL checksMax Kellermann2009-02-251-12/+1
| | | | | The MPD core guarantees that the audio_output object is always consistent, and our timer!=NULL checks are superfluous.
* ao: no CamelCaseMax Kellermann2009-02-251-48/+41
| | | | Renamed functions and variables.
* ao: removed AoData.device!=NULL checksMax Kellermann2009-02-251-12/+1
| | | | | | | The MPD core guarantees that the audio_output object is always in a consistent state: either open or closed. When open, it will not call the open() method again, and when closed, it will not call play(). Removed several checks and the NULL initialization.
* ao: removed implementation of method cancel()Max Kellermann2009-02-251-6/+0
| | | | | The method is empty, and we can simply set the method pointer to NULL instead.
* output_plugin: don't pass audio_output object to method init()Max Kellermann2009-02-2510-28/+16
| | | | | | 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.
* output_api: removed audio_output_get_name()Max Kellermann2009-02-253-23/+14
| | | | Use config_get_block_string("name") instead of audio_output_get_name().
* jack: initialize local variable "space"Max Kellermann2009-02-241-1/+1
| | | | | Fix a gcc warning, initialize the "space" variable at the beginning of mpd_jack_play().
* output: pass the music chunk pointer as void*, not char*Max Kellermann2009-02-2310-17/+17
| | | | | | 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.
* output_api: play() returns a lengthMax Kellermann2009-02-2310-112/+82
| | | | | | | | 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.
* shout: removed shout_plugin.hMax Kellermann2009-02-222-53/+28
| | | | | There are no plugins left which require shout_plugin.h. Moved the struct declaration to shout_plugin.c.
* shout: removed shout_encoder_pluginsMax Kellermann2009-02-221-11/+0
| | | | This array is empty, and is not used anymore.
* shout: use the new encoder APIMax Kellermann2009-02-224-551/+102
| | | | | Removed shout's encoder plugin API in favor of the new generic encoder plugin API.
* shout: merged open_shout_conn() into my_shout_open_device()Max Kellermann2009-02-221-10/+2
| | | | | The method implementation my_shout_open_device() consists of only one line, the call to open_shout_conn(). Merge both functions into one.
* shout: bool return values instead of intMax Kellermann2009-02-221-27/+28
| | | | Return true/false instead of 0/-1.
* utils: use g_usleep() instead of my_usleep()Max Kellermann2009-02-192-4/+2
| | | | | | | Now that I've found this nice function in the GLib docs, we can finally remove our custom sleep function. Still all those callers of g_usleep() have to be migrated one day to use events, instead of regular polling.
* output_api: don't include config.hMax Kellermann2009-02-161-0/+1
| | | | If an output plugin requires config.h, it should include it directly.
* output_plugin: replaced method "control()" with "mixer()"Max Kellermann2009-02-162-16/+18
| | | | | 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.
* shout_mp3: use audio_format_frame_size()Max Kellermann2009-02-101-2/+1
| | | | | Use audio_format_frame_size() instead of channels*audio_format_sample_size().
* shout: pass void pointer to the encoderMax Kellermann2009-02-103-5/+6
| | | | | | Pass the music chunk as a "const void *" to the encoder, instead of a "const char *". Actually, both encoders currently expect 16 bit samples, passing a 8-bit character is rather pointless.
* shout_ogg: moved PCM conversion to a separate functionMax Kellermann2009-02-101-12/+13
| | | | | | For simplification, moved the PCM conversion code to pcm16_to_ogg_buffer(). Work with a int16_t pointer instead of a char pointer.
* ao: declare AoData.writeSize as size_tMax Kellermann2009-02-101-3/+3
| | | | | writeSize is a memory size and its type should thus be size_t. This allows us to remove two explicit casts.
* osx: removed disabled debug messagesMax Kellermann2009-02-101-43/+2
| | | | Nobody needs these debug messages anymore.
* shout: clear buffer before calling the encoderMax Kellermann2009-02-093-18/+14
| | | | | | | Always assume the buffer is empty before calling the encoder. Always flush the buffer immediately after there has been added something. This reduces the risk of buffer overruns, because there will never be a "rest" in the current buffer.
* shout: don't postpone metadataMax Kellermann2009-02-093-34/+14
| | | | | Don't duplicate the tag received by the send_metadata() method - send it to the shout server directly.
* shout: use libshout's synchronizationMax Kellermann2009-02-092-24/+4
| | | | | Removed the manual timer synchronization from the shout plugin. libshout's shout_sync() function does it for us.
* shout: switch to blocking modeMax Kellermann2009-02-092-77/+7
| | | | | | The non-blocking mode of libshout is sparsely documented, and MPD's implementation had several bugs. Also removed connect throttling code, that is done by the MPD core since 0.14.
* shout: removed shout_data.tag_to_sendMax Kellermann2009-02-092-9/+6
| | | | | When shout_data.tag!=NULL, there is a "tag to send". The tag_to_send flag is redundant.
* shout: removed shout_data.shout_errorMax Kellermann2009-02-092-4/+0
| | | | That variable is set in handle_shout_error(), but is never read.
* shout_mp3: call lame_close() in clear_encoder() methodMax Kellermann2009-02-021-2/+6
| | | | | | | | | | The shout_mp3 encoder had two bugs: when no song was ever played, MPD segfaulted during cleanup. Second bug: memory leak, each time the shout device was opened, lame_init() was called again, and lame_close() is only called once during shutdown. Fix this by shutting down LAME each time the clear_encoder() method is called.
* shout_mp3: free the lame_data struct on exitMax Kellermann2009-02-021-0/+2
| | | | | Make valgrind a little bit happier: free the global lame_data struct in the finish() method.
* output_api: moved the command check out of method pause()Max Kellermann2009-01-301-10/+3
| | | | | | Move the "while" loop which checks for commands to the caller ao_pause(). This simplifies the pause() method, and lets us remove audio_output_is_pending().