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

Re: [pygame] vista testing...



Hi Bo,

SDL 1.2 uses DirectX 5. This may not be properly supported on Vista. I am surprised SDL audio defaults to it rather than waveout. Anyway, to check if it is a Pygame problem it would be useful if you could test SDL directly. I understand you have downloaded the prebuilts from www3.telus.net/len_l. If so then you will find in prebuilt\lib the playmus program. Everything needed by playmus.exe is in the directory except msvcr71.dll, which can be copied to prebuilt\lib from Python's root directory.

playmus is a console program. It writes output to files stdout.txt and stderr.txt rather than the screen. To list command line options just run playmus without any options and look in stderr.txt. The settings it uses when playing a music file are written to stdout.txt. Here is a list of relevant options:

playmus [-r rate] [-b bytes] <music-file>
 -r  playback rate: eg. 44100 or 22050
 -b buffer size: eg 4096 - the default

It would be useful to try playing some files with 44100 to see how they sound. If the sound is scratchy then try it with SDL_AUDIODRIVER set to waveout.

Thanks,

Lenard


Bo Jangeborg wrote:
OK , 'waveout' works. I thought I tested that the other day but
I must have put in the statement too far down. The number of channels
does not affect things. With 'waveout' I can use a 1k buffer and it still sounds
good.

I still have the occasional scratching if a skip forward in the file.
Interesting note , the scratching is reoccurring at the same frequency.
But it doesn't happen every time I skip forward.
The length of the buffer does not seem to affect the frequency of this scratch, maybe the bufferpointer gets moved ahead of the buffer and picks up trash and then
keeps going back to that point.
Using pygame.mixer.pre_init(11025, -16, 2, 512) and skiping ahead in file
I still get the scratch. But occasionally I now get pure static witch would
point to the bufferpointer getting moved to the wrong spot.

René Dudfield skrev:
Hello,

could you also please try the different audio drivers?

import os
if 1:
    # directx
    os.environ['SDL_AUDIODRIVER'] = 'dsound'
else:
    # waveout
    os.environ['SDL_AUDIODRIVER'] = 'waveout'


cheers,


On Tue, Mar 25, 2008 at 4:26 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
hrmm.

 Can you try using less channels to see if that has an effect?

 pygame.mixer.set_num_channels(4)




--
Lenard Lindstrom
<len-l@xxxxxxxxx>