mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Slight overhaul of the whisper support. 1. We need to duplicate the frame from ast_translate 2. We need to ensure we always have signed linear coming in for signed linear combining. 3. We need to ensure we are always feeding signed linear out. 4. Properly store and restore write format when beeping on the channel we are whispering on. 5. Properly discontinue the stream on the channel for the beep. (issue #8019 reported by timkelly1980)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -277,8 +277,10 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
|
||||
|
||||
if (ast_test_flag(flags, OPTION_WHISPER)) {
|
||||
struct ast_filestream *beepstream;
|
||||
int old_write_format = 0;
|
||||
|
||||
ast_channel_whisper_start(csth.spy.chan);
|
||||
old_write_format = chan->writeformat;
|
||||
if ((beepstream = ast_openstream_full(chan, "beep", chan->language, 1))) {
|
||||
struct ast_frame *f;
|
||||
|
||||
@@ -288,7 +290,10 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
|
||||
}
|
||||
|
||||
ast_closestream(beepstream);
|
||||
chan->stream = NULL;
|
||||
}
|
||||
if (old_write_format)
|
||||
ast_set_write_format(chan, old_write_format);
|
||||
}
|
||||
|
||||
if (ast_test_flag(flags, OPTION_PRIVATE))
|
||||
|
Reference in New Issue
Block a user