Max Kellermann
9716c3a30e
pcm_{channels,resample}: pass channel count as integer, not uint8_t
...
Reduces number of implicit integer conversions.
2011-10-19 22:14:43 +02:00
Max Kellermann
3057d19cdf
pcm_resample_lsr: move common code to lsr_process()
2011-10-08 14:51:26 +02:00
Max Kellermann
14424281a0
pcm_resample: add internal function _lsr_init()
...
Let the libsamplerate code initialize itself.
2011-10-08 13:32:29 +02:00
Max Kellermann
2b3fd0d4d3
pcm_resample: one-time global initialization
...
Load the samplerate_converter on MPD startup. Fail if the converter
name is invalid.
2011-10-08 13:14:29 +02:00
Max Kellermann
c6cbcc2c25
copyright year 2011
2011-01-29 10:13:54 +01:00
Avuton Olrich
9d3865cb95
Update copyright notices.
2009-12-31 20:58:43 -08: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
54889c72e3
pcm_convert: use GError for error handling
...
Don't abort the whole MPD process when the conversion fails. This has
been a denial-of-service attack vector for years.
2009-07-23 12:01:03 +02:00
Max Kellermann
fd81e7e3b6
libsamplerate: use g_ascii_strncasecmp() instead of strncasecmp()
...
strncasecmp() is locale dependent, making it a bad choice for internal
string comparisons.
2009-04-28 09:42:05 +02:00
Max Kellermann
456201fa22
pcm_resample: renamed implementation functions
...
Added diversion functions to pcm_resample.c. These check which
resampler is enabled at compile time (libsamplerate or fallback).
This prepares the following patch.
2009-03-14 15:26:28 +01:00
Max Kellermann
f711198ab3
pcm_resample: return NULL on failure
...
Changed "0" to "NULL".
2009-03-14 14:37:31 +01:00
Avuton Olrich
0aee49bdf8
all: Update copyright header.
...
This updates the copyright header to all be the same, which is
pretty much an update of where to mail request for a copy of the GPL
and the years of the MPD project. This also puts all committers under
'The Music Player Project' umbrella. These entries should go
individually in the AUTHORS file, for consistancy.
2009-03-13 11:51:55 -07: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
0b29a22c08
conf: replaced getConfigParamValue() with config_get_string()
...
Don't return a writable pointer.
2009-01-17 20:23:58 +01:00
Max Kellermann
5e93d3682f
added missing explicit config.h includes
2009-01-08 21:37:02 +01:00
Max Kellermann
bb08679a70
pcm_resample: use pcm_buffer (2/2)
...
Use the PCM buffer library for the libsamplerate output buffer.
2009-01-08 00:47:04 +01:00
Max Kellermann
2a83138913
pcm_resample: use pcm_buffer (1/2)
...
Return a temporary buffer from pcm_resample_*() and pcm_convert().
2009-01-08 00:46:38 +01:00
Max Kellermann
7f34e9410e
pcm: added pcm_convert_deinit(), pcm_resample_deinit()
...
Free memory allocated by libsamplerate when the output or the decoder
is closed.
2009-01-07 22:20:30 +01:00
Max Kellermann
d342e338db
pcm: use GLib instead of utils.h
2009-01-03 14:52:13 +01:00
Max Kellermann
e0fe4eb722
pcm: use GLib logging
2008-12-29 17:28:49 +01:00
Max Kellermann
8b4829c2fe
pcm_resample: support for libsamplerate < 0.1.3
...
libsamplerate 0.1.2 didn't have the 32 bit <-> float conversion
routines. Emulate them in case they aren't supported.
2008-10-24 08:41:34 +02:00
Max Kellermann
af7cb932fb
pcm_resample: implemented 24 bit resampling
...
Similar to pcm_resample_16(), implement pcm_resample_24(). The 24 bit
implementation is very similar, but it uses src_int_to_float_array()
instead of src_short_to_float_array() before sending data to
libsamplerate.
2008-10-23 20:02:51 +02:00
Max Kellermann
5bbcbfb7ce
pcm_resample: moved code to pcm_resample_set()
...
A future patch will implement a 24 bit resampler. To unify code, move
code which can be shared to a separate function.
2008-10-23 20:02:09 +02:00
Max Kellermann
124f79a2a6
pcm_resample: don't resample partial samples
...
Added assertions which ensure that there are no partial samples in the
source buffer.
2008-10-23 20:01:12 +02:00
Max Kellermann
b13d656f81
pcm_resample: don't hard-code sample size
...
Use sizeof(sample) instead of hard-coding "2". Although we're in 16
bit right now, this will make code sharing easier when we support
other sample sizes.
2008-10-23 20:01:08 +02:00
Max Kellermann
6b1c54ef96
pcm_utils: moved code to pcm_resample.c
...
Separate the resampling code from the rest of pcm_utils.c. Create two
sub-libraries: pcm_resample_libsamplerate.c and
pcm_resample_fallback.c.
2008-10-23 20:00:51 +02:00