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
7bb5a960
Commit
7bb5a960
authored
Feb 02, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/null: convert to C++
parent
e6b04d1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
24 deletions
+31
-24
Makefile.am
Makefile.am
+2
-2
OutputList.cxx
src/OutputList.cxx
+1
-1
NullOutputPlugin.cxx
src/output/NullOutputPlugin.cxx
+25
-18
NullOutputPlugin.hxx
src/output/NullOutputPlugin.hxx
+3
-3
No files found.
Makefile.am
View file @
7bb5a960
...
...
@@ -790,8 +790,8 @@ OUTPUT_API_SRC = \
src/OutputInit.cxx
liboutput_plugins_a_SOURCES
=
\
src/output/
null_output_plugin.h
\
src/output/
null_output_plugin.c
src/output/
NullOutputPlugin.cxx
\
src/output/
NullOutputPlugin.hxx
MIXER_LIBS
=
\
libmixer_plugins.a
\
...
...
src/OutputList.cxx
View file @
7bb5a960
...
...
@@ -27,7 +27,7 @@
#include "output/HttpdOutputPlugin.hxx"
#include "output/jack_output_plugin.h"
#include "output/mvp_output_plugin.h"
#include "output/
null_output_plugin.h
"
#include "output/
NullOutputPlugin.hxx
"
#include "output/openal_output_plugin.h"
#include "output/OssOutputPlugin.hxx"
#include "output/OSXOutputPlugin.hxx"
...
...
src/output/
null_output_plugin.c
→
src/output/
NullOutputPlugin.cxx
View file @
7bb5a960
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,7 +18,7 @@
*/
#include "config.h"
#include "
null_output_plugin.h
"
#include "
NullOutputPlugin.hxx
"
#include "output_api.h"
#include "timer.h"
...
...
@@ -26,7 +26,7 @@
#include <assert.h>
struct
null_data
{
struct
NullOutput
{
struct
audio_output
base
;
bool
sync
;
...
...
@@ -37,7 +37,7 @@ struct null_data {
static
struct
audio_output
*
null_init
(
const
struct
config_param
*
param
,
GError
**
error_r
)
{
struct
null_data
*
nd
=
g_new
(
struct
null_data
,
1
);
NullOutput
*
nd
=
g_new
(
NullOutput
,
1
);
if
(
!
ao_base_init
(
&
nd
->
base
,
&
null_output_plugin
,
param
,
error_r
))
{
g_free
(
nd
);
...
...
@@ -52,7 +52,7 @@ null_init(const struct config_param *param, GError **error_r)
static
void
null_finish
(
struct
audio_output
*
ao
)
{
struct
null_data
*
nd
=
(
struct
null_data
*
)
ao
;
NullOutput
*
nd
=
(
NullOutput
*
)
ao
;
ao_base_finish
(
&
nd
->
base
);
g_free
(
nd
);
...
...
@@ -62,7 +62,7 @@ static bool
null_open
(
struct
audio_output
*
ao
,
struct
audio_format
*
audio_format
,
G_GNUC_UNUSED
GError
**
error
)
{
struct
null_data
*
nd
=
(
struct
null_data
*
)
ao
;
NullOutput
*
nd
=
(
NullOutput
*
)
ao
;
if
(
nd
->
sync
)
nd
->
timer
=
timer_new
(
audio_format
);
...
...
@@ -73,7 +73,7 @@ null_open(struct audio_output *ao, struct audio_format *audio_format,
static
void
null_close
(
struct
audio_output
*
ao
)
{
struct
null_data
*
nd
=
(
struct
null_data
*
)
ao
;
NullOutput
*
nd
=
(
NullOutput
*
)
ao
;
if
(
nd
->
sync
)
timer_free
(
nd
->
timer
);
...
...
@@ -82,7 +82,7 @@ null_close(struct audio_output *ao)
static
unsigned
null_delay
(
struct
audio_output
*
ao
)
{
struct
null_data
*
nd
=
(
struct
null_data
*
)
ao
;
NullOutput
*
nd
=
(
NullOutput
*
)
ao
;
return
nd
->
sync
&&
nd
->
timer
->
started
?
timer_delay
(
nd
->
timer
)
...
...
@@ -93,7 +93,7 @@ static size_t
null_play
(
struct
audio_output
*
ao
,
G_GNUC_UNUSED
const
void
*
chunk
,
size_t
size
,
G_GNUC_UNUSED
GError
**
error
)
{
struct
null_data
*
nd
=
(
struct
null_data
*
)
ao
;
NullOutput
*
nd
=
(
NullOutput
*
)
ao
;
struct
timer
*
timer
=
nd
->
timer
;
if
(
!
nd
->
sync
)
...
...
@@ -109,7 +109,7 @@ null_play(struct audio_output *ao, G_GNUC_UNUSED const void *chunk, size_t size,
static
void
null_cancel
(
struct
audio_output
*
ao
)
{
struct
null_data
*
nd
=
(
struct
null_data
*
)
ao
;
NullOutput
*
nd
=
(
NullOutput
*
)
ao
;
if
(
!
nd
->
sync
)
return
;
...
...
@@ -118,12 +118,19 @@ null_cancel(struct audio_output *ao)
}
const
struct
audio_output_plugin
null_output_plugin
=
{
.
name
=
"null"
,
.
init
=
null_init
,
.
finish
=
null_finish
,
.
open
=
null_open
,
.
close
=
null_close
,
.
delay
=
null_delay
,
.
play
=
null_play
,
.
cancel
=
null_cancel
,
"null"
,
nullptr
,
null_init
,
null_finish
,
nullptr
,
nullptr
,
null_open
,
null_close
,
null_delay
,
nullptr
,
null_play
,
nullptr
,
null_cancel
,
nullptr
,
nullptr
,
};
src/output/
null_output_plugin.h
→
src/output/
NullOutputPlugin.hxx
View file @
7bb5a960
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_NULL_OUTPUT_PLUGIN_H
#define MPD_NULL_OUTPUT_PLUGIN_H
#ifndef MPD_NULL_OUTPUT_PLUGIN_H
XX
#define MPD_NULL_OUTPUT_PLUGIN_H
XX
extern
const
struct
audio_output_plugin
null_output_plugin
;
...
...
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