Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pulseaudio module to provide ohSongcast function?
16-11-2012, 08:25 AM
Post: #11
RE: Pulseaudio module to provide ohSongcast function?
(29-10-2012 11:00 AM)paulw Wrote:  Thank you for the instructions. The ohNet build did not work. I got:-

mkdir -p Generated
o Generated/Devices.mak OpenHome/Net/T4/Templates/DvUpnpMakeDevices.tt -a xml:OpenHome/Net/Service/Services.xml
make: o: Command not found
make: [Generated/Devices.mak] Error 127 (ignored)
Attention: a makefile has been re-generated.
mkdir -p Generated
o Generated/Proxies.mak OpenHome/Net/T4/Templates/CpUpnpMakeProxies.tt -a xml:OpenHome/Net/Service/Services.xml
make: o: Command not found
make: [Generated/Proxies.mak] Error 127 (ignored)
Attention: a makefile has been re-generated.
mkdir -p Build/Obj/Posix/Release/
{output removed no error messages here}
rsync -u Os/*.inl Build/Include/OpenHome
gcc -o Build/Obj/Posix/Release/CpiDeviceUpnp.o -c -fexceptions -Wall -pipe -D_GNU_SOURCE -D_REENTRANT -DDEFINE_LITTLE_ENDIAN -DDEFINE_TRACE -O2 -fvisibility=hidden -Wno-psabi -fPIC -Werror -IBuild/Include/ OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp
OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp: In member function ‘virtual void OpenHome::Net::CpiDeviceUpnp::Release()’:
OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp:188:12: error: deleting object of polymorphic class type ‘OpenHome::Net::CpiDeviceUpnp’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp: In destructor ‘OpenHome::Net::CpiDeviceUpnp::~CpiDeviceUpnp()’:
OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp:196:12: error: deleting object of polymorphic class type ‘OpenHome::Net::CpiDeviceUpnp::Invocable’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
cc1plus: all warnings being treated as errors
make: *** [Build/Obj/Posix/Release/CpiDeviceUpnp.o] Error 1

I am getting exactly the same error messages when trying to build on a Raspberry Pi. OS = wheezy Raspbian. gcc = 4.6.3

Any suggestions are very welcome!
Find all posts by this user
16-11-2012, 09:13 AM
Post: #12
RE: Pulseaudio module to provide ohSongcast function?
(16-11-2012 08:25 AM)guussie Wrote:  I am getting exactly the same error messages when trying to build on a Raspberry Pi. OS = wheezy Raspbian. gcc = 4.6.3

Any suggestions are very welcome!

Do you have the latest ohNet source? The fixes for the warnings Paul reported were all committed on 30th October.

Can you try

cd ohNet
git pull
make


from the command line and post the output this generates please?
Find all posts by this user
16-11-2012, 01:29 PM
Post: #13
RE: Pulseaudio module to provide ohSongcast function?
(16-11-2012 09:13 AM)simonc Wrote:  
(16-11-2012 08:25 AM)guussie Wrote:  I am getting exactly the same error messages when trying to build on a Raspberry Pi. OS = wheezy Raspbian. gcc = 4.6.3

Any suggestions are very welcome!

Do you have the latest ohNet source? The fixes for the warnings Paul reported were all committed on 30th October.

Can you try

cd ohNet
git pull
make


from the command line and post the output this generates please?

The source seemed to be up to date.

This is the result:

pi@TinyDSi ~/ohNet $ sudo git pull
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0)
Unpacking objects: 100% (1/1), done.
From https://github.com/openhome/ohNet
* [new tag] ohNet_1.0.458 -> ohNet_1.0.458
Already up-to-date.
pi@TinyDSi ~/ohNet $ make
Machine reported by compiler is: arm-linux-gnueabihf
Machine reported by uname is: Linux
Building for system Linux and architecture armhf
mkdir -p Generated
o Generated/Devices.mak OpenHome/Net/T4/Templates/DvUpnpMakeDevices.tt -a xml:OpenHome/Net/Service/Services.xml
make: o: Command not found
make: [Generated/Devices.mak] Error 127 (ignored)
Attention: a makefile has been re-generated.
mkdir -p Generated
o Generated/Proxies.mak OpenHome/Net/T4/Templates/CpUpnpMakeProxies.tt -a xml:OpenHome/Net/Service/Services.xml
make: o: Command not found
make: [Generated/Proxies.mak] Error 127 (ignored)
Attention: a makefile has been re-generated.
mkdir -p Build/Obj/Posix/Release/
mkdir: cannot create directory `Build': Permission denied
make: *** [make_obj_dir] Error 1

I am not a Linux specialist but it seems that the o command does not work. Would I need a separate package for this?

Thanks
Find all posts by this user
16-11-2012, 04:38 PM (This post was last modified: 17-11-2012 11:10 AM by simonc.)
Post: #14
RE: Pulseaudio module to provide ohSongcast function?
It looks like the build is failing on the Generated* targets at the bottom of Common.mak. These are dependencies of the generate-makefiles target. Which shouldn't be required as far as I can tell...

Can you try running

make all native_only=yes

? If that fails with the same output, you may need to run

make tt uset4=yes

Note that this depends on Mono. If you're trying to build on Raspberry Pi, you'd need to install additional packages. If you don't want these (sizeable) additional packages, you could try debugging why these dependencies are getting pulled in and submit a patch to fix it.
Find all posts by this user
18-11-2012, 10:24 PM
Post: #15
RE: Pulseaudio module to provide ohSongcast function?
(16-11-2012 04:38 PM)simonc Wrote:  It looks like the build is failing on the Generated* targets at the bottom of Common.mak. These are dependencies of the generate-makefiles target. Which shouldn't be required as far as I can tell...

Can you try running

make all native_only=yes

? If that fails with the same output, you may need to run

make tt uset4=yes

Note that this depends on Mono. If you're trying to build on Raspberry Pi, you'd need to install additional packages. If you don't want these (sizeable) additional packages, you could try debugging why these dependencies are getting pulled in and submit a patch to fix it.

I have tried the first command. The machine works for a long time but there are still the same error messages. The main problem seems to be that command o is not recognised.

I have tried to install mon using instructions from the mono web site but this does not work (the wheezy version is still in a testing phase). Perhaps I should downgrade to an earlier debian distribution.

There seem to be dependencies that don't get installed and I am not quite sure why everythings seems to be linked to .NET.

I will not have time to work on this in the coming weeks but will pick it up again early next year.

Thanks for all the suggestions.
Find all posts by this user
21-02-2013, 09:19 PM (This post was last modified: 21-02-2013 09:23 PM by rudi.)
Post: #16
RE: Pulseaudio module to provide ohSongcast function?
I also first thought about writing Pulseaudio module. But documentation is awful. Then I remembered that each Pulseaudio sink has a monitor from which a recording client could get any program's output. To get rid of Pulseaudio's resampling issues I figured that I could use Alsa's file plugin.
Steps:
  1. Create a fifo for alsa to write to:
    Code:
    $ mkfifo /tmp/alsa.fifo
  2. Edit your .asoundrc to redirect sound by default to that fifo:
    Code:
    pcm.!default plug:fifo
    pcm.fifo {
        type file
        slave.pcm null
        file /tmp/alsa.fifo
        format "wav"
    }
    pcm.null {
        type null
    }
    Slave null could also be replaced with a real sound card.
  3. Put WavSender to read that fifo:
    Code:
    WavSender -f /tmp/alsa.fifo

Currently WavSender can not handle fifos but fixing should be easy.

Alsa closes the fifo when no more sound is available so WavSender could just open it again for reading and waiting for more sound. Alsa also provides proper headers for wav output so any sample rate, size and number of channels could be supported.

OhNet and ohSoncast with WavSender compiled without problems on Debian Wheezy. WavSender works with regular wav-file and Linn DSM. I think this will be my way of delivering Spotify on Linux to Linn DSM. It will fit nicely on my virtual machine for media also running rygel and spotcommander. Spotify also delivers information about playing track with D-BUS and WavSender could put that information to Songcast stream.
Find all posts by this user
17-03-2013, 09:44 PM
Post: #17
RE: Pulseaudio module to provide ohSongcast function?
(21-02-2013 09:19 PM)rudi Wrote:  I also first thought about writing Pulseaudio module. But documentation is awful. Then I remembered that each Pulseaudio sink has a monitor from which a recording client could get any program's output. To get rid of Pulseaudio's resampling issues I figured that I could use Alsa's file plugin.
Steps:
  1. Create a fifo for alsa to write to:
    Code:
    $ mkfifo /tmp/alsa.fifo
  2. Edit your .asoundrc to redirect sound by default to that fifo:
    Code:
    pcm.!default plug:fifo
    pcm.fifo {
        type file
        slave.pcm null
        file /tmp/alsa.fifo
        format "wav"
    }
    pcm.null {
        type null
    }
    Slave null could also be replaced with a real sound card.
  3. Put WavSender to read that fifo:
    Code:
    WavSender -f /tmp/alsa.fifo

Currently WavSender can not handle fifos but fixing should be easy.

Alsa closes the fifo when no more sound is available so WavSender could just open it again for reading and waiting for more sound. Alsa also provides proper headers for wav output so any sample rate, size and number of channels could be supported.

OhNet and ohSoncast with WavSender compiled without problems on Debian Wheezy. WavSender works with regular wav-file and Linn DSM. I think this will be my way of delivering Spotify on Linux to Linn DSM. It will fit nicely on my virtual machine for media also running rygel and spotcommander. Spotify also delivers information about playing track with D-BUS and WavSender could put that information to Songcast stream.

You were right. It is totally possible to use ALSA pipe output and use it with WavSender. Not the best solution, as PulseAudio seems to be much more popular on desktop, but still good enough.

Thanks for the tip, rudi!
Find all posts by this user
22-09-2013, 10:49 PM
Post: #18
RE: Pulseaudio module to provide ohSongcast function?
Hi All, There has been some very good progress on the pulseaudio raop2 ( see https://bugs.freedesktop.org/show_bug.cgi?id=42804 & http://hfujita.github.io/pulseaudio-raop2/). So we can have pulseaudio sending udp packets ( albeit in Airplay format). Also I have just noticed the vlc songcast plugin in http://forums.linn.co.uk/bb/showthread.p...888&page=3 (which I have yet to build correctly so cannot assess whether there is a quality difference with this).

Maybe it will not be too long before the raop2 work can be adjusted to make a songcast module although for my purposes I am delighted to have the raop2 functionality from my linux box.
Find all posts by this user


Forum Jump: