Re: [Ekiga-devel-list] Pls don't require exclusive Alsa audio device access, use snd_pcm_dmix_open ()



thomas schorpp wrote:
since dmix is enabled by libasound2 by default for cards not supporting h/w mixing.

skype can access the audio device using snd_pcm_dmix_open () if other app has already opened it, ekiga throws error msgboxes.

y
tom


hmm. takeback. future removal warning in alsa lib doc. well for experiments (in ptlib plugin):

Index: sound_alsa.cxx
===================================================================
--- sound_alsa.cxx      (Revision 18763)
+++ sound_alsa.cxx      (Arbeitskopie)
@@ -344,13 +344,15 @@
    }
  }

-  if (snd_pcm_open (&os_handle, real_device_name, stream, SND_PCM_NONBLOCK) < 0) {
+  if (snd_pcm_open (&os_handle, real_device_name, stream, SND_PCM_NONBLOCK) < 0)

-    PTRACE (1, "ALSA\tOpen Failed");
-    return FALSE;
-  }
-  else
-    snd_pcm_nonblock (os_handle, 0);
+    if (_snd_pcm_dmix_open (&os_handle, real_device_name, snd_config_t* root, snd_config_t* sconf, stream, SND_PCM_NONBLOCK) < 0) {
+
+      PTRACE (1, "ALSA\tOpen Failed");
+      return FALSE;
+    }
+    else
+      snd_pcm_nonblock (os_handle, 0);

  /* save internal parameters */
  device = real_device_name;

i cant find any sample code for the missing params, google is full of alsa user issues ;)

y
tom


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]