summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1997-04-03 14:44:41 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1997-04-03 14:44:41 (GMT)
commit1801aad5dc790a920fcf889a1c1663b92fd5e7a9 (patch)
tree160fc34a6fde527f6f6c806583d0438c4a717d56 /Mac
parent4240b610f3cfa9e18ada581ec30616fba96f606e (diff)
downloadcpython-1801aad5dc790a920fcf889a1c1663b92fd5e7a9.zip
cpython-1801aad5dc790a920fcf889a1c1663b92fd5e7a9.tar.gz
cpython-1801aad5dc790a920fcf889a1c1663b92fd5e7a9.tar.bz2
Use MacOS.string_id_to_buffer for id() to buffer address hack
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/Audio_mac.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mac/Lib/Audio_mac.py b/Mac/Lib/Audio_mac.py
index 450cdf1..27526b4 100644
--- a/Mac/Lib/Audio_mac.py
+++ b/Mac/Lib/Audio_mac.py
@@ -42,6 +42,7 @@ class Play_Audio_mac:
import time
from Sound import *
import struct
+ import MacOS
if not self._chan:
import Snd
self._chan = Snd.SndNewChannel(5, 0, self._callback)
@@ -56,7 +57,7 @@ class Play_Audio_mac:
import audioop
data = audioop.add(data, '\x80'*len(data), 1)
h1 = struct.pack('llhhllbbl',
- id(data)+12,
+ id(data)+MacOS.string_id_to_data,
self._nchannels,
self._outrate, 0,
0,