[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Programming the DOC pt2
I'm writing a program in which I would like to give the user the ability
to shut off (or turn down) the volume of the internal speaker without having
to go through the control panel. The reason being that the internal speaker
just doesn't produce very high quality sound compared to external stereo
speakers. In fact, if the user has external speakers, the music will sound
better (less tinny) if he just shuts off the internal. This can be done very
simply by entering the control panel and turning down the volume all the way.
The music still comes out at the same volume through the externals, but the
internal is effectively shut off.
I want to accomplish the same effect under program control. However, I am
having difficulty in doing so. It has always been my untested impression that
the lower four bits of the SOUNDCTL softswitch at $c03c controlled the volume
of the internal speaker. So I figured a short routine like:
lda SOUNDCTL
and #$F0
ora #$0x
sta SOUNDCTL
would set the volume of the internal speaker to 'x' (assuming 8 bit
accumulator in the above code of course). This doesn't seem to be the case.
The above routine has no effect on the volume of the internal speaker that I
can tell. Am I missing something obvious?
The only thing I HAVE noticed is if I set the volume according to the
method above immediately before setting the oscillator params and starting up
the oscillators I want, the output volume on the internal speaker will START
at 'x' but quickly fade to the current setting of the control panel volume
setting (assume 'x' is higher than the CP setting). What is going on?
Marco
_____________________________________________________________________________
Marco Busse | "True dignity is never gained by place,
Jupiter Systems | And never lost when honors are withdrawn."
mbusse@amiganet.chi.il.us |
Apple II Infinitum | -Massinger