maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [application] pyRadio (Pandora) (https://talk.maemo.org/showthread.php?t=56036)

fatalsaint 2010-06-13 22:06

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by ceevee (Post 713716)
Is there a way you could put the artist and song title under the album art as well?

Sometimes the length of the title and artist is too long to see completely on the top bar.

Yes, I think I will do this. I can't find a way to 'scroll' it like I wanted.

fatalsaint 2010-06-14 22:23

Re: [application] pyRadio (Pandora)
 
So, other than the song title and artist moving (which is done in my current build)...

Any other comments? I'm still looking at the gstreamer thing but haven't had it happen to me for a few days now.. how often is the random stopping of music for people?

Dont really want to release a 1.2 with nothing but a change to the Label...

fatalsaint 2010-06-15 05:58

Re: [application] pyRadio (Pandora)
 
haha... rather big bug. Do me a favor and don't enable your FM Transmitter before launching the app. Nothing will work :D.

This bug is a glaring example of my one largest gripe about Python syntax. No end tags, everything is based on proper tabbing >.>. One stupid extra tab and poof... broken interface lol.

Ill have a new fix up tonight with the Label change and this bug addressed. I rebooted my phone couple of times today trying to figure out why the hell it wasn't working :D.

Flandry 2010-06-15 06:18

Re: [application] pyRadio (Pandora)
 
I haven't installed this yet but have been enjoying pianobar for a couple weeks now after tiring of my own music collection. One thing i was wondering about on reading about a "pure python implementation" is, how does using python for everything affect the CPU usage and run time of pandora on N900?

Also, someone mentioned that this fixes dropouts in playback when going through poor reception areas. Is there a reason for this to be expected with pyRadio vs. pianobar?

I still haven't installed pyqt but will probably do so soon and this will be one of the apps i take a look at. Thanks for your work on pandora options. :)

fatalsaint 2010-06-15 06:29

Re: [application] pyRadio (Pandora)
 
Not really sure how big of a difference it is but watching top while listening shows 34% cpu usage, with pyradio at betwen 15-20% and pulseaudio itself at 20%+. Now those numbers dont match because watching /proc/cpuinfo shows the processor bouncing between 250 and 500. I notice no system slowdowns.

The reason for better play is pianobar uses libao/libmad with no buffer to playback audio. pyRadio uses gstreamer which utilizes a buffer allowing for brief interruptions in connection.

Flandry 2010-06-15 06:44

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by fatalsaint (Post 715679)
Not really sure how big of a difference it is but watching top while listening shows 34% cpu usage, with pyradio at betwen 15-20% and pulseaudio itself at 20%+. Now those numbers dont match because watching /proc/cpuinfo shows the processor bouncing between 250 and 500. I notice no system slowdowns.

I get 10 PA and 10 media player vs. about 15 PA and 22 pianobar. 20% seems really high for PA. :confused:

Quote:

The reason for better play is pianobar uses libao/libmad with no buffer to playback audio. pyRadio uses gstreamer which utilizes a buffer allowing for brief interruptions in connection.
Interesting. In walking around my building, i actually thought there was a buffer in pianobar because the music seemed to stop awhile after going out of wifi range and take awhile to start after returning. Interesting to know it's just my perception. :D

Does the fact pyRadio uses gstreamer mean that it will playback properly through headphones in silent profile?

qwerty12 2010-06-15 06:57

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by Flandry (Post 715689)
Does the fact pyRadio uses gstreamer mean that it will playback properly through headphones in silent profile?

Not exactly: https://bugs.maemo.org/show_bug.cgi?id=6694

Flandry 2010-06-15 07:27

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by qwerty12 (Post 715699)

That bug tracker "dialogue" depresses me. :(

Thanks, qwerty.

fatalsaint, can you please use this workaround or the one in comments 29/30? It's really obnoxious for my coworkers when i'm listening to pandora and get an SMS or incoming call and it blasts the notification from the speaker...

fatalsaint 2010-06-15 13:04

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by Flandry (Post 715689)
I get 10 PA and 10 media player vs. about 15 PA and 22 pianobar. 20% seems really high for PA. :confused:

There's a few threads around about high pulseaudio usage. It happens with anything that plays any sound.. watch your top when you receive an SMS you'll see it spike too.

The question I have: Is it 20% of 250, or 500, 650... the damn CPU is near constantly ticking up, down, up down, on my phone so I have no idea. If it's 20% of 250 that's not that bad.. if it's 20% of the full processor speed that's a bit of a nuisance.

If I watch it pyradio goes from between 10 up to 20 max, while PA is all over the place. Don't think I saw it go much below 15 though.. so how the media player only has it at 10 I don't know.

Quote:

Interesting. In walking around my building, i actually thought there was a buffer in pianobar because the music seemed to stop awhile after going out of wifi range and take awhile to start after returning. Interesting to know it's just my perception. :D

Does the fact pyRadio uses gstreamer mean that it will playback properly through headphones in silent profile?
Nope, no buffer for pianobar. If you're in weak 3G areas it becomes apparent because it'll play half a second and stop, then again and stop, constantly. pianobar will play music the instant it gets a stream and that gets old quick.

Gstreamer, OTOH, if it loses network connection too long for some reason simply refuses to start up again :mad:. You'll just get silence until the end of the song and then it starts the next song and plays just fine (alternatively, skipping to the next song also brings it back.)

Silent: Just tested, No. (thanks Qwerty).

Quote:

fatalsaint, can you please use this workaround or the one in comments 29/30? It's really obnoxious for my coworkers when i'm listening to pandora and get an SMS or incoming call and it blasts the notification from the speaker...
I will try. Let you know how it goes.

fatalsaint 2010-06-15 15:10

Re: [application] pyRadio (Pandora)
 
I am having no luck figuring out how in the hell to create a pulseaudio proplist in python.

Code:

pulsesink = gst.get_element_factory_make("pulsesink", "pulsesink")
proplist = gobject.list_properties(pulsesink)
for property in proplist:
    print property.name + " " + str(pulsesink.get_property(property.name)

Clearly shows that pulsesink has a proplist "property" ... but is evidently by default set to a NoneType.

It is supposed to be a type of GParamPointer if I dump just the list_properties out to a terminal. But I can find no help on actually creating a proplist from scratch, and then modifying this "event.id" property of that. I'm at a loss.

Basically, if anyone can tell me how to do this:
Code:

pa_proplist *proplist = pa_proplist_new ();
pa_proplist_sets (proplist, PA_PROP_EVENT_ID, "ringtone-preview");

In python.. I would appreciate it.


All times are GMT. The time now is 05:23.

vBulletin® Version 3.8.8