all repos — captcha @ 0b62e127d3e31749ee8db9fefe4a0ef1ab04ae67

Go package captcha implements generation and verification of image and audio CAPTCHAs.

audio: increase level of background sounds.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 04 May 2011 17:21:31 +0200
commit

0b62e127d3e31749ee8db9fefe4a0ef1ab04ae67

parent

ebb75a0b6ca0591c2ca8898fa0d60c5e6adfa548

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M audio.goaudio.go

@@ -212,7 +212,7 @@ for i := 0; i < length/(sampleRate/10); i++ {

snd := reverseDigitSounds[rand.Intn(10)] snd = changeSpeed(snd, rndf(0.8, 1.4)) place := rand.Intn(len(b) - len(snd)) - setSoundLevel(snd, rndf(0.2, 0.3)) + setSoundLevel(snd, rndf(0.2, 0.5)) mixSound(b[place:], snd) } return b

@@ -220,6 +220,6 @@ }

func randomizedDigitSound(n byte) []byte { s := randomSpeed(digitSounds[n]) - setSoundLevel(s, rndf(0.7, 1.3)) + setSoundLevel(s, rndf(0.75, 1.2)) return s }