Audio tags around Mp3 URL in content

Filter the_content ond/or the_excerpt and replace audio URLs that are not an attribute value already.

Example:

add_filter( 'the_content', 'wpse_82336_audio_url_to_shortcode', 1 );
add_filter( 'the_excerpt', 'wpse_82336_audio_url_to_shortcode', 1 );

function wpse_82336_audio_url_to_shortcode( $content )
{
    # See http://en.wikipedia.org/wiki/Audio_file_format
    # Adjust the list to your needs
    $suffixes = array (
        '3gp', 'aa3', 'aac', 'aiff', 'ape', 'at3', 'au',  'flac', 'm4a', 'm4b',
        'm4p', 'm4r', 'm4v', 'mpc',  'mp3', 'mp4', 'mpp', 'oga',  'ogg', 'oma',
        'pcm', 'tta', 'wav', 'wma',  'wv',
    );

    $formats = join( '|', $suffixes );
    $regex   = '~
    (([^"\'])|^)            # start of string or attribute delimiter -> match 1
    (https?                 # http or https
        ://                 # separator
        .+/                 # domain plus /
        .+                  # file name at least one character
        \.                  # a dot
        (' . $formats . ')  # file suffixes
    )                       # complete URL -> match 3
    (([^"\'])|$)?           # end of string or attribute delimiter -> match 5
    ~imUx';                 # case insensitive, multi-line, ungreedy, commented

    return preg_replace( $regex, '\1https://wordpress.stackexchange.com/questions/82336/\5', $content );
}