• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

MakefileH A D14-Aug-2013152 85

ReadmeH A D14-Aug-20132.6 KiB7860

sound_pulse.cxxH A D14-Aug-201313.6 KiB577429

sound_pulse.hH A D14-Aug-20132.8 KiB10382

Readme

1Pulse Audio plugin
2
3This pulse audio plugin is designed to provide a an
4easy path to utilise the most recent audio daemon provided
5on linux boxes.
6
7The code in this plugin is very basic, and utilises the simple
8interface provided by the pulse sound daemon.
9
10At the time of writing, no sound volume features have been
11provided. The pulse audio model is such that the user is expected to
12alter the volume level for rec&play using the generic controls on the
13desktop.
14
15
16Information for developers..
17The simplest way to know that ptlib has loaded this plugin is to use the
18ptlib test application for audio.  In the directory ptlib/samples/audio,
19build this using make opt and run it.
20In the following example, we get the audio tool to report the available
21sound devices with the -r option.
22
23./obj_linux_x86_64/audio -r
24  0:00.059                        audio                 (0)             Version 1.0alpha0
25 by Roger Hardiman & Derek Smithies code factory on Unix Linux
26(2.6.24-23-generic-x86_64) with PTLib (v2.7beta0) at 2009/3/4 10:01:56.896
27Audio Test Program
28
29List of play devices
30  "Default"
31  "*.wav"
32  "ptlib pulse plugin"               <<<<<<<< pulse plugin loaded
33  "NVidia CK804"
34  "NVidia CK804 (1)"
35The default play device is "Default"
36List of Record devices
37  "Default"
38  "*.wav"
39  "ptlib pulse plugin"               <<<<<<<< pulse plugin loaded
40  "NVidia CK804"
41  "NVidia CK804 (1)"
42The default record device is "Default"
43
44Play volume is (for Default)100
45Record volume is (for Default)0
46
47
48From the above list, we see
49the names of the various default sound devices
50the alsa names of the sound devices on  video card
51  (the box has dual monitors, so two sound devices are reported)
52 the pulse plugin has loaded
53
54We can do a full duplex sound test.
55
56./obj_linux_x86_64/audio  -f -s ptlib\ pulse\ plugin
57  0:00.058                        audio                 (0)
58Version 1.0alpha0 by Roger Hardiman & Derek Smithies code factory on Unix Linux
59(2.6.24-23-generic-x86_64) with PTLib (v2.7beta0) at 2009/3/4 10:06:56.083
60
61Audio Test Program
62
63Play volume is (for ptlib pulse plugin)32767
64Record volume is (for ptlib pulse plugin)32767
65(testing sound device for full duplex) Command ?
66
67at this stage, there is a read and write thread active, reading from
68mic, putting audio into a buffer, and then playing the audio to the
69speaker. You can do h for help and see the different options. Sound is
70processed in chunks that are 30ms long.
71
72If you go to the desktop, and look at the pulse audio manager. There are two
73clients in the list, "pulserec" and "pulseplay". These two clients are from
74the pulse plugin code.
75
76Enjoy,
77
78Derek Smithies, March 2009