Android OpenAL?

A few options are available now for NDK audio: It’s not OpenAL, but OpenSL ES 1.0.1 is an official part of the NDK as of API level 9 (2.3). More information here. OpenAL Soft has an OpenSL ES backend in its git master (not released as of version 1.13). It is however at this time … Read more

Set ALSA master volume from C code

The following works for me. The parameter volume is to be given in the range [0, 100]. Beware, there is no error handling! void SetAlsaMasterVolume(long volume) { long min, max; snd_mixer_t *handle; snd_mixer_selem_id_t *sid; const char *card = “default”; const char *selem_name = “Master”; snd_mixer_open(&handle, 0); snd_mixer_attach(handle, card); snd_mixer_selem_register(handle, NULL, NULL); snd_mixer_load(handle); snd_mixer_selem_id_alloca(&sid); snd_mixer_selem_id_set_index(sid, 0); … Read more

PyAudio working, but spits out error messages each time

You can try to clean up your ALSA configuration, for example, ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side are caused by /usr/share/alsa/alsa.conf: pcm.rear cards.pcm.rear pcm.center_lfe cards.pcm.center_lfe pcm.side cards.pcm.side Once you comment out these lines, those error message will be gone. You may also want … Read more