code: def connect(self, autospawn=False, wait=False):
  		'''Connect to pulseaudio server.
  			"autospawn" option will start new pulse daemon, if necessary.
  			Specifying "wait" option will make function block until pulseaudio server appears.'''
  		if self._loop_closed:
  			raise PulseError('Eventloop object was already'
  				' destroyed and cannot be reused from this instance.')
  		if self.connected is not None: self._ctx_init()
  		flags, self.connected = 0, None
  		if not autospawn: flags |= c.PA_CONTEXT_NOAUTOSPAWN
  		if wait: flags |= c.PA_CONTEXT_NOFAIL
  		try: c.pa.context_connect(self._ctx, self.server, flags, None)
  		except c.pa.CallError: self.connected = False
  		while self.connected is None: self._pulse_iterate()
  		if self.connected is False: raise PulseError('Failed to connect to pulseaudio server'f connect(self, autospawn=False, wait=False):
  		'''Connect to pulseaudio server.
  			"autospawn" option will start new pulse daemon, if necessary.
  			Specifying "wait" option will make function block until pulseaudio server appears.'''
  		if self._loop_closed:
  			raise PulseError('Eventloop object was already'
  				' destroyed and cannot be reused from this instance.')
  		if self.connected is not None: self._ctx_init()
  		flags, self.connected = 0, None
  		if not autospawn: flags |= c.PA_CONTEXT_NOAUTOSPAWN
  		if wait: flags |= c.PA_CONTEXT_NOFAIL
  		try: c.pa.context_connect(self._ctx, self.server, flags, None)
  		except c.pa.CallError: self.connected = False
  		while self.connected is None: self._pulse_iterate()
  		if self.connected is False: raise PulseError('Failed to connect to pulseaudio server')
docs: Connect to pulseaudio server.
  			"autospawn" option will start new pulse daemon, if necessary.
  			Specifying "wait" option will make function block until pulseaudio server appears.