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://codercto.com/soft/d/14607.html

PHP程序设计

PHP程序设计

Kevin Tatroe、Rasmus Lerdorf / 邓云佳 / 中国电力出版社 / 2003-7-1 / 68.00

本书涵盖了创建一个高效PHP Web应用程序所需要的所有技术,其内容包括:PHP语言基础的详细信息,包括数据类型、变量、操作符和流控制语句。用专门章节讨论关于函数、字符串、数组和对象的基本内容。涵盖通用的PHP Web应用程序设计技术,如表单处理和验证、会话跟踪以及cookie。用和数据库无关的PEAR DB库与关系数据库(如MySQL和Oracle)进行交互的内容。介绍用PHP生成动态图像、创建一起来看看 《PHP程序设计》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

SHA 加密
SHA 加密

SHA 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换