HTC Audio manager - How does HTC disable suspend mode? - Windows Mobile Development and Hacking General

I just realized that HTC audio manager is the first media player program i've seen for my pocket pc that allows you to "turn off" the device with the power button while music is playing without killing the music. Other programs, like pocket player, tcpmp, and windows media player would all stop the music unless you specifically assigned a "toggle screen" button.
What HTC's program appears to be doing is actually remapping the power button to simply toggle the screen rather than suspend the device, whenever music is playing. You can test this by copying some files in the background. You'll see that when the device is turned off while music is playing, the files keep copying, but not if the music is paused.
I'd love to know how to emulate this functionality in my own programs. Does anyone have any ideas?

It looks, that it doesn't remap power button.
In my BlueAngel (WM6) HTC audio manager stops playing after pressing power button. After short test: it doesn't capture power off butoon, it sets PowerPolicyNotify.
What do you want to get: capturing power button or disallow power-off state?
To capture power button - use SetWindowsHookEx (LoadLibrary, GetProcAddres, and so on).
To disallow power-off state: use PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE), and PowerPolicyNotify(PPN_UNATTENDEDMODE, FALSE) after all.
Unfortunately, both are buggy in my BlueAngel

Related

WMP and the attempt to lock buttons and save power.

When using Windows Media Player, the closest solution I found to saving power on my phone and still have music play is to use the toggle screen function, which turns off the screen but doesn't lock the buttons. I found that annoying when I see my IE open up in my pocket while I try to change songs unnoticing. The more closer solution is to use BT headphones and standby the device, in which the music still plays.
What would be awesome would be (when not using headphones) is to have the device lock with the screen off and have the media player continue to function. Best way was either with the BT headphones, or use "Device Lock" on the today screen. But that just sucks when you have to minimize WMP to do that, and when you have to change songs, you have to unlock it and go through the whole process with a stylus. Redundant and time-wasting.
How does one go about at least locking all the buttons except the directional buttons?
been looking at this today,
found an app here:
http://www.pocketmind.com/
called pocket music, the registered version includes the features you are looking for i think
Features:
- WMA file support. PocketMusic is the first alternative Pocket PC player to Windows Media player with WMA support.
- MP3 and OGG Vorbis support.
- Alarm feature - wake up with your favorite music!
- HTTP streaming audio support for MP3 and Ogg internet radio broadcast. Title streaming also supported (ShoutCast, IceCast).
- Audible audio books support.
- Winamp 2.x skins support (More than 9500 skins are available in the Internet).
- Bookmark feature. This feature is especially useful for those who use the player for listening to audiobooks, recorded radio programs, lectures, DJ sets, and other long-time audio files.
- Extra Bass feature.
- Landscape Mode with large buttons and controls for using in the car.
- PocketMusic Today item � control music playback directly from the Today screen!
- Various Sound Presets for Equalizer and the capability to create your own presets.
- Possibility to change ID3 tags of MP3 files (set track title, artist, album, etc.). ID3 and ID3 v.2 tags support.
- Advanced Playlist Organizer (great for managing song library and playlists!).
- Fast forward/rewind track by adjustable steps from 5 to 120 seconds � useful for audio books.
- Capability to search for songs in a playlist by specific words or quickly find needed entry by number.
- Powerful player control with hardware buttons (Map any action to any hardware button).- Function of mapping +-10 sec rewind action to hardware buttons.
- Optional screen AUTO-TURN OFF fea ture to automatically turn off the screen while music is playing (timer from 5 seconds to 3 minutes). Ability to automatically block hardware buttons when the screen is off.- Ability to block hardware buttons from main menu or even assign one hardware button to lock other keys.
- Feature of scanning all folders (local content) or selected folder on device to find all supported media files and add them to playlist.
- ... other.
Click to expand...
Click to collapse
hope its of some use!
mortplayer does all that for free
zephus said:
When using Windows Media Player, the closest solution I found to saving power on my phone and still have music play is to use the toggle screen function, which turns off the screen but doesn't lock the buttons. I found that annoying when I see my IE open up in my pocket while I try to change songs unnoticing. The more closer solution is to use BT headphones and standby the device, in which the music still plays.
What would be awesome would be (when not using headphones) is to have the device lock with the screen off and have the media player continue to function. Best way was either with the BT headphones, or use "Device Lock" on the today screen. But that just sucks when you have to minimize WMP to do that, and when you have to change songs, you have to unlock it and go through the whole process with a stylus. Redundant and time-wasting.
How does one go about at least locking all the buttons except the directional buttons?
Click to expand...
Click to collapse
If WMP is the only player you want to listen to music on, then there's an app called delta lock that will lock all buttons and turn off the display while your music is still playing. I use this app all the time and not only to listen to music. 2 softkey buttons have to be pushed at the same time to get back to the today screen. You can have it set up using WM5NewMenu, where you can rename the "calendar" button to "Menu" for ex., add delta lock to the list of items, place delta lock(can be renamed to device lock, etc.)at the top of the list, hit the action button(center button in 4way navigation), device locks. Or you can just remap any hardware button to delta lock if you don't want the items in the WM5NewMenu app. There's several ways to do this according to your preferrences, for ex. it can be placed in the start menu, where the lock can be activated no matter where you are on the device.
8125
2.25.11.1
hotdog53 said:
If WMP is the only player you want to listen to music on, then there's an app called delta lock that will lock all buttons and turn off the display while your music is still playing. I use this app all the time and not only to listen to music. 2 softkey buttons have to be pushed at the same time to get back to the today screen. You can have it set up using WM5NewMenu, where you can rename the "calendar" button to "Menu" for ex., add delta lock to the list of items, place delta lock(can be renamed to device lock, etc.)at the top of the list, hit the action button(center button in 4way navigation), device locks. Or you can just remap any hardware button to delta lock if you don't want the items in the WM5NewMenu app. There's several ways to do this according to your preferrences, for ex. it can be placed in the start menu, where the lock can be activated no matter where you are on the device.
8125
2.25.11.1
Click to expand...
Click to collapse
This actually looks promising. Thanks a lot, I'll look into it.
zecoj said:
mortplayer does all that for free
Click to expand...
Click to collapse
just installed mortplayer, so much faster than anything else ive tried and does everything i need thanks.
I have noticed that certain roms i try like the TNT 1933 has the out of box ability to put phone in standby and music will keep playing I however have not been able to find out what they did to achieve this and i have not gotten responses on this subject yet but its there for u to look into as well...
I must also recommend the Mortplayer (links to d/l page). I've used it almost from the beginning of my Wizard adventures. It has all of the features a modder could want:
totally FREE
playlist management
skinnability
album art display
optional landscape mode capable
built in equalization
bass boosting
d-pad function mapping (pause/play, ff, rew, vol up, vol down)
disables screen and all others except power to restore
plays many other music formats besides mp3 and wma
there's even a today plugin available (links to .cab directly)

