Commit Graph

4850 Commits

Author SHA1 Message Date
Viliam Mateicka 5420f9ae76 encoder: introducing flac encoder plugin 2009-11-17 19:41:35 +01:00
Max Kellermann 39404725f0 output/openal: use audio_format_to_string() 2009-11-15 16:20:20 +01:00
Max Kellermann 5d1e5f4ea0 crossfade: use audio_format_valid() in assertion 2009-11-15 15:39:29 +01:00
Max Kellermann 5184476682 valgrind.suppressions: added entry for g_main_context_default() 2009-11-14 23:51:49 +01:00
Max Kellermann 141cbc60b9 decoder/audio: eliminate the "bits" variable
Pass the audiofile_setup_sample_format() result to
audio_format_init_checked().
2009-11-14 23:35:37 +01:00
Max Kellermann 2c1fb48318 decoder/audiofile: moved code to audiofile_setup_sample_format() 2009-11-14 23:22:14 +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 dd4625ce13 decoder/mikmod: 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 02:24:42 +01:00
Max Kellermann 1648c7aa5b decoder/mikmod: sample rate is configurable
The new option "sample_rate" sets the sample rate for libmikmod.
2009-11-14 02:24:42 +01:00
Max Kellermann edaf017908 decoder/mikmod: set drv_name and drv_version from PACKAGE/VERSION 2009-11-14 02:24:42 +01:00
Max Kellermann 2c7bf61e68 decoder/mikmod: no CamelCase 2009-11-14 02:07:41 +01:00
Max Kellermann 7efb548921 decoder/mikmod: removed the struct mod_Data 2009-11-14 02:07:41 +01:00
Max Kellermann 0c5329aedc decoder/mikmod: merged open()/close() into decode()
These functions are trivial, we don't need them separate.
2009-11-14 02:07:41 +01:00
Max Kellermann 2d236e281f decoder/mikmod: static mod_Data object
Don't allocate this object, put it on the stack.
2009-11-14 02:07:41 +01:00
Max Kellermann a6fd5819f9 doc: added decoder plugin reference 2009-11-14 02:06:23 +01:00
Max Kellermann cef5dcc0a1 audio_format: added function audio_format_to_string()
Unified function for converting an audio_format object to a string,
for log messages and for the "status" command.
2009-11-14 01:15:26 +01:00
Max Kellermann e5b119a324 autogen.sh: allow two minor digits in automake version 2009-11-14 01:15:26 +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 f47bb8c1db audio_check: checker functions for audio_format attributes
These functions are a wrapper for audio_valid_X().  On error, they
return a GError object.
2009-11-14 00:47:19 +01:00
Max Kellermann 873025a495 decoder/sidplay: correctly calculate floating point time
Internally, use only the integer time.  When needed, convert it to a
floating point seconds value.
2009-11-14 00:46:30 +01:00
Max Kellermann 409a3ed808 player_thread: corrected two assertions on "queued"
At this point, the function may be called from the SEEK handler.
2009-11-14 00:45:52 +01:00
Max Kellermann 76283c25a5 player_thread: initialize chunk->times in silence generator
When waiting for the decoder to provide more data, the player thread
generates silence chunks if needed.  However, it forgot to initialize
the chunk.times attribute, which had now an undefined value.  This
patch sets it to -1.0, meaning "value is undefined".  Add a ">= 0.0"
check to audio_output_all_check().  This fixes spurious relative
seeking errors, because sometimes, the "elapsed" value falls back to
0.0.
2009-11-12 18:41:25 +01:00
Max Kellermann b9866e43d3 player_control: hold lock while reading status 2009-11-12 18:40:36 +01:00
Max Kellermann 9947b82cad added .#* to .gitignore
Temporary editor files.
2009-11-12 18:39:40 +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 8068fd5228 decoder/vorbis: fixed gcc "signed" warning 2009-11-12 09:16:34 +01:00
Max Kellermann b9c610ac87 directory: include config.h
*sigh* another Large File breakage.  ino_t/dev_t this time.  We need
to include config.h in directory.h to get this straight.
2009-11-11 23:36:36 +01:00
Max Kellermann 59189160e3 decoder/wavpack: allow more than 2 channels
Remove the OPEN_2CH_MAX option.  MPD's support for surround sound is
still clunky, but we're working on it.
2009-11-11 23:03:20 +01:00
Max Kellermann ee5d3337a7 decoder/wavpack: activate 32 bit support
MPD has been supporting 32 bit samples since version 0.15.  This patch
changes one check, and removes the 32->24 conversion code.

