| 67 | ## Open WAVE file (store object into global WAVE object) |
| 68 | # @param name name of WAVE file to open |
| 69 | def openWAVE(name): |
| 70 | global WAVE |
| 71 | logger.info("Open WAVE file (read mode): {}".format(name)) |
| 72 | WAVE = wave.open(name, 'rb') |
| 73 | logger.info(" Number of channels: {}".format(WAVE.getnchannels())) |
| 74 | logger.info(" Sample bits: {}".format(WAVE.getsampwidth() * 8)) |
| 75 | logger.info(" Sample rate: {}".format(WAVE.getframerate())) |
| 76 | logger.info(" Number of frames: {}".format(WAVE.getnframes())) |
| 77 | |
| 78 | ## Read WAVE frames (global WAVE object) into global AudioFrames object |
| 79 | # @param n number of frames to read |