pulsesink: use G_TYPE_DEFINE to define ring buffer type
authorPhilippe Normand <pnormand@igalia.com>
Thu, 15 Jul 2010 08:10:31 +0000 (10:10 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 4 Aug 2010 15:19:09 +0000 (16:19 +0100)
commit864a52d8aa938fbc308a5bf027cbc4bd8a23d45e
tree370a106ddc93ff7c0e7fd219150f53ad6fb4e228
parentf6240a47731643678e1eb41d63de52bb3514e312
pulsesink: use G_TYPE_DEFINE to define ring buffer type

The existing get_type() implementation is racy, and the
g_type_class_ref() workaround didn't actually work because
it was in the wrong function. Since class creation in GObject
is thread-safe these days (since 2.16), the class_ref workaround
is no longer needed and it is sufficient to ensure the _get_type()
function is thread-safe, which G_TYPE_DEFINE does.

https://bugzilla.gnome.org/show_bug.cgi?id=624338
ext/pulse/pulsesink.c