<?xml version="1.0"?>
<!--
###################################################
## CODEC2 audio encoder
###################################################
 -->
<block>
	<name>CODEC2 Audio Encoder</name>
	<key>vocoder_codec2_encode_sp</key>
	<import>from gnuradio import vocoder</import>
	<import>from gnuradio.vocoder import codec2</import>
	<make>vocoder.codec2_encode_sp($mode)</make>
	<param>
		<name>Bit rate</name>
		<key>mode</key>
		<value>codec2.MODE_2400</value>
		<type>int</type>
		<option>
			<name>3200 bps</name>
			<key>codec2.MODE_3200</key>
		</option>
		<option>
			<name>2400 bps</name>
			<key>codec2.MODE_2400</key>
		</option>
		<option>
			<name>1600 bps</name>
			<key>codec2.MODE_1600</key>
		</option>
		<option>
			<name>1400 bps</name>
			<key>codec2.MODE_1400</key>
		</option>
		<option>
			<name>1300 bps</name>
			<key>codec2.MODE_1300</key>
		</option>
		<option>
			<name>1200 bps</name>
			<key>codec2.MODE_1200</key>
		</option>
	</param>
	<sink>
		<name>in</name>
		<type>short</type>
	</sink>
	<source>
		<name>out</name>
		<type>byte</type>
		<vlen>{ 0: 64, 1: 48, 2: 64, 3: 56, 4: 52, 5: 48 }[$mode]</vlen>
	</source>
</block>

