ソースを参照

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

pull/2611/head
TheManTheMythTheGameDev 3年前
committed by GitHub
コミット
090e47dca0
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更5行の追加0行の削除
  1. +5
    -0
      examples/audio/audio_raw_stream.c

+ 5
- 0
examples/audio/audio_raw_stream.c ファイルの表示

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

読み込み中…
キャンセル
保存