diff options
author | Max Kellermann <max@duempel.org> | 2009-10-23 10:55:52 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-10-23 10:55:52 +0200 |
commit | e53ca368a5448291ca2783b8061727635084618f (patch) | |
tree | 596c18606cd386b580a23cc6d07cf121cca8db37 /src/playlist_state.c | |
parent | c426a0bc5cc641ecd044c389f7180dad50a355bf (diff) | |
download | mpd-e53ca368a5448291ca2783b8061727635084618f.tar.gz mpd-e53ca368a5448291ca2783b8061727635084618f.tar.xz mpd-e53ca368a5448291ca2783b8061727635084618f.zip |
output_plugin: added methods enable() and disable()
With these methods, an output plugin can allocate some global
resources only if it is actually enabled. The method enable() is
called after daemonization, which allows for more sophisticated
resource allocation during that method.
Diffstat (limited to '')
-rw-r--r-- | src/playlist_state.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/playlist_state.c b/src/playlist_state.c index d97fb1369..b0cf961f7 100644 --- a/src/playlist_state.c +++ b/src/playlist_state.c @@ -187,6 +187,12 @@ playlist_state_restore(const char *line, FILE *fp, struct playlist *playlist) if (!queue_valid_position(&playlist->queue, current)) current = 0; + /* enable all devices for the first time; this must be + called here, after the audio output states were + restored, before playback begins */ + if (state != PLAYER_STATE_STOP) + pc_update_audio(); + if (state == PLAYER_STATE_STOP /* && config_option */) playlist->current = current; else if (seek_time == 0) |