2021.07.09 - [일하기/VoIP] - PCM to G.711 A-law, G.711 μ-law(u-law) 변환 (Source Code)
pcm16_to_ulaw() 함수만 정리했는데 반대로 변환해야 할 일이 생겨 함수를 다시 정리.
void ulaw_to_pcm16(int src_length, const char *src_samples, char *dst_samples) {
int i;
unsigned char *s_samples;
unsigned short *d_samples;
s_samples = (unsigned char *) src_samples;
d_samples = (unsigned short *) dst_samples;
for (i=0; i < src_length; i++) {
d_samples[i] = ulaw2linear(s_samples[i]);
}
}
잘 변환되었는지는 재생을 통해서 확인하자.
2021.06.30 - [일하기/VoIP] - PCM to G.711 A-law, G.711 μ-law(u-law) 변환 (ffmpeg)
'놀기 > VoIP' 카테고리의 다른 글
PCM to G.711 A-law, G.711 μ-law(u-law) 변환 (Source Code) (0) | 2021.07.09 |
---|---|
PCM to G.711 A-law, G.711 μ-law(u-law) 변환 (ffmpeg) (0) | 2021.06.30 |
SRTP (정리 중...) (0) | 2021.06.28 |
Audio sample file (wav & pcm) (0) | 2021.06.27 |
댓글