Mercurial > pidgin
comparison src/gtksound.c @ 13026:880508a534cd
[gaim-migrate @ 15379]
charkins says, "rlaager changed the volume scaling to prevent clipping,
but that means 50 isn't normal volume any more"
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 24 Jan 2006 01:26:36 +0000 |
parents | 33935a6320b8 |
children | 1becdaf72e6d |
comparison
equal
deleted
inserted
replaced
13025:7d39e6c73dc3 | 13026:880508a534cd |
---|---|
574 char buf[4096]; | 574 char buf[4096]; |
575 int buf_frames = sizeof(buf) / bytes_per_frame; | 575 int buf_frames = sizeof(buf) / bytes_per_frame; |
576 | 576 |
577 while((frames_read = afReadFrames(file, AF_DEFAULT_TRACK, | 577 while((frames_read = afReadFrames(file, AF_DEFAULT_TRACK, |
578 buf, buf_frames))) { | 578 buf, buf_frames))) { |
579 if(volume != 50) | 579 scale_pcm_data(buf, frames_read, &format, intercept, |
580 scale_pcm_data(buf, frames_read, &format, intercept, | 580 minclip, maxclip, scale); |
581 minclip, maxclip, scale); | |
582 if(!ao_play(device, buf, frames_read * bytes_per_frame)) | 581 if(!ao_play(device, buf, frames_read * bytes_per_frame)) |
583 break; | 582 break; |
584 } | 583 } |
585 ao_close(device); | 584 ao_close(device); |
586 } | 585 } |