Pārlūkot izejas kodu

Fix rendering issue in audio_raw_stream.c example (#2608)

pull/2611/head
TheManTheMythTheGameDev pirms 2 gadiem
committed by GitHub
vecāks
revīzija
090e47dca0
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. +5
    -0
      examples/audio/audio_raw_stream.c

+ 5
- 0
examples/audio/audio_raw_stream.c Parādīt failu

@ -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));

Notiek ielāde…
Atcelt
Saglabāt