Skype with OSS(a wrapper to mimic pulseaudio)

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium

waterlaz
Member
Posts: 17
Joined: Wed Aug 27, 2014 4:16 pm
Sound Card: Audigy 2 value
OS: gentoo linux

Skype with OSS(a wrapper to mimic pulseaudio)

Postby waterlaz » Wed Aug 27, 2014 4:25 pm

The latest versions of Skype do not work with OSS anymore and the older versions do not support the new skype protocol, which makes them useless.

I've written a small library that mimics the behaviour of libpulse.so when used from skype (tested only on 4.3.0.37) and outputs and records sound through OSS.

I doubt the lib will work with any other application and it still might cause errors, not work as good as expected or fail to work with some versions of skype at all.

There are also a few limitations as it can only work with 48KHz output and input.

Nevertheless, it seems to work for me and I would appreciate any input on this.

Link: https://github.com/waterlaz/skype_oss_wrapper

nuc
Moderator
Posts: 109
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: PowerColor DEVIL HDX
OS: ArchLinux
Contact:

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby nuc » Sat Aug 30, 2014 8:30 pm

Thanks.
I have compiled the source, but where to put libpulse.so?
Check out my effort on revamping the opensound website => github.com/Nuc1eoN/4Front-Tech-Website
Any feedback greatly appreciated =)

waterlaz
Member
Posts: 17
Joined: Wed Aug 27, 2014 4:16 pm
Sound Card: Audigy 2 value
OS: gentoo linux

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby waterlaz » Sat Aug 30, 2014 9:36 pm

I havn't figured out the good way to force skype use the libpulse.so, so I just put it in /usr/lib32/ (or /usr/lib/ if you have a 32bit system).

nuc
Moderator
Posts: 109
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: PowerColor DEVIL HDX
OS: ArchLinux
Contact:

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby nuc » Sun Aug 31, 2014 12:05 am

Hm, yeah I did that previously but it didn't work :/
Do I need to have pulseaudio installed or is libpulse enough?

EDIT: Ok renamed it into libpulse.so.0.17.3 and now it works :D
Check out my effort on revamping the opensound website => github.com/Nuc1eoN/4Front-Tech-Website
Any feedback greatly appreciated =)

waterlaz
Member
Posts: 17
Joined: Wed Aug 27, 2014 4:16 pm
Sound Card: Audigy 2 value
OS: gentoo linux

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby waterlaz » Tue Sep 02, 2014 4:56 pm

To make life easier there is now a "make install" and a script skype_oss that launches skype with the fake lib. So replacing the original libpulse.so (if you even had it) is not necessary

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby igorzwx » Thu Sep 04, 2014 12:57 am

waterlaz wrote:To make life easier there is now a "make install" and a script skype_oss that launches skype with the fake lib. So replacing the original libpulse.so (if you even had it) is not necessary


Thanks!

It seems to work with skype-ubuntu-precise_4.3.0.37-1_i386.deb

However, before starting the "magic wrapper", you may need to kill Banshee and Firefox.
Otherwise, you may get sound distortions with Skype.

Code: Select all

$ killall banshee
$ killall firefox


It seems that Banshee or Adobe Flash plugin may somehow "privatize" the sound device and create problems for the "magic wrapper".

This should be tested more carefully, of course.

How to install [on Linux Mint MATE]

Code: Select all

$ mkdir mumu
$ cd mumu
$ git clone https://github.com/waterlaz/skype_oss_wrapper.git skype_oss_wrapper-git
$ ls
skype_oss_wrapper-git 
$ cd skype_oss_wrapper-git 
$ PREFIX=/opt/skype_oss_wrapper make
$ sudo checkinstall -D --install=no --pkgname=skype-oss-wrapper --pkgversion=20140905
$ sudo dpkg -i skype-oss-wrapper*.deb


NOTE: You can use the current date as the "pkgversion".

As a result, the "magic wrapper" will be installed into:

Code: Select all

/opt/skype_oss_wrapper/bin/skype_oss
/opt/skype_oss_wrapper/lib/skype_oss_wrapper/libpulse.so.0


Code: Select all

$ cat installer
#!/bin/sh
mkdir -p $DESTDIR//opt/skype_oss_wrapper/lib/skype_oss_wrapper && mkdir -p $DESTDIR//opt/skype_oss_wrapper/bin && cp skype_oss $DESTDIR//opt/skype_oss_wrapper/bin/ && cp libpulse.so.0 $DESTDIR//opt/skype_oss_wrapper/lib/skype_oss_wrapper/


