Crate steelseries_sonar

Crate steelseries_sonar 

Source
Expand description

§SteelSeries Sonar API

A Rust library for interacting with the SteelSeries Sonar application API. This library allows you to control audio volumes, mute channels, and manage chat mix settings programmatically.

§Features

  • Control volume levels for different audio channels
  • Mute/unmute specific channels
  • Manage chat mix settings
  • Support for both classic and streamer modes
  • Async/await support with tokio

§Quick Start

use steelseries_sonar::Sonar;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a new Sonar client
    let sonar = Sonar::new().await?;
     
    // Set master volume to 50%
    sonar.set_volume("master", 0.5, None).await?;
     
    // Mute the game channel
    sonar.mute_channel("game", true, None).await?;
     
    // Get current volume data
    let volume_data = sonar.get_volume_data().await?;
    println!("Current volume data: {}", volume_data);
     
    Ok(())
}

Re-exports§

pub use error::Result;
pub use error::SonarError;
pub use sonar::Sonar;
pub use sonar::CHANNEL_NAMES;
pub use sonar::STREAMER_SLIDER_NAMES;
pub use blocking::BlockingSonar;

Modules§

blocking
Synchronous (blocking) API for SteelSeries Sonar.
error
Error types for the SteelSeries Sonar API.
sonar
SteelSeries Sonar API client.