Skip to content

Commit

Permalink
Merge branch 'fix_audio' of https://github.com/PSI-Rockin/CorgiDS int…
Browse files Browse the repository at this point in the history
…o v0.2
  • Loading branch information
Simon committed Dec 30, 2017
2 parents df9441d + ced65b9 commit 3a1e9dd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/audiodevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ AudioDevice::AudioDevice(QObject *parent) : QIODevice(parent), spu(nullptr)

qint64 AudioDevice::readData(char *data, qint64 maxlen)
{
for (int i = 0; i < 1024; i += 2)
if (spu->get_samples())
{
*(int16_t*)&data[i] = i;
*(int16_t*)&data[i + 1] = i;
for (int i = 0; i < 1024; i += 2)
{
*(int16_t*)&data[i] = i;
*(int16_t*)&data[i + 1] = i;
}
return 1024;
}
return 1024;
return 0;
//return spu->output_buffer((int16_t*)data) * 2;
}

Expand Down

0 comments on commit 3a1e9dd

Please sign in to comment.