MMS 2.1.0 beta5 wav playback (pa) corrupted?

2 views
Skip to first unread message

Brad

unread,
Jan 11, 2012, 4:56:50 PM1/11/12
to mobicents-public
Hello,

When playing back local wav files, at the end, I can hear a slight
'click' or corruption.
Has anyone else experienced this?

Any suggestions for correcting it?

Thanks.
-brad

Oleg Kulikov

unread,
Jan 12, 2012, 3:06:02 AM1/12/12
to mobicent...@googlegroups.com
I think it happens for everyone. It happens because Frame objects are reused and thus last frame does not fill the entire 20ms the remainder contains wrong data. If it bothers the simplest way is to assign zero to the remainder of the last frame.

Oleg

2012/1/12 Brad <bpo...@gmail.com>

Brad Porter

unread,
Jan 12, 2012, 11:10:28 AM1/12/12
to mobicent...@googlegroups.com
I checked the code in WavTrackImpl, and it does seem to be adding padding:

...
public Frame process(long timestamp) throws IOException {
...
if (len < frameSize) {
padding(data, frameSize - len);
eom = true;
}
..
private void padding(byte[] data, int count) {
int offset = data.length - count;
for (int i = 0; i < count; i++) {
data[i + offset] = 0;
}
}


Any other thoughts?

Best regards.
-brad

Reply all
Reply to author
Forward
0 new messages