Skip to content

Commit

Permalink
Fixed missing process of slot2 by SerialDV
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Jan 12, 2017
1 parent 1098cc7 commit 684584a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions dsd_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ int main(int argc, char **argv)
if (dsdDecoder.mbeDVReady1())
{
dvController.decode(dvAudioSamples, (const unsigned char *) dsdDecoder.getMbeDVFrame1(), (SerialDV::DVRate) dsdDecoder.getMbeRate(), dvGain_dB);

if (dsdDecoder.upsampling())
{
upsamplingEngine.upsample(dsdDecoder.upsampling(), dvAudioSamples, &dvAudioSamples[SerialDV::MBE_AUDIO_BLOCK_SIZE], SerialDV::MBE_AUDIO_BLOCK_SIZE);
Expand All @@ -430,8 +431,26 @@ int main(int argc, char **argv)
{
result = write(out_file_fd, (const void *) dvAudioSamples, SerialDV::MBE_AUDIO_BLOCK_BYTES); // TODO: upsampling
}

dsdDecoder.resetMbeDV1();
}

if (dsdDecoder.mbeDVReady2())
{
dvController.decode(dvAudioSamples, (const unsigned char *) dsdDecoder.getMbeDVFrame2(), (SerialDV::DVRate) dsdDecoder.getMbeRate(), dvGain_dB);

if (dsdDecoder.upsampling())
{
upsamplingEngine.upsample(dsdDecoder.upsampling(), dvAudioSamples, &dvAudioSamples[SerialDV::MBE_AUDIO_BLOCK_SIZE], SerialDV::MBE_AUDIO_BLOCK_SIZE);
result = write(out_file_fd, (const void *) &dvAudioSamples[SerialDV::MBE_AUDIO_BLOCK_SIZE], SerialDV::MBE_AUDIO_BLOCK_BYTES * dsdDecoder.upsampling());
}
else
{
result = write(out_file_fd, (const void *) dvAudioSamples, SerialDV::MBE_AUDIO_BLOCK_BYTES); // TODO: upsampling
}

dsdDecoder.resetMbeDV2();
}
}
else
#endif
Expand Down

0 comments on commit 684584a

Please sign in to comment.