play sound through speaker and/or headset? - Windows Mobile Development and Hacking General

I want to be able to play sounds through the normal speaker, even though a headset is attached to the device (Blue Angel, in this case).
(The built-in telephone does this with its ring tones when a headset is attached.)
Only one WaveOut device is shown as present.
Anyone has a solution, or an idea?

nobody knows anything about this?

there's physical switch that disables the speaker after you plug in the earphones jack. its PHYSICAL, no amount of code will overcome this.

hey!!.. screw the last post. I managed to do what you wanted.
speaker + headset both rings, even when headset is connected... let me fix the code, then I will get back to you... ok

I'm waiting patiently!

Hi esbjorn,
din want to keep you waiting. but i think i finally found out exactly is going on.
there's only 1 device. however, the device enables both speaker and headset WHEN THERE'S AN INCOMING CALL, which you already know. Whether its hardware or software, I have yet to determine it.
I had a lot of code around and got confused. sorry if I gave you any false hope.
anyway, this is my hypothesis, windows has code to control only this 1 waveout device. when a call comes in, it decreases the volume of all sounds being played. it then plays the ringtone at a volume based on its registry. (try changing the attentuation in SoundCategories->Ring) it gives the effect (a loud ringtone and soft background audio) that there are actually 2 waveOut devices when there's only 1.
I will be working on it further, let me know if you make progress too.

Related

Ringtone Problem- Plays out loud even when headphones are in

