Active Topics

 


Reply
Thread Tools
Posts: 16 | Thanked: 15 times | Joined on Nov 2010
#1
When in a phone call, is there a way to intercept and modify the audio that comes from the phone's microphone before it is sent over the cellular network. Or even change it completely. If it is possible, a lot of apps can be made that use this feature, like an answer machine app and others. Does anyone have a clue? I have a good programming experience but I am still not so familiar with linux.

-----EDIT 19/10/2011
I used pulseaudio's 'pactl list' command to inspect the pulseaudio configuration to find out what happens while in the following cases:
- when the phone is idle
- playing audio using paplay
- within an active call
- playing audio and within a call at the same time

I reached the following results:
- When in a call, the phone application does the following:
- it creates a new sink input on the pulse server whose driver is "voice-cs-call-sink-input.c"
- it mutes all the sink inputs on the server
- it switches the main sink and source's buffers to the "alternative" one. To be specific: for the sink "sink.hw0" and the source "source.hw0" it sets the property "x-maemo.alsa_source.buffers" to "alternative" instead of "primary".

What I did was that I made a program that uses the pulseaudio api to unmute the sink inputs. I tested but still no sound other than that of the call. So I thought then that I'd try to change the buffers back to the value "primary" but that's where I got stuck. I use QTCreator for the development. And I made use of the example made by a fine man at http://www.ypass.net/blog/2009/10/pu...-device-lists/. But when it gets to changing the sink or source properties I would need to use the "pulsecore" library. but in no way does my application compile correctly when i include anything from this library. I get all kinds of errors. So what I need now is that someone help me with either a simple project using the pulsecore library( I guess) and doing any simple task that would compile correctly on QTCreator. or provide me with another idea or method to be able to change that property.

Last edited by moodymeedo; 2011-10-19 at 13:49. Reason: enhancment and adding updates
 

The Following User Says Thank You to moodymeedo For This Useful Post:
Posts: 16 | Thanked: 15 times | Joined on Nov 2010
#2
Guys,Even tell me if it is ever feasible or not
 

The Following User Says Thank You to moodymeedo For This Useful Post:
Posts: 1,994 | Thanked: 3,342 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#3
It must be feasible, with gstreamer and pulseaudio. But I will not even dare to try...
 

The Following User Says Thank You to Wikiwide For This Useful Post:
Posts: 16 | Thanked: 15 times | Joined on Nov 2010
#4
Originally Posted by Wikiwide View Post
It must be feasible, with gstreamer and pulseaudio. But I will not even dare to try...
I would, and (hopefully) I will, but I just don't want to walk a closed path. I need someone with experience to just give me the feasibility and a good hint about how it can be done and I will take it to the end.
 

The Following User Says Thank You to moodymeedo For This Useful Post:
Posts: 1,994 | Thanked: 3,342 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#5
Quick reply...
Pulseaudio is so customisable, anything is possible...
http://en.wikipedia.org/wiki/Pulseaudio

Somebody with experience, give a hint, please!

EDIT:
Create your own sink and src
Route microphone src to your sink
Your application takes sound from your sink and outputs it to your src
Make all applications use your src instead of microphone src

Last edited by Wikiwide; 2011-01-14 at 23:25.
 

The Following User Says Thank You to Wikiwide For This Useful Post:
Posts: 16 | Thanked: 15 times | Joined on Nov 2010
#6
I meant somebody with experience with gstreamer and\or pulse audio to just tell me the idea of how it should be done or a hint about it.
 

The Following User Says Thank You to moodymeedo For This Useful Post:
Posts: 44 | Thanked: 28 times | Joined on Mar 2010
#7
Originally Posted by moodymeedo View Post
I meant somebody with experience with gstreamer and\or pulse audio to just tell me the idea of how it should be done or a hint about it.
stab in the dark:
maybe the guy who made the fm-carkit knows how audio is routed
and can give clues to whether or not i can be routed to something else first?
 

The Following 2 Users Say Thank You to ny-hardcore For This Useful Post:
suzuka's Avatar
Posts: 24 | Thanked: 26 times | Joined on Nov 2010 @ UK
#8
Does the page 8 of the N900 schematics help you answer that question?

http://wiki.maemo.org/N900_Hardware_Schematic
 

The Following 2 Users Say Thank You to suzuka For This Useful Post:
Posts: 106 | Thanked: 136 times | Joined on Apr 2010 @ Switzerland
#9
 

The Following User Says Thank You to ymartin59 For This Useful Post:
Posts: 16 | Thanked: 15 times | Joined on Nov 2010
#10
Originally Posted by suzuka View Post
Does the page 8 of the N900 schematics help you answer that question?

http://wiki.maemo.org/N900_Hardware_Schematic
Thank you, but I can see it is a hardware thing. I don't think it can help.
Originally Posted by ymartin59 View Post
Maybe a beginning at
http://talk.maemo.org/showthread.php...=audio+routing
Thank you too, this is kinda helpful. But now imagine the case when this command is running and an external appcomes in and modifies the sound between the mic and the speaker(for instance increasing the pitch). Cause this is what I have in mind, while the phone call is on, instead of making the audio be routed(as the phone app planned) to the place where it is sent over the cellular network, I jump in and modify it.

Thanks guys for the help.
 

The Following User Says Thank You to moodymeedo For This Useful Post:
Reply

Tags
did i work, do homework, help i'm stuck, help wanted, no it didnt


 
Forum Jump


All times are GMT. The time now is 17:14.