Returns a SndWriter. Call its .write(samples) method 
    to write

    samples  --> Array-like. the actual samples, shape=(nframes, channels)
    sr       --> Sampling-rate
    outfile  --> The name of the outfile. the extension will determine
                 the file-format.
                 The formats supported depend on the available backends
                 Without additional backends, only uncompressed formats
                 are supported (wav, aif)
    encoding --> one of:
                 - 'pcm16'
                 - 'pcm24'
                 - 'pcm32'
                 - 'flt32'

def sndwrite_chunked(sr: int, outfile: str, encoding: str) -> _SndWriter:
    """
    Returns a SndWriter. Call its .write(samples) method 
    to write

    samples  --> Array-like. the actual samples, shape=(nframes, channels)
    sr       --> Sampling-rate
    outfile  --> The name of the outfile. the extension will determine
                 the file-format.
                 The formats supported depend on the available backends
                 Without additional backends, only uncompressed formats
                 are supported (wav, aif)
    encoding --> one of:
                 - 'pcm16'
                 - 'pcm24'
                 - 'pcm32'
                 - 'flt32'
    """
    backends = [backend for backend in _getBackends() if backend.can_write_chunked]
    if not backends:
        raise SndfileError("No backend found to support the given format")
    print(backends)
    backend = min(backends, key=lambda backend:backend.priority)
    logger.debug(f"sndwrite_chunked: using backend {backend.name}")
    return backend.writer(sr, outfile, encoding)