[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] noise added on OGG playback
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] noise added on OGG playback
- From: Rene Dudfield <renesd@xxxxxxxxx>
- Date: Sun, 25 Sep 2005 12:43:10 +1000
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sat, 24 Sep 2005 22:43:24 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=judgUIi9NUnUKuRz+JTxaIjOoeWqpBnP5nRRfe6gS6P6ZNiSHiVPgJt4SaUwP80dcSUJKbh9HYwBJpYFrrKF3nQXqjZWHsx4obdd9alkwWkLN/uRUv1uB4F2xPwJlBt98kF/UR1HHgIA7VRSGouYyX5cw3rxMMr3gD3RKyMBUAY=
- In-reply-to: <3fd0162e050924192969742999@mail.gmail.com>
- References: <3fd0162e050924192969742999@mail.gmail.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hey,
try using the pre_init line below to increase the buffer size. It
works for reducing noise on other systems.
pygame.mixer.pre_init(44100,-16,2, 1024 * 3)
pygame.init()
Cheers,
On 9/25/05, David Tweet <davidtweet@xxxxxxxxx> wrote:
> I have a problem playing some OGG files with pygame.mixer.music.play():
> When I pass a start position that's not zero into this function, on
> playback of some files (not all), I get noise mixed in with the
> playback of the file for as long as that file continues to play. The
> noise resembles loud crackle from a vinyl record.
>
> The WAV files were originally 16-bit/44.1kHz, I converted to OGG using
> the same consistent settings in Audacity, and I have called
> pygame.mixer.init(44100). All the files sound fine played back from a
> zero start position, and some even sound fine with a non-zero start
> position, but others consistently have this problem with a non-zero
> start position.
>
> I've considered that it might have to do with whether the music at the
> specified start position is at a zero crossing (all nearby samples at
> least close to zero amplitude), but no amount of modification of the
> file at the chosen time point was able to remove the noise. Plus, it
> seems like the worst that ought to happen is that you would hear an
> isolated clipping sound at the beginning of the file (if the
> zero-crossing issue were it).
>
> Can anyone enlighten me somewhat on this? Has anyone had a similar experience?
>
> Thank you,
> David Tweet.
>