maolan-engine 0.0.5

Audio engine for the Maolan DAW with audio/MIDI tracks, routing, export, and CLAP/VST3/LV2 hosting
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub fn os_status(code: i32) -> String {
    match code {
        0 => "kAudioHardwareNoError (0)".to_string(),
        -1500 => "kAudioHardwareUnspecifiedError (-1500)".to_string(),
        -1501 => "kAudioHardwareNotRunningError (-1501)".to_string(),
        -1502 => "kAudioHardwareUnknownPropertyError (-1502)".to_string(),
        -1503 => "kAudioHardwareBadPropertySizeError (-1503)".to_string(),
        -1504 => "kAudioHardwareIllegalOperationError (-1504)".to_string(),
        -1505 => "kAudioHardwareBadObjectError (-1505)".to_string(),
        -1506 => "kAudioHardwareBadDeviceError (-1506)".to_string(),
        -1507 => "kAudioHardwareBadStreamError (-1507)".to_string(),
        other => format!("OSStatus {other} ({other:#X})"),
    }
}

pub fn ca_error(operation: &str, code: i32) -> String {
    format!("CoreAudio {operation} failed: {}", os_status(code))
}