Home --> Documentations --> PJMEDIA Reference
This is a simple program to generate a tone and write the samples to a raw PCM file. The main purpose of this file is to analyze the quality of the tones/sine wave generated by PJMEDIA tone/sine wave generator.
This file is pjsip-apps/src/samples/tonegen.c
37#define SAMPLES_PER_FRAME 64
38#define ON_DURATION 100
39#define OFF_DURATION 100
106 digits[0]. digit = '0';
107 digits[0]. on_msec = ON_DURATION;
110 digits[1]. digit = '0';
111 digits[1]. on_msec = ON_DURATION;
126 f = fopen( "tonegen.pcm", "wb");
128 for (i=0; i<8000/SAMPLES_PER_FRAME; ++i) {
131 count = fwrite(buf, SAMPLES_PER_FRAME, 2, f);
pj_status_t pjmedia_endpt_create(pj_pool_factory *pf, pj_ioqueue_t *ioqueue, unsigned worker_cnt, pjmedia_endpt **p_endpt) Definition: endpoint.h:127
pj_status_t pjmedia_endpt_destroy(pjmedia_endpt *endpt) Definition: endpoint.h:168
pj_status_t pj_init(void)
void pj_caching_pool_destroy(pj_caching_pool *ch_pool)
void pj_caching_pool_init(pj_caching_pool *ch_pool, const pj_pool_factory_policy *policy, pj_size_t max_capacity)
pj_pool_factory_policy pj_pool_factory_default_policy
void * pj_pool_alloc(pj_pool_t *pool, pj_size_t size)
pj_pool_t * pj_pool_create(pj_pool_factory *factory, const char *name, pj_size_t initial_size, pj_size_t increment_size, pj_pool_callback *callback)
void pj_pool_release(pj_pool_t *pool)
#define PJ_ASSERT_RETURN(expr, retval)
PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.
|