1. pygame
  2. pygame
  3. pygame
  4. Issues

Issues

Issue #158 resolved

pygame.mixer.Sound problem with integer number.

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