From a25acbc94fb6e139c4484c3c93d3030a19494b2f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 18 Mar 2006 03:58:31 +0000 Subject: rewrite statefile code for audio devices 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 --- src/main.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 289686a55..2f0bf870a 100644 --- a/src/main.c +++ b/src/main.c @@ -300,7 +300,6 @@ void startMainProcess() { if(pid>0) { initInputStream(); initReplayGainState(); - /* qball crappy code */ readAudioDevicesState(); /* free stuff we don't need */ @@ -317,9 +316,6 @@ void startMainProcess() { finishAudioConfig(); finishAudioDriver(); - /* qball crappy code */ - saveAudioDevicesState(); - finishPaths(); kill(mainPid, SIGTERM); -- cgit v1.2.3