Max Kellermann
0b9f650fe2
output/Wrapper: new helper class
2014-12-29 23:45:14 +01:00
Max Kellermann
977834179a
output/pulse: move initialization to constructor
2014-12-29 23:07:18 +01:00
Max Kellermann
b42732743d
output/pulse: remove unnecessary initialization
2014-12-29 23:00:11 +01:00
Max Kellermann
99e6409a67
{mixer,output}/pulse: move code to LogPulseError()
2014-12-29 22:42:52 +01:00
Max Kellermann
6a0a5f9693
output/pulse: move SetError() to lib/pulse/Error.cxx
2014-12-29 22:34:32 +01:00
Max Kellermann
fe9db8b369
{mixer,output}/pulse: use a common Domain instance
2014-12-29 22:25:14 +01:00
Max Kellermann
84c9260dc4
output/fifo: make variables more local
2014-12-28 00:48:05 +01:00
Max Kellermann
987c02e946
output/pipe: convert to class
2014-12-27 18:57:18 +01:00
Max Kellermann
5c0bc612fe
output/pipe: add static method Create()
2014-12-27 18:56:23 +01:00
Max Kellermann
0e28b53242
output/pipe: merge Initialize() and Configure()
2014-12-27 18:56:08 +01:00
Max Kellermann
5fc0ce80fc
output/pipe: move functions into the struct
2014-12-27 18:42:31 +01:00
Max Kellermann
af9092df39
EncoderPlugin: pass Tag reference to method tag()
2014-12-26 22:30:54 +01:00
Max Kellermann
58a5da33c2
OutputPlugin: pass Tag reference to _send_tag()
2014-12-26 22:27:01 +01:00
Max Kellermann
b3435ae432
output/recorder: implement send_tag()
2014-12-26 15:03:22 +01:00
Max Kellermann
a31129333c
output/recorder: move functions into the struct
2014-12-26 14:57:29 +01:00
Max Kellermann
2983c2a24f
output/jack: fix implicit nullptr/bool conversion
...
Return false on error, not nullptr.
2014-12-26 14:44:47 +01:00
Max Kellermann
412bedb697
Merge branch 'v0.19.x'
2014-12-26 14:40:32 +01:00
Max Kellermann
940cab8620
Merge branch 'v0.18.x' into v0.19.x
2014-12-26 14:28:52 +01:00
Max Kellermann
665031467a
db/proxy, output/shout: fix implicit nullptr/bool conversion
...
Return false on error, not nullptr.
2014-12-26 13:50:54 +01:00
Max Kellermann
d4ca853fd3
output/jack: move code to separate functions
2014-12-25 22:18:22 +01:00
Max Kellermann
5a8d2e8057
output/jack: cache AudioFormat::channels
2014-12-24 23:22:56 +01:00
Max Kellermann
687fc358fd
output/jack: fix typo
2014-12-24 23:22:56 +01:00
Max Kellermann
c4c2da06b7
output/jack: use jack_ringbuffer_get_write_vector()
...
Reduce number of libjack calls.
2014-12-24 23:14:15 +01:00
Max Kellermann
8928cd53bf
output/jack: move jack_ringbuffer_write_space() call to WriteSamples()
2014-12-24 23:08:39 +01:00
Max Kellermann
ca88fc4ed3
output/jack: cache AudioFormat::channels
2014-12-24 23:04:29 +01:00
Max Kellermann
b83a1d79b7
output/jack: pass float* to WriteSamples()
2014-12-24 23:02:19 +01:00
Max Kellermann
cec2a837cf
output/jack: WriteSamples() returns size_t
2014-12-24 23:00:46 +01:00
Max Kellermann
cff47262da
output/jack: pass size_t to WriteSamples()
2014-12-24 23:00:15 +01:00
Max Kellermann
da83eae754
output/jack: use SampleFormat::FLOAT
...
What JACK expects is already implemented in MPD, just not used. The
sample format conversion code in the JACK plugin was redundant and
could reduce sound quality.
2014-12-24 22:40:00 +01:00
Max Kellermann
c5409d52f5
output/Internal: move enum AudioOutputCommand into the struct
2014-12-24 22:18:47 +01:00
Max Kellermann
54fc8f0e8c
output/Internal: convert audio_output_command to strictly-typed enum
2014-12-24 22:13:50 +01:00
Max Kellermann
2ea633a2f7
output/jack: use std::fill()
2014-12-24 16:27:13 +01:00
Max Kellermann
9a52043fad
output/jack: move functions into the struct
2014-12-24 16:10:27 +01:00
Max Kellermann
39a5be2df9
output/jack: merge two mpd_jack_available() calls
2014-12-24 16:10:27 +01:00
Max Kellermann
96560e317a
output/jack: make variables more local
2014-12-24 15:21:23 +01:00
Max Kellermann
adb27903eb
output/jack: convert const to constexpr
2014-12-24 15:14:51 +01:00
Max Kellermann
51150faa39
output/jack: convert enum to constexpr
2014-12-24 09:52:32 +01:00
Max Kellermann
25f89afbfb
output/winmm: show detailed error messages
2014-12-17 19:43:14 +01:00
Max Kellermann
a588aef921
output/oss: make the static arrays "constexpr"
2014-12-09 22:02:18 +01:00
Max Kellermann
de43bddc1a
release v0.19.6
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABAgAGBQJUhbH6AAoJECNuiljG20USe/4QAJdMAjnggHbcC/JO9pdJ/5B1
vK+wJqqpNkTpjRaI1OGmxWJCUYKFLCDhoSoPjkyxZ7qmvEDdhQo105/iSod1DOb7
4wAbtrCCfkHKwNZHI2Zf713urBTkT4AZNkSmqBnFRF+sJbiKlQ4Y1EXYG/cwsu63
8RZx3mOURi52OCYuhzurZ2UDqLj0xJ4bFxRiqHV0LLeOAyGa7P6O2M4WwjNsDB9e
9o2ckwis3Yl+0E8FYW57WkFiSkZ40xgNa6O6gOWOYsjpey45IQrxhB5ewy/svIwZ
jeVVnd12mkFAXG3ZBQjwAe+/H8yG5NdqhL7llznuYaX6Ii9zeAPgccK/rZ+kYKe8
gg126KqI9lvUFV45tfoxVqUFiJu5zB0etSto/hNsIdt6ngnuU86WJ3c/X0tDxhN/
GoIKRQxPkJ5XjNdBuRx3ELWx4Jj1UM7CHgQBaqnr0bwfWfFa0IinBwnPw0HqYyBn
p9HZqeVrD3/JDFxungZlWaDk52iScs4Jc4ovGP8UKQVfdkS66awxcWn1gXroXla6
UOslSkB/Gu7WluGzgCkmvD43PY/8oZlOeiP3xmsDgoq5Dg+z4GAw3NCn7/i8Mt5I
HTjNBhLhLLoTjFmcD9MwQtV5/E1UnY1VHTpoZa8dXueyxPgMFmh14BazY+bPnfpw
lSNAo7p0Mh8MdWrRN2Vc
=QvY3
-----END PGP SIGNATURE-----
Merge tag 'v0.19.6'
2014-12-08 15:22:44 +01:00
Max Kellermann
4b70f9d213
util/DivideString: add option "strip"
2014-12-04 23:05:44 +01:00
Max Kellermann
e69bef3ce3
util/SplitString: new utility class
...
Replaces GLib's g_strsplit().
2014-12-04 09:14:28 +01:00
Max Kellermann
c1c0fc79bc
output/jack: use usleep() instead of g_usleep()
2014-12-04 09:14:28 +01:00
Max Kellermann
050f0c3d8f
util/SplitString: rename to DivideString
2014-12-03 21:38:06 +01:00
Max Kellermann
d3d9a04e62
output/ao: use class SplitString instead of g_strsplit()
2014-12-02 22:29:41 +01:00
Max Kellermann
0debba0f6e
mixer/null: new mixer plugin
2014-12-02 18:20:44 +01:00
Max Kellermann
f2bd2c318c
MixerType: convert to strictly-typed enum
2014-12-02 18:20:44 +01:00
Max Kellermann
21c42819c7
MixerType: rename to CamelCase
2014-12-02 18:19:31 +01:00
Max Kellermann
7363d50a1e
output/httpd/IcyMetaDataServer: use CopyString() instead of g_strlcpy()
2014-12-01 22:33:57 +01:00
Max Kellermann
15213a041d
output/httpd/IcyMetaDataServer: don't use GLib types
2014-12-01 22:31:29 +01:00
Max Kellermann
fb70a34c80
output/httpd/IcyMetaDataServer: make variables more local
2014-12-01 22:28:14 +01:00
Nix
811af02f56
Output: start with a null mixer.
...
There are code paths (mostly error cases) in which it is possible to
initialize an AudioOutput and then kill it without ever calling
audio_output_new(). In such a case, its destructor will attempt to
free a mixer that was never initialized, leading to an attempt to
take out a lock on a mutex that was similarly never initialized,
which hangs forever.
Fix by always initializing the mixer appropriately.
2014-12-01 22:14:09 +01:00
Max Kellermann
d93172bee8
Compiler.h: add macro CLANG_OR_GCC_VERSION()
2014-11-28 19:09:56 +01:00
Max Kellermann
b3f5b4932c
configure.ac: add macro MPD_ENABLE_AUTO_PKG
...
Simplify the definition of many build options.
2014-11-21 22:19:57 +01:00
Max Kellermann
303d67aed2
release v0.19.2
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABAgAGBQJUVifPAAoJECNuiljG20USJbYP/2SjixBWtHjHn1wF9K3tRzs3
7GGSBxxBpJVZCTg/PGRJ9m2BNJvocBPhw3WN7PU29xi5kBxDy5yvBcc58OzYHz28
HVZymj8zhdiDqULHPn6b9px6f4Oe8+1xh9q6gwR8rZsRAXKYDrC0GPDMGBeSkWo1
ycnSVTcZ4CjfkM2/jfnCc79q4mC+k2BR5T9OYRnznThVMx+gimMwLFYBjNNdh1MT
ugAxXVtpDs2aTR8fqu/ADGLJosfTjzGdqQ3eowOqVXmsmVIttBGruZdKyrN9KAtU
FfPf60zZ3I8qKppArfEoJAejNyGbhIg1AqX7J7IxHMI+zjlo2kGnEcVFJaG5zZb/
GQThrzGXRPFLlvVDtzfALmBNo3gN0y4I73exlpRCupaxZdFaD5UUPlaLak8r9bt5
30YBBxs7ydIPqs25AwZ9f94NT2QrKityLv+O+Q8lz8AfurqJnuOwEo/HuT4Bxv47
pSx86TtokknyN0A3lw5ttIMbTqN5eNHjJY4PulGJPEPfKjn9p4NLtLrZjT4fnnKG
GKXYcMzeOhMKszbHzOR7dcjI0uKXyx4r7LE4SdL+3msCYbyXDTbCirdusZ1pZDC3
ttkSf+a/dILHZagEAN37t53/NlsAjxjJzenKD4H6Eprxm6er24kSWu+W410b3Bw0
jYLYGXCWVZyJ5dqpTcYb
=NiFd
-----END PGP SIGNATURE-----
Merge tag 'v0.19.2'
2014-11-02 14:06:05 +01:00
Max Kellermann
c50a0cf7bf
output/roar: remove unnecessary "volatile" keyword
...
A mutex acts as a memory barrier, and thus "volatile" is not
necessary.
2014-11-02 11:50:56 +01:00
Max Kellermann
d7f024c510
OutputThread: fall back to PCM if given DSD sample rate is not supported
...
Works around the "PCM conversion from f to dsd is not implemented"
error message that prevents DSD playback.
2014-10-25 22:06:08 +02:00
Steven Newbury
76f277eeb4
Set pulseaudio channel map to WAVE-EX
...
Pulseaudio expects clients to specify their channel-map if the
default (ALSA) map does not route the audio to the expected speakers.
Many Google results suggest dealing with this by re-routing the audio
channels with the appropriate ALSA plugin, but this will then simply
break any clients which expect the default ALSA mapping.
Virtually all media files and codecs, certainly flac, dca, a52, and of
course anything based on Microsoft's WAVEFORMAT_EXTENSIBLE specification,
assume the layout in the table here:
http://en.wikipedia.org/wiki/Surround_sound#Standard_speaker_channels
Fortunately, pulseaudio directly addresses this with a built-in channel
map for WAVE-EX which can be set automatically in the stream sample-spec.
2014-10-25 01:08:09 +02:00
Max Kellermann
a7b09d3d1c
OutputThread: close the output plugin after filter failure
...
Fixes memory leak because ao_plugin_close() never gets called.
2014-10-24 00:35:16 +02:00
Max Kellermann
8fc3768166
OutputThread: unlock mutex for CloseFilter()
...
Be consistent.
2014-10-24 00:29:03 +02:00
Max Kellermann
b07bddf742
output/roar: remove unnecessary "volatile" keyword
...
A mutex acts as a memory barrier, and thus "volatile" is not
necessary.
2014-10-23 23:29:56 +02:00
Wieland Hoffmann
5525ea45a4
Add MusicBrainz' Release Track Id tag
...
The Release Track Id uniquely identifies a recording on a release - that
is, even if a recording appears twice on a release (meaning that the
combination of recording and release id are not enough to figure out
which one it is), the release track id will allow differentiating the two.
The tag names are taken from
https://musicbrainz.org/doc/MusicBrainz_Picard/Tags/Mapping
2014-09-27 19:54:12 +02:00
Max Kellermann
8397196fbb
output/alsa: change a few "dsd" to "dop"
2014-09-26 11:07:53 +02:00
Max Kellermann
9270485723
Merge branch 'v0.18.x'
2014-09-24 21:49:20 +02:00
Max Kellermann
223c129b6b
output/pulse: simplify _wait_for_operation()
...
Eliminate the duplicate pa_operation_get_state() call.
2014-09-05 11:16:09 +02:00
Max Kellermann
e5a28bfd8d
output/alsa, pcm: rename "DSD over USB" to "DoP"
...
The standard has been renamed since the early draft that was
implemented in MPD.
2014-08-31 16:12:26 +02:00
Max Kellermann
6e04d66a35
release v0.18.13
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJUAxsyAAoJECNuiljG20USmRAP/2J/+kV5TRfqr7acFKh/aqip
RAefHTvHpYuAUDOi3WDVSZcmMnaYGKslZhbXhqchbRfR2oMwYhR+5gHIoxOp+EcL
09UF1fJfUnjg6B2zz6tggIWR53Dwxckg4xEaKtI2Wi3Gz+9Q/CiNlpWLJc0ONA5e
9gcz8pNK3oN0Em9c1KXahZKArzGdOGeytfSI3PLE+QnRiEyEDz1+StxIuyl72vr4
ar2EMa9Vdvb7ouNK0g8WqaEOzYyNDXhklIqc+zALQJGThY1xj6OCfQ8JVagJhzwB
UDuYfX1FylkN8LhF5pNzH1F0ANMozWcqeZlLLph6vuKkVBD7WUX4X1t82bwUlFDB
ppdA5pPkiXsqYnuhHML4GqL7LlI2wsMxUHK7v+A9+9hfGN9HIoFyOSLBjB1pyI93
yi8IPOq2a1BJQfQ2c69693ZS7WPxU6vOFKucKrk9PBlr2900SlvpMzIpZr1PMnGV
hoU8eLHOIW86wi5Ea2ycFbFyI1ZoyrKJmzcVJjPjZUT05jDV6bA2Gi1IG6gIhX1q
DiBfXUre+GISkLS4r8GcbG1FIXcv7fGjZ6Vols5di8lpYQ5oBu5aw2TEf8zukrHC
LzPRa2l6Mhe2OI7a/mmTaEYDINgCL//46hOU5mIbmB0XZS8Jf+D1/HBzqKpeqO7f
idENtbelqQdSsR5UU+R0
=c2vC
-----END PGP SIGNATURE-----
Merge tag 'v0.18.13'
2014-08-31 15:03:34 +02:00
Max Kellermann
2406152576
output/alsa: fix endless loop at end of file in dsd_usb mode
2014-08-31 14:01:57 +02:00
Max Kellermann
af260b5a64
output/{alsa,oss}: add assertions
2014-08-31 14:00:09 +02:00
Max Kellermann
b373c53ce4
*: add missing Compiler.h includes
...
Necessary for "final" on gcc 4.6.
2014-08-30 00:46:52 +02:00
Max Kellermann
a4f9d6d98b
output/alsa: fix signed/unsigned comparison warning
2014-08-30 00:27:01 +02:00
Max Kellermann
9d3a85d434
MusicChunk: use SignedSongTime for the time stamp
2014-08-29 13:20:58 +02:00
Max Kellermann
147d301f10
MultipleOutputs: use SignedSongTime for elapsed_time
2014-08-29 13:20:58 +02:00
Max Kellermann
7c25d83f1c
Tag: use SignedSongTime for the song duration
2014-08-29 13:20:58 +02:00
Max Kellermann
2d096a569a
output/alsa: fix coding style
2014-08-26 10:25:59 +02:00
Max Kellermann
e44ea5038e
output/alsa: merge Init() into Configure()
2014-08-26 10:22:35 +02:00
Max Kellermann
9d79c72c17
output/alsa: add API documentation
2014-08-26 09:37:30 +02:00
Max Kellermann
a86aaef4d0
output/alsa: support native DSD playback
...
Translate SampleFormat::DSD to SND_PCM_FORMAT_DSD_U8, which was added
to alsa-lib 1.0.27.1.
2014-08-26 07:11:53 +02:00
Max Kellermann
e463244db3
output/alsa: move alsa_configure() into the class
2014-08-26 07:10:16 +02:00
Max Kellermann
294091ce60
output/alsa: remove obsolete macros
2014-08-26 05:53:15 +02:00
Max Kellermann
0e756e4377
PcmExport: use class ConstBuffer
2014-08-12 22:19:53 +02:00
Max Kellermann
7244dc4511
Filter: FilterPCM() returns ConstBuffer
...
API simplification. We can now avoid abusing a "size_t*" as
additional return value.
2014-08-12 16:40:51 +02:00
Max Kellermann
c94b4466d5
MusicChunk: rename struct to MusicChunk
2014-08-12 15:56:41 +02:00
Max Kellermann
aafff8fd5c
fs/output, fs/TextFile: move to fs/io/
2014-08-07 19:38:25 +02:00
Max Kellermann
9fb351a139
*Save, *State: use the OutputStream API instead of FILE*
2014-07-30 22:17:01 +02:00
Max Kellermann
7a1f3177c9
util/Cast: reimplement as template without macro
2014-07-14 16:24:07 +02:00
Max Kellermann
41a7203c28
Tag: add class const_iterator and methods begin(), end()
...
Enables using range-based "for".
2014-07-12 17:22:39 +02:00
Gustavo Zacarias
f5c9056430
output/plugins/httpd/HttpdClient: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 19:54:35 +02:00
Gustavo Zacarias
d8e8eabf60
output/HttpdClient: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 17:41:31 +02:00
Pete Beardmore
d0cd98a63a
MultipleOutputs: ensure input_audio_format is zero-initialised
...
-fixes SIGABRT when mpd is started from a previously paused state
-regression introduced by commit: f5a923b9d1
:
'OutputAll: convert to class, move instance to class Partition'
-input_audio_format was previously declared using the static modifier
ensuring it was zero-initialised by default
-the current default-initialised input_audio_format contains garbage at
runtime which allows the AudioFormat.IsDefined() 'fail fast' test in
MultipleOutputs::Update to pass and the SIGABRT follows in
AudioOutput::Open when passed the invalid input_audio_format struct
-switching AudioFormat.IsDefined() for AudioFormat.IsValid() is an
alternative workaround
2014-03-14 20:27:21 +01:00
Pete Beardmore
3a3fb98f79
PulseOutputPlugin: set icon name
2014-03-04 15:18:30 +00:00
Max Kellermann
503ed9c331
release v0.18.9
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJTEwdzAAoJECNuiljG20USkFYP/i1PaM7O20e2EPE7ELhffk1I
PEL6WiuCxfEHP+JbH/RPy/CdyKIqx3TTeaktXzOJmCcU+5fAgbpIwfK689ZjpE7Y
U+7aPfGudfjYTxM/bigEo+1XAIYWJCJ2IlopN0lRIZSquUm8rfxosqsNzJFrhwsK
40Ps36XdpYUA3z9dugyJjeKQETkjJa5Y55C1yml5RRUz+yPqyiPelm0dSlx3Ggce
KpmNZfp8g8/stwb08iw+qk+cNKP75eJwPdFmQrsc91QxP1oW7ERWhiICA0ZtqaNe
T0Ld5+wZ6uTJSztQiUsWrJYS1yKix5q1Za8tyFr3a9NPI+iIjsALXqU9k7zmZ6Id
GK0Xr9Noo1o80QeGkd60nJyCQXbEU/V0p9D/QiDVei+IvK6mbxF3y2gPA7wobgrC
KEDgsJZ+0fjmgdx+eb8ydg0uIwHrk04u0YKukUqA3bkNS/PUEICPqblcg8Spf89I
RMdjq2HFcpkaIwGvryfHIbTNUbonAziMzmiJ0WQA1FCD3x1WELvBf09GzAsUEoFX
Be0Co15rODOByo5ryZvSJv5BCr2RuCPwzNF+V26nMaKK7EloQWmbO0rpkRLVRk81
qo1JmElm6SyeE3kHqVW/NyrPxLtd7VngV+z9hXr95szUjCjMv/MK169r4jumLTex
RLyPDkhkQLDIijamhjfZ
=nX0n
-----END PGP SIGNATURE-----
Merge tag 'release-0.18.9'
2014-03-02 11:46:07 +01:00
Max Kellermann
47ea69233b
output/alsa: remove the obsolete Raspberry Pi workaround
...
Has been superseded by the previous commit.
2014-03-02 11:22:04 +01:00
Max Kellermann
a884e37de1
output/alsa: call snd_pcm_prepare() after snd_pcm_drop()
...
Don't wait for an optimistic write to fail. This is an improved
workaround for the infamous Raspberry Pi bug (see commit af991765
).
It works much better and comes without the negative side effects. The
old workaround is now obsolete.
2014-03-02 11:12:25 +01:00
Max Kellermann
b059ba69d6
output/sles: support stereo
2014-03-01 23:05:44 +01:00
Max Kellermann
6526de024a
output/pulse: remove bogus g_free() call
2014-02-24 21:23:49 +01:00
Max Kellermann
6d9739165e
output/httpd/client: eliminate GLib
2014-02-24 20:39:37 +01:00
Max Kellermann
7c5396ffb9
output/{shout,win32}: include cleanup
2014-02-24 20:34:09 +01:00
Max Kellermann
8319398957
output/openal: use usleep() instead of g_usleep()
2014-02-24 20:33:15 +01:00
Max Kellermann
a1509876de
output/pulse: use setenv() instead of g_setenv()
...
There is no advantage in using g_setenv().
2014-02-24 20:31:38 +01:00
Max Kellermann
0f2cf51f43
output/pulse: remove bogus g_free() call
2014-02-24 20:29:29 +01:00
Max Kellermann
9574d11dc8
output/sles: new output plugin for Android
2014-02-22 00:18:46 +01:00
Max Kellermann
008723c62f
ConfigGlobal: eliminate function config_get_next_param()
2014-02-20 00:04:23 +01:00
Max Kellermann
8d6fedf817
Mixer: add class MixerListener
...
Use a listener interface instead of GlobalEvents.
2014-02-19 21:40:14 +01:00
Max Kellermann
f4f8fa7c94
output/Init: pass AudioOutput references
2014-02-19 21:38:48 +01:00
Max Kellermann
0bbfb28992
output/httpd: move to dedicated directory
2014-02-19 09:22:08 +01:00
Max Kellermann
ee7bd695fd
Timer: move to output/
2014-02-19 09:22:08 +01:00
Max Kellermann
0a0659d737
mixer/Plugin: pass AudioOutput reference to init()
...
Passing a void pointer is unsafe.
2014-02-06 21:10:12 +01:00
Max Kellermann
b6df4680df
MixerPlugin: convert function pointers to Mixer virtual methods
2014-02-06 20:52:33 +01:00
Max Kellermann
855f26c43d
Mixer: use reference instead of pointer for MixerPlugin
2014-02-05 17:25:47 +01:00
Max Kellermann
f86e159536
Mixer: rename struct mixer_plugin to MixerPlugin
2014-02-05 17:22:34 +01:00
Max Kellermann
e8938b1069
MixerPlugin: add EventLoop& init() parameter
2014-02-05 00:02:02 +01:00
Max Kellermann
a31738f6f1
Main, OutputThread: increase kernel timer slack (Linux)
...
Allows the kernel to combine timer wakeups with other processes,
reducing power usage.
2014-01-30 18:43:40 +01:00
Max Kellermann
667481c371
OutputThread: move more functions into the AudioOutput class
2014-01-29 09:26:11 +01:00
Max Kellermann
af71605769
output: rename "chunk" to "current_chunk"
2014-01-29 09:23:57 +01:00
Max Kellermann
4657a3bd0f
output: move functions into the AudioOutput struct
2014-01-29 08:10:46 +01:00
Max Kellermann
cb7366f472
AudioOutput: make "plugin" a reference
2014-01-29 08:10:36 +01:00
Max Kellermann
bf803e241f
AudioOutput: pass plugin to constructor
...
Make it "const".
2014-01-29 08:10:18 +01:00
Max Kellermann
c4403c523f
AudioOutput: add constructor and destructor
2014-01-28 12:37:58 +01:00
Max Kellermann
68b79f97f3
output: rename source files
2014-01-28 11:42:54 +01:00
Max Kellermann
815d72065c
output: rename struct audio_output to AudioOutput
2014-01-28 11:34:09 +01:00
Max Kellermann
e0dc721324
OutputPlugin: rename struct audio_output_plugin to AudioOutputPlugin
2014-01-28 11:33:15 +01:00
Max Kellermann
f5a923b9d1
OutputAll: convert to class, move instance to class Partition
...
Another big chunk of code for multi-player support.
2014-01-28 09:20:53 +01:00
Max Kellermann
68eda78704
Mixer*: move to mixer/
2014-01-24 16:44:32 +01:00
Max Kellermann
7c52a1c04b
Filter*: move to filter/
2014-01-24 16:43:57 +01:00
Max Kellermann
e199c33c6e
Client*: move to client/
2014-01-24 00:26:53 +01:00
Max Kellermann
197b503f3e
Config*: move to config/
2014-01-24 00:20:01 +01:00
Max Kellermann
ea5b901bcc
output/*: move to output/plugins/
2014-01-23 23:49:50 +01:00
Max Kellermann
655ad34414
Encoder*: move to src/encoder
...
.. and move the plugins to src/encoder/plugins/.
2014-01-23 23:09:14 +01:00
Max Kellermann
4f83c60296
copyright year 2014
2014-01-13 22:31:55 +01:00
Max Kellermann
27ca0db7a6
util/Alloc: new library replacing GLib's g_malloc()
2014-01-07 23:35:18 +01:00
Max Kellermann
793962c5b8
event/SocketMonitor: don't close the socket automatically
...
Users now have to call Close() explicitly. This simplifies using the
class, as most users have automatic socket management already, and
Steal() had to be used often.
2014-01-06 18:26:55 +01:00
Max Kellermann
0d20130d07
util/Cast: new utility library
2014-01-06 18:21:45 +01:00
Max Kellermann
4ddfc6e9a2
output/httpd: move the clients.clear() call to the IOThread
...
This call is not thread-safe.
2014-01-05 02:13:35 +01:00
Max Kellermann
dcbc05a9cd
output/httpd: import GetEventLoop()
2014-01-05 02:13:21 +01:00
Max Kellermann
bfe7533546
output/httpd: move Bind()/Unbind() to the IOThread
...
Fixes more thread-safety bugs.
2014-01-04 19:29:51 +01:00
Max Kellermann
c9da3363a0
output/httpd: move all broadcast operations to the IOThread
...
Add a Page queue to class HttpdOutput, and use DeferredMonitor to
flush this queue inside the IOThread. This fixes a thread-safety
issue: much of EventLoop is not thread-safe, and the httpd plugin
ignored that problem.
2014-01-04 18:22:55 +01:00
Max Kellermann
9bd4ed3e60
output/httpd: use the IOThread
...
Do all I/O in the IOThread and not in the main thread. This solves an
upcoming deadlock problem.
2014-01-04 18:21:40 +01:00
Max Kellermann
68fcc19565
output/httpd: move queue size check to HttpdClient::PushPage()
...
Don't let the server care for client problems.
2014-01-04 17:42:03 +01:00
Max Kellermann
8e4efd071e
output/httpd: wrap the std::list in std::queue
2014-01-04 17:12:59 +01:00
Max Kellermann
f2ad9f6fad
output/httpd: merge duplicate code to ClearQueue()
2014-01-04 17:11:22 +01:00
Max Kellermann
968c5eb767
output/httpd: keep track of queue size
...
Don't iterate the std::list each time.
2014-01-04 17:06:05 +01:00
Max Kellermann
d477a9222e
output/httpd: change "struct" to "class"
2013-12-31 17:04:40 +01:00
Max Kellermann
69a9d29190
output/httpd: move code to methods Delay(), Play(), Cancel()
2013-12-31 17:01:08 +01:00
Max Kellermann
e2425592b6
output/httpd: move Cast() into the class
2013-12-31 16:59:24 +01:00
Max Kellermann
964b2661d8
output/httpd: add methods Init(), Finish()
2013-12-31 16:55:26 +01:00
Max Kellermann
8b65b524d5
output/httpd: use reference instead of pointer
2013-12-31 16:32:33 +01:00
Max Kellermann
f1ac2cd336
output/httpd: make the HttpdClient base class "private"
2013-12-31 16:24:51 +01:00
Max Kellermann
45ad7696fe
output/osx: fix typo
2013-12-19 12:46:21 +01:00
Max Kellermann
0e84d71559
output/osx: use DynamicFifoBuffer instead of struct fifo_buffer
2013-12-19 12:16:29 +01:00
Max Kellermann
65b8e52d80
output/alsa: use new[] instead of g_malloc()
2013-12-14 22:17:19 +01:00
Max Kellermann
c7b1038a9d
Merge branch 'v0.18.x'
2013-12-14 12:37:16 +01:00
Lukas Stabe
695ca29274
output/osx: fix build failure
2013-12-10 19:19:31 +01:00
Max Kellermann
e1901e97c2
system/Resolver: sockaddr_to_string() returns std::string()
...
No GLib memory allocation.
2013-12-04 08:43:55 +01:00
Lukas Stabe
0ea5f4ac3a
output/openal: check __APPLE__ instead of HAVE_OSX
...
On OSX, the configure-flag --enable-osx is used to enable the
unsupported osx output. It sets the HAVE_OSX preprocessor define.
src/output/OpenALOutputPlugin.cxx uses this define to determine wether
it is building on OSX, and imports different headers (which have
nothing to do with the osx output) depending on wether or not it is
set.
2013-12-02 13:08:52 +01:00
Max Kellermann
f90abe9530
include cleanup using iwyu
2013-11-28 11:50:54 +01:00
Denis Krjuchkov
22fb49fa90
HttpdOutputPlugin.cxx: fix null pointer dereference
2013-11-26 18:13:23 +06:00
Max Kellermann
188673b746
output/httpd: don't use incomplete template argument with libc++
2013-11-11 08:31:50 +01:00
Max Kellermann
62baec1841
output/alsa: avoid endless loop in Raspberry Pi workaround
...
See code comment.
2013-11-04 23:40:34 +01:00
Max Kellermann
ecf12a60e8
Log: add level "DEFAULT"
...
Map LogLevel::INFO to G_LOG_LEVEL_INFO, and LogLevel::DEFAULT to
G_LOG_LEVEL_MESSAGE. Now client connect/disconnect message are only
logged on log_level "secure".
2013-11-04 22:27:49 +01:00
Max Kellermann
8555b65c50
*: update copyright year to 2013
2013-10-30 23:37:06 +01:00
Max Kellermann
20597b3632
*: use nullptr instead of NULL
2013-10-28 23:58:17 +01:00
Oddegamra
5f13c1cd9c
output/httpd: accept icy-metadata with and without space
...
Some, or most, Win32 audio players will pass "icy-metadata:1" to
streaming servers. MPD expects a space between ":" and "1" at this
point, and thus does not send any stream metadata. This applies to
foobar2k and Winamp, for example.
According to forums.radiotoolbox.com/viewtopic.php?t=74 not having
a space there is expected behavior, so maybe MPD could accept
both forms to determine if metadata should be sent or not.
2013-10-26 16:32:00 +02:00
Max Kellermann
e17da71a70
output/httpd: support HEAD requests
2013-10-25 00:32:48 +02:00
Max Kellermann
610bef9ff5
output/httpd: remove bogus assertion
2013-10-25 00:26:02 +02:00
Max Kellermann
222dc8a239
Util/ASCII: add StringEqualsCaseASCII() overload with length
...
Replaces GLib's g_ascii_strncasecmp().
2013-10-21 08:42:55 +02:00
Max Kellermann
a78b2d84ed
TagType: rename enum tag_type to TagType
2013-10-20 13:32:59 +02:00
Max Kellermann
5dc4cbdf82
util/FormatString: new library to replace g_strdup_printf()
2013-10-19 17:24:21 +02:00
Max Kellermann
abfbd55305
fs/Path: rename to AllocatedPath
...
The new class Path only holds a string pointer without being
responsible for allocation/deallocation. The FileSystem.hxx library
accepts Path arguments instead of AllocatedPath, to avoid forcing
callers to allocate another string object.
2013-10-17 23:43:46 +02:00
Max Kellermann
5e26e2ab1d
system/ByteOrder: new library for byte ordering / endianess
...
Replacing GLib macros.
2013-10-16 22:09:44 +02:00
Max Kellermann
328131b7aa
output/roar: use const_cast instead of g_strdup()
2013-10-15 23:14:34 +02:00
Max Kellermann
85003429af
output/roar: use std::string
2013-10-15 23:11:32 +02:00
Max Kellermann
6db77dcf75
output/roar: move code into the RoarOutput class
2013-10-15 22:58:38 +02:00
Max Kellermann
1cde86823d
output/pipe: use std::string
2013-10-15 22:52:04 +02:00
Max Kellermann
12ab556477
event/BufferedSocket: pass writable pointer to OnSocketInput()
...
Remove the const_cast from HttpdClient.cxx, and avoid one allocation
in ClientRead.cxx.
2013-10-15 22:47:46 +02:00
Max Kellermann
509f8dab89
Util/Macros: replacement for GLib's G_N_ELEMENTS()
2013-10-15 22:47:39 +02:00
Max Kellermann
77429b6dd3
output/winmm: use delete instead of g_free()
2013-10-15 22:47:25 +02:00
Max Kellermann
be2951b45f
gcc.h: rename to Compiler.h
2013-10-15 09:21:59 +02:00
Max Kellermann
6fd481df97
Mapper, ...: use memcmp() instead of strncmp() where appropriate
...
Micro-optimization.
2013-10-14 22:00:21 +02:00
Max Kellermann
86316b1828
output/httpd: don't include glib.h in header
2013-10-02 12:20:36 +02:00
Max Kellermann
060814daa8
Log: new logging library API
...
Prepare to migrate away from GLib. Currently, we're still using GLib
as a backend.
2013-10-02 08:57:55 +02:00
Max Kellermann
ccd7f0825a
DecoderControl: use GLib forward declarations
2013-09-27 23:00:23 +02:00
Max Kellermann
5bc4ab899f
*Plugin: remove redundant "line %i" from error messages
...
The MPD core will add this as a prefeix.
2013-09-26 20:59:40 +02:00
Max Kellermann
7a4c9f5f4c
mpd_error.h: remove obsolete header
...
Migrate the remaining callers to FatalError().
2013-09-05 18:26:46 +02:00
Max Kellermann
fccba1af2a
use standard snprintf() instead of GLib g_snprintf()
2013-09-05 09:21:53 +02:00
Max Kellermann
29030b54c9
util/Error: new error passing library
...
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00
Max Kellermann
c9fcc7f148
system/resolver: convert to C++
2013-09-04 18:02:09 +02:00
Max Kellermann
d1f4a31b5e
output/pulse: require libpulse 0.9.16
...
Remove all #ifdefs. Old versions of libpulse are not being tested,
and thus I'm removing support.
2013-09-04 16:55:03 +02:00
Max Kellermann
0005221533
output/httpd: use "unsigned" instead of "guint"
2013-08-08 00:18:59 +02:00
Max Kellermann
b76a29a69a
ConfigPath: return a Path object
...
Migrate all callers to use Path directly, instead of doing the
conversion in each caller.
2013-08-07 19:59:09 +02:00
Max Kellermann
abe090ec1f
*: remove remaining __cplusplus checks
2013-08-07 19:58:52 +02:00
Max Kellermann
b70d38dc10
Makefile.am: move sources to libsystem.a
2013-08-07 10:31:31 +02:00
Max Kellermann
85b77b81ca
*: use gcc.h macros instead of GLib
2013-08-04 23:48:01 +02:00
Max Kellermann
ca0d09c50f
EncoderPlugin: pass config_param reference
2013-08-04 14:07:50 +02:00
Max Kellermann
81c3224076
OutputPlugin: pass config_param reference
2013-08-04 14:07:49 +02:00
Max Kellermann
d1e7b4e381
audio_format: convert to C++
2013-08-03 21:37:56 +02:00
Max Kellermann
67f591a9ce
gcc.h: add macro gcc_unreachable()
2013-08-03 21:34:17 +02:00
Max Kellermann
44621f7326
output/winmm: adapt to PcmBuffer API changes
2013-07-31 00:57:52 +02:00
Max Kellermann
06f898cc12
tag: convert to C++
2013-07-30 20:19:53 +02:00
Max Kellermann
9a0061c511
encoder_api: convert to C++
2013-07-30 09:04:05 +02:00
Max Kellermann
28030d7edb
include cleanup
2013-07-30 08:39:21 +02:00
Max Kellermann
648196319f
output_api: convert to C++
2013-07-30 08:34:10 +02:00
Denis Krjuchkov
49a3845135
timer: convert to class
2013-05-12 19:03:42 +06:00
Max Kellermann
9e5d2c5bb7
encoder_list: convert to C++
2013-04-17 22:22:37 +02:00
Max Kellermann
0954f580fa
output/oss,null: use new/delete
2013-04-17 01:21:33 +02:00
Max Kellermann
3a2254c91f
output: convert to C++
2013-04-17 01:12:05 +02:00
Max Kellermann
4aeec4bb60
output/solaris: convert to C++
2013-04-17 01:08:35 +02:00
Max Kellermann
750b2ad6a8
output/openal: convert to C++
2013-04-17 01:04:27 +02:00
Max Kellermann
86c276f538
output/ao: convert to C++
2013-04-17 00:56:09 +02:00
Max Kellermann
166569200a
output/shout: convert to C++
2013-04-17 00:47:20 +02:00
Max Kellermann
e903d00968
output/ffado: remove broken plugin
...
This plugin has been in MPD for three years, and it has never worked.
Enough!
2013-04-17 00:44:02 +02:00
Max Kellermann
cc6c452854
output/mvp: remove obsolete plugin
...
The hardware is obsolete, and the product does not exist anymore on
the Hauppauge web site. Let's see if anybody complains about the
removal.
2013-04-17 00:37:30 +02:00
Max Kellermann
f492c78e2e
output/jack: convert to C++
2013-04-17 00:37:30 +02:00
Max Kellermann
6b83d08228
output/fifo: convert to C++
2013-04-17 00:37:30 +02:00
Max Kellermann
dc415b761e
output/pipe: convert to C++
2013-04-17 00:37:30 +02:00
Max Kellermann
f1034eb657
output/recorder: convert to C++
2013-04-17 00:37:30 +02:00
Max Kellermann
9f625b0a0d
mixer/Pulse: convert to a class
2013-04-16 21:18:54 +02:00
Max Kellermann
e63420a8c2
output/Pulse: convert to C++
2013-04-16 20:51:21 +02:00
Max Kellermann
e02d8ad8d2
output/roar: work around libroar's use of "new"
2013-04-16 20:04:11 +02:00
Max Kellermann
1729388634
pcm_export: convert to C++
2013-04-09 01:31:05 +02:00
Max Kellermann
c654c7630a
pcm_*: move to src/pcm/
2013-04-09 01:24:52 +02:00
Max Kellermann
496f70fc0d
mixer_plugin: convert to C++
2013-02-22 20:51:23 +01:00
Max Kellermann
9ede4c5f3c
{output,mixer}/winmm: convert to C++
2013-02-22 20:29:03 +01:00
Max Kellermann
af99176581
output/alsa: workaround for noise after manual song change
...
Workaround for driver bug observed on the Raspberry Pi, see code
comment for details.
2013-02-04 15:51:32 +01:00
Max Kellermann
57e825dfe7
output/alsa: pre-allocate the silence buffer
2013-02-04 15:30:31 +01:00
Max Kellermann
e06dd129dd
output/alsa: move code to alsa_write_silence()
2013-02-04 14:30:16 +01:00
Max Kellermann
7e92820c50
output/alsa: default "device" is an empty string
...
Fixes nullptr dereference in std::string::operator=(). Also fixes a
memory leak by using config_get_block_string() instead of
config_dup_block_string().
2013-02-04 11:46:49 +01:00
Max Kellermann
7bb5a960fd
output/null: convert to C++
2013-02-02 09:30:29 +01:00
Max Kellermann
5ed9f02c4d
TagPool, ...: include cleanup
2013-01-30 22:53:12 +01:00
Max Kellermann
5e8f51a963
output/httpd: use the BufferedSocket class for HttpdClient
2013-01-30 15:08:09 +01:00
Max Kellermann
fa51db449f
ServerSocket: replace callback with virtual method
2013-01-30 14:16:04 +01:00
Max Kellermann
cb9a05ac77
output/httpd: safer cast, consider offset
2013-01-30 14:14:42 +01:00
Max Kellermann
f1f22019f5
output/httpd: forward-declare class HttpdClient
2013-01-30 13:42:16 +01:00
Max Kellermann
6d79a1cdfc
output/httpd: add constructor, destructor, Configure()
2013-01-30 13:41:27 +01:00
Max Kellermann
ad5eb2f8d6
ServerSocket: expose the class
...
Eliminate the C wrappers.
2013-01-30 13:40:56 +01:00
Max Kellermann
39d56d6b65
ServerSocket: move to libevent.a
2013-01-30 13:39:12 +01:00
Max Kellermann
fe3f0332f7
page: convert to C++
2013-01-30 09:18:52 +01:00
Max Kellermann
718fd97612
icy_server: convert to C++
2013-01-30 09:17:03 +01:00
Max Kellermann
f8ff45b212
icy_server: pass pointer to _metadata_page()
...
Don't use va_list.
2013-01-30 09:13:46 +01:00
Max Kellermann
20f85745e7
require GLib 2.24
2013-01-29 18:33:37 +01:00
Max Kellermann
84eb95466b
output/osx: convert to C++
2013-01-29 16:59:21 +01:00
Max Kellermann
26a9ce7b29
output/{alsa,oss}: convert to C++
2013-01-29 14:32:32 +01:00
Max Kellermann
2aa34882b7
output/httpd: move functions into the HttpdOutput class
2013-01-27 23:23:46 +01:00
Max Kellermann
27f8ef2f33
output/httpd: rename struct httpd_output
2013-01-27 23:21:39 +01:00
Max Kellermann
e22ef6c481
output/roar: convert to C++
2013-01-16 23:29:56 +01:00
Max Kellermann
0dd5f2915a
ServerSocket: use the SocketMonitor class
2013-01-15 22:56:06 +01:00
Max Kellermann
bc66dc45e6
server_socket: convert to C++
2013-01-15 21:42:55 +01:00
Max Kellermann
7087935656
output/httpd: convert to C++
2013-01-15 20:20:51 +01:00
Max Kellermann
f9fc3a42cc
fifo_buffer: move to util/
2013-01-15 01:02:13 +01:00
Max Kellermann
49f3855407
configure.ac: enable WIN32_LEAN_AND_MEAN on Windows
2013-01-11 11:06:16 +01:00
Max Kellermann
ed8798e82f
output/shout: refactor check_block_param() to a function
...
Don't use macro magic, don't dereference the block_param.
2013-01-10 18:46:33 +01:00
Max Kellermann
38474961fd
Log, ...: include cleanup
2013-01-10 18:34:40 +01:00
Max Kellermann
d3e1b72d38
mixer/{alsa,pulse}: convert to C++
2013-01-09 22:25:24 +01:00
Max Kellermann
ade0483641
Merge branch 'v0.17.x'
2012-10-02 17:34:03 +02:00
Gregory Smith
03a401e477
OSX: Set mDataByteSize correctly on AudioBuffers during render.
2012-10-02 17:27:52 +02:00
Max Kellermann
9a715267ad
output/shout: move code to my_shout_configure()
...
Eliminate the evil goto.
2012-10-02 00:39:21 +02:00
Max Kellermann
d95e538020
Merge branch 'v0.17.x'
2012-10-02 00:36:05 +02:00
Max Kellermann
adbe8c409a
output/{recorder,shout}: call encoder_read() in a loop
...
This is necessary for Ogg packets that span more than one page.
2012-10-02 00:26:40 +02:00
Max Kellermann
58e600f408
output/recorder: move code to _write_to_file()
2012-10-02 00:26:40 +02:00
Max Kellermann
d34e55c370
output/recorder: fix write() error check
...
We can only check for negative values if the variable is signed.
2012-10-02 00:20:42 +02:00
Max Kellermann
fbcbcdc001
output/recorder: make variables more local
2012-10-02 00:20:32 +02:00
Max Kellermann
4227a325a5
output/httpd: make variables more local
2012-10-02 00:20:13 +02:00
Max Kellermann
43d8252050
output/recorder, test/*: invoke encoder_read() after _open()
...
Make sure the file header gets written at the beginning, before
_write() gets called.
2012-10-02 00:18:18 +02:00
Max Kellermann
674b4ab647
output/shout: eliminate struct shout_buffer
...
Move the raw buffer to struct shout_data.
2012-10-02 00:18:04 +02:00
Max Kellermann
fe8fc1081a
output/shout: remove shout_buffer.len
...
Make it a local variable instead.
2012-10-02 00:17:53 +02:00
Max Kellermann
c7748fedab
output/shout: fix memory leak in error handler
2012-10-02 00:17:27 +02:00
Max Kellermann
c392efb481
output/shout: make variables more local
2012-10-02 00:17:17 +02:00
Max Kellermann
7d27d2ea5e
Merge branch 'v0.17.x'
2012-08-14 23:58:54 +02:00
Max Kellermann
c9aaabb5d4
output/jack: implement method delay()
...
Eliminate the g_usleep() call.
2012-08-14 22:47:25 +02:00
Max Kellermann
335d5d5d72
output/pulse: implement method delay()
...
Reduce command latency while paused.
2012-08-14 22:30:46 +02:00
Max Kellermann
51d793bec1
output/pulse: simplify _wait_stream()
...
One large loop and only one pa_stream_get_state() call.
2012-08-14 22:22:55 +02:00
Max Kellermann
249dcd967e
output/httpd: move delay from _pause() to _delay()
2012-08-14 21:54:47 +02:00
Max Kellermann
302972e9fc
output/httpd: fix throttling bug after resuming playback
...
Reset the timer when paused and no client is connected.
This fixes Mantis ticket 0003527.
2012-08-14 21:39:33 +02:00
Max Kellermann
31b380b266
output/httpd: move code to _has_clients()
2012-08-14 20:22:32 +02:00
Max Kellermann
8e331cfc65
gcc.h: re-add gcc_const and gcc_pure
...
Remove GLib dependency from some headers.
2012-08-02 19:12:18 +02:00
Max Kellermann
edf811fa02
DatabaseVisitor, ...: use GError forward declaration
2012-08-02 19:12:06 +02:00
Max Kellermann
5dfc0918c3
require GLib 2.16
...
GLib 2.16 was released more than 4 years ago. Let's remove some cruft
from the glib_compat.h header, and avoid new cruft to it.
2012-07-10 01:28:52 +02:00
Max Kellermann
457d98c860
output/raop: delete the RAOP plugin
...
This plugin is horrible code, I mean it. Last year, I tried hard to
fix it, but I figured would take less time to do a full rewrite.
Given that I don't even have any device that supports RAOP, I can't do
that properly. After 16 months, nobody volunteered for fixing it.
Hereby, I delete it, because having no RAOP plugin is better than
having this mess. Sorry.
2012-05-29 23:15:41 +02:00
Max Kellermann
89377556cd
output/alsa: multiply writei() result with out_frame_size
...
.. and not in_frame_size, because this relates to the frame size being
sent to ALSA. pcm_export_source_size() will then turn it back into
the in_frame_size scale.
2012-04-23 21:54:09 +02:00
Max Kellermann
df1c5ce314
pcm_export: add _frame_size()
...
Move code from the ALSA output plugin.
2012-04-23 21:54:09 +02:00
Max Kellermann
a0e4b6e266
output/alsa: fix out_frame_size formula, multiply with channels
...
The hard-coded "3 bytes" was wrong because it ignored the number of
channels.
2012-04-23 21:54:08 +02:00
Max Kellermann
c22cbbf828
Merge branch 'v0.16.x'
...
Conflicts:
src/output/osx_plugin.c
src/text_input_stream.c
2012-04-05 00:45:39 +02:00
Max Kellermann
5acee73fc8
encoder/vorbis: generate end-of-stream packet when playback ends
...
Add the encoder_plugin method end(). This is important for the
recorder plugin.
2012-04-05 00:21:53 +02:00
Max Kellermann
a9edf85a69
output/jack: check for connection failure before starting playback
2012-04-04 21:40:56 +02:00
Max Kellermann
e7a1862517
output/jack: workaround for libjack1 crash bug
2012-04-04 21:38:29 +02:00
Max Kellermann
8ff0197a43
output/osx: use the fifo_buffer library instead of rolling own
...
The existing buffer implementation has a major flaw: it is unable to
re-fill the buffer until it has been consumed completely, leading to
many occasions where the render callback needs to generate silence,
just because the play() implementation was unable to append more
data. The fifo_buffer library handles that well.
2012-03-28 21:51:17 +02:00
Max Kellermann
a2b5db0003
audio_format: remove SAMPLE_FORMAT_DSD_OVER_USB
...
DSD-over-USB should not be a MPD core format, because it is not a
"natural" format; it is just a temnporary over-the-wire format. This
format has been implemented in pcm_export, and does not need to be
supported by pcm_convert.
2012-03-27 01:22:50 +02:00
Max Kellermann
2803ec2e96
output/alsa: support 32 bit DSD-over-USB
2012-03-27 01:22:50 +02:00
Max Kellermann
ddd4f675a2
pcm_export: implement 24 to 32 bit conversion
...
For 32 bit DSD-over-USB support.
2012-03-27 01:22:50 +02:00
Max Kellermann
d271dd2cce
output/alsa: use pcm_export for the DSD-over-USB conversion
2012-03-27 01:22:50 +02:00
Max Kellermann
ebfdd37451
pcm_export: support DSD to DSD-over-USB conversion
...
Prepare for removing SAMPLE_FORMAT_DSD_OVER_USB.
2012-03-27 01:17:11 +02:00
Max Kellermann
f6d6110aaa
output/alsa: move pcm_export_open() to caller
...
Give the caller more control, prepare for DSD-over-USB improvements.
2012-03-27 01:17:11 +02:00
Max Kellermann
2f0674807c
output/alsa: more debug output
2012-03-27 00:14:37 +02:00
Max Kellermann
167242fec0
output/alsa: add option to enable DSD over USB
2012-03-22 01:30:16 +01:00
Max Kellermann
725fbe946b
output/alsa: split the frame_size attribute
...
Make it in_frame_size and out_frame_size, to account for packing.
2012-03-22 01:01:11 +01:00
Max Kellermann
b99ecb4dc9
audio_format: remove the packed S24 format
...
For simplicity, the MPD core should not have to deal with packing. It
is rarely used, and those plugins that need it should use the
pcm_export library instead.
2012-03-22 00:42:12 +01:00
Max Kellermann
208a96b211
output/alsa: use pcm_export to pack 24 bit samples
2012-03-22 00:33:59 +01:00
Max Kellermann
43774455cc
output/oss: use pcm_export to pack 24 bit samples
2012-03-22 00:33:40 +01:00
Max Kellermann
5b61e077e0
pcm_export: add option "pack"
...
Converts padded 24 bit samples to packed 24 bit samples. Will replace
the packed S24 sample format, which is not used internally.
2012-03-22 00:33:40 +01:00
Max Kellermann
921cc3e5db
output/oss: remember the real OSS format
...
Improving oss_reopen() by using the very same value that was used
initially.
2012-03-22 00:33:40 +01:00
Max Kellermann
51dce3d161
output/alsa: simplify setup_format()
2012-03-22 00:29:56 +01:00
Max Kellermann
c10f013fc2
output/alsa: don't pass audio_format to _try_format()
...
Let the caller configure the audio_format object.
2012-03-22 00:24:56 +01:00
Max Kellermann
2874d68bdb
output/alsa: simplify alsa_output_try_format_both()
...
Merge three functions into one and call get_bitformat() only once.
2012-03-22 00:23:07 +01:00
Max Kellermann
11e83eb7e7
output/oss: move code to oss_probe_sample_format()
2012-03-21 22:28:18 +01:00
Max Kellermann
170635e3a6
output/{alsa,oss}: move endian code to new library pcm_export
2012-03-21 21:16:50 +01:00
Max Kellermann
8c5ebdff36
audio_format: remove the reverse_endian attribute
...
Eliminate support for reverse endian samples from the MPD core. This
moves a lot of complexity to the plugins that really need it (only
ALSA and CDIO currently).
2012-03-21 19:31:04 +01:00
Max Kellermann
1c84f324a1
output/oss: always receive host byte order samples
...
Don't use audio_format.reverse_endian.
2012-03-21 19:25:59 +01:00
Max Kellermann
3dba09f339
output/alsa: always receive host byte order samples
...
Don't use audio_format.reverse_endian.
2012-03-21 19:14:05 +01:00
Max Kellermann
766905ba9f
output/alsa: merge alsa_data_free() into destructor
2012-03-21 18:58:11 +01:00
Rich Healey
396e97fc94
Fix the build on OSX
2012-03-21 10:32:54 +01:00
Max Kellermann
9c6a4505c8
audio_format: remove the format SAMPLE_FORMAT_DSD_LSBFIRST
...
This format is unused since the DSDIFF decoder plugin now reverses the
bit order.
2012-03-21 09:06:48 +01:00
Max Kellermann
08ce24ec3f
audio_format: basic support for DSD-over-USB
2012-03-19 23:49:29 +01:00
Max Kellermann
5016839b90
use g_strerror() instead of strerror()
...
Make sure we get a UTF-8 encoded string.
2012-03-06 22:06:08 +01:00
Kurt Van Dijck
c551c8b31b
raop_output: fix raop_session inbalance
...
raop_session_free must be called from raop_output_finish,
not from raop_output_remove.
In raop_output_remove, do close the ntp_server & control port.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@skynet.be>
2012-03-01 09:51:37 +01:00
Max Kellermann
2516496993
audio_format: add DSD sample format
...
Basic support for Direct Stream Digital. No conversion yet, and no
decoder/output plugin support.
2012-03-01 01:15:22 +01:00
Max Kellermann
c616165f81
Merge branch 'v0.16.x'
...
Conflicts:
NEWS
configure.ac
src/decoder/ffmpeg_decoder_plugin.c
test/read_tags.c
2012-02-13 19:15:18 +01:00
Max Kellermann
9c92afa5fe
output/winmm: remove pointless NULL check
...
pcm_buffer_get() cannot ever return NULL.
2012-02-13 18:10:36 +01:00
Max Kellermann
95b2df8261
output/osx: fix memory leak after AudioUnitSetProperty() failure
2012-01-04 20:47:41 +01:00
Max Kellermann
1ebadf8620
output/osx: implement 32 bit playback
2011-12-24 18:18:42 +01:00
Max Kellermann
9179d9592d
output/osx: allocate the device in enable()
...
Keep the device open as long as the output is enabled, but initialize
it only when playback starts.
2011-12-24 18:15:24 +01:00
Max Kellermann
43c5058682
Merge branch 'v0.16.x'
2011-12-24 18:15:17 +01:00
Max Kellermann
97b4a6b51f
output/osx: clear render buffer when there's not enough data
...
When we don't have enough data, generate some silence, hoping the
input buffer will fill soon. Reducing the render buffer size is not
legal.
2011-12-24 17:59:36 +01:00
Max Kellermann
f405d27c56
output/osx: remove sleep call from render callback
...
Blocking inside the render callback is forbidden, and this sleep call
didn't make any sense.
2011-12-24 17:56:10 +01:00
Max Kellermann
78c4351e04
output/openal: improve synchronization
...
This plugin's use of the "Timer" library was wrong; it added the same
amount of virtual data in every iteration in _play(), but did not
actually play something. This created an artificial, but useless,
delay. This patch implements the method _cancel(), and implements
hard-coded sleep values. This is only slightly better, but does not
attempt to look sane.
2011-12-13 22:02:05 +01:00
Max Kellermann
0a427890fe
output/openal: move code to inline functions
2011-12-13 22:00:18 +01:00
Max Kellermann
e735abe334
output/openal: use alGetSourcei(AL_BUFFER) to force-unqueue buffers
...
The implementation of cancel() did not work well: you cannot use
alSourceUnqueueBuffers() to unqueue queued buffers, and our function
openal_unqueue_buffers() left the OpenAL library in a rather undefined
state; nothing was supposed to be queued, but the "filled" variable
was not reset.
2011-12-13 21:59:10 +01:00
Max Kellermann
c0070b2f13
output/openal: make attribute "filled" unsigned
2011-12-13 21:58:13 +01:00
Max Kellermann
cfedc6e9b4
output/openal: remove bogus format check from _open()
...
The expression "!format" does not make sense, and cannot occur.
2011-12-13 21:58:09 +01:00
Max Kellermann
b66d7f7e0b
output/fifo: implement output_plugin method delay()
2011-12-13 21:58:07 +01:00
Max Kellermann
e01df06cd7
output/null: implement output_plugin method delay()
2011-12-13 21:58:02 +01:00
Max Kellermann
6584897b69
output/null: don't initialize the "timer" attribute in _init()
...
Unnecessary overhead.
2011-12-13 21:57:59 +01:00
Max Kellermann
aa4f45b9a5
Merge branch 'v0.16.x'
...
Conflicts:
NEWS
configure.ac
2011-12-13 21:57:44 +01:00
Max Kellermann
96ad5b8444
output/openal: force 16 bit playback, as 8 bit doesn't work
...
The OpenAL specification says that AL_FORMAT_MONO8 and
AL_FORMAT_STEREO8 expect unsigned 8 bit samples, but MPD uses unsigned
samples.
2011-12-13 21:32:19 +01:00
Denis Krjuchkov
33232face9
winmm_output_plugin: fail if wrong device specified instead of using fallback.
...
Silently choosing default is misleading and can cause hours of investigation.
It's better to fail immediately telling user what is wrong with config.
2011-12-13 19:12:33 +01:00
Max Kellermann
545685bc32
audio_format: basic support for floating point samples
...
Support for conversion from float to 16, 24 and 32 bit integer
samples.
2011-10-20 02:32:39 +02:00
Max Kellermann
8dd83a2cf3
output/roar: move code to _use_audio_format()
2011-10-08 14:51:19 +02:00
Max Kellermann
b43bf4dd74
Merge branch 'v0.16.x'
2011-10-08 14:50:44 +02:00
Max Kellermann
5ed0eb51d1
output/openal: auto-fallback to mono if channel count is unsupported
...
.. instead of failing playback completely.
2011-10-08 14:41:22 +02:00
Max Kellermann
72a1ca3b99
output/alsa: remove "default" case from switch
...
Allow gcc to warn when a new format isn't supported.
2011-10-08 14:41:11 +02:00
Steven Blackburn
21851c0673
Add support for streaming to a DLNA client
...
The Naim Uniti does not appear to support icecast-style streaming of FLAC
music but does support the codec from a DLNA server. This change looks for
"transferMode.dlna.org: Streaming" in the HTTP request header and responds
with something the Uniti (and hopefully other DLNA clients) accepts.
The only difference in the DLNA streaming mode is the reponse header and
that icecast metadata is disabled. If a client request indicates both modes
are supported, the DLNA mode is preferred (as the Uniti says it supports
both but then rejects a FLAC ICY stream).
Note: This change may be specific to Naim equipment (the only device it was
tested on). E.g. the hardcoding of Content-Length which works but is not a
logically correct value. The change should be backwards-compatible, so
only those clients requesting a DLNA stream will see any difference.
2011-09-30 08:53:09 +02:00
Dan McGee
8176880173
Simplify setsockopt() casting workaround
...
On Win32, the third setsockopt parameter has type (char *) while on POSIX
systems it is (void *). However, given that it is a no-op cast to go from a
char pointer to a void pointer, we can cast to a char pointer (with a
possible const modifier) on all platforms and satisfy the compiler.
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-21 17:54:44 +02:00
Max Kellermann
3ea1073809
socket_util: move sockaddr_to_string() to resolver.c
2011-09-20 08:49:36 +02:00
Max Kellermann
76a959a578
rtsp_client, output/raop: use close_socket() instead of close()
2011-09-20 08:48:48 +02:00
Max Kellermann
921553d7bb
Merge branch 'v0.16.x'
2011-09-20 08:47:06 +02:00
Max Kellermann
c476819cb1
fd_util: add function close_socket()
...
Wrap close(), use closesocket() on WIN32/WinSock.
2011-09-20 08:38:58 +02:00
Max Kellermann
b03f9ece05
glib_socket.h: wrap g_io_channel_*_new() calls portably
...
The server_socket library (used by the httpd output plugin) didn't
check for WIN32, that's fixed now.
2011-09-20 08:35:25 +02:00
Max Kellermann
74617389c8
output_plugin: the plugin allocates the audio_output object
...
Pass audio_output objects around instead of void pointers. This will
give some more control to the plugin, and prepares for non-blocking
audio outputs.
2011-09-19 09:41:21 +02:00
Max Kellermann
1d8840412f
configure.ac: add option --enable-solaris-output
...
Allow enabling the plugin explicitly without running Solaris, to test
the build.
2011-09-19 09:39:35 +02:00
Max Kellermann
ffa9f4b47f
output/roar: check return values
...
Fixes gcc warnings.
2011-09-18 12:07:06 +02:00
Max Kellermann
667e22bbc7
output/roar: unknown volume is -1, not 0
2011-09-18 12:06:46 +02:00
Max Kellermann
d4d838c8bb
output/roar: move code to roar_cancel_locked() and others
...
Wrap the locking code.
2011-09-18 11:51:18 +02:00
Max Kellermann
c61a889c86
output/roar: use GLib memory allocation functions
...
GLib has a built-in OOM handler.
2011-09-17 20:12:45 +02:00
Max Kellermann
567fe89a77
output/roar: use config_get_block_string() for temporary
2011-09-17 20:11:51 +02:00
Max Kellermann
950772ab8a
output/roar: reorder methods
2011-09-17 20:10:26 +02:00
Max Kellermann
0bd0e2a3ec
output: rename plugin variables
...
Consistent naming.
2011-09-17 20:04:18 +02:00
Max Kellermann
47774ce882
Merge branch 'v0.16.x'
2011-09-17 19:59:52 +02:00
Max Kellermann
3c9bcdd347
output: per-plugin header
...
Move the "extern" declarations from output_list.c, for more type
safety.
2011-09-17 19:51:41 +02:00
Max Kellermann
3934d2d30c
output/pulse: don't expose internal struct in public header
...
Provide _lock() and _unlock() to wrap all accesses from the mixer
plugin.
2011-09-17 19:50:36 +02:00
Max Kellermann
423ce9557a
output/raop: don't expose internal structs in public header
2011-09-17 19:44:30 +02:00
Max Kellermann
947848ebf6
output/roar: export volume methods
...
Use these instead of exposing the internal roar_t struct.
2011-09-17 19:33:51 +02:00
Max Kellermann
5e22fe488e
output: rename plugin source files
2011-09-17 08:54:50 +02:00
Max Kellermann
c666cf1c44
output/pulse: move code to _setup_stream()
2011-09-17 08:53:53 +02:00
Max Kellermann
27206368da
output/pulse: improve locking
...
Always lock the main loop when operating on PULSE objects. Document
this.
2011-09-17 07:30:59 +02:00
Max Kellermann
87b624f5d5
Merge branch 'v0.16.x'
2011-09-16 07:52:39 +02:00
Max Kellermann
1cbba4fc59
input/curl, output/pulse: fix "unused local variable" warnings
2011-09-16 07:41:41 +02:00
Max Kellermann
9f5c938ff3
conf: add config_dup_block_path()
2011-09-09 23:01:22 +02:00
Max Kellermann
b42a8d2364
utils: parsePath() returns GError on failure
...
Better error messages.
2011-09-09 22:55:57 +02:00
Max Kellermann
35af940166
conf: get_block_param() returns a const pointer
...
No caller needs to write.
2011-09-09 21:36:41 +02:00
Max Kellermann
6a3008d7ff
Merge branch 'v0.16.x'
...
Conflicts:
configure.ac
src/output_control.c
2011-09-01 19:19:42 +02:00
Max Kellermann
596f36bb78
output/osx: don't drain the buffer when closing
...
Eliminate an unnecessary source of deadlocks.
2011-09-01 18:21:46 +02:00
Max Kellermann
e7abdab58d
output/osx: signal the GCond while mutex is locked
2011-09-01 18:21:46 +02:00
Max Kellermann
60f7ff3de5
output/pulse: reset callbacks before closing stream/context
...
Fixes assertion failure when a stream callback is invoked too late
after a format change.
2011-08-31 21:01:34 +02:00
Max Kellermann
e76c752987
output/pulse: add function _delete_stream()
...
Merge common code.
2011-08-31 21:01:22 +02:00
Max Kellermann
042c1abc6e
output/pulse: use _delete_context()
...
Eliminate duplicate code.
2011-08-31 20:58:36 +02:00
Max Kellermann
1401621913
output/raop: remove Audio-Jack-Status check
...
The value of this is not used, the code is commented out - let's get
rid of it.
2011-08-31 20:19:36 +02:00
Max Kellermann
3c034b0a0c
output/raop: remove empty function raopcl_stream_connect()
2011-08-31 20:17:24 +02:00
Max Kellermann
7f3dc5f040
output/raop: cast sendto() parameter to void pointer
...
Fix compilation on mingw32.
2011-08-31 08:30:26 +02:00
Max Kellermann
9209ccfa40
rtsp_client: allow parameter "kd" to be NULL
...
When the caller isn't interested in the values.
2011-08-31 08:16:55 +02:00
Max Kellermann
2525d32e17
rtsp_client: don't wait if packet is over due
...
Check if the time difference is negative. That would have caused
sleeping forever.
2011-08-31 07:47:01 +02:00
Max Kellermann
57526067f5
output/raop: move code to raop_session_new()
...
.. and fix a few memory leaks.
2011-08-30 22:36:54 +02:00
Max Kellermann
34d9d8abd4
output/raop: merge raopcl_close() into _finish()
...
.. and fix a double free bug.
2011-08-30 22:20:32 +02:00
Max Kellermann
bd67e986f4
output/raop: free the raop_data object in finish()
2011-08-30 22:02:55 +02:00
Max Kellermann
e587518d85
output/raop: remove from the session when opening fails
2011-08-30 22:00:19 +02:00
Max Kellermann
210b6c38bd
output/raop: move code to raop_output_remove()
2011-08-30 21:56:57 +02:00
Max Kellermann
74a39c715b
ntp_server: move code to udp_server.c
2011-08-30 07:39:05 +02:00
Max Kellermann
195496333b
output/raop: move RTSP client code to rtsp_client.c
...
Restore some of the original file structure from from raop_play.
2011-08-29 11:27:08 +02:00
Max Kellermann
9ccaa90439
ntp_server: use the I/O thread
2011-08-29 11:23:51 +02:00
Max Kellermann
a769352a74
output/raop: fallback for g_set_error_literal()
...
This function was added in GLib 2.18. Make the plugin compatible with
older GLib versions.
2011-08-29 09:39:03 +02:00
Max Kellermann
8a63c27925
output/raop: move NTP code to separate library
2011-08-28 16:44:12 +02:00
Jonathan Neuschäfer
310895f060
rename 'Timer' to 'struct timer'
2011-08-27 11:30:34 +02:00
Max Kellermann
0575a6d652
output/raop: use GLib byte order macros
2011-08-24 02:19:40 +02:00
Max Kellermann
08b88714e0
output/raop: use fill_int() in fill_time_...()
...
Eliminate duplicate code.
2011-08-24 02:18:51 +02:00
Max Kellermann
bcaff4b844
output/raop: check if the "host" option is present
...
Better than dereferencing NULL.
2011-08-24 01:47:31 +02:00
Max Kellermann
82f336a78f
output/raop: remove excessive debug messages
2011-08-24 01:47:27 +02:00
Max Kellermann
350aa33022
output/raop: consistently use GError
2011-08-24 01:47:26 +02:00
Max Kellermann
d6290a2f1a
output/raop: use GLib heap functions
2011-08-24 01:47:25 +02:00
Max Kellermann
71e9d08863
output/raop: functions that always succeed return void
...
No point in returning true, and checking that.
2011-08-24 01:47:23 +02:00
Max Kellermann
9729dc7594
output/raop: rtspcl_connect() returns false on error
...
.. and not -1, which is "true".
2011-08-24 01:47:22 +02:00
Max Kellermann
92c1b8f31e
output/raop: error checking in send_control_command()
2011-08-24 01:47:21 +02:00
Max Kellermann
9ffa2604f8
output/raop: make some allocations static
...
Allocate objects on the stack to reduce heap overhead.
2011-08-24 01:47:20 +02:00
Max Kellermann
03b1fad4d4
output/raop: remove unused local variables
2011-08-24 01:47:18 +02:00
Max Kellermann
72eb4c534f
output/raop: make some exec_request parameters const
2011-08-24 01:47:17 +02:00
Max Kellermann
47d936e9cc
output/raop: use "char*" for string buffers
...
Not unsigned char. Eliminate useless casts.
2011-08-24 01:47:15 +02:00
Max Kellermann
8e08407090
output/raop: make send_control_command() static
...
Only used internally.
2011-08-24 01:47:14 +02:00
Max Kellermann
c0a4558c62
output/raop: remove useless test_default_device() implementation
...
This defaults to "false" when the method pointer is NULL.
2011-08-24 01:47:13 +02:00
Max Kellermann
5ecb6fecc4
Merge branch 'v0.16.x'
2011-08-24 01:47:10 +02:00
Max Kellermann
b3df4dc2c9
output/pulse: fix deadlock when the stream was suspended
...
Check if the stream is suspended; wake up the main loop when it
becomes suspended.
2011-08-23 23:02:13 +02:00
Max Kellermann
3db9ab82ea
output/pulse: add assertions
2011-08-23 22:48:22 +02:00
Max Kellermann
2dc3acc5f0
output/pulse: return 0 on error
...
Not a bool.
2011-08-23 22:48:22 +02:00
Max Kellermann
25686e5bce
pulse/output: fix deadlock when resuming the stream
...
Unlock the mainloop in all code paths.
2011-08-23 22:45:47 +02:00
Max Kellermann
7c887af1ea
output/httpd: add assertions
2011-08-23 18:14:39 +02:00
Max Kellermann
b7f435b50e
output/httpd: don't warn on client disconnect
...
This warning should only be logged when we really received something.
When the client disconnects, G_IO_IN is triggered, and the read
returns G_IO_STATUS_EOF.
2011-08-23 18:02:56 +02:00
Jonathan Neuschäfer
eea726740b
output/raop: rewrite remove_char_from_string
2011-07-25 11:23:22 +02:00
Max Kellermann
0ea4c970d7
Merge branch 'v0.16.x'
...
Conflicts:
src/player_thread.c
src/playlist_control.c
2011-07-20 21:46:05 +02:00
Max Kellermann
57936a1374
output/raop: use memset() instead of bzero()
...
There's no bzero() on WIN32.
2011-07-20 21:20:23 +02:00
Max Kellermann
9242fde6b8
output/raop: include winsock.h on WIN32
2011-07-20 21:18:55 +02:00
Max Kellermann
d1f653be65
output/raop: use GMutex instead of pthread_mutex_t
...
Be portable on WIN32.
2011-07-20 21:11:06 +02:00
Max Kellermann
0035dceb0a
output/raop: add missing mutex unlock call in error handler
2011-07-20 21:09:39 +02:00
Max Kellermann
838f7cd210
encoder_plugin: add method pre_tag()
...
In the "vorbis" plugin, this is a copy of the old flush() method,
while flush() gets a lot of code remove, it just sets the "flush" flag
and nothing else. It doesn't start a new stream now, which should fix
a few problems in some players.
2011-07-20 20:54:34 +02:00
Max Kellermann
13539961b2
output/httpd: explicitly convert size_t to bool in pause()
2011-07-20 19:16:47 +02:00
Max Kellermann
d1eeed6a5b
output/alsa: fix SIGFPE when alsa announces a period size of 0
2011-07-20 06:54:51 +02:00
Jonathan Neuschäfer
a222c4879c
output/shout: fix a memory leak
2011-07-19 00:24:48 +02:00
Max Kellermann
eb2f413cf0
Merge branch 'v0.16.x'
...
Conflicts:
NEWS
configure.ac
2011-07-19 00:24:20 +02:00
Jonathan Neuschäfer
7d6a605a85
output/shout: fix a memory leak
2011-07-18 22:04:48 +02:00
Jonathan Neuschäfer
a6a8bdffc3
output/recorder: fix a memory leak
2011-07-18 22:04:10 +02:00
Jonathan Neuschäfer
296085ff23
output/httpd: add missing g_free in error path
2011-07-18 22:04:06 +02:00
Jonathan Neuschäfer
36aa8ce3c9
output/ao: add missing g_free in error path
2011-07-18 22:03:48 +02:00
Hans-Kristian Arntzen
d9353c4fd3
Remove unused headers in Roar plugin.
...
Should fix build errors for Win32.
2011-03-23 21:59:22 +01:00
Max Kellermann
0c9fc2f809
Merge commit 'release-0.16.2'
...
Conflicts:
Makefile.am
NEWS
configure.ac
2011-03-19 09:58:07 +01:00
Max Kellermann
8d83914f05
output/httpd: include sys/socket.h only when building with libwrap
...
Fixes build failure on WIN32.
2011-03-18 19:44:12 +01:00
Max Kellermann
6dcec36621
Merge release 0.15.16 into v0.16.x
...
Conflicts:
NEWS
configure.ac
src/output/jack_plugin.c
src/update.c
2011-03-16 18:08:54 +01:00
Hans-Kristian Arntzen
1a954748a0
RoarAudio output plugin
2011-03-16 17:57:47 +01:00
Ulrich Spörlein
e2aea6bce5
output/httpd: include sys/socket.h for AF_UNIX
2011-03-09 19:53:48 +01:00
Max Kellermann
a1d1c2beaa
output/oss: disable 24 bit playback on FreeBSD
...
See code comment.
2011-02-28 00:09:45 +01:00
Max Kellermann
ee9c60fad4
output/oss: AFMT_S24_PACKED is little-endian
...
According to the Solaris dsp manpage, AFMT_S24_PACKED is
little-endian:
http://download.oracle.com/docs/cd/E19963-01/821-1475/6nmf5baot/index.html
The Minix soundcard.h header says the same.
2011-02-28 00:00:41 +01:00
Max Kellermann
1674a4ec82
output/jack: fix crash with mono playback
...
With mono sound, jack_sample_size is smaller than frame_size (4 vs 2
bytes), and "space/jack_sample_size==0". That means mpd_jack_play()
will return 0, although no error has occurred.
2011-02-27 23:26:50 +01:00
Max Kellermann
ce370bee60
output/jack: rename variable sample_size to jack_sample_size
2011-02-25 10:46:44 +01:00
Christopher Brannon
2a1f4539f6
Insure proper initialization of stack-allocated struct.
...
Version 1.0.0 of the libao library added a new field to the
ao_sample_format struct. It is a char * named matrix. When
an ao_sample_format is allocated on the stack, this field contains
garbage. The proper course is to insure that is initialized to NULL.
NULL indicates that we do not want any mapping.
The struct is now initialized using a static initializer, and this
technique is compatible with all known versions of libao.
2011-02-15 12:16:25 +01:00
Thomas Jansen
144d092637
output/shout: add possibility to set url
...
Added a new optional parameter for the shout plugin called "url".
2011-02-09 22:42:51 +01:00
Thomas Jansen
948b8f35e6
general: whitespace cleanup
...
Remove trailing whitespace found by this command:
find -name '*.[ch]' | xargs grep "[[:space:]]$"
2011-02-09 22:42:31 +01:00
Thomas Jansen
e776c605ad
output/httpd: initialize unflushed_input
...
This fixes the following valgrind warning occuring on the first call of
httpd_output_read_page:
==20124== Conditional jump or move depends on uninitialised value(s)
==20124== at 0x425E65: httpd_output_read_page (httpd_output_plugin.c:240)
==20124== by 0x426087: httpd_output_open (httpd_output_plugin.c:279)
==20124== by 0x41D862: ao_open (output_plugin.h:206)
==20124== by 0x41E133: audio_output_task (output_thread.c:590)
2011-02-09 22:41:36 +01:00
Max Kellermann
c6cbcc2c25
copyright year 2011
2011-01-29 10:13:54 +01:00
Dustin Puckett
79e0db4ca0
output/raop: new output plugin
...
Remote Audio Output Protocol (RAOP), for Apple devices.
2011-01-28 21:17:09 +01:00
Max Kellermann
1a2ea4c06c
Merge branch 'v0.16.x'
...
Conflicts:
NEWS
configure.ac
2011-01-07 23:52:23 +01:00
Max Kellermann
8c0afd8557
Merge branch 'v0.15.x' into v0.16.x
...
Conflicts:
NEWS
configure.ac
src/directory.h
2011-01-07 23:50:23 +01:00
Max Kellermann
4f2d67dfb0
output/httpd: define G_LOG_DOMAIN in httpd_client.c
2011-01-07 18:00:12 +01:00
Max Kellermann
b5645ab29f
output/osx: fix up audio format first, then apply it to device
...
This is a MPD 0.16 regression: when playing a 24 bit file, the switch
to 16 bit was made only partially, after mBytesPerPacket and
mBytesPerFrame had already been applied.
That means mBytesPerFrame referred to 24 bit, and mBitsPerChannel
referred to 16 bits. Of course, that cannot work.
2011-01-07 17:31:36 +01:00
Greg Ward
9cb4aaf3c2
osx_output: always pass OS X result code to g_set_error().
...
Should be safe on OS X 10.4 (32-bit), since Apple's OSStatus boils
down to "signed long", and g_set_error() takes gint, which is really
just "int". Assigning "signed long" to "int" on 32-bit Unix should be
just fine, since both are signed 32-bit ints.
No idea if this is safe on 64-bit OS X.
2010-12-21 07:37:54 +01:00
Greg Ward
80dc602193
osx_output: allow user to specify other audio devices.
...
Add new config parameter 'device' to audio_output type "osx":
- if not supplied or set to "default", open default device
- if set to "system", open system device
- otherwise 'device' should be an audio device name: mpd will find and
open the specified audio device, falling back to the default
device if it's not found
2010-12-21 07:36:28 +01:00
Alex Viskovatoff
144ad7992e
output/solaris: add missing parameter to open_cloexec() call
2010-12-21 07:31:08 +01:00
Max Kellermann
f384f8da93
Merge release 0.15.15 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
2010-11-08 18:50:22 +01:00
Max Kellermann
cc1debc948
output/shout: artist comes first in stream title
...
After popular demand, I've switched the order of "artist" and "title"
in the stream title. There is no standard, and there is no reliable
way to parse those from the stream title.
2010-11-08 18:46:14 +01:00
Max Kellermann
5a26320680
output/alsa: dump buffer and period limits
2010-11-05 10:35:46 +01:00
Max Kellermann
90dc880e67
output/httpd: implement delay()
2010-11-05 09:49:22 +01:00
Max Kellermann
e11ff967d0
output/shout: implement delay()
...
This makes the plugin more responsive to control commands, because it
will listen to control events while waiting.
2010-11-05 09:49:20 +01:00
Max Kellermann
754015544f
output/ffado: transfer_playback_buffers() returns a boolean
...
libffado documentation says this function returns -1 on error, but
that is a lie - it returns a boolean value, and "false" means error.
2010-11-04 20:08:04 +01:00
Denis Krjuchkov
9dee419b7c
winmm_output: handle empty string case when parsing device id
2010-11-04 11:09:50 +05:00
Denis Krjuchkov
7612bf1bfa
winmm_output: added "device" configuration option
...
Device can be specified either by magic index (starting with 0)
or by device name.
2010-11-04 00:51:18 +05:00
Denis Krjuchkov
ad56e10e5b
winmm_output: improved test_default_device
...
If no device is available test_default_device returns false.
2010-11-03 23:31:49 +05:00
Max Kellermann
75f4772ba2
output: new output plugin "ffado"
...
Using libffado, to play on firewire audio devices.
Warning: this plugin was not tested successfully. I just couldn't
keep libffado2 from crashing. Use at your own risk.
For details, see my Debian bug reports:
http://bugs.debian.org/601657
http://bugs.debian.org/601659
2010-10-27 21:25:41 +02:00
Denis Krjuchkov
e6fc88a758
mixer: winmm_mixer implemented
2010-10-09 02:45:08 +06:00
Denis Krjuchkov
20004b7ee0
win32_output: renamed win32 output plugin to winmm
...
Win32 has many audio APIs. New name is slightly more correct.
2010-10-08 23:55:14 +06:00
Max Kellermann
84e037631d
output/httpd: use the new server_socket library
2010-10-05 21:18:54 +02:00
Max Kellermann
04c4398bfc
output/httpd: don't close socket in open() failure
...
This cleanup call is obsolete, since we moved the binding code to
enable()/disable().
2010-10-05 21:18:54 +02:00
Max Kellermann
5923cfcde3
output/httpd: MIME type audio/ogg for Ogg Vorbis
...
RFC 5334 10.3 defines the MIME type "audio/ogg". We could use
"application/ogg" as well, but we know for sure that we only emit
audio data.
2010-10-03 16:22:03 +02:00
Thomas Jansen
28bcb8bdf5
eliminate g_error() usage
...
Replaced all occurrences of g_error() with MPD_ERROR() located in a new header
file 'mpd_error.h'. This macro uses g_critical() to print the error message
and then exits gracefully in contrast to g_error() which would internally call
abort() to produce a core dump.
The macro name is distinctive and allows to find all places with dubious error
handling. The long-term goal is to get rid of MPD_ERROR() altogether. To
facilitate the eventual removal of this macro it was added in a new header
file rather than to an existing header file.
This fixes #2995 and #3007 .
2010-09-25 15:00:43 +02:00
Thomas Jansen
9af9fd1400
output/httpd: bind_to_address support (including IPv6)
...
Added support for a new optional configuration setting for the httpd output
named "bind_to_address". Setting it to a specific IP address (v4 or v6) will
cause the httpd output to bind to that address exclusively. Supporting
multiple addresses in parallel is future work.
This implements the feature requests #2998 and #2646 .
2010-09-25 15:00:43 +02:00
Max Kellermann
5b996ab880
output/httpd: access sockaddr_storage object directly
...
Work around aliasing warning.
2010-09-23 09:01:17 +02:00
Max Kellermann
917434269c
output/httpd: implement "pause"
...
Send silence to all connected clients while paused, to avoid
connection interruption.
2010-08-31 06:50:14 +02:00
Max Kellermann
a77506ae21
output/httpd: forced flush after 32 kB of input data
...
Avoid buffer underruns on the streaming client, if the encoder is "too
efficient" (e.g. when encoding silence while paused).
2010-08-31 06:49:06 +02:00
Max Kellermann
e4b7a113fd
database, ...: remove EINTR checks after stdio calls
...
MPD doesn't have child processes anymore, and thus we're not expecting
to receive SIGCHLD very often. Since hard disk access isn't
interrupted by signals anyway, we don't need those excessive checks.
2010-07-25 12:01:59 +02:00
Tim Phipps
4e83b79d2b
output/httpd: add libwrap support
...
libwrap support is in MPD but only for the control port. This patch
adds support for the http port. The code is copied from
src/client_new.c
2010-06-06 21:53:24 +02:00
Max Kellermann
9cce1d749a
output/win32: new output plugin for Windows Wave
2010-05-20 09:33:05 +02:00
Max Kellermann
c727e86980
input/file, output/{fifo,recorder}: add O_BINARY to open() flags
...
Windows compatibility.
2010-05-20 09:13:39 +02:00
Max Kellermann
6c831e04a2
output/oss: 24 bit support via OSS4
...
Added #ifdefs on the macros AFMT_S24_NE and other OSS4 extensions.
2010-05-14 09:48:02 +02:00
Max Kellermann
67c48f66a6
output/oss: rewrite of the audio format detection
...
Removed the "supported" / "unsupported" arrays, and auto-detect on
every open() call, just like the ALSA output plugin.
2010-05-13 14:42:09 +02:00
Max Kellermann
5fa1c703de
output/oss: use the *_NE macros
...
Removed the macro AFMT_S16_MPD.
2010-05-13 14:34:22 +02:00
James Pike
c52f469c9c
output/httpd: added name/genre/website configuration
2010-04-05 13:11:10 +02:00
Avuton Olrich
06f86b4532
Add support for building httpd_output plugin for win32
2010-03-22 07:15:39 -07:00
Max Kellermann
762565e9d1
output/jack: drain the ring buffers during pause
...
If we're not doing this, and a new song is played after pause ends,
then you will hear the rest of the previous song.
2010-03-10 19:48:49 +01:00
Max Kellermann
41a4662c8c
output/jack: synchronize all channels
...
Always use the same number of samples from each channel's ring
buffer. This ensures that all channels are kept in sync.
2010-03-10 19:48:34 +01:00
Max Kellermann
828a5f552f
output/pulse: clear the "mainloop" attribute on error
...
When enabling the pulse device fails, clear po->mainloop after
pa_threaded_mainloop_free() has finished. This is important for the
assertions.
Two wrong g_free() calls were also removed.
2010-01-17 12:03:22 +01:00
Max Kellermann
26841b6058
output/alsa: support packed 24 bit samples
2010-01-17 00:43:24 +01:00
Max Kellermann
da47afe7d1
output/alsa: probe all sample formats in a loop
...
More code simplification. Probe all formats, no matter which input
format.
2010-01-16 23:44:52 +01:00
Max Kellermann
96546c1a8a
output/alsa: merged code into alsa_output_try_format()
...
Remove the debug log messages, because they are duplicate (see
ao_open() in output_thread.c).
2010-01-16 23:44:50 +01:00
Max Kellermann
579a8a96ea
output/alsa: pass sample_format to get_bitformat()
2010-01-16 23:44:48 +01:00
Max Kellermann
79848e3414
output/alsa: moved code to alsa_output_setup_format()
2010-01-16 23:44:42 +01:00
Avuton Olrich
9d3865cb95
Update copyright notices.
2009-12-31 20:58:43 -08:00
Viliam Mateicka
ac0bf1a445
httpd: use get_mime_type to determine encoder content
2009-12-03 20:27:08 +01:00
Max Kellermann
c412d6251e
audio_format: changed "bits" to "enum sample_format"
...
This patch prepares support for floating point samples (and probably
other formats). It changes the meaning of the "bits" attribute from a
bit count to a symbolic value.
2009-12-02 22:29:50 +01:00
Max Kellermann
39404725f0
output/openal: use audio_format_to_string()
2009-11-15 16:20:20 +01:00
Max Kellermann
5b82ffc291
include config.h in all sources
...
After we've been hit by Large File Support problems several times in
the past week (which only occur on 32 bit platforms, which I don't
have), this is yet another attempt to fix the issue.
2009-11-12 09:17:03 +01:00
Max Kellermann
b722d3d7f3
configure.ac: require GLib 2.12
...
Drop the required GLib version from 2.16 to 2.12, because many current
systems still don't have GLib 2.16. This requires several new
compatibility functions in glib_compat.h.
2009-11-10 21:14:22 +01:00
Max Kellermann
e0e6813a1d
fd_util: removed creat_cloexec()
...
Add a "mode" argument to open_cloexec() instead.
2009-11-10 16:53:24 +01:00
Max Kellermann
54033c74e4
output/alsa: fill period buffer with silence before draining
...
ALSA passes full period buffers to the hardware. If an application
doesn't finish writing a period, libasound will nonetheless send the
partial buffer (with undefined trailing data). This causes noise at
the end of playback. This patch attempts to track the current
position within the period buffer, and generates silence at the end,
before calling snd_pcm_drain().
2009-11-09 22:22:31 +01:00
Max Kellermann
f66edccffd
fd_util: added O_NONBLOCK functions
...
Changed the wrappers for pipe(), socket(), accept(). On WIN32, this
does not work for pipe().
2009-11-08 22:11:35 +01:00
Max Kellermann
e3af0032b2
set the close-on-exec flag on all file descriptors
...
Added the "fd_util" library, which attempts to use the new thread-safe
Linux system calls pipe2(), accept4() and the options O_CLOEXEC,
SOCK_CLOEXEC. Without these, it falls back to FD_CLOEXEC, which is
not thread safe.
This is particularly important for the "pipe" output plugin (and
others, such as JACK/PulseAudio), because we were heavily leaking file
descriptors to child processes.
2009-11-07 18:55:16 +01:00
Max Kellermann
375fd5ed4c
output/jack: added option "server_name"
2009-11-07 17:26:21 +01:00
Max Kellermann
c9f726048c
output/httpd: moved code to httpd_output_bind()
2009-11-07 16:52:44 +01:00
Max Kellermann
41f3f12709
output/jack: free source port names on exit
...
Make valgrind happy.
2009-11-07 15:17:48 +01:00