~ubuntu-branches/debian/squeeze/nas/squeeze

« back to all changes in this revision

Viewing changes to clients/audio/examples/recordBucket.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve McIntyre
  • Date: 2008-10-08 01:18:19 UTC
  • mfrom: (4.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081008011819-wmr4h2w0298k8t7z
Tags: 1.9.1-5
* Fix pending l10n issues. Debconf translations:
* Swedish. Closes: #491766 (thanks to brother@bsnet.se)
* Arabic. Closes: #500437 (thanks to Ossama Khayat)
* Basque. Closes: #500533 (thanks to Piarres Beobide)
* Brazilian Portuguese. Closes: #500973 (thanks to Felipe
  Augusto van de Wiel)
* Many thanks again to Christian Perrier for his i18n efforts,
  co-ordinating the above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include <audio/soundlib.h>
17
17
 
18
18
static void
19
 
fatalError(message, arg)
20
 
char           *message,
21
 
               *arg;
 
19
fatalError(const char *message, const char *arg)
22
20
{
23
21
    fprintf(stderr, message, arg);
24
22
    fprintf(stderr, "\n");
26
24
}
27
25
 
28
26
static void
29
 
doneCB(aud, handler, ev, data)
30
 
AuServer       *aud;
31
 
AuEvent        *ev;
32
 
AuEventHandlerRec *handler;
33
 
AuPointer       data;
 
27
doneCB(AuServer *aud, AuEventHandlerRec *handler, AuEvent *ev, AuPointer data)
34
28
{
35
29
    AuBool         *done = (AuBool *) data;
36
30
 
38
32
}
39
33
 
40
34
int
41
 
main(argc, argv)
42
 
int             argc;
43
 
char          **argv;
 
35
main(int argc, char **argv)
44
36
{
45
37
    AuServer       *aud;
46
38
    AuBool          done;
50
42
    int             i;
51
43
 
52
44
    if (!(aud = AuOpenServer(NULL, 0, NULL, 0, NULL, NULL)))
53
 
        fatalError("Can't open audio server");
 
45
        fatalError("Can't open audio server", NULL);
54
46
 
55
47
    if (!(bucket = AuCreateBucket(aud, AuFormatULAW8, 1, AuAccessAllMasks,
56
48
                                  8000, 80000, NULL, NULL)))
57
 
        fatalError("Error creating bucket");
 
49
        fatalError("Error creating bucket", NULL);
58
50
 
59
51
    /* look for a one track input device */
60
52
    for (i = 0; i < AuServerNumDevices(aud); i++)
67
59
        }
68
60
 
69
61
    if (!da)
70
 
        fatalError("Couldn't find appropriate input device");
 
62
        fatalError("Couldn't find appropriate input device", NULL);
71
63
 
72
64
    printf("Press return to begin recording\n");
73
65
    getchar();