Audio tweak

I just got my HTC Touch and I'm loving it. I used the built in Audio apps for the first time yesterday (Windows media,Audio Manager, and Music). They worked fine but all had the same quirk. When playing audio the backlight never turned off. I think that is acceptable for video, since you are of course looking at the screen, but for audio you should be able to turn the screen off to preserve power. Is there an option to do this or is it just an oversight.
I tried hitting the power button but it just put the phone in sleep mode and cut/paused the music. I settled for lowering the backlight to its minimum.
Try turning on the Backlight Timer. I think it's disabled by default.
I nornally have this timer enabled, but have the opposite problem that it would then turn off when using GPS navigation (iGuidance). So I now have it disabled.
Search and install a small program called psShutXP. It is quite a nice little program - one of the options it gives you is to shut off your backlight without putting your phone into sleep mode. You could also download GSPlayer, another multimedia program. It also gives you the option of turning off the backlight while music is playing (though you probably don't need to have another audio application installed).
Hope this helps!
You could also try S2P with S2U2. S2P is a very nice looking audio player that has coverflow type browsing. S2U2 is a nice looking screen lock app that will work with it and allows for the backlight to go off and still play music.
I haven't tried the apps listed above yet but mu backlight does go off after a while (as set in the backlight settings). It is the actual screen that doesn't turn off. In other words my screen dims after a set time of no user interaction, but the screen remains on. I'll also try psShutXP and maybe GSPlayer and I'll let you know that happens.
Thanks for the posts
Add the registry key (dword) HKEY_LOCAL_MACHINE\Software\Microsoft\MediaPlayer\Preferences
"UnattendedPlayback" and set to 1 and Windows Media will continue playing after you press the power button.
Mbai2 said:
Add the registry key (dword) HKEY_LOCAL_MACHINE\Software\Microsoft\MediaPlayer\Preferences
"UnattendedPlayback" and set to 1 and Windows Media will continue playing after you press the power button.
Click to expand...
Click to collapse
You would think that it would be an option in media player. I installed psShutXP and it works good. I think that I'll pass on the reg tweak for now, but thanks (I don't feel like loading a reg editing prog.).
In Windows Media, you can set the center button to shut off the screen. Go to Menu - Options and scroll over to Buttons. Click on Toggle Screen and then the Assign button. I picked ENTER, which is the center of the dpad.
Don't know how this works in other programs, but seems (to me) like they should have a similar option.
The media Player option works great however the registry entry did nothing ( and yes I rebooted after the change) I have the Telus Touch P3050
Okay guys after hours and hours of searching and messing with my registry I found a SOLUTION for HTC Audio Manager to stay on after pressing the power button to turn off the screen/suspend........
It is sooooo simple I'm just shaking my head, no more using psshutxp or other screen toggles.
It keeps playing...yayyyyy
First open Reg editor and go to HKLM\Software\HTC\AudioManager\Config
Now create a new "DWord value" name it DisableSuspend and give it a value of 1
(You can also change the value of "enter suspend" to 0 but with my new key it should change it on reboot anyways)
This was done on a Sprint Touch
mond2 said:
I just got my HTC Touch and I'm loving it. I used the built in Audio apps for the first time yesterday (Windows media,Audio Manager, and Music). They worked fine but all had the same quirk. When playing audio the backlight never turned off. I think that is acceptable for video, since you are of course looking at the screen, but for audio you should be able to turn the screen off to preserve power. Is there an option to do this or is it just an oversight.
I tried hitting the power button but it just put the phone in sleep mode and cut/paused the music. I settled for lowering the backlight to its minimum.
Click to expand...
Click to collapse
Both MortPlayer and Kinoma FreePlay are great music apps that will let you turn off the power. Mortplayer has a built in EQ. I used it and loved it for a long time till I plunked down the $30 for Kinoma Play, which freakin' rocks.

