def convert_atype_to_width(atype):
    """Converts an audio type to the number of bytes each value takes.
    params:
        atype: A string, which is an audio type
    return: An integer within 1-4 (inclusive)
    """
    if atype == 'int8':
        return 1
    if atype == 'uint8':
        return 1
    if atype == 'int16':
        return 2
    if atype == 'int24':
        return 3
    if atype == 'float32':
        return 4
