Switch to unified view

a/mpd2src/openaudio.cpp b/mpd2src/openaudio.cpp
...
...
86
        if (!parseAudioParams(audioparams, &parms)) {
86
        if (!parseAudioParams(audioparams, &parms)) {
87
            return 0;
87
            return 0;
88
        }
88
        }
89
        LOGDEB("Audioparams: freq " << parms.freq << " bits " << parms.bits <<
89
        LOGDEB("Audioparams: freq " << parms.freq << " bits " << parms.bits <<
90
               " chans " << parms.chans << endl);
90
               " chans " << parms.chans << endl);
91
        if (fn.compare("stdin")) {
91
        struct stat st;
92
            struct stat st;
92
        if (stat(fn.c_str(), &st)) {
93
            if (stat(fn.c_str(), &st)) {
93
            LOGERR(" stat() errno: " << errno << " for " << fn << endl);
94
                LOGERR(" stat() errno: " << errno << " for " << fn << endl);
94
            return 0;
95
                return 0;
96
            }
97
            if ((st.st_mode & S_IFMT) != S_IFIFO) {
98
                LOGERR("Not a fifo: " << fn << endl);
99
                return 0;
100
            }
95
        }
101
        }
96
        if ((st.st_mode & S_IFMT) == S_IFIFO) {
97
            return new FifoReader(fn, parms.freq, parms.bits, parms.chans,
102
        return new FifoReader(fn, parms.freq, parms.bits, parms.chans,
98
                                  parms.needswap, srcblock);
103
                              parms.needswap, srcblock);
99
        } else {
100
            LOGERR("Not a fifo: " << fn << endl);
101
            return 0;
102
        }
103
    } else {
104
    } else {
104
        LOGERR("Unprocessed file extension: " << fn.substr(dot) << endl);
105
        LOGERR("Unprocessed file extension: " << fn.substr(dot) << endl);
105
        return 0;
106
        return 0;
106
    }
107
    }
107
    return 0;
108
    return 0;