summaryrefslogtreecommitdiff
path: root/examples/sinewave.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sinewave.c')
-rwxr-xr-xexamples/sinewave.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/sinewave.c b/examples/sinewave.c
index 59d1161..e45f71e 100755
--- a/examples/sinewave.c
+++ b/examples/sinewave.c
@@ -73,15 +73,15 @@ i32 main(i32 argc, c8 **argv) {
.graceful_exit = 1,
};
- f64 frequency = 440. * 4;
+ f64 frequency = 440. * 6;
for (i64 i = 0; i < AUDIO_SAMPLE_RATE; ++i) {
f64 t = ((f64) i) / AUDIO_SAMPLE_RATE;
f64 x = sin(t * frequency);
- if (t < .1)
- x *= t / .1;
- if (t > .7)
- x *= (1. - t) / .3;
+ if (t < .005)
+ x *= t / .005;
+ if (t > .1)
+ x *= (1. - t) / .9;
frames[i * 2] = (f32) x * .5;
frames[i * 2 + 1] = (f32) x * .5;
}