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
ae941a76
Commit
ae941a76
authored
Sep 16, 2017
by
Christopher Zimmermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SndioOutput: Move class definition to header
no change in behaviour.
parent
4d563e08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
20 deletions
+24
-20
SndioOutputPlugin.cxx
src/output/plugins/SndioOutputPlugin.cxx
+5
-20
SndioOutputPlugin.hxx
src/output/plugins/SndioOutputPlugin.hxx
+19
-0
No files found.
src/output/plugins/SndioOutputPlugin.cxx
View file @
ae941a76
...
...
@@ -19,7 +19,6 @@
#include "config.h"
#include "SndioOutputPlugin.hxx"
#include "../OutputAPI.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
...
...
@@ -44,25 +43,6 @@ static constexpr unsigned MPD_SNDIO_BUFFER_TIME_MS = 250;
static
constexpr
Domain
sndio_output_domain
(
"sndio_output"
);
class
SndioOutput
final
:
AudioOutput
{
const
char
*
const
device
;
const
unsigned
buffer_time
;
/* in ms */
struct
sio_hdl
*
sio_hdl
;
public
:
SndioOutput
(
const
ConfigBlock
&
block
);
static
AudioOutput
*
Create
(
EventLoop
&
,
const
ConfigBlock
&
block
)
{
return
new
SndioOutput
(
block
);
}
private
:
void
Open
(
AudioFormat
&
audio_format
)
override
;
void
Close
()
noexcept
override
;
size_t
Play
(
const
void
*
chunk
,
size_t
size
)
override
;
};
SndioOutput
::
SndioOutput
(
const
ConfigBlock
&
block
)
:
AudioOutput
(
0
),
device
(
block
.
GetBlockValue
(
"device"
,
SIO_DEVANY
)),
...
...
@@ -71,6 +51,11 @@ SndioOutput::SndioOutput(const ConfigBlock &block)
{
}
AudioOutput
*
SndioOutput
::
Create
(
EventLoop
&
,
const
ConfigBlock
&
block
)
{
return
new
SndioOutput
(
block
);
}
static
bool
sndio_test_default_device
()
{
...
...
src/output/plugins/SndioOutputPlugin.hxx
View file @
ae941a76
...
...
@@ -17,9 +17,28 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "../OutputAPI.hxx"
#ifndef MPD_SNDIO_OUTPUT_PLUGIN_HXX
#define MPD_SNDIO_OUTPUT_PLUGIN_HXX
extern
const
struct
AudioOutputPlugin
sndio_output_plugin
;
class
SndioOutput
final
:
AudioOutput
{
const
char
*
const
device
;
const
unsigned
buffer_time
;
/* in ms */
struct
sio_hdl
*
sio_hdl
;
public
:
SndioOutput
(
const
ConfigBlock
&
block
);
static
AudioOutput
*
Create
(
EventLoop
&
,
const
ConfigBlock
&
block
);
private
:
void
Open
(
AudioFormat
&
audio_format
)
override
;
void
Close
()
noexcept
override
;
size_t
Play
(
const
void
*
chunk
,
size_t
size
)
override
;
};
#endif
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