Commit Graph

7684 Commits

Author SHA1 Message Date
Max Kellermann 044134eba0 pcm/PcmFormat: eliminate local variable "bits" 2014-03-14 20:53:22 +01:00
Max Kellermann 9fa6fa522e pcm/PcmFormat: remove obsolete AllocateFromFloat() overload 2014-03-14 20:53:14 +01:00
Pete Beardmore d0cd98a63a MultipleOutputs: ensure input_audio_format is zero-initialised
-fixes SIGABRT when mpd is started from a previously paused state
-regression introduced by commit: f5a923b9d1:
'OutputAll: convert to class, move instance to class Partition'

-input_audio_format was previously declared using the static modifier
ensuring it was zero-initialised by default
-the current default-initialised input_audio_format contains garbage at
runtime which allows the AudioFormat.IsDefined() 'fail fast' test in
MultipleOutputs::Update to pass and the SIGABRT follows in
AudioOutput::Open when passed the invalid input_audio_format struct
-switching AudioFormat.IsDefined() for AudioFormat.IsValid() is an
alternative workaround
2014-03-14 20:27:21 +01:00
Max Kellermann 88eae9dabb command/{storage,file}: suppress bogus format warnings on WIN32 2014-03-14 08:58:43 +01:00
Max Kellermann f2f1801c25 db/proxy: check connect error before initializing SocketMonitor
Fixes crash bug because mpd_connection_get_async() was called without
a connection.
2014-03-06 13:35:42 +01:00
Max Kellermann a9e351e00d decoder/gme: fix memory leak in container_scan() 2014-03-06 13:12:39 +01:00
Pete Beardmore 9da57e7458 PulseOutputPlugin: avoid locking mainloop object from within mainloop thread
-fixes regression introduced by:
 '8d6fedf8177d0d2ced81e6d93d35c368b2ac69db [PATCH] Mixer: add class MixerListener'
