Skip to content

Commit

Permalink
Fix rendering issue in audio_raw_stream.c example (#2608)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheManTheMythTheGameDev committed Aug 3, 2022
1 parent 1a35f73 commit 090e47d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/audio/audio_raw_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ int main(void)
{
data[i] = (short)(sinf(((2*PI*(float)i/waveLength)))*32000);
}
// Make sure the rest of the line is flat
for (int j = waveLength*2; j < MAX_SAMPLES; j++)
{
data[j] = (short)0;
}

// Scale read cursor's position to minimize transition artifacts
//readCursor = (int)(readCursor * ((float)waveLength / (float)oldWavelength));
Expand Down

0 comments on commit 090e47d

Please sign in to comment.