Return the number of zero crossings in the fragment passed as an argument. The fragments should both contain 2-byte samples. The fragments should both contain 2-byte samples. The fragments should both contain 2-byte samples. Return the value of sample index from the fragment.
State is a tuple containing the state of the coder.
In the initial call None can be passed as the state. Its use is discouraged. Convert samples in the audio fragment to U-LAW encoding and return this as a Python string. U-LAW is an audio encoding format whereby you get a dynamic range of about 14 bits using only 8 bit samples. It is used by the Sun audio hardware, among others.