| 1070 | } |
| 1071 | |
| 1072 | const char* hb_audio_samplerate_get_name(int samplerate) |
| 1073 | { |
| 1074 | if (samplerate < hb_audio_rates_first_item->rate || |
| 1075 | samplerate > hb_audio_rates_last_item ->rate) |
| 1076 | goto fail; |
| 1077 | |
| 1078 | const hb_rate_t *audio_samplerate = NULL; |
| 1079 | while ((audio_samplerate = hb_audio_samplerate_get_next(audio_samplerate)) != NULL) |
| 1080 | { |
| 1081 | if (audio_samplerate->rate == samplerate) |
| 1082 | { |
| 1083 | return audio_samplerate->name; |
| 1084 | } |
| 1085 | } |
| 1086 | |
| 1087 | fail: |
| 1088 | return NULL; |
| 1089 | } |
| 1090 | |
| 1091 | const hb_rate_t* hb_audio_samplerate_get_next(const hb_rate_t *last) |
| 1092 | { |
no test coverage detected