pygame.mixer.Sound problem with integer number.

Issue #158 resolved
arnaldo russo created an issue

I have found a problem, while constructing a sound from an array. Specifically numpy.array

as follow:

import pygame
import numpy as np

a = np.array(3)
pygame.mixer.init()
Sound = pygame.mixer.Sound(a)
Sound.play(loops=-1)

I have as output: Out[34]: <Channel at 0x7f09a4b3d4e0> and no sound played.

When I was trying to figure out what was the problem, I got another array:

a = np.array(3.) #just addin a float characteristc

And music has played. \o/

What could be the fix for this in pygame code?

regards, Arnaldo.

Comments (2)

  1. René Dudfield

    This works in latest version of pygame from hg. Please reopen if it doesn't work for you with pygame built from the latest source.

  2. Log in to comment