| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Remove GLib dependency from some headers.
|
|
|
|
|
|
|
| |
DSD-over-USB should not be a MPD core format, because it is not a
"natural" format; it is just a temnporary over-the-wire format. This
format has been implemented in pcm_export, and does not need to be
supported by pcm_convert.
|
|
|
|
|
|
| |
For simplicity, the MPD core should not have to deal with packing. It
is rarely used, and those plugins that need it should use the
pcm_export library instead.
|
|
|
|
|
|
| |
For simplicity, pad the dCS samples to 32 bit. Packed 24 bit samples
are rarely used. This patch does not include a real code change,
because there is no user of DSD_OVER_USB yet.
|
|
|
|
|
|
| |
Eliminate support for reverse endian samples from the MPD core. This
moves a lot of complexity to the plugins that really need it (only
ALSA and CDIO currently).
|
|
|
|
|
| |
This format is unused since the DSDIFF decoder plugin now reverses the
bit order.
|
| |
|
|
|
|
|
| |
Basic support for Direct Stream Digital. No conversion yet, and no
decoder/output plugin support.
|
|
|
|
|
| |
Support for conversion from float to 16, 24 and 32 bit integer
samples.
|
| |
|
|
|
|
|
| |
This function is not critical for performance, and the inline
expansion looks too expensive.
|
|
|
|
| |
For better optimization.
|
|
|
|
|
| |
Cast to enum sample_format. Without the cast, it's just a plain
integer, and gcc cannot know that a "case" statement is missing.
|
|
|
|
| |
To be used in fixed-size arrays.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
Makefile.am
NEWS
configure.ac
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
| |
This patch prepares support for floating point samples (and probably
other formats). It changes the meaning of the "bits" attribute from a
bit count to a symbolic value.
|
|
|
|
|
| |
Unified function for converting an audio_format object to a string,
for log messages and for the "status" command.
|
|
|
|
|
|
| |
An asterisk means that this attribute should not be enforced, and
stays whatever it used to be. This way, some configuration values
work like masks.
|
|
|
|
|
|
|
| |
Calculate the total play time with the audio_format object each time,
using audio_format_time_to_size(). The function
audioFormatSizeToTime() is not needed anymore, and will be removed
with this patch.
|
| |
|
|
|
|
|
| |
This line was missing in the reverse_endian patch, and led to
undefined values and crashes in that attribute.
|
| |
|
|
|
|
|
| |
It makes no difference right now, but we're about to add an endianness
flag and will want to make sure it's correctly initialised every time.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
In addition to audio_format_valid(), provide functions which validate
only one attribute of an audio_format. These functions are reused by
audio_format_parse().
|
| |
|
|
|
|
|
|
|
| |
"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.
|
|
|
|
|
|
|
| |
A frame contains one sample per channel, thus it is sample_size *
channels. This patch includes some cleanup for various locations
where the sample size for 24 bit audio was still 3 bytes (instead of
4).
|
|
|
|
|
| |
The last bit of CamelCase in audio_format.h. Additionally, rename a
bunch of local variables.
|
|
|
|
| |
"bits" and "channels" cannot be negative.
|
|
|
|
| |
"bool" should be used in C99 programs for boolean values.
|
|
|
|
|
|
| |
Since we use a C99 compiler now, we can assert that the C99 standard
headers are available, no need for complicated compile time checks.
Kill mpd_types.h.
|
|
|
|
|
| |
Do full C99 integer type conversion in all modules which were not
touched by Eric's merged patch.
|
|
|
|
|
|
| |
The inline function audio_format_sample_size() calculates how many
bytes each sample consumes. This function already takes into account
that 24 bit samples are 4 bytes long, not 3.
|
|
|
|
|
|
|
|
|
| |
audio_format_clear() sets an audio_format struct to an cleared
(undefined) state, which is both faster and smaller than memset(0).
audio_format_defined() checks if the audio_format struct actually has
a defined value (i.e. non-zero). Both can be used to avoid pointers
to audio_format, replacing the "NULL" value with an "undefined"
audio_format.
|
|
|
|
|
| |
Rename it to audio_format_equals() and return "true" if they are
equal.
|
|
|
|
|
|
| |
Due to clumsy layout, the audio_format struct took 12 bytes. Move the
"channels" to the end, so it can be merged into the same 32 bit slot
as "bits", which reduces the struct size to 8 bytes.
|
|
|
|
|
| |
Get rid of CamelCase, and don't use a typedef, so we can
forward-declare it, and unclutter the include dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
volatile provides absolutely no guarantee thread-safety in SMP
environments. volatile was designed to access memory locations
in peripheral hardware directly; not for SMP. If volatile is
needed to work properly on SMP, then it is only hiding subtle
bugs.
volatile only prevents the /compiler/ from making optimizations
when accessing variables. CPUs do their own optimizations at
runtime so it cannot guarantee registers of CPUs are flushed
to memory cache-coherent access on different CPUs.
Furthermore, the thread-communication via condition variables
between threads sharing audio formats already results in memory
barriers.
|
|
|
|
|
| |
Make the code more readable by hiding big formulas in an inline
function with a nice name.
|
|
We want to expose the AudioFormat structure to plugins; remove some
clutter by moving its declaration to a separate header file.
|