Skip to content
프로젝트

소개

Linux(네이티브 ALSA, JACK, PulseAudio 및 OSS), Macintosh OS X(CoreAudio 및 JACK), Windows(DirectSound, ASIO 및 WASAPI)에서 실시간 오디오 입출력을 지원하는 공통 API를 제공하는 C++ 클래스 모음입니다.

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
-2

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

RtAudio

Build Status

A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO and WASAPI) operating systems.

By Gary P. Scavone, 2001-2023 (and many other developers!)

This distribution of RtAudio contains the following:

  • doc: RtAudio documentation (see doc/html/index.html)
  • tests: example RtAudio programs
  • include: header and source files necessary for ASIO, DS & OSS compilation
  • tests/Windows: Visual C++ .net test program workspace and projects

Overview

RtAudio is a set of C++ classes that provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio, PipeWire and OSS), Macintosh OS X and Windows (DirectSound, ASIO and WASAPI) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives:

  • object-oriented C++ design
  • simple, common API across all supported platforms
  • only one source and one header file for easy inclusion in programming projects
  • allow simultaneous multi-api support
  • support dynamic connection of devices
  • provide extensive audio device parameter control
  • allow audio device capability probing
  • automatic internal conversion for data format, channel number compensation, (de)interleaving, and byte-swapping

RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance. See the \ref apinotes section for information specific to each of the supported audio APIs.

RtAudio is also offered as a module, which is enabled with RTAUDIO_BUILD_MODULES, and is accessed with import rt.audio;. Namespaces are implicitly imported (unless disabled with RTAUDIO_USE_NAMESPACE), so classes can be accessed through namespace rt::audio or through the global namespace (for example, rt::audio::RtApi and ::RtApi are both valid).

Building

Several build systems are available. These are:

  • autotools (./autogen.sh; make from git, or ./configure; make from tarball release)
  • CMake (mkdir build; cd build; ../cmake; make)
  • meson (meson build; cd build; ninja)
  • vcpkg (./bootstrap-vcpkg.sh; ./vcpkg integrate install; ./vcpkg install rtaudio)

See install.txt for more instructions about how to select the audio backend API. By default all detected APIs will be enabled.

We recommend using the autotools-based build for packaging purposes. Please note that RtAudio is designed as a single .cpp and .h file so that it is easy to copy directly into a project. In that case you need to define the appropriate flags for the desired backend APIs.

FAQ

Why does audio only come to one ear when I choose 1-channel output?

RtAudio doesn't automatically turn 1-channel output into stereo output with copied values to two channels, since there may be cases when a user truly wants 1-channel behaviour. If you want monophonic data to be projected to stereo output, open a 2-channel stream and copy the data to both channels in your audio stream callback.

Further Reading

For complete documentation on RtAudio, see the doc directory of the distribution or surf to https://caml.music.mcgill.ca/~gary/rtaudio/index.html.

Legal and ethical:

The RtAudio license is similar to the MIT License. Please see LICENSE.

관련 프로젝트 살펴보기

불러오는 중…