annotate src/main/macos/exports/gendef.pl @ 4216:5b99971a27b4 SDL-1.2

Fixed bug #698 Hans de Goede 2009-02-13 01:10:52 PST Since the new "glitch free" version of pulseaudio (used in Fedora 10 amongst others), the sound of SDL using apps (like a simple playmus call) has been crackling. While looking in to fixing this I noticed that the current pulseaudio code in SDL uses pa_simple. However pa_simple uses a thread to pump pulseaudio events and ipc, given that SDL already has its own thread for audio handling this is clearly suboptimal, leading to unnecessary context switching IPC, etc. Also pa_simple does not allow one to implement the WaitAudio() callback for SDL audiodrivers properly. Given that my work is mostly a rewrite (although some original pieces remain) I'm attaching the new .c and .h file, as that is easier to review then the huge diff. Let me know if you also want the diff. This new version has the following features: -no longer use an additional thread next to the SDL sound thread -do not crackle with glitch free audio -when used with a newer pulse, which does glitch free audio, the total latency is the same as with the alsa driver -proper WaitAudio() implementation, saving another mixlen worth of latency -adds a WaitDone() implementation This patch has been written in consultancy with Lennart Poetering (the pulseaudio author) and has been reviewed by him for correct use of the pa API.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 21 Sep 2009 09:27:08 +0000
parents 84cecd0b64b4
children da1ef6acde9e
rev   line source
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1 #!/usr/bin/perl
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2 #
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
3 # Program to take a set of header files and generate DLL export definitions
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
4
1317
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
5 # Special exports to ignore for this platform
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
6
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
7 while ( ($file = shift(@ARGV)) ) {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
8 if ( ! defined(open(FILE, $file)) ) {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
9 warn "Couldn't open $file: $!\n";
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
10 next;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
11 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
12 $printed_header = 0;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
13 $file =~ s,.*/,,;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
14 while (<FILE>) {
930
02759105b989 Date: Fri, 20 Aug 2004 08:31:20 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 345
diff changeset
15 if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
1317
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
16 if ( not $exclude{$1} ) {
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
17 print "\t$1\n";
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
18 }
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
19 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
20 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
21 close(FILE);
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
22 }
1317
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
23
6c7b69218276 Updated exports
Sam Lantinga <slouken@libsdl.org>
parents: 930
diff changeset
24 # Special exports to include for this platform
1424
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
25 print "\tSDL_putenv\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
26 print "\tSDL_getenv\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
27 print "\tSDL_qsort\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
28 print "\tSDL_revcpy\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
29 print "\tSDL_strlcpy\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
30 print "\tSDL_strlcat\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
31 print "\tSDL_strdup\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
32 print "\tSDL_strrev\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
33 print "\tSDL_strupr\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
34 print "\tSDL_strlwr\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
35 print "\tSDL_ltoa\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
36 print "\tSDL_ultoa\n";
1516
4d241ea8a1cd Updated MacOS Classic build
Sam Lantinga <slouken@libsdl.org>
parents: 1427
diff changeset
37 print "\tSDL_strcasecmp\n";
4d241ea8a1cd Updated MacOS Classic build
Sam Lantinga <slouken@libsdl.org>
parents: 1427
diff changeset
38 print "\tSDL_strncasecmp\n";
1424
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
39 print "\tSDL_snprintf\n";
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1317
diff changeset
40 print "\tSDL_vsnprintf\n";
1529
84cecd0b64b4 Updated MacOS Classic and MacOS X exports list
Sam Lantinga <slouken@libsdl.org>
parents: 1516
diff changeset
41 print "\tSDL_iconv\n";
1516
4d241ea8a1cd Updated MacOS Classic build
Sam Lantinga <slouken@libsdl.org>
parents: 1427
diff changeset
42 print "\tSDL_iconv_string\n";
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
43 print "\tSDL_InitQuickDraw\n";