mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 06:18:38 +00:00
Turn on volume adjustment if it needs to be on (issue #8136 reported by mnicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -259,8 +259,12 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
|
|||||||
ast_mutex_init(&csth.spy.lock);
|
ast_mutex_init(&csth.spy.lock);
|
||||||
csth.volfactor = *volfactor;
|
csth.volfactor = *volfactor;
|
||||||
set_volume(chan, &csth);
|
set_volume(chan, &csth);
|
||||||
csth.spy.read_vol_adjustment = csth.volfactor;
|
if (csth.volfactor) {
|
||||||
csth.spy.write_vol_adjustment = csth.volfactor;
|
ast_set_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
|
||||||
|
csth.spy.read_vol_adjustment = csth.volfactor;
|
||||||
|
ast_set_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
|
||||||
|
csth.spy.write_vol_adjustment = csth.volfactor;
|
||||||
|
}
|
||||||
csth.fd = fd;
|
csth.fd = fd;
|
||||||
|
|
||||||
if (start_spying(spyee, chan, &csth.spy)) {
|
if (start_spying(spyee, chan, &csth.spy)) {
|
||||||
@@ -306,8 +310,15 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
|
|||||||
ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
|
ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
|
||||||
csth.volfactor = *volfactor;
|
csth.volfactor = *volfactor;
|
||||||
set_volume(chan, &csth);
|
set_volume(chan, &csth);
|
||||||
csth.spy.read_vol_adjustment = csth.volfactor;
|
if (csth.volfactor) {
|
||||||
csth.spy.write_vol_adjustment = csth.volfactor;
|
ast_set_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
|
||||||
|
csth.spy.read_vol_adjustment = csth.volfactor;
|
||||||
|
ast_set_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
|
||||||
|
csth.spy.write_vol_adjustment = csth.volfactor;
|
||||||
|
} else {
|
||||||
|
ast_clear_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
|
||||||
|
ast_clear_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (res == '*') {
|
} else if (res == '*') {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user