]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 179291 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Mon, 2 Mar 2009 14:14:51 +0000 (14:14 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 2 Mar 2009 14:14:51 +0000 (14:14 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r179291 | file | 2009-03-02 10:13:45 -0400 (Mon, 02 Mar 2009) | 7 lines

  Fix issue where changing the volume of both directions of audio did not work.

  (closes issue #14574)
  Reported by: KNK
  Patches:
        audiohook_volume_fix.diff uploaded by KNK (license 545)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@179293 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/audiohook.c

index 2b0beac0111384e11c55d59a44bc658a7b071073..8156d0ff37721983a9cb8eb89e009fbb1e3e893a 100644 (file)
@@ -915,7 +915,8 @@ int ast_audiohook_volume_set(struct ast_channel *chan, enum ast_audiohook_direct
        /* Now based on the direction set the proper value */
        if (direction == AST_AUDIOHOOK_DIRECTION_READ || direction == AST_AUDIOHOOK_DIRECTION_BOTH) {
                audiohook_volume->read_adjustment = volume;
-       } else if (direction == AST_AUDIOHOOK_DIRECTION_WRITE || direction == AST_AUDIOHOOK_DIRECTION_BOTH) {
+       }
+       if (direction == AST_AUDIOHOOK_DIRECTION_WRITE || direction == AST_AUDIOHOOK_DIRECTION_BOTH) {
                audiohook_volume->write_adjustment = volume;
        }
 
@@ -965,7 +966,8 @@ int ast_audiohook_volume_adjust(struct ast_channel *chan, enum ast_audiohook_dir
        /* Based on the direction change the specific adjustment value */
        if (direction == AST_AUDIOHOOK_DIRECTION_READ || direction == AST_AUDIOHOOK_DIRECTION_BOTH) {
                audiohook_volume->read_adjustment += volume;
-       } else if (direction == AST_AUDIOHOOK_DIRECTION_WRITE || direction == AST_AUDIOHOOK_DIRECTION_BOTH) {
+       }
+       if (direction == AST_AUDIOHOOK_DIRECTION_WRITE || direction == AST_AUDIOHOOK_DIRECTION_BOTH) {
                audiohook_volume->write_adjustment += volume;
        }