Max Kellermann
1c56edd1c8
shout: removed shout_encoder_plugins
...
This array is empty, and is not used anymore.
2009-02-22 17:51:12 +01:00
Max Kellermann
f6e5c00726
shout: use the new encoder API
...
Removed shout's encoder plugin API in favor of the new generic encoder
plugin API.
2009-02-22 17:18:28 +01:00
Max Kellermann
f7c685f1ab
encoder: added lame mp3 encoder
...
This new LAME encoder plugin is based on the existing shout_mp3.c
plugin.
2009-02-22 17:18:03 +01:00
Max Kellermann
3a6619d62c
encoder: added vorbis encoder
...
This new vorbis encoder plugin is based on the existing shout_ogg.c
plugin.
2009-02-22 17:17:26 +01:00
Max Kellermann
a9dde676be
added the encoder API
...
The new generic encoder API will replace shout's custom encoder API.
2009-02-22 17:11:14 +01:00
Max Kellermann
e79a82ba3a
shout: merged open_shout_conn() into my_shout_open_device()
...
The method implementation my_shout_open_device() consists of only one
line, the call to open_shout_conn(). Merge both functions into one.
2009-02-22 15:24:41 +01:00
Max Kellermann
cece6c00f4
shout: bool return values instead of int
...
Return true/false instead of 0/-1.
2009-02-22 15:18:58 +01:00
Max Kellermann
f0554d9a75
pcm: added API documentation
2009-02-21 18:14:20 +01:00
Max Kellermann
cae7c160a3
crossfade: added API documentation
2009-02-20 14:57:32 +01:00
Max Kellermann
91ebf46853
path: don't export path_set_fs_charset()
...
The function path_set_fs_charset() is only used in path.c.
2009-02-20 14:49:57 +01:00
Max Kellermann
09ecfb6567
path: validate configured character set
2009-02-20 12:31:00 +01:00
Max Kellermann
adea76a6ed
decoder_api: fixed shadow warning, rename "wait"
...
The parameter name "wait" overlaps with the POSIX wait() function.
Rename it.
2009-02-19 13:33:06 +01:00
Max Kellermann
e7131b5da2
utils: use g_usleep() instead of my_usleep()
...
Now that I've found this nice function in the GLib docs, we can
finally remove our custom sleep function. Still all those callers of
g_usleep() have to be migrated one day to use events, instead of
regular polling.
2009-02-19 13:33:03 +01:00
Max Kellermann
c228635489
faad: use faacDecFrameInfo instead of NeAACDecFrameInfo
...
Don't use libfaad's internal type names.
2009-02-19 13:29:15 +01:00
Max Kellermann
eac2da635d
added G_LOG_DOMAIN macros to several libraries
...
Define the GLib logging domain in the following libraries: conf,
daemon, event_pipe, log.
2009-02-19 09:24:59 +01:00
Max Kellermann
11e680d640
conf: log the effective configuration file name
...
For better debugging aid when something goes wrong, log the name of
the effective configuration file.
2009-02-19 08:35:22 +01:00
Max Kellermann
0a0736fc4e
log: added log_early_init() for early debug messages
2009-02-19 08:35:20 +01:00
Max Kellermann
84437acffb
Makefile.am: add new headers to $(mpd_headers)
...
I forgot to add these, and this broke "make distcheck".
2009-02-19 08:12:46 +01:00
Peter Colberg
de6cc2691f
mms: fix assertion in input_stream_open
...
Hi,
upon trying to play an MMS stream added to the play list, I got this:
mpd: /tmp/mpd/./src/input_stream.c:85: input_stream_open: Assertion `is->plugin->open == ((void *)0) || is->plugin == plugin' failed.
With the following patch applied, it works perfectly.
Thanks for having implemented MMS support :-).
Best regards,
Peter
2009-02-19 07:34:07 +01:00
Max Kellermann
9f8740a0d6
configure.ac: check ${host_os} instead of ${host}
...
The configure.ac script does not care about the host architecture, it
only cares about the OS. Use ${host_os} instead of ${host} to
simplify the matching expressions.
2009-02-18 23:07:13 +01:00
Max Kellermann
f2717a7139
configure.ac: added AC_CANONICAL_HOST
...
Without AC_CANONICAL_HOST, ${host_os} etc. are not defined.
2009-02-18 23:01:08 +01:00
Max Kellermann
7f701744a7
pcm_volume: optimized pcm_volume_change_24() on i386
...
Added an inline assembly function for the 64 bit multiplication.
Benchmark results on a Pentium II 266 MHz, 512 MB of 24 bit PCM data:
dd if=/dev/zero bs=64k count=8k |
time ./test/software_volume 48000:24:2 >/dev/null
Before this patch 22.94s, after this patch 7.24s.
2009-02-18 22:27:58 +01:00
Max Kellermann
76dc9ac5f9
test: added command line test program for pcm_volume.c
...
This program is a simple utility for debugging and benchmarking the
software volume code.
2009-02-18 22:27:55 +01:00
Max Kellermann
54387d1451
configure.ac: added switch for test programs
...
The switch syntax is "--enable-test". There are no test programs yet.
2009-02-18 19:27:05 +01:00
Max Kellermann
fcf65de46b
mp4ff: always free the mp4ff_read_sample() buffer
...
When mp4ff_read_sample() returns a value bigger than zero, it
guarantees that the buffer is set. Remove the check.
2009-02-18 19:08:52 +01:00
Max Kellermann
5900ea5299
mp4ff: don't allocate seek_table when input is not seekable
...
Don't waste any precious memory when the seek_table cannot be used.
2009-02-18 18:40:40 +01:00
Max Kellermann
8aa3edb6af
mp4ff: include cleanup
...
Don't include limits.h, use GLib constants instead.
2009-02-18 18:40:33 +01:00
Max Kellermann
51c59f6228
mp4ff: use faacDecInit2() to find the AAC track
...
Use faacDecInit2() instead of AudioSpecificConfig() to detect the AAC
track in the MP4 file. This has a great advantage: it initializes the
libfaad decoder, which the caller would normally do anyway - but now
we can go without the AudioSpecificConfig() call. When decoder==NULL
(called from mp4_tag_dup()), fall back to a mp4ff_get_track_type()==1
check, like other audio players do.
2009-02-18 18:39:12 +01:00
Max Kellermann
111c73e701
mp4ff: moved code to mp4_faad_new()
...
Moved the libfaad decoder initialization to mp4_faad_new(), and also
fill the audio_format struct there. This eliminates a little bit of
complexity in mp4_decode().
2009-02-18 18:38:09 +01:00
Max Kellermann
2bc0fabe73
mp4ff: call decoder_initialized() after libfaad initialization
...
Don't wait for the first frame to be decoded. We already have the
sample rate and the channel count from faacDecInit2().
2009-02-18 18:18:29 +01:00
Max Kellermann
47e3eab872
mp4ff: merged mp4_load_tag() into mp4_tag_dup()
...
The function mp4_load_tag() is used only once, and mp4_tag_dup() is a
one-liner. Merge them.
2009-02-18 18:18:25 +01:00
Max Kellermann
9d2f16d827
player_thread: don't drop audio buffers when not seekable
...
When a file is not seekable, MPD dropped the audio buffers before even
attempting to seek. This caused noticable sound corruption. Fix:
first attempt to seek, and only if that succeeds, call
audio_output_all_cancel().
2009-02-17 23:57:10 +01:00
Max Kellermann
4aca1fa493
faad: variable cleanup
...
Make some variables more local, and eliminate superfluous ones.
2009-02-17 23:44:29 +01:00
Max Kellermann
122e0f3338
faad: added source code comments
2009-02-17 23:42:06 +01:00
Max Kellermann
76b0601f6b
faad: faad_decoder_init() returns an audio_format
...
Instead of returning the sample rate and channel count as separate
values, fill an audio_format struct.
2009-02-17 23:35:49 +01:00
Max Kellermann
161bfc4bc0
faad: call decoder_initialized() after libfaad initialization
...
Don't wait for the first frame to be decoded. We already have the
sample rate and the channel count from faacDecInit().
2009-02-17 23:26:51 +01:00
Max Kellermann
a72c7a7b18
faad: removed DECODE_COMMAND_SEEK check
...
The MPD core will never send a SEEK command to a decoder which has
declared to be not seekable.
2009-02-17 23:20:16 +01:00
Max Kellermann
9245bd0c69
input_file, input_curl, icy_metadata: added GLib log domains
...
Define G_LOG_DOMAIN.
2009-02-17 22:58:27 +01:00
Max Kellermann
7b84f1e6b3
faad: use the decoder_buffer library
...
Replace this plugin's own buffer library with the new decoder_buffer
library.
2009-02-17 22:56:42 +01:00
Max Kellermann
7cea5357e3
faad: check the result of adts_find_frame()
...
Instead of checking if the buffer is empty after adts_find_frame(),
check adts_find_frame()'s return value. This is more robust.
2009-02-17 22:56:07 +01:00
Max Kellermann
77db32f8fb
faad: added libfaad wrappers
...
Moved libfaad API quirks to the wrapper functions faad_decoder_init()
and faad_decoder_decode().
2009-02-17 22:54:26 +01:00
Max Kellermann
6a72db22d7
faad: functions return duration, no float pointer
...
Instead of writing the song duration into a float pointer, return it
from the function.
2009-02-17 22:54:01 +01:00
Max Kellermann
e30ba2e4cf
faad: removed length==NULL check in faad_song_duration()
...
There are no callers which pass NULL here.
2009-02-17 22:53:28 +01:00
Max Kellermann
867ae1cf6f
faad: fill buffer in adts_find_frame()
...
All callers of adts_find_frame() use faad_buffer_fill() before that.
Move that faad_buffer_fill() call into adts_find_frame() instead.
adts_find_frame() will get its own logic for on-demand filling.
2009-02-17 22:53:25 +01:00
Max Kellermann
1a9756156e
added the "decoder buffer" library
...
The decoder buffer library may be used by decoder libraries such as
"faad".
2009-02-17 22:39:45 +01:00
Max Kellermann
66b4a3ab2e
faad: converted length check to assertion in adts_check_frame()
...
adts_check_frame() must not be called with a buffer length smaller
than 8. We can eliminate that duplicate check, and convert it into an
assertion.
2009-02-17 19:28:11 +01:00
Max Kellermann
8edd407918
faad: added length check before comparing "ADIF"
...
It's not valid to use the buffer's data without ensuring that the
buffer contains enough data.
2009-02-17 19:27:36 +01:00
Max Kellermann
d75ce5c4a0
faad: renamed internal functions
...
"aac" -> "faad"
2009-02-17 19:27:01 +01:00
Max Kellermann
943b17c99a
wavpack: added GLib log domain
2009-02-17 19:26:36 +01:00
Max Kellermann
656d5c9c7b
pcm_convert: removed pcm_convert_size()
...
The function is unused, since we added the pcm_buffer library.
2009-02-17 19:26:32 +01:00