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
b4d19378
Commit
b4d19378
authored
Dec 09, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/wavpack: change norm_offset to 0
MPD uses a floating point range from -1 to +1 internally - why ask libwavpack to use -32768..+32768 only to reduce it back to -1..+1 afterwards?
parent
0be5fbdc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+5
-10
No files found.
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
b4d19378
...
...
@@ -98,15 +98,10 @@ format_samples_int(int bytes_per_sample, void *buffer, uint32_t count)
* This function converts floating point sample data to 24-bit integer.
*/
static
void
format_samples_float
(
gcc_unused
int
bytes_per_sample
,
void
*
buffer
,
uint32_t
count
)
format_samples_float
(
gcc_unused
int
bytes_per_sample
,
gcc_unused
void
*
buffer
,
gcc_unused
uint32_t
count
)
{
float
*
p
=
(
float
*
)
buffer
;
while
(
count
--
)
{
*
p
/=
(
1
<<
23
);
++
p
;
}
/* do nothing */
}
/**
...
...
@@ -531,7 +526,7 @@ wavpack_streamdecode(DecoderClient &client, InputStream &is)
char
error
[
ERRORLEN
];
WavpackContext
*
wpc
=
WavpackOpenFileInputEx
(
&
mpd_is_reader
,
&
isp
,
wvc
.
get
(),
error
,
open_flags
,
23
);
error
,
open_flags
,
0
);
if
(
wpc
==
nullptr
)
{
FormatError
(
wavpack_domain
,
...
...
@@ -555,7 +550,7 @@ wavpack_filedecode(DecoderClient &client, Path path_fs)
char
error
[
ERRORLEN
];
WavpackContext
*
wpc
=
WavpackOpenFileInput
(
path_fs
.
c_str
(),
error
,
OPEN_TAGS
|
OPEN_WVC
|
OPEN_NORMALIZE
,
23
);
0
);
if
(
wpc
==
nullptr
)
{
FormatWarning
(
wavpack_domain
,
"failed to open WavPack file
\"
%s
\"
: %s"
,
...
...
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