def get_sink_by_name(bus, core, sink_name):
    """Get sink object for the given sink name."""
    for sink_path in core.Get('org.PulseAudio.Core1', 'Sinks'):
        sink = bus.get_object("org.PulseAudio.Core1.Device", sink_path)
        if sink_name == sink.Get('org.PulseAudio.Core1.Device', 'Name'):
            return sink