0

I followed the code from this previous question: Generating sine wave sound in Python, with the added line var = stream.write(volume*samples). I tried to use this variable in pygame sound = pygame.mixer.Sound(var) but I get the error TypeError: Unrecognized argument (type NoneType). I'm unsure why this is happening, and how I can get around it.

Delly
  • 123
  • 1
  • 10

1 Answers1

0

This is probably because mixer.Sound takes a Sound Object or Buffer Object, and you are giving it a numpy array.

Null Salad
  • 765
  • 2
  • 16
  • 31