Code: Select all

$ cat skype_oss
#!/bin/sh
LD_LIBRARY_PATH=/opt/skype_oss_wrapper/lib/skype_oss_wrapper:$LD_LIBRARY_PATH skype


Now, you can install a symbolic link to the magic wrapper into /usr/bin

Code: Select all

$ sudo ln -s /opt/skype_oss_wrapper/bin/skype_oss /usr/bin/skype_oss


To run the "magic wrapper" together with Skype, type on terminal:

Code: Select all

$ skype_oss


You may add this command to the menu, or create a launcher on the panel.


NOTE: The script "skype_oss" launches skype with the fake lib "/opt/skype_oss_wrapper/lib/skype_oss_wrapper/libpulse.so.0"

Since /opt/skype_oss_wrapper/lib/ is not in the default "PATH", the "fake lib" might be "invisible" for other applications. This may prevent troubles with other audio applications.


To remove the "magic wrapper" completely, run:

Code: Select all

$ sudo dpkg --purge skype-oss-wrapper
Last edited by igorzwx on Fri Sep 05, 2014 3:40 pm, edited 4 times in total.

nuc
Moderator
Posts: 109
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: PowerColor DEVIL HDX
OS: ArchLinux
Contact:

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby nuc » Thu Sep 04, 2014 1:37 am

For everybody out there using Arch, I have created a PKGBUILD on AUR for your convinience.

Thanks for that awesome piece of work waterlaz!
Check out my effort on revamping the opensound website => github.com/Nuc1eoN/4Front-Tech-Website
Any feedback greatly appreciated =)

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby igorzwx » Fri Sep 05, 2014 3:53 pm

nuc wrote:For everybody out there using Arch, I have created a PKGBUILD on AUR for your convinience.


Perhaps, it is not necessary to install the "magic wrapper" into /usr
You may simply install it into /opt, for example:

Code: Select all

$ PREFIX=/opt/skype_oss_wrapper make


Then, you may create a symlink to the executable script in /usr/bin

Code: Select all

$ sudo ln -s /opt/skype_oss_wrapper/bin/skype_oss /usr/bin/skype_oss


You may also create "skype_oss_wrapper.desktop" and install it to /usr/share/applications/

Code: Select all

$ sudo cp skype_oss_wrapper.desktop /usr/share/applications/


Example:

Code: Select all

$ cat skype_oss_wrapper.desktop
[Desktop Entry]
Name=Skype oss_wrapper
Comment=Skype Internet Telephony
Exec=skype_oss %U
Icon=skype.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
MimeType=x-scheme-handler/skype;
X-KDE-Protocols=skype


"*.desktop" is an ordinary txt-file, which can be created with a text editor.

To create such file, you can simply execute this command:

Code: Select all

$ echo "[Desktop Entry]
Name=Skype oss_wrapper
Comment=Skype Internet Telephony
Exec=skype_oss %U
Icon=skype.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
MimeType=x-scheme-handler/skype;
X-KDE-Protocols=skype" > skype_oss_wrapper.desktop


Then you can view the content of this file on terminal:

Code: Select all

$ cat skype_oss_wrapper.desktop


or open it with a text editor of your choice:

Code: Select all

$ pluma skype_oss_wrapper.desktop


Code: Select all

$ nohup kate skype_oss_wrapper.desktop & rm -f nohup.out


To enable this "application launcher", you can copy it to /usr/share/applications/

Code: Select all

$ sudo cp skype_oss_wrapper.desktop /usr/share/applications/


Code: Select all

$ ls /usr/share/applications/ | grep skype
skype.desktop
skype_oss_wrapper.desktop


Do they have any standards for installing "third party packages" on Arch Linux, or they are a sort of anarchists?
Attachments
skype_oss_wrapper-desktop.tar.gz
Desktop launcher for skype_oss
(345 Bytes) Downloaded 872 times

nuc
Moderator
Posts: 109
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: PowerColor DEVIL HDX
OS: ArchLinux
Contact:

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby nuc » Fri Sep 05, 2014 4:59 pm

