SourceDataLine Problem

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top