wavpack: fix indent

Fixed the indent of the switch statement in format_samples_int().
This commit is contained in:
Max Kellermann 2008-11-04 17:08:57 +01:00
parent fef14683ae
commit c1dfa52cbf

View File

@ -1,9 +1,9 @@
/* the Music Player Daemon (MPD) /* the Music Player Daemon (MPD)
* Copyright (C) 2003-2007 by Warren Dukes (warren.dukes@gmail.com) * Copyright (C) 2003-2007 by Warren Dukes (warren.dukes@gmail.com)
* This project's homepage is: http://www.musicpd.org * This project's homepage is: http://www.musicpd.org
* *
* WavPack support added by Laszlo Ashin <kodest@gmail.com> * WavPack support added by Laszlo Ashin <kodest@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
@ -34,18 +34,18 @@ static struct {
const char *name; const char *name;
int type; int type;
} tagtypes[] = { } tagtypes[] = {
{ "artist", TAG_ITEM_ARTIST }, { "artist", TAG_ITEM_ARTIST },
{ "album", TAG_ITEM_ALBUM }, { "album", TAG_ITEM_ALBUM },
{ "title", TAG_ITEM_TITLE }, { "title", TAG_ITEM_TITLE },
{ "track", TAG_ITEM_TRACK }, { "track", TAG_ITEM_TRACK },
{ "name", TAG_ITEM_NAME }, { "name", TAG_ITEM_NAME },
{ "genre", TAG_ITEM_GENRE }, { "genre", TAG_ITEM_GENRE },
{ "date", TAG_ITEM_DATE }, { "date", TAG_ITEM_DATE },
{ "composer", TAG_ITEM_COMPOSER }, { "composer", TAG_ITEM_COMPOSER },
{ "performer", TAG_ITEM_PERFORMER }, { "performer", TAG_ITEM_PERFORMER },
{ "comment", TAG_ITEM_COMMENT }, { "comment", TAG_ITEM_COMMENT },
{ "disc", TAG_ITEM_DISC }, { "disc", TAG_ITEM_DISC },
{ NULL, 0 } { NULL, 0 }
}; };
/* /*
@ -60,49 +60,49 @@ static void format_samples_int(int Bps, void *buffer, uint32_t samcnt)
int32_t *src = (int32_t *)buffer; int32_t *src = (int32_t *)buffer;
switch (Bps) { switch (Bps) {
case 1: case 1:
while (samcnt--) while (samcnt--)
*dst++ = *src++; *dst++ = *src++;
break; break;
case 2: case 2:
while (samcnt--) { while (samcnt--) {
temp = *src++; temp = *src++;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
*dst++ = (uchar)(temp >> 8); *dst++ = (uchar)(temp >> 8);
*dst++ = (uchar)(temp); *dst++ = (uchar)(temp);
#else #else
*dst++ = (uchar)(temp); *dst++ = (uchar)(temp);
*dst++ = (uchar)(temp >> 8); *dst++ = (uchar)(temp >> 8);
#endif #endif
} }
break; break;
case 3: case 3:
/* downscale to 16 bits */ /* downscale to 16 bits */
while (samcnt--) { while (samcnt--) {
temp = *src++; temp = *src++;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
*dst++ = (uchar)(temp >> 16); *dst++ = (uchar)(temp >> 16);
*dst++ = (uchar)(temp >> 8); *dst++ = (uchar)(temp >> 8);
#else #else
*dst++ = (uchar)(temp >> 8); *dst++ = (uchar)(temp >> 8);
*dst++ = (uchar)(temp >> 16); *dst++ = (uchar)(temp >> 16);
#endif #endif
} }
break; break;
case 4: case 4:
/* downscale to 16 bits */ /* downscale to 16 bits */
while (samcnt--) { while (samcnt--) {
temp = *src++; temp = *src++;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
*dst++ = (uchar)(temp >> 24); *dst++ = (uchar)(temp >> 24);
*dst++ = (uchar)(temp >> 16); *dst++ = (uchar)(temp >> 16);
#else #else
*dst++ = (uchar)(temp >> 16); *dst++ = (uchar)(temp >> 16);
*dst++ = (uchar)(temp >> 24); *dst++ = (uchar)(temp >> 24);
#endif #endif
} }
break; break;
} }
} }