Article View: comp.sys.amiga.tech
Article #12079Audio questions
From: William J. Murphy
Date: Sun, 02 Apr 1989 04:25
Date: Sun, 02 Apr 1989 04:25
24 lines
1816 bytes
1816 bytes
I've just finished typing in and compiling Bob Peck's program audio.c
from Programmer's Guide to the Amiga (gee that sounds like Hitchhiker's
Guide to the Galaxy, was that similarity intended Bob?). Anyhow, I see how
one can control the sampling rate of the audio chip, but how do I convert that
into real time numbers? Let's say for example your waveform has 16 data points
and you set the period value to be 428, what frequency would you be producing
out of the speaker?
My guess is that it will be freq = sampling rate/(428 * 16), but what's the
sampling rate?
The next question that I have may be a bug in the program. When I played the
program 12 times in a row, I received an error "cannot create a reply port".
This makes me think that something is not returning its port to the system.
I checked my program, and the DeletePort(auReplyPort) and DeletePort(auLockPort)
are present in the finishup routine, so I am not sure what's happening. If
someone else could check this on their program (if you have it entered already),
it would be appreciated.
Bill Murphy "Facts!, what we demand are solid facts!
murphy@newton.physics.purdue.edu Wait, What we demand is a total absence of
solid facts." Vroomfondel, Philosopher.
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<2093@pur-phy>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!j.cc.purdue.edu!pur-ee!pur-phy!murphyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!j.cc.purdue.edu!pur-ee!pur-phy!murphy From: murphy@pur-phy (William J. Murphy) Newsgroups: comp.sys.amiga.tech Subject: Audio questions Message-ID: <2093@pur-phy> Date: 2 Apr 89 04:25:31 GMT Reply-To: murphy@newton.physics.purdue.edu (William J. Murphy) Organization: Purdue Univ. Physics Dept., W. Lafayette, IN Lines: 24