Rewrite handling of DTK (streaming) audio.

The primary motivation here is to make sure we submit samples from the
CPU thread. This makes sure the timing of related interrupts accurate,
and generally keeps the different kinds of audio synchronized.  This will also
allow improvements to audio dumping functionality.

The new code is also more concise because it gets rid of some duplicated
audio mixing code.
This commit is contained in:
magumagu
2014-04-10 18:28:19 -07:00
parent d7736ac714
commit d43ecd0bd1
6 changed files with 146 additions and 249 deletions

View File

@ -28,10 +28,7 @@ namespace AudioCommon
{
SoundStream *InitSoundStream(void *hWnd)
{
unsigned int AISampleRate, DACSampleRate;
AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
delete soundStream;
CMixer *mixer = new CMixer(AISampleRate, DACSampleRate, 48000);
CMixer *mixer = new CMixer(48000);
// TODO: possible memleak with mixer