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
07dc2626
Commit
07dc2626
authored
Aug 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/dsf: use integer seek times
parent
6bf8d5b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
DsfDecoderPlugin.cxx
src/decoder/plugins/DsfDecoderPlugin.cxx
+4
-4
No files found.
src/decoder/plugins/DsfDecoderPlugin.cxx
View file @
07dc2626
...
...
@@ -244,9 +244,9 @@ InterleaveDsfBlock(uint8_t *gcc_restrict dest, const uint8_t *gcc_restrict src,
}
static
offset_type
TimeToBlock
(
double
t
,
unsigned
sample_rat
e
)
FrameToBlock
(
uint64_t
fram
e
)
{
return
offset_type
(
t
*
sample_rate
/
DSF_BLOCK_BITS
)
;
return
frame
/
DSF_BLOCK_SIZE
;
}
/**
...
...
@@ -264,8 +264,8 @@ dsf_decode_chunk(Decoder &decoder, InputStream &is,
auto
cmd
=
decoder_get_command
(
decoder
);
for
(
offset_type
i
=
0
;
i
<
n_blocks
&&
cmd
!=
DecoderCommand
::
STOP
;)
{
if
(
cmd
==
DecoderCommand
::
SEEK
)
{
double
t
=
decoder_seek_wher
e
(
decoder
);
offset_type
block
=
TimeToBlock
(
t
,
sample_rat
e
);
uint64_t
frame
=
decoder_seek_where_fram
e
(
decoder
);
offset_type
block
=
FrameToBlock
(
fram
e
);
if
(
block
>=
n_blocks
)
{
decoder_command_finished
(
decoder
);
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