Go to advanced search

by elParaguayo
Sat Oct 15, 2016 9:03 am
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

It's got some additional error handling code in there but should alert you if there's been an error!

However, if mpc/mpd does crash then I don't think my current error handling code will sort it. Keep me posted!
by elParaguayo
Sat Oct 15, 2016 8:51 am
Forum: Python
Topic: Adafruit PiTFT - How to access these tactile Buttons?
Replies: 10
Views: 13586

Re: Adafruit PiTFT - How to access these tactile Buttons?

Wow. I'd forgotten I wrote that code!

Hope it still works ok.
by elParaguayo
Fri Oct 14, 2016 11:30 am
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

Texy, Can't help on the bluetooth bit (other than wonder if the car is using AVRCP 1.6). On the Airplay, hard for me to answer as I only have an iPhone because of work and don't have any other apple device so I'm not best qualified here. However, I thought iPhones could only output to one speaker bu...
by elParaguayo
Thu Oct 13, 2016 10:01 am
Forum: Python
Topic: Multiprocessing on Raspberry
Replies: 66
Views: 10796

Re: Multiprocessing on Raspberry

There is a method to count active threads: https://docs.python.org/2/library/threa ... ctiveCount
by elParaguayo
Thu Oct 13, 2016 8:30 am
Forum: Python
Topic: Multiprocessing on Raspberry
Replies: 66
Views: 10796

Re: Multiprocessing on Raspberry

It's just an idea. I wondered if the threads weren't being cleaned up properly so you had a hundred different threads running.

The new code just has 2 threads. They watch a queue and take data from it. The number of threads never increase.
by elParaguayo
Thu Oct 13, 2016 6:59 am
Forum: Python
Topic: Multiprocessing on Raspberry
Replies: 66
Views: 10796

Re: Multiprocessing on Raspberry

Actually - I had a few minutes this morning after all. I can't test this, but try the following: #!/usr/bin/env python from random import randint from glob import glob from os.path import join, dirname from Queue import Queue from kivy.app import App from kivy.clock import Clock from kivy.core.windo...
by elParaguayo
Thu Oct 13, 2016 5:48 am
Forum: Python
Topic: Multiprocessing on Raspberry
Replies: 66
Views: 10796

Re: Multiprocessing on Raspberry

OK. Maybe it's worth doing this another way.

If you are doing one request, say, every 5 seconds then we could just use a couple of threads with the data going into a queue.

I'm happy to show you the code but can't do until the weekend.
by elParaguayo
Wed Oct 12, 2016 9:39 pm
Forum: Python
Topic: Multiprocessing on Raspberry
Replies: 66
Views: 10796

Re: Multiprocessing on Raspberry

That's a lot of threads and requests to be running simultaneously. Sounds far too many to me.
by elParaguayo
Wed Oct 12, 2016 3:47 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

I don't know about the last bit, but artwork isn't listed in available properties in the bluez documentation.

A quick google search also seems to suggest that artwork is not part of the AVRCP spec.
by elParaguayo
Wed Oct 12, 2016 3:03 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

I did mean to say that the pip install method you suggest on github for dbus-python didn't work for me - I had to apt-get it. Yes - I noticed the same thing when I tried to install the module on my laptop over the weekend. I ended up using apt as well. It's surely to take me some time, but my plan ...
by elParaguayo
Tue Oct 11, 2016 7:46 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

You are most welcome.
by elParaguayo
Mon Oct 10, 2016 11:07 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

I just toook a quick look at your wrapper code, and a very cursory look at the bluetoothmode stuff. Very nice, much prettier than my mess. I have to say I don't like the polling versus using the gobject mainloop and callback functions, but I can't give a good reason why. Whatever works, works. If y...
by elParaguayo
Mon Oct 10, 2016 10:22 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

Sorry - just picked up your reply. I've spent all evening starting afresh. So two steps forward, one back :D Airplay now working - picking up correct name, audio is coming out of the USB sound card and metadata is also there - so far so good. Fantastic. Pleased to hear that. So the bad is that blue...
by elParaguayo
Mon Oct 10, 2016 8:11 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

