aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-03-30 19:24:13 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-03-30 19:24:13 +0000
commit3137c9be322b3fe4c3e83e8c99ae02ba63dd616e (patch)
tree7e883fe4313a4326c61306248bd90d5da81a34dc /channels
parent55d2cccba3339611ae5e0c2866cfcd6cde074503 (diff)
Version 0.1.7 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@260 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_oss.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 582618008..2791e3f76 100755
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -385,7 +385,7 @@ static int soundcard_writeframe(short *data)
{
/* Write an exactly FRAME_SIZE sized of frame */
static int bufcnt = 0;
- static char buffer[FRAME_SIZE * 2 * MAX_BUFFER_SIZE * 5];
+ static short buffer[FRAME_SIZE * MAX_BUFFER_SIZE * 5];
struct audio_buf_info info;
int res;
int fd = sounddev;
@@ -407,7 +407,7 @@ static int soundcard_writeframe(short *data)
} else {
/* Copy the data into our buffer */
res = FRAME_SIZE * 2;
- memcpy(buffer + (bufcnt * FRAME_SIZE * 2), data, FRAME_SIZE * 2);
+ memcpy(buffer + (bufcnt * FRAME_SIZE), data, FRAME_SIZE * 2);
bufcnt++;
if (bufcnt == buffersize) {
res = write(fd, ((void *)buffer), FRAME_SIZE * 2 * buffersize);
@@ -548,7 +548,7 @@ static struct ast_channel *oss_new(struct chan_oss_pvt *p, int state)
snprintf(tmp->name, sizeof(tmp->name), "OSS/%s", DEV_DSP + 5);
tmp->type = type;
tmp->fd = funnel[0];
- tmp->format = AST_FORMAT_SLINEAR;
+ tmp->nativeformats = AST_FORMAT_SLINEAR;
tmp->pvt->pvt = p;
tmp->pvt->send_digit = oss_digit;
tmp->pvt->send_text = oss_text;
@@ -841,3 +841,8 @@ int usecount()
pthread_mutex_unlock(&usecnt_lock);
return res;
}
+
+char *key()
+{
+ return ASTERISK_GPL_KEY;
+}