Max Kellermann
d47be76ce0
null: added option to disable timer synchronization
...
The null plugin synchronizes the playback so it will happen in real
time. This patch adds a configuration option which disables this: the
playback will then be as fast as possible. This can be useful to
profile MPD.
2009-01-22 16:06:47 +01:00
Max Kellermann
0122510f2c
null: implemented finish() method
...
Free memory in the finish() method to make valgrind happy.
2009-01-22 16:06:45 +01:00
Max Kellermann
e1707c7ba3
null: no CamelCase
...
Renamed functions and variables.
2009-01-22 16:06:43 +01:00
Max Kellermann
65f2386b39
conf: added config_get_block_unsigned()
...
Eliminate some more getBlockParam() invocations.
2009-01-18 19:45:51 +01:00
Max Kellermann
a531a1e650
conf: added config_get_block_string()
...
This replaces lots of getBlockParam() invocations.
2009-01-18 19:37:27 +01:00
Max Kellermann
73e466cfef
jack: parse "ports" setting with g_strsplit()
...
Don't modify the configured string.
2009-01-18 19:24:14 +01:00
Max Kellermann
86f6233f46
jack: use audio_output_get_name()
...
Determine the audio output name with audio_output_get_name() instead
of obtaining the name from the configuration again.
2009-01-18 19:17:52 +01:00
Max Kellermann
7acc62366c
conf: replaced getBoolBlockParam() with config_get_block_bool()
...
No "force" parameter, pass a default value instead.
2009-01-17 20:23:56 +01:00
Max Kellermann
4d472c265e
conf: no CamelCase, part I
...
Renamed functions, types, variables.
2009-01-17 20:23:27 +01:00
Max Kellermann
106bfaa726
oss: evaluate the oss_open() return value properly
...
It returns bool, not int.
2009-01-16 17:11:18 +01:00
Antoine Beaupré
b7fe09fa52
shout: enlarge buffer size to 32 kB
...
I was having problems with shoutcast stream outputs before applying
the attached patch, which enlarges the shoutcast output
buffer. Ideally, this should be configurable, but this resolves the
issue for my needs.
2009-01-14 23:28:26 +01:00
Viliam Mateicka
11c29cccb3
Introducing mixer api
...
This patch tryes to introduce pluggable mixer (struct mixer_plugin) along with some basic infrastructure (mixer_* functions). Instance of mixer (struct mixer) is used in
alsa and oss output plugin
2009-01-10 17:55:38 +01:00
Max Kellermann
5e93d3682f
added missing explicit config.h includes
2009-01-08 21:37:02 +01:00
Max Kellermann
b40428b3fd
pcm_utils: moved conversion code to pcm_convert.c
...
All what's left in pcm_utils.h is the pcm_range() utility function,
which is only used internally by pcm_volume and pcm_mix.
2009-01-07 18:53:36 +01:00
Max Kellermann
d9c2960a55
fix G_BYTE_ORDER check
...
"#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
2009-01-05 12:40:57 +01:00
Max Kellermann
ac0fe98ffb
use GLib byte order macros
2009-01-05 08:17:22 +01:00
Viliam Mateicka
1a04e57168
renaming mixer.h to mixer_api.h
2009-01-04 19:15:18 +01:00
Max Kellermann
2189796b96
null, fifo: use GLib instead of utils.h
2009-01-03 14:51:34 +01:00
Max Kellermann
59067e6a92
ao: use g_strsplit() instead of strtok_r()
...
g_strsplit() is more portable than strtok_r().
2009-01-03 13:20:12 +01:00
Max Kellermann
1183236797
alsa: use GLib instead of utils.h
2009-01-02 17:56:08 +01:00
Max Kellermann
051e906d85
jack: use GLib instead of utils.h
2009-01-02 17:23:10 +01:00
Max Kellermann
1fe129330e
jack: duplicate jack_get_ports() return values
...
JACK documentation states: "The caller is responsible for calling
free(3) any non-NULL returned value."
This does not seem to include the array elements. Duplicate them
after jack_get_ports(), and free only the array. Convert
JackData.output_ports to non-const.
2009-01-02 17:23:00 +01:00
Max Kellermann
7dfe301b54
output plugins: don't include gcc.h
...
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2009-01-01 18:08:29 +01:00
Max Kellermann
0734acf392
null: don't include gcc.h
...
Use GLib's G_GNUC_UNUSED instead of macros from gcc.h.
2009-01-01 18:00:46 +01:00
Viliam Mateicka
9a70c4d06d
Moving mixers to audio outputs
2008-12-31 16:46:41 +01:00
Max Kellermann
ef308d9644
alsa: use GLib logging
2008-12-29 17:29:42 +01:00
Max Kellermann
74d4ec7fbb
jack: use GLib logging
2008-12-29 17:29:36 +01:00
Max Kellermann
eddf5e1e5e
fifo: use GLib logging
2008-12-29 17:29:31 +01:00
Thomas Jansen
c15ac57271
osx_plugin: migrate from pthread to glib threads
2008-12-28 22:09:42 +01:00
Viliam Mateicka
d96cda95a1
shout: fixed bad error message printout
2008-12-23 18:05:25 +01:00
Emanuele Giaquinta
213c021eac
Remove useless statement.
2008-12-17 16:49:33 +01:00
Emanuele Giaquinta
25c04a97d3
Remove useless computation. After the pthread_cond_wait loop there are at least MIN(od->bufferSize, size) free bytes in the buffer. Thus MIN(od->bufferSize - od->len, size) is always equal to MIN(od->bufferSize, size).
2008-12-17 15:56:43 +01:00
Emanuele Giaquinta
c584d6b087
Remove useless statement, curpos is initialized at the beginning of the loop.
2008-12-17 15:56:43 +01:00
Emanuele Giaquinta
c36a6b0aee
Factor computation.
2008-12-17 15:56:43 +01:00
Emanuele Giaquinta
a4f0c7b457
Use MIN.
2008-12-17 15:56:43 +01:00
Emanuele Giaquinta
df80ae86ee
Call CloseComponent after AudioUnitUninitialize.
2008-12-17 15:56:43 +01:00
Max Kellermann
0dab2c5bc1
ao: use 16 bit sample format
...
There have been bug reports on MPD regarding 24 bit output via
libao/esd. The "ao" plugin does not attempt fall back to 16 bit
currently, and thus fails to play 24 bit audio (i.e. all mp3 files).
Make it always use 16 bit samples for now, until more bits are
well-tested.
2008-12-09 07:39:24 +01:00
Max Kellermann
4288cc069a
osx: use 16 bit sample format
...
The OS X output does not seem to support 24 bit audio in the way MPD
implements it currently. Fall back to 16 bit for now, and schedule
24 bit support on OS X for MPD 0.15.
2008-12-08 23:23:37 +01:00
Max Kellermann
a4512d3b9a
osx: use GLib instead of utils.h/log.h
...
One my_usleep() invocation remains, until we find out if we can delete
it.
2008-12-08 23:23:30 +01:00
Max Kellermann
b0f46c2076
osx: don't use void pointer in arithmetic
...
Cast AudioBuffer.mData to a "unsigned char*" before adding "curpos".
This fixes a gcc warning.
2008-12-08 23:23:28 +01:00
Max Kellermann
4ca24f22f1
alsa: reverted the default buffer_time to 500 ms
...
Commit dd7711d8
removed MPD's default ALSA buffer_time. The result
was a buffer size which was way too small for playing streams on some
sound hardware, and caused skips and distorted sound. Revert the
default to 500 ms.
2008-12-01 22:37:05 +01:00
Max Kellermann
f600f4a256
shout: fixed the lame input buffer allocation
...
"float (*lamebuf)[2] = g_malloc()" does NOT allocate two float*
buffers. The formula is even wrong: it should be applied to LAME's
output buffer, not its input buffer.
Converted "lamebuf" to the two variables "left" and "right", and
allocate them independently with the exact buffer size. Set
right=left if mono output is configured.
2008-11-30 14:25:56 +01:00
Max Kellermann
a7b692a1df
shout_mp3: cast input buffer to int16_t*
...
It's easier to work with an int16_t* pointer here.
2008-11-30 14:21:40 +01:00
Max Kellermann
0277921e6a
oss: use GLib instead of utils.h/log.h
2008-11-25 17:43:28 +01:00
Max Kellermann
b76f7b769c
mvp: use GLib instead of utils.h/log.h
2008-11-25 17:37:12 +01:00
Max Kellermann
be60ff83f7
shout: use GLib instead of utils.h/log.h
2008-11-25 17:25:41 +01:00
Max Kellermann
125dad7119
shout: don't check HAVE_SHOUT
...
If the shout plugin is disabled, shout_plugin.c isn't compiled at all,
no need to check the macro definition.
2008-11-25 17:19:42 +01:00
Max Kellermann
c570aa20fa
ao: print error message when ao_open_live() fails
...
When ao_open_live() failed, MPD would ignore the error code in
"errno". Make it print a meaningful error message.
2008-11-25 16:18:06 +01:00
Max Kellermann
423276a384
ao: support all libao error codes
...
The function audioOutputAo_error() did not implement all possible
libao error codes. Support the rest of them, and fall back to
strerror().
2008-11-25 16:17:48 +01:00
Max Kellermann
ffc604498e
ao: use GLib instead of utils.h/log.h
2008-11-25 16:10:01 +01:00