Note that WavPack floating point samples have 32 bits, and MPD doesn't
have a special check for floating point - therefore, this WavPack
plugin still returns 24 bit integer samples as before (until we have
float support in the MPD core).
2009-11-11 21:49:00 +01:00
Max Kellermann 4c6a8e3ca5 decoder/vorbis: initialize before entering the loop
Call decoder_initialize() before entering the loop.  We don't need to
call ov_read() before ov_info().  When the stream number changes,
check if the audio format is still the same.
2009-11-11 21:34:55 +01:00
Max Kellermann 4f38cc9cae decoder/vorbis: moved error strings to vorbis_strerror() 2009-11-11 21:12:10 +01:00
Max Kellermann dfc09a37c9 decoder/vorbis: removed the OggCallbackData typedef
Use the struct name instead.
2009-11-11 21:09:08 +01:00
Max Kellermann 8588c21689 decoder/vorbis: fix typo in comment 2009-11-11 21:09:08 +01:00
Max Kellermann 2decc65b45 decoder/vorbis: removed redundant "bits" initialization
This is done by audio_format_init().
2009-11-11 21:03:04 +01:00
Max Kellermann 0fb877740b decoder/flac: check "seekable" in libFLAC callbacks
Return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED if this input
stream does not support seeking.
2009-11-11 21:02:52 +01:00
Max Kellermann 37181c9181 decoder/flac: moved code to flac_data_get_audio_format()
Remove the audio_format attribute, add "frame_size" instead.  The
audio_format initialization and check is moved both to
flac_data_get_audio_format().
2009-11-11 20:44:21 +01:00
Max Kellermann 08b139f37c decoder/flac: use stream_info instead of audio_format
Use the sample rate stored in the stream_info struct instead of the
audio_format struct.
2009-11-11 20:36:53 +01:00
Max Kellermann 3973aeecd2 decoder/flac: use frame header instead of audio_format
When calculating the properties of the frame, use sample_rate and
other information from the frame header instead of the stored
audio_format object.
2009-11-11 20:36:46 +01:00
Max Kellermann 5b2d32b499 decoder/oggflac: moved stream_info check to oggflac_decode() 2009-11-11 20:36:21 +01:00
Max Kellermann e0d5ee0045 decoder/flac: calculate time stamp from current frame
Don't update a float timestamp, this will make imprecisions add up
after a while.  We already have the number of the current frame, let's
just calculate the float timestamp from that for every decoder_data()
command.  For this, we need to add the attribute "first_frame", for
CUE sheet songs.
2009-11-11 20:18:39 +01:00
Max Kellermann d35efddd65 decoder/flac: calculate bit rate in flac_common_write()
Removed the "bit_rate" attribute from the flac_data struct.  Pass the
number of bytes since the last call to flac_common_write(), and let
it calculate the bit rate.
2009-11-11 19:52:14 +01:00
Max Kellermann 7b13776f2d decoder/flac: store the whole stream info object, not duration
We don't want to work with floating point values if possible.  Get the
integer number of frames from the FLAC__StreamMetadata_StreamInfo
object, and convert it into a float duration on demand.  This patch
adds a check if the STREAMINFO packet has been received yet.
2009-11-11 19:25:15 +01:00
Max Kellermann f937ec9a7c decoder/flac: merge code into flac_decoder_initialize()
Wrapper for FLAC__stream_decoder_process_until_end_of_metadata(),
decoder_initialized().
2009-11-11 19:08:10 +01:00
Max Kellermann a3f5284dc6 decoder/flac: merged code into flac_decoder_new()
Convenience wrapper for FLAC__stream_decoder_new() and
FLAC__stream_decoder_set_metadata_respond().
2009-11-11 19:07:30 +01:00
Max Kellermann 4a8cc87b4d decoder/flac: free the "pathname" variable earlier
Free the pointer right after its last use, i.e. after the
FLAC__stream_decoder_init_file() call.
2009-11-11 19:05:24 +01:00
Max Kellermann 183725733a decoder/flac: emulate FLAC__stream_decoder_init_stream()
Remove the wrapper flac_init().
2009-11-11 18:08:22 +01:00
Max Kellermann 3c1bacbdbc decoder/flac: use the new API functions
Use the type and function names of the libFLAC 1.1.3 API.  Map the new
API to the old one with macros.
2009-11-11 17:59:46 +01:00
Max Kellermann d5ed23438a decoder/flac: removed the fake flac_ogg_init() fallback
Don't even try to call it with an old libFLAC API.
2009-11-11 17:01:14 +01:00