MCPcopy Create free account
hub / github.com/ARM-software/AVH / openWAVE

Function openWAVE

interface/audio/python/arm_vsi1.py:69–78  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

67## Open WAVE file (store object into global WAVE object)
68# @param name name of WAVE file to open
69def openWAVE(name):
70 global WAVE
71 logger.info("Open WAVE file (write mode): {}".format(name))
72 WAVE = wave.open(name, 'wb')
73 WAVE.setnchannels(CHANNELS)
74 WAVE.setsampwidth((SAMPLE_BITS + 7) // 8)
75 WAVE.setframerate(SAMPLE_RATE)
76 logger.info(" Number of channels: {}".format(CHANNELS))
77 logger.info(" Sample bits: {}".format(SAMPLE_BITS))
78 logger.info(" Sample rate: {}".format(SAMPLE_RATE))
79
80## Write WAVE frames (global WAVE object)
81# @param frames frames to write

Callers 1

wrCONTROLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected