Switch to unified view

a/src/sc2mpd.cpp b/src/sc2mpd.cpp
...
...
191
               " !=  bufer's " << aMsg.Audio().Bytes() << endl);
191
               " !=  bufer's " << aMsg.Audio().Bytes() << endl);
192
        bytes = aMsg.Audio().Bytes();
192
        bytes = aMsg.Audio().Bytes();
193
    }
193
    }
194
194
195
    char *buf = (char *)malloc(bytes);
195
    char *buf = (char *)malloc(bytes);
196
    if (aMsg.BitDepth() == 16) {
196
    swab(aMsg.Audio().Ptr(), buf, bytes);
197
        swab(aMsg.Audio().Ptr(), buf, bytes);
198
    } else if (aMsg.BitDepth() == 24) {
199
        unsigned char *ocp = (unsigned char *)buf;
200
        const unsigned char *icp = (const unsigned char *)aMsg.Audio().Ptr();
201
        const unsigned char *icp0 = icp;
202
        while (icp - icp0 <= bytes - 3) {
203
            *ocp++ = icp[2];
204
            *ocp++ = icp[1];
205
            *ocp++ = *icp;
206
            icp += 3;
207
        }
208
    } else if (aMsg.BitDepth() == 32) {
209
    }
197
210
198
    AudioMessage *ap = new 
211
    AudioMessage *ap = new 
199
        AudioMessage(aMsg.BitDepth(), aMsg.Channels(), aMsg.Samples(),
212
        AudioMessage(aMsg.BitDepth(), aMsg.Channels(), aMsg.Samples(),
200
                     aMsg.SampleRate(), buf);
213
                     aMsg.SampleRate(), buf);
201
214