Anyone have a problem like this:
I did a had reset but it still is doing this-
The speaker plays my ringtones out loud even when my headphones are plugged in!!
Thanks,
Daniel
Mine has always been like that, whicever ROM I used.
Really????
My old XDA never did this...
So if i'm listening to music I run the risk of having my ringtone play out loud??
Is the only solution to change my ring prefrences to vibrate only when i'm listening to music (since the phone volume itself cannot be muted)??
When I preview the sound it doesnt play out loud
I don't have such problem with original headset. But, if I use bluetooth headset it happens.
So this is not normal....
How do I fix it?
I tried a hard reset- didn't work!!
Playing the ringtone out of the speaker even though the headphones are in is normal with most if not all phones. The headphones are only to listen to music and calls.
If you had the phones in but not in your ears and the phone rang only in the headphones how would you hear it?
Why would your headphones be plugged in if you are not listening to music?? And to answer your question- you would know the phone is riging by it vibrating.
Anyways- many people told me this is not normal...so there must be a way to change it.
Also, when I am in silent or vibrate mode and I accidentaly or even purposely push my Voice Command button the beep sound will come out of the speaker-
It will change the sound icon from Vibrate or Silent to the regular icon but will stay in silent/vibrate mode-
Is this normal??
-Daniel
Not sure about the voice command question but with regards "WHy would you have your headphones in if you're not listening to music" the answer is to use the phone handsfree.
Whether this is in the car (law over here) or while in the office a lot of people over here use headphones instead of holding the phone to your ear, some believe that the safer or healthier. No real proof but handsfree is popular.
Saw this same post on the Neonode forum and the SE's do the same so I presumed normal and as I say if you were using the headphones as handsfree if actually a good thing. Yes the vibrate would tell you but say you're at someone else's desk and can't hear the phone vibrating across your desk (hell of a vibrate really isn't it).
Anyway, hope that answers the headphones question
So why did some people say this doesn't happen to them?
That's an unanswerable question. It could be any number of reasons and going on the state of play with the ROMs is possibly down to this.
Going through the forums its amazing the number of people that have different problems with apparently the same phone.
I have the exact same problem, and am still looking for a solution.
The most irritating thing is that when I turn all ringtones off (only vibrate on) and I receive an incoming call, the sound that is currently playing (windows media player or some other program) is played for a fraction of a second thru the external speaker (the program pauses the mp3 playback on an incoming call, but this happens to late). Because of this it's impossible to use the phone for MP3 playback in a place where it's important that no sound is produced.
It would be really nice to completly turn the external speaker off when a headset is plugged in (i find it really strange this isn't the case right now).
It would be nice if someone found a solution for this (in my opionion) huge problem.
Yea,
I found this is irritating too,
I am using pocketMax Phonealarm
and mute:
- system volume
- phone volume
but max the call volume ( as I think that's required to answer a call)
I plugged my headset (using 2.5mm to 3.5mm jack) and listen the music using winamp & increase the volume, apparently the system volume is increased too ==> I think that's the reason why everytime:
- incoming phone call
- any reminder
is sounded in the headset too.... totally [email protected]@[email protected]#
Any solution for this????!!!!!

How to prevent OS from muting audio output when making a phone call

I'm working with an app running at Windows Mobile 5.0 pocket pc. And I
use 'waveout' functions to play some audio file, sometimes my app need
to automatically make some phone call using TAPI. Here comes the OS
behavior which I don't want: the audio output is somehow muted. I want
the audio output keeps the same volume, is there any way do it? Thanks
a lot!
When call is in progress, audio path is changed. This is a hardware feature (you can read about it in many posts about answering machines).
Currently there is nothing that can be done about this.
I had not actually tested this so I gave it a go. No sound gets through when I programmatically play a sound or when I use the media player. I belive Levnum is correct because when I play a sound and hang up the phone during the play back, the sound returns but is choppy for an instant. That would be caused by the path of the audio being switched. When i programatically change volume it is normally very clean, eg loud to soft but with not noise between.
a bit off topic...
One thing that bothers me about this isolation of the phone audio hardware is the presence of the GSM 6.0 input properties for the microphone. If the hardware is truly isolated from the system then why have this sampling format? Wouldn't the phone be doing its own sampling and not need windows to have this capablity?
What a bad news! Thank you anyway.
experimenting with the volume during a call
In June played a lot with audio levels on my hp h6315 while using TAPI and recorded my results. The 6315 isn’t an HTC device but I think it probably works similarly. I have a wizard too, but haven’t experimented as much with it.
Here are my notes that I typed when I did it:
(perhaps they will be useful to someone)
[size=+2] Playing wave stream while establishing a GSM call using built-in phone software[/size]
Inbound GSM call with ear bud (speaker and phone volume low setting)
Sound continues through ringing
Sound cuts out for ~1 second after selecting answer
Sound continues mixed with call
After call hang-up sound still continues
Inbound GSM call without ear bud (speaker and phone volume highest setting)
Sound switches to a lower setting (front speaker?)
After selecting answer, sound changes momentarily to high
Then Sound cuts out for ~1 second
Sound then resumes at lower level
If phone is put on speakerphone the sound goes to high level
Sound continues mixed with call
After call hang-up, with call on speakerphone, sound continues after a brief interruption
After call hang-up, sound reverts to loud and continues. There is a gap as in Speakerphone case, but it isn’t as noticeable since the change in volume helps to mask it.
Outbound GSM call with ear bud (speaker and phone volume low setting)
Sound is interrupted for about 1-2 seconds after hitting talk
Sound then continues through answer and hang-up. (mixed with call)
Outbound GSM call without ear bud (speaker and phone volume highest setting)
Sound is interrupted for about 1 seconds after hitting talk
Sound resumes at lower volume through call
Sound has brief interruption at hang-up while on speakerphone.
Sound reverts to higher volume after small gap at hang-up while not on speakerphone
[size=+2]Recording while establishing a GSM call using built-in phone software[/size]
Inbound GSM call with ear bud (mic on gain 5)
Recording continues through ringing
Slight break while answering then resume for brief time then changes to much lower gain.
Remains at lower gain
Inbound GSM call with ear bud (mic on gain 1)
Same as mic gain on 5, didn’t seem any quiter, also same with mic on AGC
OutBound GSM call with ear bud (mic on gain 5)
Slight break after pressing talk then resume for brief time then changes to much lower gain.
Remains at lower gain
Click to expand...
Click to collapse
I think my largest problem was the microphone gain, but I don’t remember for sure. On my typical volume settings, the cases where the volume level lowers, it often lowered so much that I couldn’t hear it without listening very carefully. Originally, I thought it was totally muted.
To help minimize the change in volume level, try adjusting the regular system volume to a relatively low level and put the phone volume on max. This helps some, but to fix the problem try multiplied the audio samples by 2 or more before playing them to the speaker. Find the best multiplication factor by trial and error.
Of course, your’s may be different.
For the off topic part, I thought the audio path for the microphone always was available to windows mobile and only the audio to the “telephone receiver” wasn’t.. There is only one microphone, but two speakers. The main system speaker is the one that you use to play wave files. The “telephone receiver” is the one that as far as I now is only used for telephone calls. I expect that this telephone receiver speaker is connected directly to the GSM chipset. I think when put on speaker phone the sound goes out through the main speaker. (I don’t have my phone with me so I can’t check right now)
Yes that is what I think as well. So if the phone "chip" is recording/playing the sound using the same hardware why dose windows need to be able to sample at that rate? Its the phone that needs to do the smapling.
The drivers on individual devices can vary a lot when it comes to sound. For example, on some of my devices playback will comence as soon as I add buffers that are appropriately prepared. This is not correct behaviour - the driver should wait for the waveOutWrite before it starts. On other devices the driver continues playing until a buffer is finished even if the waveOutReset is called. When it comes to setting the volume with waveOutSetVolume I have has more varying results on just about every device. Because of this I think it is not very usefull to spend a lot of time perfecting code for this sort of thing. Even if as a programmer you do everything correct its going to sound wrong somewhere.
If the phone can stream the call to and from a bluetooth headset then doesn't this mean the in call audio is accessible programmatically somehow?
Or am i missing something
Actually there was a theory floating around that if you could create a 'fake' / virtual BT driver you could capture and send sound from and to the phone.
As far as I know no one on this forum has done this.
It should be noted that some companies like gigabyte are producing phones with built in answering machines.
I think the hardware separation thing may just be an HTC thing and even then only for certain models.
reddreamster -
If you just want to play the audio to the user at the local end, and not down the phone line it is possible. As the others have said HTC keep the phone and local audio completely separate, so you can't play the audio down the phone.
Calling TerminateProcess to kill off cprog.exe can reduce the amount the system interferes in your TAPI calls ;-)
But to re-enable the local audio output this will probably not be enough. You need to call entry point 218 in \Windows\ossvcs.dll
This function takes 1 DWORD parameter, and you should pass the value 1.
I can't remember the return details, but it can be treated as a boolean:
if (return_code)
{ it succeeded }
Make this call AFTER you have made the TAPI connection, and it will re-enable the local audio output.
Hope that helps
Stuart
Solution
Microsoft published the anwser to this in Jan (2007). It's probably no longer of interest to reddreamster, but I thought I would publish a link to the answer in hopes that I might help the next person with the same question that manages to find this thread.
http://blogs.msdn.com/medmedia/archive/2007/01/04/the-wavedev2-gainclass-implementation.aspx
Also, you might be interested in this about the Mixers
http://blogs.msdn.com/medmedia/archive/2007/01/12/what-do-you-mean-by-mixer.aspx
Keywords that might have helped you find this:
mixer api mixerapi wave api waveapi tapi wavedev2 audio gain gainclass volume waveOutMessage waveOutSetVolume wave device
levenum said:
Actually there was a theory floating around that if you could create a 'fake' / virtual BT driver you could capture and send sound from and to the phone.
As far as I know no one on this forum has done this.
It should be noted that some companies like gigabyte are producing phones with built in answering machines.
I think the hardware separation thing may just be an HTC thing and even then only for certain models.
Click to expand...
Click to collapse
Yes there was a theory. And here is the final answer to that too:
http://teksoftco.com/forum/viewtopic.php?t=34&start=15
We had another attempt of making PhoneREC possible - by intercepting the voice flowing through the BT driver when a Bluetooth headset is connected:
1) when a call is established, the software would have enabled voice routing to Bluetooth headset
2) if a headset was not present, it would have been emulated (to be able to use the device without headsets with phonerec too)
3) voice data over bluetooth would have been in the form of SCO packets
4) our software would have intercepted the SCO packets, extract the voice data, record it to a file, and play it on the device's speaker (so no need of using the headset to hear the other party in the call)
Unfortunatelly this failed too, as the SCO packets are handled in the hardware, so we found no way of capturing those from a software program.
The only remaining option is to use a custom made wired headset with PhoneREC. This works and assures high fidelity sound for both parties, but the phoneREC user can only record the phone call by using the special wired headset.
Click to expand...
Click to collapse
So consider the subject closed, and sorry for the bad news,
Radu

