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
e202b407
Commit
e202b407
authored
Jan 06, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Playlist: add constructor and destructor
parent
2cc89e60
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
27 deletions
+11
-27
Partition.hxx
src/Partition.hxx
+2
-6
Playlist.cxx
src/Playlist.cxx
+0
-15
Playlist.hxx
src/Playlist.hxx
+9
-6
No files found.
src/Partition.hxx
View file @
e202b407
...
...
@@ -35,12 +35,8 @@ struct Partition {
Partition
(
unsigned
max_length
,
unsigned
buffer_chunks
,
unsigned
buffered_before_play
)
:
pc
(
buffer_chunks
,
buffered_before_play
)
{
playlist_init
(
&
playlist
,
max_length
);
}
~
Partition
()
{
playlist_finish
(
&
playlist
);
:
playlist
(
max_length
),
pc
(
buffer_chunks
,
buffered_before_play
)
{
}
};
...
...
src/Playlist.cxx
View file @
e202b407
...
...
@@ -52,21 +52,6 @@ playlist_tag_changed(struct playlist *playlist)
idle_add
(
IDLE_PLAYLIST
);
}
void
playlist_init
(
struct
playlist
*
playlist
,
unsigned
max_length
)
{
queue_init
(
&
playlist
->
queue
,
max_length
);
playlist
->
queued
=
-
1
;
playlist
->
current
=
-
1
;
}
void
playlist_finish
(
struct
playlist
*
playlist
)
{
queue_finish
(
&
playlist
->
queue
);
}
/**
* Queue a song, addressed by its order number.
*/
...
...
src/Playlist.hxx
View file @
e202b407
...
...
@@ -68,16 +68,19 @@ struct playlist {
* This variable is only valid if #playing is true.
*/
int
queued
;
};
void
playlist_global_init
();
playlist
(
unsigned
max_length
)
:
current
(
-
1
),
queued
(
-
1
)
{
queue_init
(
&
queue
,
max_length
);
}
void
playlist_init
(
struct
playlist
*
playlist
,
unsigned
max_length
);
~
playlist
()
{
queue_finish
(
&
queue
);
}
};
void
playlist_
finish
(
struct
playlist
*
playlist
);
playlist_
global_init
(
);
void
playlist_tag_changed
(
struct
playlist
*
playlist
);
...
...
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