[WIP] Updates the sample adapters to natively use ReusableBuffers.

Refactors a MixerReader instance from the RealMixerSource so that it
can be reused for both real and complex data outputs.

Updates RealMixerSource to use refactored MixerReader and use a default
sample rate of 8 kHz.

Updates the ComplexMixer to use the refactored MixerReader.

Updates the FCD 1/2 tuners for compatibility with the new ComplexMixer.

Removes several unused classes.
This commit is contained in:
Denny
2018-06-24 09:50:36 -04:00
parent 19fa256c60
commit a621a31aa9
19 changed files with 672 additions and 760 deletions

View File

@@ -16,8 +16,8 @@
package io.github.dsheirer.source.mixer;
import io.github.dsheirer.audio.AudioFormats;
import io.github.dsheirer.sample.adapter.ChannelShortAdapter;
import io.github.dsheirer.sample.adapter.ShortAdapter;
import io.github.dsheirer.sample.adapter.RealChannelShortAdapter;
import io.github.dsheirer.sample.adapter.RealShortAdapter;
import io.github.dsheirer.source.config.SourceConfigMixer;
import io.github.dsheirer.source.config.SourceConfiguration;
import io.github.dsheirer.source.tuner.MixerTunerDataLine;
@@ -90,7 +90,7 @@ public class MixerManager
if(dataLine != null)
{
return new RealMixerSource(dataLine, AudioFormats.PCM_SIGNED_8KHZ_16BITS_MONO,
new ShortAdapter());
new RealShortAdapter("RealMixerSource - Mono"));
}
}
catch(LineUnavailableException e)
@@ -100,7 +100,7 @@ public class MixerManager
}
}
else
else //STEREO
{
DataLine.Info info = new DataLine.Info(TargetDataLine.class,
AudioFormats.PCM_SIGNED_8KHZ_16BITS_STEREO);
@@ -114,7 +114,7 @@ public class MixerManager
if(dataLine != null)
{
return new RealMixerSource(dataLine, AudioFormats.PCM_SIGNED_8KHZ_16BITS_STEREO,
new ChannelShortAdapter(mixerConfig.getChannel()));
new RealChannelShortAdapter(mixerConfig.getChannel(), "RealMixerSource-Stereo"));
}
}
catch(LineUnavailableException e)