diff options
author | Sven Gothel <[email protected]> | 2014-06-10 05:30:02 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-06-10 05:30:02 +0200 |
commit | f95bf4457fbc31112fa82dacbc1b7e094b9fd1cf (patch) | |
tree | 965ba5b8e6fc8e6bfe7a981c1dfb1179bb9adcde /examples/alloopback.c | |
parent | 7297c3214a4c648aaee81a9877da15b88f798197 (diff) | |
parent | c07fb7b45c1e345dbaa439882250de5b2213026f (diff) |
Merge branch 'UPSTREAM' into UPSTREAM_MERGE
Diffstat (limited to 'examples/alloopback.c')
-rw-r--r-- | examples/alloopback.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/alloopback.c b/examples/alloopback.c index 649ef6ef..2361ada1 100644 --- a/examples/alloopback.c +++ b/examples/alloopback.c @@ -92,13 +92,15 @@ static ALuint CreateSineWave(void) } -int main() +int main(int argc, char *argv[]) { PlaybackInfo playback = { NULL, NULL, 0 }; SDL_AudioSpec desired, obtained; ALuint source, buffer; ALCint attrs[16]; ALenum state; + (void)argc; + (void)argv; /* Print out error if extension is missing. */ if(!alcIsExtensionPresent(NULL, "ALC_SOFT_loopback")) @@ -167,6 +169,8 @@ int main() attrs[6] = 0; /* end of list */ + playback.FrameSize = FramesToBytes(1, attrs[1], attrs[3]); + /* Initialize OpenAL loopback device, using our format attributes. */ playback.Device = alcLoopbackOpenDeviceSOFT(NULL); if(!playback.Device) @@ -187,7 +191,6 @@ int main() fprintf(stderr, "Failed to set an OpenAL audio context\n"); goto error; } - playback.FrameSize = FramesToBytes(1, attrs[1], attrs[3]); /* Start SDL playing. Our callback (thus alcRenderSamplesSOFT) will now * start being called regularly to update the AL playback state. */ |