[Q] turning off screen during mp3 playback

How do i do this? i cant assign a button for it, i tried searching but those threads were recommending something called pocket shield, but isnt there a way to use the windows media player toggle screen function?
thanks
Use CorePlayer or Pocket Music...they both have features to switch off the screen.
Using Windows Media player you simply power off with the switch on top and the player continues.
take a look here for Windows Media and Core: http://www.ppcmobility.com/forums/showthread.php?t=603
Possible that there's a setting I wasn't aware of in WMP but - I found that when I used WMP for music and hit the sleep button at the top, the music stopped playing - although when I use the music player tab in the TouchFlo3D, it carries on uninterrupted when hitting the sleep button
i dont like the HTC media player, its much easier to search using windows media player.
i used to assign a key to toggle screen when i had my touch dual, but on the HD i cant assign any keys.
any help? if possible i dont want to download a third party media player.
at the moment im just letting the screen turn itself off, but doing so risks my pocket touching the screen and doing stuff
My 2 cents
well I use TF3D for my music needs (it's enough for me) and my solution to turning the screen off (without headphones in, since with them it's not an issue) is with Gyrator which I have set to turn the screen off when I turn the HD upside down.
Just switch off the screen with your power button. It works regardless of whether you're using Coreplayer or native TF3D music player or FM radio. But the wired headset must be plug in for it to work.
An additional tip:
Since the screen is blanked out, how do you change volume and switch channel/song?
My way of doing this is to install AEBplus, and make single press of volume buttons Up and Down arrow key, and double press (you can use long press too, if you so prefer) as volume up and down. In this way, you need not get out of blank screen in order to skip or repeat songs, or to change channel.
Is there anyway of doing this via the htc player from the today screen?
I like the convenience of playing music from this screen. Just need the display to switch off.
Prefer not to install another player then have to search for it to play a bit of music.

