freebsd-ports/graphics/rawtherapee/files/patch-rtgui_soundman.cc
Matthias Andree 5f2354dbbc Update to new 5.0-gtk3 release (synch with graphics/rawtherapee-devel)
Changes:    <http://rawtherapee.com/blog/rawtherapee-5-released>

Due to GCC issues on i386 with stack misalignment for SSE2 instructions,
use the base system clang there, and use GCC 5+ on amd64.  Since i386
has no OpenMP support, even clang 3.4 in FreeBSD 10.3 is good enough.

Note that the cache directory suffix, which used to be 4.1, is now
empty, so the cache directory is now ~user/.cache/RawTherapee.
~user/.cache/RawTherapee4.1 should be renamed before the start, or
removed.

Miscellaneous cleanups all over the place.
2017-01-28 22:24:39 +00:00

22 lines
651 B
C++

--- rtgui/soundman.cc.orig 2017-01-26 22:12:22 UTC
+++ rtgui/soundman.cc
@@ -24,9 +24,7 @@
#ifdef WIN32
#include <windows.h>
#include <mmsystem.h>
-#endif
-
-#ifdef __linux__
+#elif !defined(__APPLE__)
#include <canberra-gtk.h>
#endif
@@ -67,7 +65,7 @@ void SoundManager::playSoundAsync(const
wchar_t *wfilename = (wchar_t*)g_utf8_to_utf16 (sound.c_str(), -1, NULL, NULL, NULL);
PlaySoundW(wfilename, NULL, sndParam);
g_free( wfilename );
-#elif defined(__linux__)
+#elif !defined(__APPLE__)
ca_context_play(ca_gtk_context_get(), 0, CA_PROP_EVENT_ID, sound.c_str(), CA_PROP_MEDIA_FILENAME, sound.c_str(), NULL);
#endif
}