Ringer coming from speaker when headset plugged in

is there any way to change this? i use my headset to listen to tunes while @ work and the gym, and the whole idea is to eliminate noise coming from the phone (and my desk!)
however, to listen to music you need to turn the sound on - but when you do, and you receive an incoming call, the ringer sound comes right from the phones speakerphone externally. when i get texts it stays within my ears (im pretty sure)
i know you could drop the phone call volume to 0 but what would that do? would you not hear it at all then, even in the headset? would the music even stop playing to signify an incoming call or would it keep playing since theres no need to output any other sound (the ringer)
anyone have a fix or an idea?
same issue in htc athena advantage x7501
real pain in the neck, since it doesn't vibrate.
and with the bluetooth, you solve that problem, but you still can't have any system sounds through the bluetooth headset.
this really wasn't well thought through.
any ideas?
a patch soon?
help?

Prevent audio push through speaker during notifications?

I'm sure most of you know what I'm talking about. If you recieve any notifications When listening to any audio through headphones (or through the mini usb port), the device pushes the notification sound through the speaker. This is fine when having a ringer enabled because I'd obviously want to hear the ring. What I dislike though, is when I have notfications (rings, text messages, etc.) on silent or vibrate, it pushes the audio that I'm listening to through the speaker still. I've always disliked this in WM. My PPC6700 did the same thing, but now I'd really like to know if there's a way to change this.
Now that I have an 8GB SD card, my Titan has started to become my primary mp3 player. I do FOH sound at a local club, and when playing music between bands, it's really annoying to have the music suddenlly cut out because a phone call is coming in. Likewise when I'm quietly watching MobiTV with my headphones on at work, and suddenly, Survivorman is blaring through the speaker because a call is coming in...You get the point. The ringer is off, but the phone still trys to let a ring through the speaker anyway, and since no ring is selected, it pushes any audio being played through.
I realize that this relatively simple problem probably does not have a simple solution as this is probably buried deep in the architecture of how WM handles audio gateways...that almost sounded like I knew what I was talking about; I can assure you that I do not . This is where you guys come in. I'm willing to test any ideas you guys have got. I don't care if it f&#*s up my phone...a hard reset isn't going to ruin my day. I'd just like a solution for this.
Ideas??
Thanks for your help and for this forum!..it has saved my phone more then a few times already.
Me too having the same problem. I listen to music via my bluetooth mono headset and these notifications (whcih I get plenty) disconnect the bluetooth audio gateway, forcing me to reach out to my phone and enabling the audio gateway again.
Yeah, I hate that too! I have the i760, one other thing on this phone I dislike is that the volume must be on to hear audio through my headphones. But there I am in a store listening to some rock at a loud volume, and there it is playing for the entire f'n store to hear when I get a call, thanks PPC!
Possible Solution!!!!
Might I recommend a Profiler. Like PPCProfiler. Just Google it.
What you could do is create a profile called music or what ever you want to name it. Then you could set up that profile to turn ringers on with the volume level you like and with or without vibration and select silent or vibrate only for the notifications. You could really but together any combination. I believe with PPCProfile you can even make a profile as a Headset Mode. So it will auto detect the headset and switch without having to do anything else.
Cheers.
Curious G.
Thanks for the reply, but a profiler isn't exactly what I'm looking for. I've had them before in previous roms. The problem isn't that it's an inconvienence to switch to silent or vibrate. It's that when things are silenced or on vibrate, any background audio is pushed through the speaker while the notification is going off. Meanwhile that audio that I want to be played cuts out of the path that I want it going through (ie. headphones).
Thanks tho...I'm open to any ideas.

