[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] vista testing...



To answer Brian, the default audio driver is dsound. SDL exports function SDL_AudioDriverName. Maybe Pygame should wrap it. I found and compiled a C space aliens game* that uses SDL, SDL_image and SDL_mixer. I altered it to use frequency 44100, format AUDIO_S16, channels 2, chunk size 3072. It is available on my Pygame page. Copy the contents of the zip file into prebuilt\lib and run. It writes to stderr.txt which drivers it uses. I suggest replacing the default data\music.wav with something else as it is a noisy recording.


Lenard

* aliens-1.0.2 found at http://www.libsdl.org/projects/aliens/
md5sum
69af2fcb372aa7f4668db64750b428ab *aliens-1.0.2.zip

Maybe this is the inspiration for the aliens game included with the Pygame examples.


René Dudfield wrote:
Cool.  Seems like we're getting closer to figuring this thing out...


Two more tests to try:

1. Try with the dummy video driver to see if there are still scratchy noises.
import os
os.environ['SDL_VIDEODRIVER'] = 'dummy'

This will tell us if a video driver is having an effect.

2. try pygame program with a 4096 sized buffer.

This will let us know that a 4096 sized buffer magically works better :)


cu,



On Wed, Mar 26, 2008 at 12:45 PM, Brian Fisher
<brian@xxxxxxxxxxxxxxxxxxx> wrote:
the fact that playmus SDL_Init(SDL_INIT_AUDIO) is interesting - I
 wonder if having a window or not affects whether playmus can use the
 dsound backend? How would one figure out what audio backend SDL chose?



 On Tue, Mar 25, 2008 at 5:06 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
 > Two things I noted with playmus. First it initializes SDL with
 >  SDL_Init(SDL_INIT_AUDIO). Second it starts playback with
 >  Mix_FadeInMusic(music,looping,2000). It lacks a feature to start
 >  playback in the middle of a song unfortunately.
 >
 >
>