mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5992 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1116,14 +1116,14 @@ static switch_status_t js_stream_input_callback(switch_core_session_t *session,
|
||||
step = 1000;
|
||||
}
|
||||
if (step > 0) {
|
||||
samps = step * (codec->implementation->samples_per_second / 1000);
|
||||
samps = step * (codec->implementation->actual_samples_per_second / 1000);
|
||||
switch_core_file_seek(fh, &pos, samps, SEEK_CUR);
|
||||
} else {
|
||||
samps = step * (codec->implementation->samples_per_second / 1000);
|
||||
samps = step * (codec->implementation->actual_samples_per_second / 1000);
|
||||
switch_core_file_seek(fh, &pos, fh->pos - samps, SEEK_SET);
|
||||
}
|
||||
} else {
|
||||
samps = atoi(p) * (codec->implementation->samples_per_second / 1000);
|
||||
samps = atoi(p) * (codec->implementation->actual_samples_per_second / 1000);
|
||||
switch_core_file_seek(fh, &pos, samps, SEEK_SET);
|
||||
}
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ static JSBool teletone_construct(JSContext * cx, JSObject * obj, uintN argc, jsv
|
||||
if (switch_core_codec_init(&tto->codec,
|
||||
"L16",
|
||||
NULL,
|
||||
read_codec->implementation->samples_per_second,
|
||||
read_codec->implementation->actual_samples_per_second,
|
||||
read_codec->implementation->microseconds_per_frame / 1000,
|
||||
read_codec->implementation->number_of_channels,
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, pool) == SWITCH_STATUS_SUCCESS) {
|
||||
|
Reference in New Issue
Block a user