I got the buffer passing code that I described
on Sunday running. It’s important that
if you’re not going to call QIODevice::write
to put data into the
device—because, say, you’re swapping in a buffer and converting it at
read()
time because, um, you’re just doing it wrong—that you emit the
readyRead
and bytesWritten
signals yourself when you swap in a buffer.
Otherwise, the audio output never gets signaled that the device is readable,
and stops output after a timeout.
</tangent>
It turns out that the tone generator I’ve connected for testing (to stand in for higan) is broken. Completely busted. It produces an infinite number of repetitions of:
0
0
-32768
-32768
That is not a triangle wave. And since no horrible howl comes out of my speakers, either the audio output stage is also broken, or something is detecting “this makes no sense” and sparing my ears.
Oh well. If I’m lucky enough, maybe I’ll get to the point where I have an SPC player using higan’s audio engine by 2014.