Yes of course I could, but as far as I understand the Arch packaging guidelines state it should go into /usr(/lib). And whats the difference in the end? If the end user even cares he can modify the PKGBUILD and install it into /opt.

Thanks for the .desktop file however, I thought of doing one but didn't know if it was worth it. I'll include that one.
Check out my effort on revamping the opensound website => github.com/Nuc1eoN/4Front-Tech-Website
Any feedback greatly appreciated =)

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby igorzwx » Fri Sep 05, 2014 5:16 pm

nuc wrote:Yes of course I could, but as far as I understand the Arch packaging guidelines state it should go into /usr(/lib). And whats the difference in the end? If the end user even cares he can modify the PKGBUILD and install it into /opt.


Those "Arch_packaging_standards" seem to be "guidelines" for the standard Linux packages. They may not necessarily apply to "experimental tools".
This might be clarified on the Arch forum.

The problem is that the "magic wrapper" does produce sound distortions with Skype, if the sound device is already "privatized" by Banshee, or Adobe Flash plugin, or else.
It may also produce problems for other audio applications, if, by some strange chance, they find that "fake lib" and try to use it.

Since /opt/skype_oss_wrapper/lib/ is not in the default "PATH", the "fake lib" might be "invisible" for other applications. This may prevent troubles with other audio applications.

Xylemon
Member
Posts: 28
Joined: Tue Aug 19, 2014 2:53 pm
Sound Card: Creative X-Fi Xtreme
OS: Slackware Linux

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby Xylemon » Sun Oct 12, 2014 8:37 pm

I was wondering, could this wrapper could be applied to other programs that use PulseAudio?

waterlaz
Member
Posts: 17
Joined: Wed Aug 27, 2014 4:16 pm
Sound Card: Audigy 2 value
OS: gentoo linux

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby waterlaz » Sun Oct 12, 2014 9:01 pm

Xylemon wrote:I was wondering, could this wrapper could be applied to other programs that use PulseAudio?

Well... there is a reeaaaly small chance of it working :)

Xylemon
Member
Posts: 28
Joined: Tue Aug 19, 2014 2:53 pm
Sound Card: Creative X-Fi Xtreme
OS: Slackware Linux

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby Xylemon » Sun Oct 12, 2014 9:16 pm

waterlaz wrote:
Xylemon wrote:I was wondering, could this wrapper could be applied to other programs that use PulseAudio?

Well... there is a reeaaaly small chance of it working :)

Hmm, I was curious because TeamSpeak 3 has issues with ALSA emulation (see here:http://www.opensound.com/forum/viewtopic.php?f=3&t=5779&sid=1f7eef38e1b7a6ae4ec74c52eb24365a) and if there was some PulseAudio wrapper, we could fix the broken mic with TS3. This wrapper doesn't require PulseAudio to be installed correct?

waterlaz
Member
Posts: 17
Joined: Wed Aug 27, 2014 4:16 pm
Sound Card: Audigy 2 value
OS: gentoo linux

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby waterlaz » Sun Oct 12, 2014 9:27 pm

Hmm, I was curious because TeamSpeak 3 has issues with ALSA emulation (see here:http://www.opensound.com/forum/viewtopic.php?f=3&t=5779&sid=1f7eef38e1b7a6ae4ec74c52eb24365a) and if there was some PulseAudio wrapper, we could fix the broken mic with TS3. This wrapper doesn't require PulseAudio to be installed correct?


I guess I could take a look at it. It does not require pulseaudio but it does need OSSv4

Xylemon
Member
Posts: 28
Joined: Tue Aug 19, 2014 2:53 pm
Sound Card: Creative X-Fi Xtreme
OS: Slackware Linux

Re: Skype with OSS(a wrapper to mimic pulseaudio)

Postby Xylemon » Sun Oct 12, 2014 11:11 pm

waterlaz wrote:
Hmm, I was curious because TeamSpeak 3 has issues with ALSA emulation (see here:http://www.opensound.com/forum/viewtopic.php?f=3&t=5779&sid=1f7eef38e1b7a6ae4ec74c52eb24365a) and if there was some PulseAudio wrapper, we could fix the broken mic with TS3. This wrapper doesn't require PulseAudio to be installed correct?


I guess I could take a look at it. It does not require pulseaudio but it does need OSSv4


That would be great! Also I only install OSS4 for audio nowadays on Linux so that's perfect.


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 2 guests