|
2010-01-16
, 14:19
|
Posts: 27 |
Thanked: 2 times |
Joined on Dec 2009
@ Sydney, Australia
|
#52
|
|
2010-01-16
, 17:26
|
Posts: 130 |
Thanked: 51 times |
Joined on Sep 2009
|
#53
|
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
|
2010-01-19
, 06:25
|
Posts: 3 |
Thanked: 4 times |
Joined on Dec 2009
@ Netherlands (Eindhoven)
|
#54
|
The Following User Says Thank You to josetaza For This Useful Post: | ||
|
2010-01-19
, 08:35
|
|
Posts: 266 |
Thanked: 157 times |
Joined on Oct 2009
|
#55
|
|
2010-01-19
, 12:04
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#56
|
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.
The Following 4 Users Say Thank You to thp For This Useful Post: | ||
|
2010-01-19
, 12:11
|
|
Posts: 559 |
Thanked: 1,017 times |
Joined on May 2008
@ Finland
|
#57
|
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 User Says Thank You to OVK For This Useful Post: | ||
|
2010-01-20
, 14:01
|
Posts: 247 |
Thanked: 91 times |
Joined on Jan 2008
@ London/M4 Corridor
|
#58
|
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..
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
The Following 3 Users Say Thank You to Alan_Peery For This Useful Post: | ||
|
2010-01-20
, 20:07
|
Posts: 53 |
Thanked: 49 times |
Joined on Jun 2007
|
#59
|
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
The Following User Says Thank You to VRe For This Useful Post: | ||
|
2010-01-21
, 09:18
|
Posts: 729 |
Thanked: 155 times |
Joined on Dec 2009
|
#60
|
The Following User Says Thank You to DaSilva For This Useful Post: | ||
thanks!
btw. this should be included in firmware release with an option in settings to switch off if needed to