int error = FinishSampleStream(APTR handle);
HWEXT_SAVESAMPLE_STREAM
extension bit has been set. See Extension plugins for details. In that case,
this function must finish all writes to the specified sample stream and then close
its file handle and free all resources associated with the sample stream.
This function has to return 0 if the stream was successfully written or an error code.