~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to doc/python_api/alternative/examples/aud.Factory.join.py

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Roy
  • Date: 2011-02-08 22:20:54 UTC
  • mfrom: (1.4.2 upstream)
  • mto: (14.2.6 sid) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20110208222054-kk0gwa4bu8h5lyq4
Tags: upstream-2.56.1-beta-svn34076
ImportĀ upstreamĀ versionĀ 2.56.1-beta-svn34076

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import aud
 
2
d = aud.device()
 
3
 
 
4
s1 = aud.Factory.sine(440, d.rate)
 
5
s2 = aud.Factory.sine(220, d.rate)
 
6
# this sine factory has a different sampling rate
 
7
s3 = aud.Factory.sine(880, d.rate / 2)
 
8
 
 
9
j1 = s1.join(s2)
 
10
j2 = s1.join(s3)
 
11
 
 
12
# this will work:
 
13
h1 = d.play(j1)
 
14
# this will fail:
 
15
h2 = d.play(j2)