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
50ea6a4b
Commit
50ea6a4b
authored
Dec 16, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cue_tag: added song duration support
Get duration from track_get_length().
parent
5649f223
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
cue_tag.c
src/cue/cue_tag.c
+10
-2
No files found.
src/cue/cue_tag.c
View file @
50ea6a4b
...
...
@@ -174,7 +174,7 @@ cue_tag_merge(struct tag *a, struct tag *b)
struct
tag
*
cue_tag
(
struct
Cd
*
cd
,
unsigned
tnum
)
{
struct
tag
*
cd_tag
,
*
track_tag
;
struct
tag
*
cd_tag
,
*
track_tag
,
*
tag
;
struct
Track
*
track
;
assert
(
cd
!=
NULL
);
...
...
@@ -190,7 +190,15 @@ cue_tag(struct Cd *cd, unsigned tnum)
track_tag
=
cue_tag_track
(
track_get_cdtext
(
track
),
track_get_rem
(
track
));
return
cue_tag_merge
(
cd_tag
,
track_tag
);
tag
=
cue_tag_merge
(
cd_tag
,
track_tag
);
if
(
tag
==
NULL
)
return
NULL
;
/* libcue returns the track duration in frames, and there are
75 frames per second; this formula rounds up */
tag
->
time
=
(
track_get_length
(
track
)
+
74
)
/
75
;
return
tag
;
}
struct
tag
*
...
...
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