-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sound device management on MAC using CoreAudio #2464
Comments
Strange, this function has always been working for me on the Mac. |
Thanks for the followup. I ran the following in a test harness. The strange thing is that although from a logs perspective PJSIP is claiming to connect the right devices to conference (in this case a Logitect BluetoothHeadset) the audio is actually physically being played on the default device. There are 4 devices reported by PJSIP as below
These were extracted with
I do however notice that core audio is printing the lines below in the logs but I can't see how the device IDs (40,59,69,73) are exposed by pjmedia
As such I set the sound devices as below with pjsua_set_snd_dev( 2, 3 ) where 2 and 3 are the IDs based on index above
During a phone call pjmedia is claiming conferencing of the correct device however audio is being heard on the Built-In output which is the current default device
|
Make sure that hardware EC is disabled, otherwise audio device settings may get ignored, i.e.:
|
Thanks for that feedback. Can you shed some light on how to do this via pjsua. Also I would presume hardware acoustic echo canceller is quite important for VoIP calls (ie wouldn't disabling it have adverse effect on call quality ? ) Thanks |
Set Yes, it provides a superior performance, but it only works with specific hardware, i.e. their built-in sound device. I will close this issue. For further questions, please use any other means such as StackOverflow. |
Respectfully , I think this issue has been closed prematurely. After adjusting PJMEDIA_ECHO_USE_SW_ECHO to be enabled this has resolved selection of specific device and this can be done at any time in or out of a call . Thanks Unfortunately, the following issues still remain- some of which are new. Please note in all of examples below default device selection is done by manually selecting device under MAC preferences
|
Default device is only identified during startup and it won't change unless you call pjmedia_aud_dev_refresh() (please refer to: https://trac.pjsip.org/repos/wiki/FAQ#snd-hot-plug). |
The precise issue is that even at startup the incorrect device is picked up as the default. This is only happening with SW echo canceller enabled. The logs above are at startup |
Can you check what default I/O device is returned by the code here: |
Thanks for your help thus far. Something is a little strange. I added logging to code snippet below
Curiously the only logs printed on startup are as below the temp_id printed for an output device is actually the microphone. The log for input device is not hit
Also when making a call I get
|
Would it be possible to reopen this ticket as I believe the above log is showing incorrect behaviour |
With reference to #2445 and 64characters/Telephone@42286e6
I would like to report the following encountered issues that are a little strange
1- When setting a specific audio device that I would like used on calls using pjsua_set_snd_dev (pjsua_aud.c) I am finding that the application immediately drops the volume of other applications as if a call is in play as mentioned in threads above. How do I stop this behavour
2- After calling pjsua_set_snd_dev with the capture and playback device ids as assigned by PJSIP. I am finding that phone calls still utilize the default device of the MAC operating system. ie the set snd device appears not to work correctly. How does one simply set which devices to use for calls
3- I was previously using an older version of PJSIP with PortAudio which had the capability of detecting default device change during a call and switching device accordingly. This is particularly important as Apple Airpods function simply by changing themselves to become the default device whilst in users ear. Is there a was of enabling this behaviour in core_audio_dev
4 -In following from points above I was previously using set_snd_dev to specify device in use (whether in a call or not. Because of point 2 above it doesn't work whilst idle and seemingly has not effect during a call
Any feedback would be greatly appreciated
The text was updated successfully, but these errors were encountered: