Max Kellermann
ad83c7f704
tag_rva2: move code to rva2_apply_frame()
2012-04-23 23:28:34 +02:00
Max Kellermann
404fa89937
tag_id3: export tag_id3_load()
2012-04-23 22:51:45 +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
ec93114347
pcm_export: consider the pack24 flag in _source_size()
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
466c337bcb
encoder_plugin: add state assertions
2012-04-05 00:05:21 +02:00
Max Kellermann
98a468a101
encoder/vorbis: generate end-of-stream packet before tag
...
Don't reset the ogg_stream_state object, because this discards the
end-of-stream packet that was just added.
2012-04-04 23:59:06 +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
Jurgen Kramer
f930f37d35
Add support for DSD-over-USB version 1.0, remove pre-v1 support
2012-04-04 20:13:15 +02:00
Max Kellermann
4feb57e895
db_lock, archive/bz2, ...: workaround for G_STATIC_MUTEX_INIT warning
2012-04-04 20:13:15 +02:00
Max Kellermann
712e3eb120
input/curl: use g_source_get_time()
...
g_source_get_current_time() is deprecated since GLib 2.28. This patch
adds a compatibility wrapper for older GLib versions to glib_compat.h.
2012-04-04 20:05:48 +02:00
Max Kellermann
d8e423df1a
directory: use strrchr() instead of g_basename()
...
g_basename() is deprecated in GLib 2.32.
2012-04-04 19:08:05 +02:00
Max Kellermann
09aa0dc676
uri: remove g_basename() call from uri_get_suffix()
...
g_basename() is deprecated in GLib 2.32. Instead, verify that the
suffix does not have a backslash, to catch Windows path names.
2012-04-04 12:22:16 +02:00
Anton Khirnov
83174de420
update: properly skip symlinks in path that is to be updated.
2012-04-04 08:56:45 +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
a0730cf264
pcm_export: support packing SAMPLE_FORMAT_DSD_OVER_USB
...
It's a padded 24 bit format.
2012-03-27 00:37:14 +02:00
Max Kellermann
ec61b3a5fc
pcm_export: initialize the "pack" buffer
2012-03-27 00:14:37 +02:00
Max Kellermann
521f2294cb
pcm_export: fix API documentation
2012-03-27 00:14:37 +02:00
Max Kellermann
2f0674807c
output/alsa: more debug output
2012-03-27 00:14:37 +02:00
Dan McGee
de0f46b947
Use g_message and not g_debug when removing song
...
When adding or updating a song, we get a log message even if debug is not
enabled. It seems odd that removing a song shouldn't be done at the same log
level; otherwise looking at the log leads you to believe songs are never
removed from the library on update.
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-26 17:32:18 +02:00
Dan McGee
1a57fa095f
Fix processing of sticker database path
...
After a previous refactor, the current code fails on paths that need
expansion (e.g, '~/.mpd/sticker.db'), because we are not passing the correct
path to the sticker database code. Pass the expanded (and previously unused)
string instead of the original string.
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-26 17:30:06 +02:00
Max Kellermann
167242fec0
output/alsa: add option to enable DSD over USB
2012-03-22 01:30:16 +01:00
Max Kellermann
81208d78ac
pcm_dsd: implement DSD to 24 bit USB conversion
...
Implements the dCS suggested standard:
http://www.dcsltd.co.uk/page/assets/DSDoverUSB.pdf
2012-03-22 01:14:51 +01:00
Max Kellermann
da8b01771f
playlist/soundcloud: libyajl2 uses size_t for string lengths
...
Fixes build failure on 64 bit.
2012-03-22 01:07:49 +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
9ec9a8705e
pcm_export: use the byte_reverse library directly
...
Delete the now-unused pcm_byteswap library, and optimize the
pcm_export_state object.
2012-03-21 21:18:11 +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
a5d1444ef4
pcm_pack: fix regression in unpack_sample()
...
Should have been "==", not "!=".
2012-03-21 21:16:46 +01:00
Max Kellermann
55708b39c3
audio_format: DSD_OVER_USB is padded to 32 bit
...
For simplicity, pad the dCS samples to 32 bit. Packed 24 bit samples
are rarely used. This patch does not include a real code change,
because there is no user of DSD_OVER_USB yet.
2012-03-21 19:41:41 +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
7ebf8e66c9
decoder/pcm: always supply host byte order samples
...
Don't use audio_format.reverse_endian.
2012-03-21 19:10:57 +01:00
Max Kellermann
95d9bb6dfc
pcm_byteswap: move code to libutil
2012-03-21 18:58:19 +01:00
Max Kellermann
766905ba9f
output/alsa: merge alsa_data_free() into destructor
2012-03-21 18:58:11 +01:00
Max Kellermann
a29c64b6c7
audio_format: hack for DSD to USB conversion
...
Halve the sample rate for *:dsdusb:*.
2012-03-21 10:33:43 +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
238c3adad1
decoder/dsdiff: reverse bits to most significant bit first
...
Allow to remove this complexity from the MPD core.
2012-03-21 09:01:56 +01:00
Max Kellermann
c1d0a8b5ce
dsd2pcm: move the bit reversing code to a generic library
...
Instead of doing run-time initialisation, use a constant lookup table.
2012-03-21 08:44:43 +01:00
Max Kellermann
08ce24ec3f
audio_format: basic support for DSD-over-USB
2012-03-19 23:49:29 +01:00
Max Kellermann
79eb7623ef
event_pipe, test: explicitly ignore write() return value
...
Some compilers are very picky, but we really aren't interested in the
return value.
2012-03-19 23:26:47 +01:00
Jonathan Neuschäfer
b9e64d0472
decoder/audiofile: fix compiler warnings with libaudiofile 0.3.3
...
This might break older versions, I didn't test.
2012-03-19 23:21:12 +01:00
Max Kellermann
4f500149af
text_input_stream: detect end-of-file
...
Fixes endless loop when the last line of a text file was not
terminated (bug 3470).
2012-03-19 23:17:56 +01:00
Robert Vollmert
281b8714ef
playlist/soundcloud: support libyajl2
...
[mk: backwars compatibility and autoconf check]
2012-03-19 21:16:48 +01:00
Max Kellermann
d5be3cce9c
text_input_stream: detect end-of-file
...
Fixes endless loop when the last line of a text file was not
terminated (bug 3470).
2012-03-19 20:37:25 +01:00
Max Kellermann
69d3c611aa
util/list: allow typeof() with clang
2012-03-19 20:37:25 +01:00
Max Kellermann
36827e1134
event_pipe, test: explicitly ignore write() return value
...
Some compilers are very picky, but we really aren't interested in the
return value.
2012-03-19 20:37:25 +01:00
Max Kellermann
351ac4a2c0
command: read arbitrary local files with "lsinfo"
...
Requires UNIX domain socket connection.
2012-03-06 22:23:10 +01:00
Max Kellermann
36fff59a38
client_file: always allow access if client uid equals mpd uid
2012-03-06 22:22:27 +01:00
Max Kellermann
1e60a4386a
playlist_edit: move UID check to client_allow_file()
2012-03-06 22:10:54 +01:00
Max Kellermann
e9f1b53ae6
command, ack: add ack_quark()
...
To pass ack values around.
2012-03-06 22:08:54 +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
Max Kellermann
faf35e6082
command: fix the "DENIED" ACK code
...
Use ACK_ERROR_PERMISSION instead of ACK_ERROR_NO_EXIST.
2012-03-06 21:37:10 +01:00
Max Kellermann
553d4e9283
playlist/soundcloud: use config_dup_block_string()
2012-03-01 20:11:09 +01:00
Robert Vollmert
7cef52478d
A soundcloud playlist plugin.
...
Requires YAJL to build, and this doesn't include the necessary
automake changes. Can be built using
./configure CFLAGS="-I/usr/include/yajl" LIBS="-lyajl" --enable-soundcloud
Add the following to your config:
playlist_plugin {
name "soundcloud"
enabled "true"
apikey "c4c979fd6f241b5b30431d722af212e8"
}
Then you can stream from soundcloud using calls like:
mpc load soundcloud://track/<track-id>
mpc load soundcloud://playlist/<playlist-id>
mpc load soundcloud://url/http://soundcloud.com/some/track/or/playlist
For the last case, you can leave off the http:// or
http://soundcloud.com/ .
2012-03-01 20:11:09 +01:00
Max Kellermann
e7ce362d22
song_update, udp_server: workarounds for gcc 4.1 warnings
...
Annoying false positives.
2012-03-01 20:11:09 +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
9c36e71081
decoder/dsdiff: don't convert to PCM
...
Move the responsibility for the conversion to the PCM library. This
will allow passing the verbatim DSD samples to an output plugin.
2012-03-01 02:05:40 +01:00
Max Kellermann
c9c57af5f7
pcm_convert: support the DSD format
2012-03-01 02:00:12 +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
3b565b5f97
pcm_convert: add method _reset()
...
Resets the libsamplerate state. Not being used yet.
2012-03-01 00:59:53 +01:00
Avuton Olrich
0742976138
win32: Add a Windows OS resource file and icon
2012-02-23 06:32:30 -08:00
Max Kellermann
1a63663c85
Merge remote branches 'jn/ffmpeg' and 'jn/wsp'
2012-02-15 21:49:20 +01:00
Jonathan Neuschäfer
00a20fc8a5
decoder/ffmpeg: always use AV_VERSION_INT
2012-02-15 21:42:52 +01:00
Jonathan Neuschäfer
6ab4fb368c
input/cdio_paranoia: whitespace-fix a comment
2012-02-15 21:22:49 +01:00
Max Kellermann
645663cdfe
Merge branch 'af' of git://git.musicpd.org/jn/mpd
2012-02-15 21:06:53 +01:00
Jonathan Neuschäfer
ee2bcbb41d
decoder/audiofile: fix compiler warnings with libaudiofile 0.3.3
...
This might break older versions, I didn't test.
2012-02-15 20:52:48 +01:00
Jonathan Neuschäfer
12b4ebf8d4
use audio_output_plugins_for_each's plugin iterator
2012-02-15 20:37:29 +01:00
Jonathan Neuschäfer
8da4750ee2
rtsp_client: strncat -> g_strlcat
...
The main difference is that strncat takes the maximum number of
characters to copy as its third argument, while g_strlcat takes
the size of the buffer, which is how the code was using strncat.
Incomplete requests may still be constructed as a result of the
reqest buffer filling up.
2012-02-15 20:37:29 +01:00
Jonathan Neuschäfer
d22df2915c
main: handle negative strtol return value
...
size_t is unsigned most of the time, so we can't really use it to
check for negative values. Also handle strtol overflow.
2012-02-15 20:35:06 +01:00
Jonathan Neuschäfer
e77d96cf89
decoder/sidplay: remove unused variable 'ret'
2012-02-15 20:35:05 +01:00
Max Kellermann
ae28ba84d2
command: move code to protocol/argparser.c
2012-02-14 19:13:04 +01:00
Max Kellermann
b3f3b01958
command: use standard error messages in check_int()
2012-02-14 19:02:11 +01:00
Max Kellermann
52e9cab1c1
command: check for empty string after strtol()
...
An empty string is obviously not a valid integer.
2012-02-14 18:59:41 +01:00
Max Kellermann
1baaaa40cc
command: parse unsigned integers and booleans where applicable
2012-02-14 18:57:43 +01:00
Max Kellermann
b8ed420058
command: move functions to protocol/result.c
2012-02-14 18:57:29 +01:00
Max Kellermann
ed16ee3029
command: eliminate local buffer "unknown"
2012-02-14 18:57:12 +01:00
Max Kellermann
7338b16c18
listen: implement systemd socket activation
2012-02-13 21:32:42 +01:00
Max Kellermann
f529441400
server_socket: add method _add_fd()
2012-02-13 21:32:42 +01:00
Max Kellermann
03664d0426
server_socket: move code to set_fd()
2012-02-13 21:32:42 +01:00