Questions tagged [libalsa]

The ALSA (Advanced Linux Sound Architecture) library

The ALSA (Advanced Linux Sound Architecture) library

http://www.alsa-project.org/main/index.php/Main_Page

68 questions
0
votes
2 answers

Simple example of playing '.wav' audios simultaneously with alsa-lib in c++?

I am creating a piano with the computer keyboard and I need to play '.wav' audio simultaneously. I managed to do this perfectly using the SFML/Audio.hpp and SDL2/SDL_mixer.h libs, but the PlayAudio :: play () function of the code below takes a few…
0
votes
1 answer

ALSA sequencer: Avoid input buffer overrun with High-Speed MIDI

I want to send large SysEx messages (which can be several Megabytes) through the ALSA sequencer: Currently I split them into several ALSA events and send each of them in a loop like that: while (1) { result = snd_seq_event_output_direct(…
Keinstein
  • 347
  • 2
  • 11
0
votes
1 answer

ALSA async mode doesn't invoke callback function

I wrote a simple C++ wrapper representing an AudioStream based on ALSA API. It seems to me very convenient to use the async mode. Unfortunately, the callback function registered for async mode doesn't get invoked. The alsa documentation states for…
ST Renegade
  • 311
  • 3
  • 14
0
votes
1 answer

ALSA-Sound: Capture Line-In

I'm using the asoundlib library to read sound (which is playing on my other PC and which I plugged into my external sound card) on my raspberry pi 4, first I tried using the mic input but apparently that shouldn't be used with amplified signals (my…
Potheker
  • 93
  • 8
0
votes
3 answers

C: print an integer array as binary data

I want to record data from a microphone using alsa. This command: int buf[4096]; memset(buf, 0, sizeof(buf)); snd_pcm_readi(capture_handle, buf, avail); writes the microphone data into the integer buffer buf. ( I am not sure if the data that is…
relot
  • 651
  • 1
  • 6
  • 18
0
votes
1 answer

aplay quits before entire song is read

Problem statement: I do not receive the entire song in the output when dumped as a file (I can't hear the song through the jack but I could dump the file contents). excerpts: I am new to ALSA programming and I have an embedded board with limited set…
Adit Ya
  • 731
  • 1
  • 8
  • 19
0
votes
0 answers

xgo cross compile not working for alsa-lib

Note: I have also created this as an issue for xgo here, but I thought it might be better suited as an SO question. I am trying to cross compile my go application and one of the dependencies is the alsa.lib. I cannot get this to sucessfully compile…
Mathias Nielsen
  • 1,560
  • 1
  • 17
  • 31
0
votes
0 answers

ALSA PCM clicking/popping when playback is stopped

For example I have a simple play() function that plays arbitrary tone just fine. The problem is that as soon as I decide to stop playing tone ALSA produces click/pop sound. I've already tried using snd_pcm_drain(), stopping tone when it finishes…
0
votes
1 answer

Alsa Library for transcoding

Can I use ALSA library for transcoding of audio from one format to another. i.e S32 2 channels to S16 1 Channel audio from file as input source to file output In one of link I saw statement, Plugin: File This plugin stores contents of a PCM stream…
0
votes
0 answers

Alsa library has different version of read and driver interaction functions why?

I was going through alsa library code, I wanted to know read function that is being used. However I see there are more than one version of read functions. i.e .readi = snd_pcm_hw_readi .readi = snd_pcm_ioplug_readi .readi =…
0
votes
1 answer

alloca instead of local variable in alsa

I was using a sample C ALSA program as reference and ran along the following piece of code: ... snd_ctl_event_t *event; snd_ctl_event_alloca(&event); ... Based on the ALSA source code, snd_ctl_event_alloca is a macro that calls __snd_alloca which…
sshashank124
  • 31,495
  • 9
  • 67
  • 76
0
votes
1 answer

Alsa: snd_pci_readi() recording

I've got a dedicated thread that caputures audio from Alsa through snd_pcm_readi(). Recording happens fine for some 30 mins (each file of one minute duration), After that file size gradually decreases and results in "read from audio interface…
bala
  • 1
  • 1
0
votes
0 answers

Alsa No playnback after underrun

I have a embedded platform with two audiocodec. One is a tlv320aic3x (I2S) codec and the other is a USB Codec. The scenario is that a rtp stream is forwarded with a PjProject conferencer to the two codecs. When the call is established there is a…
fresh
  • 83
  • 2
  • 13
0
votes
0 answers

8 channel recording with 32bit width audio not playing in audacity

I am able to record 8 channel mic audio (32bit audio but actual content is 24bit with 8 bit padding) in below format using alsa utils (pcm_read): t0: channel 0, channel 1, channel 2, ....., channel 8 t1: channel 0, channel 1, channel 2, .....,…
user3053970
  • 95
  • 1
  • 10
0
votes
0 answers

linux - ALSA Configuration combining multiple plugins in /etc/asound.conf

I have a working VU meter plugin but wish to combine it with a spectrum analyzer however both have their own /etc/asound.conf. I want to combine the two together but nothing I have tried works because of the loopback that the spectrum requires. …
linuxgnuru
  • 142
  • 5