aMSN Forums
September 03, 2014, 07:58:16 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: 1 2 3 [4]
  Print  
Author Topic: How I did to make USB/webcam microphone work with aMSN SVN  (Read 92344 times)
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #45 on: June 27, 2008, 07:02:34 pm »

Hi,
did you try to open the aMSN console (ctrl-shift-C) and type :
Code:
package require snack
to see what error it shows ? maybe it's a missing symbol or something... I know debian/ubuntu made libsnack compile with --disable-alsa because snack was using a function that doesn't exist anymore in alsa, so it became broken.
Logged

KaKaRoTo
wildnux
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #46 on: June 27, 2008, 07:44:00 pm »

I tried and get:

(amsn) 1 % package require snack
couldn't load file "/home/blackhat/.amsn/plugins/snack2.2/libsnack.so": /home/blackhat/.amsn/plugins/snack2.2/libsnack.so: undefined symbol: _snd_pcm_mmap_hw_ptr
(amsn) 2 %
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #47 on: June 27, 2008, 09:41:53 pm »

just as i said, libsnack needs a function from libalsa which does not exist anymore... you must compile it without alsa support, or revert to an old version of alsa.
Logged

KaKaRoTo
wildnux
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #48 on: June 28, 2008, 07:33:46 am »

Quote from: "kakaroto"
just as i said, libsnack needs a function from libalsa which does not exist anymore... you must compile it without alsa support, or revert to an old version of alsa.


so that means i have to use snack without alsa support, which in turn makes me unable to use the webcam microphone??
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #49 on: June 28, 2008, 12:53:42 pm »

or.. since you can and know how to compile snack yourself, just patch it with the patch I provided to fix that bug that prevents the usb mic from working...
Logged

KaKaRoTo
wildnux
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #50 on: June 29, 2008, 08:16:59 am »

Quote from: "kakaroto"
or.. since you can and know how to compile snack yourself, just patch it with the patch I provided to fix that bug that prevents the usb mic from working...


can you please give me the link of your patch. I am sorry i could not find it.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #51 on: June 29, 2008, 08:54:30 am »

lol, me neither...
It seems I didn't post it in the forums, I only sent it by mail to the original author (who never answered, and I lost the mail I sent :s)
What I could find is this though :
http://www.amsn-project.net/forums/viewtopic.php?p=19370#19370
so the code looks like this :
Code:

   /* Test if the device is not locked by another process. This is
   * just a crude workaround to avoid complete lockup of snack. It is
   * not perfect since it is theoretically possible that another program
   * locks the device between the close() and open() calls below. */
  A->afd = open(device, O_WRONLY|O_NONBLOCK);
  if(A->afd == -1) {
    Tcl_AppendResult(interp, "Could not gain access to ", device, " for writing.",NULL);
    return TCL_ERROR;
  }
  close(A->afd);

  A->mode = mode;
  switch (mode) {
  case RECORD:
    if ((A->afd = open(device, O_RDONLY, 0)) == -1) {
      Tcl_AppendResult(interp, "Could not open ", device, " for read.",
             NULL);
      return TCL_ERROR;
    }
    break;


And if we make it into this :
Code:

   /* Test if the device is not locked by another process. This is
   * just a crude workaround to avoid complete lockup of snack. It is
   * not perfect since it is theoretically possible that another program
   * locks the device between the close() and open() calls below. */

  if (mode == RECORD) {
     A->afd = open(device, O_RDONLY|O_NONBLOCK);
  } else {
     A->afd = open(device, O_WRONLY|O_NONBLOCK);
  }
  if(A->afd == -1) {
    Tcl_AppendResult(interp, "Could not gain access to ", device, " for writing.",NULL);
    return TCL_ERROR;
  }
  close(A->afd);

  A->mode = mode;
  switch (mode) {
  case RECORD:
    if ((A->afd = open(device, O_RDONLY, 0)) == -1) {
      Tcl_AppendResult(interp, "Could not open ", device, " for read.",
             NULL);
      return TCL_ERROR;
    }
    break;


It should work...
Note that I didn't test this code, so if it doesn't compile or doesn't work, try to fix it the best you can.
Logged

KaKaRoTo
wildnux
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #52 on: July 01, 2008, 01:18:19 am »

Lets give it a try.....  :lol:
Logged
wildnux
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #53 on: July 01, 2008, 02:26:17 am »

nope...... nothing

the piece of code you gave to me is for oss driver (isn't it?). After i install the snack with alsa enabled, the snack cannot be loaded. the module snd-usb-audio loads well (i guess, as it doesnot give any error messages). If i use the snack from my distro's repo, it works for sound, it can play from speakers using snack library but cannot capture from usb mic. Now after installing the alsa enabled snack, it cannot even load it.

is this the dead end?
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #54 on: July 01, 2008, 06:21:03 am »

Yes, the patch is for OSS, it will fix the problem where the snack-oss isn't able to record from the usb mic... this will not fix the alsa problem that prevents it from loading because of the missing symbol!
Logged

KaKaRoTo
wildnux
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #55 on: July 02, 2008, 02:40:58 am »

Quote from: "kakaroto"
Yes, the patch is for OSS, it will fix the problem where the snack-oss isn't able to record from the usb mic... this will not fix the alsa problem that prevents it from loading because of the missing symbol!


So it means i have to recompile and reinstall it without --enable-alsa option? coz it is not even loading now (with --enable-alsa)
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #56 on: July 02, 2008, 02:08:37 pm »

yes, you need to compile it and reinstall it without the --enable-alsa because with --enable-alsa it will not load!
Logged

KaKaRoTo
gilles.hamel
Newbie

Offline Offline

Posts: 6


View Profile
« Reply #57 on: September 02, 2008, 07:22:59 pm »

Quote from: "wildnux"
I tried and get:

(amsn) 1 % package require snack
couldn't load file "/home/blackhat/.amsn/plugins/snack2.2/libsnack.so": /home/blackhat/.amsn/plugins/snack2.2/libsnack.so: undefined symbol: _snd_pcm_mmap_hw_ptr
(amsn) 2 %


Hello,

here is a small patch to fix that :

http://gilles.hamel.free.fr/alsa.patch

to apply :
cd snack2.2.10/unix
patch -p0 <alsa.patch

I don't recommend alsa support in snack, it is weak. OSS with alsa emulation behaves better in snack.
Snack project seems dead, the last release is almost 3 years old. It would be nice if amsn could use external program to capture sample (ie: arecord) ...
Logged
conta
Newbie

Offline Offline

Posts: 49


View Profile
« Reply #58 on: February 03, 2009, 08:44:31 pm »

hi, i cant get my mic working too

i have aMSN 0.97.2
alsa
libsnack2-alsa
sidux (debian sid)

please, ideas? Smiley
Logged
afrox
Newbie

Offline Offline

Posts: 33


View Profile
« Reply #59 on: June 14, 2009, 04:47:42 am »

I just solved it, by uninstallng libsnack2-alsa and replacing it with "libsnack2", it does the work perfectly on jaunty ubuntu.

If you use the amsn-daily repositories for ubuntu, it might unistall your amsn, so reinstall it!

Cheers
Logged

Thanx for keepin amsn moving!!
Pages: 1 2 3 [4]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!