diff options
author | Sven Gothel <[email protected]> | 2015-11-12 18:12:26 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-11-12 18:12:26 +0100 |
commit | 542c4804aafe3f3879cee56d19d7353ed49ee154 (patch) | |
tree | 9c89aeda9ec5d368a1fb016422448e6418fc87db /examples/alloopback.c | |
parent | 2e8f6a1704dfa0048dbfc2f826847a4aaea3cbe8 (diff) | |
parent | 5d039309b355c350fd087a48c4b896d31871d174 (diff) |
Merge branch 'UPSTREAM'
Diffstat (limited to 'examples/alloopback.c')
-rw-r--r-- | examples/alloopback.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/alloopback.c b/examples/alloopback.c index 2361ada1..04c92818 100644 --- a/examples/alloopback.c +++ b/examples/alloopback.c @@ -65,13 +65,13 @@ void SDLCALL RenderSDLSamples(void *userdata, Uint8 *stream, int len) * buffer ID. */ static ALuint CreateSineWave(void) { - ALshort data[44100]; + ALshort data[44100*4]; ALuint buffer; ALenum err; ALuint i; - for(i = 0;i < 44100;i++) - data[i] = (ALshort)(sin(i * 441.0 / 44100.0 * 2.0*M_PI)*32767.0); + for(i = 0;i < 44100*4;i++) + data[i] = (ALshort)(sin(i/44100.0 * 1000.0 * 2.0*M_PI) * 32767.0); /* Buffer the audio data into a new buffer object. */ buffer = 0; |