Skip to content

naithianee/ticketapp

Repository files navigation

AudioCore

Crate Info API Docs

AudioCore is a high-performance Rust library for audio decoding and media container parsing. Supports FLAC, MP3, OGG, WAV, AAC, Opus, and WebM formats with zero-copy operations.


Key Features

  • Multi-format audio decoding with seamless playback
  • Media container demuxing and stream extraction
  • Comprehensive metadata and tag reading
  • Automatic format detection and codec selection
  • Memory-safe audio buffer manipulation
  • Minimal runtime dependencies
  • Optimized for embedded and server environments

Future development targets:

  • WebAssembly compilation for browser applications
  • C-compatible FFI bindings for language interoperability

Supported Formats

Enable specific codecs and containers via feature flags. Default configuration includes royalty-free formats only.

Container Formats

Format Status Gapless Feature Default Crate
MP4 Stable No mp4 No audiocore-format-mp4
WebM Beta No webm Yes audiocore-format-webm
OGG Stable Yes ogg Yes audiocore-format-ogg
WAV Production Yes wav Yes audiocore-format-wav

Audio Codecs

Codec Status Gapless Feature Default Crate
AAC Stable No aac No audiocore-codec-aac
FLAC Production Yes flac Yes audiocore-codec-flac
MP3 Production Yes mp3 No audiocore-codec-mp3
Opus Stable Yes opus Yes audiocore-codec-opus
Vorbis Production Yes vorbis Yes audiocore-codec-vorbis

Quality & Performance

AudioCore prioritizes:

  • Bit-perfect decoding accuracy matching reference implementations
  • Robust error handling and input validation
  • Comprehensive fuzz testing coverage
  • Consistent, well-documented APIs

Performance benchmarks show AudioCore operates within ±10% of optimized C implementations across common codecs and CPU architectures.

Quick Example

use audiocore::{FormatReader, Decoder};
use std::fs::File;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Open audio file
    let mut file = File::open("audio.mp3")?;
    
    // Detect format and create reader
    let mut reader = FormatReader::detect(&mut file)?;
    
    // Get default audio track
    let track = reader.default_track().unwrap();
    
    // Create decoder for the track
    let mut decoder = Decoder::new(track.codec_params())?;
    
    // Decode packets
    while let Some(packet) = reader.next_packet()? {
        let decoded = decoder.decode(&packet)?;
        // Process audio samples...
    }
    
    Ok(())
}

Tools & Utilities

  • audiocore-play - Command-line audio player with format probing
  • audiocore-check - Validation tool for decoder output verification
  • audiocore-bench - Performance benchmarking suite

License

MPL-2.0 - See LICENSE file for complete terms.

Contributing

Contributions welcome! Please review contribution guidelines and ensure all code matches project coding standards. All submissions must be compatible with MPL-2.0 licensing.

About

Partial eval for nns GeometryFighters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published