Skip to content

Instantly share code, notes, and snippets.

View drozdziak1's full-sized avatar

Stanisław Drozd drozdziak1

View GitHub Profile
fn jack_sanity<F>() -> Result<AsyncClient<(), ClosureProcessHandler<F>>, Error>
where
F: 'static + Send + FnMut(&Client, &ProcessScope) -> Control,
{
let (client, _status) = Client::new("anal", ClientOptions::NO_START_SERVER)?;
let in_1 = client.register_port("in_1", AudioIn::default())?;
let in_2 = client.register_port("in_2", AudioIn::default())?;
let process_callback = move |_client: &Client, ps: &jack::ProcessScope| -> Control {
#[macro_use]
extern crate log;
// To import all needed traits.
use gio::prelude::*;
use gtk::prelude::*;
use std::env;
fn main() {
pub fn merge_no_sentinel<T: Clone + Ord>(
a: &mut [T],
p: usize,
q: usize,
r: usize,
) -> Result<(), Error> {
if !(p <= q && q <= r && r < a.len()) {
return Err(PQROutOfBounds(p, q, r).into());
}

Keybase proof

I hereby claim:

  • I am drozdziak1 on github.
  • I am drozdziak1 (https://keybase.io/drozdziak1) on keybase.
  • I have a public key ASApvByX9eS8qXmBhrYqNRd_IAQEDufo_vM9VQIAFXU5mwo

To claim this, I am signing this object:

#[macro_use]
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate toml;
fn default_email_subject() -> String {
String::from("Althea Exit verification code")
SinOsc osc => dac;
0.3 => osc.gain;
250 => int start_freq;
20 => int end_freq;
Step s => blackhole;
0.0 => s.next;
for(0 => int i; i < 10000; ++i) {
SinOsc s => dac;
0.001 => s.gain;
Std.rand2f(30.0, 1000.0) => s.freq;
100::ms => now;
}
<<<"Freqs done.">>>;
#[derive(Clone,Debug, PartialEq)]
pub struct OscMessage {
pub addr: String,
pub args: Option<Vec<OscType>>,
}
error: expected `,`
--> src/main.rs:95:47
|
95 | OscPacket::Message(OscMessage { addr: "/pong".to_owned(), args: None, }) => info!("JMM ping OK"),
| ^^^^^^^
error[E0027]: pattern does not mention fields `addr`, `args`
--> src/main.rs:95:28
|
95 | OscPacket::Message(OscMessage { addr: "/pong".to_owned(), args: None, }) => info!("JMM ping OK"),
#[macro_use]
extern crate failure;
#[macro_use]
extern crate log;
extern crate env_logger;
extern crate rosc;
extern crate rustyline;
use failure::Error;