jmbe icon indicating copy to clipboard operation
jmbe copied to clipboard

AMBEFrame is decoded twice

Open Nokoa opened this issue 3 years ago • 0 comments

The AMBEFrame object is created twice, and hence fully processed twice. Rather than creating the AMBEFrame object and passing its reference down the line.

The get audio method used here takes frame data and creates a new AMBEFrame. However an instance of AMBEFrame is created just before this and can be passed it getAudio instead.

https://github.com/DSheirer/jmbe/blob/4e9a2955c5ff79edcb278e0366908b030ea72933/codec/src/main/java/jmbe/codec/ambe/AMBEAudioCodec.java#L72

Another getAudio method is available that already takes an AMBEFrame object. This way the frame is not decoded, error corrected, and processed twice.

Nokoa avatar Oct 06 '22 19:10 Nokoa