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
1d214b4a
Commit
1d214b4a
authored
Jul 10, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/audiofile: use audiofile_get_duration() in _stream_decode()
parent
2e1347ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
AudiofileDecoderPlugin.cxx
src/decoder/plugins/AudiofileDecoderPlugin.cxx
+2
-5
No files found.
src/decoder/plugins/AudiofileDecoderPlugin.cxx
View file @
1d214b4a
...
...
@@ -186,10 +186,9 @@ static void
audiofile_stream_decode
(
Decoder
&
decoder
,
InputStream
&
is
)
{
AFvirtualfile
*
vf
;
int
fs
,
frame_count
;
int
fs
;
AFfilehandle
af_fp
;
AudioFormat
audio_format
;
float
total_time
;
uint16_t
bit_rate
;
int
ret
;
char
chunk
[
CHUNK_SIZE
];
...
...
@@ -219,9 +218,7 @@ audiofile_stream_decode(Decoder &decoder, InputStream &is)
return
;
}
frame_count
=
afGetFrameCount
(
af_fp
,
AF_DEFAULT_TRACK
);
total_time
=
((
float
)
frame_count
/
(
float
)
audio_format
.
sample_rate
);
const
double
total_time
=
audiofile_get_duration
(
af_fp
);
bit_rate
=
(
uint16_t
)(
is
.
GetSize
()
*
8.0
/
total_time
/
1000.0
+
0.5
);
...
...
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