How to add a new codec for asterisk?

i want to add a new codec for asterisk ,how to ?
is there turial for this or examples?
any sugguestions will be greatly appreciated!