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
70367d70
Commit
70367d70
authored
9 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/flac: remove obsolete sub-song support
This is obsolete because it has been moved to the MPD core.
parent
e6389ff5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
27 deletions
+5
-27
FlacCommon.cxx
src/decoder/plugins/FlacCommon.cxx
+1
-2
FlacCommon.hxx
src/decoder/plugins/FlacCommon.hxx
+0
-11
FlacDecoderPlugin.cxx
src/decoder/plugins/FlacDecoderPlugin.cxx
+4
-14
No files found.
src/decoder/plugins/FlacCommon.cxx
View file @
70367d70
...
...
@@ -33,7 +33,7 @@ flac_data::flac_data(Decoder &_decoder,
InputStream
&
_input_stream
)
:
FlacInput
(
_input_stream
,
&
_decoder
),
initialized
(
false
),
unsupported
(
false
),
total_frames
(
0
),
first_frame
(
0
),
next_frame
(
0
),
position
(
0
),
total_frames
(
0
),
position
(
0
),
decoder
(
_decoder
),
input_stream
(
_input_stream
)
{
}
...
...
@@ -176,7 +176,6 @@ flac_common_write(struct flac_data *data, const FLAC__Frame * frame,
auto
cmd
=
decoder_data
(
data
->
decoder
,
data
->
input_stream
,
buffer
,
buffer_size
,
bit_rate
);
data
->
next_frame
+=
frame
->
header
.
blocksize
;
switch
(
cmd
)
{
case
DecoderCommand
:
:
NONE
:
case
DecoderCommand
:
:
START
:
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FlacCommon.hxx
View file @
70367d70
...
...
@@ -61,17 +61,6 @@ struct flac_data : public FlacInput {
*/
FLAC__uint64
total_frames
;
/**
* The number of the first frame in this song. This is only
* non-zero if playing sub songs from a CUE sheet.
*/
FLAC__uint64
first_frame
;
/**
* The number of the next frame which is going to be decoded.
*/
FLAC__uint64
next_frame
;
FLAC__uint64
position
;
Decoder
&
decoder
;
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FlacDecoderPlugin.cxx
View file @
70367d70
...
...
@@ -167,13 +167,10 @@ flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd,
}
static
void
flac_decoder_loop
(
struct
flac_data
*
data
,
FLAC__StreamDecoder
*
flac_dec
,
FLAC__uint64
t_start
,
FLAC__uint64
t_end
)
flac_decoder_loop
(
struct
flac_data
*
data
,
FLAC__StreamDecoder
*
flac_dec
)
{
Decoder
&
decoder
=
data
->
decoder
;
data
->
first_frame
=
t_start
;
while
(
true
)
{
DecoderCommand
cmd
;
if
(
!
data
->
tag
.
IsEmpty
())
{
...
...
@@ -184,12 +181,9 @@ flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec,
cmd
=
decoder_get_command
(
decoder
);
if
(
cmd
==
DecoderCommand
::
SEEK
)
{
FLAC__uint64
seek_sample
=
t_start
+
FLAC__uint64
seek_sample
=
decoder_seek_where_frame
(
decoder
);
if
(
seek_sample
>=
t_start
&&
(
t_end
==
0
||
seek_sample
<=
t_end
)
&&
FLAC__stream_decoder_seek_absolute
(
flac_dec
,
seek_sample
))
{
data
->
next_frame
=
seek_sample
;
if
(
FLAC__stream_decoder_seek_absolute
(
flac_dec
,
seek_sample
))
{
data
->
position
=
0
;
decoder_command_finished
(
decoder
);
}
else
...
...
@@ -230,10 +224,6 @@ flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec,
return
;
}
if
(
t_end
!=
0
&&
data
->
next_frame
>=
t_end
)
/* end of this sub track */
break
;
if
(
!
FLAC__stream_decoder_process_single
(
flac_dec
)
&&
decoder_get_command
(
decoder
)
==
DecoderCommand
::
NONE
)
{
/* a failure that was not triggered by a
...
...
@@ -310,7 +300,7 @@ flac_decode_internal(Decoder &decoder,
return
;
}
flac_decoder_loop
(
&
data
,
flac_dec
,
0
,
0
);
flac_decoder_loop
(
&
data
,
flac_dec
);
FLAC__stream_decoder_finish
(
flac_dec
);
FLAC__stream_decoder_delete
(
flac_dec
);
...
...
This diff is collapsed.
Click to expand it.
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