audio-device-rs
About Shiguredo's open source software
We will not respond to PRs or issues that have not been discussed on Discord. Also, Discord is only available in Japanese.
Please read https://github.com/shiguredo/oss before use.
時雨堂のオープンソースソフトウェアについて
利用前に https://github.com/shiguredo/oss をお読みください。
概要
macOS / Linux / Windows に対応したオーディオデバイスライブラリです。
対応プラットフォーム
- macOS: CoreAudio / AudioToolbox
- Linux: PulseAudio (デフォルト) / PipeWire
- Windows: WASAPI
Linux の feature
Linux では pulse (デフォルト) と pipewire の 2 つの feature を選択できます。両方を同時に指定することはできません。
ビルド要件
macOS
追加の依存パッケージは不要です。
Ubuntu (Linux)
PulseAudio バックエンド (デフォルト):
最近の Ubuntu (22.04 以降) では PipeWire がデフォルトのオーディオサーバーになっています。PulseAudio バックエンドを使用する場合は pipewire-pulse (PulseAudio 互換レイヤー) が動作している必要があります。
PipeWire バックエンド:
PipeWire デーモンが動作している必要があります。
Windows
追加の依存パッケージは不要です。
ビルド
# デフォルト (macOS / Linux PulseAudio / Windows)
# Linux PipeWire バックエンド
使い方
デバイス列挙
use ;
// 全デバイス(入力・出力)を取得
let device_list = enumerate?;
for device in device_list.devices
// 入力デバイスのみ取得
let input_devices = enumerate_input?;
// 出力デバイスのみ取得
let output_devices = enumerate_output?;
キャプチャ
use ;
// キャプチャ設定
let config = AudioCaptureConfig ;
// コールバックでフレームを受信
let mut capture = new?;
// キャプチャ開始
capture.start?;
// ... キャプチャ中 ...
// キャプチャ停止
capture.stop;
ライセンス
Apache License 2.0
Copyright 2026-2026, Shiguredo Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.