mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
fix playback_ms and record_ms to work right and add playback_seconds and record_seconds
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15155 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -498,9 +498,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh)
|
||||
if ((blen = switch_buffer_read(fh->pre_buffer, fh->pre_buffer_data, fh->pre_buffer_datalen))) {
|
||||
if (!asis) blen /= 2;
|
||||
if (fh->channels > 1) blen /= fh->channels;
|
||||
|
||||
if (fh->file_interface->file_write(fh, fh->pre_buffer_data, &blen) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
fh->samples_out += blen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user