diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c index f16c6bb..061b5db 100644 --- a/speaker-test/speaker-test.c +++ b/speaker-test/speaker-test.c @@ -191,7 +191,7 @@ static void generate_pink_noise( uint8_t *frames, int channel, int count) { for(chn=0;chn> 24; } else { @@ -199,7 +199,7 @@ static void generate_pink_noise( uint8_t *frames, int channel, int count) { } } else if (sample_size_bits == 16) { if (chn==channel) { - res = generate_pink_noise_sample(&pink) * 0xffffffff; + res = generate_pink_noise_sample(&pink) * 0x03fffffff; /* Don't use MAX volume */ ires = res; *samp16++ = ires >>16; } else { @@ -207,7 +207,7 @@ static void generate_pink_noise( uint8_t *frames, int channel, int count) { } } else if (sample_size_bits == 32) { if (chn==channel) { - res = generate_pink_noise_sample(&pink) * 0xffffffff; + res = generate_pink_noise_sample(&pink) * 0x03fffffff; /* Don't use MAX volume */ ires = res; *samp32++ = ires; } else {