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
ec162f26
Commit
ec162f26
authored
May 22, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/wavpack: move wavpack_input_init into struct WavpackInput
parent
ba996967
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+7
-16
No files found.
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
ec162f26
...
...
@@ -326,10 +326,13 @@ wavpack_scan_file(Path path_fs,
/* This struct is needed for per-stream last_byte storage. */
struct
WavpackInput
{
Decoder
*
decoder
;
InputStream
*
is
;
Decoder
*
const
decoder
;
InputStream
*
const
is
;
/* Needed for push_back_byte() */
int
last_byte
;
constexpr
WavpackInput
(
Decoder
&
_decoder
,
InputStream
&
_is
)
:
decoder
(
&
_decoder
),
is
(
&
_is
),
last_byte
(
EOF
)
{}
};
/**
...
...
@@ -429,15 +432,6 @@ static WavpackStreamReader mpd_is_reader = {
nullptr
/* no need to write edited tags */
};
static
void
wavpack_input_init
(
WavpackInput
*
isp
,
Decoder
&
decoder
,
InputStream
&
is
)
{
isp
->
decoder
=
&
decoder
;
isp
->
is
=
&
is
;
isp
->
last_byte
=
EOF
;
}
static
WavpackInput
*
wavpack_open_wvc
(
Decoder
&
decoder
,
const
char
*
uri
)
{
...
...
@@ -456,9 +450,7 @@ wavpack_open_wvc(Decoder &decoder, const char *uri)
if
(
is_wvc
==
nullptr
)
return
nullptr
;
WavpackInput
*
wpi
=
new
WavpackInput
();
wavpack_input_init
(
wpi
,
decoder
,
*
is_wvc
);
return
wpi
;
return
new
WavpackInput
(
decoder
,
*
is_wvc
);
}
/*
...
...
@@ -480,8 +472,7 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is)
open_flags
|=
OPEN_STREAMING
;
}
WavpackInput
isp
;
wavpack_input_init
(
&
isp
,
decoder
,
is
);
WavpackInput
isp
(
decoder
,
is
);
char
error
[
ERRORLEN
];
WavpackContext
*
wpc
=
...
...
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