[xiph-commits] r8257 - in experimental/dholth/oggpy: . tests
dholth at motherfish-iii.xiph.org
dholth at motherfish-iii.xiph.org
Mon Nov 22 18:08:15 PST 2004
Author: dholth
Date: 2004-11-22 18:08:15 -0800 (Mon, 22 Nov 2004)
New Revision: 8257
Modified:
experimental/dholth/oggpy/setup.py
experimental/dholth/oggpy/tests/decode.py
experimental/dholth/oggpy/tests/theoratest.py
experimental/dholth/oggpy/vorbispy.pyste
Log:
patch-24
Modified: experimental/dholth/oggpy/setup.py
===================================================================
--- experimental/dholth/oggpy/setup.py 2004-11-23 02:07:45 UTC (rev 8256)
+++ experimental/dholth/oggpy/setup.py 2004-11-23 02:08:15 UTC (rev 8257)
@@ -62,10 +62,10 @@
# "oggpy/_vorbispy.cpp", "vorbispy_wrappers.cc", "oggpy_wrappers.cc"],
# libraries=["ogg", "theora", "vorbis", "vorbisenc", boostlib],
# include_dirs=extra_include_dirs, depends=["oggcc.h", "theoracc.h"])
- # this is broken too; I think the pygame <--> boost connection is not all there.
- # Extension("pygame_bridge", ["pygame_bridge.cc"],
- # libraries=["SDL", "ogg", "theora", boostlib],
- # include_dirs=extra_include_dirs)
+ # It works.
+ , Extension("pygame_bridge", ["pygame_bridge.cc"],
+ libraries=["SDL", "ogg", "theora", boostlib],
+ include_dirs=extra_include_dirs)
]
)
Modified: experimental/dholth/oggpy/tests/decode.py
===================================================================
--- experimental/dholth/oggpy/tests/decode.py 2004-11-23 02:07:45 UTC (rev 8256)
+++ experimental/dholth/oggpy/tests/decode.py 2004-11-23 02:08:15 UTC (rev 8257)
@@ -48,6 +48,9 @@
packets = packetsource(ogg)
vorbis = 0
+
+ sizes = {}
+
for packet in packets:
if vorbis < 3:
@@ -90,6 +93,12 @@
interleaved = numarray.zeros(samples.shape[1]*channels, numarray.Int16)
+ shape = samples.shape[1]
+ try:
+ sizes[shape] += 1
+ except:
+ sizes[shape] = 1
+
for i in range(channels):
interleaved[i::channels] = wav[i]
@@ -104,7 +113,11 @@
vorbis += 1
# set total frames in wav header when done
- audio.writeframes('')
+ if not outfile:
+ audio.writeframes('')
+
+ # see how the block sizes go
+ print sizes
if __name__ == "__main__":
Modified: experimental/dholth/oggpy/tests/theoratest.py
===================================================================
--- experimental/dholth/oggpy/tests/theoratest.py 2004-11-23 02:07:45 UTC (rev 8256)
+++ experimental/dholth/oggpy/tests/theoratest.py 2004-11-23 02:08:15 UTC (rev 8257)
@@ -115,5 +115,5 @@
gen = test(file(filename, "rb"))
- for i in range(3):
+ for i in range(30):
print gen.next()
Modified: experimental/dholth/oggpy/vorbispy.pyste
===================================================================
--- experimental/dholth/oggpy/vorbispy.pyste 2004-11-23 02:07:45 UTC (rev 8256)
+++ experimental/dholth/oggpy/vorbispy.pyste 2004-11-23 02:08:15 UTC (rev 8257)
@@ -19,7 +19,7 @@
"""synthesis_pcmout(dsp) -> pcm data
Fetch some pcm data from vorbis decode.
-Return a [channels][samples] array of 32 bit floats."""
+Return a [channels][samples] array of 32 bit floats.""")
exclude(dsp.analysis_buffer)
More information about the commits
mailing list