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
Max Kellermann
5d6e96e986
pulse: removed reconnect interval
...
The output thread automatically waits some time before retrying to
open the device. Don't duplicate this check in the pulse plugin.
2008-11-05 08:10:13 +01:00
Max Kellermann
3defcef5f3
pulse: check if connection is open in pulse_cancel()
...
The pulse plugin crashed with a segmentation fault when the pulse
server was killed.
2008-11-05 08:06:39 +01:00
Max Kellermann
d7b2d93ccc
osx: fix gcc warnings
...
Fix prototypes and unused variables.
2008-11-04 11:26:04 +01:00
Max Kellermann
37696dcbbf
osx: adapt to new output plugin API
...
The OS X output plugin wasn't adapted to the new output plugin yet,
because I had no Mac to test...
2008-11-04 11:19:37 +01:00
Max Kellermann
9074f924e9
alsa: initialize "device" with NULL
...
When using autodetection, AlsaData.device wasn't properly initialized
with NULL. This broke autodetection randomly.
2008-11-03 07:40:54 +01:00
Max Kellermann
aa33422de6
alsa, jack: no const pointers for allocated strings
...
Make the pointers "device" and "name" non-const, so we don't need the
xfree() hack. The default value is expressed as NULL.
2008-11-01 14:04:14 +01:00
Alam Arias
78f60c9c6d
removed unneed check for protocol in shout plugin, will assume icecast2 protocol if not exist in config
2008-10-31 12:20:49 +01:00
Max Kellermann
ea515494cb
added prefix to header macros
...
"LOG_H" is a macro which is also used by ffmpeg/log.h. This is
ffmpeg's fault, because short macros should be reserved for
applications, but since it's always a good idea to choose prefixed
macro names, even for applications, we are going to do that in MPD.
2008-10-31 09:19:53 +01:00
Max Kellermann
9ec695559f
pulse: fix segfault without sink name
...
Commit d692e9 broke configurations without explicit server or sink
configuration. Check for getBlockParam()==NULL.
2008-10-30 17:46:56 +01:00
Max Kellermann
2f76db4c78
output: close device on play error
...
When an output plugin fails to play a chunk, close it. This replaces
various manual close() calls in nearly all plugins.
2008-10-29 20:40:33 +01:00
Max Kellermann
58c5bee9f0
output: use bool for return values and flags
...
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
2008-10-29 20:40:27 +01:00
Max Kellermann
b967702059
pulse: clear pa_simple pointer in pulse_close()
...
The pointer becomes invalid due to pa_simple_free(), which may lead to
segmentation faults when the output is reopened later.
2008-10-29 20:38:20 +01:00
Max Kellermann
d692e925a4
pulse: use GLib instead of util.h/log.h
...
Use GLib allocation and logging functions.
2008-10-29 20:37:36 +01:00
Max Kellermann
38df17546a
pulse: no CamelCase
2008-10-29 20:37:15 +01:00
Max Kellermann
5c4dc8d03c
oss: check and override audio_format properly
...
Don't accept 24 bit audio. Force MPD to use 16 bit if anything other
than 8 or 16 bit is selected.
2008-10-29 18:35:03 +01:00
Max Kellermann
0800c6f4ca
output: don't compile plugins which are disabled
...
Don't compile the sources of disabled output plugins at all.
2008-10-26 21:58:37 +01:00
Max Kellermann
ece8c1347c
renamed src/audioOutputs/ to src/output/
...
Again, no CamelCase in the directory name.
2008-10-26 11:29:44 +01:00