| 151 | } |
| 152 | |
| 153 | static inline int code_samplerate(int samplerate) |
| 154 | { |
| 155 | switch (samplerate) |
| 156 | { |
| 157 | case 44100: return 0; |
| 158 | case 22050: return 1; |
| 159 | case 11025: return 2; |
| 160 | case 96000: return 3; |
| 161 | case 48000: return 4; |
| 162 | case 32000: return 5; |
| 163 | case 24000: return 6; |
| 164 | case 16000: return 7; |
| 165 | case 8000: return 8; |
| 166 | } |
| 167 | return AVERROR(EINVAL); |
| 168 | } |
| 169 | |
| 170 | static av_cold int sonic_encode_init(AVCodecContext *avctx) |
| 171 | { |