Examples interface

Notes on Bext
This commit is contained in:
Jamie Hardt
2021-01-02 13:38:56 -08:00
parent b1c806598e
commit 8d55b126ae
4 changed files with 19 additions and 10 deletions

View File

@@ -206,6 +206,7 @@ fn create_blits_file(file_name: &str, sample_rate : u32, bits_per_sample : u16)
let format = WaveFmt::new_pcm_multichannel(sample_rate, bits_per_sample as u16, 0b111111);
let file = WaveWriter::create(file_name, format)?;
let mut fw = file.audio_frame_writer()?;
for frame in frames {
let buf = vec![frame.0, frame.1, frame.2, frame.3, frame.4, frame.5];
@@ -216,13 +217,15 @@ fn create_blits_file(file_name: &str, sample_rate : u32, bits_per_sample : u16)
Ok(())
}
#[macro_use]
extern crate clap;
use clap::{Arg, App};
fn main() -> io::Result<()> {
let matches = App::new("blits")
.version("0.1")
.author("Jamie Hardt")
.version(crate_version!())
.author(crate_authors!())
.about("Generate a BLITS 5.1 alignment tone.")
.arg(Arg::with_name("sample_rate")
.long("sample-rate")

View File

@@ -4,16 +4,17 @@
//! This program demonstrats combining several wave files into a single
//! polyphonic wave file.
extern crate clap;
use std::io;
#[macro_use]
extern crate clap;
use clap::{Arg, App};
fn main() -> io::Result<()> {
let matches = App::new("wave-deinter")
.version("0.1")
.author("Jamie Hardt")
.version(crate_version!())
.author(crate_authors!())
.about("Extract each channel of a polyphonic wave file as a new monoaural wave file.")
.arg(Arg::with_name("OUTPUT")
.long("output")

View File

@@ -4,15 +4,16 @@
//! This program demonstrates combining several wave files into a single
//! polyphonic wave file.
extern crate clap;
use std::io;
#[macro_use]
extern crate clap;
use clap::{Arg, App};
fn main() -> io::Result<()> {
let matches = App::new("wave-inter")
.version("0.1")
.author("Jamie Hardt")
.version(crate_version!())
.author(crate_authors!())
.about("Combine several wave files into a single polyphonic wave file.")
.arg(Arg::with_name("OUTPUT")
.long("output")

View File

@@ -20,6 +20,10 @@ pub type Decibels = f32;
/// - [EBU Tech R099](https://tech.ebu.ch/docs/r/r099.pdf) (October 2011) "Unique Source Identifier (USID) for use in the
/// &lt;OriginatorReference&gt; field of the Broadcast Wave Format"
// Note for me later:
// get env values: https://doc.rust-lang.org/std/macro.option_env.html
// Cargo env values: https://doc.rust-lang.org/cargo/reference/environment-variables.html
#[derive(Debug)]
pub struct Bext {