Max Kellermann
c412d6251e
audio_format: changed "bits" to "enum sample_format"
...
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.
2009-12-02 22:29:50 +01:00
Max Kellermann
1dfadf4815
decoder/modplug: count frame position
...
Don't maintain the current time stamp in a floating point variable,
because this is subject to rounding errors.
2009-11-14 22:30:57 +01:00
Max Kellermann
f5b9e3c064
decoder/modplug: floating point division for song duration
...
More exact total time.
2009-11-14 22:27:27 +01:00
Max Kellermann
ff70dbd316
decoder/modplug: check ModPlug_Read() < 0
...
Negative return values are not documented here, but since the function
prototype is signed, let's be sure.
2009-11-14 22:27:04 +01:00
Max Kellermann
719990b1c5
decoder: use audio_format_init_checked()
...
Let the audio_check library verify the audio format in all (relevant,
i.e. non-hardcoded) plugins.
2009-11-14 00:47:22 +01: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
ea616b3ed4
tag: removed the "_ITEM_" suffix from the enum names
2009-10-13 16:12:45 +02:00
David Woodhouse
37754559b8
Add audio_format_init() function
...
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.
2009-07-19 16:54:11 +01:00
Serge Ziryukin
297d749fc8
modplug: get track length
2009-07-15 11:22:45 +02:00
Avuton Olrich
fd90db35b7
decoder: Rename all main decoder plugins functions to *decoder_plugin.
2009-04-02 15:55:10 -07: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
0dc1b4a44e
modplug: removed EOF check from the while loop
...
EOF is checked by input_stream_read() (decoder_read() here). Don't do
it twice. The check was wrong anyway, it was reversed.
2009-01-24 20:02:06 +01:00
Max Kellermann
793934cf9c
modplug: check for input_stream errors
...
When input_stream_read() returns 0, and input_stream_eof() returns
false, an I/O error has occured. Skip this song.
2009-01-24 19:16:33 +01:00
Max Kellermann
14b37656a6
modplug: use size_t instead of int for buffer sizes
2009-01-24 19:16:31 +01:00
Max Kellermann
4a4c6fb6dc
modplug: check size limit before appending new buffer
...
Don't enlarge the GByteArray when the size limit may overflow in this
operation; check the size limit first.
2009-01-24 19:16:20 +01:00
Max Kellermann
b53e80d785
modplug: use GByteArray.len, remove total_len
...
The local variable "total_len" is superfluous because GByteArray
always knows its size.
2009-01-24 19:16:10 +01:00
Max Kellermann
0c71640528
modplug: unknown size is -1; check for empty file
...
The input_stream API sets size to -1 when the size of the resource is
not known. The modplug decoder checked for size==0, which would be an
empty file.
2009-01-24 19:16:07 +01:00
Max Kellermann
961d172200
modplug: header cleanup
...
Don't include utils.h and log.h, they are relics from the past.
2009-01-24 19:16:05 +01:00
Max Kellermann
9229869f04
modplug: define G_LOG_DOMAIN
...
Make sure that log messages are decorated correctly.
2009-01-24 19:15:53 +01:00
Max Kellermann
b381638009
modplug: declare constants as enum
...
Don't write CPP if you can write C.
2009-01-24 19:15:50 +01:00
Max Kellermann
24d4c2df92
modplug: use only decoder_read(), not input_stream_read()
...
You are allowed to call decoder_read() with decoder==NULL. It is a
convenience function provided by the decoder API. Don't manually fall
back to input_stream_read().
2009-01-24 19:15:48 +01:00
Andrzej Rybczak
82df4cb2b0
modplug: change settings before loading a file
...
alternative settings must be set before the file
is loaded, otherwise they won't be respected.
2009-01-24 13:10:02 +01:00
Viliam Mateicka
d838a1ad24
decoder: new plugin using modplug library
2008-12-28 17:11:18 +01:00