Commit Graph

356 Commits

Author SHA1 Message Date
Max Kellermann
ff1b435232 output/Jack: reorder methods 2017-08-11 12:39:42 +02:00
Max Kellermann
33b4114534 system/fd_util: remove unused library 2017-08-11 09:20:15 +02:00
Max Kellermann
3c7c0515d8 output/oss: use class FileDescriptor 2017-08-10 19:42:23 +02:00
Max Kellermann
df5cc3f0f6 fs/FileSystem: OpenFile() returns UniqueFileDescriptor 2017-08-10 19:34:52 +02:00
Max Kellermann
9a5bcc6db0 net/ServerSocket: pass UniqueSocketDescriptor&& to OnAccept() 2017-08-10 19:20:14 +02:00
Max Kellermann
492b20a89d event/SocketMonitor: use class SocketDescriptor 2017-08-10 19:19:58 +02:00
Max Kellermann
fcfc8bacc0 output/httpd: remove obsolete accept() error check 2017-08-10 19:19:53 +02:00
Max Kellermann
54de8b8e77 net/*, ...: use AF_LOCAL instead of AF_UNIX 2017-08-10 13:12:13 +02:00
Max Kellermann
31bad5f7af output/Interface: convert to abstract class
Yet another C-style vtable replaced with C++.
2017-08-10 09:01:41 +02:00
Max Kellermann
1cf7f3d87c output/Solaris: use class FileDescriptor 2017-08-10 08:56:56 +02:00
Max Kellermann
bea5681fd8 output/Interface: define a new struct AudioOutput
Hide struct FilteredAudioOutput from the plugins, preparing for hiding
MPD's core internals.
2017-08-08 18:58:40 +02:00
Max Kellermann
e11229494e output/Filtered: add method NeedFullyDefinedAudioFormat()
Avoid accessing FilteredAudioFormat attributes directly.
2017-08-08 18:57:59 +02:00
Max Kellermann
ccc0fcb5b7 output/Shout: move ConfigureShoutAudioInfo() call to Open()
Configure the AudioFormat after opening the encoder, because only now
we know the final format.
2017-08-08 18:56:14 +02:00
Max Kellermann
6e24381962 output/Shout: move code to ShoutSetAudioInfo() 2017-08-08 18:56:12 +02:00
Max Kellermann
3ab905644d output/Shout: open the encoder first, then open connection
This order will be necessary for proper AudioFormat initialization,
because the encoder may change the format.
2017-08-08 18:53:04 +02:00
Max Kellermann
f46d545307 output/Shout: pass shout_t* to shout_connect() 2017-08-08 18:52:03 +02:00
Max Kellermann
8134b0073b output/Shout: move write_page() into the struct 2017-08-08 18:47:37 +02:00
Max Kellermann
6ab19c7ef2 output/Shout: pass shout_t* to handle_shout_error() 2017-08-08 18:47:30 +02:00
Max Kellermann
d22361f7c7 output/Shout: remove unnecessary nullptr check 2017-08-08 18:47:02 +02:00
Max Kellermann
47c9d6ac64 output/Internal: rename source to Filtered.cxx 2017-08-07 21:50:13 +02:00
Max Kellermann
d0157af13e filter/Internal: rename struct AudioOutput to FilteredAudioOutput
Prepare to add an abstract class AudioOutput, to be implemented by
plugins, to get rid of the C-style vtable.
2017-08-07 18:47:39 +02:00
Max Kellermann
27d68d8fdd output/Internal: move the Mutex to struct AudioOutputControl
struct AudioOutput should not know or care about multi-threading.
2017-08-07 17:44:46 +02:00
Max Kellermann
dad7d7e798 util/TruncateString: rename CopyString() to CopyTruncateString() 2017-07-05 17:15:58 +02:00
Max Kellermann
4b94ae8040 util/StringUtil: move CopyString() to TruncateString.cxx 2017-07-05 17:11:34 +02:00
Max Kellermann
979f1b6c39 release v0.20.9
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkz5jkQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEubuD/kBXMcV4XawqGNNtSHdrY8CxSL8wJMCMJQl
 aMgRkKLPRml8Hj9FNNG9pjXBuT+qUgPX7t9gBEiT7c+sV3fHH40gUf1js5GIsEPm
 BAVfvww5EhmQWWVhPTLk1iZ4jp6E96mDmIG1znwo7etSZHXU8RJfR7woBi3SPJ9f
 OPcrimskNuWpAWeaEIKi/1Iwzy8d9VK9Ttb73gA3M5zSm7ioXzt3YClpwLRM8JU6
 QeUJchy6VwXnygswjUNmbhPc3GsD2FyUZ4OtJ0hodnqqajfldBxhcHUnQk4zZULr
 1nLSyOuA9bwLuFohH1T6HiY9z8PFzgqdIHvsjOJgZ4gQa69PVNjal2tUEUav9zFv
 aK4LvTVPnIk+hqRbtLpV7/rPKuClrC9BO4oYdBGBDNY4hqVpvRA9obP1s00aOi+K
 UhYqLqg7yeIEeTlUxFOhXJCKAEL69BuXT5ihJtDlB/dCUzv37sEch/4WDgs7uc+O
 9kJYlElvozw57mbczsee/PCSnSWrLCq/qG/bNEUUQOTueWNuifh3PL62UXGgfbEH
 01hJDyLr6ETSmWn7rjTfLJiHThX/EQQvOhs+35fbCyry65z4tFwrilGDmFVUWGPq
 /6QEpY1D6q4fkoma/iWOZoTkfKewatAPGMGWoJaGhCnfQFz4VTFtS2bDtuUctQ16
 jnXnPFxqBw==
 =0SSp
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.9'

release v0.20.9
2017-06-04 12:57:05 +02:00
Max Kellermann
a057b4f6d8 *: add lost of "noexcept" specifications 2017-06-04 12:46:48 +02:00
Max Kellermann
dd29e6e475 output/pulse: add "pause" flag
Don't access AudioOutput::pause.
2017-05-23 11:17:04 +02:00
Max Kellermann
ae4b30a697 output/httpd: add "pause" flag
Don't access AudioOutput::pause.
2017-05-23 11:13:41 +02:00
Max Kellermann
353299168a output/Thread: skip WaitForDelay() after resuming playback
This allows removing the "base.pause" check from the JACK output
plugin, and will allow removing similar accesses from other plugins.
2017-05-23 11:00:28 +02:00
Max Kellermann
59e4f1ee0f *: remove lots of GCC 4.8 fallback code
We can remove those C++11 and C++14 kludges because we require GCC 4.9
now.
2017-05-16 11:29:15 +02:00
Max Kellermann
0a3a5a7c65 Merge branch 'v0.20.x' 2017-05-16 10:09:20 +02:00
Max Kellermann
b3c82f8886 output/{osx,haiku,pulse,sles}: add missing "noexcept"
Fixes build failure on OS X, closes #44.  With the other plugins,
that's not critical, because those use the AudioOutputWrapper, which
hides this problem.
2017-05-16 07:12:30 +02:00
Max Kellermann
c5996c0593 *: add "noexcept" to many, many function prototypes
See commit 71f0ed8b74
2017-05-15 23:05:45 +02:00
Max Kellermann
4faef28cc5 release v0.20.7
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkaFL0QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEr4ID/9iAQC+7fFv06uLOm48Ufu+PgoD8uJkAwF5
 QuLQkc85g9urn+bu9N7Qs7Vypp7aLyGcJKY0jyA8wxkOj24pUC3GYk80daUt561V
 5s20FnoS/Uoman3CSJL94IfCUBxejizE6vgIIHTc5bb6U0qIsPub/8JTTE2Ih7uP
 nvFZ5uBQ+YTc7at+iIH9123eUMKkitkh8osNblovqQT9v42++Tm4ztAytRHBjwUA
 Itew5HhlvahbLKqFs/7vmICh/YX1FcOV7cV+erEWYfkH0KCI2bhSle4u2d0CBOvD
 VJlDnBCo9bM7WKcPYqJiFFFXA0CRk06wbkkkAtwF4zjp8xos7aQcq4FyQnYL8KXo
 5lijIhRwBURBd+nt8oA9kuEhBt/T75otcemJkzVaYappHTJCLjhxSGcPt8mw+nE9
 9WQzsp/MIVzg9l5g3D9S/43xM7uhvn98Tn1Qf2s8YRd2o8CZeOhW+X3RvbCvVPv2
 mOlx4sFAv8DOJ3KxMdqiJT+PmylPyJluQdqH+tMc8BdPg/kpSpYIPTuSjjRqK1yh
 ld5do0HtAAwiHtvXfk5YVFjJSpO0c8yVn6xci2Cl4k/5ZHj2UE1ln+N5vCea2BRF
 2J3HAjROwtcwY3lU1jFnEAogf24KWiFJqhhC0EqBGUdlrM8Dn37P5cEWWjROIMNK
 lPEdovokNw==
 =CdDy
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.7'

release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann
788e3b31e1 *: remove "pure" and "const" attributes from throwing functions
The "pure" and "const" attributes are not so well-defined, and a
recent clang version implements an optimization which pushes the
definition's boundary beyond what I believed it was.  clang now
assumes that functions declared "pure" cannot throw exceptions, even
if they lack the "noexcept" specification.

When compiled with this new clang version, MPD will crash randomly if
an exception happens to get thrown by such as "pure" function
(https://github.com/MusicPlayerDaemon/MPD/issues/41).

This commit removes all such misplaced "pure" and "const" attributes,
closing #41.
2017-05-08 17:25:06 +02:00
Max Kellermann
71f0ed8b74 *: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann
89b900432e output/Internal: move thread-specific stuff to AudioOutputControl
The AudioOutput struct (which is exposed to all plugins) should not be
aware that it's being controlled by another thread.
2017-04-28 22:04:30 +02:00
Max Kellermann
f6e428ac22 Merge branch 'v0.20.x' 2017-04-24 11:44:27 +02:00
Bart Nagel
ccb4f44caf Add support for the OriginalDate tag
See https://picard.musicbrainz.org/docs/mappings/

This tag is useful when the user would like all releases of the same
album to be sorted next to each other.
2017-04-21 09:43:26 -07:00
Bart Nagel
0a7d612f41 Remove some redundant code 2017-04-18 16:10:38 +02:00
Max Kellermann
f85d4d28d1 output/alsa: work around dmix non-blocking snd_pcm_drain() bug
See code comment.  Bug was reported against MPD, but it's really an
alsa-lib bug.

 https://bugs.musicpd.org/view.php?id=4662
2017-03-29 20:36:04 +02:00
Max Kellermann
dae8b78569 output/httpd: copy the Page reference; fixes use-after-free 2017-03-29 20:17:09 +02:00
François Revol
46aa4d2f91 haiku: fix build
Some missing bits when converted to C++ exceptions...
2017-02-20 11:25:00 +01:00
Max Kellermann
512e81c629 output/httpd: use emplace() instead of push() 2017-02-19 20:48:17 +01:00
Max Kellermann
452666f742 output/httpd: wake up the I/O thread only if pages have been read from encoder 2017-02-19 20:46:20 +01:00
Max Kellermann
72008d951b output/httpd: no mutex lock while reading data from encoder 2017-02-19 20:45:16 +01:00
Max Kellermann
72146e7800 output/httpd: use std::lock_guard 2017-02-19 20:43:45 +01:00
Max Kellermann
f7af1bb8e2 output/httpd: cancel the DeferredMonitor in Close() 2017-02-19 20:41:34 +01:00
Max Kellermann
f88f1fca3f output/httpd: move Close() lock into the I/O thread
Fixes a potential deadlock introduced by commit 945287358b
2017-02-19 20:41:06 +01:00
Max Kellermann
26e4a40cc7 output/httpd/Page: use std::shared_ptr instead of class RefCount 2017-02-19 20:17:57 +01:00