Showing content from http://soundfarmer.com/content/code/coreaudio/catest.py below:
from math import sin class AudioProducer(object): offset = 0 def callback(self): offset = self.offset self.offset += 512 return [ 0.5 * sin(3.1415*440.0/44100.0*(frame+offset)) for frame in xrange(512) ] import thread import coreaudio import time ## Have to initialize the threading mechanisms in order for PyGIL_Ensure to work thread.start_new_thread(lambda: None, ()) ap = AudioProducer() coreaudio.installAudioCallback(ap) time.sleep(5) coreaudio.stopAudio(ap)
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4