Questions tagged [rtaudio]

RtAudio is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware.

RtAudio is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows 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 API Notes section for information specific to each of the supported audio APIs.

http://www.music.mcgill.ca/~gary/rtaudio/

29 questions
3
votes
1 answer

How to adjust audio panning with RtAudio

I use Rtaudio library and I would like to implement an audio program where I can control the panning (e.g. shifting the sound from the left channel to the right channel). In my specific case, I use a duplex mode (you can find an example here: duplex…
2
votes
1 answer

Basic software synthesizer grows in latency over time

I'm in the process of finishing a MIDI controlled software synthesizer. The MIDI input and synthesis work alright, but I appear to have a problem one playing the audio itself. I'm using jackd as my audio server because of the possibility to…
ChemiCalChems
  • 612
  • 12
  • 31
2
votes
1 answer

RtAudio - Playing samples from wav file

I am currently trying to learn audio programming. My goal is to open a wav file, extract everything and play the samples with RtAudio. I made a WaveLoader class which let's me extract the samples and meta data. I used this guide to do that and I…
onurhb
  • 1,151
  • 2
  • 15
  • 31
2
votes
2 answers

How do I convert signal in Universal Window Phone?

I use RTAudio to get a signal from Microphone and use this signal as the input for another encoder. It seems UWP always return fixed audio sample rate which different from sample rate my encoder wants. WASAPICapture return 44100 Hz signal, 2…
1
vote
1 answer

Linking with jack using qmake

I have two similar projects on the same machine. Their difference is that one is using GUI (Qt and Qwt) and the other is not. As the result, the one that has Qt is using qmake to compile and the other one cmake. The project itself is about signal…
Mehran
  • 15,593
  • 27
  • 122
  • 221
1
vote
1 answer

How to compile rtaudio on windows with mingw?

I want to use rtaudio in my project. I am following instructions in install.txt which tells me to run ./configure then make. When I run make I get bunch of warnings: $ make Making all in . make[1]: Entering directory…
onurhb
  • 1,151
  • 2
  • 15
  • 31
1
vote
0 answers

RtApiWasapi::getDeviceInfo: Unable to retrieve device mix format

I am trying to learn how to use Processing, and so am attempting to use the sound library. When running the either of the first two example programs provided at https://processing.org/tutorials/sound/, the IDE responds with this error: This…
1
vote
1 answer

Combining libsndfile and RtAudio?

So, i've been experimenting around with RtAudio and libsndfile. The task seemed to be simple: 1.) Read some samples into a buffer with libsndfile (using the SndfileHandle class and readf()) 2.) Use RtAudio to play back the samples BUT, for some…
TraaTrii
  • 31
  • 3
1
vote
1 answer

How to compile rtaudio with QT?

I need to install the real time proccess library "rtaudio-4.1.1" on windows in order to use it in C++ projet. I'd try to compile the library project given by MIT website with QTCreator. I opened the qt project RTaudio and click on compile and the…
1
vote
1 answer

Undefined reference to CoInitialize@4 and CoUninitialize@0

I've built and included the RtAudio library in a project, but when I try to build the project itself, I get errors: RtAudio.cpp:-1: error: undefined reference to `CoInitialize@4' RtAudio.cpp:-1: error: undefined reference to `CoUninitialize@0' :-1:…
user3735658
1
vote
1 answer

How to handle audio buffer sizes that are not divisible by 64 when working with libpd?

libpd's API only allows to process audio in frames of 64 samples at a time. What I've done in the past is set the audio device buffer size to a number that is divisible by 64. No problems there. Now, I need to make a Windows app that is ASIO…
Rafael Vega
  • 4,575
  • 4
  • 32
  • 50
0
votes
0 answers

Why is this RtAudio callback function generating a distorted sine wave?

I have an RtAudio callback function that fills a buffer with samples of a sine wave of a given frequency and amplitude and calculates the phase at which the sine wave written to the next buffer should begin. However, when these buffers are played,…
0
votes
0 answers

Modern equivalent of RtAudio::setStreamCallback in version 5.2.0

I am following a tutorial that uses RtAudio version 3.0. Here is the code: #include #include "RtAudio.h" // Two-channel sawtooth wave generator. int sawtooth(char *buffer, int bufferSize, void *data) { int i, j; double *my_buffer =…
Loch
  • 21
  • 4
0
votes
1 answer

How to use RtAudio as a CMake dependency

I am trying to use RtAudio in my project. I installed it by executing : git clone ... cmake -B target -D CMAKE_PREFIX_PATH=$HOME/.local cmake --build target cmake --install target PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig pkg-config --cflags…
Marsevil
  • 3
  • 1
0
votes
0 answers

RtAudio: understanding frame count vs buffer size

Looking at the duplex example from the documentation of RtAudio, I do not understand why the number of frames has to be multiplied by 8 to get the good buffer size to copy. In the example there is bufferBytes = bufferFrames * 2 * 4;. I imagine the *…
VincentDM
  • 469
  • 6
  • 17
1
2