Active Topics

 



Notices


Reply
Thread Tools
Posts: 93 | Thanked: 16 times | Joined on Nov 2009 @ UK
#51
just found it in extras

thanks!

btw. this should be included in firmware release with an option in settings to switch off if needed to
 
Posts: 27 | Thanked: 2 times | Joined on Dec 2009 @ Sydney, Australia
#52
exactly what ive needed - thanks!
 
Posts: 130 | Thanked: 51 times | Joined on Sep 2009
#53
Originally Posted by thp View Post
No, right now it just pauses the player whenever the headphone is unplugged. There are some caveats to having it resume playback on reconnect (especially where more applications are concerned).

One example: Assume you have Media Player and Panucci open. It's okay to send a "pause" signal to both. You probably don't want to send a "resume" signal to both, however. Which one to choose then? It's not really obvious. The code is open, so if you want to give it a shot, feel free to do so
Thx. Ok, i can get that this is not as easy as i thought. When i get an idea i will ask again
 
Posts: 3 | Thanked: 4 times | Joined on Dec 2009 @ Netherlands (Eindhoven)
#54
About the resume play when the headphone is re-connected:
I started on developing an application where this should be possible. As user of this application you are able to select what should be done (play/pause) when the headphone is connected or disconnected.
Eventualy I want it to be capable of doing more than react on connected headphones. See also:
https://garage.maemo.org/projects/actionmanager/

Currently it does pause the mediaplayer when disconnecting the headphone and start playing again when connected, but this is fixed. No UserInterface is made yet for changing settings.

Unfortunatly I havent been able to upload this to the repository yet. So be patient...
 

The Following User Says Thank You to josetaza For This Useful Post:
unkno's Avatar
Posts: 266 | Thanked: 157 times | Joined on Oct 2009
#55
I have a question...if headphoned is kept running in the background, won't it eat up CPU cycles? If it does eat a noticeable amount, is it possible to code it in such a way that it will only run when it detects the headphone is connected and also end the task after pausing when headphones are removed.

Edit: I also agree that this should be included in the next firmware (as a setting)...maybe someone should make a bugzilla report asking for an enhancement.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#56
Originally Posted by unkno View Post
I have a question...if headphoned is kept running in the background, won't it eat up CPU cycles? If it does eat a noticeable amount, is it possible to code it in such a way that it will only run when it detects the headphone is connected and also end the task after pausing when headphones are removed.
That's actually how it works: headphoned installs a I/O watch that gets executed every time the state file changes (which is only when the headphones get plugged/unplugged). After that, it notifies all known media players and then returns to the main loop which again is waiting for I/O (by blocking on the state file). If you use "ps", you should see that headphoned is sleeping ("S") most of the time.

The only thing that headphoned uses constantly is a bit of your main memory.

See http://git.maemo.org/git/headphoned/...c/headphoned.c
 

The Following 4 Users Say Thank You to thp For This Useful Post:
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#57
Originally Posted by thp View Post
That's actually how it works: headphoned installs a I/O watch that gets executed every time the state file changes (which is only when the headphones get plugged/unplugged). After that, it notifies all known media players and then returns to the main loop which again is waiting for I/O (by blocking on the state file). If you use "ps", you should see that headphoned is sleeping ("S") most of the time.

The only thing that headphoned uses constantly is a bit of your main memory.

See http://git.maemo.org/git/headphoned/...c/headphoned.c
Would it be possible to expand the functions of headphoned app so that it could also give other commands than just pause to Mediaplayer?

The case that I have in mind is the wired remotes that Nokia has available. Those have for example volume buttons and play/pause/forward etc.

This subject is also discussed here: http://talk.maemo.org/showthread.php?t=21182 (see the pages 3 and 4). I already mentioned your app there.
 

The Following User Says Thank You to OVK For This Useful Post:
Posts: 247 | Thanked: 91 times | Joined on Jan 2008 @ London/M4 Corridor
#58
Originally Posted by adolfotregosa View Post
How about pausing the player when a2dp is disconnected ??

N97 had this detail while the n900 does not, and on the car it really makes a diference..
Originally Posted by thp View Post
You can check out the code from https://garage.maemo.org/projects/headphoned and add the code

If you send me some a2dp hardware, I can try to implement it
Send me a PM with details, I'll send you a BH-103 as a thank you for the work you've done already.

If you find a way to have separate volume levels for speaker, headphones, and A2DP, you'll make me happy on my train commutes. :-)
 

The Following 3 Users Say Thank You to Alan_Peery For This Useful Post:
Posts: 53 | Thanked: 49 times | Joined on Jun 2007
#59
Originally Posted by thp View Post
No, right now it just pauses the player whenever the headphone is unplugged. There are some caveats to having it resume playback on reconnect (especially where more applications are concerned).

One example: Assume you have Media Player and Panucci open. It's okay to send a "pause" signal to both. You probably don't want to send a "resume" signal to both, however. Which one to choose then? It's not really obvious. The code is open, so if you want to give it a shot, feel free to do so
Installed headphoned and pausing works perfectly!

For replay I started thinking.. if the supported players are more or less known, it is possible to check which ones are running. If there is only one program running, there is no problem in choosing. If there is more than one program running, a dialog could be show listing the programs i.e. "Headphones reconnected, continue playing with [panucci] [media player] [none]?"
 

The Following User Says Thank You to VRe For This Useful Post:
Posts: 729 | Thanked: 155 times | Joined on Dec 2009
#60
I think only one player is actively playing something at the same time so is it possible to detect it and then resume it when the headphones are being reconnected?
 

The Following User Says Thank You to DaSilva For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:36.