[Q] Has the focus audio volume issues been sorted out yet?

Tried to ask in another thread but it was kinda off topic.
Last I knew people were playing with diagnostic codes but there was no consensus on what did or did not work.
Audio from the headphone jack and seemly the blue tooth was too quiet.
Is this still an issue?
Is that a no?
In all truth, i don't use the bluetooth. But i just checked my headphones, and they sound OK. My sony earphones work great on the phone. I did d/l that one app... Media Volume Settings and set the volume all the way to 100...that may be what is making mine work better. Hope this helps!
haven't tried Bluetooth...
But when i tried headphones it was waay to loud even at 1.
I don't know how to lower the volume using codes.
You should look through the diagnostics codes thread. It has some stuff about sound changes in there as well as some of the registry tweaks you should look up if you're unhappy enough with it to need to change something.
Funkadube: I did and couldn't seem to get any reliable change. Plus having to redo it everytime I restarted the phone seemed crazy.
I know when I had mine the volume level out of the head phone port was NOT loud enough when hooked to my car radio even though every other phone I've ever had was. You'd have to goto MAX VOLUME to get it very loud and if it was a quiet song or something not at loud (I'm staring at YOU SLACKER RADIO) then you could barely get it listenable.
I then installed Bluetooth module into the car and had the same issue with it also.
I'd wish I knew someone with one I could test IRL to see if its still a problem. I'd love to switch back to WP7...
Is there a way to boost the out-of-call Bluetooth volume on the Samsung Focus? Between builds 7712 and 7720, the Bluetooth volume for voice dial responses, TellMe, and text-to-speech were drastically reduced and now they are so low that I can't hear them with the phone turned all the way up to 30/30. I used to use the phone at 20/30 with my car's Bluetooth without a problem on 7712 and 7390. Has anyone else noticed this change since upgrading to 7720?
I didn't see other people complaining about the volume in the accessories thread.
I also have a bt headset and works fine for me.
EnderPsp said:
I didn't see other people complaining about the volume in the accessories thread.
I also have a bt headset and works fine for me.
Click to expand...
Click to collapse
I have a Bluetooth headset and it isn't as bad with the headset. But the text-to-speech is still significantly lower than call volume. In fact, the real issue is that there's a huge imbalance between the out-of-call volume and in-call volume with Bluetooth headsets in 7720.
As I mentioned before, when the phone is paired to the car I can turn the phone up to 30/30 from 20/30, but I still have to boost the volume from the car side about 5 levels higher when I'm out-of-a-call to get any decent level of audio out of the phone. The problem then is that when I take a call it is way too loud and I have to rush to turn down the volume on the car side. It makes the use of the feature so inconvenient that I've just turned it off. While I would be perfectly content with Microsoft returning volume levels to what they were since 7004, I'd just as readily use the Samsung Diagnostic app to make the adjustment myself, if it is possible. I'm looking for any remedy at this point.
Text-to-speech was the feature I was looking forward to the most in Mango, and now it's the only feature of the OS I can't use. I can't express how frustrated and disappointed I am that this has happened, and I just can't understand why this change was made. I've seen no reports of anyone ever complaining that the volume was too loud before 7720. It's one thing if I was seeking a feature that wasn't implemented, but it is implemented and it's broken. I just wish there was some solution or recourse to make it usable again.

Categories

Resources