Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6601964f
Commit
6601964f
authored
Jan 02, 1996
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed example
parent
e8ea21b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
Mac/Lib/Audio_mac.py
Mac/Lib/Audio_mac.py
+6
-1
No files found.
Mac/Lib/Audio_mac.py
View file @
6601964f
...
...
@@ -89,8 +89,12 @@ class Play_Audio_mac:
import
audioop
return
audioop
.
ulaw2lin
(
data
,
2
)
def
test
(
fn
=
'f:just samples:just.aif'
):
def
test
():
import
aifc
import
macfs
fss
,
ok
=
macfs
.
PromptGetFile
(
"Select an AIFF soundfile"
,
"AIFF"
)
if
not
ok
:
return
fn
=
fss
.
as_pathname
()
af
=
aifc
.
open
(
fn
,
'r'
)
print
af
.
getparams
()
p
=
Play_Audio_mac
()
...
...
@@ -102,6 +106,7 @@ def test(fn = 'f:just samples:just.aif'):
data
=
af
.
readframes
(
BUFSIZ
)
if
not
data
:
break
p
.
writeframes
(
data
)
print
'wrote'
,
len
(
data
),
'space'
,
p
.
getfillable
()
p
.
wait
()
if
__name__
==
'__main__'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment