udoprog / audio

A crate for working with audio in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publish a new version?

HEnquist opened this issue · comments

The latest release on crates.io is quite old. Could we have new releases of audio and audio-core?

Sure, are you working on something using the APIs?

Thanks! I'm working on my type conversion traits (related to #34). I want as much as possible to work with the audio buffers, and I need the latest version to make stuff like this work for example:

        let data: [u8; 12] = [0, 0, 0, 128, 0, 64, 0, 192, 0, 32, 0, 224];
        let data_view = byte_slice_as_type!(data, I16LE);
        let buffer = wrap::interleaved(data_view, 2);
        assert_eq!(buffer.read_sample(0, 0).unwrap().to_scaled_float::<f32>(), 0.0);
        assert_eq!(buffer.read_sample(1, 0).unwrap().to_scaled_float::<f32>(), -1.0);
        assert_eq!(buffer.read_sample(0, 1).unwrap().to_scaled_float::<f32>(), 0.5);
        assert_eq!(buffer.read_sample(1, 1).unwrap().to_scaled_float::<f32>(), -0.5);
        assert_eq!(buffer.read_sample(0, 2).unwrap().to_scaled_float::<f32>(), 0.25);
        assert_eq!(buffer.read_sample(1, 2).unwrap().to_scaled_float::<f32>(), -0.25);

(from https://github.com/HEnquist/audioadapter-rs/blob/79aa10ba77b970259171743d233d8a08d93cd45e/src/audio.rs#L198)

Now I use the latest version from git, but I would like to publish this thing on crates.io at some point and then that's not allowed.

All right! I've uploaded audio and audio-core version 0.2.0.