repo.or.cz
/
xiph-mirror.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add Russian translation provided by Валерий Крувялис <valkru@mail.ru>
[xiph-mirror.git]
/
vorbisfile-python
/
test.py
blob
e3ae9056771b53648966e22837a1cb4a76e151d3
1
import
ossaudiodev
2
from
vorbisfile
import
*
3
4
adev
=
ossaudiodev
.
open
(
'w'
)
5
adev
.
setfmt
(
ossaudiodev
.
AFMT_S16_BE
)
6
adev
.
channels
(
2
)
7
adev
.
speed
(
44100
)
8
vf
=
VorbisFile
()
9
vf
.
open
(
'/home/jack/test.ogg'
)
10
11
data
,
cs
=
vf
.
read
(
4096
,
bendian
=
1
)
12
while
len
>
0
:
13
adev
.
write
(
data
)
14
data
,
cs
=
vf
.
read
(
4096
,
bendian
=
1
)