Mercurial > sdl-ios-xcode
annotate docs/html/guideexamples.html @ 968:4675910b0b7b
Date: Mon, 11 Oct 2004 15:17:27 +0300 (EEST)
From: Hannu Savolainen
Subject: Re: SDL uses obsolete OSS features
I did some work on getting OSS to work better with SDL. There have been
some problems with select which should be fixed now.
I'm having some problems in understanding what is the purpose of the
DSP_WaitAudio() routine. I added a return to the very beginning of this
routine and commendted out the define for USE_BLOCKING_WRITES. At least
lbreakout2 seems to work as well as earlier. The latencies are the same.
An ordinary blocking write does exactly the same thing than DSP_WaitAudio
does. So I would recommend using the USE_BLOCKING_WRITES approach and
removing everything from the DSP_WaitAudio routine. Also enabling
USE_BLOCKING_WRITES makes it possible to simplify DSP_PlayAudio() because
you don't need to handle the partial writes (the do-while loop).
Attached is a patch against SDL-1.2.7. After these changes SDL will use
OSS as it's designed to be used (make it as simple as possible). This code
should work with all OSS implementations because it uses only the very
fundamental features that have been there since the jurassic times.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 12 Nov 2004 21:39:04 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >Examples</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="SDL Guide" | |
14 HREF="guide.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="Handling the Keyboard" | |
17 HREF="guideinputkeyboard.html"><LINK | |
18 REL="NEXT" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
19 TITLE="Event Examples" |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
20 HREF="guideeventexamples.html"></HEAD |
0 | 21 ><BODY |
22 CLASS="CHAPTER" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
31 SUMMARY="Header navigation table" |
0 | 32 WIDTH="100%" |
33 BORDER="0" | |
34 CELLPADDING="0" | |
35 CELLSPACING="0" | |
36 ><TR | |
37 ><TH | |
38 COLSPAN="3" | |
39 ALIGN="center" | |
40 >SDL Library Documentation</TH | |
41 ></TR | |
42 ><TR | |
43 ><TD | |
44 WIDTH="10%" | |
45 ALIGN="left" | |
46 VALIGN="bottom" | |
47 ><A | |
48 HREF="guideinputkeyboard.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
49 ACCESSKEY="P" |
0 | 50 >Prev</A |
51 ></TD | |
52 ><TD | |
53 WIDTH="80%" | |
54 ALIGN="center" | |
55 VALIGN="bottom" | |
56 ></TD | |
57 ><TD | |
58 WIDTH="10%" | |
59 ALIGN="right" | |
60 VALIGN="bottom" | |
61 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
62 HREF="guideeventexamples.html" |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
63 ACCESSKEY="N" |
0 | 64 >Next</A |
65 ></TD | |
66 ></TR | |
67 ></TABLE | |
68 ><HR | |
69 ALIGN="LEFT" | |
70 WIDTH="100%"></DIV | |
71 ><DIV | |
72 CLASS="CHAPTER" | |
73 ><H1 | |
74 ><A | |
75 NAME="GUIDEEXAMPLES" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
76 ></A |
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
77 >Chapter 4. Examples</H1 |
0 | 78 ><DIV |
79 CLASS="TOC" | |
80 ><DL | |
81 ><DT | |
82 ><B | |
83 >Table of Contents</B | |
84 ></DT | |
85 ><DT | |
86 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
87 HREF="guideexamples.html#AEN369" |
0 | 88 >Introduction</A |
89 ></DT | |
90 ><DT | |
91 ><A | |
92 HREF="guideeventexamples.html" | |
93 >Event Examples</A | |
94 ></DT | |
95 ><DT | |
96 ><A | |
97 HREF="guideaudioexamples.html" | |
98 >Audio Examples</A | |
99 ></DT | |
100 ><DT | |
101 ><A | |
102 HREF="guidecdromexamples.html" | |
103 >CDROM Examples</A | |
104 ></DT | |
105 ><DT | |
106 ><A | |
107 HREF="guidetimeexamples.html" | |
108 >Time Examples</A | |
109 ></DT | |
110 ></DL | |
111 ></DIV | |
112 ><DIV | |
113 CLASS="SECT1" | |
114 ><H1 | |
115 CLASS="SECT1" | |
116 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
117 NAME="AEN369" |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
118 ></A |
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
119 >Introduction</H1 |
0 | 120 ><P |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
121 >For the moment these examples are taken directly from the old SDL documentation. By the 1.2 release these examples should hopefully deal with most common SDL programming problems.</P |
0 | 122 ></DIV |
123 ></DIV | |
124 ><DIV | |
125 CLASS="NAVFOOTER" | |
126 ><HR | |
127 ALIGN="LEFT" | |
128 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
129 SUMMARY="Footer navigation table" |
0 | 130 WIDTH="100%" |
131 BORDER="0" | |
132 CELLPADDING="0" | |
133 CELLSPACING="0" | |
134 ><TR | |
135 ><TD | |
136 WIDTH="33%" | |
137 ALIGN="left" | |
138 VALIGN="top" | |
139 ><A | |
140 HREF="guideinputkeyboard.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
141 ACCESSKEY="P" |
0 | 142 >Prev</A |
143 ></TD | |
144 ><TD | |
145 WIDTH="34%" | |
146 ALIGN="center" | |
147 VALIGN="top" | |
148 ><A | |
149 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
150 ACCESSKEY="H" |
0 | 151 >Home</A |
152 ></TD | |
153 ><TD | |
154 WIDTH="33%" | |
155 ALIGN="right" | |
156 VALIGN="top" | |
157 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
158 HREF="guideeventexamples.html" |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
159 ACCESSKEY="N" |
0 | 160 >Next</A |
161 ></TD | |
162 ></TR | |
163 ><TR | |
164 ><TD | |
165 WIDTH="33%" | |
166 ALIGN="left" | |
167 VALIGN="top" | |
168 >Handling the Keyboard</TD | |
169 ><TD | |
170 WIDTH="34%" | |
171 ALIGN="center" | |
172 VALIGN="top" | |
173 ><A | |
174 HREF="guide.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
175 ACCESSKEY="U" |
0 | 176 >Up</A |
177 ></TD | |
178 ><TD | |
179 WIDTH="33%" | |
180 ALIGN="right" | |
181 VALIGN="top" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
182 >Event Examples</TD |
0 | 183 ></TR |
184 ></TABLE | |
185 ></DIV | |
186 ></BODY | |
187 ></HTML | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
188 > |