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)
Sound = pygame.mixer.Sound(a)

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. Log in to comment