<commit_before>#![crate_type = "bin"]
#![crate_id="demo"]

extern crate sdl2;
extern crate sdl2_mixer;

use std::os;
use mix = sdl2_mixer;


fn main() {
    let args = os::args();
    if args.len() < 2 {
        println!("Usage: ./demo audio.[mp3|wav|ogg]")
    } else {
        match dump_info(&Path::new(args[1])) {
            _ => ()
        }
    }
}

fn dump_info(filename: &Path) -> Result<(), ~str> {
    println!("linked version: {}", mix::get_linked_version());
    sdl2::init(sdl2::InitAudio | sdl2::InitTimer);
    println!("inited => {}", mix::init(sdl2_mixer::InitMp3 | sdl2_mixer::InitFlac |
                                       sdl2_mixer::InitMod | sdl2_mixer::InitFluidSynth |
                                       sdl2_mixer::InitModPlug | sdl2_mixer::InitOgg).get());<commit_msg>fix demo code compile error<commit_after>#![crate_type = "bin"]
#![crate_id="demo"]

extern crate sdl2;
extern crate sdl2_mixer;

use std::os;
use mix = sdl2_mixer;


fn main() {
    let args = os::args();
    if args.len() < 2 {
        println!("Usage: ./demo audio.[mp3|wav|ogg]")
    } else {
        match dump_info(&Path::new(args.get(1).to_owned())) {
            _ => ()
        }
    }
}

fn dump_info(filename: &Path) -> Result<(), ~str> {
    println!("linked version: {}", mix::get_linked_version());
    sdl2::init(sdl2::InitAudio | sdl2::InitTimer);
    println!("inited => {}", mix::init(sdl2_mixer::InitMp3 | sdl2_mixer::InitFlac |
                                       sdl2_mixer::InitMod | sdl2_mixer::InitFluidSynth |
                                       sdl2_mixer::InitModPlug | sdl2_mixer::InitOgg).bits());
{'fraction_non_alphanumeric': 0.1762545899632803, 'fraction_numerical': 0.019583843329253364, 'mean_word_length': 2.609271523178808, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5064483', 'n_tokens_mistral': 589, 'n_tokens_neox': 586, 'n_words': 93}