Steve Bollinger <>Re: Stereo sound problem  on mac games
X-Useragent: Nuntius v1.1.1d20
X-Xxdate: Mon, 19 Apr 93 19:34:37 GMT
X-Xxmessage-Id: <>
Organization: Apple Computer, Inc.
Lines: 192

In article <1qsfak$> Doug P. Book,
 writes:
>Hi.  I think I have a problem with the stereo sound output on my Quadra
>900, but I am not totally sure because my roomate has the same problem
>on his PowerBook 170.  Any info or experience anyopne has would be
>greatly appreciated.
>
>When I hook my Quadra up to my home stereo system, the following types
>of sounds  all play fine through BOTH
>speakers:
>
>system beeps  
>
>Armor Alley
>Spectre
>Spaceward Ho!
>
>
>But, the following games only play out of the left channel:
>
>Lemmings
>Out of This World  
>Glider 4.0
>OIDS
>
>
>But still, STEREO system beeps do play in stereo, through BOTH speakers.
>(The one I'm specifically referrring to is Apocolyptic Beginning, which
>my roommate downloaded from some ftp site )
>
>
>All of the symptoms are the same on my rommates 170 .
>
>We're both running system 7.1
>
>
>
>Does anyone with Lemmings or the other three games I mentioned above get
>sound out of both speakers on a Mac II class, Quadra, LC, PowerBook 140
or
>greater, Centris, SE/30, etc...  machine?
>
>I used to have a Mac II, and I sort of rememeber Lemmings playing in
>stereo on that machine, not just on the left channel.  (I could be
>mistaken, though.  If there were a problem with the Quad 900's and PB
>170's, I am wondering why the system beeps still play in stereo?  If
there
>isn't a problem with our machines, I wonder why the 4 games above are
>apparantly written to support only one channel of stereo when they
>could just use mono sounds so the mono sound would at least come out of
>both speakers  ?
>
>Quadra 900's and PowerBook 170's have the same ROMS ,
>so maybe this is a ROM problem?  
>
>
>
>
>Thanks for any help you can provide!

In article <> Jon Wtte,
 writes:
>Mac sound hardware is diverse; some macs play in stereo and
>mix the output  while others play in
>stereo but ONLY has the left channel for the speaker, while
>some are "truly" mono 
>
>Developers know that stuff played in the left channel is
>guaranteed to be heard, while the right channel isn't. Some
>send data to both, some only send data to the left channel
>

Okay, I guess its time for a quick explanation of Mac sound.

The original documentation for the sound hardware  documents how to
make sound by directly accessing hardware.  Basically, you jam values
into all the even bytes from SoundBase to SoundBase+0x170. This was
because
of how the Mac 128  generated sound was by
scanning
this block and D/Aing every even byte .

When the Mac II  was invented, it was designed to
generate stereo sound. It was also designed to be compatible with we had
once
documented. So storing bytes at the even values at SoundBase meant "I
want to
play a mono sound" and so it was emulated. But Apple had since retracted
the
documentation on SoundBase and decided not to document the lowest layers
of
sound generation. So apple never explained where to stuff bytes if you
want
to make stereo sound.

Enter game developers. The sound driver and current sound manager are
inconveniently lame for making games. Furthermore, people who port from
the
IBM don't want to learn more APIs. So, it has become popular for game
writers to write to SoundBase to make sound, since it is very easy.

Since the Mac II, Apple has had many different kind of sound output
hardware,
and the only things they have in common are that writing to SoundBase
works.
On some hardware, , writing to SoundBase
gets you mono sound through both speakers. On some Macs  writing to SoundBase gets you mono sound on the left channel
only.
Both are technically correct interpretations of the original
specification,
but one is obviously preferable for asthetic reasons.

If developers use the Sound Manager , mono
sounds will  come out through both channels regardless of the
underlying hardware. It is possible to specify you want to generate left
channel only, but no one does. If developers write to sound base, their
games will only come out the left on some games.

The other problem, the original Mac II only producing left channel sound
on the internal speaker, while the SE/30 mixes both, isn't really related.
It is due to the post generation amplification used on the motherboards of
the different machines. It only affects true stereo sounds. Sounds which
are actually mono, will play on the internal speaker, no matter what
machine
you have.

Now, to more directly address the question, the games you list:
>Lemmings
>Out of This World  
>Glider 4.0
>OIDS
and also
Hellcats,
Super Tetris
Oxyd


Cheat and write to SoundBase and so are only left channel on Quadras.


Other games you list:
>Armor Alley
>Spectre
>Spaceward Ho!
and also
PGA Tour Golf
Civilization


Use the sound manager and work fine on all machines.

The more of the story is to developers: DON'T CHEAT!
Really, I am absolutely, positively not allowed to do what I am about to
do,
but I'm going say it anyway.
Stop cheating on sound!
Really soon, you will be sorry, as even those without external speakers
will be disappointed with your sound on future hardware. The grace period
is about to end.
The Sound Manager is understandable now, and works pretty well and will
work
even better soon, so use it.

In conclusion:
To Doug, it isn't a hardware problem, at least, not a bug.
To Jon, it isn't a choice to developers as to whether they want to send
sound
to both channels. If they do it the right way, it is taken care of
automatically. If you cheat, there is not way to make it work on all
hardware.


Have fun.

Disclaimer number 1:
I don't work on sound here at Apple, I'm just pretty well informed.
So don't write me with sound questions.

Disclaimer number 2:
If it says up above that I wrote anything like "the grace period is about
to end" then it is a bug in your news feed, since I am catagorically not
allowed to say anything like that. You know what I mean.

Disclaimer number 3:
I don't speak for Apple, just me.

-Steve Bollinger
