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
c335f18b
Commit
c335f18b
authored
Feb 17, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partition: add "name" attribute
parent
7dc3e737
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
2 deletions
+12
-2
Main.cxx
src/Main.cxx
+1
-0
Partition.cxx
src/Partition.cxx
+2
-0
Partition.hxx
src/Partition.hxx
+5
-0
PartitionCommands.cxx
src/command/PartitionCommands.cxx
+4
-2
No files found.
src/Main.cxx
View file @
c335f18b
...
...
@@ -353,6 +353,7 @@ initialize_decoder_and_player(const ReplayGainConfig &replay_gain_config)
}
instance
->
partition
=
new
Partition
(
*
instance
,
"default"
,
max_length
,
buffered_chunks
,
buffered_before_play
,
...
...
src/Partition.cxx
View file @
c335f18b
...
...
@@ -25,12 +25,14 @@
#include "IdleFlags.hxx"
Partition
::
Partition
(
Instance
&
_instance
,
const
char
*
_name
,
unsigned
max_length
,
unsigned
buffer_chunks
,
unsigned
buffered_before_play
,
AudioFormat
configured_audio_format
,
const
ReplayGainConfig
&
replay_gain_config
)
:
instance
(
_instance
),
name
(
_name
),
global_events
(
instance
.
event_loop
,
BIND_THIS_METHOD
(
OnGlobalEvent
)),
playlist
(
max_length
,
*
this
),
outputs
(
*
this
),
...
...
src/Partition.hxx
View file @
c335f18b
...
...
@@ -31,6 +31,8 @@
#include "Chrono.hxx"
#include "Compiler.h"
#include <string>
struct
Instance
;
class
MultipleOutputs
;
class
SongLoader
;
...
...
@@ -45,6 +47,8 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
Instance
&
instance
;
const
std
::
string
name
;
MaskMonitor
global_events
;
struct
playlist
playlist
;
...
...
@@ -56,6 +60,7 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
ReplayGainMode
replay_gain_mode
=
ReplayGainMode
::
OFF
;
Partition
(
Instance
&
_instance
,
const
char
*
_name
,
unsigned
max_length
,
unsigned
buffer_chunks
,
unsigned
buffered_before_play
,
...
...
src/command/PartitionCommands.cxx
View file @
c335f18b
...
...
@@ -20,11 +20,13 @@
#include "config.h"
#include "PartitionCommands.hxx"
#include "Request.hxx"
#include "Partition.hxx"
#include "client/Client.hxx"
#include "client/Response.hxx"
CommandResult
handle_listpartitions
(
Client
&
,
Request
,
Response
&
r
)
handle_listpartitions
(
Client
&
client
,
Request
,
Response
&
r
)
{
r
.
Write
(
"partition: default
\n
"
);
r
.
Format
(
"partition: %s
\n
"
,
client
.
partition
.
name
.
c_str
()
);
return
CommandResult
::
OK
;
}
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