[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] BUG: MIDI Input Close on macOS



Hi,

I’m a macOS user under Catalina (10.15.7) and I think there might be an issue related to the closure of a MIDI Input.
I have currently Python 3.8.2 and Pygame 2.0.0 with SDL 2.0.12.

The issue is following: if I close a MIDI input it is impossible to reopen one afterwards unless I exit Python.
Here is what I did:

import pygame.midi
pygame.midi.init()
pygame.midi.get_count() #to verify that there are MIDI devices
pygame.midi.get_device_info(0) # verify information of the input (at list id 0 was my input) at verify that the input is available
midiin1 = pygame.midi.Input(0) # everything is fine and can read
midiin1.close()
pygame.midi.get_device_info(0) # then it is stated that the device is still opened preventing to reopen an Input
midiin1 = pygame.midi.Input(0) # will return error


Sincerely,

Frédéric