def n_process(data, L, R):
    """ Apply panning gains based on chosen pan law.

    Params
    -------
    data : ndarrary
        Input audio data. (samples, channels)

    currently only support max of 2 channels

    Returns
    -------
    output_buffer : ndarray
        Panned input audio. (samples, channels)
    """

    if data.ndim < 2:
        # apply the channel gains
        output_buffer_L = L * data
        output_buffer_R = R * data
    else:
        # apply the channel gains
        output_buffer_L = L * data[:,0]
        output_buffer_R = R * data[:,1]

    return output_buffer_L, output_buffer_R