-
Notifications
You must be signed in to change notification settings - Fork 42
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
Implement voicecall record support. #14
Conversation
When device is provided when calling pa_droid_source_new() and device is AUDIO_DEVICE_IN_VOICE_CALL, force mono channels and hal channel mask for recording from both uplink and downlink.
|
Can't comment much on the PulseAudio API usage, but other than the two comments I made above, looks good. |
|
Agree on do..while, it was written that way already elsewhere in anticipation of profiles which would have more than one sink or source. But probably everything needs to be restructured again when we cross that bridge anyway. So I'll remove the do..while. Not having braces on single statement if-else-blocks is PulseAudio way, so won't touch that. I'll need to do some changes still so that this code compiles with other than Qualcomm adaptation, AUDIO_CHANNEL_IN_VOICE_CALL_MONO is actually added by Qualcomm. With others it's AUDIO_CHANNEL_IN_VOICE_UPLINK etc. |
| else | ||
| AC_DEFINE([DROID_DEVICE_GENERIC], [1], [Using droid device generic.]) | ||
| if test "x$droiddevice" != x ; then | ||
| DROID_DEVICE_CFLAGS="-DDROID_DEVICE_`echo $droiddevice | tr '[a-z]' '[A-Z']`=1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens here if $droiddevice contains characters outside of the [A-Za-z0-9] range? Can/should we have a check for that? (something like (echo $droiddevice | grep '[^A-Za-z0-9]') && exit 1 or so)
Also, this doesn't define DROID_DEVICE_GENERIC anymore if an unknown device is found.
When in voicecall profile, one can switch to voicecall-record profile, which destroys active sources and creates source specifically for voicecall recording.
|
Refactored virtual profile handling a bit and added hint when failing to get ANDROID_VERSION. |
Implement voicecall record support.
|
Hello. For some reason when using headphones incoming voice not recorded. |
|
Have you checked it with the call recorder app? https://openrepos.net/content/dpurgin/call-recorder |
|
@sledges yes, using this app for recording. |
|
@dpurgin ^ |
|
@CODeRUS @sledges direct reason for this is harbour-callrecorder itself. To get the voice call data, one needs to switch card profile from 'voicecall' to 'voicecall-record'. harbour-callrecorder doesn't do this when any other port except 'earpiece' is active. If it did, you'd be unable to reroute a call from earpiece to other ports: when the call is rerouted, voicecall profile gets reactivated and the voice call recording data is lost. If we set the active profile back to voicecall-record, earpiece gets reactivated. I'll make a minimal working example soon and take it back here. Thanks for mentioning, I completely forgot. Added this to known issues of harbour-callrecorder |
|
@dpurgin wow, that's ... sad. |
|
Looked into this now and filed a bug https://bugs.nemomobile.org/show_bug.cgi?id=778 |
|
@jusa btw I've worked around this in the new release of harbour-callrecorder. IIRC, we talked about this on IRC, switching active port after switching to voicecall-record worked. If this helps, profile/port change flow is like this: In case of earpiece call only:
In case of switching to other devices during the call:
Please see my application.cpp, lines 209-227, 169-207. Hope this helps |
|
@dpurgin There was a bug in the source input routing, so with this fix when routing changes no need to do anything else but switch again to voicecall-record profile. |
No description provided.