Changeset 961:fd26a8f057b1 for src/mlx


Ignore:
Timestamp:
05/14/19 18:00:10 (6 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Made MCI access compatible with Python 3 (re #347)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/sound.py

    r919 r961  
    4343            """Send the given command to the MCI."""
    4444            buffer = c_buffer(255)
    45             errorCode = self.w32mci(str(command), buffer, 254, 0)
     45            errorCode = self.w32mci(str(command).encode(), buffer, 254, 0)
    4646            if errorCode:
    4747                raise MCIException(self, command, errorCode)
     
    137137                        lengthBuffer = self._mci.send("status %s length" % \
    138138                                                      (alias,))
     139                        lengthBuffer = str(lengthBuffer, "ascii")
    139140                        self._mci.send("play %s from 0 to %s" % \
    140141                                       (alias, lengthBuffer))
Note: See TracChangeset for help on using the changeset viewer.