diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-04-27 22:37:08 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-04-27 22:37:08 +0000 |
commit | ccc07a592e872946cd1e07677cd767f7448bc979 (patch) | |
tree | 2b44b0cbfccb86e5f1e6efa6874a87b75643b697 /pjsip-apps/src/samples/playsine.c | |
parent | 4bab78a009cbfc57426066ebb5070e7609d4be04 (diff) |
Initial support for stereo codecs, and added L16 codecs. Also better handling for case remote media is restarted
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@412 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/samples/playsine.c')
-rw-r--r-- | pjsip-apps/src/samples/playsine.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pjsip-apps/src/samples/playsine.c b/pjsip-apps/src/samples/playsine.c index 2e83221d..931f9123 100644 --- a/pjsip-apps/src/samples/playsine.c +++ b/pjsip-apps/src/samples/playsine.c @@ -48,6 +48,8 @@ static int app_perror( const char *sender, const char *title, { char errmsg[PJ_ERR_MSG_SIZE]; + PJ_UNUSED_ARG(sender); + pj_strerror(status, errmsg, sizeof(errmsg)); printf("%s: %s [code=%d]\n", title, errmsg, status); @@ -127,7 +129,7 @@ static pj_status_t create_sine_port(pj_pool_t *pool, port->info.name = pj_str("sine generator"); port->info.need_info = 0; port->info.pt = 0xFF; - port->info.sample_rate = sampling_rate; + port->info.clock_rate = sampling_rate; port->info.samples_per_frame = sampling_rate * 20 / 1000 * channel_count; port->info.bytes_per_frame = port->info.samples_per_frame * 2; port->info.type = PJMEDIA_TYPE_AUDIO; @@ -229,7 +231,7 @@ int main(int argc, char *argv[]) status = pjmedia_snd_port_create_player( pool, /* pool */ -1, /* use default dev. */ - sine_port->info.sample_rate, /* clock rate. */ + sine_port->info.clock_rate, /* clock rate. */ sine_port->info.channel_count, /* # of channels. */ sine_port->info.samples_per_frame, /* samples per frame. */ sine_port->info.bits_per_sample, /* bits per sample. */ |