AXTBF@ALASKA.BITNET (Tim Friest - programmer at large) (05/10/89)
Why is the maximum length of a sound 131072??? (as stated in the AutoDocs for the Audio Device with CMD_WRITE). If I had 1Meg of chip memory (well I can dream can't I), I might want to play a sound that is 1Meg long (or there abouts). Why is the Audio Device brain dead? AXTBF@ALASKA.BITNET disclaimer: That sounds bad to me!
u555917504ea@minnie.ucdavis.edu (0040;0000008360;0;340;141;) (05/10/89)
In article <8905100534.AA09678@jade.berkeley.edu> <AXTBF%ALASKA.BITNET@jade.berkeley.edu> writes: >Why is the maximum length of a sound 131072??? (as stated in the >AutoDocs for the Audio Device with CMD_WRITE). If I had 1Meg of >chip memory (well I can dream can't I), I might want to play a >sound that is 1Meg long (or there abouts). Why is the Audio Device >brain dead? Strangely enough, 131072 / 2 = 65536 I suppose the audio hardware just likes words... -Bruce Rogers currently u555917504ea@minnie.ucdavis.edu _______________________________________________________________________________ Just a man whose circumstances went beyond his control....
dan@cbmvax.UUCP (Dan Baker CATS) (05/10/89)
In article <8905100534.AA09678@jade.berkeley.edu> <AXTBF%ALASKA.BITNET@jade.berkeley.edu> writes: >Why is the maximum length of a sound 131072??? (as stated in the >AutoDocs for the Audio Device with CMD_WRITE). If I had 1Meg of >chip memory (well I can dream can't I), I might want to play a >sound that is 1Meg long (or there abouts). You can play samples that are longer than 131072 bytes long by queuing up multiple requests to the audio device. Use a Wait() GetMsg() loop to keep the sample running smoothly. You can do this with just two IOAudio structures by alternating them. -- Dan Baker, CATS
farren@well.UUCP (Mike Farren) (05/11/89)
<AXTBF%ALASKA.BITNET@jade.berkeley.edu> writes: >Why is the maximum length of a sound 131072??? (as stated in the >AutoDocs for the Audio Device with CMD_WRITE). If I had 1Meg of >chip memory (well I can dream can't I), I might want to play a >sound that is 1Meg long (or there abouts). Why is the Audio Device >brain dead? It isn't the audio.device, it's the hardware. The length register is only 16 bits wide, and so can count only 65536 words (the sound hardware fetches by word, not by byte). Nothing to be done about it until someone changes the size of the register. That's pretty unlikely considering how easy it is to get around the "problem" - check the section of the RKM on double-buffering sounds for details on "daisy-chaining" sounds. -- Mike Farren uucp: {your favorite backbone site}!hplabs!well!farren Fido: Sci-Fido, Fidonode 125/84, (415)655-0667
dillon@HERMES.BERKELEY.EDU (Matt Dillon) (05/13/89)
:In article <8905100534.AA09678@jade.berkeley.edu> <AXTBF%ALASKA.BITNET@jade.berkeley.edu> writes:
:>Why is the maximum length of a sound 131072??? (as stated in the
:>AutoDocs for the Audio Device with CMD_WRITE). If I had 1Meg of
:>chip memory (well I can dream can't I), I might want to play a
:>sound that is 1Meg long (or there abouts).
:
:You can play samples that are longer than 131072 bytes long by queuing
:up multiple requests to the audio device. Use a Wait() GetMsg() loop
:to keep the sample running smoothly. You can do this with just two
:IOAudio structures by alternating them.
:--
: Dan Baker, CATS
It works very very well. One can even do FSK by queuing thousands
of relatively small (couple ms / per) requests.
The only problem is that you CANNOT use WaitIO() due to a bug in
the audio.device ... use WaitPort() / GetMsg() instead.
-Matt