Screen off while listening media player

I want to turn off the screen while listening to the media player on the speaker. Normally this can be fixed by configuring a hardware button.
Open up Windows Media Player on your Pocket PC
Tap Menu > Options > tap the right arrow to toggle over to the Buttons tab
Tap the Buttons tab and scroll down the page to the end until you see the "Toggle Screen" option. Tap it to highlight it, then tap the Assign button and then press the button you 'll press to toggle the screen on or off.
Tap OK at the top of the screen and you're done.
Click to expand...
Click to collapse
However, I can not find a button which works. Has anyone an idea to fix this?
yep me too
yep, i have this problem too. like to go to sleep listening to the player but then the light stays on the whole time!
any update
A work around
I have had the same problem. My solution is to use AE button plus.
I've assigned Volume up key as follows. 1 click - up arrow, 2 click - page up and long click - volume up.
(Similar for down volume)
Next in media player I assigned up volume key to toggle screen.
Now when I 1x click volume up the screen toggles, but if I long click I get volume bar which then allows volume keys to work as normal ie Single clicks up/down volume.
alternatively if you're just listening to music you could install nitrogen player. which is far better than the standard media player (imo)
http://www.freewarepocketpc.net/ppc-download-nitrogen-player.html
just press the 'power' icon and the screen will switch off and the audio continue to play.
tracksuit said:
alternatively if you're just listening to music you could install nitrogen player. which is far better than the standard media player (imo)
http://www.freewarepocketpc.net/ppc-download-nitrogen-player.html
just press the 'power' icon and the screen will switch off and the audio continue to play.
Click to expand...
Click to collapse
Pocket music is also good
Nitrogen! It's superb. And, the volume buttons still work with the screen off (although the latest build links its own volume to the system volume which causes problems - I use v1.0 which leaves system volume separate).
You can use PowerOptions to turn off the screen while listening to music, see here :
http://forum.xda-developers.com/showthread.php?t=544475
Trick
Hi,
This is a trick that works with the Touch.
1. play some music with the Headphones jacked in
2. with the headphones still in, turn off the screen
3. pull out your headphones and the mediaplayer will use the built in speaker, even though the screen is OFF.
try it and report the results
no warranty, since it works with my Touch, but I don´t know, it may work with the Diamond II.
Didn´t work
Uhmmmm!!
I got my Diamond 2 last weekend and I tried this without success.
Sorry guys

changing the button behavior of the in-line remote

Hey guys,
I like using GSPlayer2 on my HD2. However, the program does not detect the button presses from the remote. I have the Sense MP3 player disabled, so now when I press the call/play button on the remote, it either goes to the call menu, or goes to windows media player.
Simple question -- how do I change its behavior, so that it can control GSPlayer? I'd imagine the solution will be similar (but not identical) to the the one implemented by AVRCP program floating on XDADev somewhere....

Categories

Resources