Commit Graph

4040 Commits

Author SHA1 Message Date
Viliam Mateicka
406b0403a5 mixer: adding code to optionally disable all hw mixers 2009-03-02 18:57:49 +01:00
Max Kellermann
2f438e5d23 tag_id3: parse ID3 tags in AIFF files
Added a small AIFF parser library, code copied from the RIFF parser
(big-endian integers).  Look for an "ID3" chunk, and let libid3tag
parse it.
2009-03-02 18:12:44 +01:00
Max Kellermann
336f624277 tag_id3: parse ID3 tags in RIFF/WAV files
Added a small RIFF parser library.  Look for an "id3" chunk, and let
libid3tag parse it.
2009-03-02 18:00:46 +01:00
Max Kellermann
72176db429 alsa: fall back to 32 bit samples if 24 is not supported
Some sound chips/drivers (e.g. Intel HDA) don't support 24 bit
samples, they want to get 32 bit instead.  Now that MPD's PCM library
supports 32 bit, add a 32 bit fallback when 24 bit is not supported.
2009-03-02 16:41:38 +01:00
Max Kellermann
a5a15beac2 pcm_convert: added 32 bit support
All PCM sub libraries have 32 bit support now.  Add support to the
glue function pcm_convert().
2009-03-02 16:41:10 +01:00
Max Kellermann
3165e26f9a pcm_format: added conversion from 32 bit
Support converting 32 bit samples to any other supported sample
format.
2009-03-02 16:41:08 +01:00
Max Kellermann
d4e4c57b8d pcm_format: added pcm_convert_to_32()
Added code to convert all other sample formats to 32 bit.
2009-03-02 16:39:54 +01:00
Max Kellermann
d24f2ba5ee pcm_dither: added pcm_dither_32_to_16()
For 32 bit dithering, reuse the 24 bit dithering code, but apply a 8
bit right shift first.
2009-03-02 16:37:11 +01:00
Max Kellermann
78e08f655a pcm_dither: renamed struct pcm_dither_24 to struct pcm_dither
There is nothing 24 bit specific in the pcm_dither_24 struct.  Since
we want to reuse the struct for 32 bit dithering, let's drop the "_24"
suffix from the struct name.
2009-03-02 16:37:05 +01:00
Max Kellermann
d9c1434298 pcm_resample: use 24 bit resampling code for 32 bit samples
Resampling 32 bit samples is the same as resampling 24 bit samples -
both are stored in the int32_t type.
2009-03-02 16:37:00 +01:00
Max Kellermann
1b31f52285 pcm_channels: added implementation for 32 bit samples
Some 24 bit code can be reused.  The 32 bit variant has to use 64 bit
integers, because 32 bit integers could overflow.  This may be a
performance hit on 32 bit CPUs.
2009-03-02 16:36:49 +01:00
Max Kellermann
062f37071c audio_format: allow 32 bit samples
This is the first patch in a series to enable 32 bit audio samples in
MPD.  32 bit samples are more tricky than 24 bit samples, because the
integer may overflow when you operate on a sample.
2009-03-02 15:46:09 +01:00
Max Kellermann
8c0bce0b94 audio_format: allow up to 8 channels
audio_valid_sample_format() verifies the number of channels.  Let's
just say up to 8 channels is allowed (which is possible with some
consumer sound chips).  I don't know if there are bigger cards, and
since I cannot test it, I'll limit it to 8 for now.
2009-03-02 15:43:45 +01:00
Max Kellermann
a1561252d0 directory: directory_load() returns GError
Do error reporting with GLib's GError library in this library, too.
2009-03-02 15:42:42 +01:00
Max Kellermann
c0ffec2fd1 database: db_load() returns GError
Do error reporting with GLib's GError library.
2009-03-02 15:42:21 +01:00
Max Kellermann
eb5b3ce553 database: no CamelCase
Renamed a bunch of variables.
2009-03-02 15:41:44 +01:00
Max Kellermann
b7bfa24f22 pcm_volume: return bool
Don't abort MPD when a sample format is not supported by pcm_volume().
2009-03-02 09:42:16 +01:00
Max Kellermann
0579b6ed27 pcm_volume: no CamelCase 2009-03-01 20:11:41 +01:00
Max Kellermann
4194f4b18b audio_parser: added API documentation 2009-03-01 20:08:48 +01:00
Max Kellermann
f48c58d17b crossfade: fix doxygen tag 2009-03-01 20:05:27 +01:00
Max Kellermann
ba3a8474b6 flac: parse stream tags
Parse the vorbis comments in libflac's metadata_callback and pass them
as tag struct to the decoder API.
2009-03-01 14:07:23 +01:00
Max Kellermann
92db09fdf8 listen: return GError on "unix path too long"
When the unix domain socket path is too long, don't abort with
g_error().
2009-03-01 13:35:44 +01:00
Max Kellermann
f2664e329f listen: removed unused macro BINDERROR() 2009-03-01 13:34:44 +01:00
Max Kellermann
d399d4b63b output_init: removed getBlockParam()
Use config_get_block_string() and manual GError handling instead.
2009-03-01 13:32:42 +01:00
Max Kellermann
f298fcf3a6 output_init: return GError on error
Do error handling with GError instead of aborting with g_error().
2009-03-01 13:31:56 +01:00
Max Kellermann
cb942eeb45 output_init: moved code to audio_output_detect() 2009-03-01 13:31:32 +01:00
Max Kellermann
af66f666c6 audiofile: added 24 bit support
Don't hard code the "bits" parameter to 16.  Try to use the input's
sample format, if possible.
2009-03-01 10:53:46 +01:00
Max Kellermann
614fe8b341 output: removed duplicate debug messages from plugins
The MPD core logs the audio format of all audio outputs.  Remove the
duplicate message from the plugins.
2009-03-01 10:39:42 +01:00
Max Kellermann
e1b79479a5 output_thread: log audio format in a debug message
To aid debugging, print the audio format of the output plugin in a
debug message, and print information about PCM conversion.
2009-03-01 10:37:26 +01:00
Max Kellermann
a81a84eaa4 decoder_api: log audio format in a debug message
To aid debugging, print the audio format of the decoder plugin in a
debug message, and print information about PCM conversion.
2009-03-01 10:31:47 +01:00
Max Kellermann
c0e61687b6 listen: fix windows specific code
During the listen_add_host() API transition, the windows code wasn't
tested, and several removed arguments are still in use there.
2009-03-01 01:49:49 +01:00
Max Kellermann
8c3df4cc83 socket_util: include ws2tcpip.h for getnameinfo()
Windows doesn't have the standard headers sys/socket.h and netdb.h.
2009-03-01 01:35:54 +01:00
Max Kellermann
eb64f6542f daemon: disable daemonize_detach() on WIN32 2009-03-01 01:35:53 +01:00
Max Kellermann
b4f84fab34 configure.ac: make "xmlto" optional
Even when --enable-documentation is passed, don't abort if "xmlto" was
not found.
2009-03-01 01:26:04 +01:00
Max Kellermann
c4626143c9 Makefile.am: fixed xmlto output path
The output path must be ./doc/protocol/, not ./protocol/
2009-03-01 01:15:09 +01:00
Max Kellermann
80571d1b5a tag: convert ignore_tag_items to a bool array 2009-03-01 00:58:32 +01:00
Max Kellermann
6153c86bc3 tag: added API documentation 2009-03-01 00:55:20 +01:00
Max Kellermann
b49518c636 tag: no CamelCase
Renamed functions and variables.
2009-03-01 00:52:02 +01:00
Max Kellermann
ae87abae59 use GLIB_CHECK_VERSION()
Use GLIB_CHECK_VERSION() instead of manually checking
GLIB_MAJOR_VERSION, ...
2009-03-01 00:37:22 +01:00
Max Kellermann
82b081a6db volume: throttle access to hardware mixers
On some hardware, reading the mixer value from hardware is an
expensive operation, and MPD has to do it for every client.  Throttle
access to the hardware, cache the result for one second.
2009-02-28 21:12:15 +01:00
Max Kellermann
ec4fd9fd88 output: use GTimer instead of time_t for reopen after failure
time() is not a monotonic timer, and MPD might get confused by clock
skews.  clock_gettime() provides a monotonic clock, but is not
portable to non-POSIX systems (i.e. Windows).  This patch uses GLib's
GTimer API, which aims to be portable.
2009-02-28 20:43:23 +01:00
Max Kellermann
a5c09c91c4 output: added option to disable audio outputs by default
The option "enabled" is on by default.  If you specify "enabled no" in
an audio_output section, then this device is disabled by default.
2009-02-28 19:40:39 +01:00
Max Kellermann
d29db0111c audiofile: removed duplicate decoder_get_command() calls
decoder_data() returns a decoder_command, no need to call
decoder_get_command() twice after decoder_command().
2009-02-28 19:28:38 +01:00
Max Kellermann
0813092c63 audiofile: refuse to play non-seekable files
If an input_stream is not seekable, libaudiofile fails to play at all:

 Audio File Library: unrecognized audio file format [error 0]

Since we know in advance whether the input_stream is seekable, just
refuse to play on a non-seekable stream.
2009-02-28 19:24:40 +01:00
Max Kellermann
44b55bff89 audiofile: no CamelCase
Renamed several variables and a function.
2009-02-28 19:09:54 +01:00
Max Kellermann
2a69aba7bc Merge branch 'master' of git://git.musicpd.org/avuton/mpd 2009-02-28 17:24:27 +01:00
Avuton Olrich
88793c7189 configure: don't fail if pipe_output is the only output plugin. 2009-02-28 08:13:31 -08:00
Avuton Olrich
731cc8cf08 configure: move id3 and lame to 'Other Features' 2009-02-28 08:09:43 -08:00
Max Kellermann
362cc22558 test: added test program which reads tags from a file 2009-02-28 17:04:37 +01:00
Avuton Olrich
d1d4c3245c configure: don't fail if mp4 is the only enabled input plugin. 2009-02-28 07:55:39 -08:00