B
Brad Grier
A while back I implemented sound using javax.sound.sampled into my Tandy
Color Computer 2 applet.
The Color Computer had a 6-bit DAC used to generate audio. I basically
take the values written to the DAC and then feed them (although at a
much higher rate) into a SourceDataLine.
The problem is that the sound can crackle or break up depending on the
program emulated. I can prevent this by either feeding the data to the
SorceDataLine at a higher rate or by reducing the sample rate on the
AudioFormat. Both of these methods fix the breakups but then the pitch
drops enough that the sound is no longer accurately emulated.
I just don't understand the workings of javax.sound.sampled well enough
to figure out a workaround for this problem - it seems like it should be
possible.
Any ideas?
Brad
Mocha - The Tandy Color Computer 2 Applet
http://members.cox.net/javacoco/
Color Computer 2 applet.
The Color Computer had a 6-bit DAC used to generate audio. I basically
take the values written to the DAC and then feed them (although at a
much higher rate) into a SourceDataLine.
The problem is that the sound can crackle or break up depending on the
program emulated. I can prevent this by either feeding the data to the
SorceDataLine at a higher rate or by reducing the sample rate on the
AudioFormat. Both of these methods fix the breakups but then the pitch
drops enough that the sound is no longer accurately emulated.
I just don't understand the workings of javax.sound.sampled well enough
to figure out a workaround for this problem - it seems like it should be
possible.
Any ideas?
Brad
Mocha - The Tandy Color Computer 2 Applet
http://members.cox.net/javacoco/