That python error is because of my lazy coding. It doesn't check for the file, it just assumes it's there. However, it should be there if shairport-sync was running properly and it does sound like you've got a few issues. Have you tried stopping the service and then running from the command line to ...
by elParaguayo
Mon Oct 10, 2016 8:13 am
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

Hi, I may be need to start again with a fresh image as I think I broke the shairport-sync install when I added the USB soundcard. I don't get any audio out when selecting airplay. It's not coming out of the pi's on-board jack either. The other thing is that it doesn't pick up the ID that I named it...
by elParaguayo
Mon Oct 10, 2016 7:23 am
Forum: Graphics, sound and multimedia
Topic: MPC hangs after selecting the same station
Replies: 15
Views: 2531

Re: MPC hangs after selecting the same station

I tested with an internet stream so no next song as such.

Tested with intervals of 0, 1, 5 and 10 seconds.
by elParaguayo
Mon Oct 10, 2016 7:21 am
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

Douglas,

I've not done much testing but it does seem that Bluetooth audio with an iPhone is significantly better than android.

The iPhone seemed to play stutter free even when the wifi was still enabled on the pi.
by elParaguayo
Mon Oct 10, 2016 7:04 am
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

You almost certainly don't need to start again.

I think this can be fixed in the shairport sync config file.

I'll post more when I'm in front of my laptop again.
by elParaguayo
Mon Oct 10, 2016 5:40 am
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

Continuous polling isn't particularly elegant or satisfying so i may look to revisit the mainloop bit again.
by elParaguayo
Sun Oct 09, 2016 9:20 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

If anyone's interested in testing, the bluetooth update is here: https://github.com/elParaguayo/PiRadio/tree/bluetooth_update I'll need to add comments and docstrings to the code to tidy it up a bit but it's in pretty good shape for a first stab at this. Douglas - my bluetooth wrapping code is here ...
by elParaguayo
Sun Oct 09, 2016 6:15 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

Bluetooth coming along very nicely now. I've written some simplified python wrappers for the MediaPlayer, Device and Adapter (i.e. cutting out signal handling makes my life easier - I really don't understand mainloops). I've now got the radio scanning for and pairing with/connecting to devices. I'll...
by elParaguayo
Sun Oct 09, 2016 6:08 pm
Forum: Graphics, sound and multimedia
Topic: MPC hangs after selecting the same station
Replies: 15
Views: 2531

Re: MPC hangs after selecting the same station

If I have a playlist of internet radio streams, playing the same index again and again doesn't cause a crash for me. pi@pi-radio:~/PiRadio/modes/lib $ mpc play 1 bbc_radio_one [playing] #1/11 0:00/0:00 (0%) volume: n/a repeat: off random: off single: off consume: off pi@pi-radio:~/PiRadio/modes/lib ...
by elParaguayo
Sun Oct 09, 2016 9:30 am
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

OK. I think I've got an idea how it's all working now.

I'm able to scan for devices, pair and connect from the python code. Just a matter of time of putting it altogether into something neat.

Sadly the week ahead looks pretty painful from a work perspective...
by elParaguayo
Sun Oct 09, 2016 7:05 am
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

Quick disclosure: I'm developing code on my laptop (Ubuntu 16.04) so using its bluetooth adapter. What's interesting is that, if I use the d-feet application (which is a d-bus viewer/debugger), I can see the Connect method on the device and I can run it. If I run it, the phone connects to the laptop...
by elParaguayo
Sat Oct 08, 2016 11:30 pm
Forum: Graphics, sound and multimedia
Topic: (Yet another) Vintage Pi-Radio
Replies: 109
Views: 22238

Re: (Yet another) Vintage Pi-Radio

Well, I've got the name (had to use the properties interface and the Get method, rather than trying to use .Name on the device interface), but now I can't call the Connect method. I can create the Device interface but I get an "Input/Output" error when I try to connect.

Go to advanced search