[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Why does pygame.sndarray.make_sound seemingly quadruple the sound duration?
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Why does pygame.sndarray.make_sound seemingly quadruple the sound duration?
- From: Mike Lawrence <mike.lwrnc@xxxxxxxxx>
- Date: Mon, 21 May 2012 14:54:37 -0300
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 21 May 2012 13:55:05 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=IxHyd8ufpHe27f3n2WTsLO9Y2aOsJdlC6vyHw1O5H4Q=; b=JArxsWM2FgjAdnXMS+pYt+ahViLU1SjoSiF5Ij2APCiTbukMOv80SRwkQCbSljXwrB gme/OuOiuoiseq/ejXXuzirg74aPKb848aqwq5syJOhXs2+bEYYsWQmm3mPY7X65M2aB AWPy5wBbDCg1JBcls66SB58NwQ+JjwJxq8T8JuLUezRHFF7f1YrFk1NFEunIOlZDcnGc 9oRWuBI1YHeKLKRasqBouGgK9HY+N3WzmrYZ4MOuuHyXkrwCoT18GMkvDEiGdwGXDQN6 FCY1kbNPcpTBPSY/nJuSBDpOMdV4oOKWAtdsz2ZkmM3jiAXAkKleiREUaeYmlo4KG6/5 W9fA==
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
The following code:
import pygame, numpy
pygame.mixer.pre_init(frequency=96000,size=-16,channels=1)
pygame.init()
a = numpy.random.randn(96000)
sound = pygame.sndarray.make_sound(a)
print sound.get_length()
yields a print-out of 4.0, suggesting that the specified duration of
96000 samples at a 96000kHz sampling rate was somehow quadrupled
somewhere along the way. Any idea what I'm missing here? Or is this a
bug?