Related
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
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?
I dont know what I am doing wrong but I find the sound level extremely poor for calls
I tried with a bluetooth headset, the outside speaker and the jack with my mp3 headset
it's pretty weird since when I play videos or music I am impressed by how loud I can push the Tab...
I am on AT&T with JMC (but was the same on JM6). And I set the sound at max
anybody has the same issue? Am I doing something wrong? Or is there any sound booster app for calls? (and is it necessary?)
Thanks for your help
My Tab isn't phone-enabled, but since you're new to Android, I thought I should point out that there are multiple volume settings, and in-call volume is one of them. Menu Key -> Settings -> Sound Settings -> Volume should give you all the sliders (Ringtone, Media, Alarm, System, Notification...). There are apps/widgets too that let you get to/change these settings without having to go into the settings menu every time (audio manager has been a decent widget for me). Until you're actually in the call the hardware rocker is usually doing the ringtone or media volume.
When I use mine with Skype 60% is usually blaringly loud for me, and I don't even have the system or media volume maxed out.
Sorry if it's something you know you've done, but thought it might help. If not, maybe someone else has had the same issue and solved it.
BuglessFan said:
My Tab isn't phone-enabled, but since you're new to Android, I thought I should point out that there are multiple volume settings, and in-call volume is one of them. Menu Key -> Settings -> Sound Settings -> Volume should give you all the sliders (Ringtone, Media, Alarm, System, Notification...). There are apps/widgets too that let you get to/change these settings without having to go into the settings menu every time (audio manager has been a decent widget for me). Until you're actually in the call the hardware rocker is usually doing the ringtone or media volume.
When I use mine with Skype 60% is usually blaringly loud for me, and I don't even have the system or media volume maxed out.
Sorry if it's something you know you've done, but thought it might help. If not, maybe someone else has had the same issue and solved it.
Click to expand...
Click to collapse
yes this I had figured out and set at the maximum
Everything non call related is really strong... It's conversation from normal calls that is ridiculously low
Am I the only one ?? What's wrong with my tab ?
Anyone with an opinion about this ?
Voice-enabled on AT&T with JM6. Have good results with the built-in speakers and cheap Nokia BH-214 stereo Bluetooth earbuds. I ordered the OEM earbuds, but I do understand that the 3.5mm jack port in finicky. Is your Bluetooth 2.1 or newer? Do you have many open applications when trying to place or receive calls? I've notice the sound stutter a bit on the speakers when I've got several apps open.
Here's something I noticed, when in call using my BT Headset, the volume slider sometimes says its on max but the output isnt. Try to lower or increase your volume. Once you hear the max level beep, it gets louder.
Im on a SingTel Tab by the way.
ishtangli said:
Here's something I noticed, when in call using my BT Headset, the volume slider sometimes says its on max but the output isnt. Try to lower or increase your volume. Once you hear the max level beep, it gets louder.
Im on a SingTel Tab by the way.
Click to expand...
Click to collapse
Thank you, will try right away
Edit: yeah I can definitely reduce the volume but my max was my actual max. As anybody tried to compare the volume on the speaker when playing music whith the volume on the speaker when on a call... It's like 5 to 10 times higher volume on a call !! And then same issue on a headset
DonDerham said:
Voice-enabled on AT&T with JM6. Have good results with the built-in speakers and cheap Nokia BH-214 stereo Bluetooth earbuds. I ordered the OEM earbuds, but I do understand that the 3.5mm jack port in finicky. Is your Bluetooth 2.1 or newer? Do you have many open applications when trying to place or receive calls? I've notice the sound stutter a bit on the speakers when I've got several apps open.
Click to expand...
Click to collapse
As mentioned I tried it with everything I could... The default external speaker, a simple stereo headset (Not bluetooth), a bluetooth headset. They all give the same. Low volume
If you don't like volume in speaker, headset, bluetooth....You can change settings in "hidden" Audio menu. There you can change volume of individual ouput, but be careful!!!!!
Before change anything, make sure you can put it back the same number if you are not satisfied or have problem ..so wright it somewhere anything you wish to change.
Good Luck with experiment. If I remember correctly(from my old Samsung i780-Windows phone) "TX" settings is for output and "RX" for imput, but I can be wrong, so be careful.
Alcibiade said:
Thank you, will try right away
Edit: yeah I can definitely reduce the volume but my max was my actual max. As anybody tried to compare the volume on the speaker when playing music whith the volume on the speaker when on a call... It's like 5 to 10 times higher volume on a call !! And then same issue on a headset
Click to expand...
Click to collapse
what I do is, when in a call, I lower the volume by about 2, then increase it until i hear the max volume beep. The moment i hear it, the volume on my headset usually jumps up.
I have the same problem with the speaker volume. At maximum you cannot hear it. The bluetooth seems to work OK. IIRC JK5 software seemed to work correctly.
09CarreraS said:
I have the same problem with the speaker volume. At maximum you cannot hear it. The bluetooth seems to work OK. IIRC JK5 software seemed to work correctly.
Click to expand...
Click to collapse
So I guess for you too, music or movies play with a high volume on the speakers whereas for calls it's rather low volume ?
Yes bluetooth or headset I can hear but still quite low volume compared with music...
stefanopolis said:
If you don't like volume in speaker, headset, bluetooth....You can change settings in "hidden" Audio menu. There you can change volume of individual ouput, but be careful!!!!!
Before change anything, make sure you can put it back the same number if you are not satisfied or have problem ..so wright it somewhere anything you wish to change.
Good Luck with experiment. If I remember correctly(from my old Samsung i780-Windows phone) "TX" settings is for output and "RX" for imput, but I can be wrong, so be careful.
Click to expand...
Click to collapse
My problem is specifically for calls. Anything else is fine and working well. That's the weird issue... I dont want to boost the volume for anything else!
That's pretty weird... I have been playing with the tab and I found out that for calls, the highest level I can have (by hear) is two notches below the highest. That's by far the loudest I get (If I push higher the sound decreases)
Am I the only one ? It really pisses me off.... I don't know how it can be like that (I am on JMC ROM after flashing a JM6 ROM over the JK5 from Russia (I am on an AT&T Tab flashed to get phone working)
Someone else get the same experience ?
I can confirm that the max 'in call' volume is two notch below the max !!! And I have the same tab/setting of the OP.
Aren't there some codes you can enter to adjust the volume level on calls and music, etc.?? like the Galaxy S?
pakalrtb said:
I can confirm that the max 'in call' volume is two notch below the max !!! And I have the same tab/setting of the OP.
Click to expand...
Click to collapse
Thanks ! Ina sense I am a littel bit relieved to see I am not the only one !
Such a stupid bug. Come on Samsung...
FYI it is fixed with the firmware JME
Sound level is much more acceptable and the highest level is not anymore two notched below the max
When connecting my new $80 BlueAnt T1 headset, to my rooted Android phone running Bionix V with voodoo always resets the "Bluetooth In-Call volume" to a level that is really low. It seems to be dependent on the type of headset I use. On some headsets it's set to 100%, others to 0%, and others somewhere in between. During a call you can set the volume to a comfortable level with the hardware volume buttons on the phone, which persists during the same bluetooth session. However, once you disconnect and reconnect, the volume level is at it's "default" level again.
In the mornings, when I connect my bluetooth to my phone, I get a brief message "Adjusting volume for bluetooth", which denotes that there is some type of profile setting that is unique for that headset.
This problem can be very annoying when using a hands-free system for the car for example, because you always have to take your phone out of your pocket to adjust the volume, while driving. This issue creates a dangerous situation rather than preventing one. When receiving a call, I must now look at AND adjust my phone volume every time a call is accepted while I drive. The bluetooth in-call volume NEEDS a way to be set and retained, before someone is badly injured or worse.
The correct behavior should be that it stores the bluetooth in-call volume level for every bluetooth headset that is connected.
I've done some research on the internet, but it's very clear that many people are having this problem with a lots of different headsets.
It very well might be an Android problem, but that doesn't explain why I'm having this issue with the BlueAnt T1, not my other headsets.
I have a Samsung Vibrant with Android 2.2. Is anyone else having this issue?
Okay! It seems I found a workable solution (kind-of). I downloaded the free app 'Volume Locker' from the market. Volume Locker locks your sound volume levels inplace, to where if you accidentally change your levels, it puts them back in place where you locked them.
Now, what I did is I called someone using by bluetooth headset, I had to manually turned up the 'in-call bluetooth volume' then I activated the Volume Locker app.
Now, everytime I call out using my Bluetooth headset, I don't have to KEEP turning up the 'in-call bluetooth volume' that resets everytime I disconnect a call.
I hope the Android engineers who make these OS updates will recognize this BUG and develop a fix. For right now, I can use 'Volume Locker'.
I find the in-call sound quality very low when the phone is connected to my car's bluetooth integrated system. The other person can hear me normally, but I can't hear them very well. It's like they are talking through a pillow. It worse when I am in a noisy environnement (for example driving on the highway). However, the sound quality is perfect when I hold my phone to my ear.
So far, I've tried : enabling/disabling the "noise reduction" and/or the "personalize call sound" options. The issue is present whatever the ROM (5.0) and modem used. I've also tried mic-gain mods described in this thread, but it seems that it doesn't affect the in-call sound.
Would you see anything else I could do to improve my sound quality over bluetooth?
The solution is to add in the build.prop, for rooted phones, ro.bluetooth.request.master=1
This will remove the Bluetooth skips.