Category : alsa

I have a buffer of length 1024 coming over the network filled with single channel audio data at 48000Hz in S32LE format. I’m able to play this back using SDL2 however I need change this to use the ALSA API. I’ve followed countless tutorials but all I’m getting is static. This is the setup code ..

Read more

I am trying to make a call using PJSUA2, play a wav file to the callee, and callee should record this file to wav. I created two programs for that (caller and callee). And when caller starts playing wav file into AudioMedia object, console of callee program just spams out "alsa.c pb_thread_func: underrun!" and nothing ..

Read more

Depending on what I do I either get "No such audio device" if I leave determining my audio device up to SDL2 or I get Failed loading libasound.a: /home/aypahyo/.conan/data/libalsa/1.2.4///package/d48130e0dd76369b1338deb3b2372c5a649f9f2d/lib/libasound.a: invalid ELF header when I set SDL_AUDIODRIVER=alsa. (The error message is actually cut off, I added an r at the end). Here is an implementation that ..

Read more

I’m trying to record microphone with alsa api on linux, but result is strange sounds like freezed glitchy robot. Recorded pcm data sended by UDP protocol to pcm player endpoint. char* device = "default"; unsigned int rate = 44100; unsigned int channels = 2; snd_pcm_uframes_t frames{}; snd_pcm_t* capture_handle{}; snd_pcm_hw_params_t* hw_params{}; if (snd_pcm_open(&capture_handle, device, SND_PCM_STREAM_CAPTURE, 0) ..

Read more

I am trying to record sound using microphone and sox library in C/C++. sox_open_read("default", &_input->signal, NULL, NULL) I am trying to use default input device. I am getting the error formats: can’t open input file `default’: No such file or directory Which I guess is caused because I did not pass the last argument: filetype ..

Read more