aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/telephony-and-music/README
blob: 7c978787ec4b39ea240cc006dd30ec189eba32f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Use-case example.

Assume you have a music player and a telephony program.
You might like it if the music player pauses whenever
you make or receive a call. You may also like it, if
the music resumed when the call ended.

In this example we will assume you the have moc/mocp
running. And we will use the shell to simulate a
telephony program.



First of, run make to build this example.
Before starting run ./init.
And when you are done run ./cleanup.

In one terminal run ./monitor. This program will
pause mocp when you make or receive a call, it will
also resume mocp when all calls have ended if it
did pause mocp.

Then start any positive number of terminals.
We will pretend that each of them are telephony
programs. To make or receive a call, run
./receive-or-make-call, when you want to end
the pretend call, run ./end-call from the
terminal (or more accurately, from the same
process).