Estas reproduciendo muchos MP3s ?,
o sea, tenes una lista de mas de 213 mp3s para reproducir ?,
si es asi, primero tenes que crear un Objeto por Ej. “Listado de MP3s”,
el cual luego llama al procedimiento “reproducir MP3” y tendras
reproduccion infinita.On Mon, 24 May 2004 sdl-request at libsdl.org wrote:
Send SDL mailing list submissions to
sdl at libsdl.orgTo subscribe or unsubscribe via the World Wide Web, visit
http://www.libsdl.org/mailman/listinfo/sdl
or, via email, send a message with subject or body ‘help’ to
sdl-request at libsdl.orgYou can reach the person managing the list at
sdl-owner at libsdl.orgWhen replying, please edit your Subject line so it is more specific
than “Re: Contents of SDL digest…”Today’s Topics:
- SDL_Flip and fps (Michael Sauer)
- Re: SDL_Flip and fps (Stephane Marchesin)
- Re: How cross-compile SDL on ARM (Stephane Marchesin)
- Re: converting surface from 32 bpp to 24 bpp (Stephane Marchesin)
- Re: SDL_Flip and fps (NBarnes)
- Re: force SDL to create a segfault (Sam Lantinga)
- Re: case sensitive key down? (Sam Lantinga)
- Re: force SDL to create a segfault (Steffen Pohle)
- Re: Jumping routine with physics - need a littlehelp (Blaza)
- OT: Re: [SDL] force SDL to create a segfault (Olof Bjarnason)
- Re: OT: Re: [SDL] force SDL to create a segfault (John Popplewell)
- Re: OT: Re: [SDL] force SDL to create a segfault (Glenn Maynard)
- Re: case sensitive key down? (David White)
- Re: Re: Jumping routine with physics - need a littlehelp
(David Olofson)- Re: Re: Jumping routine with physics - need a littlehelp
(Donny Viszneki)- Re: MinGW cross compiler : embedding an icon (Michel Bardiaux)
- Re: OpenGL and pixel access (jorgefm at cirsa.com)
- Re: OpenGL and pixel access (David Olofson)
- Re: Am I reading the License right ? (Alan Wolfe)
- SDL Parachute (elhadj benkhelifa)
- Re: SDL Parachute (Marc Gerritzen)
- Re: OpenGL and pixel access (jorgefm at cirsa.com)
- RE: sprites (Cedric Bompart)
- Re: SDL Parachute (David Olofson)
- RE: MinGW cross compiler : embedding an icon (Gabriel Gambetta)
- Re: OpenGL and pixel access (Olof Bjarnason)
- Re: OpenGL and pixel access (jorgefm at cirsa.com)
- Re: OpenGL and pixel access (David Olofson)
- OT Re: [SDL] Am I reading the License right ? (Bob Pendleton)
- Re: sprites (David Olofson)
Message: 1
Date: Sun, 23 May 2004 22:37:17 +0200
From: Michael Sauer
Subject: [SDL] SDL_Flip and fps
To: Mailingliste SDL
Message-ID: <1085344637.18870.14.camel at vivane>
Content-Type: text/plainHi there,
i got problems with my fps using SDL_Flip. Thats the important code
lines:screen = SDL_SetVideoMode(1024, 768, 16, SDL_HWSURFACE | SDL_DOUBLEBUF);
for (;{
if ( gettimeofday(&tv, NULL) < 0 )
log_Error(“Could not get the time of the day”, strerror(errno));if (starttime == 0) starttime = tv.tv_sec;
curtime = (tv.tv_sec - starttime)*1000 + tv.tv_usec/1000;
if (oldtime == 0) oldtime = curtime;
if (oldtime+1000 <= curtime) {
cl_fps = fps;
fps = 0;
oldtime = curtime;
printf(fps: %i\n", cl_fps);
}SDL_Split();
fps++;
}With that code, i only get 14 fps on my system, removing SDL_Split(); i
get up to 600000 fps. I really don’t get why SDL_Split is so slow, it’s
a hardware surface and it only needs to change the buffers, or do i miss
the point?mIc
Message: 2
Date: Sun, 23 May 2004 23:00:31 +0200
From: Stephane Marchesin <stephane.marchesin at wanadoo.fr>
Subject: Re: [SDL] SDL_Flip and fps
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <40B110EF.2070000 at wanadoo.fr>
Content-Type: text/plain; charset=us-ascii; format=flowedMichael Sauer wrote:
Hi there,
i got problems with my fps using SDL_Flip. Thats the important code
lines:screen = SDL_SetVideoMode(1024, 768, 16, SDL_HWSURFACE | SDL_DOUBLEBUF);
for (;{
if ( gettimeofday(&tv, NULL) < 0 )
log_Error(“Could not get the time of the day”, strerror(errno));if (starttime == 0) starttime = tv.tv_sec;
curtime = (tv.tv_sec - starttime)*1000 + tv.tv_usec/1000;
if (oldtime == 0) oldtime = curtime;
if (oldtime+1000 <= curtime) {
cl_fps = fps;
fps = 0;
oldtime = curtime;
printf(fps: %i\n", cl_fps);
}SDL_Split();
Do you mean SDL_Flip ?
fps++;
}With that code, i only get 14 fps on my system, removing SDL_Split(); i
get up to 600000 fps. I really don’t get why SDL_Split is so slow, it’s
a hardware surface and it only needs to change the buffers, or do i miss
the point?You’re probably running on an unaccelerated platform (X11 maybe ?), so
SDL emulates doublebuffering by copying a shadow surface to the screen
every time you do a SDL_Flip().Specifying the SDL_HWSURFACE flag won’t get you a hardware surface on
all platforms, only on platforms that support it.Stephane
Message: 3
Date: Sun, 23 May 2004 23:04:12 +0200
From: Stephane Marchesin <stephane.marchesin at wanadoo.fr>
Subject: Re: [SDL] How cross-compile SDL on ARM
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <40B111CC.9060402 at wanadoo.fr>
Content-Type: text/plain; charset=us-ascii; format=flowedWang Tao wrote:
Hi all:
Could anybody tell me how to cross-compile SDL for ARM-linux?
I mean what should i do when configure? I’ve worked on this for servel
days and it just not use “armv4l-unknown-linux-gcc” to make libraries.Thank you very much for your help!
I’ve never cross compiled to anything except win32, but for win32 I use
these scripts :
http://www.libsdl.org/extras/win32/cross/cross-configure.sh
http://www.libsdl.org/extras/win32/cross/cross-make.shI think you can adapt these 2 scripts (cross-make.sh and
cross-configure.sh) for arm cross compilation, that’ll probably do the
trick.Stephane
Message: 4
Date: Sun, 23 May 2004 23:07:15 +0200
From: Stephane Marchesin <stephane.marchesin at wanadoo.fr>
Subject: Re: [SDL] converting surface from 32 bpp to 24 bpp
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <40B11283.6080304 at wanadoo.fr>
Content-Type: text/plain; charset=us-ascii; format=flowedBedrich Michalek wrote:
Hi, (sorry for my english)
I need to convert one surface (32bpp) to another (24bpp), so the new surface has
only RGB components. I think that the function for this job is
SDL_ConvertSurface(SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags) but it
seems I’m doing something wrong. I’m not sure what values should I set to the
new format.
Thanks for any help.Two solutions :
- you can fill the SDL_PixelFormat structure directly (see the man page
for SDL_PixelFormat) but this pixel format has to match the destination
surface format.- you create a new surface of the right format with SDL_CreateRGBSurface
and then do a blit to it :destination = SDL_CreateRGBSurface(flags, width, height, 24, 0x000000ff,
0x0000ff00, 0x00ff0000, 0x00000000);
SDL_BlitSurface(source, NULL, destination, NULL);Stephane
Message: 5
Date: Sun, 23 May 2004 15:08:58 -0700 (PDT)
From: NBarnes <nw_barnes at yahoo.com>
Subject: Re: [SDL] SDL_Flip and fps
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <20040523220858.15342.qmail at web40806.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii— Stephane Marchesin <stephane.marchesin at wanadoo.fr> wrote:
You’re probably running on an unaccelerated platform (X11 maybe ?),
so SDL emulates doublebuffering by copying a shadow surface to the
screen every time you do a SDL_Flip().Specifying the SDL_HWSURFACE flag won’t get you a hardware surface
on all platforms, only on platforms that support it.My code, after calling SDL_SetVideoMode, checks the flags returned
from that call and echos data about the video surface into stdout.
Makes for quick data about the environment if I need to debug.It’s my understanding from the list here that most 2d game
applications (for those of us attempting to recapture he glory days
of 8 and 16 bit game consoles) should be using software
surfaces. It’s possible to implement the system to use hardware
surfaces, but that greatly limits the target systems and is not
entirely necessary to achieve solid framerates for simple(r) 2d
games. I don’t have a lot of practical experience trying to
optomize such things, though (yet), so there is probably someone
here that could tell you more.NBarnes
Do you Yahoo!?
Yahoo! Domains ? Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer
Message: 6
Date: Sun, 23 May 2004 14:58:11 -0700
From: Sam Lantinga
Subject: Re: [SDL] force SDL to create a segfault
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID:Hi all,
i have a problem that my game sometimes crashes with:
X Error of failed request: BadValue (integer parameter out of range for
operation)
Major opcode of failed request: 149 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Value in failed request: 0xffff
Serial number of failed request: 19134
Current serial number in output stream: 19135You need to clip the rectangles that you pass into SDL_UpdateRects()
SDL_BlitSurface does clip the rectangles, and you can pass the resulting
rectangles directly to SDL_UpdateRects(), however if you do things yourself,
you’ll need to do your own clipping.See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
Message: 7
Date: Sun, 23 May 2004 15:02:58 -0700
From: Sam Lantinga
Subject: Re: [SDL] case sensitive key down?
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID:Except that it seems that, at least on Win32, there
is a problem that SDL
will take the shift-state at the time that the key
event is processed,
rather than what it was when the key was pressed.This would occur with the non unicode version too I
believe? If not (or even if it does) I think this
would be classified as a bug, the unicode letter state
should be dependant on shift state at keypress.I don’t know whether it happens with the non-unicode version, but yes I
think it is a bug.The thing is, it’s a much bigger problem with the unicode version, because
you can’t just track the shift state yourself and call toupper/tolower so
easily.You really shouldn’t do any processing of the shift state with respect
to the key presses, aside from checking control combinations. Not only
is the modifier state only correct for the time the event is processed,
but you won’t correctly handle international keyboard input. If you are
expecting text input, you should always enable unicode and look at that
field in the key down event.See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
Message: 8
Date: Mon, 24 May 2004 01:28:58 +0200
From: Steffen Pohle
Subject: Re: [SDL] force SDL to create a segfault
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <20040524012858.738fd8fb.stpohle at gmx.net>
Content-Type: text/plain; charset=US-ASCIIOn Sun, 23 May 2004 14:58:11 -0700 Sam Lantinga wrote:
Hi all,
i have a problem that my game sometimes crashes with:
X Error of failed request: BadValue (integer parameter out of range
for operation)
Major opcode of failed request: 149 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Value in failed request: 0xffff
Serial number of failed request: 19134
Current serial number in output stream: 19135You need to clip the rectangles that you pass into SDL_UpdateRects()
SDL_BlitSurface does clip the rectangles, and you can pass the
resulting rectangles directly to SDL_UpdateRects(), however if you do
things yourself, you’ll need to do your own clipping.Yep,
I found already where i did something wrong. But this was more a general
question because i’ve got this error serval times and it would be a
faster way if i can just tell the GDB that he have to stop and then i
can use backtrace to locate faster the problem.bye bye
Steffen