-listener.OnMixerVolumeChanged() called GetVolume() which attempted to acquire
the lock but as per 'pa_threaded_mainloop_lock()' documentation:
This function may not be called inside the event loop thread. Events that are
dispatched from the event loop thread are executed with this lock held
-this patch seperates the underlying action of GetVolume() into a new
GetVolumeInternal() function, to be called only when the lock is already held, as
is the case for the listener.OnMixerVolumeChanged() call
2014-03-05 17:17:41 +00:00
Pete Beardmore 3a3fb98f79 PulseOutputPlugin: set icon name 2014-03-04 15:18:30 +00:00
Max Kellermann 503ed9c331 Merge tag 'release-0.18.9' 2014-03-02 11:46:07 +01:00
Max Kellermann 47ea69233b output/alsa: remove the obsolete Raspberry Pi workaround
Has been superseded by the previous commit.
2014-03-02 11:22:04 +01:00
Max Kellermann a884e37de1 output/alsa: call snd_pcm_prepare() after snd_pcm_drop()
Don't wait for an optimistic write to fail.  This is an improved
workaround for the infamous Raspberry Pi bug (see commit af991765).
It works much better and comes without the negative side effects.  The
old workaround is now obsolete.
2014-03-02 11:12:25 +01:00
Max Kellermann 0102a8665a event/SignalMonitor: fix build failure due to missing signal.h include 2014-03-02 10:21:31 +01:00
Max Kellermann d77c83f4ba Main: auto-configure state file on Android 2014-03-02 00:35:37 +01:00
Max Kellermann 8cf3ac200b Main: use getExternalStorageDirectory() for locating mpd.conf 2014-03-02 00:24:31 +01:00
Max Kellermann 2bf2f34b12 InputPlugin: allow init() to soft-fail
Add enum InputResult which is a tri-state.  Input plugins may now fail
and just become unavailable.
2014-03-02 00:17:32 +01:00
Max Kellermann 7453c26ec4 thread/Name: fall back to prctl() 2014-03-01 23:58:59 +01:00
Max Kellermann b059ba69d6 output/sles: support stereo 2014-03-01 23:05:44 +01:00
Max Kellermann 36ca57a54e fs/StandardDirectory: add GetUserCacheDir()
Move code from CreateConfiguredDatabase() and add XDG support.  This
implements an automatic Linux fallback for the setting "db_file" if
none was specified.
2014-03-01 22:51:51 +01:00
Max Kellermann b8f1850bba db/Configured: store database file in cache directory
Add class Context which wraps the Android/Java Context class and add a
JNI wrapper for method Context.getCacheDir().
2014-03-01 22:20:28 +01:00
Max Kellermann 5268f55344 java/File: add method ToAbsolutePath() returning AllocatedPath 2014-03-01 20:53:39 +01:00
Max Kellermann e44c9a000d android/Environment: fix copyright header
Stole my own code from another project :-)
2014-03-01 20:22:22 +01:00
Max Kellermann 07c1ba1f5e TagId3: disable charset conversion without GLib 2014-03-01 19:18:50 +01:00
Max Kellermann 14168eadb2 Main: inline mpd_main() on Android 2014-03-01 19:09:31 +01:00
Max Kellermann 58771fc41c Android: obtain music directory from Environment.getExternalStoragePublicDirectory() 2014-03-01 18:48:20 +01:00
Max Kellermann 1e06c66c77 java: new helper library for the Android port 2014-03-01 18:48:20 +01:00
Max Kellermann c73771e3ce Main: load mpd.conf from /sdcard/ on Android
Hard-coded path.  Will be replaced soon.
2014-03-01 18:48:20 +01:00
Max Kellermann 350d2bcd6e storage/Configured: fix fallback music directory
This was accidently disabled when storage plugins were introduced.
2014-03-01 18:45:09 +01:00
Max Kellermann 7ccc609da2 db/update/ExcludeList: make no-op if GLib is disabled
Quick hack to allow using the database without GLib (for Android).
2014-03-01 08:16:13 +01:00
Max Kellermann 4ba7427fa0 util/{Const,Writable}Buffer: add operator[] 2014-03-01 07:49:13 +01:00
Max Kellermann 9dc5335e3e util/{Const,Writable}Buffer: add template specialization for "void"
Omit a few methods that are not applicable.
2014-03-01 07:37:58 +01:00
Max Kellermann d333de1980 util/ConstBuffer: remove cast operator ConstBuffer<void>
This was bugged, because it did not scale the "size".
2014-03-01 07:37:20 +01:00
Max Kellermann 96afa8bd2b command: add command "listfiles"
Lists files and directories.  Supports storage plugins.
2014-03-01 06:25:57 +01:00
Max Kellermann 20cdab5546 DatabasePrint: move code to PrintDirectoryURI() 2014-02-28 08:21:34 +01:00
Max Kellermann 6765234b60 DatabasePrint: add API documentation 2014-02-28 08:17:25 +01:00
Max Kellermann 4c27898ce7 {Other,Database}Commands: contract declaration and assignment 2014-02-28 07:12:04 +01:00
Max Kellermann d34ae0850c AllCommands: "findadd" requires the "add" permission 2014-02-27 23:08:22 +01:00
Max Kellermann e9a85aa4e4 db/simple: mount points
A SimpleDatabase instance can now "mount" other Database instances at
certain locations.  This is used to use a new SimpleDatabase instance
for each storage mount (issued with the "mount" protocol command).
Each such instance has its own database file, stored in the directory
that is specified with the "cache_directory" option.
2014-02-27 20:49:13 +01:00
Max Kellermann 2a16fc74fd CompositeStorage: add method GetMount() 2014-02-27 20:49:13 +01:00
Max Kellermann f65254680a db/update/Queue: use std::list instead of std::queue
The problem with std::queue is that it doesn't give us enough control.
The method Clear() is a kludge already, but soon, we'll need
filtering.
2014-02-27 20:49:13 +01:00
Max Kellermann d64edb6896 db/simple: GetRoot() returns reference 2014-02-27 19:29:10 +01:00
Max Kellermann 3f9ad8e104 db/update/Service: allocate UpdateWalk dynamically 2014-02-27 18:04:24 +01:00
Max Kellermann 1c772ef699 Playlist: use the Error library to return errors 2014-02-27 17:27:23 +01:00
Max Kellermann 809b89b5af Playlist*: move to queue/ 2014-02-27 17:12:42 +01:00
Max Kellermann 681e012fb5 db/update: cancel the update on shutdown 2014-02-27 16:58:35 +01:00
Max Kellermann 3be36643a1 db/UpdateGlue: rename to Service.cxx 2014-02-27 16:14:10 +01:00
Max Kellermann 21e19ef69f db/simple/Directory: eliminate method LookupSong()
Move to SimpleDatabase::GetSong() to give that method more control.
2014-02-26 20:10:31 +01:00
Max Kellermann 69a42fc901 db/simple/Directory: LookupDirectory() return remaining URI
Code can now be reused in LookupSong().
2014-02-26 19:50:46 +01:00
Max Kellermann 525789cd36 db/simple/Directory: make variables more local 2014-02-26 19:50:36 +01:00
Max Kellermann 367d660c08 db/Directory: add DEVICE_* documentation 2014-02-26 10:00:38 +01:00
Max Kellermann 4d73e4d605 db/simple: create dedicated directory 2014-02-26 09:17:41 +01:00