Mercurial > sdl-ios-xcode
annotate src/audio/paudio/SDL_paudio.c @ 1353:7ba544e2888d
Started the process of improving configure support, and merging C types
and library support into a single header.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 09 Feb 2006 09:07:13 +0000 |
parents | 604d73db6802 |
children | c71e05b4dc2e |
rev | line source |
---|---|
0 | 1 /* |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0 | 7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
13 Lesser General Public License for more details. |
0 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Carsten Griwodz | |
20 griff@kom.tu-darmstadt.de | |
21 | |
22 based on linux/SDL_dspaudio.c by Sam Lantinga | |
23 */ | |
24 | |
25 /* Allow access to a raw mixing buffer */ | |
26 | |
27 #include <errno.h> | |
28 #include <unistd.h> | |
29 #include <fcntl.h> | |
30 #include <sys/time.h> | |
31 #include <sys/ioctl.h> | |
32 #include <sys/stat.h> | |
33 | |
1338
604d73db6802
Removed uses of stdlib.h and string.h
Sam Lantinga <slouken@libsdl.org>
parents:
1336
diff
changeset
|
34 #include "SDL_stdlib.h" |
604d73db6802
Removed uses of stdlib.h and string.h
Sam Lantinga <slouken@libsdl.org>
parents:
1336
diff
changeset
|
35 #include "SDL_string.h" |
0 | 36 #include "SDL_audio.h" |
37 #include "SDL_error.h" | |
38 #include "SDL_audiomem.h" | |
39 #include "SDL_audio_c.h" | |
40 #include "SDL_timer.h" | |
41 #include "SDL_audiodev_c.h" | |
42 #include "SDL_paudio.h" | |
43 | |
44 #define DEBUG_AUDIO 1 | |
45 | |
46 /* A conflict within AIX 4.3.3 <sys/> headers and probably others as well. | |
47 * I guess nobody ever uses audio... Shame over AIX header files. */ | |
48 #include <sys/machine.h> | |
49 #undef BIG_ENDIAN | |
50 #include <sys/audio.h> | |
51 | |
52 /* The tag name used by paud audio */ | |
53 #define Paud_DRIVER_NAME "paud" | |
54 | |
55 /* Open the audio device for playback, and don't block if busy */ | |
56 /* #define OPEN_FLAGS (O_WRONLY|O_NONBLOCK) */ | |
57 #define OPEN_FLAGS O_WRONLY | |
58 | |
59 /* Audio driver functions */ | |
60 static int Paud_OpenAudio(_THIS, SDL_AudioSpec *spec); | |
61 static void Paud_WaitAudio(_THIS); | |
62 static void Paud_PlayAudio(_THIS); | |
63 static Uint8 *Paud_GetAudioBuf(_THIS); | |
64 static void Paud_CloseAudio(_THIS); | |
65 | |
66 /* Audio driver bootstrap functions */ | |
67 | |
68 static int Audio_Available(void) | |
69 { | |
70 int fd; | |
71 int available; | |
72 | |
73 available = 0; | |
74 fd = SDL_OpenAudioPath(NULL, 0, OPEN_FLAGS, 0); | |
75 if ( fd >= 0 ) { | |
76 available = 1; | |
77 close(fd); | |
78 } | |
79 return(available); | |
80 } | |
81 | |
82 static void Audio_DeleteDevice(SDL_AudioDevice *device) | |
83 { | |
1336
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
84 SDL_free(device->hidden); |
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
85 SDL_free(device); |
0 | 86 } |
87 | |
88 static SDL_AudioDevice *Audio_CreateDevice(int devindex) | |
89 { | |
90 SDL_AudioDevice *this; | |
91 | |
92 /* Initialize all variables that we clean on shutdown */ | |
1336
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
93 this = (SDL_AudioDevice *)SDL_malloc(sizeof(SDL_AudioDevice)); |
0 | 94 if ( this ) { |
1336
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
95 SDL_memset(this, 0, (sizeof *this)); |
0 | 96 this->hidden = (struct SDL_PrivateAudioData *) |
1336
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
97 SDL_malloc((sizeof *this->hidden)); |
0 | 98 } |
99 if ( (this == NULL) || (this->hidden == NULL) ) { | |
100 SDL_OutOfMemory(); | |
101 if ( this ) { | |
1336
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
102 SDL_free(this); |
0 | 103 } |
104 return(0); | |
105 } | |
1336
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
106 SDL_memset(this->hidden, 0, (sizeof *this->hidden)); |
0 | 107 audio_fd = -1; |
108 | |
109 /* Set the function pointers */ | |
110 this->OpenAudio = Paud_OpenAudio; | |
111 this->WaitAudio = Paud_WaitAudio; | |
112 this->PlayAudio = Paud_PlayAudio; | |
113 this->GetAudioBuf = Paud_GetAudioBuf; | |
114 this->CloseAudio = Paud_CloseAudio; | |
115 | |
116 this->free = Audio_DeleteDevice; | |
117 | |
118 return this; | |
119 } | |
120 | |
121 AudioBootStrap Paud_bootstrap = { | |
122 Paud_DRIVER_NAME, "AIX Paudio", | |
123 Audio_Available, Audio_CreateDevice | |
124 }; | |
125 | |
126 /* This function waits until it is possible to write a full sound buffer */ | |
127 static void Paud_WaitAudio(_THIS) | |
128 { | |
129 fd_set fdset; | |
130 | |
131 /* See if we need to use timed audio synchronization */ | |
132 if ( frame_ticks ) { | |
133 /* Use timer for general audio synchronization */ | |
134 Sint32 ticks; | |
135 | |
136 ticks = ((Sint32)(next_frame - SDL_GetTicks()))-FUDGE_TICKS; | |
137 if ( ticks > 0 ) { | |
138 SDL_Delay(ticks); | |
139 } | |
140 } else { | |
141 audio_buffer paud_bufinfo; | |
142 | |
143 /* Use select() for audio synchronization */ | |
144 struct timeval timeout; | |
145 FD_ZERO(&fdset); | |
146 FD_SET(audio_fd, &fdset); | |
147 | |
148 if ( ioctl(audio_fd, AUDIO_BUFFER, &paud_bufinfo) < 0 ) { | |
149 #ifdef DEBUG_AUDIO | |
150 fprintf(stderr, "Couldn't get audio buffer information\n"); | |
151 #endif | |
152 timeout.tv_sec = 10; | |
153 timeout.tv_usec = 0; | |
154 } else { | |
155 long ms_in_buf = paud_bufinfo.write_buf_time; | |
156 timeout.tv_sec = ms_in_buf/1000; | |
157 ms_in_buf = ms_in_buf - timeout.tv_sec*1000; | |
158 timeout.tv_usec = ms_in_buf*1000; | |
159 #ifdef DEBUG_AUDIO | |
160 fprintf( stderr, | |
161 "Waiting for write_buf_time=%ld,%ld\n", | |
162 timeout.tv_sec, | |
163 timeout.tv_usec ); | |
164 #endif | |
165 } | |
166 | |
167 #ifdef DEBUG_AUDIO | |
168 fprintf(stderr, "Waiting for audio to get ready\n"); | |
169 #endif | |
170 if ( select(audio_fd+1, NULL, &fdset, NULL, &timeout) <= 0 ) { | |
171 const char *message = "Audio timeout - buggy audio driver? (disabled)"; | |
172 /* | |
173 * In general we should never print to the screen, | |
174 * but in this case we have no other way of letting | |
175 * the user know what happened. | |
176 */ | |
177 fprintf(stderr, "SDL: %s - %s\n", strerror(errno), message); | |
178 this->enabled = 0; | |
179 /* Don't try to close - may hang */ | |
180 audio_fd = -1; | |
181 #ifdef DEBUG_AUDIO | |
182 fprintf(stderr, "Done disabling audio\n"); | |
183 #endif | |
184 } | |
185 #ifdef DEBUG_AUDIO | |
186 fprintf(stderr, "Ready!\n"); | |
187 #endif | |
188 } | |
189 } | |
190 | |
191 static void Paud_PlayAudio(_THIS) | |
192 { | |
193 int written; | |
194 | |
195 /* Write the audio data, checking for EAGAIN on broken audio drivers */ | |
196 do { | |
197 written = write(audio_fd, mixbuf, mixlen); | |
198 if ( (written < 0) && ((errno == 0) || (errno == EAGAIN)) ) { | |
199 SDL_Delay(1); /* Let a little CPU time go by */ | |
200 } | |
201 } while ( (written < 0) && | |
202 ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)) ); | |
203 | |
204 /* If timer synchronization is enabled, set the next write frame */ | |
205 if ( frame_ticks ) { | |
206 next_frame += frame_ticks; | |
207 } | |
208 | |
209 /* If we couldn't write, assume fatal error for now */ | |
210 if ( written < 0 ) { | |
211 this->enabled = 0; | |
212 } | |
213 #ifdef DEBUG_AUDIO | |
214 fprintf(stderr, "Wrote %d bytes of audio data\n", written); | |
215 #endif | |
216 } | |
217 | |
218 static Uint8 *Paud_GetAudioBuf(_THIS) | |
219 { | |
220 return mixbuf; | |
221 } | |
222 | |
223 static void Paud_CloseAudio(_THIS) | |
224 { | |
225 if ( mixbuf != NULL ) { | |
226 SDL_FreeAudioMem(mixbuf); | |
227 mixbuf = NULL; | |
228 } | |
229 if ( audio_fd >= 0 ) { | |
230 close(audio_fd); | |
231 audio_fd = -1; | |
232 } | |
233 } | |
234 | |
235 static int Paud_OpenAudio(_THIS, SDL_AudioSpec *spec) | |
236 { | |
237 char audiodev[1024]; | |
238 int format; | |
239 int bytes_per_sample; | |
240 Uint16 test_format; | |
241 audio_init paud_init; | |
242 audio_buffer paud_bufinfo; | |
243 audio_status paud_status; | |
244 audio_control paud_control; | |
245 audio_change paud_change; | |
246 | |
247 /* Reset the timer synchronization flag */ | |
248 frame_ticks = 0.0; | |
249 | |
250 /* Open the audio device */ | |
251 audio_fd = SDL_OpenAudioPath(audiodev, sizeof(audiodev), OPEN_FLAGS, 0); | |
252 if ( audio_fd < 0 ) { | |
253 SDL_SetError("Couldn't open %s: %s", audiodev, strerror(errno)); | |
254 return -1; | |
255 } | |
256 | |
257 /* | |
258 * We can't set the buffer size - just ask the device for the maximum | |
259 * that we can have. | |
260 */ | |
261 if ( ioctl(audio_fd, AUDIO_BUFFER, &paud_bufinfo) < 0 ) { | |
262 SDL_SetError("Couldn't get audio buffer information"); | |
263 return -1; | |
264 } | |
265 | |
266 mixbuf = NULL; | |
267 | |
268 if ( spec->channels > 1 ) | |
269 spec->channels = 2; | |
270 else | |
271 spec->channels = 1; | |
272 | |
273 /* | |
274 * Fields in the audio_init structure: | |
275 * | |
276 * Ignored by us: | |
277 * | |
278 * paud.loadpath[LOAD_PATH]; * DSP code to load, MWave chip only? | |
279 * paud.slot_number; * slot number of the adapter | |
280 * paud.device_id; * adapter identification number | |
281 * | |
282 * Input: | |
283 * | |
284 * paud.srate; * the sampling rate in Hz | |
285 * paud.bits_per_sample; * 8, 16, 32, ... | |
286 * paud.bsize; * block size for this rate | |
287 * paud.mode; * ADPCM, PCM, MU_LAW, A_LAW, SOURCE_MIX | |
288 * paud.channels; * 1=mono, 2=stereo | |
289 * paud.flags; * FIXED - fixed length data | |
290 * * LEFT_ALIGNED, RIGHT_ALIGNED (var len only) | |
291 * * TWOS_COMPLEMENT - 2's complement data | |
292 * * SIGNED - signed? comment seems wrong in sys/audio.h | |
293 * * BIG_ENDIAN | |
294 * paud.operation; * PLAY, RECORD | |
295 * | |
296 * Output: | |
297 * | |
298 * paud.flags; * PITCH - pitch is supported | |
299 * * INPUT - input is supported | |
300 * * OUTPUT - output is supported | |
301 * * MONITOR - monitor is supported | |
302 * * VOLUME - volume is supported | |
303 * * VOLUME_DELAY - volume delay is supported | |
304 * * BALANCE - balance is supported | |
305 * * BALANCE_DELAY - balance delay is supported | |
306 * * TREBLE - treble control is supported | |
307 * * BASS - bass control is supported | |
308 * * BESTFIT_PROVIDED - best fit returned | |
309 * * LOAD_CODE - DSP load needed | |
310 * paud.rc; * NO_PLAY - DSP code can't do play requests | |
311 * * NO_RECORD - DSP code can't do record requests | |
312 * * INVALID_REQUEST - request was invalid | |
313 * * CONFLICT - conflict with open's flags | |
314 * * OVERLOADED - out of DSP MIPS or memory | |
315 * paud.position_resolution; * smallest increment for position | |
316 */ | |
317 | |
318 paud_init.srate = spec->freq; | |
319 paud_init.mode = PCM; | |
320 paud_init.operation = PLAY; | |
321 paud_init.channels = spec->channels; | |
322 | |
323 /* Try for a closest match on audio format */ | |
324 format = 0; | |
325 for ( test_format = SDL_FirstAudioFormat(spec->format); | |
326 ! format && test_format; ) { | |
327 #ifdef DEBUG_AUDIO | |
328 fprintf(stderr, "Trying format 0x%4.4x\n", test_format); | |
329 #endif | |
330 switch ( test_format ) { | |
331 case AUDIO_U8: | |
332 bytes_per_sample = 1; | |
333 paud_init.bits_per_sample = 8; | |
334 paud_init.flags = TWOS_COMPLEMENT | FIXED; | |
335 format = 1; | |
336 break; | |
337 case AUDIO_S8: | |
338 bytes_per_sample = 1; | |
339 paud_init.bits_per_sample = 8; | |
340 paud_init.flags = SIGNED | | |
341 TWOS_COMPLEMENT | FIXED; | |
342 format = 1; | |
343 break; | |
344 case AUDIO_S16LSB: | |
345 bytes_per_sample = 2; | |
346 paud_init.bits_per_sample = 16; | |
347 paud_init.flags = SIGNED | | |
348 TWOS_COMPLEMENT | FIXED; | |
349 format = 1; | |
350 break; | |
351 case AUDIO_S16MSB: | |
352 bytes_per_sample = 2; | |
353 paud_init.bits_per_sample = 16; | |
354 paud_init.flags = BIG_ENDIAN | | |
355 SIGNED | | |
356 TWOS_COMPLEMENT | FIXED; | |
357 format = 1; | |
358 break; | |
359 case AUDIO_U16LSB: | |
360 bytes_per_sample = 2; | |
361 paud_init.bits_per_sample = 16; | |
362 paud_init.flags = TWOS_COMPLEMENT | FIXED; | |
363 format = 1; | |
364 break; | |
365 case AUDIO_U16MSB: | |
366 bytes_per_sample = 2; | |
367 paud_init.bits_per_sample = 16; | |
368 paud_init.flags = BIG_ENDIAN | | |
369 TWOS_COMPLEMENT | FIXED; | |
370 format = 1; | |
371 break; | |
372 default: | |
373 break; | |
374 } | |
375 if ( ! format ) { | |
376 test_format = SDL_NextAudioFormat(); | |
377 } | |
378 } | |
379 if ( format == 0 ) { | |
380 #ifdef DEBUG_AUDIO | |
381 fprintf(stderr, "Couldn't find any hardware audio formats\n"); | |
382 #endif | |
383 SDL_SetError("Couldn't find any hardware audio formats"); | |
384 return -1; | |
385 } | |
386 spec->format = test_format; | |
387 | |
388 /* | |
389 * We know the buffer size and the max number of subsequent writes | |
390 * that can be pending. If more than one can pend, allow the application | |
391 * to do something like double buffering between our write buffer and | |
392 * the device's own buffer that we are filling with write() anyway. | |
393 * | |
394 * We calculate spec->samples like this because SDL_CalculateAudioSpec() | |
395 * will give put paud_bufinfo.write_buf_cap (or paud_bufinfo.write_buf_cap/2) | |
396 * into spec->size in return. | |
397 */ | |
398 if ( paud_bufinfo.request_buf_cap == 1 ) | |
399 { | |
400 spec->samples = paud_bufinfo.write_buf_cap | |
401 / bytes_per_sample | |
402 / spec->channels; | |
403 } | |
404 else | |
405 { | |
406 spec->samples = paud_bufinfo.write_buf_cap | |
407 / bytes_per_sample | |
408 / spec->channels | |
409 / 2; | |
410 } | |
411 paud_init.bsize = bytes_per_sample * spec->channels; | |
412 | |
413 SDL_CalculateAudioSpec(spec); | |
414 | |
415 /* | |
416 * The AIX paud device init can't modify the values of the audio_init | |
417 * structure that we pass to it. So we don't need any recalculation | |
418 * of this stuff and no reinit call as in linux dsp and dma code. | |
419 * | |
420 * /dev/paud supports all of the encoding formats, so we don't need | |
421 * to do anything like reopening the device, either. | |
422 */ | |
423 if ( ioctl(audio_fd, AUDIO_INIT, &paud_init) < 0 ) { | |
424 switch ( paud_init.rc ) | |
425 { | |
426 case 1 : | |
427 SDL_SetError("Couldn't set audio format: DSP can't do play requests"); | |
428 return -1; | |
429 break; | |
430 case 2 : | |
431 SDL_SetError("Couldn't set audio format: DSP can't do record requests"); | |
432 return -1; | |
433 break; | |
434 case 4 : | |
435 SDL_SetError("Couldn't set audio format: request was invalid"); | |
436 return -1; | |
437 break; | |
438 case 5 : | |
439 SDL_SetError("Couldn't set audio format: conflict with open's flags"); | |
440 return -1; | |
441 break; | |
442 case 6 : | |
443 SDL_SetError("Couldn't set audio format: out of DSP MIPS or memory"); | |
444 return -1; | |
445 break; | |
446 default : | |
447 SDL_SetError("Couldn't set audio format: not documented in sys/audio.h"); | |
448 return -1; | |
449 break; | |
450 } | |
451 } | |
452 | |
453 /* Allocate mixing buffer */ | |
454 mixlen = spec->size; | |
455 mixbuf = (Uint8 *)SDL_AllocAudioMem(mixlen); | |
456 if ( mixbuf == NULL ) { | |
457 return -1; | |
458 } | |
1336
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
459 SDL_memset(mixbuf, spec->silence, spec->size); |
0 | 460 |
461 /* | |
462 * Set some paramters: full volume, first speaker that we can find. | |
463 * Ignore the other settings for now. | |
464 */ | |
465 paud_change.input = AUDIO_IGNORE; /* the new input source */ | |
466 paud_change.output = OUTPUT_1; /* EXTERNAL_SPEAKER,INTERNAL_SPEAKER,OUTPUT_1 */ | |
467 paud_change.monitor = AUDIO_IGNORE; /* the new monitor state */ | |
468 paud_change.volume = 0x7fffffff; /* volume level [0-0x7fffffff] */ | |
469 paud_change.volume_delay = AUDIO_IGNORE; /* the new volume delay */ | |
470 paud_change.balance = 0x3fffffff; /* the new balance */ | |
471 paud_change.balance_delay = AUDIO_IGNORE; /* the new balance delay */ | |
472 paud_change.treble = AUDIO_IGNORE; /* the new treble state */ | |
473 paud_change.bass = AUDIO_IGNORE; /* the new bass state */ | |
474 paud_change.pitch = AUDIO_IGNORE; /* the new pitch state */ | |
475 | |
476 paud_control.ioctl_request = AUDIO_CHANGE; | |
477 paud_control.request_info = (char*)&paud_change; | |
478 if ( ioctl(audio_fd, AUDIO_CONTROL, &paud_control) < 0 ) { | |
479 #ifdef DEBUG_AUDIO | |
480 fprintf(stderr, "Can't change audio display settings\n" ); | |
481 #endif | |
482 } | |
483 | |
484 /* | |
485 * Tell the device to expect data. Actual start will wait for | |
486 * the first write() call. | |
487 */ | |
488 paud_control.ioctl_request = AUDIO_START; | |
489 paud_control.position = 0; | |
490 if ( ioctl(audio_fd, AUDIO_CONTROL, &paud_control) < 0 ) { | |
491 #ifdef DEBUG_AUDIO | |
492 fprintf(stderr, "Can't start audio play\n" ); | |
493 #endif | |
494 SDL_SetError("Can't start audio play"); | |
495 return -1; | |
496 } | |
497 | |
498 /* Check to see if we need to use select() workaround */ | |
499 { char *workaround; | |
1336
3692456e7b0f
Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
500 workaround = SDL_getenv("SDL_DSP_NOSELECT"); |
0 | 501 if ( workaround ) { |
502 frame_ticks = (float)(spec->samples*1000)/spec->freq; | |
503 next_frame = SDL_GetTicks()+frame_ticks; | |
504 } | |
505 } | |
506 | |
507 /* Get the parent process id (we're the parent of the audio thread) */ | |
508 parent = getpid(); | |
509 | |
510 /* We're ready to rock and roll. :-) */ | |
511 return 0; | |
512 } | |
513 |