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
77436474
Commit
77436474
authored
Sep 17, 2015
by
François Revol
Committed by
Max Kellermann
Sep 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output: add native Haiku audio output and mixer support
Also uses the notification system to display tags.
parent
352ec364
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
139 additions
and
0 deletions
+139
-0
Makefile.am
Makefile.am
+8
-0
configure.ac
configure.ac
+19
-0
MixerList.hxx
src/mixer/MixerList.hxx
+1
-0
HaikuMixerPlugin.cxx
src/mixer/plugins/HaikuMixerPlugin.cxx
+73
-0
Registry.cxx
src/output/Registry.cxx
+4
-0
HaikuOutputPlugin.cxx
src/output/plugins/HaikuOutputPlugin.cxx
+0
-0
HaikuOutputPlugin.hxx
src/output/plugins/HaikuOutputPlugin.hxx
+34
-0
No files found.
Makefile.am
View file @
77436474
...
...
@@ -1355,6 +1355,14 @@ liboutput_plugins_a_SOURCES += \
src/output/plugins/FifoOutputPlugin.hxx
endif
if
HAVE_HAIKU
liboutput_plugins_a_SOURCES
+=
\
src/output/plugins/HaikuOutputPlugin.cxx
\
src/output/plugins/HaikuOutputPlugin.hxx
libmixer_plugins_a_SOURCES
+=
\
src/mixer/plugins/HaikuMixerPlugin.cxx src/mixer/plugins/HaikuMixerPlugin.hxx
endif
if
ENABLE_PIPE_OUTPUT
liboutput_plugins_a_SOURCES
+=
\
src/output/plugins/PipeOutputPlugin.cxx
\
...
...
configure.ac
View file @
77436474
...
...
@@ -333,6 +333,11 @@ AC_ARG_ENABLE(fifo,
[disable support for writing audio to a FIFO (default: enable)]),,
enable_fifo=yes)
AC_ARG_ENABLE(haiku,
AS_HELP_STRING([--enable-haiku],
[enable the Haiku output plugin (default: auto)]),,
enable_haiku=auto)
AC_ARG_ENABLE(httpd-output,
AS_HELP_STRING([--enable-httpd-output],
[enables the HTTP server output]),,
...
...
@@ -1129,6 +1134,19 @@ fi
MPD_DEFINE_CONDITIONAL(enable_fifo, HAVE_FIFO,
[support for writing audio to a FIFO])
dnl ----------------------------------- Haiku ---------------------------------
if test x$enable_haiku = xauto; then
AC_CHECK_HEADER(media/MediaDefs.h,
[enable_haiku=yes],
[enable_haiku=no])
fi
if test x$enable_haiku = xyes; then
AC_DEFINE(HAVE_HAIKU,1,[Define for compiling Haiku support])
LIBS="$LIBS -lbe -lmedia"
fi
AM_CONDITIONAL(HAVE_HAIKU, test x$enable_haiku = xyes)
dnl ------------------------------- HTTPD Output ------------------------------
if test x$enable_httpd_output = xauto; then
# handle HTTPD auto-detection: disable if no encoder is
...
...
@@ -1422,6 +1440,7 @@ printf '\nPlayback support:\n\t'
results(alsa,ALSA)
results(fifo,FIFO)
results(recorder_output,[File Recorder])
results(haiku,[Haiku])
results(httpd_output,[HTTP Daemon])
results(jack,[JACK])
printf '\n\t'
...
...
src/mixer/MixerList.hxx
View file @
77436474
...
...
@@ -30,6 +30,7 @@ struct MixerPlugin;
extern
const
MixerPlugin
null_mixer_plugin
;
extern
const
MixerPlugin
software_mixer_plugin
;
extern
const
MixerPlugin
alsa_mixer_plugin
;
extern
const
MixerPlugin
haiku_mixer_plugin
;
extern
const
MixerPlugin
oss_mixer_plugin
;
extern
const
MixerPlugin
roar_mixer_plugin
;
extern
const
MixerPlugin
pulse_mixer_plugin
;
...
...
src/mixer/plugins/HaikuMixerPlugin.cxx
0 → 100644
View file @
77436474
/*
* Copyright (C) 2003-2015 The Music Player Daemon Project
* Copyright (C) 2010-2011 Philipp 'ph3-der-loewe' Schafft
* Copyright (C) 2010-2011 Hans-Kristian 'maister' Arntzen
* Copyright (C) 2014-2015 François 'mmu_man' Revol
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "mixer/MixerInternal.hxx"
#include "output/plugins/HaikuOutputPlugin.hxx"
#include "Compiler.h"
class
HaikuMixer
final
:
public
Mixer
{
/** the base mixer class */
HaikuOutput
&
self
;
public
:
HaikuMixer
(
HaikuOutput
&
_output
,
MixerListener
&
_listener
)
:
Mixer
(
haiku_mixer_plugin
,
_listener
),
self
(
_output
)
{}
/* virtual methods from class Mixer */
virtual
bool
Open
(
gcc_unused
Error
&
error
)
override
{
return
true
;
}
virtual
void
Close
()
override
{
}
virtual
int
GetVolume
(
Error
&
error
)
override
;
virtual
bool
SetVolume
(
unsigned
volume
,
Error
&
error
)
override
;
};
static
Mixer
*
haiku_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
MixerListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
,
gcc_unused
Error
&
error
)
{
return
new
HaikuMixer
((
HaikuOutput
&
)
ao
,
listener
);
}
int
HaikuMixer
::
GetVolume
(
gcc_unused
Error
&
error
)
{
return
haiku_output_get_volume
(
self
);
}
bool
HaikuMixer
::
SetVolume
(
unsigned
volume
,
gcc_unused
Error
&
error
)
{
return
haiku_output_set_volume
(
self
,
volume
);
}
const
MixerPlugin
haiku_mixer_plugin
=
{
haiku_mixer_init
,
false
,
};
src/output/Registry.cxx
View file @
77436474
...
...
@@ -24,6 +24,7 @@
#include "plugins/AoOutputPlugin.hxx"
#include "plugins/FifoOutputPlugin.hxx"
#include "plugins/httpd/HttpdOutputPlugin.hxx"
#include "plugins/HaikuOutputPlugin.hxx"
#include "plugins/JackOutputPlugin.hxx"
#include "plugins/NullOutputPlugin.hxx"
#include "plugins/OpenALOutputPlugin.hxx"
...
...
@@ -51,6 +52,9 @@ const AudioOutputPlugin *const audio_output_plugins[] = {
#ifdef HAVE_FIFO
&
fifo_output_plugin
,
#endif
#ifdef HAVE_HAIKU
&
haiku_output_plugin
,
#endif
#ifdef ENABLE_PIPE_OUTPUT
&
pipe_output_plugin
,
#endif
...
...
src/output/plugins/HaikuOutputPlugin.cxx
0 → 100644
View file @
77436474
This diff is collapsed.
Click to expand it.
src/output/plugins/HaikuOutputPlugin.hxx
0 → 100644
View file @
77436474
/*
* Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
* Copyright (C) 2014-2015 François 'mmu_man' Revol
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_HAIKU_OUTPUT_PLUGIN_HXX
#define MPD_HAIKU_OUTPUT_PLUGIN_HXX
class
HaikuOutput
;
extern
const
struct
AudioOutputPlugin
haiku_output_plugin
;
int
haiku_output_get_volume
(
HaikuOutput
&
haiku
);
bool
haiku_output_set_volume
(
HaikuOutput
&
haiku
,
unsigned
volume
);
#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