maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Need help about app idea - How to play mp3 to caller? (https://talk.maemo.org/showthread.php?t=68521)

Aranel 2011-01-17 14:21

Need help about app idea - How to play mp3 to caller?
 
Hi,

I'm learning Python and Qt these days, 3 days ago a friend of mine complained about someone disturbing her, and she blocked him using Blackballer. (Nokia 5800XM app) But I didn't like that way, because.. It is not fun! I would prefer auto-accept all calls from a blacklist and play mp3 to them (rickrolling time!) :rolleyes:That way I can do some "damage" to caller and make him suffer :D

So, I can get the number via dbus and accept it based on a blacklist (and close the connection after an interval optionally), and I think it would be very easy to implement a logging feature. I can do a simple GUI for it too.

Problem is, I don't know how to play mp3 to caller, and cancel the microphone at the same time, and It's killing the whole funny project for me :|

Any suggestions about this? Maybe a pulseaudio one-liner? or source of a similar app?

yorkey 2011-01-17 17:17

Re: Need help about app idea - How to play mp3 to caller?
 
What a nice idea

I really hope this is possible

sethkha 2011-01-17 17:28

Re: Need help about app idea - How to play mp3 to caller?
 
unfortunately i can't help. nice idea.

Aonsaithya 2011-01-17 17:44

Re: Need help about app idea - How to play mp3 to caller?
 
Trying to playback audio during a phone call will result in the "audio is in use"-error message.

See this thread: http://talk.maemo.org/showthread.php?t=43852

bigears5000 2011-01-17 18:09

Re: Need help about app idea - How to play mp3 to caller?
 
Perhaps if it's not possible this way, you could somehow send the blacklisted (PYcallblocker maybe?) number to voicemail (your mp3 recording) thus costing them. I don't know if it can be done that way though. Just an idea.

Aranel 2011-01-17 18:42

Re: Need help about app idea - How to play mp3 to caller?
 
Quote:

Originally Posted by Aonsaithya (Post 922433)
Trying to playback audio during a phone call will result in the "audio is in use"-error message.

See this thread: http://talk.maemo.org/showthread.php?t=43852

What if application creates a NULL sink and redirects mp3 to that sink? Would It still complain about Audio?

I'm thinking of something like this, already done that on my Ubuntu installation using pavucontrol, so It should be possible on Maemo using pactl and pacmd (if only I/Someone know how to use them):

Music Player Output --> NULL Output
Phone app Input <-- Monitor of Null Output
Phone app output --> Another NULL Output

jstokes 2011-01-17 18:48

Re: Need help about app idea - How to play mp3 to caller?
 
I'm not an expert on this at all, but from what I understand policy regarding sound is ultimately enforced through a PulseAudio plugin (go through its folders). You could try moving it to disable it but I don't know if that would break sound. (The plugin's source along with the source of OHM and Nokia's plugins that make up the policy enforcers are on the MeeGo Git repository somewhere)

Aranel 2011-01-22 17:26

Re: Need help about app idea - How to play mp3 to caller?
 
Bump.

I figured out how to do this on my Ubuntu PC, used pavucontrol to play music from Amarok to Skype, It also cancelled the real mic and muted the caller. Here's how it works:

Quote:

First: Create a NULL sink.

Audio Output (from Amarok) --> to NULL Output
Skype Input <-- NULL Output
Skype Output --> NULL
Well, there are two problems to do it on Maemo:
a) Maemo doesn't have Pavucontrol.
b) Even If I package it to Maemo, It's a GUI app, so I can't make an app out of it, so making this app is not possible with pavucontrol.

We still need "someone with PA knowledge" to help me use CLI apps (pacmd and pactl, already installed on the N900) to make the same changes on background. Here's some details about it:

http://stackoverflow.com/questions/4...ing-pulseaudio

Any volunteers? :D

TiagoTiago 2011-01-31 09:23

Re: Need help about app idea - How to play mp3 to caller?
 
That program would be dangerous over here; over here collect calls are automated, if you stay on the line after the collect call anouncement and a grace period of a few seconds, from the point of view of the telephony companies it means you've accepted the collect call and the charging begins.


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

vBulletin® Version 3.8.8