| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Don't include conf.h in mixer_api.h. Use a forward struct declaration
instead.
|
|
|
|
|
| |
Don't include output_api.h in output_internal.h. This change requires
adding missing includes in several sources.
|
|
|
|
|
| |
The method control() is too complicated, and overengineered. Replace
it with two trivial functions: get_volume() and set_volume().
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The output_command library provides a command interface to the audio
outputs. It assumes the input comes from an untrusted source
(i.e. the client) and verifies all parameters.
|
|
|
|
|
|
| |
Added audio_format_parse() in a separate library, with a modern
interface: return a GError instead of logging errors. This allows the
caller to deal with the error.
|
|
|
|
|
| |
Moved code which deals with all audio outputs at once into a separate
library.
|
| |
|
| |
|
|
|
|
| |
This function isn't used anymore.
|
|
|
|
| |
Added audio_output_get(), audio_output_find().
|
|
|
|
|
|
| |
audio_output_config_count() returns the number of audio outputs in the
configuration file. It is only used by initAudioDriver(). The public
function audio_output_count() now returns audioOutputArraySize.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Those have been superseded by the new legacy configuration code.
|
|
|
|
|
| |
All config_get_block_*() functions should accept constant config_param
pointers.
|
|
|
|
| |
Renamed functions, types, variables.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
|
|
|
|
| |
Replaced myFgets() with fgets() + g_strchomp().
|
|
|
|
| |
Don't use NOTIFY_INITIALIZER to initialize audio_output_client_notify.
|
| |
|
|
|
|
|
| |
Nobody should call playAudio() with an empty chunk. Add some
assertions on that.
|
|
|
|
|
| |
Since open() and play() close the device on error, we can simply check
audio_output.open instead of audio_output.result after a call.
|
|
|
|
|
|
|
| |
When one of several output devices failed, MPD tried to reopen it
quite often, wasting a lot of resources. This patch adds a delay:
wait 10 seconds before retrying. This might be changed to exponential
delays later, but for now, it makes the problem go away.
|
|
|
|
| |
Moved code from syncAudioDeviceStates() to audio_output_update().
|
|
|
|
|
|
| |
Stopping an audio output device without cancelling its buffer doesn't
make sense. Combine the two operations, which saves several cancel
calls.
|
| |
|
|
|
|
|
| |
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
|
|
|
|
|
| |
Instead of implementing another loop which calls audio_output_close()
on all configured devices, simply call closeAudioDevice().
|
|
|
|
| |
This variable is never read, and can be removed.
|
|
|
|
| |
Remove duplicated code from MPD.
|
|
|
|
|
|
|
| |
I added 24 bit support a while ago, but it wasn't possible to force 24
bit output. Add 24 and 8 bit to the list of allowed sample sizes.
Although 8 bit audio isn't as widely used as 24 bit, there is no
reason to exclude it.
|
|
|
|
|
|
|
| |
Splitting a frame between two buffer chunks causes distortion in the
output. MPD used to assume that the chunk size 1020 would never cause
splitted frames, but that isn't the case for 24 bit stereo (127.5
frames), and even less for files with even more channels.
|
|
|
|
|
|
| |
"idle" waits until something noteworthy happens on the server,
e.g. song change, playlist modified, database updated. This allows
clients to keep up to date without polling.
|
|
|
|
|
|
|
| |
Commit 80a2c937 broke resume after pause: it cleared the
input_audio_format when it attempted to simplify a complicated
expression. Don't clear it, just assign input_audio_format if a new
format was specified.
|
|
|
|
|
|
| |
Renamed audio_configFormat to configured_audio_format. Renamed
audio_buffer.format to input_audio_format. Simplified its
initialization in openAudioDevice().
|
|
|
|
|
| |
All what's left from ad_state is a simple boolean flag (ENABLE /
DISABLE). Convert it to a C99 bool.
|
|
|
|
|
|
| |
audio.c maintained one of MPD's many layers of audio buffers. It was
without any benefit, since playAudio() can simply send the source
buffer directly to the audio output plugin.
|
|
|
|
|
|
|
| |
A frame contains one sample per channel, thus it is sample_size *
channels. This patch includes some cleanup for various locations
where the sample size for 24 bit audio was still 3 bytes (instead of
4).
|
|
|
|
|
| |
The last bit of CamelCase in audio_format.h. Additionally, rename a
bunch of local variables.
|
|
|
|
| |
"bits" and "channels" cannot be negative.
|
|
|
|
| |
"bool" should be used in C99 programs for boolean values.
|
|
|
|
|
|
|
|
|
|
|
|
| |
pause() puts the audio output into pause mode: if supported, it may
perform a special action, which keeps the device open, but does not
play anything. Output plugins like "shout" might want to play silence
during pause, so their clients won't be disconnected. Plugins which
do not support pausing will simply be closed, and have to be reopened
when unpaused.
This pach includes an implementation for the shout plugin, which
sends silence chunks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Seeing the "mpd_" prefix _everywhere_ is mind-numbing as the
mind needs to retrain itself to skip over the first 4 tokens of
a type to get to its meaning. So avoid having extra characters
on my terminal to make it easier to follow code at 2:30 am in
the morning.
Please report any new issues you may come across on Free
toolchains. I realize how difficult it can be to build/maintain
cross-compiling toolchains and I have no intention of forcing
people to upgrade their toolchains to build mpd.
Tested with gcc 2.95.4 and and gcc 4.3.1 on x86-32.
|
|
|
|
|
| |
Patch 9a5b5998 broke the "outputenabled" value of the "outputs"
response. Make it print "1" if the output is enabled, "0" otherwise.
|
|
|
|
|
|
|
|
| |
During debugging, I found a deadlock between flushAudioBuffer() and
the audio_output_task(): audio_output_task() didn't notice that there
is a command, and flushAudioBuffer() waited forever in notify_wait().
I am not sure yet what is the real cause; work around this for now by
waking up non-finished audio outputs in every iteration.
|
|
|
|
|
|
|
| |
To check whether a device is really on or off, we should rather check
audio_output.open, instead of managing another variable. Wrap
audio_output.open in the inline function audio_output_is_open() and
use it instead of DEVICE_ON and DEVICE_OFF.
|