Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
c1dfa52c
Commit
c1dfa52c
authored
Nov 04, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wavpack: fix indent
Fixed the indent of the switch statement in format_samples_int().
parent
fef14683
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
47 deletions
+47
-47
wavpack_plugin.c
src/decoder/wavpack_plugin.c
+47
-47
No files found.
src/decoder/wavpack_plugin.c
View file @
c1dfa52c
/* 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 {
...
@@ -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)
...
@@ -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
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment