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

« back to all changes in this revision

Viewing changes to clients/audio/aurecord/aurecord.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:
69
69
static AuFlowID flow;
70
70
 
71
71
static void
72
 
usage()
 
72
usage(void)
73
73
{
74
74
    int             i;
75
75
 
96
96
}
97
97
 
98
98
static void
99
 
fatalError(message, arg)
100
 
char           *message,
101
 
               *arg;
 
99
fatalError(const char *message, const char *arg)
102
100
{
103
101
    fprintf(stderr, message, arg);
104
102
    fprintf(stderr, "\n");
122
120
#if !(defined(SYSV) || defined(SVR4))
123
121
stop()
124
122
#else /* defined(SYSV) || defined(SVR4) */
125
 
stop(sig)
126
 
int sig;
 
123
stop(int sig)
127
124
#endif /* defined(SYSV) || defined(SVR4) */
128
125
{
129
126
    AuStopFlow(aud, flow, NULL);
131
128
}
132
129
 
133
130
static void
134
 
finished(aud, handler, ev, data)
135
 
AuServer       *aud;
136
 
AuEventHandlerRec *handler;
137
 
AuEvent        *ev;
138
 
AuPointer       data;
 
131
finished(AuServer *aud, AuEventHandlerRec *handler, AuEvent *ev, AuPointer data)
139
132
{
140
133
    *(AuBool *) data = AuTrue;
141
134
}
142
135
 
143
136
static int
144
 
convertMode(s)
145
 
char           *s;
 
137
convertMode(char *s)
146
138
{
147
139
    if (!strcasecmp(s, "mic"))
148
140
        return AuDeviceLineModeHigh;
155
147
}
156
148
 
157
149
static int
158
 
convertDataFormat(s)
159
 
char           *s;
 
150
convertDataFormat(char *s)
160
151
{
161
152
    int             f;
162
153
 
169
160
}
170
161
 
171
162
static int
172
 
convertFileFormat(s)
173
 
char           *s;
 
163
convertFileFormat(char *s)
174
164
{
175
165
    int             f;
176
166
 
183
173
}
184
174
 
185
175
int
186
 
main(argc, argv)
187
 
int             argc;
188
 
char          **argv;
 
176
main(int argc, char **argv)
189
177
{
190
178
    char           *arg,
191
179
                   *audioServer = NULL,
230
218
    }
231
219
 
232
220
    if (!(aud = AuOpenServer(audioServer, 0, NULL, 0, NULL, NULL)))
233
 
        fatalError("Can't connect to audio server");
 
221
        fatalError("Can't connect to audio server", NULL);
234
222
 
235
223
    if (!filename)
236
224
        usage();
255
243
        }
256
244
 
257
245
    if (inputDeviceId == AuNone)
258
 
        fatalError("Audio server has no input devices");
 
246
        fatalError("Audio server has no input devices", NULL);
259
247
 
260
248
    signal(SIGTERM, stop);
261
249
 
266
254
                              finished, (AuPointer) &done, mode, fileFormat,
267
255
                              comment, rate, dataFormat, &flow,
268
256
                              NULL, NULL))
269
 
        fatalError("Can't record to file");
 
257
        fatalError("Can't record to file", NULL);
270
258
 
271
259
    while (!done)
272
260
    {