Python的声音开发包 pySoundic

码农软件 · 软件分类 · 多媒体处理 · 2019-09-14 20:42:02

软件介绍

pySonic 是封装了高性能、跨平台的FMOD声音库 Python 开发包。

示例代码:

     import pySonic
      import time
      
      def finished_stream(source):
        print 'Stream finished playing'
      
      # initialize the audio environment
      w = pySonic.World()
      
      # create two sources
      src1 = pySonic.Source()
      src2 = pySonic.Source()
      
      # load a sound entirely from disk, stream another from disk
      src1.Sound = pySonic.FileSample('short.wav')
      src2.Sound = pySonic.FileStream('long.mp3')
      
      # position the sources in 3D space
      src1.Position = (-0.5, 0.0, 0.5)
      src2.Position = (0.5, 0.0, 0.5)
      
      # register a callback for when the stream finishes
      src2.SetEndStreamCallback(finished_stream)
      
      # register a callback for when the stream finishes
      src1.Play()
      src2.Play()
      
      # just block while we're playing in this example
      while src1.IsPlaying() or src2.IsPlaying():
        time.sleep(1)

本文地址:https://www.codercto.com/soft/d/14607.html

Web程序设计

Web程序设计

塞巴斯塔 / 2008-6 / 68.00元

《Web程序设计(第4版)》是最新版,介绍了Internet和万维网的起源及演变过程,全面系统地讨论了Web开发相关的主要编程语言和工具,以及这些语言和工具之间的相互影响及优劣势。该书对全书内容进行了很多修订,并新增加了关于Ruby、Rails和Ajax的3个章节。一起来看看 《Web程序设计》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

html转js在线工具
html转js在线工具

html转js在线工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具